1 /* Code generated from eC source file: pass15.ec */
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
7 #define __runtimePlatform 2
10 typedef long long int64;
11 typedef unsigned long long uint64;
15 #elif defined(__TINYC__)
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
27 typedef long long int64;
28 typedef unsigned long long uint64;
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
34 #define __ENDIAN_PAD(x) (8 - (x))
36 #define __ENDIAN_PAD(x) 0
39 # if defined(__GNUC__) || defined(__TINYC__)
40 # define ecere_stdcall __attribute__((__stdcall__))
41 # define ecere_gcc_struct __attribute__((gcc_struct))
43 # define ecere_stdcall __stdcall
44 # define ecere_gcc_struct
47 # define ecere_stdcall
48 # define ecere_gcc_struct
51 #include <sys/types.h>
54 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366, BOOL = 367, _BOOL = 368, _COMPLEX = 369, _IMAGINARY = 370, RESTRICT = 371, THREAD = 372, WIDE_STRING_LITERAL = 373
57 extern int returnCode;
59 extern unsigned int yydebug;
61 extern unsigned int echoOn;
67 int expression_yyparse();
69 static char * thisNameSpace;
71 unsigned int thisClassParams = 1;
73 unsigned int internalValueCounter;
75 extern unsigned int outputLineNumbers;
77 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isInf;
79 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_signBit;
81 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isNan;
83 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isInf;
85 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_signBit;
87 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isNan;
89 extern int targetBits;
91 extern unsigned int inCompiler;
93 extern unsigned int inPreCompiler;
95 extern unsigned int inDebugger;
97 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
99 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
101 int UnescapeString(char * d, char * s, int len)
106 while(j < len && (ch = s[j]))
111 switch((ch = s[++j]))
157 char * OffsetEscapedString(char * s, int len, int offset)
162 while(j < len && k < offset && (ch = s[j]))
168 return (k == offset) ? s + j : (((void *)0));
171 extern int __ecereVMethodID_class_OnGetString;
173 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
175 extern unsigned int parseError;
177 static int definedExpStackPos;
179 static void * definedExpStack[512];
181 extern const char * sourceFile;
183 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_specConst;
185 unsigned int reachedPass15;
187 extern unsigned int memoryGuard;
189 struct __ecereNameSpace__ecere__sys__OldList
198 struct __ecereNameSpace__ecere__com__DataValue
213 } ecere_gcc_struct __anon1;
216 struct __ecereNameSpace__ecere__com__SerialBuffer
218 unsigned char * _buffer;
224 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
226 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
228 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
230 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
232 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
240 struct TemplateArgument;
256 extern size_t strlen(const char * );
258 extern int strcmp(const char * , const char * );
260 extern int sprintf(char * , const char * , ...);
262 extern char * strcat(char * , const char * );
264 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
266 extern int isprint(int c);
268 extern char * strcpy(char * , const char * );
270 extern void Compiler_Error(const char * format, ...);
272 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
274 struct __ecereNameSpace__ecere__com__LinkList
281 extern char * strchr(const char * , int);
283 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
285 extern void * memcpy(void * , const void * , size_t size);
287 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
289 extern void Compiler_Warning(const char * format, ...);
291 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
293 extern long long strtoll(const char * nptr, char * * endptr, int base);
295 extern uint64 strtoull(const char * nptr, char * * endptr, int base);
297 extern int strtol(const char * , char * * , int base);
299 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
301 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
303 extern double strtod(const char * , char * * );
305 extern int strncmp(const char * , const char * , size_t n);
307 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
309 extern char * QMkString(const char * source);
311 extern char * strncpy(char * , const char * , size_t n);
313 extern int printf(const char * , ...);
315 extern char * strstr(const char * , const char * );
317 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
319 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
321 extern int (* __ecereProp_float_Get_signBit)(float this);
323 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
325 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
327 extern int (* __ecereProp_double_Get_signBit)(double this);
329 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
331 extern float (* __ecereMethod_float_inf)(void);
333 extern float (* __ecereMethod_float_nan)(void);
335 extern double (* __ecereMethod_double_inf)(void);
337 extern double (* __ecereMethod_double_nan)(void);
339 int __ecereVMethodID_class_OnGetString;
341 void SetYydebug(unsigned int b)
346 unsigned int GetParseError()
351 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
353 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
355 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
357 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
359 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
361 struct __ecereNameSpace__ecere__com__EnumClassData
363 struct __ecereNameSpace__ecere__sys__OldList values;
367 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
369 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
371 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
373 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
375 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
377 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
379 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
381 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
385 struct CodePosition start;
386 struct CodePosition end;
389 void ReadString(char * output, char * string)
391 int len = strlen(string);
393 unsigned int quoted = 0, escaped = 0;
395 for(c = 0; c < len; c++)
455 char * PrintInt(long long result)
459 if(result > (((int)0x7fffffff)))
460 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
462 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
463 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
465 return __ecereNameSpace__ecere__sys__CopyString(temp);
468 char * PrintUInt(uint64 result)
472 if(result > (0xffffffff))
473 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
474 else if(result > (((int)0x7fffffff)))
475 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
477 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
478 return __ecereNameSpace__ecere__sys__CopyString(temp);
481 char * PrintInt64(long long result)
485 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
486 sprintf(temp, ((__runtimePlatform == 1) ? "%I64dLL" : "%lldLL"), result);
488 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
489 return __ecereNameSpace__ecere__sys__CopyString(temp);
492 char * PrintUInt64(uint64 result)
496 if(result > (0xffffffff))
497 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
498 else if(result > (((int)0x7fffffff)))
499 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
501 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
502 return __ecereNameSpace__ecere__sys__CopyString(temp);
505 char * PrintHexUInt(uint64 result)
509 if(result > (0xffffffff))
510 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
512 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
513 if(result > (0xffffffff))
515 return __ecereNameSpace__ecere__sys__CopyString(temp);
518 char * PrintHexUInt64(uint64 result)
522 if(result > (0xffffffff))
523 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
525 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
526 return __ecereNameSpace__ecere__sys__CopyString(temp);
529 char * PrintShort(short result)
533 sprintf(temp, "%d", (unsigned short)result);
534 return __ecereNameSpace__ecere__sys__CopyString(temp);
537 char * PrintUShort(unsigned short result)
542 sprintf(temp, "0x%X", (int)result);
544 sprintf(temp, "%d", (int)result);
545 return __ecereNameSpace__ecere__sys__CopyString(temp);
548 char * PrintUChar(unsigned char result)
552 sprintf(temp, "0x%X", result);
553 return __ecereNameSpace__ecere__sys__CopyString(temp);
556 char * PrintChar(char result)
560 if(result > 0 && isprint(result))
561 sprintf(temp, "'%c'", result);
563 sprintf(temp, "%d", (int)result);
565 sprintf(temp, "0x%X", (unsigned char)result);
566 return __ecereNameSpace__ecere__sys__CopyString(temp);
569 char * PrintFloat(float result)
573 if(__ecereProp_float_Get_isInf(result))
575 if(__ecereProp_float_Get_signBit(result))
576 strcpy(temp, "-inf");
580 else if(__ecereProp_float_Get_isNan(result))
582 if(__ecereProp_float_Get_signBit(result))
583 strcpy(temp, "-nan");
588 sprintf(temp, "%.16ff", result);
589 return __ecereNameSpace__ecere__sys__CopyString(temp);
592 char * PrintDouble(double result)
596 if(__ecereProp_double_Get_isInf(result))
598 if(__ecereProp_double_Get_signBit(result))
599 strcpy(temp, "-inf");
603 else if(__ecereProp_double_Get_isNan(result))
605 if(__ecereProp_double_Get_signBit(result))
606 strcpy(temp, "-nan");
611 sprintf(temp, "%.16f", result);
612 return __ecereNameSpace__ecere__sys__CopyString(temp);
615 extern struct Location yylloc;
624 struct Attrib * attr;
625 } ecere_gcc_struct __anon1;
628 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
632 extern struct Expression * parsedExpression;
634 extern struct Expression * QMkExpId(const char * id);
636 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
638 void ComputeExpression(struct Expression * exp);
640 extern struct Expression * MkExpConstant(const char * string);
642 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
644 extern void FreeExpression(struct Expression * exp);
646 extern void FreeExpContents(struct Expression * exp);
648 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
650 extern struct Expression * CopyExpression(struct Expression * exp);
652 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
654 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
656 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
658 extern struct Expression * MoveExpContents(struct Expression * exp);
660 extern struct Expression * QBrackets(struct Expression * exp);
662 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
666 static struct Statement * curCompound;
668 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
670 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
672 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
674 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
676 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
678 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
682 struct External * curExternal, * afterExternal;
684 extern void FreeExternal(struct External * external);
688 static struct Type * curSwitchType;
690 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
692 extern void FreeType(struct Type * type);
694 extern struct Type * MkClassType(const char * name);
696 extern void CopyTypeInto(struct Type * type, struct Type * src);
698 struct __ecereNameSpace__ecere__com__Class;
700 struct __ecereNameSpace__ecere__com__Instance
703 struct __ecereNameSpace__ecere__com__Class * _class;
707 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
709 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
711 static struct __ecereNameSpace__ecere__com__Class * currentClass;
713 struct __ecereNameSpace__ecere__com__Class * thisClass;
715 struct __ecereNameSpace__ecere__com__Class * containerClass;
717 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
719 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
721 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
723 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
725 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
727 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
729 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
731 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
733 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
735 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
737 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
739 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
744 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
751 extern struct Context * curContext;
753 extern struct Context * topContext;
755 extern struct Context * PushContext(void);
757 extern void PopContext(struct Context * ctx);
759 extern void FreeContext(struct Context * context);
761 extern struct Context * globalContext;
765 extern struct ModuleImport * mainModule;
769 struct ModuleImport * prev;
770 struct ModuleImport * next;
772 struct __ecereNameSpace__ecere__sys__OldList classes;
773 struct __ecereNameSpace__ecere__sys__OldList functions;
778 struct __ecereNameSpace__ecere__com__NameSpace;
780 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
782 struct FunctionDefinition;
784 static struct FunctionDefinition * curFunction;
786 struct __ecereNameSpace__ecere__sys__BTNode;
788 struct __ecereNameSpace__ecere__sys__BTNode
791 struct __ecereNameSpace__ecere__sys__BTNode * parent;
792 struct __ecereNameSpace__ecere__sys__BTNode * left;
793 struct __ecereNameSpace__ecere__sys__BTNode * right;
797 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
799 struct __ecereNameSpace__ecere__com__Property;
801 struct __ecereNameSpace__ecere__com__Property
803 struct __ecereNameSpace__ecere__com__Property * prev;
804 struct __ecereNameSpace__ecere__com__Property * next;
806 unsigned int isProperty;
809 struct __ecereNameSpace__ecere__com__Class * _class;
810 const char * dataTypeString;
811 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
812 struct Type * dataType;
813 void (* Set)(void * , int);
814 int (* Get)(void * );
815 unsigned int (* IsSet)(void * );
819 unsigned int conversion;
820 unsigned int watcherOffset;
821 const char * category;
822 unsigned int compiled;
823 unsigned int selfWatchable;
824 unsigned int isWatchable;
827 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
829 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);
831 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
833 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
837 extern void FreeIdentifier(struct Identifier * id);
839 extern struct Identifier * MkIdentifier(const char * string);
841 extern struct Expression * MkExpIdentifier(struct Identifier * id);
843 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
845 extern struct Identifier * CopyIdentifier(struct Identifier * id);
847 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
849 struct __ecereNameSpace__ecere__sys__OldLink;
851 struct __ecereNameSpace__ecere__sys__OldLink
853 struct __ecereNameSpace__ecere__sys__OldLink * prev;
854 struct __ecereNameSpace__ecere__sys__OldLink * next;
860 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
862 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
866 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
868 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
870 extern struct Specifier * MkSpecifier(int specifier);
872 extern struct Specifier * MkSpecifierName(const char * name);
874 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
876 extern void FreeSpecifier(struct Specifier * spec);
878 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
882 struct Statement * prev;
883 struct Statement * next;
888 struct __ecereNameSpace__ecere__sys__OldList * expressions;
891 struct Identifier * id;
892 struct Statement * stmt;
893 } ecere_gcc_struct labeled;
896 struct Expression * exp;
897 struct Statement * stmt;
898 } ecere_gcc_struct caseStmt;
901 struct __ecereNameSpace__ecere__sys__OldList * declarations;
902 struct __ecereNameSpace__ecere__sys__OldList * statements;
903 struct Context * context;
904 unsigned int isSwitch;
905 } ecere_gcc_struct compound;
908 struct __ecereNameSpace__ecere__sys__OldList * exp;
909 struct Statement * stmt;
910 struct Statement * elseStmt;
911 } ecere_gcc_struct ifStmt;
914 struct __ecereNameSpace__ecere__sys__OldList * exp;
915 struct Statement * stmt;
916 } ecere_gcc_struct switchStmt;
919 struct __ecereNameSpace__ecere__sys__OldList * exp;
920 struct Statement * stmt;
921 } ecere_gcc_struct whileStmt;
924 struct __ecereNameSpace__ecere__sys__OldList * exp;
925 struct Statement * stmt;
926 } ecere_gcc_struct doWhile;
929 struct Statement * init;
930 struct Statement * check;
931 struct __ecereNameSpace__ecere__sys__OldList * increment;
932 struct Statement * stmt;
933 } ecere_gcc_struct forStmt;
936 struct Identifier * id;
937 } ecere_gcc_struct gotoStmt;
940 struct Specifier * spec;
942 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
943 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
944 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
945 } ecere_gcc_struct asmStmt;
948 struct Expression * watcher;
949 struct Expression * object;
950 struct __ecereNameSpace__ecere__sys__OldList * watches;
951 } ecere_gcc_struct _watch;
954 struct Identifier * id;
955 struct __ecereNameSpace__ecere__sys__OldList * exp;
956 struct __ecereNameSpace__ecere__sys__OldList * filter;
957 struct Statement * stmt;
958 } ecere_gcc_struct forEachStmt;
959 struct Declaration * decl;
960 } ecere_gcc_struct __anon1;
963 extern struct Specifier * CopySpecifier(struct Specifier * spec);
965 extern struct Expression * MkExpClassSize(struct Specifier * _class);
971 struct Identifier * prev;
972 struct Identifier * next;
974 struct Symbol * classSym;
975 struct Specifier * _class;
977 struct Identifier * badID;
980 extern struct Symbol * FindStruct(struct Context * ctx, const char * name);
982 extern struct Symbol * FindClass(const char * name);
984 extern void DeclareClass(struct External * neededFor, struct Symbol * classSym, const char * className);
986 extern struct Symbol * FindType(struct Context * ctx, const char * name);
988 extern void FreeSymbol(struct Symbol * symbol);
992 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
994 extern void FreeClassDef(struct ClassDef * def);
998 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1000 struct TemplateDatatype
1002 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1003 struct Declarator * decl;
1006 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1008 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
1010 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1012 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
1014 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
1018 struct Declarator * prev;
1019 struct Declarator * next;
1020 struct Location loc;
1022 struct Symbol * symbol;
1023 struct Declarator * declarator;
1026 struct Identifier * identifier;
1029 struct Expression * exp;
1030 struct Expression * posExp;
1031 struct Attrib * attrib;
1032 } ecere_gcc_struct structDecl;
1035 struct Expression * exp;
1036 struct Specifier * enumClass;
1037 } ecere_gcc_struct array;
1040 struct __ecereNameSpace__ecere__sys__OldList * parameters;
1041 } ecere_gcc_struct function;
1044 struct Pointer * pointer;
1045 } ecere_gcc_struct pointer;
1048 struct ExtDecl * extended;
1049 } ecere_gcc_struct extended;
1050 } ecere_gcc_struct __anon1;
1053 extern struct Identifier * GetDeclId(struct Declarator * decl);
1055 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
1057 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1059 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
1061 extern void FreeDeclarator(struct Declarator * decl);
1063 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
1065 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
1067 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
1069 struct FunctionDefinition
1071 struct FunctionDefinition * prev;
1072 struct FunctionDefinition * next;
1073 struct Location loc;
1074 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1075 struct Declarator * declarator;
1076 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1077 struct Statement * body;
1078 struct __ecereNameSpace__ecere__com__Class * _class;
1079 struct __ecereNameSpace__ecere__sys__OldList attached;
1082 struct Symbol * propSet;
1084 unsigned int propertyNoThis;
1087 extern struct Declarator * QMkPtrDecl(const char * id);
1089 struct ClassFunction;
1091 struct ClassFunction
1093 struct ClassFunction * prev;
1094 struct ClassFunction * next;
1095 struct Location loc;
1096 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1097 struct Declarator * declarator;
1098 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1099 struct Statement * body;
1100 struct __ecereNameSpace__ecere__com__Class * _class;
1101 struct __ecereNameSpace__ecere__sys__OldList attached;
1104 struct Symbol * propSet;
1105 unsigned int isVirtual;
1106 unsigned int isConstructor;
1107 unsigned int isDestructor;
1108 unsigned int dontMangle;
1113 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);
1115 extern void FreeClassFunction(struct ClassFunction * func);
1117 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
1119 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
1123 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1125 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1129 struct TypeName * prev;
1130 struct TypeName * next;
1131 struct Location loc;
1132 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
1133 struct Declarator * declarator;
1134 int classObjectType;
1135 struct Expression * bitCount;
1138 extern void FreeTypeName(struct TypeName * typeName);
1140 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
1142 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
1144 extern unsigned int IsVoidPtrCast(struct TypeName * typeName);
1146 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
1148 struct __ecereNameSpace__ecere__com__BTNamedLink;
1150 struct __ecereNameSpace__ecere__com__BTNamedLink
1153 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
1154 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
1155 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
1160 struct __ecereNameSpace__ecere__sys__NamedLink64;
1162 struct __ecereNameSpace__ecere__sys__NamedLink64
1164 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1165 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1170 struct Instantiation;
1174 struct Declaration * prev;
1175 struct Declaration * next;
1176 struct Location loc;
1182 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1183 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1184 } ecere_gcc_struct __anon1;
1185 struct Instantiation * inst;
1188 struct Identifier * id;
1189 struct Expression * exp;
1190 } ecere_gcc_struct __anon2;
1191 } ecere_gcc_struct __anon1;
1192 struct Specifier * extStorage;
1193 struct Symbol * symbol;
1197 struct Instantiation
1199 struct Instantiation * prev;
1200 struct Instantiation * next;
1201 struct Location loc;
1202 struct Specifier * _class;
1203 struct Expression * exp;
1204 struct __ecereNameSpace__ecere__sys__OldList * members;
1205 struct Symbol * symbol;
1206 unsigned int fullSet;
1207 unsigned int isConstant;
1208 unsigned char * data;
1209 struct Location nameLoc;
1210 struct Location insideLoc;
1214 extern void FreeInstance(struct Instantiation * inst);
1216 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
1218 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
1220 struct InitDeclarator;
1222 extern void FreeInitDeclarator(struct InitDeclarator * decl);
1224 struct PropertyWatch;
1226 struct PropertyWatch
1228 struct PropertyWatch * prev;
1229 struct PropertyWatch * next;
1230 struct Location loc;
1231 struct Statement * compound;
1232 struct __ecereNameSpace__ecere__sys__OldList * properties;
1233 unsigned int deleteWatch;
1236 extern void FreePropertyWatch(struct PropertyWatch * watcher);
1238 struct PropertyImport;
1240 struct PropertyImport
1242 struct PropertyImport * prev;
1243 struct PropertyImport * next;
1245 unsigned int isVirtual;
1246 unsigned int hasSet;
1247 unsigned int hasGet;
1250 struct MethodImport;
1254 struct MethodImport * prev;
1255 struct MethodImport * next;
1257 unsigned int isVirtual;
1260 struct FunctionImport;
1262 struct FunctionImport
1264 struct FunctionImport * prev;
1265 struct FunctionImport * next;
1273 struct ClassImport * prev;
1274 struct ClassImport * next;
1276 struct __ecereNameSpace__ecere__sys__OldList methods;
1277 struct __ecereNameSpace__ecere__sys__OldList properties;
1278 unsigned int itself;
1286 struct Expression * prev;
1287 struct Expression * next;
1288 struct Location loc;
1295 struct Identifier * identifier;
1296 } ecere_gcc_struct __anon1;
1297 struct Statement * compound;
1298 struct Instantiation * instance;
1302 unsigned int intlString;
1303 unsigned int wideString;
1304 } ecere_gcc_struct __anon2;
1305 struct __ecereNameSpace__ecere__sys__OldList * list;
1308 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1309 struct Declarator * decl;
1310 } ecere_gcc_struct _classExp;
1313 struct Identifier * id;
1314 } ecere_gcc_struct classData;
1317 struct Expression * exp;
1318 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1319 struct Location argLoc;
1320 } ecere_gcc_struct call;
1323 struct Expression * exp;
1324 struct __ecereNameSpace__ecere__sys__OldList * index;
1325 } ecere_gcc_struct index;
1328 struct Expression * exp;
1329 struct Identifier * member;
1331 unsigned int thisPtr;
1332 } ecere_gcc_struct member;
1336 struct Expression * exp1;
1337 struct Expression * exp2;
1338 } ecere_gcc_struct op;
1339 struct TypeName * typeName;
1340 struct Specifier * _class;
1343 struct TypeName * typeName;
1344 struct Expression * exp;
1345 } ecere_gcc_struct cast;
1348 struct Expression * cond;
1349 struct __ecereNameSpace__ecere__sys__OldList * exp;
1350 struct Expression * elseExp;
1351 } ecere_gcc_struct cond;
1354 struct TypeName * typeName;
1355 struct Expression * size;
1356 } ecere_gcc_struct _new;
1359 struct TypeName * typeName;
1360 struct Expression * size;
1361 struct Expression * exp;
1362 } ecere_gcc_struct _renew;
1366 struct Identifier * id;
1367 } ecere_gcc_struct db;
1370 struct Expression * ds;
1371 struct Expression * name;
1372 } ecere_gcc_struct dbopen;
1375 struct TypeName * typeName;
1376 struct Initializer * initializer;
1377 } ecere_gcc_struct initializer;
1380 struct Expression * exp;
1381 struct TypeName * typeName;
1382 } ecere_gcc_struct vaArg;
1383 } ecere_gcc_struct __anon1;
1384 unsigned int debugValue;
1385 struct __ecereNameSpace__ecere__com__DataValue val;
1387 unsigned int hasAddress;
1388 struct Type * expType;
1389 struct Type * destType;
1392 unsigned int byReference;
1393 unsigned int isConstant;
1394 unsigned int addedThis;
1395 unsigned int needCast;
1396 unsigned int thisPtr;
1397 unsigned int opDestType;
1398 unsigned int needTemplateCast;
1401 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
1405 struct Initializer * prev;
1406 struct Initializer * next;
1407 struct Location loc;
1411 struct Expression * exp;
1412 struct __ecereNameSpace__ecere__sys__OldList * list;
1413 } ecere_gcc_struct __anon1;
1414 unsigned int isConstant;
1415 struct Identifier * id;
1418 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
1420 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
1422 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
1424 struct InitDeclarator
1426 struct InitDeclarator * prev;
1427 struct InitDeclarator * next;
1428 struct Location loc;
1429 struct Declarator * declarator;
1430 struct Initializer * initializer;
1433 void ApplyLocation(struct Expression * exp, struct Location * loc)
1439 if(exp->__anon1.op.exp1)
1440 ApplyLocation(exp->__anon1.op.exp1, loc);
1441 if(exp->__anon1.op.exp2)
1442 ApplyLocation(exp->__anon1.op.exp2, loc);
1445 if(exp->__anon1.list)
1447 struct Expression * e;
1449 for(e = (*exp->__anon1.list).first; e; e = e->next)
1450 ApplyLocation(e, loc);
1454 if(exp->__anon1.index.index)
1456 struct Expression * e;
1458 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
1459 ApplyLocation(e, loc);
1461 if(exp->__anon1.index.exp)
1462 ApplyLocation(exp->__anon1.index.exp, loc);
1465 if(exp->__anon1.call.arguments)
1467 struct Expression * arg;
1469 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
1470 ApplyLocation(arg, loc);
1472 if(exp->__anon1.call.exp)
1473 ApplyLocation(exp->__anon1.call.exp, loc);
1477 if(exp->__anon1.member.exp)
1478 ApplyLocation(exp->__anon1.member.exp, loc);
1481 if(exp->__anon1.cast.exp)
1482 ApplyLocation(exp->__anon1.cast.exp, loc);
1485 if(exp->__anon1.cond.exp)
1487 struct Expression * e;
1489 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
1490 ApplyLocation(e, loc);
1492 if(exp->__anon1.cond.cond)
1493 ApplyLocation(exp->__anon1.cond.cond, loc);
1494 if(exp->__anon1.cond.elseExp)
1495 ApplyLocation(exp->__anon1.cond.elseExp, loc);
1498 if(exp->__anon1.vaArg.exp)
1499 ApplyLocation(exp->__anon1.vaArg.exp, loc);
1506 void __ecereMethod_Expression_Clear();
1512 struct MembersInit * prev;
1513 struct MembersInit * next;
1514 struct Location loc;
1518 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1519 struct ClassFunction * function;
1520 } ecere_gcc_struct __anon1;
1523 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
1529 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1530 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1531 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1532 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1533 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1534 unsigned int (* Neg)(struct Expression *, struct Operand *);
1535 unsigned int (* Inc)(struct Expression *, struct Operand *);
1536 unsigned int (* Dec)(struct Expression *, struct Operand *);
1537 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1538 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1539 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1540 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1541 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1542 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1543 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1544 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1545 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1546 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1547 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1548 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1549 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1550 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1551 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1552 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1553 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1554 unsigned int (* Not)(struct Expression *, struct Operand *);
1555 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1556 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1557 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1558 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1559 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1560 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1561 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1562 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1563 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1570 unsigned int ptrSize;
1583 } ecere_gcc_struct __anon1;
1587 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl);
1589 struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference)
1591 return _DeclareStruct(neededBy, name, skipNoHead, needDereference, 0);
1594 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl);
1596 void DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1598 _DeclareType(neededFor, type, needDereference, forFunctionDef, 0);
1601 void DeclareTypeForwardDeclare(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1603 _DeclareType(neededFor, type, needDereference, forFunctionDef, 1);
1606 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst);
1608 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1610 _PrintType(type, string, printName, fullName, 1);
1613 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1615 _PrintType(type, string, printName, fullName, 0);
1618 struct __ecereNameSpace__ecere__com__Method;
1620 struct __ecereNameSpace__ecere__com__Method
1623 struct __ecereNameSpace__ecere__com__Method * parent;
1624 struct __ecereNameSpace__ecere__com__Method * left;
1625 struct __ecereNameSpace__ecere__com__Method * right;
1630 struct __ecereNameSpace__ecere__com__Class * _class;
1632 const char * dataTypeString;
1633 struct Type * dataType;
1640 struct Symbol * parent;
1641 struct Symbol * left;
1642 struct Symbol * right;
1647 struct __ecereNameSpace__ecere__com__Method * method;
1648 struct __ecereNameSpace__ecere__com__Property * _property;
1649 struct __ecereNameSpace__ecere__com__Class * registered;
1650 } ecere_gcc_struct __anon1;
1651 unsigned int notYetDeclared;
1656 struct External * pointerExternal;
1657 struct External * structExternal;
1658 } ecere_gcc_struct __anon1;
1661 struct External * externalGet;
1662 struct External * externalSet;
1663 struct External * externalPtr;
1664 struct External * externalIsSet;
1665 } ecere_gcc_struct __anon2;
1668 struct External * methodExternal;
1669 struct External * methodCodeExternal;
1670 } ecere_gcc_struct __anon3;
1671 } ecere_gcc_struct __anon2;
1672 unsigned int imported;
1673 unsigned int declaredStructSym;
1674 struct __ecereNameSpace__ecere__com__Class * _class;
1675 unsigned int declaredStruct;
1676 unsigned int needConstructor;
1677 unsigned int needDestructor;
1678 char * constructorName;
1681 char * destructorName;
1682 struct ModuleImport * module;
1683 struct ClassImport * _import;
1684 struct Location nameLoc;
1685 unsigned int isParam;
1686 unsigned int isRemote;
1687 unsigned int isStruct;
1688 unsigned int fireWatchersDone;
1690 unsigned int classData;
1691 unsigned int isStatic;
1693 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
1694 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1695 struct Context * ctx;
1697 struct Expression * propCategory;
1698 unsigned int mustRegister;
1701 struct __ecereNameSpace__ecere__com__ClassProperty;
1703 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1705 struct __ecereNameSpace__ecere__com__ClassProperty
1708 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1709 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1710 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1712 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1713 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1714 const char * dataTypeString;
1715 struct Type * dataType;
1716 unsigned int constant;
1719 struct __ecereNameSpace__ecere__com__BitMember;
1721 struct __ecereNameSpace__ecere__com__BitMember
1723 struct __ecereNameSpace__ecere__com__BitMember * prev;
1724 struct __ecereNameSpace__ecere__com__BitMember * next;
1726 unsigned int isProperty;
1729 struct __ecereNameSpace__ecere__com__Class * _class;
1730 const char * dataTypeString;
1731 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1732 struct Type * dataType;
1739 struct __ecereNameSpace__ecere__com__DataMember;
1741 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1747 const char * dataTypeString;
1748 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1749 } ecere_gcc_struct __anon1;
1750 struct __ecereNameSpace__ecere__com__DataValue expression;
1753 const char * memberString;
1756 struct __ecereNameSpace__ecere__com__DataMember * member;
1757 struct __ecereNameSpace__ecere__com__Property * prop;
1758 struct __ecereNameSpace__ecere__com__Method * method;
1759 } ecere_gcc_struct __anon1;
1760 } ecere_gcc_struct __anon2;
1761 } ecere_gcc_struct __anon1;
1764 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);
1766 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);
1768 struct TemplateParameter;
1770 struct TemplateParameter
1772 struct TemplateParameter * prev;
1773 struct TemplateParameter * next;
1774 struct Location loc;
1776 struct Identifier * identifier;
1779 struct TemplateDatatype * dataType;
1781 } ecere_gcc_struct __anon1;
1782 struct TemplateArgument * defaultArgument;
1783 const char * dataTypeString;
1784 struct Type * baseType;
1794 struct Symbol * _class;
1797 struct __ecereNameSpace__ecere__sys__OldList members;
1799 } ecere_gcc_struct __anon1;
1802 struct Type * returnType;
1803 struct __ecereNameSpace__ecere__sys__OldList params;
1804 struct Symbol * thisClass;
1805 unsigned int staticMethod;
1806 struct TemplateParameter * thisClassTemplate;
1807 } ecere_gcc_struct __anon2;
1810 struct __ecereNameSpace__ecere__com__Method * method;
1811 struct __ecereNameSpace__ecere__com__Class * methodClass;
1812 struct __ecereNameSpace__ecere__com__Class * usedClass;
1813 } ecere_gcc_struct __anon3;
1816 struct Type * arrayType;
1818 struct Expression * arraySizeExp;
1819 unsigned int freeExp;
1820 struct Symbol * enumClass;
1821 } ecere_gcc_struct __anon4;
1823 struct TemplateParameter * templateParameter;
1824 } ecere_gcc_struct __anon1;
1829 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1831 int classObjectType;
1833 unsigned int offset;
1837 unsigned int isSigned : 1;
1838 unsigned int constant : 1;
1839 unsigned int truth : 1;
1840 unsigned int byReference : 1;
1841 unsigned int extraParam : 1;
1842 unsigned int directClassAccess : 1;
1843 unsigned int computing : 1;
1844 unsigned int keepCast : 1;
1845 unsigned int passAsTemplate : 1;
1846 unsigned int dllExport : 1;
1847 unsigned int attrStdcall : 1;
1848 unsigned int declaredWithStruct : 1;
1849 unsigned int typedByReference : 1;
1850 unsigned int casted : 1;
1851 unsigned int pointerAlignment : 1;
1852 unsigned int isLong : 1;
1853 unsigned int signedBeforePromotion : 1;
1858 struct Specifier * prev;
1859 struct Specifier * next;
1860 struct Location loc;
1867 struct ExtDecl * extDecl;
1869 struct Symbol * symbol;
1870 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1871 struct Specifier * nsSpec;
1872 } ecere_gcc_struct __anon1;
1875 struct Identifier * id;
1876 struct __ecereNameSpace__ecere__sys__OldList * list;
1877 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1878 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1879 unsigned int addNameSpace;
1880 struct Context * ctx;
1881 struct ExtDecl * extDeclStruct;
1882 } ecere_gcc_struct __anon2;
1883 struct Expression * expression;
1884 struct Specifier * _class;
1885 struct TemplateParameter * templateParameter;
1886 } ecere_gcc_struct __anon1;
1889 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
1891 struct TemplatedType
1894 struct __ecereNameSpace__ecere__sys__BTNode * parent;
1895 struct __ecereNameSpace__ecere__sys__BTNode * left;
1896 struct __ecereNameSpace__ecere__sys__BTNode * right;
1898 struct TemplateParameter * param;
1901 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1903 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1905 if(!param->baseType)
1907 if(param->dataTypeString)
1908 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1910 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1912 return param->baseType;
1914 return (((void *)0));
1917 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1919 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1921 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1925 if(type1->kind == type2->kind && type1->isLong == type2->isLong)
1936 if(type1->passAsTemplate && !type2->passAsTemplate)
1938 return type1->isSigned != type2->isSigned;
1940 return type1->__anon1._class != type2->__anon1._class;
1942 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1950 unsigned int GetOpInt(struct Operand * op2, int * value2)
1952 if(op2->kind == 3 && op2->type->isSigned)
1953 *value2 = op2->__anon1.i;
1954 else if(op2->kind == 3)
1955 *value2 = (int)op2->__anon1.ui;
1956 else if(op2->kind == 4 && op2->type->isSigned)
1957 *value2 = (int)op2->__anon1.i64;
1958 else if(op2->kind == 4)
1959 *value2 = (int)op2->__anon1.ui64;
1960 else if(op2->kind == 23 && op2->type->isSigned)
1961 *value2 = (int)op2->__anon1.i64;
1962 else if(op2->kind == 23)
1963 *value2 = (int)op2->__anon1.ui64;
1964 else if(op2->kind == 22 && op2->type->isSigned)
1965 *value2 = (int)op2->__anon1.i64;
1966 else if(op2->kind == 22)
1967 *value2 = (int)op2->__anon1.ui64;
1968 else if(op2->kind == 2 && op2->type->isSigned)
1969 *value2 = (int)op2->__anon1.s;
1970 else if(op2->kind == 2)
1971 *value2 = (int)op2->__anon1.us;
1972 else if(op2->kind == 1 && op2->type->isSigned)
1973 *value2 = (int)op2->__anon1.c;
1974 else if(op2->kind == 24 || op2->kind == 1)
1975 *value2 = (int)op2->__anon1.uc;
1976 else if(op2->kind == 6)
1977 *value2 = (int)op2->__anon1.f;
1978 else if(op2->kind == 7)
1979 *value2 = (int)op2->__anon1.d;
1980 else if(op2->kind == 13)
1981 *value2 = (int)op2->__anon1.ui64;
1987 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1989 if(op2->kind == 3 && op2->type->isSigned)
1990 *value2 = (unsigned int)op2->__anon1.i;
1991 else if(op2->kind == 3)
1992 *value2 = op2->__anon1.ui;
1993 else if(op2->kind == 4 && op2->type->isSigned)
1994 *value2 = (unsigned int)op2->__anon1.i64;
1995 else if(op2->kind == 4)
1996 *value2 = (unsigned int)op2->__anon1.ui64;
1997 else if(op2->kind == 23 && op2->type->isSigned)
1998 *value2 = (unsigned int)op2->__anon1.i64;
1999 else if(op2->kind == 23)
2000 *value2 = (unsigned int)op2->__anon1.ui64;
2001 else if(op2->kind == 22 && op2->type->isSigned)
2002 *value2 = (unsigned int)op2->__anon1.i64;
2003 else if(op2->kind == 22)
2004 *value2 = (unsigned int)op2->__anon1.ui64;
2005 else if(op2->kind == 2 && op2->type->isSigned)
2006 *value2 = (unsigned int)op2->__anon1.s;
2007 else if(op2->kind == 2)
2008 *value2 = (unsigned int)op2->__anon1.us;
2009 else if(op2->kind == 1 && op2->type->isSigned)
2010 *value2 = (unsigned int)op2->__anon1.c;
2011 else if(op2->kind == 24 || op2->kind == 1)
2012 *value2 = (unsigned int)op2->__anon1.uc;
2013 else if(op2->kind == 6)
2014 *value2 = (unsigned int)op2->__anon1.f;
2015 else if(op2->kind == 7)
2016 *value2 = (unsigned int)op2->__anon1.d;
2017 else if(op2->kind == 13)
2018 *value2 = (unsigned int)op2->__anon1.ui64;
2024 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
2026 if(op2->kind == 3 && op2->type->isSigned)
2027 *value2 = (long long)op2->__anon1.i;
2028 else if(op2->kind == 3)
2029 *value2 = (long long)op2->__anon1.ui;
2030 else if(op2->kind == 4 && op2->type->isSigned)
2031 *value2 = op2->__anon1.i64;
2032 else if(op2->kind == 4)
2033 *value2 = (long long)op2->__anon1.ui64;
2034 else if(op2->kind == 23 && op2->type->isSigned)
2035 *value2 = op2->__anon1.i64;
2036 else if(op2->kind == 23)
2037 *value2 = (long long)op2->__anon1.ui64;
2038 else if(op2->kind == 22 && op2->type->isSigned)
2039 *value2 = op2->__anon1.i64;
2040 else if(op2->kind == 22)
2041 *value2 = (long long)op2->__anon1.ui64;
2042 else if(op2->kind == 2 && op2->type->isSigned)
2043 *value2 = (long long)op2->__anon1.s;
2044 else if(op2->kind == 2)
2045 *value2 = (long long)op2->__anon1.us;
2046 else if(op2->kind == 1 && op2->type->isSigned)
2047 *value2 = (long long)op2->__anon1.c;
2048 else if(op2->kind == 24 || op2->kind == 1)
2049 *value2 = (long long)op2->__anon1.uc;
2050 else if(op2->kind == 6)
2051 *value2 = (long long)op2->__anon1.f;
2052 else if(op2->kind == 7)
2053 *value2 = (long long)op2->__anon1.d;
2054 else if(op2->kind == 13)
2055 *value2 = (long long)op2->__anon1.ui64;
2061 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
2063 if(op2->kind == 3 && op2->type->isSigned)
2064 *value2 = (uint64)op2->__anon1.i;
2065 else if(op2->kind == 3)
2066 *value2 = (uint64)op2->__anon1.ui;
2067 else if(op2->kind == 4 && op2->type->isSigned)
2068 *value2 = (uint64)op2->__anon1.i64;
2069 else if(op2->kind == 4)
2070 *value2 = op2->__anon1.ui64;
2071 else if(op2->kind == 23 && op2->type->isSigned)
2072 *value2 = (uint64)op2->__anon1.i64;
2073 else if(op2->kind == 23)
2074 *value2 = op2->__anon1.ui64;
2075 else if(op2->kind == 22 && op2->type->isSigned)
2076 *value2 = (uint64)op2->__anon1.i64;
2077 else if(op2->kind == 22)
2078 *value2 = op2->__anon1.ui64;
2079 else if(op2->kind == 2 && op2->type->isSigned)
2080 *value2 = (uint64)op2->__anon1.s;
2081 else if(op2->kind == 2)
2082 *value2 = (uint64)op2->__anon1.us;
2083 else if(op2->kind == 1 && op2->type->isSigned)
2084 *value2 = (uint64)op2->__anon1.c;
2085 else if(op2->kind == 24 || op2->kind == 1)
2086 *value2 = (uint64)op2->__anon1.uc;
2087 else if(op2->kind == 6)
2088 *value2 = (uint64)op2->__anon1.f;
2089 else if(op2->kind == 7)
2090 *value2 = (uint64)op2->__anon1.d;
2091 else if(op2->kind == 13)
2092 *value2 = op2->__anon1.ui64;
2098 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
2100 if(op2->kind == 3 && op2->type->isSigned)
2101 *value2 = (intptr_t)op2->__anon1.i;
2102 else if(op2->kind == 3)
2103 *value2 = (intptr_t)op2->__anon1.ui;
2104 else if(op2->kind == 4 && op2->type->isSigned)
2105 *value2 = (intptr_t)op2->__anon1.i64;
2106 else if(op2->kind == 4)
2107 *value2 = (intptr_t)op2->__anon1.ui64;
2108 else if(op2->kind == 23 && op2->type->isSigned)
2109 *value2 = (intptr_t)op2->__anon1.i64;
2110 else if(op2->kind == 23)
2111 *value2 = (intptr_t)op2->__anon1.ui64;
2112 else if(op2->kind == 22 && op2->type->isSigned)
2113 *value2 = (intptr_t)op2->__anon1.i64;
2114 else if(op2->kind == 22)
2115 *value2 = (intptr_t)op2->__anon1.ui64;
2116 else if(op2->kind == 2 && op2->type->isSigned)
2117 *value2 = (intptr_t)op2->__anon1.s;
2118 else if(op2->kind == 2)
2119 *value2 = (intptr_t)op2->__anon1.us;
2120 else if(op2->kind == 1 && op2->type->isSigned)
2121 *value2 = (intptr_t)op2->__anon1.c;
2122 else if(op2->kind == 24 || op2->kind == 1)
2123 *value2 = (intptr_t)op2->__anon1.uc;
2124 else if(op2->kind == 6)
2125 *value2 = (intptr_t)op2->__anon1.f;
2126 else if(op2->kind == 7)
2127 *value2 = (intptr_t)op2->__anon1.d;
2128 else if(op2->kind == 13)
2129 *value2 = (intptr_t)op2->__anon1.ui64;
2135 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
2137 if(op2->kind == 3 && op2->type->isSigned)
2138 *value2 = (uintptr_t)op2->__anon1.i;
2139 else if(op2->kind == 3)
2140 *value2 = (uintptr_t)op2->__anon1.ui;
2141 else if(op2->kind == 4 && op2->type->isSigned)
2142 *value2 = (uintptr_t)op2->__anon1.i64;
2143 else if(op2->kind == 4)
2144 *value2 = (uintptr_t)op2->__anon1.ui64;
2145 else if(op2->kind == 23 && op2->type->isSigned)
2146 *value2 = (uintptr_t)op2->__anon1.i64;
2147 else if(op2->kind == 23)
2148 *value2 = (uintptr_t)op2->__anon1.ui64;
2149 else if(op2->kind == 22 && op2->type->isSigned)
2150 *value2 = (uintptr_t)op2->__anon1.i64;
2151 else if(op2->kind == 22)
2152 *value2 = (uintptr_t)op2->__anon1.ui64;
2153 else if(op2->kind == 2 && op2->type->isSigned)
2154 *value2 = (uintptr_t)op2->__anon1.s;
2155 else if(op2->kind == 2)
2156 *value2 = (uintptr_t)op2->__anon1.us;
2157 else if(op2->kind == 1 && op2->type->isSigned)
2158 *value2 = (uintptr_t)op2->__anon1.c;
2159 else if(op2->kind == 24 || op2->kind == 1)
2160 *value2 = (uintptr_t)op2->__anon1.uc;
2161 else if(op2->kind == 6)
2162 *value2 = (uintptr_t)op2->__anon1.f;
2163 else if(op2->kind == 7)
2164 *value2 = (uintptr_t)op2->__anon1.d;
2165 else if(op2->kind == 13)
2166 *value2 = (uintptr_t)op2->__anon1.ui64;
2172 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2174 if(op2->kind == 3 && op2->type->isSigned)
2175 *value2 = (ssize_t)op2->__anon1.i;
2176 else if(op2->kind == 3)
2177 *value2 = (ssize_t)op2->__anon1.ui;
2178 else if(op2->kind == 4 && op2->type->isSigned)
2179 *value2 = (ssize_t)op2->__anon1.i64;
2180 else if(op2->kind == 4)
2181 *value2 = (ssize_t)op2->__anon1.ui64;
2182 else if(op2->kind == 23 && op2->type->isSigned)
2183 *value2 = (ssize_t)op2->__anon1.i64;
2184 else if(op2->kind == 23)
2185 *value2 = (ssize_t)op2->__anon1.ui64;
2186 else if(op2->kind == 22 && op2->type->isSigned)
2187 *value2 = (ssize_t)op2->__anon1.i64;
2188 else if(op2->kind == 22)
2189 *value2 = (ssize_t)op2->__anon1.ui64;
2190 else if(op2->kind == 2 && op2->type->isSigned)
2191 *value2 = (ssize_t)op2->__anon1.s;
2192 else if(op2->kind == 2)
2193 *value2 = (ssize_t)op2->__anon1.us;
2194 else if(op2->kind == 1 && op2->type->isSigned)
2195 *value2 = (ssize_t)op2->__anon1.c;
2196 else if(op2->kind == 24 || op2->kind == 1)
2197 *value2 = (ssize_t)op2->__anon1.uc;
2198 else if(op2->kind == 6)
2199 *value2 = (ssize_t)op2->__anon1.f;
2200 else if(op2->kind == 7)
2201 *value2 = (ssize_t)op2->__anon1.d;
2202 else if(op2->kind == 13)
2203 *value2 = (ssize_t)op2->__anon1.ui64;
2209 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2211 if(op2->kind == 3 && op2->type->isSigned)
2212 *value2 = (size_t)op2->__anon1.i;
2213 else if(op2->kind == 3)
2214 *value2 = (size_t)op2->__anon1.ui;
2215 else if(op2->kind == 4 && op2->type->isSigned)
2216 *value2 = (size_t)op2->__anon1.i64;
2217 else if(op2->kind == 4)
2218 *value2 = (size_t)op2->__anon1.ui64;
2219 else if(op2->kind == 23 && op2->type->isSigned)
2220 *value2 = (size_t)op2->__anon1.i64;
2221 else if(op2->kind == 23)
2222 *value2 = (size_t)op2->__anon1.ui64;
2223 else if(op2->kind == 22 && op2->type->isSigned)
2224 *value2 = (size_t)op2->__anon1.i64;
2225 else if(op2->kind == 22)
2226 *value2 = (size_t)op2->__anon1.ui64;
2227 else if(op2->kind == 2 && op2->type->isSigned)
2228 *value2 = (size_t)op2->__anon1.s;
2229 else if(op2->kind == 2)
2230 *value2 = (size_t)op2->__anon1.us;
2231 else if(op2->kind == 1 && op2->type->isSigned)
2232 *value2 = (size_t)op2->__anon1.c;
2233 else if(op2->kind == 24 || op2->kind == 1)
2234 *value2 = (size_t)op2->__anon1.uc;
2235 else if(op2->kind == 6)
2236 *value2 = (size_t)op2->__anon1.f;
2237 else if(op2->kind == 7)
2238 *value2 = (size_t)op2->__anon1.d;
2239 else if(op2->kind == 13)
2240 *value2 = (size_t)op2->__anon1.ui64;
2246 unsigned int GetOpShort(struct Operand * op2, short * value2)
2248 if(op2->kind == 3 && op2->type->isSigned)
2249 *value2 = (short)op2->__anon1.i;
2250 else if(op2->kind == 3)
2251 *value2 = (short)op2->__anon1.ui;
2252 else if(op2->kind == 4 && op2->type->isSigned)
2253 *value2 = (short)op2->__anon1.i64;
2254 else if(op2->kind == 4)
2255 *value2 = (short)op2->__anon1.ui64;
2256 else if(op2->kind == 23 && op2->type->isSigned)
2257 *value2 = (short)op2->__anon1.i64;
2258 else if(op2->kind == 23)
2259 *value2 = (short)op2->__anon1.ui64;
2260 else if(op2->kind == 22 && op2->type->isSigned)
2261 *value2 = (short)op2->__anon1.i64;
2262 else if(op2->kind == 22)
2263 *value2 = (short)op2->__anon1.ui64;
2264 else if(op2->kind == 2 && op2->type->isSigned)
2265 *value2 = op2->__anon1.s;
2266 else if(op2->kind == 2)
2267 *value2 = (short)op2->__anon1.us;
2268 else if(op2->kind == 1 && op2->type->isSigned)
2269 *value2 = (short)op2->__anon1.c;
2270 else if(op2->kind == 24 || op2->kind == 1)
2271 *value2 = (short)op2->__anon1.uc;
2272 else if(op2->kind == 6)
2273 *value2 = (short)op2->__anon1.f;
2274 else if(op2->kind == 7)
2275 *value2 = (short)op2->__anon1.d;
2276 else if(op2->kind == 13)
2277 *value2 = (short)op2->__anon1.ui64;
2283 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2285 if(op2->kind == 3 && op2->type->isSigned)
2286 *value2 = (unsigned short)op2->__anon1.i;
2287 else if(op2->kind == 3)
2288 *value2 = (unsigned short)op2->__anon1.ui;
2289 else if(op2->kind == 4 && op2->type->isSigned)
2290 *value2 = (unsigned short)op2->__anon1.i64;
2291 else if(op2->kind == 4)
2292 *value2 = (unsigned short)op2->__anon1.ui64;
2293 else if(op2->kind == 23 && op2->type->isSigned)
2294 *value2 = (unsigned short)op2->__anon1.i64;
2295 else if(op2->kind == 23)
2296 *value2 = (unsigned short)op2->__anon1.ui64;
2297 else if(op2->kind == 22 && op2->type->isSigned)
2298 *value2 = (unsigned short)op2->__anon1.i64;
2299 else if(op2->kind == 22)
2300 *value2 = (unsigned short)op2->__anon1.ui64;
2301 else if(op2->kind == 2 && op2->type->isSigned)
2302 *value2 = (unsigned short)op2->__anon1.s;
2303 else if(op2->kind == 2)
2304 *value2 = op2->__anon1.us;
2305 else if(op2->kind == 1 && op2->type->isSigned)
2306 *value2 = (unsigned short)op2->__anon1.c;
2307 else if(op2->kind == 24 || op2->kind == 1)
2308 *value2 = (unsigned short)op2->__anon1.uc;
2309 else if(op2->kind == 6)
2310 *value2 = (unsigned short)op2->__anon1.f;
2311 else if(op2->kind == 7)
2312 *value2 = (unsigned short)op2->__anon1.d;
2313 else if(op2->kind == 13)
2314 *value2 = (unsigned short)op2->__anon1.ui64;
2320 unsigned int GetOpChar(struct Operand * op2, char * value2)
2322 if(op2->kind == 3 && op2->type->isSigned)
2323 *value2 = (char)op2->__anon1.i;
2324 else if(op2->kind == 3)
2325 *value2 = (char)op2->__anon1.ui;
2326 else if(op2->kind == 4 && op2->type->isSigned)
2327 *value2 = (char)op2->__anon1.i64;
2328 else if(op2->kind == 4)
2329 *value2 = (char)op2->__anon1.ui64;
2330 else if(op2->kind == 23 && op2->type->isSigned)
2331 *value2 = (char)op2->__anon1.i64;
2332 else if(op2->kind == 23)
2333 *value2 = (char)op2->__anon1.ui64;
2334 else if(op2->kind == 22 && op2->type->isSigned)
2335 *value2 = (char)op2->__anon1.i64;
2336 else if(op2->kind == 22)
2337 *value2 = (char)op2->__anon1.ui64;
2338 else if(op2->kind == 2 && op2->type->isSigned)
2339 *value2 = (char)op2->__anon1.s;
2340 else if(op2->kind == 2)
2341 *value2 = (char)op2->__anon1.us;
2342 else if(op2->kind == 1 && op2->type->isSigned)
2343 *value2 = op2->__anon1.c;
2344 else if(op2->kind == 24 || op2->kind == 1)
2345 *value2 = (char)op2->__anon1.uc;
2346 else if(op2->kind == 6)
2347 *value2 = (char)op2->__anon1.f;
2348 else if(op2->kind == 7)
2349 *value2 = (char)op2->__anon1.d;
2350 else if(op2->kind == 13)
2351 *value2 = (char)op2->__anon1.ui64;
2357 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2359 if(op2->kind == 3 && op2->type->isSigned)
2360 *value2 = (unsigned char)op2->__anon1.i;
2361 else if(op2->kind == 3)
2362 *value2 = (unsigned char)op2->__anon1.ui;
2363 else if(op2->kind == 4 && op2->type->isSigned)
2364 *value2 = (unsigned char)op2->__anon1.i64;
2365 else if(op2->kind == 4)
2366 *value2 = (unsigned char)op2->__anon1.ui64;
2367 else if(op2->kind == 23 && op2->type->isSigned)
2368 *value2 = (unsigned char)op2->__anon1.i64;
2369 else if(op2->kind == 23)
2370 *value2 = (unsigned char)op2->__anon1.ui64;
2371 else if(op2->kind == 22 && op2->type->isSigned)
2372 *value2 = (unsigned char)op2->__anon1.i64;
2373 else if(op2->kind == 22)
2374 *value2 = (unsigned char)op2->__anon1.ui64;
2375 else if(op2->kind == 2 && op2->type->isSigned)
2376 *value2 = (unsigned char)op2->__anon1.s;
2377 else if(op2->kind == 2)
2378 *value2 = (unsigned char)op2->__anon1.us;
2379 else if(op2->kind == 1 && op2->type->isSigned)
2380 *value2 = (unsigned char)op2->__anon1.c;
2381 else if(op2->kind == 24 || op2->kind == 1)
2382 *value2 = op2->__anon1.uc;
2383 else if(op2->kind == 6)
2384 *value2 = (unsigned char)op2->__anon1.f;
2385 else if(op2->kind == 7)
2386 *value2 = (unsigned char)op2->__anon1.d;
2387 else if(op2->kind == 13)
2388 *value2 = (unsigned char)op2->__anon1.ui64;
2394 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2396 if(op2->kind == 3 && op2->type->isSigned)
2397 *value2 = (float)(float)op2->__anon1.i;
2398 else if(op2->kind == 3)
2399 *value2 = (float)(float)op2->__anon1.ui;
2400 else if(op2->kind == 4 && op2->type->isSigned)
2401 *value2 = (float)(float)op2->__anon1.i64;
2402 else if(op2->kind == 4)
2403 *value2 = (float)(float)op2->__anon1.ui64;
2404 else if(op2->kind == 23 && op2->type->isSigned)
2405 *value2 = (float)(float)op2->__anon1.i64;
2406 else if(op2->kind == 23)
2407 *value2 = (float)(float)op2->__anon1.ui64;
2408 else if(op2->kind == 22 && op2->type->isSigned)
2409 *value2 = (float)(float)op2->__anon1.i64;
2410 else if(op2->kind == 22)
2411 *value2 = (float)(float)op2->__anon1.ui64;
2412 else if(op2->kind == 2 && op2->type->isSigned)
2413 *value2 = (float)(float)op2->__anon1.s;
2414 else if(op2->kind == 2)
2415 *value2 = (float)(float)op2->__anon1.us;
2416 else if(op2->kind == 1 && op2->type->isSigned)
2417 *value2 = (float)(float)op2->__anon1.c;
2418 else if(op2->kind == 24 || op2->kind == 1)
2419 *value2 = (float)(float)op2->__anon1.uc;
2420 else if(op2->kind == 6)
2421 *value2 = (float)op2->__anon1.f;
2422 else if(op2->kind == 7)
2423 *value2 = (float)op2->__anon1.d;
2424 else if(op2->kind == 13)
2425 *value2 = (float)(float)op2->__anon1.ui64;
2431 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2433 if(op2->kind == 3 && op2->type->isSigned)
2434 *value2 = (double)(double)op2->__anon1.i;
2435 else if(op2->kind == 3)
2436 *value2 = (double)(double)op2->__anon1.ui;
2437 else if(op2->kind == 4 && op2->type->isSigned)
2438 *value2 = (double)(double)op2->__anon1.i64;
2439 else if(op2->kind == 4)
2440 *value2 = (double)(double)op2->__anon1.ui64;
2441 else if(op2->kind == 23 && op2->type->isSigned)
2442 *value2 = (double)(double)op2->__anon1.i64;
2443 else if(op2->kind == 23)
2444 *value2 = (double)(double)op2->__anon1.ui64;
2445 else if(op2->kind == 22 && op2->type->isSigned)
2446 *value2 = (double)(double)op2->__anon1.i64;
2447 else if(op2->kind == 22)
2448 *value2 = (double)(double)op2->__anon1.ui64;
2449 else if(op2->kind == 2 && op2->type->isSigned)
2450 *value2 = (double)(double)op2->__anon1.s;
2451 else if(op2->kind == 2)
2452 *value2 = (double)(double)op2->__anon1.us;
2453 else if(op2->kind == 1 && op2->type->isSigned)
2454 *value2 = (double)(double)op2->__anon1.c;
2455 else if(op2->kind == 24 || op2->kind == 1)
2456 *value2 = (double)(double)op2->__anon1.uc;
2457 else if(op2->kind == 6)
2458 *value2 = (double)op2->__anon1.f;
2459 else if(op2->kind == 7)
2460 *value2 = (double)op2->__anon1.d;
2461 else if(op2->kind == 13)
2462 *value2 = (double)(double)op2->__anon1.ui64;
2468 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2470 int value2 = op2->__anon1.i;
2473 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
2476 exp->expType = op1->type;
2478 op1->type->refCount++;
2483 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2485 unsigned int value2 = op2->__anon1.ui;
2488 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
2491 exp->expType = op1->type;
2493 op1->type->refCount++;
2498 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2500 long long value2 = op2->__anon1.i64;
2503 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
2506 exp->expType = op1->type;
2508 op1->type->refCount++;
2513 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2515 uint64 value2 = op2->__anon1.ui64;
2518 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
2521 exp->expType = op1->type;
2523 op1->type->refCount++;
2528 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2530 short value2 = op2->__anon1.s;
2533 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s + value2));
2536 exp->expType = op1->type;
2538 op1->type->refCount++;
2543 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2545 unsigned short value2 = op2->__anon1.us;
2548 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us + value2));
2551 exp->expType = op1->type;
2553 op1->type->refCount++;
2558 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2560 char value2 = op2->__anon1.c;
2563 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c + value2));
2566 exp->expType = op1->type;
2568 op1->type->refCount++;
2573 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2575 unsigned char value2 = op2->__anon1.uc;
2578 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc + value2));
2581 exp->expType = op1->type;
2583 op1->type->refCount++;
2588 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2590 float value2 = op2->__anon1.f;
2593 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
2596 exp->expType = op1->type;
2598 op1->type->refCount++;
2603 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2605 double value2 = op2->__anon1.d;
2608 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
2611 exp->expType = op1->type;
2613 op1->type->refCount++;
2618 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2620 int value2 = op2->__anon1.i;
2623 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
2626 exp->expType = op1->type;
2628 op1->type->refCount++;
2633 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2635 unsigned int value2 = op2->__anon1.ui;
2638 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
2641 exp->expType = op1->type;
2643 op1->type->refCount++;
2648 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2650 long long value2 = op2->__anon1.i64;
2653 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
2656 exp->expType = op1->type;
2658 op1->type->refCount++;
2663 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2665 uint64 value2 = op2->__anon1.ui64;
2668 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
2671 exp->expType = op1->type;
2673 op1->type->refCount++;
2678 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2680 short value2 = op2->__anon1.s;
2683 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s - value2));
2686 exp->expType = op1->type;
2688 op1->type->refCount++;
2693 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2695 unsigned short value2 = op2->__anon1.us;
2698 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us - value2));
2701 exp->expType = op1->type;
2703 op1->type->refCount++;
2708 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2710 char value2 = op2->__anon1.c;
2713 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c - value2));
2716 exp->expType = op1->type;
2718 op1->type->refCount++;
2723 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2725 unsigned char value2 = op2->__anon1.uc;
2728 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc - value2));
2731 exp->expType = op1->type;
2733 op1->type->refCount++;
2738 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2740 float value2 = op2->__anon1.f;
2743 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
2746 exp->expType = op1->type;
2748 op1->type->refCount++;
2753 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2755 double value2 = op2->__anon1.d;
2758 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
2761 exp->expType = op1->type;
2763 op1->type->refCount++;
2768 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2770 int value2 = op2->__anon1.i;
2773 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
2776 exp->expType = op1->type;
2778 op1->type->refCount++;
2783 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2785 unsigned int value2 = op2->__anon1.ui;
2788 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
2791 exp->expType = op1->type;
2793 op1->type->refCount++;
2798 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2800 long long value2 = op2->__anon1.i64;
2803 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
2806 exp->expType = op1->type;
2808 op1->type->refCount++;
2813 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2815 uint64 value2 = op2->__anon1.ui64;
2818 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
2821 exp->expType = op1->type;
2823 op1->type->refCount++;
2828 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2830 short value2 = op2->__anon1.s;
2833 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s * value2));
2836 exp->expType = op1->type;
2838 op1->type->refCount++;
2843 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2845 unsigned short value2 = op2->__anon1.us;
2848 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us * value2));
2851 exp->expType = op1->type;
2853 op1->type->refCount++;
2858 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2860 char value2 = op2->__anon1.c;
2863 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c * value2));
2866 exp->expType = op1->type;
2868 op1->type->refCount++;
2873 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2875 unsigned char value2 = op2->__anon1.uc;
2878 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc * value2));
2881 exp->expType = op1->type;
2883 op1->type->refCount++;
2888 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2890 float value2 = op2->__anon1.f;
2893 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
2896 exp->expType = op1->type;
2898 op1->type->refCount++;
2903 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2905 double value2 = op2->__anon1.d;
2908 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
2911 exp->expType = op1->type;
2913 op1->type->refCount++;
2918 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2920 int value2 = op2->__anon1.i;
2923 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i / value2)) : 0);
2926 exp->expType = op1->type;
2928 op1->type->refCount++;
2933 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2935 unsigned int value2 = op2->__anon1.ui;
2938 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui / value2)) : 0);
2941 exp->expType = op1->type;
2943 op1->type->refCount++;
2948 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2950 long long value2 = op2->__anon1.i64;
2953 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 / value2)) : 0);
2956 exp->expType = op1->type;
2958 op1->type->refCount++;
2963 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2965 uint64 value2 = op2->__anon1.ui64;
2968 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 / value2)) : 0);
2971 exp->expType = op1->type;
2973 op1->type->refCount++;
2978 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2980 short value2 = op2->__anon1.s;
2983 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s / value2)) : 0);
2986 exp->expType = op1->type;
2988 op1->type->refCount++;
2993 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2995 unsigned short value2 = op2->__anon1.us;
2998 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us / value2)) : 0);
3001 exp->expType = op1->type;
3003 op1->type->refCount++;
3008 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3010 char value2 = op2->__anon1.c;
3013 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c / value2)) : 0);
3016 exp->expType = op1->type;
3018 op1->type->refCount++;
3023 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3025 unsigned char value2 = op2->__anon1.uc;
3028 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc / value2)) : 0);
3031 exp->expType = op1->type;
3033 op1->type->refCount++;
3038 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3040 float value2 = op2->__anon1.f;
3043 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f / value2));
3046 exp->expType = op1->type;
3048 op1->type->refCount++;
3053 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3055 double value2 = op2->__anon1.d;
3058 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d / value2));
3061 exp->expType = op1->type;
3063 op1->type->refCount++;
3068 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3070 int value2 = op2->__anon1.i;
3073 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i % value2)) : 0);
3076 exp->expType = op1->type;
3078 op1->type->refCount++;
3083 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3085 unsigned int value2 = op2->__anon1.ui;
3088 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui % value2)) : 0);
3091 exp->expType = op1->type;
3093 op1->type->refCount++;
3098 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3100 long long value2 = op2->__anon1.i64;
3103 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 % value2)) : 0);
3106 exp->expType = op1->type;
3108 op1->type->refCount++;
3113 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3115 uint64 value2 = op2->__anon1.ui64;
3118 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 % value2)) : 0);
3121 exp->expType = op1->type;
3123 op1->type->refCount++;
3128 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3130 short value2 = op2->__anon1.s;
3133 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s % value2)) : 0);
3136 exp->expType = op1->type;
3138 op1->type->refCount++;
3143 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3145 unsigned short value2 = op2->__anon1.us;
3148 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us % value2)) : 0);
3151 exp->expType = op1->type;
3153 op1->type->refCount++;
3158 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3160 char value2 = op2->__anon1.c;
3163 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c % value2)) : 0);
3166 exp->expType = op1->type;
3168 op1->type->refCount++;
3173 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3175 unsigned char value2 = op2->__anon1.uc;
3178 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc % value2)) : 0);
3181 exp->expType = op1->type;
3183 op1->type->refCount++;
3188 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
3191 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
3194 exp->expType = op1->type;
3196 op1->type->refCount++;
3201 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
3204 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
3207 exp->expType = op1->type;
3209 op1->type->refCount++;
3214 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
3217 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
3220 exp->expType = op1->type;
3222 op1->type->refCount++;
3227 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
3230 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
3233 exp->expType = op1->type;
3235 op1->type->refCount++;
3240 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
3243 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
3246 exp->expType = op1->type;
3248 op1->type->refCount++;
3253 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
3256 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
3259 exp->expType = op1->type;
3261 op1->type->refCount++;
3266 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
3269 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
3272 exp->expType = op1->type;
3274 op1->type->refCount++;
3279 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
3282 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
3285 exp->expType = op1->type;
3287 op1->type->refCount++;
3292 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
3295 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
3298 exp->expType = op1->type;
3300 op1->type->refCount++;
3305 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
3308 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
3311 exp->expType = op1->type;
3313 op1->type->refCount++;
3318 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
3321 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
3324 exp->expType = op1->type;
3326 op1->type->refCount++;
3331 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
3334 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
3337 exp->expType = op1->type;
3339 op1->type->refCount++;
3344 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
3347 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
3350 exp->expType = op1->type;
3352 op1->type->refCount++;
3357 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
3360 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
3363 exp->expType = op1->type;
3365 op1->type->refCount++;
3370 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
3373 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
3376 exp->expType = op1->type;
3378 op1->type->refCount++;
3383 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
3386 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
3389 exp->expType = op1->type;
3391 op1->type->refCount++;
3396 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
3399 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
3402 exp->expType = op1->type;
3404 op1->type->refCount++;
3409 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
3412 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
3415 exp->expType = op1->type;
3417 op1->type->refCount++;
3422 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
3425 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
3428 exp->expType = op1->type;
3430 op1->type->refCount++;
3435 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
3438 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
3441 exp->expType = op1->type;
3443 op1->type->refCount++;
3448 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
3451 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
3454 exp->expType = op1->type;
3456 op1->type->refCount++;
3461 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
3464 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
3467 exp->expType = op1->type;
3469 op1->type->refCount++;
3474 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
3477 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
3480 exp->expType = op1->type;
3482 op1->type->refCount++;
3487 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
3490 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
3493 exp->expType = op1->type;
3495 op1->type->refCount++;
3500 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
3503 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
3506 exp->expType = op1->type;
3508 op1->type->refCount++;
3513 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
3516 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
3519 exp->expType = op1->type;
3521 op1->type->refCount++;
3526 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
3529 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
3532 exp->expType = op1->type;
3534 op1->type->refCount++;
3539 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
3542 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
3545 exp->expType = op1->type;
3547 op1->type->refCount++;
3552 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
3555 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
3558 exp->expType = op1->type;
3560 op1->type->refCount++;
3565 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
3568 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
3571 exp->expType = op1->type;
3573 op1->type->refCount++;
3578 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3580 int value2 = op2->__anon1.i;
3583 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
3586 exp->expType = op1->type;
3588 op1->type->refCount++;
3593 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3595 unsigned int value2 = op2->__anon1.ui;
3598 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
3601 exp->expType = op1->type;
3603 op1->type->refCount++;
3608 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3610 long long value2 = op2->__anon1.i64;
3613 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
3616 exp->expType = op1->type;
3618 op1->type->refCount++;
3623 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3625 uint64 value2 = op2->__anon1.ui64;
3628 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
3631 exp->expType = op1->type;
3633 op1->type->refCount++;
3638 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3640 short value2 = op2->__anon1.s;
3643 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
3646 exp->expType = op1->type;
3648 op1->type->refCount++;
3653 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3655 unsigned short value2 = op2->__anon1.us;
3658 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
3661 exp->expType = op1->type;
3663 op1->type->refCount++;
3668 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3670 char value2 = op2->__anon1.c;
3673 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
3676 exp->expType = op1->type;
3678 op1->type->refCount++;
3683 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3685 unsigned char value2 = op2->__anon1.uc;
3688 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
3691 exp->expType = op1->type;
3693 op1->type->refCount++;
3698 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3700 float value2 = op2->__anon1.f;
3703 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
3706 exp->expType = op1->type;
3708 op1->type->refCount++;
3713 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3715 double value2 = op2->__anon1.d;
3718 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
3721 exp->expType = op1->type;
3723 op1->type->refCount++;
3728 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3730 int value2 = op2->__anon1.i;
3733 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
3736 exp->expType = op1->type;
3738 op1->type->refCount++;
3743 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3745 unsigned int value2 = op2->__anon1.ui;
3748 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
3751 exp->expType = op1->type;
3753 op1->type->refCount++;
3758 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3760 long long value2 = op2->__anon1.i64;
3763 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
3766 exp->expType = op1->type;
3768 op1->type->refCount++;
3773 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3775 uint64 value2 = op2->__anon1.ui64;
3778 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
3781 exp->expType = op1->type;
3783 op1->type->refCount++;
3788 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3790 short value2 = op2->__anon1.s;
3793 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
3796 exp->expType = op1->type;
3798 op1->type->refCount++;
3803 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3805 unsigned short value2 = op2->__anon1.us;
3808 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
3811 exp->expType = op1->type;
3813 op1->type->refCount++;
3818 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3820 char value2 = op2->__anon1.c;
3823 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
3826 exp->expType = op1->type;
3828 op1->type->refCount++;
3833 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3835 unsigned char value2 = op2->__anon1.uc;
3838 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
3841 exp->expType = op1->type;
3843 op1->type->refCount++;
3848 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3850 float value2 = op2->__anon1.f;
3853 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
3856 exp->expType = op1->type;
3858 op1->type->refCount++;
3863 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3865 double value2 = op2->__anon1.d;
3868 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
3871 exp->expType = op1->type;
3873 op1->type->refCount++;
3878 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3880 int value2 = op2->__anon1.i;
3883 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
3886 exp->expType = op1->type;
3888 op1->type->refCount++;
3893 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3895 unsigned int value2 = op2->__anon1.ui;
3898 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
3901 exp->expType = op1->type;
3903 op1->type->refCount++;
3908 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3910 long long value2 = op2->__anon1.i64;
3913 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
3916 exp->expType = op1->type;
3918 op1->type->refCount++;
3923 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3925 uint64 value2 = op2->__anon1.ui64;
3928 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
3931 exp->expType = op1->type;
3933 op1->type->refCount++;
3938 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3940 short value2 = op2->__anon1.s;
3943 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
3946 exp->expType = op1->type;
3948 op1->type->refCount++;
3953 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3955 unsigned short value2 = op2->__anon1.us;
3958 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
3961 exp->expType = op1->type;
3963 op1->type->refCount++;
3968 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3970 char value2 = op2->__anon1.c;
3973 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
3976 exp->expType = op1->type;
3978 op1->type->refCount++;
3983 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3985 unsigned char value2 = op2->__anon1.uc;
3988 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
3991 exp->expType = op1->type;
3993 op1->type->refCount++;
3998 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4000 float value2 = op2->__anon1.f;
4003 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
4006 exp->expType = op1->type;
4008 op1->type->refCount++;
4013 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4015 double value2 = op2->__anon1.d;
4018 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
4021 exp->expType = op1->type;
4023 op1->type->refCount++;
4028 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4030 int value2 = op2->__anon1.i;
4033 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
4036 exp->expType = op1->type;
4038 op1->type->refCount++;
4043 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4045 unsigned int value2 = op2->__anon1.ui;
4048 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
4051 exp->expType = op1->type;
4053 op1->type->refCount++;
4058 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4060 long long value2 = op2->__anon1.i64;
4063 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
4066 exp->expType = op1->type;
4068 op1->type->refCount++;
4073 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4075 uint64 value2 = op2->__anon1.ui64;
4078 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
4081 exp->expType = op1->type;
4083 op1->type->refCount++;
4088 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4090 short value2 = op2->__anon1.s;
4093 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
4096 exp->expType = op1->type;
4098 op1->type->refCount++;
4103 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4105 unsigned short value2 = op2->__anon1.us;
4108 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
4111 exp->expType = op1->type;
4113 op1->type->refCount++;
4118 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4120 char value2 = op2->__anon1.c;
4123 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
4126 exp->expType = op1->type;
4128 op1->type->refCount++;
4133 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4135 unsigned char value2 = op2->__anon1.uc;
4138 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
4141 exp->expType = op1->type;
4143 op1->type->refCount++;
4148 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4150 float value2 = op2->__anon1.f;
4153 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
4156 exp->expType = op1->type;
4158 op1->type->refCount++;
4163 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4165 double value2 = op2->__anon1.d;
4168 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
4171 exp->expType = op1->type;
4173 op1->type->refCount++;
4178 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4180 int value2 = op2->__anon1.i;
4183 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i /= value2)) : 0);
4186 exp->expType = op1->type;
4188 op1->type->refCount++;
4193 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4195 unsigned int value2 = op2->__anon1.ui;
4198 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui /= value2)) : 0);
4201 exp->expType = op1->type;
4203 op1->type->refCount++;
4208 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4210 long long value2 = op2->__anon1.i64;
4213 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 /= value2)) : 0);
4216 exp->expType = op1->type;
4218 op1->type->refCount++;
4223 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4225 uint64 value2 = op2->__anon1.ui64;
4228 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 /= value2)) : 0);
4231 exp->expType = op1->type;
4233 op1->type->refCount++;
4238 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4240 short value2 = op2->__anon1.s;
4243 exp->__anon1.__anon2.string = PrintShort(value2 ? ((op1->__anon1.s /= value2)) : 0);
4246 exp->expType = op1->type;
4248 op1->type->refCount++;
4253 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4255 unsigned short value2 = op2->__anon1.us;
4258 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((op1->__anon1.us /= value2)) : 0);
4261 exp->expType = op1->type;
4263 op1->type->refCount++;
4268 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4270 char value2 = op2->__anon1.c;
4273 exp->__anon1.__anon2.string = PrintChar(value2 ? ((op1->__anon1.c /= value2)) : 0);
4276 exp->expType = op1->type;
4278 op1->type->refCount++;
4283 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4285 unsigned char value2 = op2->__anon1.uc;
4288 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((op1->__anon1.uc /= value2)) : 0);
4291 exp->expType = op1->type;
4293 op1->type->refCount++;
4298 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4300 float value2 = op2->__anon1.f;
4303 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f /= value2));
4306 exp->expType = op1->type;
4308 op1->type->refCount++;
4313 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4315 double value2 = op2->__anon1.d;
4318 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d /= value2));
4321 exp->expType = op1->type;
4323 op1->type->refCount++;
4328 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4330 int value2 = op2->__anon1.i;
4333 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i %= value2)) : 0);
4336 exp->expType = op1->type;
4338 op1->type->refCount++;
4343 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4345 unsigned int value2 = op2->__anon1.ui;
4348 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui %= value2)) : 0);
4351 exp->expType = op1->type;
4353 op1->type->refCount++;
4358 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4360 long long value2 = op2->__anon1.i64;
4363 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 %= value2)) : 0);
4366 exp->expType = op1->type;
4368 op1->type->refCount++;
4373 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4375 uint64 value2 = op2->__anon1.ui64;
4378 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 %= value2)) : 0);
4381 exp->expType = op1->type;
4383 op1->type->refCount++;
4388 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4390 short value2 = op2->__anon1.s;
4393 exp->__anon1.__anon2.string = PrintShort(value2 ? ((op1->__anon1.s %= value2)) : 0);
4396 exp->expType = op1->type;
4398 op1->type->refCount++;
4403 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4405 unsigned short value2 = op2->__anon1.us;
4408 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((op1->__anon1.us %= value2)) : 0);
4411 exp->expType = op1->type;
4413 op1->type->refCount++;
4418 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4420 char value2 = op2->__anon1.c;
4423 exp->__anon1.__anon2.string = PrintChar(value2 ? ((op1->__anon1.c %= value2)) : 0);
4426 exp->expType = op1->type;
4428 op1->type->refCount++;
4433 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4435 unsigned char value2 = op2->__anon1.uc;
4438 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((op1->__anon1.uc %= value2)) : 0);
4441 exp->expType = op1->type;
4443 op1->type->refCount++;
4448 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4450 int value2 = op2->__anon1.i;
4453 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
4456 exp->expType = op1->type;
4458 op1->type->refCount++;
4463 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4465 unsigned int value2 = op2->__anon1.ui;
4468 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
4471 exp->expType = op1->type;
4473 op1->type->refCount++;
4478 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4480 long long value2 = op2->__anon1.i64;
4483 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
4486 exp->expType = op1->type;
4488 op1->type->refCount++;
4493 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4495 uint64 value2 = op2->__anon1.ui64;
4498 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
4501 exp->expType = op1->type;
4503 op1->type->refCount++;
4508 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4510 short value2 = op2->__anon1.s;
4513 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s & value2));
4516 exp->expType = op1->type;
4518 op1->type->refCount++;
4523 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4525 unsigned short value2 = op2->__anon1.us;
4528 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us & value2));
4531 exp->expType = op1->type;
4533 op1->type->refCount++;
4538 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4540 char value2 = op2->__anon1.c;
4543 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c & value2));
4546 exp->expType = op1->type;
4548 op1->type->refCount++;
4553 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4555 unsigned char value2 = op2->__anon1.uc;
4558 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc & value2));
4561 exp->expType = op1->type;
4563 op1->type->refCount++;
4568 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4570 int value2 = op2->__anon1.i;
4573 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
4576 exp->expType = op1->type;
4578 op1->type->refCount++;
4583 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4585 unsigned int value2 = op2->__anon1.ui;
4588 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
4591 exp->expType = op1->type;
4593 op1->type->refCount++;
4598 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4600 long long value2 = op2->__anon1.i64;
4603 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
4606 exp->expType = op1->type;
4608 op1->type->refCount++;
4613 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4615 uint64 value2 = op2->__anon1.ui64;
4618 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
4621 exp->expType = op1->type;
4623 op1->type->refCount++;
4628 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4630 short value2 = op2->__anon1.s;
4633 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s | value2));
4636 exp->expType = op1->type;
4638 op1->type->refCount++;
4643 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4645 unsigned short value2 = op2->__anon1.us;
4648 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us | value2));
4651 exp->expType = op1->type;
4653 op1->type->refCount++;
4658 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4660 char value2 = op2->__anon1.c;
4663 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c | value2));
4666 exp->expType = op1->type;
4668 op1->type->refCount++;
4673 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4675 unsigned char value2 = op2->__anon1.uc;
4678 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc | value2));
4681 exp->expType = op1->type;
4683 op1->type->refCount++;
4688 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4690 int value2 = op2->__anon1.i;
4693 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
4696 exp->expType = op1->type;
4698 op1->type->refCount++;
4703 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4705 unsigned int value2 = op2->__anon1.ui;
4708 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
4711 exp->expType = op1->type;
4713 op1->type->refCount++;
4718 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4720 long long value2 = op2->__anon1.i64;
4723 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
4726 exp->expType = op1->type;
4728 op1->type->refCount++;
4733 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4735 uint64 value2 = op2->__anon1.ui64;
4738 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
4741 exp->expType = op1->type;
4743 op1->type->refCount++;
4748 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4750 short value2 = op2->__anon1.s;
4753 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s ^ value2));
4756 exp->expType = op1->type;
4758 op1->type->refCount++;
4763 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4765 unsigned short value2 = op2->__anon1.us;
4768 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us ^ value2));
4771 exp->expType = op1->type;
4773 op1->type->refCount++;
4778 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4780 char value2 = op2->__anon1.c;
4783 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c ^ value2));
4786 exp->expType = op1->type;
4788 op1->type->refCount++;
4793 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4795 unsigned char value2 = op2->__anon1.uc;
4798 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc ^ value2));
4801 exp->expType = op1->type;
4803 op1->type->refCount++;
4808 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4810 int value2 = op2->__anon1.i;
4813 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
4816 exp->expType = op1->type;
4818 op1->type->refCount++;
4823 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4825 unsigned int value2 = op2->__anon1.ui;
4828 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
4831 exp->expType = op1->type;
4833 op1->type->refCount++;
4838 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4840 long long value2 = op2->__anon1.i64;
4843 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
4846 exp->expType = op1->type;
4848 op1->type->refCount++;
4853 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4855 uint64 value2 = op2->__anon1.ui64;
4858 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
4861 exp->expType = op1->type;
4863 op1->type->refCount++;
4868 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4870 short value2 = op2->__anon1.s;
4873 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s << value2));
4876 exp->expType = op1->type;
4878 op1->type->refCount++;
4883 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4885 unsigned short value2 = op2->__anon1.us;
4888 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us << value2));
4891 exp->expType = op1->type;
4893 op1->type->refCount++;
4898 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4900 char value2 = op2->__anon1.c;
4903 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c << value2));
4906 exp->expType = op1->type;
4908 op1->type->refCount++;
4913 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4915 unsigned char value2 = op2->__anon1.uc;
4918 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc << value2));
4921 exp->expType = op1->type;
4923 op1->type->refCount++;
4928 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4930 int value2 = op2->__anon1.i;
4933 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
4936 exp->expType = op1->type;
4938 op1->type->refCount++;
4943 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4945 unsigned int value2 = op2->__anon1.ui;
4948 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
4951 exp->expType = op1->type;
4953 op1->type->refCount++;
4958 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4960 long long value2 = op2->__anon1.i64;
4963 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
4966 exp->expType = op1->type;
4968 op1->type->refCount++;
4973 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4975 uint64 value2 = op2->__anon1.ui64;
4978 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
4981 exp->expType = op1->type;
4983 op1->type->refCount++;
4988 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4990 short value2 = op2->__anon1.s;
4993 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >> value2));
4996 exp->expType = op1->type;
4998 op1->type->refCount++;
5003 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5005 unsigned short value2 = op2->__anon1.us;
5008 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >> value2));
5011 exp->expType = op1->type;
5013 op1->type->refCount++;
5018 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5020 char value2 = op2->__anon1.c;
5023 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >> value2));
5026 exp->expType = op1->type;
5028 op1->type->refCount++;
5033 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5035 unsigned char value2 = op2->__anon1.uc;
5038 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >> value2));
5041 exp->expType = op1->type;
5043 op1->type->refCount++;
5048 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
5051 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
5054 exp->expType = op1->type;
5056 op1->type->refCount++;
5061 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
5064 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
5067 exp->expType = op1->type;
5069 op1->type->refCount++;
5074 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
5077 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
5080 exp->expType = op1->type;
5082 op1->type->refCount++;
5087 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
5090 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
5093 exp->expType = op1->type;
5095 op1->type->refCount++;
5100 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
5103 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
5106 exp->expType = op1->type;
5108 op1->type->refCount++;
5113 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
5116 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
5119 exp->expType = op1->type;
5121 op1->type->refCount++;
5126 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
5129 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
5132 exp->expType = op1->type;
5134 op1->type->refCount++;
5139 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
5142 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
5145 exp->expType = op1->type;
5147 op1->type->refCount++;
5152 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5154 int value2 = op2->__anon1.i;
5157 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
5160 exp->expType = op1->type;
5162 op1->type->refCount++;
5167 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5169 unsigned int value2 = op2->__anon1.ui;
5172 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
5175 exp->expType = op1->type;
5177 op1->type->refCount++;
5182 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5184 long long value2 = op2->__anon1.i64;
5187 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
5190 exp->expType = op1->type;
5192 op1->type->refCount++;
5197 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5199 uint64 value2 = op2->__anon1.ui64;
5202 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
5205 exp->expType = op1->type;
5207 op1->type->refCount++;
5212 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5214 short value2 = op2->__anon1.s;
5217 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
5220 exp->expType = op1->type;
5222 op1->type->refCount++;
5227 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5229 unsigned short value2 = op2->__anon1.us;
5232 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
5235 exp->expType = op1->type;
5237 op1->type->refCount++;
5242 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5244 char value2 = op2->__anon1.c;
5247 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
5250 exp->expType = op1->type;
5252 op1->type->refCount++;
5257 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5259 unsigned char value2 = op2->__anon1.uc;
5262 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
5265 exp->expType = op1->type;
5267 op1->type->refCount++;
5272 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5274 int value2 = op2->__anon1.i;
5277 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
5280 exp->expType = op1->type;
5282 op1->type->refCount++;
5287 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5289 unsigned int value2 = op2->__anon1.ui;
5292 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
5295 exp->expType = op1->type;
5297 op1->type->refCount++;
5302 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5304 long long value2 = op2->__anon1.i64;
5307 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
5310 exp->expType = op1->type;
5312 op1->type->refCount++;
5317 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5319 uint64 value2 = op2->__anon1.ui64;
5322 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
5325 exp->expType = op1->type;
5327 op1->type->refCount++;
5332 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5334 short value2 = op2->__anon1.s;
5337 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
5340 exp->expType = op1->type;
5342 op1->type->refCount++;
5347 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5349 unsigned short value2 = op2->__anon1.us;
5352 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
5355 exp->expType = op1->type;
5357 op1->type->refCount++;
5362 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5364 char value2 = op2->__anon1.c;
5367 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
5370 exp->expType = op1->type;
5372 op1->type->refCount++;
5377 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5379 unsigned char value2 = op2->__anon1.uc;
5382 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
5385 exp->expType = op1->type;
5387 op1->type->refCount++;
5392 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5394 int value2 = op2->__anon1.i;
5397 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
5400 exp->expType = op1->type;
5402 op1->type->refCount++;
5407 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5409 unsigned int value2 = op2->__anon1.ui;
5412 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
5415 exp->expType = op1->type;
5417 op1->type->refCount++;
5422 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5424 long long value2 = op2->__anon1.i64;
5427 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
5430 exp->expType = op1->type;
5432 op1->type->refCount++;
5437 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5439 uint64 value2 = op2->__anon1.ui64;
5442 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
5445 exp->expType = op1->type;
5447 op1->type->refCount++;
5452 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5454 short value2 = op2->__anon1.s;
5457 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
5460 exp->expType = op1->type;
5462 op1->type->refCount++;
5467 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5469 unsigned short value2 = op2->__anon1.us;
5472 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
5475 exp->expType = op1->type;
5477 op1->type->refCount++;
5482 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5484 char value2 = op2->__anon1.c;
5487 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
5490 exp->expType = op1->type;
5492 op1->type->refCount++;
5497 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5499 unsigned char value2 = op2->__anon1.uc;
5502 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
5505 exp->expType = op1->type;
5507 op1->type->refCount++;
5512 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5514 int value2 = op2->__anon1.i;
5517 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
5520 exp->expType = op1->type;
5522 op1->type->refCount++;
5527 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5529 unsigned int value2 = op2->__anon1.ui;
5532 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
5535 exp->expType = op1->type;
5537 op1->type->refCount++;
5542 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5544 long long value2 = op2->__anon1.i64;
5547 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
5550 exp->expType = op1->type;
5552 op1->type->refCount++;
5557 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5559 uint64 value2 = op2->__anon1.ui64;
5562 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
5565 exp->expType = op1->type;
5567 op1->type->refCount++;
5572 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5574 short value2 = op2->__anon1.s;
5577 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
5580 exp->expType = op1->type;
5582 op1->type->refCount++;
5587 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5589 unsigned short value2 = op2->__anon1.us;
5592 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
5595 exp->expType = op1->type;
5597 op1->type->refCount++;
5602 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5604 char value2 = op2->__anon1.c;
5607 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
5610 exp->expType = op1->type;
5612 op1->type->refCount++;
5617 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5619 unsigned char value2 = op2->__anon1.uc;
5622 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
5625 exp->expType = op1->type;
5627 op1->type->refCount++;
5632 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5634 int value2 = op2->__anon1.i;
5637 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
5640 exp->expType = op1->type;
5642 op1->type->refCount++;
5647 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5649 unsigned int value2 = op2->__anon1.ui;
5652 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
5655 exp->expType = op1->type;
5657 op1->type->refCount++;
5662 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5664 long long value2 = op2->__anon1.i64;
5667 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
5670 exp->expType = op1->type;
5672 op1->type->refCount++;
5677 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5679 uint64 value2 = op2->__anon1.ui64;
5682 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
5685 exp->expType = op1->type;
5687 op1->type->refCount++;
5692 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5694 short value2 = op2->__anon1.s;
5697 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
5700 exp->expType = op1->type;
5702 op1->type->refCount++;
5707 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5709 unsigned short value2 = op2->__anon1.us;
5712 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
5715 exp->expType = op1->type;
5717 op1->type->refCount++;
5722 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5724 char value2 = op2->__anon1.c;
5727 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
5730 exp->expType = op1->type;
5732 op1->type->refCount++;
5737 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5739 unsigned char value2 = op2->__anon1.uc;
5742 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
5745 exp->expType = op1->type;
5747 op1->type->refCount++;
5752 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
5755 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
5758 exp->expType = op1->type;
5760 op1->type->refCount++;
5765 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
5768 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
5771 exp->expType = op1->type;
5773 op1->type->refCount++;
5778 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
5781 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
5784 exp->expType = op1->type;
5786 op1->type->refCount++;
5791 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
5794 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
5797 exp->expType = op1->type;
5799 op1->type->refCount++;
5804 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
5807 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
5810 exp->expType = op1->type;
5812 op1->type->refCount++;
5817 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
5820 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
5823 exp->expType = op1->type;
5825 op1->type->refCount++;
5830 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
5833 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
5836 exp->expType = op1->type;
5838 op1->type->refCount++;
5843 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
5846 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
5849 exp->expType = op1->type;
5851 op1->type->refCount++;
5856 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5858 int value2 = op2->__anon1.i;
5861 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
5864 exp->expType = op1->type;
5866 op1->type->refCount++;
5871 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5873 unsigned int value2 = op2->__anon1.ui;
5876 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
5879 exp->expType = op1->type;
5881 op1->type->refCount++;
5886 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5888 long long value2 = op2->__anon1.i64;
5891 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
5894 exp->expType = op1->type;
5896 op1->type->refCount++;
5901 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5903 uint64 value2 = op2->__anon1.ui64;
5906 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
5909 exp->expType = op1->type;
5911 op1->type->refCount++;
5916 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5918 short value2 = op2->__anon1.s;
5921 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
5924 exp->expType = op1->type;
5926 op1->type->refCount++;
5931 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5933 unsigned short value2 = op2->__anon1.us;
5936 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
5939 exp->expType = op1->type;
5941 op1->type->refCount++;
5946 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5948 char value2 = op2->__anon1.c;
5951 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
5954 exp->expType = op1->type;
5956 op1->type->refCount++;
5961 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5963 unsigned char value2 = op2->__anon1.uc;
5966 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
5969 exp->expType = op1->type;
5971 op1->type->refCount++;
5976 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5978 float value2 = op2->__anon1.f;
5981 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
5984 exp->expType = op1->type;
5986 op1->type->refCount++;
5991 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5993 double value2 = op2->__anon1.d;
5996 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
5999 exp->expType = op1->type;
6001 op1->type->refCount++;
6006 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6008 int value2 = op2->__anon1.i;
6011 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
6014 exp->expType = op1->type;
6016 op1->type->refCount++;
6021 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6023 unsigned int value2 = op2->__anon1.ui;
6026 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
6029 exp->expType = op1->type;
6031 op1->type->refCount++;
6036 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6038 long long value2 = op2->__anon1.i64;
6041 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
6044 exp->expType = op1->type;
6046 op1->type->refCount++;
6051 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6053 uint64 value2 = op2->__anon1.ui64;
6056 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
6059 exp->expType = op1->type;
6061 op1->type->refCount++;
6066 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6068 short value2 = op2->__anon1.s;
6071 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
6074 exp->expType = op1->type;
6076 op1->type->refCount++;
6081 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6083 unsigned short value2 = op2->__anon1.us;
6086 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
6089 exp->expType = op1->type;
6091 op1->type->refCount++;
6096 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6098 char value2 = op2->__anon1.c;
6101 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
6104 exp->expType = op1->type;
6106 op1->type->refCount++;
6111 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6113 unsigned char value2 = op2->__anon1.uc;
6116 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
6119 exp->expType = op1->type;
6121 op1->type->refCount++;
6126 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6128 float value2 = op2->__anon1.f;
6131 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
6134 exp->expType = op1->type;
6136 op1->type->refCount++;
6141 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6143 double value2 = op2->__anon1.d;
6146 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
6149 exp->expType = op1->type;
6151 op1->type->refCount++;
6156 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6158 int value2 = op2->__anon1.i;
6161 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
6164 exp->expType = op1->type;
6166 op1->type->refCount++;
6171 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6173 unsigned int value2 = op2->__anon1.ui;
6176 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
6179 exp->expType = op1->type;
6181 op1->type->refCount++;
6186 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6188 long long value2 = op2->__anon1.i64;
6191 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
6194 exp->expType = op1->type;
6196 op1->type->refCount++;
6201 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6203 uint64 value2 = op2->__anon1.ui64;
6206 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
6209 exp->expType = op1->type;
6211 op1->type->refCount++;
6216 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6218 short value2 = op2->__anon1.s;
6221 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
6224 exp->expType = op1->type;
6226 op1->type->refCount++;
6231 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6233 unsigned short value2 = op2->__anon1.us;
6236 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
6239 exp->expType = op1->type;
6241 op1->type->refCount++;
6246 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6248 char value2 = op2->__anon1.c;
6251 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
6254 exp->expType = op1->type;
6256 op1->type->refCount++;
6261 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6263 unsigned char value2 = op2->__anon1.uc;
6266 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
6269 exp->expType = op1->type;
6271 op1->type->refCount++;
6276 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6278 float value2 = op2->__anon1.f;
6281 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
6284 exp->expType = op1->type;
6286 op1->type->refCount++;
6291 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6293 double value2 = op2->__anon1.d;
6296 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
6299 exp->expType = op1->type;
6301 op1->type->refCount++;
6306 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6308 int value2 = op2->__anon1.i;
6311 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
6314 exp->expType = op1->type;
6316 op1->type->refCount++;
6321 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6323 unsigned int value2 = op2->__anon1.ui;
6326 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
6329 exp->expType = op1->type;
6331 op1->type->refCount++;
6336 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6338 long long value2 = op2->__anon1.i64;
6341 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
6344 exp->expType = op1->type;
6346 op1->type->refCount++;
6351 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6353 uint64 value2 = op2->__anon1.ui64;
6356 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
6359 exp->expType = op1->type;
6361 op1->type->refCount++;
6366 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6368 short value2 = op2->__anon1.s;
6371 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
6374 exp->expType = op1->type;
6376 op1->type->refCount++;
6381 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6383 unsigned short value2 = op2->__anon1.us;
6386 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
6389 exp->expType = op1->type;
6391 op1->type->refCount++;
6396 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6398 char value2 = op2->__anon1.c;
6401 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
6404 exp->expType = op1->type;
6406 op1->type->refCount++;
6411 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6413 unsigned char value2 = op2->__anon1.uc;
6416 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
6419 exp->expType = op1->type;
6421 op1->type->refCount++;
6426 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6428 float value2 = op2->__anon1.f;
6431 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
6434 exp->expType = op1->type;
6436 op1->type->refCount++;
6441 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6443 double value2 = op2->__anon1.d;
6446 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
6449 exp->expType = op1->type;
6451 op1->type->refCount++;
6456 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6458 int value2 = op2->__anon1.i;
6461 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
6464 exp->expType = op1->type;
6466 op1->type->refCount++;
6471 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6473 unsigned int value2 = op2->__anon1.ui;
6476 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
6479 exp->expType = op1->type;
6481 op1->type->refCount++;
6486 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6488 long long value2 = op2->__anon1.i64;
6491 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
6494 exp->expType = op1->type;
6496 op1->type->refCount++;
6501 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6503 uint64 value2 = op2->__anon1.ui64;
6506 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
6509 exp->expType = op1->type;
6511 op1->type->refCount++;
6516 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6518 short value2 = op2->__anon1.s;
6521 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
6524 exp->expType = op1->type;
6526 op1->type->refCount++;
6531 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6533 unsigned short value2 = op2->__anon1.us;
6536 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
6539 exp->expType = op1->type;
6541 op1->type->refCount++;
6546 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6548 char value2 = op2->__anon1.c;
6551 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
6554 exp->expType = op1->type;
6556 op1->type->refCount++;
6561 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6563 unsigned char value2 = op2->__anon1.uc;
6566 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
6569 exp->expType = op1->type;
6571 op1->type->refCount++;
6576 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6578 float value2 = op2->__anon1.f;
6581 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
6584 exp->expType = op1->type;
6586 op1->type->refCount++;
6591 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6593 double value2 = op2->__anon1.d;
6596 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
6599 exp->expType = op1->type;
6601 op1->type->refCount++;
6606 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6608 int value2 = op2->__anon1.i;
6611 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
6614 exp->expType = op1->type;
6616 op1->type->refCount++;
6621 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6623 unsigned int value2 = op2->__anon1.ui;
6626 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
6629 exp->expType = op1->type;
6631 op1->type->refCount++;
6636 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6638 long long value2 = op2->__anon1.i64;
6641 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
6644 exp->expType = op1->type;
6646 op1->type->refCount++;
6651 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6653 uint64 value2 = op2->__anon1.ui64;
6656 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
6659 exp->expType = op1->type;
6661 op1->type->refCount++;
6666 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6668 short value2 = op2->__anon1.s;
6671 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
6674 exp->expType = op1->type;
6676 op1->type->refCount++;
6681 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6683 unsigned short value2 = op2->__anon1.us;
6686 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
6689 exp->expType = op1->type;
6691 op1->type->refCount++;
6696 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6698 char value2 = op2->__anon1.c;
6701 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
6704 exp->expType = op1->type;
6706 op1->type->refCount++;
6711 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6713 unsigned char value2 = op2->__anon1.uc;
6716 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
6719 exp->expType = op1->type;
6721 op1->type->refCount++;
6726 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6728 float value2 = op2->__anon1.f;
6731 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
6734 exp->expType = op1->type;
6736 op1->type->refCount++;
6741 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6743 double value2 = op2->__anon1.d;
6746 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
6749 exp->expType = op1->type;
6751 op1->type->refCount++;
6756 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6758 int value2 = op2->__anon1.i;
6761 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
6764 exp->expType = op1->type;
6766 op1->type->refCount++;
6771 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6773 unsigned int value2 = op2->__anon1.ui;
6776 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
6779 exp->expType = op1->type;
6781 op1->type->refCount++;
6786 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6788 long long value2 = op2->__anon1.i64;
6791 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
6794 exp->expType = op1->type;
6796 op1->type->refCount++;
6801 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6803 uint64 value2 = op2->__anon1.ui64;
6806 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
6809 exp->expType = op1->type;
6811 op1->type->refCount++;
6816 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6818 short value2 = op2->__anon1.s;
6821 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
6824 exp->expType = op1->type;
6826 op1->type->refCount++;
6831 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6833 unsigned short value2 = op2->__anon1.us;
6836 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
6839 exp->expType = op1->type;
6841 op1->type->refCount++;
6846 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6848 char value2 = op2->__anon1.c;
6851 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
6854 exp->expType = op1->type;
6856 op1->type->refCount++;
6861 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6863 unsigned char value2 = op2->__anon1.uc;
6866 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
6869 exp->expType = op1->type;
6871 op1->type->refCount++;
6876 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6878 float value2 = op2->__anon1.f;
6881 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
6884 exp->expType = op1->type;
6886 op1->type->refCount++;
6891 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6893 double value2 = op2->__anon1.d;
6896 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
6899 exp->expType = op1->type;
6901 op1->type->refCount++;
6906 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6908 int value2 = op2->__anon1.i;
6911 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
6914 exp->expType = op1->type;
6916 op1->type->refCount++;
6921 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6923 unsigned int value2 = op2->__anon1.ui;
6926 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
6929 exp->expType = op1->type;
6931 op1->type->refCount++;
6936 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6938 long long value2 = op2->__anon1.i64;
6941 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
6944 exp->expType = op1->type;
6946 op1->type->refCount++;
6951 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6953 uint64 value2 = op2->__anon1.ui64;
6956 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
6959 exp->expType = op1->type;
6961 op1->type->refCount++;
6966 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6968 short value2 = op2->__anon1.s;
6971 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
6974 exp->expType = op1->type;
6976 op1->type->refCount++;
6981 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6983 unsigned short value2 = op2->__anon1.us;
6986 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
6989 exp->expType = op1->type;
6991 op1->type->refCount++;
6996 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6998 char value2 = op2->__anon1.c;
7001 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
7004 exp->expType = op1->type;
7006 op1->type->refCount++;
7011 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7013 unsigned char value2 = op2->__anon1.uc;
7016 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
7019 exp->expType = op1->type;
7021 op1->type->refCount++;
7026 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7028 float value2 = op2->__anon1.f;
7031 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
7034 exp->expType = op1->type;
7036 op1->type->refCount++;
7041 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7043 double value2 = op2->__anon1.d;
7046 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
7049 exp->expType = op1->type;
7051 op1->type->refCount++;
7056 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7059 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
7062 exp->expType = op1->type;
7064 op1->type->refCount++;
7069 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7072 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
7075 exp->expType = op1->type;
7077 op1->type->refCount++;
7082 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7085 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
7088 exp->expType = op1->type;
7090 op1->type->refCount++;
7095 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7098 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
7101 exp->expType = op1->type;
7103 op1->type->refCount++;
7108 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7111 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
7114 exp->expType = op1->type;
7116 op1->type->refCount++;
7121 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7124 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
7127 exp->expType = op1->type;
7129 op1->type->refCount++;
7134 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7137 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
7140 exp->expType = op1->type;
7142 op1->type->refCount++;
7147 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7150 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
7153 exp->expType = op1->type;
7155 op1->type->refCount++;
7160 static void PrintName(struct Type * type, char * string, unsigned int fullName)
7162 if(type->name && type->name[0])
7165 strcat(string, type->name);
7168 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
7174 strcat(string, name);
7179 static void PrintAttribs(struct Type * type, char * string)
7184 strcat(string, "dllexport ");
7185 if(type->attrStdcall)
7186 strcat(string, "stdcall ");
7190 static struct Type * FindMember(struct Type * type, char * string)
7192 struct Type * memberType;
7194 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7196 if(!memberType->name)
7198 struct Type * subType = FindMember(memberType, string);
7203 else if(!strcmp(memberType->name, string))
7206 return (((void *)0));
7209 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
7211 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
7213 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
7215 unsigned int result = 0;
7220 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
7221 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
7225 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
7226 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7229 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)
7230 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7233 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)
7234 result = GetOpFloat(op, &op->__anon1.f);
7237 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)
7238 result = GetOpDouble(op, &op->__anon1.d);
7241 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)
7242 result = GetOpUInt64(op, &op->__anon1.ui64);
7245 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)
7246 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7249 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7250 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7253 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7254 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7260 struct OpTable floatOps =
7262 (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)
7265 struct OpTable doubleOps =
7267 (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)
7270 struct OpTable intOps =
7272 (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)
7275 struct OpTable uintOps =
7277 (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)
7280 struct OpTable int64Ops =
7282 (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)
7285 struct OpTable uint64Ops =
7287 (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)
7290 struct OpTable shortOps =
7292 (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)
7295 struct OpTable ushortOps =
7297 (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)
7300 struct OpTable charOps =
7302 (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)
7305 struct OpTable ucharOps =
7307 (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)
7310 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
7312 struct Type * memberType;
7314 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7316 if(!memberType->name)
7318 struct Type * subType = FindMember(memberType, string);
7322 *offset += memberType->offset;
7326 else if(!strcmp(memberType->name, string))
7328 *offset += memberType->offset;
7332 return (((void *)0));
7335 struct __ecereNameSpace__ecere__com__Module;
7337 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);
7339 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
7341 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);
7343 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);
7345 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
7347 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7352 struct __ecereNameSpace__ecere__sys__BTNode * parent;
7353 struct __ecereNameSpace__ecere__sys__BTNode * left;
7354 struct __ecereNameSpace__ecere__sys__BTNode * right;
7356 struct __ecereNameSpace__ecere__com__Instance * module;
7357 char * dataTypeString;
7358 struct Type * dataType;
7363 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);
7365 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
7367 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);
7369 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
7371 struct __ecereNameSpace__ecere__com__DefinedExpression;
7373 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7375 struct __ecereNameSpace__ecere__com__DefinedExpression
7377 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
7378 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
7381 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7384 struct __ecereNameSpace__ecere__sys__BinaryTree;
7386 struct __ecereNameSpace__ecere__sys__BinaryTree
7388 struct __ecereNameSpace__ecere__sys__BTNode * root;
7390 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
7391 void (* FreeKey)(void * key);
7394 struct __ecereNameSpace__ecere__com__Class
7396 struct __ecereNameSpace__ecere__com__Class * prev;
7397 struct __ecereNameSpace__ecere__com__Class * next;
7403 unsigned int (* Constructor)(void * );
7404 void (* Destructor)(void * );
7407 struct __ecereNameSpace__ecere__com__Class * base;
7408 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
7409 struct __ecereNameSpace__ecere__sys__BinaryTree members;
7410 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
7411 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
7412 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
7413 struct __ecereNameSpace__ecere__sys__OldList derivatives;
7417 struct __ecereNameSpace__ecere__com__Instance * module;
7418 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7419 const char * dataTypeString;
7420 struct Type * dataType;
7422 int defaultAlignment;
7423 void (* Initialize)();
7425 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
7426 const char * designerClass;
7427 unsigned int noExpansion;
7428 const char * defaultProperty;
7429 unsigned int comRedefinition;
7432 unsigned int internalDecl;
7434 unsigned int computeSize;
7435 short structAlignment;
7436 short pointerAlignment;
7437 int destructionWatchOffset;
7439 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
7440 int inheritanceAccess;
7441 const char * fullName;
7443 struct __ecereNameSpace__ecere__sys__OldList conversions;
7444 struct __ecereNameSpace__ecere__sys__OldList templateParams;
7445 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
7446 struct __ecereNameSpace__ecere__com__Class * templateClass;
7447 struct __ecereNameSpace__ecere__sys__OldList templatized;
7449 unsigned int isInstanceClass;
7450 unsigned int byValueSystemClass;
7453 struct __ecereNameSpace__ecere__com__NameSpace
7456 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
7457 struct __ecereNameSpace__ecere__com__NameSpace * left;
7458 struct __ecereNameSpace__ecere__com__NameSpace * right;
7460 struct __ecereNameSpace__ecere__com__NameSpace * parent;
7461 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
7462 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
7463 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
7464 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
7467 struct __ecereNameSpace__ecere__com__DataMember
7469 struct __ecereNameSpace__ecere__com__DataMember * prev;
7470 struct __ecereNameSpace__ecere__com__DataMember * next;
7472 unsigned int isProperty;
7475 struct __ecereNameSpace__ecere__com__Class * _class;
7476 const char * dataTypeString;
7477 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
7478 struct Type * dataType;
7482 struct __ecereNameSpace__ecere__sys__OldList members;
7483 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
7485 short structAlignment;
7486 short pointerAlignment;
7489 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7491 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7493 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
7495 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7497 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7499 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
7501 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl)
7505 if(type->kind == 11)
7507 struct Type * param;
7509 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
7510 _DeclareType(neededFor, param, forFunctionDef, 0, fwdDecl);
7511 _DeclareType(neededFor, type->__anon1.__anon2.returnType, forFunctionDef, 0, fwdDecl);
7513 else if(type->kind == 13)
7514 _DeclareType(neededFor, type->__anon1.type, 0, 0, fwdDecl);
7515 else if(type->kind == 8)
7517 struct __ecereNameSpace__ecere__com__Class * c = type->__anon1._class->__anon1.registered;
7519 _DeclareStruct(neededFor, c ? c->fullName : "ecere::com::Instance", c ? c->type == 5 : 0, needDereference && c && c->type == 1, fwdDecl);
7521 else if(type->kind == 9 || type->kind == 10)
7523 struct Type * member;
7525 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7526 _DeclareType(neededFor, member, needDereference, forFunctionDef, fwdDecl);
7528 else if(type->kind == 12)
7529 _DeclareType(neededFor, type->__anon1.__anon4.arrayType, 1, 0, fwdDecl);
7533 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
7535 unsigned int status = 1;
7537 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))
7539 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
7540 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
7542 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
7544 struct Type * sourceType = source, * destType = dest;
7546 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
7547 sourceType = sourceType->__anon1.type;
7548 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
7549 destType = destType->__anon1.type;
7550 if(!destType->constant && sourceType->constant)
7554 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
7561 struct Operand GetOperand(struct Expression * exp)
7570 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
7573 struct Type * type = exp->expType;
7577 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))
7579 if(!type->__anon1._class->__anon1.registered->dataType)
7580 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7581 type = type->__anon1._class->__anon1.registered->dataType;
7583 if(exp->type == 3 && op.kind == 13)
7585 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
7589 else if(exp->isConstant && exp->type == 2)
7591 op.kind = type->kind;
7598 if(exp->__anon1.__anon1.constant[0] == '\'')
7600 op.__anon1.c = exp->__anon1.__anon1.constant[1];
7603 else if(type->isSigned)
7605 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7610 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7616 if(exp->__anon1.__anon1.constant[0] == '\'')
7618 op.__anon1.s = exp->__anon1.__anon1.constant[1];
7621 else if(type->isSigned)
7623 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7628 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7634 if(exp->__anon1.__anon1.constant[0] == '\'')
7636 op.__anon1.i = exp->__anon1.__anon1.constant[1];
7639 else if(type->isSigned)
7641 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7646 op.__anon1.ui = (unsigned int)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7654 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7659 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7667 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7672 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7680 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7685 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7691 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7692 op.__anon1.f = __ecereMethod_float_inf();
7693 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7694 op.__anon1.f = -__ecereMethod_float_inf();
7695 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7696 op.__anon1.f = __ecereMethod_float_nan();
7697 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7698 op.__anon1.f = -__ecereMethod_float_nan();
7700 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7704 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7705 op.__anon1.d = __ecereMethod_double_inf();
7706 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7707 op.__anon1.d = -__ecereMethod_double_inf();
7708 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7709 op.__anon1.d = __ecereMethod_double_nan();
7710 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7711 op.__anon1.d = -__ecereMethod_double_nan();
7713 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7719 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7729 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
7733 switch(_class->typeSize)
7736 if(!strcmp(_class->dataTypeString, "uint64"))
7737 v = (long long)*(uint64 *)ptr;
7739 v = *(long long *)ptr;
7742 if(!strcmp(_class->dataTypeString, "uint"))
7743 v = (long long)*(unsigned int *)ptr;
7745 v = (long long)*(int *)ptr;
7748 if(!strcmp(_class->dataTypeString, "uint16"))
7749 v = (long long)*(unsigned short *)ptr;
7751 v = (long long)*(short *)ptr;
7754 if(!strcmp(_class->dataTypeString, "byte"))
7755 v = (long long)*(unsigned char *)ptr;
7757 v = (long long)*(char *)ptr;
7763 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
7765 if(!type->isSigned && type->kind != 22 && type->kind != 23)
7766 ListAdd(specs, MkSpecifier(UNSIGNED));
7771 if(type->__anon1._class->__anon1.registered)
7773 if(!type->__anon1._class->__anon1.registered->dataType)
7774 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7775 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
7780 ListAdd(specs, MkSpecifier(DOUBLE));
7783 ListAdd(specs, MkSpecifier(FLOAT));
7786 ListAdd(specs, MkSpecifier(CHAR));
7789 ListAdd(specs, MkSpecifier(_BOOL));
7792 ListAdd(specs, MkSpecifier(SHORT));
7795 ListAdd(specs, MkSpecifier(INT64));
7798 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
7801 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
7805 ListAdd(specs, MkSpecifier(INT));
7810 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
7814 if(printConst && type->constant)
7815 strcat(string, "const ");
7820 struct Symbol * c = type->__anon1._class;
7821 unsigned int isObjectBaseClass = !c || !c->string || !strcmp(c->string, "class");
7823 if(type->classObjectType == 2 && isObjectBaseClass)
7824 strcat(string, "typed_object");
7825 else if(type->classObjectType == 3 && isObjectBaseClass)
7826 strcat(string, "any_object");
7830 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
7832 if(type->byReference)
7833 strcat(string, " &");
7837 strcat(string, "void");
7840 strcat(string, type->isSigned ? "int" : "uint");
7843 strcat(string, type->isSigned ? "int64" : "uint64");
7846 strcat(string, type->isSigned ? "intptr" : "uintptr");
7849 strcat(string, type->isSigned ? "intsize" : "uintsize");
7852 strcat(string, type->isSigned ? "char" : "byte");
7855 strcat(string, "_Bool");
7858 strcat(string, type->isSigned ? "short" : "uint16");
7861 strcat(string, "float");
7864 strcat(string, "double");
7867 if(type->__anon1.__anon1.enumName)
7869 strcat(string, "struct ");
7870 strcat(string, type->__anon1.__anon1.enumName);
7872 else if(type->typeName)
7873 strcat(string, type->typeName);
7876 struct Type * member;
7878 strcat(string, "struct { ");
7879 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7881 PrintType(member, string, 1, fullName);
7882 strcat(string, "; ");
7884 strcat(string, "}");
7888 if(type->__anon1.__anon1.enumName)
7890 strcat(string, "union ");
7891 strcat(string, type->__anon1.__anon1.enumName);
7893 else if(type->typeName)
7894 strcat(string, type->typeName);
7897 strcat(string, "union ");
7898 strcat(string, "(unnamed)");
7902 if(type->__anon1.__anon1.enumName)
7904 strcat(string, "enum ");
7905 strcat(string, type->__anon1.__anon1.enumName);
7907 else if(type->typeName)
7908 strcat(string, type->typeName);
7910 strcat(string, "int");
7913 strcat(string, "...");
7916 strcat(string, "subclass(");
7917 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
7918 strcat(string, ")");
7921 strcat(string, type->__anon1.templateParameter->identifier->string);
7924 strcat(string, "thisclass");
7927 strcat(string, "__builtin_va_list");
7933 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
7935 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
7937 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
7939 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
7941 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
7943 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
7945 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
7947 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
7949 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
7951 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
7953 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
7955 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
7957 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
7959 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
7961 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
7963 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
7965 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
7967 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
7969 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
7971 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
7973 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
7975 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
7977 struct __ecereNameSpace__ecere__com__Application
7980 const char * * argv;
7982 unsigned int isGUIApp;
7983 struct __ecereNameSpace__ecere__sys__OldList allModules;
7984 char * parsedCommand;
7985 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
7988 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)
7992 *curMember = (*curMember)->next;
7993 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
7995 *curMember = subMemberStack[--(*subMemberStackPos)];
7996 *curMember = (*curMember)->next;
7998 while((*curMember) && (*curMember)->isProperty)
7999 *curMember = (*curMember)->next;
8000 if(subMemberStackPos)
8002 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8004 subMemberStack[(*subMemberStackPos)++] = *curMember;
8005 *curMember = (*curMember)->members.first;
8006 while(*curMember && (*curMember)->isProperty)
8007 *curMember = (*curMember)->next;
8015 if(subMemberStackPos && *subMemberStackPos)
8017 *curMember = subMemberStack[--(*subMemberStackPos)];
8018 *curMember = (*curMember)->next;
8022 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
8024 if(*curClass == _class)
8026 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
8028 *curMember = (*curClass)->membersAndProperties.first;
8030 while((*curMember) && (*curMember)->isProperty)
8031 *curMember = (*curMember)->next;
8032 if(subMemberStackPos)
8034 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8036 subMemberStack[(*subMemberStackPos)++] = *curMember;
8037 *curMember = (*curMember)->members.first;
8038 while(*curMember && (*curMember)->isProperty)
8039 *curMember = (*curMember)->next;
8046 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
8048 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
8049 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
8050 struct __ecereNameSpace__ecere__com__NameSpace * child;
8054 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)))
8056 data = ScanGlobalData(child, name);
8064 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
8066 int nsLen = strlen(nameSpace);
8067 struct Symbol * symbol;
8069 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)))
8071 char * s = symbol->string;
8073 if(!strncmp(s, nameSpace, nsLen))
8078 for(c = strlen(s) - 1; c >= 0; c--)
8081 namePart = s + c + 1;
8082 if(!strcmp(namePart, name))
8090 return (((void *)0));
8093 unsigned int GetInt(struct Expression * exp, int * value2)
8095 struct Operand op2 = GetOperand(exp);
8097 return GetOpInt(&op2, value2);
8100 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
8102 struct Operand op2 = GetOperand(exp);
8104 return GetOpUInt(&op2, value2);
8107 unsigned int GetInt64(struct Expression * exp, long long * value2)
8109 struct Operand op2 = GetOperand(exp);
8111 return GetOpInt64(&op2, value2);
8114 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
8116 struct Operand op2 = GetOperand(exp);
8118 return GetOpUInt64(&op2, value2);
8121 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
8123 struct Operand op2 = GetOperand(exp);
8125 return GetOpIntPtr(&op2, value2);
8128 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
8130 struct Operand op2 = GetOperand(exp);
8132 return GetOpUIntPtr(&op2, value2);
8135 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
8137 struct Operand op2 = GetOperand(exp);
8139 return GetOpIntSize(&op2, value2);
8142 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
8144 struct Operand op2 = GetOperand(exp);
8146 return GetOpUIntSize(&op2, value2);
8149 unsigned int GetShort(struct Expression * exp, short * value2)
8151 struct Operand op2 = GetOperand(exp);
8153 return GetOpShort(&op2, value2);
8156 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
8158 struct Operand op2 = GetOperand(exp);
8160 return GetOpUShort(&op2, value2);
8163 unsigned int GetChar(struct Expression * exp, char * value2)
8165 struct Operand op2 = GetOperand(exp);
8167 return GetOpChar(&op2, value2);
8170 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
8172 struct Operand op2 = GetOperand(exp);
8174 return GetOpUChar(&op2, value2);
8177 unsigned int GetFloat(struct Expression * exp, float * value2)
8179 struct Operand op2 = GetOperand(exp);
8181 return GetOpFloat(&op2, value2);
8184 unsigned int GetDouble(struct Expression * exp, double * value2)
8186 struct Operand op2 = GetOperand(exp);
8188 return GetOpDouble(&op2, value2);
8191 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
8193 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8195 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
8196 PrintAttribs(type, string);
8197 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
8198 strcat(string, " const");
8199 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
8200 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8201 strcat(string, " (");
8202 if(type->kind == 13)
8204 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
8205 PrintAttribs(type->__anon1.type, string);
8207 if(type->kind == 13)
8209 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
8210 strcat(string, "*");
8212 strcat(string, " *");
8214 if(printConst && type->constant && type->kind == 13)
8215 strcat(string, " const");
8218 PrintTypeSpecs(type, string, fullName, printConst);
8221 void PrintExpression(struct Expression * exp, char * string)
8224 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8226 unsigned int backOutputLineNumbers = outputLineNumbers;
8228 outputLineNumbers = 0;
8230 OutputExpression(exp, f);
8231 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8232 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8234 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8235 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
8236 count = strlen(string);
8237 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
8238 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8240 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8241 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
8242 string[count] = '\0';
8243 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
8244 outputLineNumbers = backOutputLineNumbers;
8248 struct Type * Dereference(struct Type * source)
8250 struct Type * type = (((void *)0));
8254 if(source->kind == 13 || source->kind == 12)
8256 type = source->__anon1.type;
8257 source->__anon1.type->refCount++;
8259 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
8261 type = __extension__ ({
8262 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8264 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
8267 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
8273 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
8278 static struct Type * Reference(struct Type * source)
8280 struct Type * type = (((void *)0));
8284 type = __extension__ ({
8285 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8287 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
8294 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
8296 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
8298 FreeExpContents(checkedExp);
8299 FreeType(checkedExp->expType);
8300 FreeType(checkedExp->destType);
8301 *checkedExp = *newExp;
8302 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
8303 checkedExp->prev = prev;
8304 checkedExp->next = next;
8307 void FinishTemplatesContext(struct Context * context)
8309 PopContext(context);
8310 FreeContext(context);
8311 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
8314 static __attribute__((unused)) void UnusedFunction()
8318 ((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);
8321 struct Expression * ParseExpressionString(char * expression)
8324 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8325 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
8326 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8328 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8329 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
8330 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8331 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8333 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8334 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
8336 parsedExpression = (((void *)0));
8338 expression_yyparse();
8339 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
8340 return parsedExpression;
8343 struct __ecereNameSpace__ecere__com__Module
8345 struct __ecereNameSpace__ecere__com__Instance * application;
8346 struct __ecereNameSpace__ecere__sys__OldList classes;
8347 struct __ecereNameSpace__ecere__sys__OldList defines;
8348 struct __ecereNameSpace__ecere__sys__OldList functions;
8349 struct __ecereNameSpace__ecere__sys__OldList modules;
8350 struct __ecereNameSpace__ecere__com__Instance * prev;
8351 struct __ecereNameSpace__ecere__com__Instance * next;
8357 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
8358 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
8361 static struct GlobalData * FindGlobalData(char * name)
8364 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
8366 nameSpace = globalData;
8367 for(c = 0; name[c]; c++)
8369 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
8371 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
8372 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
8374 strncpy(spaceName, name + start, c - start);
8375 spaceName[c - start] = '\0';
8376 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
8377 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
8379 return (((void *)0));
8380 nameSpace = newSpace;
8388 return ScanGlobalData(nameSpace, name + start);
8390 return (((void *)0));
8393 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
8396 char nameSpace[1024];
8397 const char * namePart;
8398 unsigned int gotColon = 0;
8400 nameSpace[0] = '\0';
8401 for(c = strlen(name) - 1; c >= 0; c--)
8407 namePart = name + c + 1;
8408 while(c >= 0 && name[c] == ':')
8412 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
8416 memcpy(nameSpace, name, c + 1);
8417 nameSpace[c + 1] = 0;
8418 return ScanWithNameSpace(tree, nameSpace, namePart);
8422 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8428 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8432 return ScanWithNameSpace(tree, "", namePart);
8434 return (((void *)0));
8437 static void PrintArraySize(struct Type * arrayType, char * string)
8443 if(arrayType->__anon1.__anon4.enumClass)
8444 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
8445 else if(arrayType->__anon1.__anon4.arraySizeExp)
8446 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
8448 strcat(string, size);
8451 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
8456 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
8458 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8459 strcat(string, ")");
8460 if(type->kind == 12)
8461 PrintArraySize(type, string);
8462 else if(type->kind == 11)
8464 struct Type * param;
8466 strcat(string, "(");
8467 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
8469 PrintType(param, string, 1, fullName);
8471 strcat(string, ", ");
8473 strcat(string, ")");
8475 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8476 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
8479 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
8481 PrePrintType(type, string, fullName, (((void *)0)), printConst);
8482 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
8483 strcat(string, " ");
8484 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
8486 struct Symbol * _class = type->__anon1.__anon2.thisClass;
8488 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
8490 if(type->classObjectType == 1)
8491 strcat(string, "class");
8493 strcat(string, type->byReference ? "typed_object&" : "typed_object");
8495 else if(_class && _class->string)
8497 char * s = _class->string;
8503 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
8509 strcat(string, name);
8512 strcat(string, "::");
8514 if(printName && type->name)
8515 PrintName(type, string, fullName);
8516 PostPrintType(type, string, fullName);
8517 if(type->bitFieldCount)
8521 sprintf(count, ":%d", type->bitFieldCount);
8522 strcat(string, count);
8530 struct Conversion * prev, * next;
8531 struct __ecereNameSpace__ecere__com__Property * convert;
8533 struct Type * resultType;
8536 static void FreeConvert(struct Conversion * convert)
8538 if(convert->resultType)
8539 FreeType(convert->resultType);
8546 struct Enumerator * prev;
8547 struct Enumerator * next;
8548 struct Location loc;
8549 struct Identifier * id;
8550 struct Expression * exp;
8557 struct AsmField * prev;
8558 struct AsmField * next;
8559 struct Location loc;
8561 struct Expression * expression;
8562 struct Identifier * symbolic;
8565 struct ClassDefinition;
8569 struct Context * parent;
8570 struct __ecereNameSpace__ecere__sys__BinaryTree types;
8571 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
8572 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
8573 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
8576 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
8577 struct ClassDefinition * classDef;
8578 unsigned int templateTypesOnly;
8579 unsigned int hasNameSpace;
8584 struct External * prev;
8585 struct External * next;
8586 struct Location loc;
8588 struct Symbol * symbol;
8591 struct FunctionDefinition * function;
8592 struct ClassDefinition * _class;
8593 struct Declaration * declaration;
8594 char * importString;
8595 struct Identifier * id;
8596 struct DBTableDef * table;
8597 } ecere_gcc_struct __anon1;
8599 struct External * fwdDecl;
8600 struct __ecereNameSpace__ecere__com__Instance * outgoing;
8601 struct __ecereNameSpace__ecere__com__Instance * incoming;
8602 int nonBreakableIncoming;
8605 struct ClassDefinition
8607 struct ClassDefinition * prev;
8608 struct ClassDefinition * next;
8609 struct Location loc;
8610 struct Specifier * _class;
8611 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
8612 struct __ecereNameSpace__ecere__sys__OldList * definitions;
8613 struct Symbol * symbol;
8614 struct Location blockStart;
8615 struct Location nameLoc;
8617 unsigned int deleteWatchable;
8620 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
8622 void __ecereMethod_External_CreateEdge(struct External * this, struct External * from, unsigned int soft);
8624 void DeclareGlobalData(struct External * neededFor, struct GlobalData * data)
8626 struct Symbol * symbol = data->symbol;
8628 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
8633 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
8636 data->dataType = ProcessTypeString(data->dataTypeString, 0);
8639 struct Declaration * decl;
8640 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
8641 struct Declarator * d;
8642 struct External * external;
8644 specifiers = MkList();
8645 declarators = MkList();
8646 ListAdd(specifiers, MkSpecifier(EXTERN));
8647 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
8648 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
8649 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
8650 decl = MkDeclaration(specifiers, declarators);
8651 external = MkExternalDeclaration(decl);
8653 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
8654 external->symbol = symbol;
8655 symbol->__anon2.__anon1.pointerExternal = external;
8656 DeclareType(external, data->dataType, 1, 1);
8659 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
8660 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, 0);
8663 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
8665 struct Context * ctx;
8666 struct Symbol * symbol = (((void *)0));
8668 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
8670 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
8672 symbol = (((void *)0));
8677 strcpy(curName, thisNameSpace);
8678 strcat(curName, "::");
8679 strcat(curName, name);
8680 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
8683 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
8686 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
8687 if(symbol || ctx == endContext)
8690 if(inCompiler && symbol && ctx == globalContext && symbol->__anon2.__anon1.pointerExternal && curExternal && symbol->__anon2.__anon1.pointerExternal != curExternal)
8691 __ecereMethod_External_CreateUniqueEdge(curExternal, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
8699 struct ClassDef * prev;
8700 struct ClassDef * next;
8701 struct Location loc;
8705 struct Declaration * decl;
8706 struct ClassFunction * function;
8707 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
8708 struct PropertyDef * propertyDef;
8709 struct PropertyWatch * propertyWatch;
8711 struct Identifier * defaultProperty;
8714 struct Identifier * id;
8715 struct Initializer * initializer;
8716 } ecere_gcc_struct __anon1;
8717 } ecere_gcc_struct __anon1;
8724 struct PropertyDef * prev;
8725 struct PropertyDef * next;
8726 struct Location loc;
8727 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
8728 struct Declarator * declarator;
8729 struct Identifier * id;
8730 struct Statement * getStmt;
8731 struct Statement * setStmt;
8732 struct Statement * issetStmt;
8733 struct Symbol * symbol;
8734 struct Expression * category;
8737 unsigned int conversion : 1;
8738 unsigned int isWatchable : 1;
8739 unsigned int isDBProp : 1;
8740 } ecere_gcc_struct __anon1;
8743 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
8745 struct ClassDef * def;
8748 for(def = (*definitions).first; def; def = def->next)
8752 struct Declaration * decl = def->__anon1.decl;
8754 if(decl && decl->__anon1.__anon1.specifiers)
8756 struct Specifier * spec;
8757 unsigned int isStruct = 0;
8759 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
8761 if(spec->type == 3 || spec->type == 4)
8763 if(spec->__anon1.__anon2.definitions)
8764 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
8770 struct Declarator * d = (((void *)0));
8772 if(decl->__anon1.__anon1.declarators)
8774 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
8776 struct Identifier * idDecl = GetDeclId(d);
8786 sprintf(id, "__anon%d", anonID++);
8787 if(!decl->__anon1.__anon1.declarators)
8788 decl->__anon1.__anon1.declarators = MkList();
8789 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
8799 typedef union YYSTYPE
8804 struct Identifier * id;
8805 struct Expression * exp;
8806 struct Specifier * specifier;
8807 struct __ecereNameSpace__ecere__sys__OldList * list;
8808 struct Enumerator * enumerator;
8809 struct Declarator * declarator;
8810 struct Pointer * pointer;
8811 struct Initializer * initializer;
8812 struct InitDeclarator * initDeclarator;
8813 struct TypeName * typeName;
8814 struct Declaration * declaration;
8815 struct Statement * stmt;
8816 struct FunctionDefinition * function;
8817 struct External * external;
8818 struct Context * context;
8819 struct AsmField * asmField;
8820 struct Attrib * attrib;
8821 struct ExtDecl * extDecl;
8822 struct Attribute * attribute;
8823 struct Instantiation * instance;
8824 struct MembersInit * membersInit;
8825 struct MemberInit * memberInit;
8826 struct ClassFunction * classFunction;
8827 struct ClassDefinition * _class;
8828 struct ClassDef * classDef;
8829 struct PropertyDef * prop;
8831 struct Symbol * symbol;
8832 struct PropertyWatch * propertyWatch;
8833 struct TemplateParameter * templateParameter;
8834 struct TemplateArgument * templateArgument;
8835 struct TemplateDatatype * templateDatatype;
8836 struct DBTableEntry * dbtableEntry;
8837 struct DBIndexItem * dbindexItem;
8838 struct DBTableDef * dbtableDef;
8839 } ecere_gcc_struct YYSTYPE;
8841 extern YYSTYPE yylval;
8845 struct MemberInit * prev;
8846 struct MemberInit * next;
8847 struct Location loc;
8848 struct Location realLoc;
8849 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
8850 struct Initializer * initializer;
8852 unsigned int variable;
8853 unsigned int takeOutExp;
8856 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
8858 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
8860 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
8862 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
8863 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
8868 const char * dataTypeString;
8870 } ecere_gcc_struct __anon1;
8871 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
8875 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
8877 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
8879 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
8880 struct __ecereNameSpace__ecere__com__Class * sClass;
8882 for(sClass = _class; sClass; sClass = sClass->base)
8885 if(sClass->templateClass)
8886 sClass = sClass->templateClass;
8887 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
8889 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
8891 for(sClass = sClass->base; sClass; sClass = sClass->base)
8893 if(sClass->templateClass)
8894 sClass = sClass->templateClass;
8895 id += sClass->templateParams.count;
8906 arg = &_class->templateArgs[id];
8907 if(arg && param->type == 0)
8908 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
8913 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
8915 struct Context * context = PushContext();
8917 context->templateTypesOnly = 1;
8918 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
8920 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
8922 for(; param; param = param->next)
8924 if(param->type == 0 && param->identifier)
8926 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
8928 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8934 struct __ecereNameSpace__ecere__com__Class * sClass;
8936 for(sClass = _class; sClass; sClass = sClass->base)
8938 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
8940 for(p = sClass->templateParams.first; p; p = p->next)
8944 struct TemplateParameter * param = p->param;
8945 struct TemplatedType * type;
8949 p->param = param = __extension__ ({
8950 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
8952 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
8955 type = __extension__ ({
8956 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
8958 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
8960 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8968 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
8970 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8972 unsigned int first = 1;
8974 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8976 char className[1024];
8978 strcpy(className, _class->fullName);
8979 for(param = _class->templateParams.first; param; param = param->next)
8983 strcat(className, "<");
8985 strcat(className, ", ");
8986 if(lastParam + 1 != p)
8988 strcat(className, param->name);
8989 strcat(className, " = ");
8991 strcat(className, param->name);
8999 int len = strlen(className);
9001 if(className[len - 1] == '>')
9002 className[len++] = ' ';
9003 className[len++] = '>';
9004 className[len++] = '\0';
9006 return __ecereNameSpace__ecere__sys__CopyString(className);
9009 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
9012 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
9016 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
9018 unsigned int first = 1;
9020 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9022 char className[1024];
9024 strcpy(className, _class->fullName);
9025 for(param = _class->templateParams.first; param; param = param->next)
9029 strcat(className, "<");
9031 strcat(className, ", ");
9032 if(lastParam + 1 != p)
9034 strcat(className, param->name);
9035 strcat(className, " = ");
9037 strcat(className, param->name);
9045 int len = strlen(className);
9047 if(className[len - 1] == '>')
9048 className[len++] = ' ';
9049 className[len++] = '>';
9050 className[len++] = '\0';
9052 type = MkClassType(className);
9056 type = MkClassType(_class->fullName);
9061 static int DeclareMembers(struct External * neededBy, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9063 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9064 struct __ecereNameSpace__ecere__com__DataMember * member;
9065 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9067 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
9068 DeclareMembers(neededBy, _class->base, 0);
9069 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
9071 if(!member->isProperty)
9073 switch(member->type)
9077 if(!member->dataType && member->dataTypeString)
9078 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9079 if(member->dataType)
9080 DeclareType(neededBy, member->dataType, 1, 0);
9086 DeclareMembers(neededBy, (struct __ecereNameSpace__ecere__com__Class *)member, 1);
9093 FinishTemplatesContext(context);
9094 return topMember ? topMember->memberID : _class->memberID;
9097 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
9099 if(!method->dataType)
9101 struct Context * context = SetupTemplatesContext(method->_class);
9103 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9104 FinishTemplatesContext(context);
9105 if(method->type != 1 && method->dataType)
9107 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
9109 if(!method->_class->symbol)
9110 method->_class->symbol = FindClass(method->_class->fullName);
9111 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
9117 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
9121 struct Context * context = SetupTemplatesContext(prop->_class);
9123 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
9124 FinishTemplatesContext(context);
9128 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
9130 if(specs != (((void *)0)) && _class)
9132 struct Specifier * spec;
9134 for(spec = specs->first; spec; spec = spec->next)
9136 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
9139 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
9140 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
9146 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
9148 struct Identifier * id = exp->__anon1.__anon1.identifier;
9149 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9150 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
9151 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9152 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9154 if(_class && _class->type == 4)
9156 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
9157 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9161 struct __ecereNameSpace__ecere__com__Class * baseClass;
9163 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
9165 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
9167 for(value = e->values.first; value; value = value->next)
9169 if(!strcmp(value->name, id->string))
9174 exp->isConstant = 1;
9175 if(inCompiler || inPreCompiler || inDebugger)
9179 FreeExpContents(exp);
9181 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
9182 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
9184 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
9185 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9187 exp->expType = MkClassType(baseClass->fullName);
9195 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
9197 ProcessMethodType(method);
9198 exp->expType = __extension__ ({
9199 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
9201 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
9205 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
9208 ProcessPropertyType(prop);
9209 exp->expType = prop->dataType;
9211 prop->dataType->refCount++;
9214 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
9216 if(!member->dataType)
9217 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9218 exp->expType = member->dataType;
9219 if(member->dataType)
9220 member->dataType->refCount++;
9223 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
9225 if(!classProp->dataType)
9226 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
9227 if(classProp->constant)
9229 FreeExpContents(exp);
9230 exp->isConstant = 1;
9231 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
9234 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
9241 sprintf(constant, "%d", (int)classProp->Get(_class));
9242 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9248 exp->expType = classProp->dataType;
9249 if(classProp->dataType)
9250 classProp->dataType->refCount++;
9256 void DeclareProperty(struct External * neededBy, struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
9258 struct Symbol * symbol = prop->symbol;
9259 unsigned int imported = 0;
9260 unsigned int dllImport = 0;
9261 struct External * structExternal = (((void *)0));
9262 struct External * instExternal = (((void *)0));
9264 strcpy(setName, "__ecereProp_");
9265 FullClassNameCat(setName, prop->_class->fullName, 0);
9266 strcat(setName, "_Set_");
9267 FullClassNameCat(setName, prop->name, 1);
9268 strcpy(getName, "__ecereProp_");
9269 FullClassNameCat(getName, prop->_class->fullName, 0);
9270 strcat(getName, "_Get_");
9271 FullClassNameCat(getName, prop->name, 1);
9272 if(!symbol || symbol->_import)
9276 struct Symbol * classSym;
9278 if(!prop->_class->symbol)
9279 prop->_class->symbol = FindClass(prop->_class->fullName);
9280 classSym = prop->_class->symbol;
9281 if(classSym && !classSym->_import)
9283 struct ModuleImport * module;
9285 if(prop->_class->module)
9286 module = FindModule(prop->_class->module);
9288 module = mainModule;
9289 classSym->_import = __extension__ ({
9290 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9292 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
9294 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9296 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9297 symbol->_import = (struct ClassImport *)__extension__ ({
9298 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
9300 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
9303 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
9306 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)
9311 struct Context * context = SetupTemplatesContext(prop->_class);
9313 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
9314 FinishTemplatesContext(context);
9316 if((prop->Get && !symbol->__anon2.__anon2.externalGet) || (prop->Set && !symbol->__anon2.__anon2.externalSet))
9318 if(prop->_class->type == 0 && prop->_class->structSize)
9319 instExternal = DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
9320 structExternal = DeclareStruct((((void *)0)), prop->_class->fullName, prop->_class->type != 1, 0);
9322 if(prop->Get && !symbol->__anon2.__anon2.externalGet)
9324 struct Declaration * decl;
9325 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9326 struct Declarator * d;
9327 struct __ecereNameSpace__ecere__sys__OldList * params;
9328 struct Specifier * spec = (((void *)0));
9329 struct External * external;
9330 struct Declarator * typeDecl;
9331 unsigned int simple = 0;
9332 unsigned int needReference;
9334 specifiers = MkList();
9335 declarators = MkList();
9337 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9338 d = MkDeclaratorIdentifier(MkIdentifier(getName));
9340 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9342 struct Context * context = SetupTemplatesContext(prop->_class);
9344 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
9345 FinishTemplatesContext(context);
9347 needReference = !typeDecl || typeDecl->type == 1;
9348 for(spec = (*specifiers).first; spec; spec = spec->next)
9352 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9356 symbol->_class = classSym->__anon1.registered;
9357 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
9364 d = PlugDeclarator(typeDecl, d);
9367 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
9368 specifiers = MkList();
9370 d = MkDeclaratorFunction(d, params);
9372 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9373 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9374 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9376 ListAdd(specifiers, MkSpecifier(VOID));
9377 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9378 decl = MkDeclaration(specifiers, declarators);
9379 external = MkExternalDeclaration(decl);
9381 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9383 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9385 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9386 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9387 external->symbol = symbol;
9388 symbol->__anon2.__anon2.externalGet = external;
9389 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9391 FreeDeclarator(typeDecl);
9393 if(prop->Set && !symbol->__anon2.__anon2.externalSet)
9395 struct Declaration * decl;
9396 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9397 struct Declarator * d;
9398 struct __ecereNameSpace__ecere__sys__OldList * params;
9399 struct Specifier * spec = (((void *)0));
9400 struct External * external;
9401 struct Declarator * typeDecl;
9402 unsigned int needReference;
9404 declarators = MkList();
9406 if(!prop->conversion || prop->_class->type == 1)
9408 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9410 specifiers = MkList();
9412 struct Context * context = SetupTemplatesContext(prop->_class);
9414 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
9415 FinishTemplatesContext(context);
9417 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
9418 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
9419 ListAdd(params, MkTypeName(specifiers, d));
9420 d = MkDeclaratorIdentifier(MkIdentifier(setName));
9422 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9423 d = MkDeclaratorFunction(d, params);
9424 needReference = !typeDecl || typeDecl->type == 1;
9425 for(spec = (*specifiers).first; spec; spec = spec->next)
9429 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9432 symbol->_class = classSym->__anon1.registered;
9436 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9437 specifiers = MkList();
9439 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9440 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9441 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9442 if(!prop->conversion || prop->_class->type == 1)
9443 ListAdd(specifiers, MkSpecifier(VOID));
9445 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
9446 decl = MkDeclaration(specifiers, declarators);
9447 external = MkExternalDeclaration(decl);
9449 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9451 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9453 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9454 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9455 external->symbol = symbol;
9456 symbol->__anon2.__anon2.externalSet = external;
9457 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9459 if(!symbol->__anon2.__anon2.externalPtr)
9461 struct Declaration * decl;
9462 struct External * external;
9463 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
9464 char propName[1024];
9467 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9470 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9471 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
9473 ListAdd(specifiers, MkSpecifierName("Property"));
9474 strcpy(propName, "__ecereProp_");
9475 FullClassNameCat(propName, prop->_class->fullName, 0);
9476 strcat(propName, "_");
9477 FullClassNameCat(propName, prop->name, 1);
9479 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
9481 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9484 strcpy(propName, "__ecerePropM_");
9485 FullClassNameCat(propName, prop->_class->fullName, 0);
9486 strcat(propName, "_");
9487 FullClassNameCat(propName, prop->name, 1);
9488 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9490 decl = MkDeclaration(specifiers, list);
9492 external = MkExternalDeclaration(decl);
9493 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
9494 external->symbol = symbol;
9495 symbol->__anon2.__anon2.externalPtr = external;
9497 if(inCompiler && neededBy)
9499 if(symbol->__anon2.__anon2.externalPtr)
9500 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalPtr, 0);
9501 if(symbol->__anon2.__anon2.externalGet)
9502 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalGet, symbol->__anon2.__anon2.externalGet->type == 0);
9503 if(symbol->__anon2.__anon2.externalSet)
9504 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalSet, symbol->__anon2.__anon2.externalSet->type == 0);
9508 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction);
9510 void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name)
9512 struct Symbol * symbol = method->symbol;
9514 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && (!symbol->__anon2.__anon3.methodCodeExternal || method->type == 1)))
9516 unsigned int dllImport = 0;
9518 if(!method->dataType)
9519 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9521 if(!symbol || method->type == 1)
9523 struct Symbol * classSym;
9525 if(!method->_class->symbol)
9526 method->_class->symbol = FindClass(method->_class->fullName);
9527 classSym = method->_class->symbol;
9528 if(!classSym->_import)
9530 struct ModuleImport * module;
9532 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name)
9533 module = FindModule(method->_class->module);
9535 module = mainModule;
9536 classSym->_import = __extension__ ({
9537 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9539 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
9541 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9545 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9547 if(!symbol->_import)
9549 symbol->_import = (struct ClassImport *)__extension__ ({
9550 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
9552 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
9554 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
9558 symbol->type = method->dataType;
9560 symbol->type->refCount++;
9563 if(!method->dataType->dllExport)
9565 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)
9571 struct Declaration * decl;
9572 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9573 struct Declarator * d;
9574 struct Declarator * funcDecl;
9575 struct External * external;
9577 specifiers = MkList();
9578 declarators = MkList();
9580 ListAdd(specifiers, MkSpecifier(EXTERN));
9581 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
9582 ListAdd(specifiers, MkSpecifier(STATIC));
9583 if(method->type == 1)
9585 ListAdd(specifiers, MkSpecifier(INT));
9586 d = MkDeclaratorIdentifier(MkIdentifier(name));
9590 d = MkDeclaratorIdentifier(MkIdentifier(name));
9592 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9594 struct Context * context = SetupTemplatesContext(method->_class);
9596 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
9597 FinishTemplatesContext(context);
9599 funcDecl = GetFuncDecl(d);
9602 struct Specifier * spec, * next;
9604 for(spec = (*specifiers).first; spec; spec = next)
9609 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9610 FreeSpecifier(spec);
9614 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
9616 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
9618 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
9619 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")));
9620 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
9621 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
9623 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
9625 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
9627 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
9628 FreeTypeName(param);
9630 if(!funcDecl->__anon1.function.parameters)
9631 funcDecl->__anon1.function.parameters = MkList();
9632 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
9636 ProcessDeclarator(d, 1);
9637 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9638 decl = MkDeclaration(specifiers, declarators);
9639 ReplaceThisClassSpecifiers(specifiers, method->_class);
9640 external = MkExternalDeclaration(decl);
9641 external->symbol = symbol;
9642 symbol->__anon2.__anon1.pointerExternal = external;
9643 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9644 DeclareStruct(external, method->_class->fullName, 1, 1);
9645 if(method->dataType)
9646 DeclareType(external, method->dataType, 1, 1);
9649 if(inCompiler && neededFor)
9651 struct External * external = symbol->__anon2.__anon1.pointerExternal ? symbol->__anon2.__anon1.pointerExternal : symbol->__anon2.__anon3.methodCodeExternal;
9653 __ecereMethod_External_CreateUniqueEdge(neededFor, external, external->type == 0);
9657 struct __ecereNameSpace__ecere__com__GlobalFunction;
9659 struct __ecereNameSpace__ecere__com__GlobalFunction
9661 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
9662 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
9665 struct __ecereNameSpace__ecere__com__Instance * module;
9666 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
9667 const char * dataTypeString;
9668 struct Type * dataType;
9672 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
9674 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);
9676 unsigned int DeclareFunction(struct External * neededFor, struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
9678 struct Symbol * symbol = function->symbol;
9680 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
9682 unsigned int imported = 0;
9683 unsigned int dllImport = 0;
9685 if(!function->dataType)
9687 function->dataType = ProcessTypeString(function->dataTypeString, 0);
9688 if(!function->dataType->__anon1.__anon2.thisClass)
9689 function->dataType->__anon1.__anon2.staticMethod = 1;
9695 struct ModuleImport * module = FindModule(function->module);
9697 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9700 if(!function->dataType->dllExport)
9702 symbol->_import = (struct ClassImport *)__extension__ ({
9703 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
9705 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
9707 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
9711 symbol->type = ProcessTypeString(function->dataTypeString, 0);
9712 if(!symbol->type->__anon1.__anon2.thisClass)
9713 symbol->type->__anon1.__anon2.staticMethod = 1;
9716 imported = symbol->_import ? 1 : 0;
9717 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9723 struct Declaration * decl;
9724 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9725 struct Declarator * d;
9726 struct Declarator * funcDecl;
9727 struct External * external;
9729 specifiers = MkList();
9730 declarators = MkList();
9731 ListAdd(specifiers, MkSpecifier(EXTERN));
9732 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
9734 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9735 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
9736 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType == 1)
9738 struct Specifier * spec;
9740 for(spec = (*specifiers).first; spec; spec = spec->next)
9741 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
9743 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9744 FreeSpecifier(spec);
9748 funcDecl = GetFuncDecl(d);
9749 if(funcDecl && !funcDecl->__anon1.function.parameters)
9751 funcDecl->__anon1.function.parameters = MkList();
9752 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
9754 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9756 struct Context * oldCtx = curContext;
9758 curContext = globalContext;
9759 decl = MkDeclaration(specifiers, declarators);
9760 curContext = oldCtx;
9762 external = MkExternalDeclaration(decl);
9763 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9764 external->symbol = symbol;
9765 symbol->__anon2.__anon1.pointerExternal = external;
9766 DeclareType(external, function->dataType, 1, 1);
9770 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
9771 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
9772 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;
9775 void DeclareFunctionUtil(struct External * neededBy, const char * s)
9777 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
9784 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
9785 strcpy(name, "__ecereFunction_");
9786 FullClassNameCat(name, s, 0);
9787 DeclareFunction(neededBy, function, name);
9790 FindSymbol(s, globalContext, globalContext, 0, 0);
9793 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
9795 char propName[1024], propNameM[1024];
9796 char getName[1024], setName[1024];
9797 struct __ecereNameSpace__ecere__sys__OldList * args;
9799 DeclareProperty(curExternal, prop, setName, getName);
9800 strcpy(propName, "__ecereProp_");
9801 FullClassNameCat(propName, prop->_class->fullName, 0);
9802 strcat(propName, "_");
9803 FullClassNameCat(propName, prop->name, 1);
9804 strcpy(propNameM, "__ecerePropM_");
9805 FullClassNameCat(propNameM, prop->_class->fullName, 0);
9806 strcat(propNameM, "_");
9807 FullClassNameCat(propNameM, prop->name, 1);
9808 if(prop->isWatchable)
9811 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9812 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9813 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9815 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9816 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9817 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9818 DeclareFunctionUtil(curExternal, "eInstance_FireWatchers");
9822 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9823 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9824 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9826 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9827 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9828 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9829 DeclareFunctionUtil(curExternal, "eInstance_FireSelfWatchers");
9831 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
9832 curFunction->propSet->fireWatchersDone = 1;
9835 struct __ecereNameSpace__ecere__com__SubModule;
9837 struct __ecereNameSpace__ecere__com__SubModule
9839 struct __ecereNameSpace__ecere__com__SubModule * prev;
9840 struct __ecereNameSpace__ecere__com__SubModule * next;
9841 struct __ecereNameSpace__ecere__com__Instance * module;
9845 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
9847 struct __ecereNameSpace__ecere__com__SubModule * subModule;
9849 if(searchFor == searchIn)
9851 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
9853 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
9855 if(ModuleVisibility(subModule->module, searchFor))
9862 void ProcessExpressionType(struct Expression * exp);
9864 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
9866 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
9868 struct Identifier * id = exp->__anon1.__anon1.identifier;
9869 struct Context * ctx;
9870 struct Symbol * symbol = (((void *)0));
9872 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
9874 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
9876 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
9881 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))))
9883 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
9884 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9885 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9886 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9890 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
9892 if(!prop && !method)
9893 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
9894 if(!prop && !method && !member)
9896 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
9898 if(prop || method || member || classProp)
9901 exp->__anon1.member.member = id;
9902 exp->__anon1.member.memberType = 0;
9903 exp->__anon1.member.exp = QMkExpId("this");
9906 else if(_class && _class->templateParams.first)
9908 struct __ecereNameSpace__ecere__com__Class * sClass;
9910 for(sClass = _class; sClass; sClass = sClass->base)
9912 if(sClass->templateParams.first)
9914 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9916 for(param = sClass->templateParams.first; param; param = param->next)
9918 if(param->type == 2 && !strcmp(param->name, id->string))
9920 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
9924 struct Declarator * decl;
9925 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
9927 FreeIdentifier(exp->__anon1.member.member);
9928 ProcessExpressionType(argExp);
9929 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
9930 exp->expType = ProcessType(specs, decl);
9932 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
9943 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
9945 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9947 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
9949 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
9950 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
9953 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
9954 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
9956 void * ptr = inst->data + dataMember->offset + offset;
9957 char * result = (((void *)0));
9959 exp->loc = member->loc = inst->loc;
9960 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
9961 if(!dataMember->dataType)
9962 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
9963 type = dataMember->dataType;
9966 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
9968 if(_class->type == 4)
9970 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9974 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
9975 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
9977 for(item = e->values.first; item; item = item->next)
9979 if(item->data == GetEnumValue(_class, ptr))
9981 result = item->name;
9987 exp->__anon1.__anon1.identifier = MkIdentifier(result);
9989 exp->destType = MkClassType(_class->fullName);
9990 ProcessExpressionType(exp);
9994 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
9996 if(!_class->dataType)
9997 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
9998 type = _class->dataType;
10007 FreeExpContents(exp);
10008 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10014 FreeExpContents(exp);
10015 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10021 FreeExpContents(exp);
10022 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10028 FreeExpContents(exp);
10029 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10035 FreeExpContents(exp);
10036 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10042 FreeExpContents(exp);
10043 exp->__anon1.__anon1.constant = PrintInt64((long long)*(ssize_t *)ptr);
10048 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10051 ListAdd(memberList, member);
10053 if(parentDataMember->type == 1)
10058 void CheckTemplateTypes(struct Expression * exp)
10060 struct Expression * nbExp = GetNonBracketsExp(exp);
10062 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
10064 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10065 struct Context * context;
10066 int kind = exp->expType->kind;
10070 exp->destType->refCount++;
10072 exp->expType->refCount++;
10073 newExp->prev = (((void *)0));
10074 newExp->next = (((void *)0));
10075 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10077 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10079 if(c->type == 2 || c->type == 4 || c->type == 3)
10082 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10083 kind = c->dataType->kind;
10089 if(exp->destType->classObjectType)
10092 exp->destType->refCount--;
10094 exp->expType->refCount--;
10095 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10099 struct __ecereNameSpace__ecere__sys__OldList * specs;
10100 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10101 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10103 context = PushContext();
10104 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10105 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10106 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10108 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10109 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
10110 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
10111 exp->__anon1.compound->__anon1.compound.context = context;
10112 PopContext(context);
10117 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
10118 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))
10119 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
10121 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10126 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
10128 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10129 struct Context * context;
10130 int kind = exp->expType->kind;
10134 exp->destType->refCount++;
10136 exp->expType->refCount++;
10137 newExp->prev = (((void *)0));
10138 newExp->next = (((void *)0));
10139 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10141 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10143 if(c->type == 2 || c->type == 4 || c->type == 3)
10146 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10147 kind = c->dataType->kind;
10153 if(exp->destType->classObjectType)
10156 exp->destType->refCount--;
10158 exp->expType->refCount--;
10159 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10163 struct __ecereNameSpace__ecere__sys__OldList * specs;
10164 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10165 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10167 context = PushContext();
10168 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10169 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10170 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10172 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10173 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
10174 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
10175 exp->__anon1.compound->__anon1.compound.context = context;
10176 PopContext(context);
10181 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
10184 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10185 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)));
10186 ProcessExpressionType((*exp->__anon1.list).first);
10192 if(__ecereProp_Type_Get_isPointerType(exp->expType))
10194 exp->needTemplateCast = 2;
10195 newExp->needCast = 1;
10196 newExp->needTemplateCast = 2;
10197 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10199 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
10200 exp->needTemplateCast = 2;
10201 newExp->needCast = 1;
10202 newExp->needTemplateCast = 2;
10203 ProcessExpressionType((*exp->__anon1.list).first);
10209 if(exp->expType->kind == 20)
10211 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
10215 FreeType(exp->destType);
10216 FreeType(exp->expType);
10217 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10222 char typeString[1024];
10223 struct Declarator * decl;
10224 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
10226 typeString[0] = '\0';
10227 PrintType(exp->expType, typeString, 0, 0);
10228 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
10230 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
10231 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10232 exp->__anon1.cast.exp->needCast = 1;
10233 exp->needTemplateCast = 2;
10234 newExp->needTemplateCast = 2;
10242 static void ProcessInitializer(struct Initializer * init, struct Type * type)
10247 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
10249 if(init->__anon1.exp && !init->__anon1.exp->destType)
10251 FreeType(init->__anon1.exp->destType);
10252 init->__anon1.exp->destType = type;
10256 if(init->__anon1.exp)
10258 ProcessExpressionType(init->__anon1.exp);
10259 init->isConstant = init->__anon1.exp->isConstant;
10265 struct Expression * exp = init->__anon1.exp;
10266 struct Instantiation * inst = exp->__anon1.instance;
10267 struct MembersInit * members;
10270 init->__anon1.list = MkList();
10273 for(members = (*inst->members).first; members; members = members->next)
10275 if(members->type == 0)
10277 struct MemberInit * member;
10279 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
10281 ListAdd(init->__anon1.list, member->initializer);
10282 member->initializer = (((void *)0));
10287 FreeExpression(exp);
10291 struct Initializer * i;
10292 struct Type * initializerType = (((void *)0));
10293 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
10294 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
10295 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
10296 int subMemberStackPos = 0;
10298 if(type && type->kind == 12)
10299 initializerType = Dereference(type);
10300 else if(type && (type->kind == 9 || type->kind == 10))
10301 initializerType = type->__anon1.__anon1.members.first;
10302 for(i = (*init->__anon1.list).first; i; i = i->next)
10304 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
10306 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
10309 if(!curMember->dataType)
10310 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
10311 initializerType = curMember->dataType;
10314 ProcessInitializer(i, initializerType);
10315 if(initializerType && type && (type->kind == 9 || type->kind == 10))
10316 initializerType = initializerType->next;
10318 init->isConstant = 0;
10320 if(type && type->kind == 12)
10321 FreeType(initializerType);
10322 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))
10324 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
10331 void PopulateInstance(struct Instantiation * inst)
10333 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
10334 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
10335 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10336 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
10339 inst->members = MkListOne(MkMembersInitList(memberList));
10341 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
10342 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10344 if(!dataMember->isProperty)
10346 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
10347 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
10350 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10351 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
10352 struct Type * type;
10353 void * ptr = inst->data + dataMember->offset;
10354 char * result = (((void *)0));
10356 exp->loc = member->loc = inst->loc;
10357 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
10358 if(!dataMember->dataType)
10359 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10360 type = dataMember->dataType;
10361 if(type->kind == 8)
10363 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
10365 if(_class->type == 4)
10367 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
10371 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
10372 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
10374 for(item = e->values.first; item; item = item->next)
10376 if(item->data == GetEnumValue(_class, ptr))
10378 result = item->name;
10385 exp->__anon1.__anon1.identifier = MkIdentifier(result);
10387 exp->destType = MkClassType(_class->fullName);
10388 ProcessExpressionType(exp);
10391 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
10393 if(!_class->dataType)
10394 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
10395 type = _class->dataType;
10404 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10410 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10416 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10422 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10428 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10433 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10436 ListAdd(memberList, member);
10442 int ComputeTypeSize(struct Type * type);
10444 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
10446 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10447 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10449 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))
10451 int unionMemberOffset = 0;
10456 member->memberOffset = 0;
10457 if(targetBits < sizeof(void *) * 8)
10458 member->structAlignment = 0;
10460 else if(targetBits < sizeof(void *) * 8)
10461 _class->structAlignment = 0;
10462 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
10463 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
10464 if(!member && _class->destructionWatchOffset)
10465 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10467 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10469 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10471 if(!dataMember->isProperty)
10473 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
10475 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10481 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10483 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10485 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
10487 if(!isMember && _class->type == 2 && dataMember->dataType)
10489 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
10493 ComputeTypeSize(dataMember->dataType);
10494 if(bitMember->pos == -1)
10495 bitMember->pos = _class->memberOffset;
10496 if(!bitMember->size)
10497 bitMember->size = dataMember->dataType->size * 8;
10498 _class->memberOffset = bitMember->pos + bitMember->size;
10499 for(d = 0; d < bitMember->size; d++)
10505 bitMember->mask = mask << bitMember->pos;
10507 else if(dataMember->type == 0 && dataMember->dataType)
10512 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)))
10513 ComputeTypeSize(dataMember->dataType);
10514 if(dataMember->dataType->bitFieldCount)
10516 bitFields += dataMember->dataType->bitFieldCount;
10523 int size = (bitFields + 7) / 8;
10527 int __simpleStruct0;
10531 short __simpleStruct0;
10533 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10534 if(member->memberOffset % alignment)
10535 member->memberOffset += alignment - (member->memberOffset % alignment);
10537 dataMember->offset = member->memberOffset;
10538 if(member->type == 1)
10539 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10542 member->memberOffset += size;
10549 short __simpleStruct0;
10551 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10552 if(_class->memberOffset % alignment)
10553 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10555 dataMember->offset = _class->memberOffset;
10556 _class->memberOffset += size;
10560 size = dataMember->dataType->size;
10561 alignment = dataMember->dataType->alignment;
10565 int __simpleStruct0;
10569 short __simpleStruct0;
10571 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10572 if(member->memberOffset % alignment)
10573 member->memberOffset += alignment - (member->memberOffset % alignment);
10575 dataMember->offset = member->memberOffset;
10576 if(member->type == 1)
10577 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10580 member->memberOffset += size;
10587 short __simpleStruct0;
10589 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10590 if(_class->memberOffset % alignment)
10591 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10593 dataMember->offset = _class->memberOffset;
10594 _class->memberOffset += size;
10601 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
10602 alignment = dataMember->structAlignment;
10605 int __simpleStruct0;
10609 short __simpleStruct0;
10611 if(member->memberOffset % alignment)
10612 member->memberOffset += alignment - (member->memberOffset % alignment);
10613 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10615 dataMember->offset = member->memberOffset;
10616 if(member->type == 1)
10617 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10619 member->memberOffset += dataMember->memberOffset;
10625 short __simpleStruct0;
10627 if(_class->memberOffset % alignment)
10628 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10629 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10631 dataMember->offset = _class->memberOffset;
10632 _class->memberOffset += dataMember->memberOffset;
10640 int size = (bitFields + 7) / 8;
10644 int __simpleStruct0;
10648 short __simpleStruct0;
10650 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10651 if(member->memberOffset % alignment)
10652 member->memberOffset += alignment - (member->memberOffset % alignment);
10654 if(member->type == 1)
10655 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10658 member->memberOffset += size;
10665 short __simpleStruct0;
10667 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10668 if(_class->memberOffset % alignment)
10669 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10671 _class->memberOffset += size;
10676 if(member && member->type == 1)
10678 member->memberOffset = unionMemberOffset;
10682 if(_class->type != 2)
10686 if(_class->structAlignment)
10688 if(_class->memberOffset % _class->structAlignment)
10689 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
10691 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
10694 struct __ecereNameSpace__ecere__com__Property * prop;
10696 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
10698 if(prop->isProperty && prop->isWatchable)
10700 prop->watcherOffset = _class->structSize;
10701 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10706 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
10708 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
10710 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
10712 if(deriv->computeSize)
10714 deriv->offset = _class->structSize;
10715 deriv->memberOffset = 0;
10716 deriv->structSize = deriv->offset;
10717 ComputeClassMembers(deriv, 0);
10725 FinishTemplatesContext(context);
10728 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)
10730 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10731 unsigned int totalSize = 0;
10732 unsigned int maxSize = 0;
10735 struct __ecereNameSpace__ecere__com__DataMember * member;
10737 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10741 if(!isMember && _class->base)
10743 maxSize = _class->structSize;
10745 if(_class->type == 1 || _class->type == 5)
10746 AddMembers(neededBy, declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
10749 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
10751 if(maxSize > baseSize)
10752 maxSize -= baseSize;
10758 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
10760 if(!member->isProperty)
10762 switch(member->type)
10766 if(member->dataTypeString)
10768 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
10769 struct Declarator * decl;
10771 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
10772 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
10773 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
10774 if(!member->dataType)
10775 member->dataType = ProcessType(specs, decl);
10776 ReplaceThisClassSpecifiers(specs, topClass);
10778 struct Type * type = ProcessType(specs, decl);
10780 DeclareType(neededBy, member->dataType, 1, 0);
10783 ComputeTypeSize(member->dataType);
10784 size = member->dataType->size;
10785 alignment = member->dataType->alignment;
10788 if(totalSize % alignment)
10789 totalSize += alignment - (totalSize % alignment);
10798 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
10801 sprintf(id, "__anon%d", anonID++);
10803 AddMembers(neededBy, list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
10804 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
10805 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
10806 alignment = member->structAlignment;
10809 if(totalSize % alignment)
10810 totalSize += alignment - (totalSize % alignment);
10820 unsigned int __simpleStruct0;
10822 if(topMember && topMember->type == 1)
10823 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
10825 *retSize += totalSize;
10827 else if(totalSize < maxSize && _class->type != 1000)
10829 int autoPadding = 0;
10831 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
10832 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
10833 if(totalSize + autoPadding < maxSize)
10835 char sizeString[50];
10837 sprintf(sizeString, "%d", maxSize - totalSize);
10838 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
10844 FinishTemplatesContext(context);
10845 return topMember ? topMember->memberID : _class->memberID;
10848 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)
10853 CheckConstCompatibility(source, dest, 1);
10854 if(source->kind == 20 && dest->kind != 20)
10856 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
10861 if(dest->kind == 20 && source->kind != 20)
10863 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
10868 if(dest->classObjectType == 2 && dest->kind != 11)
10870 if(source->classObjectType != 3)
10874 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
10882 if(source->kind != 11 && source->classObjectType == 3)
10884 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
10887 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
10889 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))
10892 if(dest->kind == 14 && source->kind != 0)
10894 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))
10896 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))
10898 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
10900 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
10902 if(conversions != (((void *)0)))
10904 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
10909 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
10911 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
10913 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
10915 if(sourceBase == destBase)
10919 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))
10923 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))
10925 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
10932 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
10936 if(source->kind == 8)
10938 struct __ecereNameSpace__ecere__com__Class * _class;
10940 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10942 struct __ecereNameSpace__ecere__com__Property * convert;
10944 for(convert = _class->conversions.first; convert; convert = convert->next)
10946 if(convert->memberAccess == 1 || _class->module == privateModule)
10948 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10950 if(!convert->dataType)
10951 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10952 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))
10954 if(!conversions && !convert->Get)
10956 else if(conversions != (((void *)0)))
10958 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))
10962 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10964 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10973 if(dest->kind == 8)
10975 struct __ecereNameSpace__ecere__com__Class * _class;
10977 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10979 struct __ecereNameSpace__ecere__com__Property * convert;
10981 for(convert = _class->conversions.first; convert; convert = convert->next)
10983 if(convert->memberAccess == 1 || _class->module == privateModule)
10985 struct Type * constType = (((void *)0));
10986 unsigned int success = 0;
10988 if(!convert->dataType)
10989 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10990 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
10992 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10994 constType = __extension__ ({
10995 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10997 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
10999 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
11000 ptrType->constant = 1;
11002 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
11004 if(!conversions && !convert->Set)
11006 else if(conversions != (((void *)0)))
11008 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))
11012 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
11014 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
11020 FreeType(constType);
11026 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
11028 if(!dest->__anon1._class->__anon1.registered->dataType)
11029 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
11030 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
11032 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))
11039 if(source->kind == 8)
11041 struct __ecereNameSpace__ecere__com__Class * _class;
11043 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
11045 struct __ecereNameSpace__ecere__com__Property * convert;
11047 for(convert = _class->conversions.first; convert; convert = convert->next)
11049 if(convert->memberAccess == 1 || _class->module == privateModule)
11051 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
11053 if(!convert->dataType)
11054 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
11055 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))
11057 if(!conversions && !convert->Get)
11059 else if(conversions != (((void *)0)))
11061 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))
11065 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
11067 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
11075 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
11077 if(!source->__anon1._class->__anon1.registered->dataType)
11078 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
11079 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
11081 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))
11083 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
11089 if(source->kind == 8 || source->kind == 19)
11091 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
11093 else if(dest->kind == 7 && source->kind == 6)
11095 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
11097 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
11099 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
11101 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
11103 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
11105 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))
11107 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))
11109 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)))
11111 struct Type * paramSource, * paramDest;
11113 if(dest->kind == 16)
11114 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
11115 if(source->kind == 16)
11116 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
11117 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
11118 dest = dest->__anon1.type;
11119 if(source->kind == 13 && source->__anon1.type->kind == 11)
11120 source = source->__anon1.type;
11121 if(dest->kind == 16)
11122 dest = dest->__anon1.__anon3.method->dataType;
11123 if(source->kind == 16)
11124 source = source->__anon1.__anon3.method->dataType;
11125 paramSource = source->__anon1.__anon2.params.first;
11126 if(paramSource && paramSource->kind == 0)
11127 paramSource = (((void *)0));
11128 paramDest = dest->__anon1.__anon2.params.first;
11129 if(paramDest && paramDest->kind == 0)
11130 paramDest = (((void *)0));
11131 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11133 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))))
11135 if(paramDest && paramDest->kind == 8)
11136 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
11138 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
11141 paramDest = paramDest->next;
11143 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
11145 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11147 if(dest->__anon1.__anon2.thisClass)
11149 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
11151 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11157 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
11159 if(owningClassDest)
11160 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
11162 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
11166 paramSource = paramSource->next;
11170 if(dest->__anon1.__anon2.thisClass)
11172 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
11174 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11180 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
11182 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
11188 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11190 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
11194 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
11195 for(; paramDest; paramDest = paramDest->next)
11199 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
11203 struct Type * paramDestType = paramDest;
11204 struct Type * paramSourceType = paramSource;
11205 struct Type * type = paramDestType;
11207 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
11210 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
11211 struct __ecereNameSpace__ecere__com__Class * sClass;
11213 for(sClass = owningClassSource; sClass; sClass = sClass->base)
11216 if(sClass->templateClass)
11217 sClass = sClass->templateClass;
11218 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
11220 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
11222 for(sClass = sClass->base; sClass; sClass = sClass->base)
11224 if(sClass->templateClass)
11225 sClass = sClass->templateClass;
11226 id += sClass->templateParams.count;
11237 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
11239 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
11242 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)))
11247 PrintType(paramDest, type, 0, 1);
11248 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
11249 if(paramDestType != paramDest)
11250 FreeType(paramDestType);
11253 if(paramDestType != paramDest)
11254 FreeType(paramDestType);
11256 paramSource = paramSource->next;
11260 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
11265 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
11269 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
11271 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))
11273 ComputeTypeSize(source->__anon1.type);
11274 ComputeTypeSize(dest->__anon1.type);
11275 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))
11283 void ComputeInstantiation(struct Expression * exp)
11285 struct Instantiation * inst = exp->__anon1.instance;
11286 struct MembersInit * members;
11287 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11288 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11289 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11290 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11291 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11292 int subMemberStackPos = 0;
11295 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11299 if(_class->type == 0 || _class->type == 5)
11301 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11302 if(_class->type == 0)
11303 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11306 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11310 for(members = (*inst->members).first; members; members = members->next)
11312 switch(members->type)
11316 if(members->__anon1.dataMembers)
11318 struct MemberInit * member;
11320 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11322 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11323 unsigned int found = 0;
11324 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11325 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11326 unsigned int dataMemberOffset;
11330 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11333 if(curMember->isProperty)
11334 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11337 dataMember = curMember;
11338 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11339 if(_class->type == 0)
11340 dataMemberOffset += _class->base->structSize;
11347 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11351 if(prop->memberAccess == 1)
11353 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11354 curClass = prop->_class;
11359 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11360 int _subMemberStackPos = 0;
11362 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11366 if(dataMember->memberAccess == 1)
11368 curMember = dataMember;
11369 curClass = dataMember->_class;
11370 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11371 subMemberStackPos = _subMemberStackPos;
11376 if(found && member->initializer && member->initializer->type == 0)
11378 struct Expression * value = member->initializer->__anon1.exp;
11379 struct Type * type = (((void *)0));
11380 unsigned int deepMember = 0;
11384 type = prop->dataType;
11386 else if(dataMember)
11388 if(!dataMember->dataType)
11389 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11390 type = dataMember->dataType;
11392 if(ident && ident->next)
11395 for(ident = ident->next; ident && type; ident = ident->next)
11397 if(type->kind == 8)
11399 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11401 type = prop->dataType;
11404 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11406 type = dataMember->dataType;
11409 else if(type->kind == 9 || type->kind == 10)
11411 struct Type * memberType;
11413 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11415 if(!strcmp(memberType->name, ident->string))
11426 FreeType(value->destType);
11427 value->destType = type;
11430 ComputeExpression(value);
11432 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11434 if(type->kind == 8)
11436 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11438 if(_class && (_class->type == 2 || _class->type == 3 || _class->type == 4))
11440 if(!_class->dataType)
11441 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11442 type = _class->dataType;
11447 void * ptr = inst->data + dataMemberOffset;
11449 if(value->type == 2)
11455 GetInt(value, (int *)ptr);
11460 GetInt64(value, (long long *)ptr);
11465 GetIntPtr(value, (intptr_t *)ptr);
11470 GetIntSize(value, (ssize_t *)ptr);
11475 GetFloat(value, (float *)ptr);
11480 GetDouble(value, (double *)ptr);
11485 else if(value->type == 1)
11487 if(type->kind == 8)
11489 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11491 if(_class->type == 1)
11493 ComputeTypeSize(type);
11494 if(value->__anon1.instance->data)
11495 memcpy(ptr, value->__anon1.instance->data, type->size);
11500 else if(prop && prop->Set != (void *)(intptr_t)1)
11502 if(value->type == 1 && value->__anon1.instance->data)
11504 if(type->kind == 8)
11506 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11508 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)))
11510 void (* Set)(void *, void *) = (void *)prop->Set;
11512 Set(inst->data, value->__anon1.instance->data);
11513 PopulateInstance(inst);
11517 else if(value->type == 2)
11523 void (* Set)(void *, double) = (void *)prop->Set;
11525 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11530 void (* Set)(void *, float) = (void *)prop->Set;
11532 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11537 void (* Set)(void *, int) = (void *)prop->Set;
11539 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11544 void (* Set)(void *, long long) = (void *)prop->Set;
11546 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11551 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11553 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11558 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11560 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11565 else if(value->type == 3)
11569 ReadString(temp, value->__anon1.__anon2.string);
11570 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11574 else if(!deepMember && type && _class->type == 3)
11578 if(value->type == 2)
11580 if(type->kind == 8)
11582 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11584 if(_class->type == 3)
11586 if(!_class->dataType)
11587 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11588 type = _class->dataType;
11596 float (* Set)(float) = (void *)prop->Set;
11598 GetFloat(member->initializer->__anon1.exp, &fValue);
11599 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11606 double (* Set)(double) = (void *)prop->Set;
11608 GetDouble(member->initializer->__anon1.exp, &dValue);
11609 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11617 else if(!deepMember && type && _class->type == 2)
11621 if(value->type == 1 && value->__anon1.instance->data)
11623 unsigned int (* Set)(void *) = (void *)prop->Set;
11625 bits = Set(value->__anon1.instance->data);
11627 else if(value->type == 2)
11631 else if(dataMember)
11633 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11634 struct Type * type;
11637 bits = (bits & ~bitMember->mask);
11638 if(!bitMember->dataType)
11639 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11640 type = bitMember->dataType;
11641 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11643 if(!type->__anon1._class->__anon1.registered->dataType)
11644 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11645 type = type->__anon1._class->__anon1.registered->dataType;
11654 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11662 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11671 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11679 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11687 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11695 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11700 bits |= part << bitMember->pos;
11706 if(_class && _class->type == 3)
11708 ComputeExpression(member->initializer->__anon1.exp);
11709 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11711 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11721 if(_class && _class->type == 2)
11723 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11728 FreeInstance(inst);
11732 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11734 if(exp->__anon1.op.op == SIZEOF)
11736 FreeExpContents(exp);
11738 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11742 if(!exp->__anon1.op.exp1)
11744 switch(exp->__anon1.op.op)
11748 struct Expression * exp2 = exp->__anon1.op.exp2;
11750 exp->__anon1.op.exp2 = (((void *)0));
11751 FreeExpContents(exp);
11752 FreeType(exp->expType);
11753 FreeType(exp->destType);
11755 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11761 FreeExpContents(exp);
11762 op1->ops.Neg(exp, op1);
11766 if(op1->ops.BitNot)
11768 FreeExpContents(exp);
11769 op1->ops.BitNot(exp, op1);
11775 FreeExpContents(exp);
11776 op1->ops.Not(exp, op1);
11783 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11785 if(Promote(op2, op1->kind, op1->type->isSigned))
11786 op2->kind = op1->kind, op2->ops = op1->ops;
11787 else if(Promote(op1, op2->kind, op2->type->isSigned))
11788 op1->kind = op2->kind, op1->ops = op2->ops;
11790 switch(exp->__anon1.op.op)
11795 FreeExpContents(exp);
11796 op1->ops.Add(exp, op1, op2);
11802 FreeExpContents(exp);
11803 op1->ops.Sub(exp, op1, op2);
11809 FreeExpContents(exp);
11810 op1->ops.Mul(exp, op1, op2);
11816 FreeExpContents(exp);
11817 op1->ops.Div(exp, op1, op2);
11823 FreeExpContents(exp);
11824 op1->ops.Mod(exp, op1, op2);
11828 if(exp->__anon1.op.exp2)
11830 if(op1->ops.BitAnd)
11832 FreeExpContents(exp);
11833 op1->ops.BitAnd(exp, op1, op2);
11840 FreeExpContents(exp);
11841 op1->ops.BitOr(exp, op1, op2);
11845 if(op1->ops.BitXor)
11847 FreeExpContents(exp);
11848 op1->ops.BitXor(exp, op1, op2);
11852 if(op1->ops.LShift)
11854 FreeExpContents(exp);
11855 op1->ops.LShift(exp, op1, op2);
11859 if(op1->ops.RShift)
11861 FreeExpContents(exp);
11862 op1->ops.RShift(exp, op1, op2);
11868 FreeExpContents(exp);
11869 op1->ops.Equ(exp, op1, op2);
11875 FreeExpContents(exp);
11876 op1->ops.Nqu(exp, op1, op2);
11882 FreeExpContents(exp);
11883 op1->ops.And(exp, op1, op2);
11889 FreeExpContents(exp);
11890 op1->ops.Or(exp, op1, op2);
11896 FreeExpContents(exp);
11897 op1->ops.Grt(exp, op1, op2);
11903 FreeExpContents(exp);
11904 op1->ops.Sma(exp, op1, op2);
11908 if(op1->ops.GrtEqu)
11910 FreeExpContents(exp);
11911 op1->ops.GrtEqu(exp, op1, op2);
11915 if(op1->ops.SmaEqu)
11917 FreeExpContents(exp);
11918 op1->ops.SmaEqu(exp, op1, op2);
11926 void ApplyAnyObjectLogic(struct Expression * e)
11928 struct Type * destType = e->destType;
11930 if(destType && (destType->classObjectType == 3))
11932 if(e && e->expType)
11934 struct Type * type = e->expType;
11935 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
11937 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11939 _class = type->__anon1._class->__anon1.registered;
11941 else if(type->kind == 19)
11943 _class = FindClass("ecere::com::Class")->__anon1.registered;
11947 char string[1024] = "";
11948 struct Symbol * classSym;
11950 PrintTypeNoConst(type, string, 0, 1);
11951 classSym = FindClass(string);
11953 _class = classSym->__anon1.registered;
11955 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)))
11957 if(!_class || strcmp(_class->fullName, "char *"))
11959 struct Expression * checkedExp = e, * newExp;
11961 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11963 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11965 if(checkedExp->type == 23)
11967 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11970 checkedExp = (*checkedExp->__anon1.list).last;
11972 else if(checkedExp->type == 11)
11973 checkedExp = checkedExp->__anon1.cast.exp;
11975 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
11977 newExp = checkedExp->__anon1.op.exp2;
11978 checkedExp->__anon1.op.exp2 = (((void *)0));
11979 FreeExpContents(checkedExp);
11980 if(e->expType && e->expType->passAsTemplate)
11984 ComputeTypeSize(e->expType);
11985 sprintf(size, "%d", e->expType->size);
11986 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))))));
11988 ReplaceExpContents(checkedExp, newExp);
11989 e->byReference = 1;
11991 else if(!e->byReference || (_class && _class->type == 5))
11993 struct Expression * checkedExp;
11996 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;
11998 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
12000 struct Context * context = PushContext();
12001 struct Declarator * decl;
12002 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12003 char typeString[1024];
12004 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12006 typeString[0] = '\0';
12008 newExp->prev = (((void *)0));
12009 newExp->next = (((void *)0));
12010 newExp->expType = (((void *)0));
12011 PrintTypeNoConst(e->expType, typeString, 0, 1);
12012 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12013 newExp->destType = ProcessType(specs, decl);
12014 curContext = context;
12018 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
12021 sprintf(name, "__internalValue%03X", internalValueCounter++);
12022 if(!curCompound->__anon1.compound.declarations)
12023 curCompound->__anon1.compound.declarations = MkList();
12024 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
12025 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
12026 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
12027 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
12030 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
12032 struct Type * type = e->destType;
12034 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12035 CopyTypeInto(e->destType, type);
12036 e->destType->refCount = 1;
12037 e->destType->classObjectType = 0;
12040 e->__anon1.compound->__anon1.compound.context = context;
12041 PopContext(context);
12042 curContext = context->parent;
12046 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
12048 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
12050 if(checkedExp->type == 23)
12052 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12055 checkedExp = (*checkedExp->__anon1.list).last;
12057 else if(checkedExp->type == 11)
12058 checkedExp = checkedExp->__anon1.cast.exp;
12061 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12063 *operand = *checkedExp;
12064 __ecereMethod_Expression_Clear(checkedExp);
12065 checkedExp->destType = ProcessTypeString("void *", 0);
12066 checkedExp->expType = checkedExp->destType;
12067 checkedExp->destType->refCount++;
12068 checkedExp->type = 4;
12069 checkedExp->__anon1.op.op = '&';
12070 checkedExp->__anon1.op.exp1 = (((void *)0));
12071 checkedExp->__anon1.op.exp2 = operand;
12080 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))))
12082 if(e->expType->classObjectType && destType && destType->classObjectType)
12088 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12091 thisExp->prev = (((void *)0));
12092 thisExp->next = (((void *)0));
12093 __ecereMethod_Expression_Clear(e);
12095 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
12096 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
12097 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
12099 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12100 CopyTypeInto(e->expType, thisExp->expType);
12101 e->expType->byReference = 0;
12102 e->expType->refCount = 1;
12103 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))
12105 e->expType->classObjectType = 0;
12110 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
12112 if(destType->kind == 14)
12114 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
12116 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))
12118 unsigned int byReference = e->expType->byReference;
12119 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12120 struct Declarator * decl;
12121 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12122 char typeString[1024];
12123 struct Type * type;
12124 int backupClassObjectType;
12125 unsigned int backupByReference;
12127 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
12131 backupClassObjectType = type->classObjectType;
12132 backupByReference = type->byReference;
12133 type->classObjectType = 0;
12134 type->byReference = 0;
12135 typeString[0] = '\0';
12136 PrintType(type, typeString, 0, 1);
12137 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12138 type->classObjectType = backupClassObjectType;
12139 type->byReference = backupByReference;
12141 thisExp->prev = (((void *)0));
12142 thisExp->next = (((void *)0));
12143 __ecereMethod_Expression_Clear(e);
12144 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)))
12146 unsigned int passAsTemplate = thisExp->destType->passAsTemplate;
12149 destType->refCount++;
12151 e->__anon1.op.op = '*';
12152 e->__anon1.op.exp1 = (((void *)0));
12153 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
12154 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12155 CopyTypeInto(t, thisExp->destType);
12156 t->passAsTemplate = 0;
12157 FreeType(thisExp->destType);
12158 thisExp->destType = t;
12159 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12160 CopyTypeInto(t, destType);
12161 t->passAsTemplate = passAsTemplate;
12162 FreeType(destType);
12164 destType->refCount = 0;
12165 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12166 CopyTypeInto(e->expType, type);
12167 if(type->passAsTemplate)
12169 e->expType->classObjectType = 0;
12170 e->expType->passAsTemplate = 0;
12172 e->expType->byReference = 0;
12173 e->expType->refCount = 1;
12178 e->__anon1.cast.typeName = MkTypeName(specs, decl);
12179 e->__anon1.cast.exp = thisExp;
12180 e->byReference = 1;
12185 FreeType(e->destType);
12186 e->destType = destType;
12187 destType->refCount++;
12192 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
12194 struct __ecereNameSpace__ecere__com__Class * _class;
12195 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
12197 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
12198 ComputeModuleClasses(subModule->data);
12199 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
12200 ComputeClassMembers(_class, 0);
12203 int ComputeTypeSize(struct Type * type)
12205 unsigned int size = type ? type->size : 0;
12207 if(!size && type && !type->computing)
12209 type->computing = 1;
12213 type->alignment = size = sizeof(char);
12216 type->alignment = size = sizeof(char);
12219 type->alignment = size = sizeof(int);
12222 type->alignment = size = sizeof(long long);
12225 type->alignment = size = targetBits / 8;
12226 type->pointerAlignment = 1;
12229 type->alignment = size = targetBits / 8;
12230 type->pointerAlignment = 1;
12233 type->alignment = size = sizeof(long);
12236 type->alignment = size = sizeof(short);
12239 type->alignment = size = sizeof(float);
12242 type->alignment = size = sizeof(double);
12246 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
12248 if(_class && _class->type == 1)
12250 ComputeClassMembers(_class, 0);
12251 type->alignment = _class->structAlignment;
12252 type->pointerAlignment = (unsigned int)_class->pointerAlignment;
12253 size = _class->structSize;
12254 if(type->alignment && size % type->alignment)
12255 size += type->alignment - (size % type->alignment);
12257 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
12259 if(!_class->dataType)
12260 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12261 size = type->alignment = ComputeTypeSize(_class->dataType);
12265 size = type->alignment = targetBits / 8;
12266 type->pointerAlignment = 1;
12272 size = type->alignment = targetBits / 8;
12273 type->pointerAlignment = 1;
12276 if(type->__anon1.__anon4.arraySizeExp)
12278 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
12279 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
12280 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)))
12282 struct Location oldLoc = yylloc;
12283 char expression[10240];
12285 expression[0] = '\0';
12286 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
12287 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
12289 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
12290 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
12293 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
12295 else if(type->__anon1.__anon4.enumClass)
12297 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
12299 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
12302 type->__anon1.__anon4.arraySize = 0;
12306 type->__anon1.__anon4.arraySize = 0;
12308 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
12309 if(type->__anon1.type)
12311 type->alignment = type->__anon1.type->alignment;
12312 type->pointerAlignment = type->__anon1.type->pointerAlignment;
12317 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12319 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12321 if(symbol && symbol->type)
12323 ComputeTypeSize(symbol->type);
12324 size = symbol->type->size;
12329 struct Type * member;
12331 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12333 int __simpleStruct0, __simpleStruct1;
12334 unsigned int addSize = ComputeTypeSize(member);
12336 member->offset = size;
12337 if(member->alignment && size % member->alignment)
12338 member->offset += member->alignment - (size % member->alignment);
12339 size = member->offset;
12340 if(member->pointerAlignment && type->size <= 4)
12341 type->pointerAlignment = 1;
12342 else if(!member->pointerAlignment && member->alignment >= 8)
12343 type->pointerAlignment = 0;
12344 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12347 if(type->alignment && size % type->alignment)
12348 size += type->alignment - (size % type->alignment);
12354 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12356 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12358 if(symbol && symbol->type)
12360 ComputeTypeSize(symbol->type);
12361 size = symbol->type->size;
12362 type->alignment = symbol->type->alignment;
12367 struct Type * member;
12369 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12371 int __simpleStruct0, __simpleStruct1;
12372 unsigned int addSize = ComputeTypeSize(member);
12374 member->offset = size;
12375 if(member->alignment && size % member->alignment)
12376 member->offset += member->alignment - (size % member->alignment);
12377 size = member->offset;
12378 if(member->pointerAlignment && type->size <= 4)
12379 type->pointerAlignment = 1;
12380 else if(!member->pointerAlignment && member->alignment >= 8)
12381 type->pointerAlignment = 0;
12382 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12383 size = ((size > addSize) ? size : addSize);
12385 if(type->alignment && size % type->alignment)
12386 size += type->alignment - (size % type->alignment);
12392 struct TemplateParameter * param = type->__anon1.templateParameter;
12393 struct Type * baseType = ProcessTemplateParameterType(param);
12397 size = ComputeTypeSize(baseType);
12398 type->alignment = baseType->alignment;
12399 type->pointerAlignment = baseType->pointerAlignment;
12402 type->alignment = size = sizeof(uint64);
12407 type->alignment = size = sizeof(enum
12415 type->alignment = size = targetBits / 8;
12416 type->pointerAlignment = 1;
12421 type->computing = 0;
12426 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl)
12428 struct External * external = (((void *)0));
12429 struct Symbol * classSym = FindClass(name);
12430 struct __ecereNameSpace__ecere__sys__OldList * curDeclarations = (((void *)0));
12431 struct Specifier * curSpec = (((void *)0));
12433 if(!inCompiler || !classSym)
12434 return (((void *)0));
12435 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
12436 return (((void *)0));
12437 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
12438 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
12439 external = classSym->__anon2.__anon1.structExternal;
12440 if(external && external->__anon1.declaration)
12442 struct Specifier * spec;
12444 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12445 if(spec->type == 3 || spec->type == 4)
12448 curDeclarations = spec->__anon1.__anon2.definitions;
12452 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
12454 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12455 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
12456 char structName[1024];
12457 unsigned int addedPadding = 0;
12459 classSym->declaring++;
12460 if(strchr(classSym->string, '<'))
12462 if(classSym->__anon1.registered->templateClass)
12464 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
12465 classSym->declaring--;
12470 FullClassNameCat(structName, name, 0);
12471 classSym->declaredStructSym = 1;
12472 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
12474 unsigned int add = 0;
12478 external = MkExternalDeclaration((((void *)0)));
12479 classSym->__anon2.__anon1.structExternal = external;
12480 external->symbol = classSym;
12485 declarations = MkList();
12486 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
12488 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
12490 FreeList(declarations, (void *)(FreeClassDef));
12491 declarations = (((void *)0));
12493 if(classSym->__anon1.registered->type != 5 && !declarations)
12495 FreeExternal(external);
12496 external = (((void *)0));
12497 classSym->__anon2.__anon1.structExternal = (((void *)0));
12502 curSpec->__anon1.__anon2.definitions = declarations;
12505 specifiers = MkList();
12506 declarators = MkList();
12507 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
12508 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12511 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12514 classSym->declaring--;
12516 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
12518 classSym->declaredStructSym = 1;
12519 if(classSym->__anon1.registered)
12520 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
12521 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
12523 struct Specifier * spec;
12525 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
12527 if(spec->__anon1.__anon2.definitions)
12528 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
12532 if(inCompiler && neededBy && (external || !classSym->imported))
12536 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
12537 external->symbol = classSym;
12538 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12540 if(reachedPass15 && !external->__anon1.declaration && classSym->__anon1.registered && classSym->__anon1.registered->type == 5)
12542 char structName[1024];
12543 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12546 FullClassNameCat(structName, name, 0);
12547 specifiers = MkList();
12548 declarators = MkList();
12549 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))));
12550 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12554 struct External * e = external->fwdDecl ? external->fwdDecl : external;
12556 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
12557 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
12560 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
12565 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)
12567 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
12568 unsigned int found = 0;
12569 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
12570 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
12571 unsigned int freeType = 0;
12573 yylloc = member->loc;
12578 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
12582 dataMember = *curMember;
12588 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
12589 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
12590 int _subMemberStackPos = 0;
12593 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
12596 dataMember = thisMember;
12597 if(curMember && thisMember->memberAccess == 1)
12599 *curMember = thisMember;
12600 *curClass = thisMember->_class;
12601 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
12602 *subMemberStackPos = _subMemberStackPos;
12608 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
12609 if(method && method->type == 1)
12612 method = (((void *)0));
12617 struct Type * type = (((void *)0));
12621 if(!dataMember->dataType && dataMember->dataTypeString)
12623 struct Context * context = SetupTemplatesContext(_class);
12625 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12626 FinishTemplatesContext(context);
12628 type = dataMember->dataType;
12632 if(!method->dataType)
12633 ProcessMethodType(method);
12634 type = method->dataType;
12636 if(ident && ident->next)
12638 for(ident = ident->next; ident && type; ident = ident->next)
12640 if(type->kind == 8)
12642 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
12644 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
12646 type = dataMember->dataType;
12648 else if(type->kind == 9 || type->kind == 10)
12650 struct Type * memberType;
12652 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
12654 if(!strcmp(memberType->name, ident->string))
12663 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
12666 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
12667 struct __ecereNameSpace__ecere__com__Class * sClass;
12669 for(sClass = _class; sClass; sClass = sClass->base)
12672 if(sClass->templateClass)
12673 sClass = sClass->templateClass;
12674 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
12676 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
12678 for(sClass = sClass->base; sClass; sClass = sClass->base)
12680 if(sClass->templateClass)
12681 sClass = sClass->templateClass;
12682 id += sClass->templateParams.count;
12693 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
12695 if(arg.__anon1.__anon1.dataTypeString)
12697 unsigned int constant = type->constant;
12699 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
12700 if(type->kind == 8 && constant)
12701 type->constant = 1;
12702 else if(type->kind == 13)
12704 struct Type * t = type->__anon1.type;
12706 while(t->kind == 13)
12707 t = t->__anon1.type;
12709 t->constant = constant;
12712 if(type && _class->templateClass)
12713 type->passAsTemplate = 1;
12720 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
12722 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
12723 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
12724 int paramCount = 0;
12725 int lastParam = -1;
12726 char templateString[1024];
12727 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
12729 sprintf(templateString, "%s<", expClass->templateClass->fullName);
12730 for(cClass = expClass; cClass; cClass = cClass->base)
12734 if(cClass->templateClass)
12735 cClass = cClass->templateClass;
12736 for(param = cClass->templateParams.first; param; param = param->next)
12739 struct __ecereNameSpace__ecere__com__Class * sClass;
12740 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
12742 for(sClass = cClass->base; sClass; sClass = sClass->base)
12744 if(sClass->templateClass)
12745 sClass = sClass->templateClass;
12746 id += sClass->templateParams.count;
12748 arg = expClass->templateArgs[id];
12749 for(sClass = _class; sClass; sClass = sClass->base)
12751 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
12753 struct __ecereNameSpace__ecere__com__Class * nextClass;
12755 if(sClass->templateClass)
12756 sClass = sClass->templateClass;
12757 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
12759 if(nextClass->templateClass)
12760 nextClass = nextClass->templateClass;
12761 p += nextClass->templateParams.count;
12763 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
12765 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
12767 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12769 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
12770 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
12777 char argument[256];
12779 argument[0] = '\0';
12780 switch(param->type)
12784 char expString[1024];
12785 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12786 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
12787 struct Expression * exp;
12788 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
12790 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
12791 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
12792 ProcessExpressionType(exp);
12793 ComputeExpression(exp);
12794 expString[0] = '\0';
12795 PrintExpression(exp, expString);
12796 strcat(argument, expString);
12797 FreeExpression(exp);
12802 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
12807 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12808 strcat(argument, arg.__anon1.__anon1.dataTypeString);
12815 strcat(templateString, ", ");
12816 if(lastParam != p - 1)
12818 strcat(templateString, param->name);
12819 strcat(templateString, " = ");
12821 strcat(templateString, argument);
12830 int len = strlen(templateString);
12832 if(templateString[len - 1] == '<')
12836 if(templateString[len - 1] == '>')
12837 templateString[len++] = ' ';
12838 templateString[len++] = '>';
12840 templateString[len++] = '\0';
12843 struct Context * context = SetupTemplatesContext(_class);
12847 type = ProcessTypeString(templateString, 0);
12849 FinishTemplatesContext(context);
12852 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
12854 ProcessExpressionType(member->initializer->__anon1.exp);
12855 if(!member->initializer->__anon1.exp->expType)
12859 char expString[10240];
12861 expString[0] = '\0';
12862 PrintExpression(member->initializer->__anon1.exp, expString);
12863 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
12864 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
12867 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
12869 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
12872 else if(member->initializer)
12874 ProcessInitializer(member->initializer, type);
12881 if(_class && _class->type == 3)
12883 if(member->initializer)
12885 struct Type * type = MkClassType(_class->fullName);
12887 ProcessInitializer(member->initializer, type);
12893 if(member->initializer)
12895 ProcessInitializer(member->initializer, (((void *)0)));
12901 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12905 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12907 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
12911 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
12916 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
12918 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
12920 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)))
12922 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
12924 if(_class->type == 4)
12926 struct __ecereNameSpace__ecere__sys__OldList converts =
12930 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12933 if(!_class->symbol)
12934 _class->symbol = FindClass(_class->fullName);
12935 type->__anon1._class = _class->symbol;
12936 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))
12938 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12939 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12943 struct __ecereNameSpace__ecere__com__Class * baseClass;
12945 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
12947 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
12949 for(value = e->values.first; value; value = value->next)
12951 if(!strcmp(value->name, string))
12956 FreeType(sourceExp->expType);
12957 sourceExp->isConstant = 1;
12958 sourceExp->expType = MkClassType(baseClass->fullName);
12959 if(inCompiler || inPreCompiler || inDebugger)
12961 char constant[256];
12963 FreeExpContents(sourceExp);
12964 sourceExp->type = 2;
12965 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
12966 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
12968 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
12969 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
12971 while(converts.first)
12973 struct Conversion * convert = converts.first;
12975 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
12976 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
12978 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12985 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12986 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12989 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)))
12990 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
12995 void ComputeExpression(struct Expression * exp)
13001 struct Identifier * id = exp->__anon1.__anon1.identifier;
13003 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
13005 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
13007 if(c && c->type == 4)
13009 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13013 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
13014 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
13016 for(value = e->values.first; value; value = value->next)
13018 if(!strcmp(value->name, id->string))
13023 const char * dts = c->dataTypeString;
13025 FreeExpContents(exp);
13027 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13036 ComputeInstantiation(exp);
13041 struct Expression * exp1, * exp2 = (((void *)0));
13042 struct Operand op1 =
13049 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13052 struct Operand op2 =
13059 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13063 if(exp->__anon1.op.exp2)
13065 struct Expression * e = exp->__anon1.op.exp2;
13067 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13069 if(e->type == 5 || e->type == 32 || e->type == 23)
13072 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13074 e = (*e->__anon1.list).last;
13077 if(exp->__anon1.op.op == 261 && e && e->expType)
13079 if(e->type == 3 && e->__anon1.__anon2.string)
13081 char * string = e->__anon1.__anon2.string;
13082 int len = strlen(string);
13083 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13085 len = UnescapeString(tmp, string + 1, len - 2);
13086 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13087 FreeExpContents(exp);
13089 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13093 struct Type * type = e->expType;
13096 FreeExpContents(exp);
13098 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13104 ComputeExpression(exp->__anon1.op.exp2);
13106 if(exp->__anon1.op.exp1)
13108 ComputeExpression(exp->__anon1.op.exp1);
13109 exp1 = exp->__anon1.op.exp1;
13110 exp2 = exp->__anon1.op.exp2;
13111 op1 = GetOperand(exp1);
13113 op1.type->refCount++;
13116 op2 = GetOperand(exp2);
13118 op2.type->refCount++;
13123 exp1 = exp->__anon1.op.exp2;
13124 op1 = GetOperand(exp1);
13126 op1.type->refCount++;
13128 CallOperator(exp, exp1, exp2, &op1, &op2);
13130 FreeType(op1.type);
13132 FreeType(op2.type);
13138 struct Expression * e, * n;
13140 for(e = (*exp->__anon1.list).first; e; e = n)
13145 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13146 struct Expression * prev = exp->prev;
13147 struct Expression * next = exp->next;
13149 ComputeExpression(e);
13150 FreeType(exp->expType);
13151 FreeType(exp->destType);
13155 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
13156 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
13167 struct Expression * memberExp = exp->__anon1.member.exp;
13168 struct Identifier * memberID = exp->__anon1.member.member;
13169 struct Type * type;
13171 ComputeExpression(exp->__anon1.member.exp);
13172 type = exp->__anon1.member.exp->expType;
13175 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)));
13176 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13177 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13178 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
13180 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
13181 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
13185 struct Symbol * classSym;
13188 PrintTypeNoConst(type, string, 0, 1);
13189 classSym = FindClass(string);
13190 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13192 if(exp->__anon1.member.member)
13194 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
13196 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
13198 if(!prop && !member && _class && exp->__anon1.member.member)
13200 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
13202 convertTo = _class;
13203 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13204 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
13210 struct Type * type = prop->dataType;
13212 if(_class->type == 3)
13214 if(type->kind == 8)
13216 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13218 if(_class->type == 3)
13220 if(!_class->dataType)
13221 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13222 type = _class->dataType;
13230 float (* Get)(float) = (void *)prop->Get;
13232 GetFloat(exp->__anon1.member.exp, &value);
13233 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
13240 double (* Get)(double);
13242 GetDouble(exp->__anon1.member.exp, &value);
13244 Get = (void *)prop->Set;
13246 Get = (void *)prop->Get;
13247 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
13257 struct Expression * value = exp->__anon1.member.exp;
13258 struct Type * type;
13260 if(!prop->dataType)
13261 ProcessPropertyType(prop);
13262 type = prop->dataType;
13266 else if(_class->type == 1)
13272 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13274 if(propertyClass->type == 1 && value->type == 1)
13276 void (* Set)(void *, void *) = (void *)prop->Set;
13278 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13279 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13280 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13281 exp->__anon1.instance->loc = exp->loc;
13283 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
13284 PopulateInstance(exp->__anon1.instance);
13291 void (* Set)(void *, int) = (void *)prop->Set;
13293 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13294 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13295 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13296 exp->__anon1.instance->loc = exp->loc;
13298 GetInt(value, &intValue);
13299 Set(exp->__anon1.instance->data, intValue);
13300 PopulateInstance(exp->__anon1.instance);
13305 long long intValue;
13306 void (* Set)(void *, long long) = (void *)prop->Set;
13308 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13309 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13310 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13311 exp->__anon1.instance->loc = exp->loc;
13313 GetInt64(value, &intValue);
13314 Set(exp->__anon1.instance->data, intValue);
13315 PopulateInstance(exp->__anon1.instance);
13321 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13323 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13324 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13325 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13326 exp->__anon1.instance->loc = exp->loc;
13328 GetIntPtr(value, &intValue);
13329 Set(exp->__anon1.instance->data, intValue);
13330 PopulateInstance(exp->__anon1.instance);
13336 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13338 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13339 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13340 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13341 exp->__anon1.instance->loc = exp->loc;
13343 GetIntSize(value, &intValue);
13344 Set(exp->__anon1.instance->data, intValue);
13345 PopulateInstance(exp->__anon1.instance);
13351 void (* Set)(void *, float) = (void *)prop->Set;
13353 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13354 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13355 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13356 exp->__anon1.instance->loc = exp->loc;
13358 GetFloat(value, &floatValue);
13359 Set(exp->__anon1.instance->data, floatValue);
13360 PopulateInstance(exp->__anon1.instance);
13365 double doubleValue;
13366 void (* Set)(void *, double) = (void *)prop->Set;
13368 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13369 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13370 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13371 exp->__anon1.instance->loc = exp->loc;
13373 GetDouble(value, &doubleValue);
13374 Set(exp->__anon1.instance->data, doubleValue);
13375 PopulateInstance(exp->__anon1.instance);
13380 else if(_class->type == 2)
13386 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13388 if(propertyClass->type == 1 && value->__anon1.instance->data)
13390 unsigned int (* Set)(void *) = (void *)prop->Set;
13391 unsigned int bits = Set(value->__anon1.instance->data);
13393 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13397 else if(_class->type == 2)
13399 unsigned int value;
13400 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
13403 GetUInt(exp->__anon1.member.exp, &value);
13405 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13414 if(_class->type == 2)
13416 unsigned int value;
13418 GetUInt(exp->__anon1.member.exp, &value);
13423 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13425 if(_class->type == 1)
13427 void (* Get)(unsigned int, void *) = (void *)prop->Get;
13429 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13430 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13431 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13432 exp->__anon1.instance->loc = exp->loc;
13434 Get(value, exp->__anon1.instance->data);
13435 PopulateInstance(exp->__anon1.instance);
13437 else if(_class->type == 2)
13439 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
13440 uint64 bits = Get(value);
13442 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
13449 else if(_class->type == 1)
13451 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
13457 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13459 if(_class->type == 1 && value)
13461 void (* Get)(void *, void *) = (void *)prop->Get;
13463 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13464 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13465 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13466 exp->__anon1.instance->loc = exp->loc;
13468 Get(value, exp->__anon1.instance->data);
13469 PopulateInstance(exp->__anon1.instance);
13480 exp->isConstant = 0;
13489 FreeExpression(memberExp);
13490 FreeIdentifier(memberID);
13496 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
13498 FreeExpContents(exp);
13499 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13506 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
13508 if(classSym && classSym->__anon1.registered)
13510 if(classSym->__anon1.registered->fixed)
13512 FreeSpecifier(exp->__anon1._class);
13513 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
13518 char className[1024];
13520 strcpy(className, "__ecereClass_");
13521 FullClassNameCat(className, classSym->string, 1);
13522 DeclareClass(curExternal, classSym, className);
13523 FreeExpContents(exp);
13525 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
13526 exp->__anon1.member.member = MkIdentifier("structSize");
13533 struct Type * type;
13534 struct Expression * e = exp;
13536 if(exp->type == 11)
13538 if(exp->__anon1.cast.exp)
13539 ComputeExpression(exp->__anon1.cast.exp);
13540 e = exp->__anon1.cast.exp;
13542 if(e && exp->expType)
13544 type = exp->expType;
13545 if(type->kind == 8)
13547 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13549 if(_class && (_class->type == 3 || _class->type == 2))
13551 if(!_class->dataType)
13552 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13553 type = _class->dataType;
13564 if(GetChar(e, &value))
13566 FreeExpContents(exp);
13567 exp->__anon1.__anon1.constant = PrintChar(value);
13573 unsigned char value = 0;
13575 if(GetUChar(e, &value))
13577 FreeExpContents(exp);
13578 exp->__anon1.__anon1.constant = PrintUChar(value);
13588 if(GetShort(e, &value))
13590 FreeExpContents(exp);
13591 exp->__anon1.__anon1.constant = PrintShort(value);
13597 unsigned short value = 0;
13599 if(GetUShort(e, &value))
13601 FreeExpContents(exp);
13602 exp->__anon1.__anon1.constant = PrintUShort(value);
13612 if(GetInt(e, &value))
13614 FreeExpContents(exp);
13615 exp->__anon1.__anon1.constant = PrintInt(value);
13621 unsigned int value = 0;
13623 if(GetUInt(e, &value))
13625 FreeExpContents(exp);
13626 exp->__anon1.__anon1.constant = PrintUInt(value);
13634 long long value = 0;
13636 if(GetInt64(e, &value))
13638 FreeExpContents(exp);
13639 exp->__anon1.__anon1.constant = PrintInt64(value);
13647 if(GetUInt64(e, &value))
13649 FreeExpContents(exp);
13650 exp->__anon1.__anon1.constant = PrintUInt64(value);
13658 intptr_t value = 0;
13660 if(GetIntPtr(e, &value))
13662 FreeExpContents(exp);
13663 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13669 uintptr_t value = 0;
13671 if(GetUIntPtr(e, &value))
13673 FreeExpContents(exp);
13674 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13684 if(GetIntSize(e, &value))
13686 FreeExpContents(exp);
13687 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13695 if(GetUIntSize(e, &value))
13697 FreeExpContents(exp);
13698 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13707 if(GetFloat(e, &value))
13709 FreeExpContents(exp);
13710 exp->__anon1.__anon1.constant = PrintFloat(value);
13719 if(GetDouble(e, &value))
13721 FreeExpContents(exp);
13722 exp->__anon1.__anon1.constant = PrintDouble(value);
13733 struct Operand op1 =
13740 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13743 struct Operand op2 =
13750 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13753 struct Operand op3 =
13760 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13764 if(exp->__anon1.cond.exp)
13765 ComputeExpression((*exp->__anon1.cond.exp).last);
13766 if(exp->__anon1.cond.elseExp)
13767 ComputeExpression(exp->__anon1.cond.elseExp);
13768 if(exp->__anon1.cond.cond)
13769 ComputeExpression(exp->__anon1.cond.cond);
13770 op1 = GetOperand(exp->__anon1.cond.cond);
13772 op1.type->refCount++;
13773 op2 = GetOperand((*exp->__anon1.cond.exp).last);
13775 op2.type->refCount++;
13776 op3 = GetOperand(exp->__anon1.cond.elseExp);
13778 op3.type->refCount++;
13781 FreeExpContents(exp);
13782 op1.ops.Cond(exp, &op1, &op2, &op3);
13785 FreeType(op1.type);
13787 FreeType(op2.type);
13789 FreeType(op3.type);
13795 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
13797 struct __ecereNameSpace__ecere__com__Instance * module;
13799 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))
13801 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))
13803 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))
13805 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)
13807 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
13813 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
13815 struct Type * source;
13816 struct Type * realDest = dest;
13817 struct Type * backupSourceExpType = (((void *)0));
13818 struct Expression * nbExp = GetNonBracketsExp(sourceExp);
13819 struct Expression * computedExp = nbExp;
13822 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)
13824 computedExp = CopyExpression(nbExp);
13825 ComputeExpression(computedExp);
13827 source = sourceExp->expType;
13828 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
13830 if(computedExp != nbExp)
13832 FreeExpression(computedExp);
13833 computedExp = nbExp;
13838 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
13840 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
13842 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
13844 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
13846 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
13848 if(sourceBase == destBase)
13850 if(computedExp != nbExp)
13852 FreeExpression(computedExp);
13853 computedExp = nbExp;
13862 struct __ecereNameSpace__ecere__sys__OldList * specs;
13863 unsigned int flag = 0;
13864 long long value = (((int)0x7fffffff));
13866 source->refCount++;
13867 if(computedExp->type == 2)
13869 if(source->isSigned)
13870 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13872 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13874 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
13876 if(source->isSigned)
13877 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13879 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13881 if(computedExp != nbExp)
13883 FreeExpression(computedExp);
13884 computedExp = nbExp;
13886 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
13889 source = __extension__ ({
13890 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13892 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
13895 if(dest->kind == 8)
13897 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13899 if(_class && _class->type == 3)
13901 if(source->kind != 8)
13903 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13904 struct Type * tempDest, * tempSource;
13906 for(; _class->base->type != 1000; _class = _class->base)
13909 tempDest = tempType;
13910 tempType->kind = 8;
13911 if(!_class->symbol)
13912 _class->symbol = FindClass(_class->fullName);
13913 tempType->__anon1._class = _class->symbol;
13914 tempType->truth = dest->truth;
13915 if(tempType->__anon1._class)
13916 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13917 backupSourceExpType = sourceExp->expType;
13918 if(dest->passAsTemplate)
13920 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13921 CopyTypeInto(sourceExp->expType, dest);
13922 sourceExp->expType->passAsTemplate = 0;
13926 sourceExp->expType = dest;
13930 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13933 if(_class && _class->type == 2 && source->kind != 8)
13935 if(!dest->__anon1._class->__anon1.registered->dataType)
13936 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
13937 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13940 FreeType(sourceExp->expType);
13941 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
13942 source->refCount++;
13945 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
13947 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13948 struct Declarator * decl;
13951 ReadString(string, sourceExp->__anon1.__anon2.string);
13952 decl = SpecDeclFromString(string, specs, (((void *)0)));
13953 FreeExpContents(sourceExp);
13954 FreeType(sourceExp->expType);
13955 sourceExp->type = 24;
13956 sourceExp->__anon1._classExp.specifiers = specs;
13957 sourceExp->__anon1._classExp.decl = decl;
13958 sourceExp->expType = dest;
13962 if(backupSourceExpType)
13963 FreeType(backupSourceExpType);
13967 else if(source->kind == 8)
13969 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
13971 if(_class && (_class->type == 3 || _class->type == 2))
13973 if(dest->kind != 8)
13975 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13976 struct Type * tempDest, * tempSource;
13978 if(!source->__anon1._class->__anon1.registered->dataType)
13979 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
13980 for(; _class->base->type != 1000; _class = _class->base)
13983 tempSource = tempType;
13984 tempType->kind = 8;
13985 tempType->__anon1._class = FindClass(_class->fullName);
13986 tempType->truth = source->truth;
13987 tempType->classObjectType = source->classObjectType;
13988 if(tempType->__anon1._class)
13989 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13990 if(conversions && conversions->last)
13992 ((struct Conversion *)conversions->last)->resultType = dest;
13995 FreeType(sourceExp->expType);
13996 sourceExp->expType = MkClassType(_class->fullName);
13997 sourceExp->expType->truth = source->truth;
13998 sourceExp->expType->classObjectType = source->classObjectType;
13999 if(!sourceExp->destType)
14001 FreeType(sourceExp->destType);
14002 sourceExp->destType = sourceExp->expType;
14003 if(sourceExp->expType)
14004 sourceExp->expType->refCount++;
14006 if(!_class->dataType)
14007 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14009 dest = MkClassType(source->__anon1._class->string);
14010 dest->truth = source->truth;
14011 dest->classObjectType = source->classObjectType;
14013 source = _class->dataType;
14014 source->refCount++;
14015 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
14021 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
14028 if(dest->kind == 8)
14030 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
14031 unsigned int fittingValue = 0;
14033 if(_class && _class->type == 4)
14035 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14036 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14038 if(c && value >= 0 && value <= c->largest)
14041 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
14043 if(_class->type == 0 || _class->type == 5)
14045 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14047 *newExp = *sourceExp;
14048 if(sourceExp->destType)
14049 sourceExp->destType->refCount++;
14050 if(sourceExp->expType)
14051 sourceExp->expType->refCount++;
14052 sourceExp->type = 11;
14053 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
14054 sourceExp->__anon1.cast.exp = newExp;
14055 FreeType(sourceExp->expType);
14056 sourceExp->expType = (((void *)0));
14057 ProcessExpressionType(sourceExp);
14060 FreeType(sourceExp->expType);
14061 sourceExp->expType = dest;
14066 if(backupSourceExpType)
14067 FreeType(backupSourceExpType);
14070 if(!_class->dataType)
14071 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14073 dest = _class->dataType;
14076 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))
14078 specs = MkListOne(MkSpecifier(DOUBLE));
14080 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))
14082 specs = MkListOne(MkSpecifier(FLOAT));
14084 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))
14087 if(!dest->isSigned)
14088 ListAdd(specs, MkSpecifier(UNSIGNED));
14089 ListAdd(specs, MkSpecifier(INT64));
14091 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
14094 if(!dest->isSigned)
14095 ListAdd(specs, MkSpecifier(UNSIGNED));
14096 ListAdd(specs, MkSpecifier(INT));
14098 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14101 if(!dest->isSigned)
14102 ListAdd(specs, MkSpecifier(UNSIGNED));
14103 ListAdd(specs, MkSpecifier(SHORT));
14105 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14108 if(!dest->isSigned)
14109 ListAdd(specs, MkSpecifier(UNSIGNED));
14110 ListAdd(specs, MkSpecifier(CHAR));
14116 if(backupSourceExpType)
14118 if(sourceExp->expType)
14119 FreeType(sourceExp->expType);
14120 sourceExp->expType = backupSourceExpType;
14125 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))
14127 specs = MkListOne(MkSpecifier(DOUBLE));
14129 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))
14131 specs = MkListOne(MkSpecifier(FLOAT));
14133 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
14136 ListAdd(specs, MkSpecifier(BOOL));
14138 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)))
14140 if(source->kind == 3)
14145 if(!dest->isSigned)
14146 ListAdd(specs, MkSpecifier(UNSIGNED));
14147 ListAdd(specs, MkSpecifier(CHAR));
14150 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)))))
14152 if(source->kind == 3)
14157 if(!dest->isSigned)
14158 ListAdd(specs, MkSpecifier(UNSIGNED));
14159 ListAdd(specs, MkSpecifier(SHORT));
14162 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
14165 if(!dest->isSigned)
14166 ListAdd(specs, MkSpecifier(UNSIGNED));
14167 ListAdd(specs, MkSpecifier(INT));
14169 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
14172 if(!dest->isSigned)
14173 ListAdd(specs, MkSpecifier(UNSIGNED));
14174 ListAdd(specs, MkSpecifier(INT64));
14176 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
14178 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
14184 if(backupSourceExpType)
14186 if(sourceExp->expType)
14187 FreeType(sourceExp->expType);
14188 sourceExp->expType = backupSourceExpType;
14192 if(!flag && !sourceExp->opDestType)
14194 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14196 *newExp = *sourceExp;
14197 newExp->prev = (((void *)0));
14198 newExp->next = (((void *)0));
14199 if(sourceExp->destType)
14200 sourceExp->destType->refCount++;
14201 if(sourceExp->expType)
14202 sourceExp->expType->refCount++;
14203 sourceExp->type = 11;
14204 if(realDest->kind == 8)
14206 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
14207 FreeList(specs, (void *)(FreeSpecifier));
14210 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
14211 if(newExp->type == 4)
14213 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
14216 sourceExp->__anon1.cast.exp = newExp;
14217 FreeType(sourceExp->expType);
14218 sourceExp->expType = (((void *)0));
14219 ProcessExpressionType(sourceExp);
14222 FreeList(specs, (void *)(FreeSpecifier));
14225 if(backupSourceExpType)
14226 FreeType(backupSourceExpType);
14231 if(computedExp != nbExp)
14233 FreeExpression(computedExp);
14234 computedExp = nbExp;
14236 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
14237 sourceExp = (*sourceExp->__anon1.list).last;
14238 if(sourceExp->type == 0)
14240 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
14242 if(dest->kind == 8)
14244 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
14246 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
14247 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14251 for(; _class && _class->type == 4; _class = _class->base)
14253 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
14254 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14256 for(value = e->values.first; value; value = value->next)
14258 if(!strcmp(value->name, id->string))
14263 FreeType(sourceExp->expType);
14264 sourceExp->isConstant = 1;
14265 sourceExp->expType = MkClassType(_class->fullName);
14266 if(inCompiler || inPreCompiler || inDebugger)
14268 FreeExpContents(sourceExp);
14269 sourceExp->type = 2;
14270 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
14271 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
14273 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
14282 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
14293 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
14295 unsigned int result = 1;
14299 struct __ecereNameSpace__ecere__sys__OldList converts =
14303 struct Conversion * convert;
14305 if(destType->kind == 0)
14307 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
14311 for(convert = converts.first; convert; convert = convert->next)
14313 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
14317 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14318 int objectType = exp->expType ? exp->expType->classObjectType : 0;
14321 newExp->prev = (((void *)0));
14322 newExp->next = (((void *)0));
14323 newExp->destType = (((void *)0));
14327 exp->addedThis = 1;
14328 exp->__anon1.member.exp = newExp;
14329 FreeType(exp->__anon1.member.exp->expType);
14330 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
14331 exp->__anon1.member.exp->expType->classObjectType = objectType;
14332 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
14333 exp->__anon1.member.memberType = 1;
14334 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14337 exp->expType->refCount++;
14338 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14344 exp->addedThis = 1;
14345 exp->__anon1.member.exp = newExp;
14346 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)
14348 newExp->byReference = 1;
14350 FreeType(exp->__anon1.member.exp->expType);
14351 exp->__anon1.member.exp->expType = (((void *)0));
14352 if(convert->convert->dataType)
14354 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14355 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
14356 exp->__anon1.member.exp->expType->refCount = 1;
14357 exp->__anon1.member.exp->expType->classObjectType = objectType;
14358 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14360 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
14361 exp->__anon1.member.memberType = 4;
14362 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14364 if(convert->resultType)
14365 convert->resultType->refCount++;
14371 FreeType(exp->expType);
14374 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14375 if(exp->destType->casted)
14378 exp->expType->refCount++;
14382 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14383 if(exp->destType->casted)
14385 if(convert->resultType)
14386 convert->resultType->refCount++;
14390 if(exp->isConstant && inCompiler)
14391 ComputeExpression(exp);
14392 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
14394 if(!result && exp->expType && converts.count)
14396 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14398 if(!result && exp->expType && exp->destType)
14400 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))
14407 static void ProcessFunction(struct FunctionDefinition * function);
14409 void ProcessInstantiationType(struct Instantiation * inst)
14411 yylloc = inst->loc;
14414 struct MembersInit * members;
14415 struct Symbol * classSym;
14416 struct __ecereNameSpace__ecere__com__Class * _class;
14418 classSym = inst->_class->__anon1.__anon1.symbol;
14419 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14420 if(!_class || _class->type != 5)
14421 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14422 afterExternal = afterExternal ? afterExternal : curExternal;
14424 ProcessExpressionType(inst->exp);
14425 inst->isConstant = 1;
14428 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14429 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14430 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14431 int subMemberStackPos = 0;
14433 for(members = (*inst->members).first; members; members = members->next)
14435 switch(members->type)
14440 static unsigned int instMethodID = 0;
14441 struct External * external = curExternal;
14442 struct Context * context = curContext;
14443 struct Declarator * declarator = members->__anon1.function->declarator;
14444 struct Identifier * nameID = GetDeclId(declarator);
14445 char * unmangled = nameID ? nameID->string : (((void *)0));
14446 struct Expression * exp;
14447 struct External * createdExternal = (((void *)0));
14453 strcpy(name, "__ecereInstMeth_");
14454 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14456 strcat(name, nameID->string);
14458 sprintf(number, "_%08d", instMethodID++);
14459 strcat(name, number);
14460 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14464 struct Symbol * symbol = declarator->symbol;
14465 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14467 if(method && method->type == 1)
14469 symbol->__anon1.method = method;
14470 ProcessMethodType(method);
14471 if(!symbol->type->__anon1.__anon2.thisClass)
14473 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14475 if(!currentClass->symbol)
14476 currentClass->symbol = FindClass(currentClass->fullName);
14477 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14481 if(!_class->symbol)
14482 _class->symbol = FindClass(_class->fullName);
14483 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14486 DeclareType(curExternal, symbol->type, 1, 1);
14490 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14493 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14496 FreeSpecifier(nameID->_class);
14497 nameID->_class = (((void *)0));
14499 curExternal = createdExternal;
14502 if(createdExternal->__anon1.function)
14503 ProcessFunction(createdExternal->__anon1.function);
14505 else if(declarator)
14507 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14508 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14510 curExternal = external;
14511 curContext = context;
14514 FreeClassFunction(members->__anon1.function);
14515 exp = QMkExpId(name);
14517 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14518 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14524 if(members->__anon1.dataMembers && classSym)
14526 struct MemberInit * member;
14527 struct Location oldyyloc = yylloc;
14529 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14531 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14532 if(member->initializer && !member->initializer->isConstant)
14533 inst->isConstant = 0;
14545 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
14547 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
14553 if(spec->__anon1.specifier == THISCLASS)
14558 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14559 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14560 ProcessSpecifier(spec, declareStruct, 0);
14567 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
14570 DeclareType(curExternal, symbol->type, 1, 1);
14571 else if(spec->__anon1.__anon1.symbol)
14573 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
14575 if(warnClasses && !c)
14576 Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
14577 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
14583 struct Enumerator * e;
14585 if(spec->__anon1.__anon2.list)
14587 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
14590 ProcessExpressionType(e->exp);
14599 if(spec->__anon1.__anon2.definitions)
14601 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
14603 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
14610 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
14615 if(decl->__anon1.identifier->classSym)
14617 FreeSpecifier(decl->__anon1.identifier->_class);
14618 decl->__anon1.identifier->_class = (((void *)0));
14622 if(decl->__anon1.array.exp)
14623 ProcessExpressionType(decl->__anon1.array.exp);
14631 struct Identifier * id = (((void *)0));
14632 struct Specifier * classSpec = (((void *)0));
14634 if(decl->type == 4)
14636 id = GetDeclId(decl);
14637 if(id && id->_class)
14639 classSpec = id->_class;
14640 id->_class = (((void *)0));
14643 if(decl->declarator)
14644 ProcessDeclarator(decl->declarator, isFunction);
14645 if(decl->type == 4)
14649 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
14651 if(!decl->__anon1.function.parameters)
14652 decl->__anon1.function.parameters = MkList();
14653 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
14655 if(decl->__anon1.function.parameters)
14657 struct TypeName * param;
14659 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
14661 if(param->qualifiers)
14663 struct Specifier * spec;
14665 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
14667 if(spec->type == 0)
14669 if(spec->__anon1.specifier == TYPED_OBJECT)
14671 struct Declarator * d = param->declarator;
14672 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);
14675 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
14676 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14677 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
14678 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
14679 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
14680 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
14684 else if(spec->__anon1.specifier == ANY_OBJECT)
14686 struct Declarator * d = param->declarator;
14688 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14689 param->qualifiers = MkListOne(MkSpecifier(VOID));
14691 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
14692 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
14695 else if(spec->__anon1.specifier == THISCLASS)
14700 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14701 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14702 ProcessSpecifier(spec, 0, 0);
14707 else if(spec->type == 1)
14709 ProcessSpecifier(spec, isFunction, 1);
14713 if(param->declarator)
14714 ProcessDeclarator(param->declarator, 0);
14723 static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
14725 yylloc = decl->loc;
14730 unsigned int declareStruct = 0;
14732 if(decl->__anon1.__anon1.declarators)
14734 struct InitDeclarator * d;
14736 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14738 struct Type * type, * subType;
14740 ProcessDeclarator(d->declarator, 0);
14741 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14744 ProcessInitializer(d->initializer, type);
14745 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
14747 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
14749 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
14751 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
14752 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
14753 if(decl->__anon1.__anon1.specifiers)
14754 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
14755 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
14758 decl->__anon1.inst = inst;
14762 for(subType = type; subType; )
14764 if(subType->kind == 8)
14769 else if(subType->kind == 13)
14771 else if(subType->kind == 12)
14772 subType = subType->__anon1.__anon4.arrayType;
14781 if(decl->__anon1.__anon1.specifiers)
14783 struct Specifier * s;
14785 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
14787 ProcessSpecifier(s, declareStruct, 1);
14794 ProcessInstantiationType(decl->__anon1.inst);
14799 struct Specifier * spec;
14800 struct Declarator * d;
14801 unsigned int declareStruct = 0;
14803 if(decl->__anon1.__anon1.declarators)
14805 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14807 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14808 struct Type * subType;
14810 ProcessDeclarator(d, 0);
14811 for(subType = type; subType; )
14813 if(subType->kind == 8)
14818 else if(subType->kind == 13)
14820 else if(subType->kind == 12)
14821 subType = subType->__anon1.__anon4.arrayType;
14828 if(decl->__anon1.__anon1.specifiers)
14830 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
14831 ProcessSpecifier(spec, declareStruct, warnClasses);
14838 static void ProcessStatement(struct Statement * stmt)
14840 yylloc = stmt->loc;
14844 ProcessStatement(stmt->__anon1.labeled.stmt);
14847 if(stmt->__anon1.caseStmt.exp)
14849 FreeType(stmt->__anon1.caseStmt.exp->destType);
14850 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
14852 curSwitchType->refCount++;
14853 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
14854 ComputeExpression(stmt->__anon1.caseStmt.exp);
14856 if(stmt->__anon1.caseStmt.stmt)
14857 ProcessStatement(stmt->__anon1.caseStmt.stmt);
14861 if(stmt->__anon1.compound.context)
14863 struct Declaration * decl;
14864 struct Statement * s;
14865 struct Statement * prevCompound = curCompound;
14866 struct Context * prevContext = curContext;
14868 if(!stmt->__anon1.compound.isSwitch)
14869 curCompound = stmt;
14870 curContext = stmt->__anon1.compound.context;
14871 if(stmt->__anon1.compound.declarations)
14873 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
14874 ProcessDeclaration(decl, 1);
14876 if(stmt->__anon1.compound.statements)
14878 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
14879 ProcessStatement(s);
14881 curContext = prevContext;
14882 curCompound = prevCompound;
14888 struct Expression * exp;
14890 if(stmt->__anon1.expressions)
14892 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14893 ProcessExpressionType(exp);
14899 struct Expression * exp;
14901 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
14902 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
14903 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
14904 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
14906 ProcessExpressionType(exp);
14908 if(stmt->__anon1.ifStmt.stmt)
14909 ProcessStatement(stmt->__anon1.ifStmt.stmt);
14910 if(stmt->__anon1.ifStmt.elseStmt)
14911 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
14916 struct Type * oldSwitchType = curSwitchType;
14918 if(stmt->__anon1.switchStmt.exp)
14920 struct Expression * exp;
14922 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
14926 ProcessExpressionType(exp);
14929 curSwitchType = exp->expType;
14932 ProcessStatement(stmt->__anon1.switchStmt.stmt);
14933 curSwitchType = oldSwitchType;
14938 if(stmt->__anon1.whileStmt.exp)
14940 struct Expression * exp;
14942 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
14943 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
14944 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
14945 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
14947 ProcessExpressionType(exp);
14950 if(stmt->__anon1.whileStmt.stmt)
14951 ProcessStatement(stmt->__anon1.whileStmt.stmt);
14956 if(stmt->__anon1.doWhile.exp)
14958 struct Expression * exp;
14960 if((*stmt->__anon1.doWhile.exp).last)
14962 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
14963 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
14964 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
14966 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
14968 ProcessExpressionType(exp);
14971 if(stmt->__anon1.doWhile.stmt)
14972 ProcessStatement(stmt->__anon1.doWhile.stmt);
14977 struct Expression * exp;
14979 if(stmt->__anon1.forStmt.init)
14980 ProcessStatement(stmt->__anon1.forStmt.init);
14981 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
14983 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
14984 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
14985 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
14987 if(stmt->__anon1.forStmt.check)
14988 ProcessStatement(stmt->__anon1.forStmt.check);
14989 if(stmt->__anon1.forStmt.increment)
14991 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
14992 ProcessExpressionType(exp);
14994 if(stmt->__anon1.forStmt.stmt)
14995 ProcessStatement(stmt->__anon1.forStmt.stmt);
15000 struct Identifier * id = stmt->__anon1.forEachStmt.id;
15001 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
15002 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
15003 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
15004 char iteratorType[1024];
15005 struct Type * source;
15006 struct Expression * e;
15007 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));
15008 struct Expression * arrayExp;
15009 const char * typeString = (((void *)0));
15010 int builtinCount = 0;
15012 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
15016 FreeType(e->destType);
15017 e->destType = ProcessTypeString("Container", 0);
15019 if(!isBuiltin || e->next)
15020 ProcessExpressionType(e);
15022 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
15023 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)))
15025 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
15026 struct Symbol * symbol;
15027 struct Expression * expIt = (((void *)0));
15028 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
15029 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
15030 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
15031 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
15036 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
15037 stmt->__anon1.compound.context->parent = curContext;
15038 curContext = stmt->__anon1.compound.context;
15040 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
15042 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
15044 isCustomAVLTree = 1;
15045 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
15048 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
15050 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
15052 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
15055 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
15057 if(inCompiler && isArray)
15059 struct Declarator * decl;
15060 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15062 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
15063 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15064 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
15068 struct Type * type = (((void *)0));
15069 char typeStringBuf[1024];
15071 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
15072 if(((struct Expression *)(*exp).last)->type == 11)
15074 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
15077 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
15079 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)
15081 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
15083 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
15085 else if(arrayExp->__anon1.list)
15087 struct Expression * e;
15089 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15091 ProcessExpressionType(e);
15101 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15105 e->expType = (((void *)0));
15106 e = (*arrayExp->__anon1.list).first;
15107 ProcessExpressionType(e);
15110 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15112 FreeType(e->expType);
15113 e->expType = (((void *)0));
15115 type = (((void *)0));
15123 FreeType(e->expType);
15124 e->expType = (((void *)0));
15130 typeStringBuf[0] = '\0';
15131 PrintType(type, typeStringBuf, 0, 1);
15132 typeString = typeStringBuf;
15140 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
15141 struct Declarator * decl;
15142 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15144 if(arrayExp->__anon1.list)
15146 struct Expression * e;
15148 builtinCount = (*arrayExp->__anon1.list).count;
15149 type = ProcessTypeString(typeString, 0);
15150 while((e = (*arrayExp->__anon1.list).first))
15152 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
15153 e->destType = type;
15155 ProcessExpressionType(e);
15157 ListAdd(initializers, MkInitializerAssignment(e));
15160 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
15162 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
15163 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
15164 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
15165 FreeList(exp, (void *)(FreeExpression));
15167 else if(arrayExp->__anon1.list)
15169 struct Expression * e;
15171 type = ProcessTypeString(typeString, 0);
15172 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15174 e->destType = type;
15176 ProcessExpressionType(e);
15183 arrayExp->expType = ProcessTypeString("Container", 0);
15184 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
15187 else if(inCompiler && isLinkList && !isList)
15189 struct Declarator * decl;
15190 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15192 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
15193 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15194 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
15196 else if(inCompiler && _class->templateArgs)
15199 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
15201 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
15202 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)))))))));
15206 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
15209 switch(block->type)
15212 if(block->__anon1.compound.context)
15213 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15216 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
15217 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15218 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
15219 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15222 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
15223 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15226 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
15227 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15230 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
15231 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15234 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
15235 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15238 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
15239 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15245 block = MkIfStmt(filter, block, (((void *)0)));
15249 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));
15250 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15251 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15252 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15258 sprintf(count, "%d", builtinCount);
15259 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));
15260 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15261 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15262 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15264 else if(isLinkList && !isList)
15266 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
15267 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
15269 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
15271 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));
15275 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15276 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
15278 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));
15280 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15281 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15282 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15286 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
15288 ProcessExpressionType(expIt);
15289 if((*stmt->__anon1.compound.declarations).first)
15290 ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
15292 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
15293 ProcessStatement(stmt);
15296 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
15298 curContext = stmt->__anon1.compound.context->parent;
15303 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
15315 struct Expression * exp;
15317 if(stmt->__anon1.expressions)
15319 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15323 if(curFunction && !curFunction->type)
15324 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
15325 FreeType(exp->destType);
15326 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
15328 exp->destType->refCount++;
15330 ProcessExpressionType(exp);
15337 ProcessDeclaration(stmt->__anon1.decl, 1);
15342 struct AsmField * field;
15344 if(stmt->__anon1.asmStmt.inputFields)
15346 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15347 if(field->expression)
15348 ProcessExpressionType(field->expression);
15350 if(stmt->__anon1.asmStmt.outputFields)
15352 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15353 if(field->expression)
15354 ProcessExpressionType(field->expression);
15356 if(stmt->__anon1.asmStmt.clobberedFields)
15358 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15360 if(field->expression)
15361 ProcessExpressionType(field->expression);
15368 struct PropertyWatch * propWatch;
15369 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15370 struct Expression * object = stmt->__anon1._watch.object;
15371 struct Expression * watcher = stmt->__anon1._watch.watcher;
15374 ProcessExpressionType(watcher);
15376 ProcessExpressionType(object);
15379 if(watcher || thisClass)
15381 struct External * external = curExternal;
15382 struct Context * context = curContext;
15385 stmt->__anon1.expressions = MkList();
15386 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15388 struct ClassFunction * func;
15389 char watcherName[1024];
15390 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;
15391 struct External * createdExternal;
15393 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15394 if(propWatch->deleteWatch)
15395 strcat(watcherName, "_delete");
15398 struct Identifier * propID;
15400 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15402 strcat(watcherName, "_");
15403 strcat(watcherName, propID->string);
15406 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15408 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)));
15409 ProcessClassFunctionBody(func, propWatch->compound);
15410 propWatch->compound = (((void *)0));
15411 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15412 FreeClassFunction(func);
15413 curExternal = createdExternal;
15414 ProcessFunction(createdExternal->__anon1.function);
15415 if(propWatch->deleteWatch)
15417 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15419 ListAdd(args, CopyExpression(object));
15420 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15421 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15422 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15426 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15427 struct Identifier * propID;
15429 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15431 char propName[1024];
15432 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15436 char getName[1024], setName[1024];
15437 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15439 DeclareProperty(createdExternal, prop, setName, getName);
15440 strcpy(propName, "__ecereProp_");
15441 FullClassNameCat(propName, prop->_class->fullName, 0);
15442 strcat(propName, "_");
15443 FullClassNameCat(propName, prop->name, 1);
15444 ListAdd(args, CopyExpression(object));
15445 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15446 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15447 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15448 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15449 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15452 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15457 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15459 curExternal = external;
15460 curContext = context;
15462 FreeExpression(watcher);
15464 FreeExpression(object);
15465 FreeList(watches, (void *)(FreePropertyWatch));
15468 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15472 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15474 ProcessStatement(propWatch->compound);
15481 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15482 struct Expression * object = stmt->__anon1._watch.object;
15483 struct __ecereNameSpace__ecere__com__Class * _class;
15486 ProcessExpressionType(object);
15489 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15492 struct Identifier * propID;
15495 stmt->__anon1.expressions = MkList();
15496 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15498 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15505 for(propID = (*watches).first; propID; propID = propID->next)
15507 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15511 CreateFireWatcher(prop, object, stmt);
15514 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15519 struct __ecereNameSpace__ecere__com__Property * prop;
15520 struct __ecereNameSpace__ecere__com__Class * base;
15522 for(base = _class; base; base = base->base)
15524 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15526 if(prop->isProperty && prop->isWatchable)
15528 CreateFireWatcher(prop, object, stmt);
15534 FreeExpression(object);
15535 FreeList(watches, (void *)(FreeIdentifier));
15538 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15544 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15545 struct Expression * object = stmt->__anon1._watch.object;
15546 struct Expression * watcher = stmt->__anon1._watch.watcher;
15547 struct __ecereNameSpace__ecere__com__Class * _class;
15550 ProcessExpressionType(object);
15552 ProcessExpressionType(watcher);
15555 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15556 if(watcher || thisClass)
15560 struct Identifier * propID;
15563 stmt->__anon1.expressions = MkList();
15566 struct __ecereNameSpace__ecere__sys__OldList * args;
15569 ListAdd(args, CopyExpression(object));
15570 ListAdd(args, MkExpConstant("0"));
15571 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15572 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15576 for(propID = (*watches).first; propID; propID = propID->next)
15578 char propName[1024];
15579 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15583 char getName[1024], setName[1024];
15584 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15586 DeclareProperty(curExternal, prop, setName, getName);
15587 strcpy(propName, "__ecereProp_");
15588 FullClassNameCat(propName, prop->_class->fullName, 0);
15589 strcat(propName, "_");
15590 FullClassNameCat(propName, prop->name, 1);
15591 ListAdd(args, CopyExpression(object));
15592 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15593 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15594 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15597 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15601 FreeExpression(object);
15603 FreeExpression(watcher);
15604 FreeList(watches, (void *)(FreeIdentifier));
15607 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15610 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15617 void ComputeDataTypes()
15619 struct External * external;
15621 currentClass = (((void *)0));
15622 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
15623 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
15624 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
15625 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
15626 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
15627 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
15628 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
15629 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
15630 DeclareFunctionUtil((((void *)0)), "eSystem_New");
15631 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
15632 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
15633 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
15634 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
15635 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
15636 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
15637 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
15638 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
15639 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
15640 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
15641 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
15642 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
15644 for(external = (*ast).first; external; external = external->next)
15646 afterExternal = curExternal = external;
15647 if(external->type == 0)
15651 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15652 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15654 currentClass = external->__anon1.function->_class;
15655 ProcessFunction(external->__anon1.function);
15657 else if(external->type == 1)
15659 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
15661 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15662 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15664 currentClass = (((void *)0));
15665 if(external->__anon1.declaration)
15666 ProcessDeclaration(external->__anon1.declaration, 1);
15668 else if(external->type == 2)
15670 struct ClassDefinition * _class = external->__anon1._class;
15672 currentClass = external->symbol->__anon1.registered;
15675 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15676 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15678 if(_class->definitions)
15680 ProcessClass(_class->definitions, _class->symbol);
15684 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
15685 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
15688 else if(external->type == 4)
15690 thisNameSpace = external->__anon1.id->string;
15693 currentClass = (((void *)0));
15694 thisNameSpace = (((void *)0));
15695 curExternal = (((void *)0));
15698 void ProcessExpressionType(struct Expression * exp)
15700 unsigned int unresolved = 0;
15701 struct Location oldyylloc = yylloc;
15702 unsigned int notByReference = 0;
15704 if(!exp || exp->expType)
15711 struct Identifier * id = exp->__anon1.__anon1.identifier;
15713 if(!id || !topContext)
15715 if(id->_class && id->_class->__anon1.__anon1.name)
15717 id->classSym = id->_class->__anon1.__anon1.symbol;
15719 if(!strcmp(id->string, "__runtimePlatform"))
15721 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15724 else if(strstr(id->string, "__ecereClass") == id->string)
15726 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15729 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15731 ReplaceClassMembers(exp, thisClass);
15734 ProcessExpressionType(exp);
15737 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15742 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15746 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15752 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15755 ProcessExpressionType(exp);
15759 else if(currentClass && !id->_class)
15761 if(ResolveIdWithClass(exp, currentClass, 1))
15764 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15769 struct Type * type = symbol->type;
15770 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15772 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15774 struct Context * context = SetupTemplatesContext(_class);
15776 type = ReplaceThisClassType(_class);
15777 FinishTemplatesContext(context);
15779 type->refCount = 0;
15781 FreeSpecifier(id->_class);
15782 id->_class = (((void *)0));
15783 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15784 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15785 id->classSym = (((void *)0));
15786 exp->expType = type;
15789 if(type && (type->kind == 15))
15790 exp->isConstant = 1;
15791 if(symbol->isParam || !strcmp(id->string, "this"))
15793 if(_class && _class->type == 1 && !type->declaredWithStruct)
15794 exp->byReference = 1;
15796 if(symbol->isIterator)
15798 if(symbol->isIterator == 3)
15801 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
15802 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
15803 exp->expType = (((void *)0));
15804 ProcessExpressionType(exp);
15806 else if(symbol->isIterator != 4)
15809 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
15810 exp->__anon1.member.exp->expType = exp->expType;
15811 exp->__anon1.member.member = MkIdentifier("data");
15812 exp->expType = (((void *)0));
15813 ProcessExpressionType(exp);
15820 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
15822 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15826 strcpy(name, thisNameSpace);
15827 strcat(name, "::");
15828 strcat(name, id->string);
15829 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
15832 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
15837 for(c = 0; c < definedExpStackPos; c++)
15838 if(definedExpStack[c] == definedExp)
15840 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
15842 struct Location backupYylloc = yylloc;
15843 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
15845 definedExpStack[definedExpStackPos++] = definedExp;
15846 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
15847 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
15848 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15850 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15851 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
15852 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
15853 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15855 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15856 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
15858 parsedExpression = (((void *)0));
15860 expression_yyparse();
15861 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
15863 fileInput = backInput;
15864 yylloc = backupYylloc;
15865 if(parsedExpression)
15867 FreeIdentifier(id);
15869 exp->__anon1.list = MkListOne(parsedExpression);
15870 ApplyLocation(parsedExpression, &yylloc);
15871 ProcessExpressionType(exp);
15872 definedExpStackPos--;
15875 definedExpStackPos--;
15881 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
15887 struct GlobalData * data = (((void *)0));
15889 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15893 strcpy(name, thisNameSpace);
15894 strcat(name, "::");
15895 strcat(name, id->string);
15896 data = FindGlobalData(name);
15899 data = FindGlobalData(id->string);
15902 DeclareGlobalData(curExternal, data);
15903 exp->expType = data->dataType;
15905 data->dataType->refCount++;
15906 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15907 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
15908 FreeSpecifier(id->_class);
15909 id->_class = (((void *)0));
15914 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
15916 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15920 strcpy(name, thisNameSpace);
15921 strcat(name, "::");
15922 strcat(name, id->string);
15923 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
15926 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
15931 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15932 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
15934 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
15935 strcpy(name, "__ecereFunction_");
15936 FullClassNameCat(name, id->string, 0);
15937 if(DeclareFunction(curExternal, function, name))
15939 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15940 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
15942 exp->expType = function->dataType;
15943 if(function->dataType)
15944 function->dataType->refCount++;
15945 FreeSpecifier(id->_class);
15946 id->_class = (((void *)0));
15958 if(!exp->__anon1.instance->_class)
15960 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
15962 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
15965 ProcessInstantiationType(exp->__anon1.instance);
15966 exp->isConstant = exp->__anon1.instance->isConstant;
15967 if(exp->__anon1.instance->_class)
15969 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
15977 char * constant = exp->__anon1.__anon1.constant;
15978 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
15980 exp->expType = type;
15981 if(constant[0] == '\'')
15983 if((int)((unsigned char *)constant)[1] > 127)
15986 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
15990 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
15991 exp->__anon1.__anon1.constant = PrintUInt(ch);
15993 type->__anon1._class = FindClass("unichar");
15994 type->isSigned = 0;
15999 type->isSigned = 1;
16004 char * dot = strchr(constant, '.');
16005 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
16010 exponent = strchr(constant, 'p');
16012 exponent = strchr(constant, 'P');
16016 exponent = strchr(constant, 'e');
16018 exponent = strchr(constant, 'E');
16020 if(dot || exponent)
16022 if(strchr(constant, 'f') || strchr(constant, 'F'))
16026 type->isSigned = 1;
16030 unsigned int isSigned = constant[0] == '-';
16031 char * endP = (((void *)0));
16032 long long i64 = strtoll(constant, &endP, 0);
16033 uint64 ui64 = strtoull(constant, &endP, 0);
16034 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16035 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16039 if(i64 < (((int)0x80000000)))
16044 if(ui64 > (((int)0x7fffffff)))
16046 if(ui64 > (0xffffffff))
16049 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
16053 else if(constant[0] != '0' || !constant[1])
16058 type->kind = is64Bit ? 4 : 3;
16059 type->isSigned = isSigned;
16062 exp->isConstant = 1;
16063 if(exp->destType && exp->destType->kind == 7)
16065 else if(exp->destType && exp->destType->kind == 6)
16067 else if(exp->destType && exp->destType->kind == 4)
16074 exp->isConstant = 1;
16075 exp->expType = __extension__ ({
16076 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16078 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
16079 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16081 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
16082 }), __ecereInstance2;
16088 ProcessExpressionType(exp->__anon1._new.size);
16089 exp->expType = __extension__ ({
16090 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16092 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
16094 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16098 ProcessExpressionType(exp->__anon1._renew.size);
16099 ProcessExpressionType(exp->__anon1._renew.exp);
16100 exp->expType = __extension__ ({
16101 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16103 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
16105 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16109 unsigned int assign = 0, boolResult = 0, boolOps = 0;
16110 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
16111 unsigned int useDestType = 0, useSideType = 0;
16112 struct Location oldyylloc = yylloc;
16113 unsigned int useSideUnit = 0;
16114 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
16115 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16117 switch(exp->__anon1.op.op)
16169 if(exp->__anon1.op.exp1)
16176 if(exp->__anon1.op.op == '&')
16178 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
16180 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
16181 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16183 if(symbol && symbol->isIterator == 2)
16186 exp->__anon1.member.exp = exp->__anon1.op.exp2;
16187 exp->__anon1.member.member = MkIdentifier("key");
16188 exp->expType = (((void *)0));
16189 exp->__anon1.op.exp2->expType = symbol->type;
16190 symbol->type->refCount++;
16191 ProcessExpressionType(exp);
16197 if(exp->__anon1.op.exp1)
16199 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
16201 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
16203 if(exp->__anon1.op.exp1->destType)
16204 FreeType(exp->__anon1.op.exp1->destType);
16205 exp->__anon1.op.exp1->destType = exp->destType;
16206 exp->__anon1.op.exp1->opDestType = 1;
16208 exp->destType->refCount++;
16212 if(exp->__anon1.op.exp1->destType)
16213 FreeType(exp->__anon1.op.exp1->destType);
16214 exp->__anon1.op.exp1->destType = dummy;
16217 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16218 exp->__anon1.op.exp1->destType->count++;
16219 ProcessExpressionType(exp->__anon1.op.exp1);
16220 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16221 exp->__anon1.op.exp1->destType->count--;
16222 exp->__anon1.op.exp1->opDestType = 0;
16223 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)
16225 exp->__anon1.op.exp2 = MkExpConstant("1");
16226 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
16229 if(exp->__anon1.op.exp1->destType == dummy)
16232 exp->__anon1.op.exp1->destType = (((void *)0));
16234 if(exp->__anon1.op.exp2)
16236 if(!assign && exp->__anon1.op.exp1->expType && (exp->__anon1.op.exp1->expType->kind == 1 || exp->__anon1.op.exp1->expType->kind == 2))
16238 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp1->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp1->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp1->expType->kind, type);
16240 FreeType(exp->__anon1.op.exp1->expType);
16241 exp->__anon1.op.exp1->expType = type;
16244 type1 = exp->__anon1.op.exp1->expType;
16246 if(exp->__anon1.op.exp2)
16248 char expString[10240];
16250 expString[0] = '\0';
16251 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
16253 if(exp->__anon1.op.exp1)
16255 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
16256 if(exp->__anon1.op.exp1->expType)
16257 exp->__anon1.op.exp1->expType->refCount++;
16261 exp->__anon1.op.exp2->destType = exp->destType;
16262 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
16263 exp->__anon1.op.exp2->opDestType = 1;
16265 exp->destType->refCount++;
16269 exp->expType = type1;
16274 PrintExpression(exp->__anon1.op.exp2, expString);
16275 if(type1 && type1->kind == 13)
16277 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)
16278 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
16279 else if(exp->__anon1.op.op == '=')
16281 if(exp->__anon1.op.exp2->destType)
16282 FreeType(exp->__anon1.op.exp2->destType);
16283 exp->__anon1.op.exp2->destType = type1;
16290 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)
16294 if(exp->__anon1.op.exp2->destType)
16295 FreeType(exp->__anon1.op.exp2->destType);
16296 exp->__anon1.op.exp2->destType = type1;
16303 exp->expType = type1;
16305 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
16307 if(exp->__anon1.op.exp2->destType)
16308 FreeType(exp->__anon1.op.exp2->destType);
16309 exp->__anon1.op.exp2->destType = exp->destType;
16310 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
16311 exp->__anon1.op.exp2->opDestType = 1;
16313 exp->destType->refCount++;
16317 if(exp->__anon1.op.exp2->destType)
16318 FreeType(exp->__anon1.op.exp2->destType);
16319 exp->__anon1.op.exp2->destType = dummy;
16322 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))
16324 FreeType(exp->__anon1.op.exp2->destType);
16325 exp->__anon1.op.exp2->destType = type1;
16328 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16329 exp->__anon1.op.exp2->destType->count++;
16330 if(exp->__anon1.op.op == SIZEOF)
16332 struct Expression * e = exp->__anon1.op.exp2;
16334 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
16336 if(e->type == 5 || e->type == 32 || e->type == 23)
16339 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
16341 e = (*e->__anon1.list).last;
16344 if(e->type == 11 && e->__anon1.cast.exp)
16345 e->__anon1.cast.exp->needCast = 1;
16347 ProcessExpressionType(exp->__anon1.op.exp2);
16348 exp->__anon1.op.exp2->opDestType = 0;
16349 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16350 exp->__anon1.op.exp2->destType->count--;
16351 if(!assign && (exp->__anon1.op.exp1 || exp->__anon1.op.op == '~'))
16353 if(exp->__anon1.op.exp2->expType && (exp->__anon1.op.exp2->expType->kind == 1 || exp->__anon1.op.exp2->expType->kind == 2))
16355 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->kind = 3, type->isSigned = 1, type->refCount = 1, type->signedBeforePromotion = exp->__anon1.op.exp2->expType->isSigned, type->bitMemberSize = exp->__anon1.op.exp2->expType->bitMemberSize, type->promotedFrom = exp->__anon1.op.exp2->expType->kind, type);
16357 FreeType(exp->__anon1.op.exp2->expType);
16358 exp->__anon1.op.exp2->expType = type;
16361 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
16363 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)
16365 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
16366 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16368 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)))
16370 if(exp->__anon1.op.op == ADD_ASSIGN)
16371 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16373 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))
16375 if(exp->__anon1.op.op == ADD_ASSIGN)
16376 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16378 else if(inCompiler)
16380 char type1String[1024];
16381 char type2String[1024];
16383 type1String[0] = '\0';
16384 type2String[0] = '\0';
16385 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
16386 PrintType(type1, type2String, 0, 1);
16387 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16388 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
16391 if(exp->__anon1.op.exp2->destType == dummy)
16394 exp->__anon1.op.exp2->destType = (((void *)0));
16396 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
16398 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16399 type2->refCount = 1;
16400 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
16401 type2->isSigned = 1;
16403 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))
16405 type2 = __extension__ ({
16406 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16408 __ecereInstance1->kind = 3, __ecereInstance1;
16410 type2->refCount = 1;
16411 type2->isSigned = 1;
16415 type2 = exp->__anon1.op.exp2->expType;
16421 if(exp->__anon1.op.op == SIZEOF)
16423 exp->expType = __extension__ ({
16424 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16426 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16428 exp->isConstant = 1;
16430 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
16432 exp->expType = Dereference(type2);
16433 if(type2 && type2->kind == 8)
16434 notByReference = 1;
16436 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
16437 exp->expType = Reference(type2);
16438 else if(exp->__anon1.op.op == LEFT_OP || exp->__anon1.op.op == RIGHT_OP)
16440 if(exp->__anon1.op.exp1->expType)
16442 exp->expType = exp->__anon1.op.exp1->expType;
16443 exp->expType->refCount++;
16450 if(exp->__anon1.op.exp1)
16452 if(exp->__anon1.op.exp1->destType)
16453 FreeType(exp->__anon1.op.exp1->destType);
16454 exp->__anon1.op.exp1->destType = MkClassType("bool");
16455 exp->__anon1.op.exp1->destType->truth = 1;
16456 if(!exp->__anon1.op.exp1->expType)
16457 ProcessExpressionType(exp->__anon1.op.exp1);
16459 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16460 FreeType(exp->__anon1.op.exp1->expType);
16461 exp->__anon1.op.exp1->expType = MkClassType("bool");
16462 exp->__anon1.op.exp1->expType->truth = 1;
16464 if(exp->__anon1.op.exp2)
16466 if(exp->__anon1.op.exp2->destType)
16467 FreeType(exp->__anon1.op.exp2->destType);
16468 exp->__anon1.op.exp2->destType = MkClassType("bool");
16469 exp->__anon1.op.exp2->destType->truth = 1;
16470 if(!exp->__anon1.op.exp2->expType)
16471 ProcessExpressionType(exp->__anon1.op.exp2);
16473 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16474 FreeType(exp->__anon1.op.exp2->expType);
16475 exp->__anon1.op.exp2->expType = MkClassType("bool");
16476 exp->__anon1.op.exp2->expType->truth = 1;
16479 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")))))
16481 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"))))
16483 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)))
16485 struct Type * intType;
16487 if(!type1->__anon1._class->__anon1.registered->dataType)
16488 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16489 if(!type2->__anon1._class->__anon1.registered->dataType)
16490 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16491 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
16492 if(exp->__anon1.op.exp1->destType)
16493 FreeType(exp->__anon1.op.exp1->destType);
16494 if(exp->__anon1.op.exp2->destType)
16495 FreeType(exp->__anon1.op.exp2->destType);
16496 exp->__anon1.op.exp1->destType = intType;
16497 exp->__anon1.op.exp2->destType = intType;
16498 intType->refCount++;
16502 if(exp->__anon1.op.exp2->destType)
16503 FreeType(exp->__anon1.op.exp2->destType);
16504 exp->__anon1.op.exp2->destType = type1;
16506 if(exp->__anon1.op.exp1->destType)
16507 FreeType(exp->__anon1.op.exp1->destType);
16508 exp->__anon1.op.exp1->destType = type2;
16511 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)
16512 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);
16513 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16515 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16519 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16521 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16522 ProcessExpressionType(exp->__anon1.op.exp1);
16523 if(type2->kind != 13)
16525 ProcessExpressionType(classExp);
16526 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16527 if(!exp->__anon1.op.exp2->expType)
16531 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16534 ProcessExpressionType(exp->__anon1.op.exp2);
16538 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)))
16540 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16541 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16542 exp->expType = type1;
16546 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)))
16548 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16549 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16550 exp->expType = type2;
16554 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))
16556 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16560 unsigned int success = 0;
16562 if(type1->kind == 13 && type2->kind == 13)
16564 if(exp->__anon1.op.op == '+')
16565 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16566 else if(exp->__anon1.op.op == '-')
16568 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16570 exp->expType = __extension__ ({
16571 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16573 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16576 if(type1->__anon1.type->kind == 20)
16578 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16582 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16584 ProcessExpressionType(classExp);
16586 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"))));
16587 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16595 if(!success && exp->__anon1.op.exp1->type == 2)
16597 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16600 FreeType(exp->expType);
16601 exp->expType = exp->__anon1.op.exp1->destType;
16602 if(exp->__anon1.op.exp1->destType)
16603 exp->__anon1.op.exp1->destType->refCount++;
16606 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16609 FreeType(exp->expType);
16610 exp->expType = exp->__anon1.op.exp2->destType;
16611 if(exp->__anon1.op.exp2->destType)
16612 exp->__anon1.op.exp2->destType->refCount++;
16618 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16621 FreeType(exp->expType);
16622 exp->expType = exp->__anon1.op.exp2->destType;
16623 if(exp->__anon1.op.exp2->destType)
16624 exp->__anon1.op.exp2->destType->refCount++;
16627 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16630 FreeType(exp->expType);
16631 exp->expType = exp->__anon1.op.exp1->destType;
16632 if(exp->__anon1.op.exp1->destType)
16633 exp->__anon1.op.exp1->destType->refCount++;
16639 char expString1[10240];
16640 char expString2[10240];
16644 expString1[0] = '\0';
16645 expString2[0] = '\0';
16650 PrintExpression(exp->__anon1.op.exp1, expString1);
16651 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16652 PrintExpression(exp->__anon1.op.exp2, expString2);
16653 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16654 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16655 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16657 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16661 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)
16663 if(exp->__anon1.op.exp1->destType)
16664 FreeType(exp->__anon1.op.exp1->destType);
16665 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16666 if(type2->__anon1._class->__anon1.registered->dataType)
16667 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16668 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16669 exp->expType = type2;
16673 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)
16675 if(exp->__anon1.op.exp2->destType)
16676 FreeType(exp->__anon1.op.exp2->destType);
16677 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16678 if(type1->__anon1._class->__anon1.registered->dataType)
16679 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16680 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16681 exp->expType = type1;
16687 unsigned int valid = 0;
16689 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
16691 if(exp->__anon1.op.exp2->destType)
16692 FreeType(exp->__anon1.op.exp2->destType);
16693 if(!type1->__anon1._class->__anon1.registered->dataType)
16694 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16695 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16696 exp->__anon1.op.exp2->destType->refCount++;
16697 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16700 type2 = exp->__anon1.op.exp2->destType;
16703 exp->expType = type2;
16706 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
16708 if(exp->__anon1.op.exp1->destType)
16709 FreeType(exp->__anon1.op.exp1->destType);
16710 if(!type2->__anon1._class->__anon1.registered->dataType)
16711 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16712 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16713 exp->__anon1.op.exp1->destType->refCount++;
16714 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16715 type1 = exp->__anon1.op.exp1->destType;
16716 exp->expType = type1;
16719 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16721 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
16722 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
16724 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16726 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16728 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16731 FreeType(exp->expType);
16732 exp->expType = exp->__anon1.op.exp2->expType;
16733 if(exp->__anon1.op.exp2->expType)
16734 exp->__anon1.op.exp2->expType->refCount++;
16738 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16740 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16743 FreeType(exp->expType);
16744 exp->expType = exp->__anon1.op.exp1->expType;
16745 if(exp->__anon1.op.exp1->expType)
16746 exp->__anon1.op.exp1->expType->refCount++;
16753 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16755 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16758 FreeType(exp->expType);
16759 exp->expType = exp->__anon1.op.exp1->expType;
16760 if(exp->__anon1.op.exp1->expType)
16761 exp->__anon1.op.exp1->expType->refCount++;
16765 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16767 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16770 FreeType(exp->expType);
16771 exp->expType = exp->__anon1.op.exp2->expType;
16772 if(exp->__anon1.op.exp2->expType)
16773 exp->__anon1.op.exp2->expType->refCount++;
16781 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))
16783 if(exp->__anon1.op.exp1->destType)
16784 FreeType(exp->__anon1.op.exp1->destType);
16785 exp->__anon1.op.exp1->destType = type2;
16787 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16790 FreeType(exp->expType);
16791 exp->expType = exp->__anon1.op.exp1->destType;
16792 if(exp->__anon1.op.exp1->destType)
16793 exp->__anon1.op.exp1->destType->refCount++;
16798 if(exp->__anon1.op.exp2->destType)
16799 FreeType(exp->__anon1.op.exp2->destType);
16800 exp->__anon1.op.exp2->destType = type1;
16802 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16805 FreeType(exp->expType);
16806 exp->expType = exp->__anon1.op.exp2->destType;
16807 if(exp->__anon1.op.exp2->destType)
16808 exp->__anon1.op.exp2->destType->refCount++;
16810 else if(type1 && type2)
16812 char expString1[10240];
16813 char expString2[10240];
16814 char type1String[1024];
16815 char type2String[1024];
16817 expString1[0] = '\0';
16818 expString2[0] = '\0';
16819 type1String[0] = '\0';
16820 type2String[0] = '\0';
16823 PrintExpression(exp->__anon1.op.exp1, expString1);
16824 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16825 PrintExpression(exp->__anon1.op.exp2, expString2);
16826 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16827 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
16828 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
16830 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
16831 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
16833 exp->expType = exp->__anon1.op.exp1->expType;
16834 if(exp->__anon1.op.exp1->expType)
16835 exp->__anon1.op.exp1->expType->refCount++;
16837 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16839 exp->expType = exp->__anon1.op.exp2->expType;
16840 if(exp->__anon1.op.exp2->expType)
16841 exp->__anon1.op.exp2->expType->refCount++;
16849 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16851 struct Type * oldType = exp->__anon1.op.exp1->expType;
16853 exp->__anon1.op.exp1->expType = (((void *)0));
16854 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16857 exp->__anon1.op.exp1->expType = oldType;
16859 if(exp->__anon1.op.exp1->destType)
16860 FreeType(exp->__anon1.op.exp1->destType);
16861 exp->__anon1.op.exp1->destType = type2;
16863 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16866 FreeType(exp->expType);
16867 exp->expType = exp->__anon1.op.exp1->destType;
16868 if(exp->__anon1.op.exp1->destType)
16869 exp->__anon1.op.exp1->destType->refCount++;
16873 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
16875 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16877 if(exp->__anon1.op.exp1->destType)
16878 FreeType(exp->__anon1.op.exp1->destType);
16879 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16880 if(type2->__anon1._class->__anon1.registered->dataType)
16881 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16882 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16884 if(exp->__anon1.op.op == '!')
16886 exp->expType = MkClassType("bool");
16887 exp->expType->truth = 1;
16891 exp->expType = type2;
16896 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
16898 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16900 if(exp->__anon1.op.exp2->destType)
16901 FreeType(exp->__anon1.op.exp2->destType);
16902 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16903 if(type1->__anon1._class->__anon1.registered->dataType)
16904 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16905 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16907 exp->expType = type1;
16913 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
16915 char expString[10000];
16917 expString[0] = '\0';
16920 PrintExpression(exp->__anon1.op.exp1, expString);
16921 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16924 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16926 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
16928 char expString[10240];
16930 expString[0] = '\0';
16933 PrintExpression(exp->__anon1.op.exp2, expString);
16934 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16937 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16941 FreeType(exp->expType);
16942 exp->expType = MkClassType("bool");
16943 exp->expType->truth = 1;
16945 if(exp->__anon1.op.op != SIZEOF)
16946 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
16947 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
16949 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
16951 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
16952 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
16953 yylloc = oldyylloc;
16962 struct Expression * e;
16964 exp->isConstant = 1;
16965 for(e = (*exp->__anon1.list).first; e; e = e->next)
16969 FreeType(e->destType);
16970 e->opDestType = exp->opDestType;
16971 e->destType = exp->destType;
16974 exp->destType->refCount++;
16977 ProcessExpressionType(e);
16978 if(!exp->expType && !e->next)
16980 exp->expType = e->expType;
16982 e->expType->refCount++;
16985 exp->isConstant = 0;
16987 e = (*exp->__anon1.list).first;
16988 if(!e->next && e->type == 8)
16990 struct Expression * next = exp->next, * prev = exp->prev;
16992 FreeType(exp->expType);
16993 FreeType(exp->destType);
16994 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16998 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
16999 ProcessExpressionType(exp);
17005 struct Expression * e;
17007 exp->isConstant = 1;
17008 ProcessExpressionType(exp->__anon1.index.exp);
17009 if(!exp->__anon1.index.exp->isConstant)
17010 exp->isConstant = 0;
17011 if(exp->__anon1.index.exp->expType)
17013 struct Type * source = exp->__anon1.index.exp->expType;
17015 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
17017 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
17018 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
17020 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
17022 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
17023 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
17025 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
17027 if(type->kind == 8)
17028 type->constant = 1;
17029 else if(type->kind == 13)
17031 struct Type * t = type;
17033 while(t->kind == 13)
17034 t = t->__anon1.type;
17037 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
17042 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
17044 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
17047 FreeType(e->destType);
17048 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
17050 ProcessExpressionType(e);
17055 exp->isConstant = 0;
17058 exp->expType = Dereference(exp->__anon1.index.exp->expType);
17060 DeclareType(curExternal, exp->expType, 1, 0);
17065 struct Expression * e;
17066 struct Type * functionType;
17067 struct Type * methodType = (((void *)0));
17073 PrintExpression(exp->__anon1.call.exp, name);
17074 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
17076 PrintExpression(exp->__anon1.call.exp, name);
17079 if(exp->__anon1.call.exp->type == 0)
17081 struct Expression * idExp = exp->__anon1.call.exp;
17082 struct Identifier * id = idExp->__anon1.__anon1.identifier;
17084 if(!strcmp(id->string, "__builtin_frame_address"))
17086 exp->expType = ProcessTypeString("void *", 1);
17087 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17088 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17091 else if(!strcmp(id->string, "__ENDIAN_PAD"))
17093 exp->expType = ProcessTypeString("int", 1);
17094 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17095 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17098 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
17100 struct Expression * a = (((void *)0));
17101 struct Expression * b = (((void *)0));
17102 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
17104 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
17106 a = (*exp->__anon1.call.arguments).first;
17107 b = (*exp->__anon1.call.arguments).last;
17111 else if((*exp->__anon1.call.arguments).count == 1)
17113 a = (*exp->__anon1.call.arguments).first;
17118 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
17119 idExp->__anon1.__anon1.identifier = (((void *)0));
17120 FreeExpContents(exp);
17121 ProcessExpressionType(a);
17123 ProcessExpressionType(b);
17125 exp->__anon1.list = MkList();
17126 if(a->expType && (!b || b->expType))
17128 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
17132 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17133 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
17134 struct Declaration * decl;
17135 char temp1[1024], temp2[1024];
17137 GetTypeSpecs(a->expType, specs);
17138 if(a && !a->isConstant && a->type != 0)
17140 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
17141 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
17142 tempExp1 = QMkExpId(temp1);
17143 tempExp1->expType = a->expType;
17145 a->expType->refCount++;
17146 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
17148 if(b && !b->isConstant && b->type != 0)
17150 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
17151 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
17152 tempExp2 = QMkExpId(temp2);
17153 tempExp2->expType = b->expType;
17155 b->expType->refCount++;
17156 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
17158 decl = MkDeclaration(specs, decls);
17159 if(!curCompound->__anon1.compound.declarations)
17160 curCompound->__anon1.compound.declarations = MkList();
17161 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
17165 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
17167 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
17169 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
17170 exp->expType = a->expType;
17172 a->expType->refCount++;
17174 else if(!strcmp(id->string, "Abs"))
17176 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
17177 exp->expType = a->expType;
17179 a->expType->refCount++;
17181 else if(!strcmp(id->string, "Sgn"))
17183 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"))))));
17184 exp->expType = ProcessTypeString("int", 0);
17186 FreeExpression(tempExp1);
17188 FreeExpression(tempExp2);
17189 FreeIdentifier(id);
17195 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
17197 if(!exp->__anon1.call.exp->destType)
17199 exp->__anon1.call.exp->destType = dummy;
17202 ProcessExpressionType(exp->__anon1.call.exp);
17203 if(exp->__anon1.call.exp->destType == dummy)
17206 exp->__anon1.call.exp->destType = (((void *)0));
17210 functionType = exp->__anon1.call.exp->expType;
17211 if(functionType && functionType->kind == 16)
17213 methodType = functionType;
17214 functionType = methodType->__anon1.__anon3.method->dataType;
17215 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
17217 char typeString[1024];
17219 typeString[0] = '\0';
17221 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
17223 functionType->__anon1.__anon2.thisClass = (((void *)0));
17224 PrintType(functionType, typeString, 1, 1);
17225 functionType->__anon1.__anon2.thisClass = back;
17227 if(strstr(typeString, "thisclass"))
17229 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17230 struct Declarator * decl;
17233 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17235 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17236 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))
17237 thisClassParams = 0;
17238 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17240 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
17242 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
17243 ProcessDeclarator(decl, 1);
17244 thisClass = backupThisClass;
17246 thisClassParams = 1;
17247 functionType = ProcessType(specs, decl);
17248 functionType->refCount = 0;
17249 FinishTemplatesContext(context);
17251 struct Type * p, * op;
17253 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)
17256 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17259 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
17261 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17264 FreeList(specs, (void *)(FreeSpecifier));
17265 FreeDeclarator(decl);
17269 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
17271 struct Type * type = functionType->__anon1.type;
17273 if(!functionType->refCount)
17275 functionType->__anon1.type = (((void *)0));
17276 FreeType(functionType);
17278 functionType = type;
17280 if(functionType && functionType->kind != 11)
17282 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
17284 else if(functionType)
17286 unsigned int emptyParams = 0, noParams = 0;
17287 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
17288 struct Type * type = functionType->__anon1.__anon2.params.first;
17289 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
17291 struct Location oldyylloc = yylloc;
17295 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
17297 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
17300 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
17302 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)
17304 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
17307 e->destType = type;
17309 type = functionType->__anon1.__anon2.params.first;
17312 type->refCount = 0;
17314 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
17316 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
17317 type->byReference = functionType->byReference;
17318 type->typedByReference = functionType->typedByReference;
17321 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
17323 e->destType = type;
17325 type = functionType->__anon1.__anon2.params.first;
17328 type->refCount = 0;
17331 if(type && type->kind == 0)
17334 if(!type->refCount)
17336 type = (((void *)0));
17338 for(; e; e = e->next)
17340 if(!type && !emptyParams)
17343 if(methodType && methodType->__anon1.__anon3.methodClass)
17344 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);
17346 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);
17349 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
17351 struct Type * templatedType = (((void *)0));
17352 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
17353 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17356 if(_class && _class->templateArgs)
17358 struct __ecereNameSpace__ecere__com__Class * sClass;
17360 for(sClass = _class; sClass; sClass = sClass->base)
17362 if(sClass->templateClass)
17363 sClass = sClass->templateClass;
17365 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17367 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
17369 struct __ecereNameSpace__ecere__com__Class * nextClass;
17371 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17373 if(nextClass->templateClass)
17374 nextClass = nextClass->templateClass;
17375 id += nextClass->templateParams.count;
17385 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
17387 unsigned int constant = type->constant;
17388 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
17391 struct Context * context = SetupTemplatesContext(_class);
17393 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17394 FinishTemplatesContext(context);
17396 if(templatedType->kind == 8 && constant)
17397 templatedType->constant = 1;
17398 else if(templatedType->kind == 13)
17400 struct Type * t = templatedType->__anon1.type;
17402 while(t->kind == 13)
17403 t = t->__anon1.type;
17405 t->constant = constant;
17407 e->destType = templatedType;
17410 templatedType->passAsTemplate = 1;
17415 e->destType = type;
17422 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
17424 e->destType = type->prev;
17425 e->destType->refCount++;
17429 e->destType = type;
17434 if(type && type->kind != 14)
17436 struct Type * next = type->next;
17438 if(!type->refCount)
17443 if(type && type->kind != 14)
17445 if(methodType && methodType->__anon1.__anon3.methodClass)
17446 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);
17448 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);
17450 yylloc = oldyylloc;
17451 if(type && !type->refCount)
17456 functionType = __extension__ ({
17457 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17459 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17461 if(exp->__anon1.call.exp->type == 0)
17463 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17467 struct Symbol * symbol;
17468 struct Location oldyylloc = yylloc;
17470 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17471 if(strstr(string, "__builtin_") == string)
17475 functionType->__anon1.__anon2.returnType = exp->destType;
17476 exp->destType->refCount++;
17480 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17481 symbol = __extension__ ({
17482 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17484 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17486 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17487 if(strstr(symbol->string, "::"))
17488 globalContext->hasNameSpace = 1;
17489 yylloc = oldyylloc;
17492 else if(exp->__anon1.call.exp->type == 8)
17496 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17497 if(!functionType->__anon1.__anon2.returnType)
17499 functionType->__anon1.__anon2.returnType = __extension__ ({
17500 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17502 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17506 if(functionType && functionType->kind == 11)
17508 exp->expType = functionType->__anon1.__anon2.returnType;
17509 if(functionType->__anon1.__anon2.returnType)
17510 functionType->__anon1.__anon2.returnType->refCount++;
17511 if(!functionType->refCount)
17512 FreeType(functionType);
17514 if(exp->__anon1.call.arguments)
17516 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17517 ProcessExpressionType(e);
17523 struct Type * type;
17524 struct Location oldyylloc = yylloc;
17525 unsigned int thisPtr;
17526 struct Expression * checkExp = exp->__anon1.member.exp;
17530 if(checkExp->type == 11)
17531 checkExp = checkExp->__anon1.cast.exp;
17532 else if(checkExp->type == 5)
17533 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17537 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17538 exp->thisPtr = thisPtr;
17539 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17541 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17543 ProcessExpressionType(exp->__anon1.member.exp);
17544 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)
17546 exp->isConstant = 0;
17549 exp->isConstant = exp->__anon1.member.exp->isConstant;
17550 type = exp->__anon1.member.exp->expType;
17552 if(type && (type->kind == 20))
17554 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17555 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17559 for(param = _class->templateParams.first; param; param = param->next)
17561 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17565 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17567 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17571 struct Expression * expMember = exp->__anon1.member.exp;
17572 struct Declarator * decl;
17573 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17574 char thisClassTypeString[1024];
17576 FreeIdentifier(exp->__anon1.member.member);
17577 ProcessExpressionType(argExp);
17579 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17583 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17584 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17587 strcpy(thisClassTypeString, _class->fullName);
17589 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17590 exp->expType = ProcessType(specs, decl);
17591 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17593 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17594 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17595 int paramCount = 0;
17596 int lastParam = -1;
17597 char templateString[1024];
17598 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17600 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17601 for(cClass = expClass; cClass; cClass = cClass->base)
17605 for(param = cClass->templateParams.first; param; param = param->next)
17608 struct __ecereNameSpace__ecere__com__Class * sClass;
17609 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17611 for(sClass = cClass->base; sClass; sClass = sClass->base)
17612 id += sClass->templateParams.count;
17613 arg = expClass->templateArgs[id];
17614 for(sClass = _class; sClass; sClass = sClass->base)
17616 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17618 struct __ecereNameSpace__ecere__com__Class * nextClass;
17620 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17621 p += nextClass->templateParams.count;
17622 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17624 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17626 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17628 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17629 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17636 char argument[256];
17638 argument[0] = '\0';
17639 switch(param->type)
17643 char expString[1024];
17644 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17645 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17646 struct Expression * exp;
17647 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17649 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17650 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17651 ProcessExpressionType(exp);
17652 ComputeExpression(exp);
17653 expString[0] = '\0';
17654 PrintExpression(exp, expString);
17655 strcat(argument, expString);
17656 FreeExpression(exp);
17661 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17666 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17668 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17669 strcat(argument, thisClassTypeString);
17671 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17679 strcat(templateString, ", ");
17680 if(lastParam != p - 1)
17682 strcat(templateString, param->name);
17683 strcat(templateString, " = ");
17685 strcat(templateString, argument);
17694 int len = strlen(templateString);
17696 if(templateString[len - 1] == '>')
17697 templateString[len++] = ' ';
17698 templateString[len++] = '>';
17699 templateString[len++] = '\0';
17702 struct Context * context = SetupTemplatesContext(_class);
17704 FreeType(exp->expType);
17705 exp->expType = ProcessTypeString(templateString, 0);
17706 FinishTemplatesContext(context);
17709 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17710 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17712 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")))))))));
17715 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17717 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17720 if(type && (type->kind == 20))
17722 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)))
17724 struct Identifier * id = exp->__anon1.member.member;
17725 int typeKind = type->kind;
17726 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));
17728 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
17730 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
17735 if(typeKind == 3 || typeKind == 15)
17736 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
17739 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17741 _class = type->__anon1._class->__anon1.registered;
17743 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
17745 _class = FindClass("char *")->__anon1.registered;
17747 else if(type->kind == 13)
17749 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
17750 FreeType(exp->expType);
17751 exp->expType = ProcessTypeString("uintptr", 0);
17752 exp->byReference = 1;
17756 char string[1024] = "";
17757 struct Symbol * classSym;
17759 PrintTypeNoConst(type, string, 0, 1);
17760 classSym = FindClass(string);
17762 _class = classSym->__anon1.registered;
17768 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
17769 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
17770 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
17771 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
17772 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
17774 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
17775 exp->__anon1.member.memberType = 1;
17776 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
17777 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
17780 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
17782 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17783 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
17785 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17787 member = (((void *)0));
17789 if(!member && !prop)
17790 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17791 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
17792 exp->__anon1.member.thisPtr = 1;
17796 unsigned int useMemberForNonConst = 0;
17800 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
17801 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);
17802 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17803 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
17805 if((!prop || useMemberForNonConst) && !member)
17807 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
17810 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17811 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);
17812 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17813 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17818 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
17819 prop = (((void *)0));
17821 member = (((void *)0));
17825 if(!prop && !member && !method)
17826 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
17827 if(!prop && !member && !method)
17831 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
17834 exp->__anon1.member.memberType = 5;
17835 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
17839 char structName[1024];
17840 struct Identifier * id = exp->__anon1.member.member;
17841 struct Expression * classExp = exp->__anon1.member.exp;
17844 FreeType(classExp->expType);
17845 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
17846 strcpy(structName, "__ecereClassData_");
17847 FullClassNameCat(structName, type->__anon1._class->string, 0);
17849 exp->__anon1.member.member = id;
17850 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"))))))));
17852 ProcessExpressionType(exp);
17858 struct Symbol * classSym = FindClass(id->string);
17862 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
17865 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
17869 if(exp->__anon1.member.exp->destType)
17870 FreeType(exp->__anon1.member.exp->destType);
17872 if(method && !method->_class->symbol)
17873 method->_class->symbol = FindClass(method->_class->fullName);
17874 if(prop && !prop->_class->symbol)
17875 prop->_class->symbol = FindClass(prop->_class->fullName);
17876 exp->__anon1.member.exp->destType = __extension__ ({
17877 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17879 __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;
17884 exp->__anon1.member.memberType = 1;
17885 if(!prop->dataType)
17886 ProcessPropertyType(prop);
17887 exp->expType = prop->dataType;
17888 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
17890 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17892 CopyTypeInto(type, exp->expType);
17893 type->refCount = 1;
17894 type->constant = 1;
17895 exp->expType = type;
17897 else if(prop->dataType)
17898 prop->dataType->refCount++;
17902 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17904 FreeExpContents(exp);
17906 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17907 ProcessExpressionType(exp);
17910 exp->__anon1.member.memberType = 3;
17911 DeclareStruct(curExternal, _class->fullName, 0, 1);
17912 if(member->_class != _class)
17913 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
17914 if(!member->dataType)
17916 struct Context * context = SetupTemplatesContext(_class);
17918 member->dataType = ProcessTypeString(member->dataTypeString, 0);
17919 FinishTemplatesContext(context);
17921 if(exp->__anon1.member.exp->expType->kind == 8 && exp->__anon1.member.exp->expType->__anon1._class && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered && exp->__anon1.member.exp->expType->__anon1._class->__anon1.registered->type == 2)
17922 member->dataType->bitMemberSize = ((struct __ecereNameSpace__ecere__com__BitMember *)member)->size;
17923 exp->expType = member->dataType;
17924 if(member->dataType)
17925 member->dataType->refCount++;
17927 else if(revConvert)
17929 exp->__anon1.member.memberType = 4;
17930 exp->expType = MkClassType(revConvert->_class->fullName);
17935 exp->__anon1.member.memberType = 2;
17937 if(!method->dataType)
17938 ProcessMethodType(method);
17939 exp->expType = __extension__ ({
17940 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17942 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
17944 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
17945 exp->expType->__anon1.__anon3.usedClass = _class;
17947 else if(!classProp)
17949 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17951 FreeExpContents(exp);
17953 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17954 FreeType(exp->expType);
17955 exp->expType = MkClassType("ecere::com::Class");
17958 yylloc = exp->__anon1.member.member->loc;
17959 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
17961 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
17963 if(_class && exp->expType)
17965 struct __ecereNameSpace__ecere__com__Class * tClass;
17967 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
17968 while(tClass && !tClass->templateClass)
17969 tClass = tClass->base;
17970 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
17973 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17974 struct __ecereNameSpace__ecere__com__Class * sClass;
17976 for(sClass = tClass; sClass; sClass = sClass->base)
17979 if(sClass->templateClass)
17980 sClass = sClass->templateClass;
17981 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17983 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
17985 for(sClass = sClass->base; sClass; sClass = sClass->base)
17986 id += sClass->templateParams.count;
17994 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
17996 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
17997 struct Context * context = SetupTemplatesContext(tClass);
17998 unsigned int constant = exp->expType->constant;
17999 unsigned int passAsTemplate = 0;
18000 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
18001 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
18003 if(t && t->kind == 8 && t->__anon1._class)
18004 thisClassFrom = t->__anon1._class->__anon1.registered;
18006 thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
18008 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
18009 FreeType(exp->expType);
18010 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18011 exp->expType->thisClassFrom = thisClassFrom;
18012 if(exp->expType->kind == 8 && constant)
18013 exp->expType->constant = 1;
18014 else if(exp->expType->kind == 13)
18016 struct Type * t = exp->expType->__anon1.type;
18018 while(t->kind == 13)
18019 t = t->__anon1.type;
18021 t->constant = constant;
18025 if(exp->expType->kind == 21)
18027 FreeType(exp->expType);
18028 exp->expType = ReplaceThisClassType(_class);
18031 exp->expType->passAsTemplate = 1;
18034 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18035 if(exp->destType->kind == 8 && constant)
18036 exp->destType->constant = 1;
18037 else if(exp->destType->kind == 13)
18039 struct Type * t = exp->destType->__anon1.type;
18041 while(t->kind == 13)
18042 t = t->__anon1.type;
18044 t->constant = constant;
18046 if(exp->destType->kind == 21)
18048 FreeType(exp->destType);
18049 exp->destType = ReplaceThisClassType(_class);
18053 FinishTemplatesContext(context);
18056 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)
18059 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18060 struct __ecereNameSpace__ecere__com__Class * sClass;
18062 for(sClass = tClass; sClass; sClass = sClass->base)
18065 if(sClass->templateClass)
18066 sClass = sClass->templateClass;
18067 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18069 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
18071 for(sClass = sClass->base; sClass; sClass = sClass->base)
18072 id += sClass->templateParams.count;
18082 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18083 struct Context * context = SetupTemplatesContext(tClass);
18084 struct Type * basicType;
18086 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18089 if(basicType->kind == 21)
18091 FreeType(basicType);
18092 basicType = ReplaceThisClassType(_class);
18094 FreeType(exp->expType);
18095 exp->expType = __extension__ ({
18096 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18098 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
18102 exp->destType = exp->expType;
18103 exp->destType->refCount++;
18106 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18107 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18108 struct Declarator * decl;
18110 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18113 exp->destType->refCount++;
18115 exp->expType->refCount++;
18117 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
18118 exp->__anon1.cast.exp = newExp;
18121 FinishTemplatesContext(context);
18124 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
18126 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
18130 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
18132 int paramCount = 0;
18133 int lastParam = -1;
18134 char templateString[1024];
18135 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
18137 sprintf(templateString, "%s<", expClass->templateClass->fullName);
18138 while(cClass != expClass)
18140 struct __ecereNameSpace__ecere__com__Class * sClass;
18142 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
18145 for(param = cClass->templateParams.first; param; param = param->next)
18147 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
18149 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
18150 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
18152 while(cClassCur != tClass && !paramCur)
18154 struct __ecereNameSpace__ecere__com__Class * sClassCur;
18156 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
18158 cClassCur = sClassCur;
18159 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
18161 if(!strcmp(paramCur->name, param->name))
18168 if(paramCur && paramCur->type == 0)
18169 arg = tClass->templateArgs[cp];
18171 arg = expClass->templateArgs[p];
18173 char argument[256];
18175 argument[0] = '\0';
18176 switch(param->type)
18180 char expString[1024];
18181 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18182 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
18183 struct Expression * exp;
18184 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
18186 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
18187 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
18188 ProcessExpressionType(exp);
18189 ComputeExpression(exp);
18190 expString[0] = '\0';
18191 PrintExpression(exp, expString);
18192 strcat(argument, expString);
18193 FreeExpression(exp);
18198 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
18203 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
18204 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18211 strcat(templateString, ", ");
18212 if(lastParam != p - 1)
18214 strcat(templateString, param->name);
18215 strcat(templateString, " = ");
18217 strcat(templateString, argument);
18226 int len = strlen(templateString);
18228 if(templateString[len - 1] == '>')
18229 templateString[len++] = ' ';
18230 templateString[len++] = '>';
18231 templateString[len++] = '\0';
18233 FreeType(exp->expType);
18235 struct Context * context = SetupTemplatesContext(tClass);
18237 exp->expType = ProcessTypeString(templateString, 0);
18238 FinishTemplatesContext(context);
18245 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)");
18247 else if(type && (type->kind == 9 || type->kind == 10))
18249 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
18253 exp->expType = memberType;
18255 memberType->refCount++;
18260 char expString[10240];
18262 expString[0] = '\0';
18265 PrintExpression(exp, expString);
18266 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18268 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
18270 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
18272 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
18274 struct Identifier * id = exp->__anon1.member.member;
18275 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));
18279 FreeType(exp->expType);
18280 exp->expType = ReplaceThisClassType(_class);
18284 yylloc = oldyylloc;
18289 struct Type * destType = exp->destType;
18291 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
18293 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
18295 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
18299 ProcessExpressionType(exp);
18306 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
18308 if(classSym && classSym->__anon1.registered)
18310 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
18313 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
18316 DeclareStruct(curExternal, classSym->string, 0, 1);
18317 FreeSpecifier(exp->__anon1._class);
18318 FullClassNameCat(name, classSym->string, 0);
18322 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
18326 struct Expression * e;
18329 if(b->structSize == b->offset)
18330 exp->__anon1.op.exp1 = MkExpConstant("0");
18332 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18333 exp->__anon1.op.op = '+';
18335 while(b->offset != 0)
18337 struct Symbol * sym;
18338 struct Expression * typeSize;
18341 sym = FindClass(b->fullName);
18343 DeclareStruct(curExternal, sym->string, 0, 1);
18344 FullClassNameCat(name, sym->string, 0);
18345 if(b->structSize == b->offset)
18346 typeSize = MkExpConstant("0");
18348 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18349 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
18350 e = e->__anon1.op.exp2;
18356 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
18358 FreeSpecifier(exp->__anon1._class);
18359 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
18364 char className[1024];
18366 strcpy(className, "__ecereClass_");
18367 FullClassNameCat(className, classSym->string, 1);
18368 DeclareClass(curExternal, classSym, className);
18369 FreeExpContents(exp);
18371 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
18372 exp->__anon1.member.member = MkIdentifier("structSize");
18376 exp->expType = __extension__ ({
18377 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18379 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18385 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
18387 exp->expType = __extension__ ({
18388 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18390 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18392 exp->isConstant = 1;
18393 DeclareType(curExternal, type, 1, 0);
18399 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
18402 FreeType(exp->__anon1.cast.exp->destType);
18403 exp->__anon1.cast.exp->destType = type;
18406 ProcessExpressionType(exp->__anon1.cast.exp);
18409 exp->expType = type;
18410 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
18412 void * prev = exp->prev, * next = exp->next;
18413 struct Type * expType = exp->__anon1.cast.exp->destType;
18414 struct Expression * castExp = exp->__anon1.cast.exp;
18415 struct Type * destType = exp->destType;
18418 expType->refCount++;
18419 FreeType(exp->expType);
18420 FreeTypeName(exp->__anon1.cast.typeName);
18422 FreeType(exp->expType);
18423 FreeType(exp->destType);
18424 exp->expType = expType;
18425 exp->destType = destType;
18426 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
18432 exp->isConstant = exp->__anon1.cast.exp->isConstant;
18438 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
18440 exp->expType = type;
18445 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
18447 ProcessExpressionType(exp->__anon1.vaArg.exp);
18448 exp->expType = type;
18453 struct Expression * e;
18454 struct Type * t = exp->destType;
18456 if(t && !exp->destType->casted)
18458 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18459 CopyTypeInto(t, exp->destType);
18464 exp->isConstant = 1;
18465 FreeType(exp->__anon1.cond.cond->destType);
18466 exp->__anon1.cond.cond->destType = MkClassType("bool");
18467 exp->__anon1.cond.cond->destType->truth = 1;
18468 ProcessExpressionType(exp->__anon1.cond.cond);
18469 if(!exp->__anon1.cond.cond->isConstant)
18470 exp->isConstant = 0;
18471 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18475 FreeType(e->destType);
18478 e->destType->refCount++;
18480 ProcessExpressionType(e);
18483 exp->expType = e->expType;
18485 e->expType->refCount++;
18488 exp->isConstant = 0;
18490 FreeType(exp->__anon1.cond.elseExp->destType);
18491 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18492 if(exp->__anon1.cond.elseExp->destType)
18493 exp->__anon1.cond.elseExp->destType->refCount++;
18494 ProcessExpressionType(exp->__anon1.cond.elseExp);
18495 if(!exp->__anon1.cond.elseExp->isConstant)
18496 exp->isConstant = 0;
18502 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18504 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18506 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18508 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18510 exp->destType->refCount++;
18512 ProcessStatement(exp->__anon1.compound);
18513 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18515 exp->expType->refCount++;
18521 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18523 if(spec && spec->type == 1)
18525 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18526 exp->expType->kind = 19;
18527 exp->byReference = 1;
18531 exp->expType = MkClassType("ecere::com::Class");
18532 exp->byReference = 1;
18538 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18542 struct Identifier * id = exp->__anon1.classData.id;
18543 char structName[1024];
18544 struct Expression * classExp;
18546 strcpy(structName, "__ecereClassData_");
18547 FullClassNameCat(structName, _class->fullName, 0);
18549 exp->__anon1.member.member = id;
18550 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18551 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18553 classExp = MkExpIdentifier(MkIdentifier("class"));
18554 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"))))))));
18555 ProcessExpressionType(exp);
18562 struct Type * type = (((void *)0));
18563 const char * typeString = (((void *)0));
18564 char typeStringBuf[1024];
18566 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))
18568 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18570 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18572 else if(exp->__anon1.list)
18574 struct Expression * e;
18576 for(e = (*exp->__anon1.list).first; e; e = e->next)
18578 ProcessExpressionType(e);
18588 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18592 e->expType = (((void *)0));
18593 e = (*exp->__anon1.list).first;
18594 ProcessExpressionType(e);
18597 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18599 FreeType(e->expType);
18600 e->expType = (((void *)0));
18602 type = (((void *)0));
18610 FreeType(e->expType);
18611 e->expType = (((void *)0));
18617 typeStringBuf[0] = '\0';
18618 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18619 typeString = typeStringBuf;
18621 type = (((void *)0));
18626 char templateString[1024];
18627 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18628 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18629 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18630 struct Expression * expExt;
18631 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18633 sprintf(templateString, "Container<%s>", typeString);
18634 if(exp->__anon1.list)
18636 struct Expression * e;
18638 type = ProcessTypeString(typeString, 0);
18639 while((e = (*exp->__anon1.list).first))
18641 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18642 e->destType = type;
18644 ProcessExpressionType(e);
18645 ListAdd(initializers, MkInitializerAssignment(e));
18648 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18650 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18651 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18652 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18653 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18654 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18655 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18656 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18657 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18658 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18659 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18660 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18662 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18664 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18665 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18666 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18667 exp->expType = ProcessTypeString(templateString, 0);
18669 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18670 ProcessExpressionType(expExt);
18674 exp->expType = ProcessTypeString("Container", 0);
18675 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18680 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18682 FreeType(exp->expType);
18683 exp->expType = ReplaceThisClassType(thisClass);
18685 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)
18687 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18691 if(exp->expType->kind != 15)
18693 struct Type * member;
18694 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18696 FreeType(exp->expType);
18697 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18698 exp->expType->kind = symbol->type->kind;
18699 exp->expType->refCount++;
18700 exp->expType->__anon1.__anon1.enumName = enumName;
18701 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18702 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18703 member->refCount++;
18707 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18709 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18711 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);
18713 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18718 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)))
18720 exp->byReference = 1;
18723 if(exp->destType && (exp->destType->kind == 18))
18725 else if(exp->destType && !exp->destType->keepCast)
18727 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
18728 exp->needTemplateCast = 1;
18729 if(exp->destType->kind == 0)
18731 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
18733 unsigned int invalidCast = 0;
18735 if(inCompiler && exp->destType->count && exp->expType)
18737 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
18738 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
18740 if(c1 && c1->type != 1)
18741 c1 = (((void *)0));
18742 if(c2 && c2->type != 1)
18743 c2 = (((void *)0));
18744 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
18747 if(!exp->destType->count || unresolved || invalidCast)
18752 if(exp->destType->kind != 14)
18759 char expString[10240];
18761 expString[0] = '\0';
18762 PrintType(exp->destType, type2, 0, 1);
18765 PrintExpression(exp, expString);
18766 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18769 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
18770 else if(exp->type != 16)
18771 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
18776 char expString[10240];
18778 expString[0] = '\0';
18781 PrintExpression(exp, expString);
18782 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18785 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
18786 else if(exp->type != 16)
18787 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18799 PrintType(exp->expType, type1, 0, 1);
18800 PrintType(exp->destType, type2, 0, 1);
18802 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)))
18806 struct Expression * nbExp = GetNonBracketsExp(exp);
18807 unsigned int skipWarning = 0;
18808 int kind = exp->destType->kind;
18810 if(nbExp->type == 12 && !nbExp->destType->casted && nbExp->destType->kind == exp->destType->kind)
18812 if((kind == 1 || kind == 2) && exp->destType->isSigned == exp->expType->signedBeforePromotion && nbExp->type == 4 && nbExp->__anon1.op.exp1 && nbExp->__anon1.op.exp2)
18814 int op = nbExp->__anon1.op.op;
18815 struct Expression * nbExp1, * nbExp2;
18822 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18823 from = nbExp1->expType->promotedFrom;
18824 if(from == 1 || (kind == 2 && from == 2))
18829 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18830 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18831 from = nbExp1->expType->promotedFrom;
18832 if(op == RIGHT_OP && (from == 1 || (kind == 2 && from == 2)))
18834 else if(nbExp2->isConstant && nbExp2->type == 2 && (nbExp->__anon1.op.op == RIGHT_OP || nbExp1->expType->bitMemberSize))
18836 int n = strtol(nbExp2->__anon1.__anon1.constant, (((void *)0)), 0);
18837 int s = from == 1 ? 8 : 16;
18839 if(nbExp1->expType->bitMemberSize && nbExp1->expType->bitMemberSize < s)
18840 s = nbExp1->expType->bitMemberSize;
18841 if(nbExp->__anon1.op.op == RIGHT_OP)
18845 if(s <= (kind == 1 ? 8 : 16))
18850 if(!exp->destType->isSigned)
18852 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18853 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18854 from = nbExp2->expType->promotedFrom;
18855 if((from == 1 || from == 2) && nbExp1->isConstant && nbExp1->type == 2)
18857 int n = strtol(nbExp1->__anon1.__anon1.constant, (((void *)0)), 0);
18859 if(n == (from == 1 ? 255 : 65535))
18868 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18869 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18870 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
18871 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
18872 if(((kind1 == 1 || (kind1 == 2 && kind == 2)) || MatchTypeExpression(nbExp1, exp->destType, (((void *)0)), 0, 0)) && ((kind2 == 1 || (kind2 == 2 && kind == 2)) || MatchTypeExpression(nbExp2, exp->destType, (((void *)0)), 0, 0)))
18880 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18881 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18882 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
18883 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
18884 if(((kind1 == 1 || (kind1 == 2 && kind == 2)) || MatchTypeExpression(nbExp1, exp->destType, (((void *)0)), 0, 0)) || ((kind2 == 1 || (kind2 == 2 && kind == 2)) || MatchTypeExpression(nbExp2, exp->destType, (((void *)0)), 0, 0)))
18892 char expString[10240];
18894 expString[0] = '\0';
18897 PrintExpression(exp, expString);
18898 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18900 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")))
18903 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18905 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18910 FreeType(exp->expType);
18911 exp->destType->refCount++;
18912 exp->expType = exp->destType;
18918 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))
18920 struct Expression * nbExp = GetNonBracketsExp(exp);
18922 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
18924 struct Expression * e = MoveExpContents(exp);
18926 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
18928 exp->__anon1.cast.exp->destType = exp->destType;
18930 exp->destType->refCount++;
18931 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
18935 else if(unresolved)
18937 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
18938 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);
18939 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
18940 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
18942 else if(!exp->expType && exp->type != 16)
18944 char expString[10240];
18946 expString[0] = '\0';
18949 PrintExpression(exp, expString);
18950 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18952 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18955 ApplyAnyObjectLogic(exp);
18956 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)))
18958 exp->byReference = 1;
18960 yylloc = oldyylloc;
18963 static void ProcessFunction(struct FunctionDefinition * function)
18965 struct Identifier * id = GetDeclId(function->declarator);
18966 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18967 struct Type * type = symbol ? symbol->type : (((void *)0));
18968 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18969 struct Context * oldTopContext = topContext;
18971 yylloc = function->loc;
18972 if(type && type->__anon1.__anon2.thisClass)
18974 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18975 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18976 char className[1024];
18977 char structName[1024];
18978 struct Declarator * funcDecl;
18979 struct Symbol * thisSymbol;
18980 unsigned int typedObject = 0;
18982 if(_class && !_class->base)
18984 _class = currentClass;
18985 if(_class && !_class->symbol)
18986 _class->symbol = FindClass(_class->fullName);
18987 classSym = _class ? _class->symbol : (((void *)0));
18990 thisClass = _class;
18991 if(inCompiler && _class)
18993 if(type->kind == 11)
18995 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18997 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18999 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
19002 if(type->classObjectType != 1)
19004 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
19005 symbol->type->__anon1.__anon2.staticMethod = 1;
19006 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
19007 symbol->type->extraParam = 0;
19010 strcpy(className, "__ecereClass_");
19011 FullClassNameCat(className, _class->fullName, 1);
19013 FullClassNameCat(structName, _class->fullName, 0);
19014 funcDecl = GetFuncDecl(function->declarator);
19017 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19019 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19021 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19023 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19024 FreeTypeName(param);
19027 if(!function->propertyNoThis)
19029 struct TypeName * thisParam = (((void *)0));
19031 if(type->classObjectType != 1)
19033 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19034 if(!funcDecl->__anon1.function.parameters)
19035 funcDecl->__anon1.function.parameters = MkList();
19036 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19040 if(type->classObjectType != 1)
19042 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
19043 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
19045 thisParam = __extension__ ({
19046 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
19048 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
19050 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
19051 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19055 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19057 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19059 funcDecl = GetFuncDecl(initDecl->declarator);
19062 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19064 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19066 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19068 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19069 FreeTypeName(param);
19072 if(type->classObjectType != 1)
19074 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
19076 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19078 if(!funcDecl->__anon1.function.parameters)
19079 funcDecl->__anon1.function.parameters = MkList();
19080 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19088 if(type->classObjectType != 1)
19090 thisSymbol = __extension__ ({
19091 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
19093 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
19095 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19096 if(typedObject && thisSymbol->type)
19098 thisSymbol->type->classObjectType = 2;
19099 thisSymbol->type->byReference = type->byReference;
19100 thisSymbol->type->typedByReference = type->byReference;
19104 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
19106 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
19109 struct __ecereNameSpace__ecere__com__Class * base;
19111 for(base = _class; base && base->type != 1000; base = base->next)
19113 for(member = base->membersAndProperties.first; member; member = member->next)
19114 if(!member->isProperty)
19120 for(member = _class->membersAndProperties.first; member; member = member->next)
19121 if(!member->isProperty)
19125 char pointerName[1024];
19126 struct Declaration * decl;
19127 struct Initializer * initializer;
19128 struct Expression * exp, * bytePtr;
19130 strcpy(pointerName, "__ecerePointer_");
19131 FullClassNameCat(pointerName, _class->fullName, 0);
19133 char className[1024];
19135 strcpy(className, "__ecereClass_");
19136 FullClassNameCat(className, classSym->string, 1);
19137 DeclareClass(curExternal, classSym, className);
19139 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
19142 struct Expression * e;
19144 if(_class->offset && _class->offset == _class->base->structSize)
19146 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
19147 ProcessExpressionType(e);
19153 sprintf(string, "%d", _class->offset);
19154 e = MkExpConstant(string);
19156 exp = QBrackets(MkExpOp(bytePtr, '+', e));
19160 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
19162 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
19163 exp->expType = __extension__ ({
19164 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19166 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
19167 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19169 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
19170 }), __ecereInstance2;
19174 yylloc = function->body->loc;
19175 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
19177 struct Context * prevContext = curContext;
19178 struct __ecereNameSpace__ecere__sys__OldList * list;
19180 curContext = function->body->__anon1.compound.context;
19181 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
19182 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
19183 curContext = prevContext;
19185 decl->symbol = (((void *)0));
19186 if(!function->body->__anon1.compound.declarations)
19187 function->body->__anon1.compound.declarations = MkList();
19188 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
19194 thisClass = (((void *)0));
19197 FreeSpecifier(id->_class);
19198 id->_class = (((void *)0));
19199 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19201 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19203 id = GetDeclId(initDecl->declarator);
19204 FreeSpecifier(id->_class);
19205 id->_class = (((void *)0));
19209 topContext = function->body->__anon1.compound.context;
19211 struct FunctionDefinition * oldFunction = curFunction;
19213 curFunction = function;
19215 ProcessStatement(function->body);
19216 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
19218 struct Statement * prevCompound = curCompound;
19219 struct Context * prevContext = curContext;
19220 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
19222 if(!function->body->__anon1.compound.statements)
19223 function->body->__anon1.compound.statements = MkList();
19224 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
19225 curCompound = function->body;
19226 curContext = function->body->__anon1.compound.context;
19227 ProcessStatement(fireWatchers);
19228 curContext = prevContext;
19229 curCompound = prevCompound;
19231 curFunction = oldFunction;
19233 if(function->declarator)
19235 ProcessDeclarator(function->declarator, 1);
19237 topContext = oldTopContext;
19238 thisClass = oldThisClass;
19241 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
19243 struct ClassDef * def;
19244 struct External * external = curExternal;
19245 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
19247 for(def = definitions->first; def; def = def->next)
19251 if(def->__anon1.function->declarator)
19252 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
19254 curExternal = external;
19255 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
19257 else if(def->type == 2)
19259 if(def->__anon1.decl->type == 2)
19261 thisClass = regClass;
19262 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
19263 thisClass = (((void *)0));
19267 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
19270 thisClass = regClass;
19271 ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
19272 thisClass = backThisClass;
19275 else if(def->type == 1 && def->__anon1.defProperties)
19277 struct MemberInit * defProperty;
19278 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);
19280 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19281 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
19283 thisClass = regClass;
19284 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
19285 thisClass = (((void *)0));
19287 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19288 FreeSymbol(thisSymbol);
19290 else if(def->type == 3 && def->__anon1.propertyDef)
19292 struct PropertyDef * prop = def->__anon1.propertyDef;
19294 thisClass = regClass;
19299 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19301 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19303 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
19304 ProcessStatement(prop->setStmt);
19310 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19312 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19314 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
19315 ProcessStatement(prop->getStmt);
19317 if(prop->issetStmt)
19321 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19323 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19325 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
19326 ProcessStatement(prop->issetStmt);
19328 thisClass = (((void *)0));
19330 else if(def->type == 4 && def->__anon1.propertyWatch)
19332 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
19334 thisClass = regClass;
19335 if(propertyWatch->compound)
19337 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);
19339 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19340 curExternal = (((void *)0));
19341 ProcessStatement(propertyWatch->compound);
19343 thisClass = (((void *)0));
19348 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19350 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19352 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19353 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19354 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19355 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19356 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19357 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19358 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19359 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19360 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19361 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19362 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19363 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19364 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19365 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19366 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19367 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19368 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19369 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19370 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19371 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19372 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19373 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19374 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19375 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19376 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19377 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19378 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19379 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19380 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19381 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19382 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19383 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19384 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19385 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19386 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19387 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19388 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19389 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19390 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19391 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19392 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19393 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19394 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19395 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19396 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19397 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19398 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19399 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19400 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19401 __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);
19402 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19403 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19404 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19405 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19406 __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);
19407 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19408 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19409 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19410 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19411 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19412 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19413 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19414 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19415 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19416 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19417 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19418 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19419 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19420 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19421 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19422 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)
19423 __ecereClass_Conversion = class;
19424 __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);
19425 __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);
19426 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19427 __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);
19428 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19429 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19430 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19431 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19432 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19433 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19434 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19435 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19436 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19437 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19438 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19439 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19440 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19441 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19442 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19443 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19444 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19445 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19446 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19447 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19448 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19449 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);