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));
12432 if(!inCompiler || !classSym)
12433 return (((void *)0));
12434 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
12435 return (((void *)0));
12436 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
12437 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
12438 external = classSym->__anon2.__anon1.structExternal;
12439 if(external && external->__anon1.declaration)
12441 struct Specifier * spec;
12443 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12444 if(spec->type == 3 || spec->type == 4)
12446 curDeclarations = spec->__anon1.__anon2.definitions;
12450 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
12452 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12453 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
12454 char structName[1024];
12455 unsigned int addedPadding = 0;
12456 struct Specifier * curSpec = (((void *)0));
12458 classSym->declaring++;
12459 if(strchr(classSym->string, '<'))
12461 if(classSym->__anon1.registered->templateClass)
12462 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
12463 classSym->declaring--;
12467 FullClassNameCat(structName, name, 0);
12468 classSym->declaredStructSym = 1;
12469 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
12471 unsigned int add = 0;
12475 external = MkExternalDeclaration((((void *)0)));
12476 classSym->__anon2.__anon1.structExternal = external;
12477 external->symbol = classSym;
12482 declarations = MkList();
12483 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
12485 if(external->__anon1.declaration)
12487 struct Specifier * spec;
12489 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12490 if(spec->type == 3 || spec->type == 4)
12493 curDeclarations = spec->__anon1.__anon2.definitions;
12497 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
12499 FreeList(declarations, (void *)(FreeClassDef));
12500 declarations = (((void *)0));
12502 if(classSym->__anon1.registered->type != 5 && !declarations)
12504 FreeExternal(external);
12505 external = (((void *)0));
12506 classSym->__anon2.__anon1.structExternal = (((void *)0));
12511 curSpec->__anon1.__anon2.definitions = declarations;
12514 specifiers = MkList();
12515 declarators = MkList();
12516 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
12517 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12520 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12523 classSym->declaring--;
12525 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
12527 classSym->declaredStructSym = 1;
12528 if(classSym->__anon1.registered)
12529 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
12530 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
12532 struct Specifier * spec;
12534 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
12536 if(spec->__anon1.__anon2.definitions)
12537 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
12541 if(inCompiler && neededBy && (external || !classSym->imported))
12545 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
12546 external->symbol = classSym;
12547 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12549 if(reachedPass15 && !external->__anon1.declaration && classSym->__anon1.registered && classSym->__anon1.registered->type == 5)
12551 char structName[1024];
12552 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12555 FullClassNameCat(structName, name, 0);
12556 specifiers = MkList();
12557 declarators = MkList();
12558 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))));
12559 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12563 struct External * e = external->fwdDecl ? external->fwdDecl : external;
12565 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
12566 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
12569 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
12574 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)
12576 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
12577 unsigned int found = 0;
12578 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
12579 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
12580 unsigned int freeType = 0;
12582 yylloc = member->loc;
12587 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
12591 dataMember = *curMember;
12597 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
12598 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
12599 int _subMemberStackPos = 0;
12602 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
12605 dataMember = thisMember;
12606 if(curMember && thisMember->memberAccess == 1)
12608 *curMember = thisMember;
12609 *curClass = thisMember->_class;
12610 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
12611 *subMemberStackPos = _subMemberStackPos;
12617 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
12618 if(method && method->type == 1)
12621 method = (((void *)0));
12626 struct Type * type = (((void *)0));
12630 if(!dataMember->dataType && dataMember->dataTypeString)
12632 struct Context * context = SetupTemplatesContext(_class);
12634 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12635 FinishTemplatesContext(context);
12637 type = dataMember->dataType;
12641 if(!method->dataType)
12642 ProcessMethodType(method);
12643 type = method->dataType;
12645 if(ident && ident->next)
12647 for(ident = ident->next; ident && type; ident = ident->next)
12649 if(type->kind == 8)
12651 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
12653 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
12655 type = dataMember->dataType;
12657 else if(type->kind == 9 || type->kind == 10)
12659 struct Type * memberType;
12661 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
12663 if(!strcmp(memberType->name, ident->string))
12672 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
12675 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
12676 struct __ecereNameSpace__ecere__com__Class * sClass;
12678 for(sClass = _class; sClass; sClass = sClass->base)
12681 if(sClass->templateClass)
12682 sClass = sClass->templateClass;
12683 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
12685 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
12687 for(sClass = sClass->base; sClass; sClass = sClass->base)
12689 if(sClass->templateClass)
12690 sClass = sClass->templateClass;
12691 id += sClass->templateParams.count;
12702 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
12704 if(arg.__anon1.__anon1.dataTypeString)
12706 unsigned int constant = type->constant;
12708 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
12709 if(type->kind == 8 && constant)
12710 type->constant = 1;
12711 else if(type->kind == 13)
12713 struct Type * t = type->__anon1.type;
12715 while(t->kind == 13)
12716 t = t->__anon1.type;
12718 t->constant = constant;
12721 if(type && _class->templateClass)
12722 type->passAsTemplate = 1;
12729 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
12731 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
12732 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
12733 int paramCount = 0;
12734 int lastParam = -1;
12735 char templateString[1024];
12736 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
12738 sprintf(templateString, "%s<", expClass->templateClass->fullName);
12739 for(cClass = expClass; cClass; cClass = cClass->base)
12743 if(cClass->templateClass)
12744 cClass = cClass->templateClass;
12745 for(param = cClass->templateParams.first; param; param = param->next)
12748 struct __ecereNameSpace__ecere__com__Class * sClass;
12749 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
12751 for(sClass = cClass->base; sClass; sClass = sClass->base)
12753 if(sClass->templateClass)
12754 sClass = sClass->templateClass;
12755 id += sClass->templateParams.count;
12757 arg = expClass->templateArgs[id];
12758 for(sClass = _class; sClass; sClass = sClass->base)
12760 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
12762 struct __ecereNameSpace__ecere__com__Class * nextClass;
12764 if(sClass->templateClass)
12765 sClass = sClass->templateClass;
12766 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
12768 if(nextClass->templateClass)
12769 nextClass = nextClass->templateClass;
12770 p += nextClass->templateParams.count;
12772 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
12774 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
12776 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12778 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
12779 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
12786 char argument[256];
12788 argument[0] = '\0';
12789 switch(param->type)
12793 char expString[1024];
12794 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12795 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
12796 struct Expression * exp;
12797 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
12799 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
12800 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
12801 ProcessExpressionType(exp);
12802 ComputeExpression(exp);
12803 expString[0] = '\0';
12804 PrintExpression(exp, expString);
12805 strcat(argument, expString);
12806 FreeExpression(exp);
12811 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
12816 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12817 strcat(argument, arg.__anon1.__anon1.dataTypeString);
12824 strcat(templateString, ", ");
12825 if(lastParam != p - 1)
12827 strcat(templateString, param->name);
12828 strcat(templateString, " = ");
12830 strcat(templateString, argument);
12839 int len = strlen(templateString);
12841 if(templateString[len - 1] == '<')
12845 if(templateString[len - 1] == '>')
12846 templateString[len++] = ' ';
12847 templateString[len++] = '>';
12849 templateString[len++] = '\0';
12852 struct Context * context = SetupTemplatesContext(_class);
12856 type = ProcessTypeString(templateString, 0);
12858 FinishTemplatesContext(context);
12861 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
12863 ProcessExpressionType(member->initializer->__anon1.exp);
12864 if(!member->initializer->__anon1.exp->expType)
12868 char expString[10240];
12870 expString[0] = '\0';
12871 PrintExpression(member->initializer->__anon1.exp, expString);
12872 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
12873 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
12876 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
12878 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
12881 else if(member->initializer)
12883 ProcessInitializer(member->initializer, type);
12890 if(_class && _class->type == 3)
12892 if(member->initializer)
12894 struct Type * type = MkClassType(_class->fullName);
12896 ProcessInitializer(member->initializer, type);
12902 if(member->initializer)
12904 ProcessInitializer(member->initializer, (((void *)0)));
12910 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12914 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12916 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
12920 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
12925 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
12927 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
12929 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)))
12931 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
12933 if(_class->type == 4)
12935 struct __ecereNameSpace__ecere__sys__OldList converts =
12939 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12942 if(!_class->symbol)
12943 _class->symbol = FindClass(_class->fullName);
12944 type->__anon1._class = _class->symbol;
12945 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))
12947 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12948 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12952 struct __ecereNameSpace__ecere__com__Class * baseClass;
12954 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
12956 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
12958 for(value = e->values.first; value; value = value->next)
12960 if(!strcmp(value->name, string))
12965 FreeType(sourceExp->expType);
12966 sourceExp->isConstant = 1;
12967 sourceExp->expType = MkClassType(baseClass->fullName);
12968 if(inCompiler || inPreCompiler || inDebugger)
12970 char constant[256];
12972 FreeExpContents(sourceExp);
12973 sourceExp->type = 2;
12974 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
12975 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
12977 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
12978 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
12980 while(converts.first)
12982 struct Conversion * convert = converts.first;
12984 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
12985 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
12987 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12994 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12995 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12998 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)))
12999 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
13004 void ComputeExpression(struct Expression * exp)
13010 struct Identifier * id = exp->__anon1.__anon1.identifier;
13012 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
13014 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
13016 if(c && c->type == 4)
13018 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13022 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
13023 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
13025 for(value = e->values.first; value; value = value->next)
13027 if(!strcmp(value->name, id->string))
13032 const char * dts = c->dataTypeString;
13034 FreeExpContents(exp);
13036 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13045 ComputeInstantiation(exp);
13050 struct Expression * exp1, * exp2 = (((void *)0));
13051 struct Operand op1 =
13058 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13061 struct Operand op2 =
13068 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13072 if(exp->__anon1.op.exp2)
13074 struct Expression * e = exp->__anon1.op.exp2;
13076 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13078 if(e->type == 5 || e->type == 32 || e->type == 23)
13081 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13083 e = (*e->__anon1.list).last;
13086 if(exp->__anon1.op.op == 261 && e && e->expType)
13088 if(e->type == 3 && e->__anon1.__anon2.string)
13090 char * string = e->__anon1.__anon2.string;
13091 int len = strlen(string);
13092 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13094 len = UnescapeString(tmp, string + 1, len - 2);
13095 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13096 FreeExpContents(exp);
13098 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13102 struct Type * type = e->expType;
13105 FreeExpContents(exp);
13107 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13113 ComputeExpression(exp->__anon1.op.exp2);
13115 if(exp->__anon1.op.exp1)
13117 ComputeExpression(exp->__anon1.op.exp1);
13118 exp1 = exp->__anon1.op.exp1;
13119 exp2 = exp->__anon1.op.exp2;
13120 op1 = GetOperand(exp1);
13122 op1.type->refCount++;
13125 op2 = GetOperand(exp2);
13127 op2.type->refCount++;
13132 exp1 = exp->__anon1.op.exp2;
13133 op1 = GetOperand(exp1);
13135 op1.type->refCount++;
13137 CallOperator(exp, exp1, exp2, &op1, &op2);
13139 FreeType(op1.type);
13141 FreeType(op2.type);
13147 struct Expression * e, * n;
13149 for(e = (*exp->__anon1.list).first; e; e = n)
13154 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13155 struct Expression * prev = exp->prev;
13156 struct Expression * next = exp->next;
13158 ComputeExpression(e);
13159 FreeType(exp->expType);
13160 FreeType(exp->destType);
13164 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
13165 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
13176 struct Expression * memberExp = exp->__anon1.member.exp;
13177 struct Identifier * memberID = exp->__anon1.member.member;
13178 struct Type * type;
13180 ComputeExpression(exp->__anon1.member.exp);
13181 type = exp->__anon1.member.exp->expType;
13184 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)));
13185 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13186 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13187 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
13189 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
13190 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
13194 struct Symbol * classSym;
13197 PrintTypeNoConst(type, string, 0, 1);
13198 classSym = FindClass(string);
13199 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13201 if(exp->__anon1.member.member)
13203 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
13205 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
13207 if(!prop && !member && _class && exp->__anon1.member.member)
13209 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
13211 convertTo = _class;
13212 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13213 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
13219 struct Type * type = prop->dataType;
13221 if(_class->type == 3)
13223 if(type->kind == 8)
13225 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13227 if(_class->type == 3)
13229 if(!_class->dataType)
13230 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13231 type = _class->dataType;
13239 float (* Get)(float) = (void *)prop->Get;
13241 GetFloat(exp->__anon1.member.exp, &value);
13242 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
13249 double (* Get)(double);
13251 GetDouble(exp->__anon1.member.exp, &value);
13253 Get = (void *)prop->Set;
13255 Get = (void *)prop->Get;
13256 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
13266 struct Expression * value = exp->__anon1.member.exp;
13267 struct Type * type;
13269 if(!prop->dataType)
13270 ProcessPropertyType(prop);
13271 type = prop->dataType;
13275 else if(_class->type == 1)
13281 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13283 if(propertyClass->type == 1 && value->type == 1)
13285 void (* Set)(void *, void *) = (void *)prop->Set;
13287 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13288 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13289 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13290 exp->__anon1.instance->loc = exp->loc;
13292 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
13293 PopulateInstance(exp->__anon1.instance);
13300 void (* Set)(void *, int) = (void *)prop->Set;
13302 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13303 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13304 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13305 exp->__anon1.instance->loc = exp->loc;
13307 GetInt(value, &intValue);
13308 Set(exp->__anon1.instance->data, intValue);
13309 PopulateInstance(exp->__anon1.instance);
13314 long long intValue;
13315 void (* Set)(void *, long long) = (void *)prop->Set;
13317 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13318 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13319 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13320 exp->__anon1.instance->loc = exp->loc;
13322 GetInt64(value, &intValue);
13323 Set(exp->__anon1.instance->data, intValue);
13324 PopulateInstance(exp->__anon1.instance);
13330 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13332 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13333 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13334 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13335 exp->__anon1.instance->loc = exp->loc;
13337 GetIntPtr(value, &intValue);
13338 Set(exp->__anon1.instance->data, intValue);
13339 PopulateInstance(exp->__anon1.instance);
13345 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13347 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13348 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13349 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13350 exp->__anon1.instance->loc = exp->loc;
13352 GetIntSize(value, &intValue);
13353 Set(exp->__anon1.instance->data, intValue);
13354 PopulateInstance(exp->__anon1.instance);
13360 void (* Set)(void *, float) = (void *)prop->Set;
13362 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13363 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13364 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13365 exp->__anon1.instance->loc = exp->loc;
13367 GetFloat(value, &floatValue);
13368 Set(exp->__anon1.instance->data, floatValue);
13369 PopulateInstance(exp->__anon1.instance);
13374 double doubleValue;
13375 void (* Set)(void *, double) = (void *)prop->Set;
13377 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13378 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13379 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13380 exp->__anon1.instance->loc = exp->loc;
13382 GetDouble(value, &doubleValue);
13383 Set(exp->__anon1.instance->data, doubleValue);
13384 PopulateInstance(exp->__anon1.instance);
13389 else if(_class->type == 2)
13395 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13397 if(propertyClass->type == 1 && value->__anon1.instance->data)
13399 unsigned int (* Set)(void *) = (void *)prop->Set;
13400 unsigned int bits = Set(value->__anon1.instance->data);
13402 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13406 else if(_class->type == 2)
13408 unsigned int value;
13409 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
13412 GetUInt(exp->__anon1.member.exp, &value);
13414 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13423 if(_class->type == 2)
13425 unsigned int value;
13427 GetUInt(exp->__anon1.member.exp, &value);
13432 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13434 if(_class->type == 1)
13436 void (* Get)(unsigned int, void *) = (void *)prop->Get;
13438 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13439 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13440 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13441 exp->__anon1.instance->loc = exp->loc;
13443 Get(value, exp->__anon1.instance->data);
13444 PopulateInstance(exp->__anon1.instance);
13446 else if(_class->type == 2)
13448 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
13449 uint64 bits = Get(value);
13451 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
13458 else if(_class->type == 1)
13460 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
13466 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13468 if(_class->type == 1 && value)
13470 void (* Get)(void *, void *) = (void *)prop->Get;
13472 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13473 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13474 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13475 exp->__anon1.instance->loc = exp->loc;
13477 Get(value, exp->__anon1.instance->data);
13478 PopulateInstance(exp->__anon1.instance);
13489 exp->isConstant = 0;
13498 FreeExpression(memberExp);
13499 FreeIdentifier(memberID);
13505 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
13507 FreeExpContents(exp);
13508 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13515 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
13517 if(classSym && classSym->__anon1.registered)
13519 if(classSym->__anon1.registered->fixed)
13521 FreeSpecifier(exp->__anon1._class);
13522 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
13527 char className[1024];
13529 strcpy(className, "__ecereClass_");
13530 FullClassNameCat(className, classSym->string, 1);
13531 DeclareClass(curExternal, classSym, className);
13532 FreeExpContents(exp);
13534 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
13535 exp->__anon1.member.member = MkIdentifier("structSize");
13542 struct Type * type;
13543 struct Expression * e = exp;
13545 if(exp->type == 11)
13547 if(exp->__anon1.cast.exp)
13548 ComputeExpression(exp->__anon1.cast.exp);
13549 e = exp->__anon1.cast.exp;
13551 if(e && exp->expType)
13553 type = exp->expType;
13554 if(type->kind == 8)
13556 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13558 if(_class && (_class->type == 3 || _class->type == 2))
13560 if(!_class->dataType)
13561 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13562 type = _class->dataType;
13573 if(GetChar(e, &value))
13575 FreeExpContents(exp);
13576 exp->__anon1.__anon1.constant = PrintChar(value);
13582 unsigned char value = 0;
13584 if(GetUChar(e, &value))
13586 FreeExpContents(exp);
13587 exp->__anon1.__anon1.constant = PrintUChar(value);
13597 if(GetShort(e, &value))
13599 FreeExpContents(exp);
13600 exp->__anon1.__anon1.constant = PrintShort(value);
13606 unsigned short value = 0;
13608 if(GetUShort(e, &value))
13610 FreeExpContents(exp);
13611 exp->__anon1.__anon1.constant = PrintUShort(value);
13621 if(GetInt(e, &value))
13623 FreeExpContents(exp);
13624 exp->__anon1.__anon1.constant = PrintInt(value);
13630 unsigned int value = 0;
13632 if(GetUInt(e, &value))
13634 FreeExpContents(exp);
13635 exp->__anon1.__anon1.constant = PrintUInt(value);
13643 long long value = 0;
13645 if(GetInt64(e, &value))
13647 FreeExpContents(exp);
13648 exp->__anon1.__anon1.constant = PrintInt64(value);
13656 if(GetUInt64(e, &value))
13658 FreeExpContents(exp);
13659 exp->__anon1.__anon1.constant = PrintUInt64(value);
13667 intptr_t value = 0;
13669 if(GetIntPtr(e, &value))
13671 FreeExpContents(exp);
13672 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13678 uintptr_t value = 0;
13680 if(GetUIntPtr(e, &value))
13682 FreeExpContents(exp);
13683 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13693 if(GetIntSize(e, &value))
13695 FreeExpContents(exp);
13696 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13704 if(GetUIntSize(e, &value))
13706 FreeExpContents(exp);
13707 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13716 if(GetFloat(e, &value))
13718 FreeExpContents(exp);
13719 exp->__anon1.__anon1.constant = PrintFloat(value);
13728 if(GetDouble(e, &value))
13730 FreeExpContents(exp);
13731 exp->__anon1.__anon1.constant = PrintDouble(value);
13742 struct Operand op1 =
13749 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13752 struct Operand op2 =
13759 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13762 struct Operand op3 =
13769 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13773 if(exp->__anon1.cond.exp)
13774 ComputeExpression((*exp->__anon1.cond.exp).last);
13775 if(exp->__anon1.cond.elseExp)
13776 ComputeExpression(exp->__anon1.cond.elseExp);
13777 if(exp->__anon1.cond.cond)
13778 ComputeExpression(exp->__anon1.cond.cond);
13779 op1 = GetOperand(exp->__anon1.cond.cond);
13781 op1.type->refCount++;
13782 op2 = GetOperand((*exp->__anon1.cond.exp).last);
13784 op2.type->refCount++;
13785 op3 = GetOperand(exp->__anon1.cond.elseExp);
13787 op3.type->refCount++;
13790 FreeExpContents(exp);
13791 op1.ops.Cond(exp, &op1, &op2, &op3);
13794 FreeType(op1.type);
13796 FreeType(op2.type);
13798 FreeType(op3.type);
13804 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
13806 struct __ecereNameSpace__ecere__com__Instance * module;
13808 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))
13810 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))
13812 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))
13814 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)
13816 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
13822 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
13824 struct Type * source;
13825 struct Type * realDest = dest;
13826 struct Type * backupSourceExpType = (((void *)0));
13827 struct Expression * nbExp = GetNonBracketsExp(sourceExp);
13828 struct Expression * computedExp = nbExp;
13831 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)
13833 computedExp = CopyExpression(nbExp);
13834 ComputeExpression(computedExp);
13836 source = sourceExp->expType;
13837 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
13839 if(computedExp != nbExp)
13841 FreeExpression(computedExp);
13842 computedExp = nbExp;
13847 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
13849 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
13851 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
13853 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
13855 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
13857 if(sourceBase == destBase)
13859 if(computedExp != nbExp)
13861 FreeExpression(computedExp);
13862 computedExp = nbExp;
13871 struct __ecereNameSpace__ecere__sys__OldList * specs;
13872 unsigned int flag = 0;
13873 long long value = (((int)0x7fffffff));
13875 source->refCount++;
13876 if(computedExp->type == 2)
13878 if(source->isSigned)
13879 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13881 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13883 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
13885 if(source->isSigned)
13886 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13888 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13890 if(computedExp != nbExp)
13892 FreeExpression(computedExp);
13893 computedExp = nbExp;
13895 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
13898 source = __extension__ ({
13899 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13901 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
13904 if(dest->kind == 8)
13906 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13908 if(_class && _class->type == 3)
13910 if(source->kind != 8)
13912 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13913 struct Type * tempDest, * tempSource;
13915 for(; _class->base->type != 1000; _class = _class->base)
13918 tempDest = tempType;
13919 tempType->kind = 8;
13920 if(!_class->symbol)
13921 _class->symbol = FindClass(_class->fullName);
13922 tempType->__anon1._class = _class->symbol;
13923 tempType->truth = dest->truth;
13924 if(tempType->__anon1._class)
13925 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13926 backupSourceExpType = sourceExp->expType;
13927 if(dest->passAsTemplate)
13929 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13930 CopyTypeInto(sourceExp->expType, dest);
13931 sourceExp->expType->passAsTemplate = 0;
13935 sourceExp->expType = dest;
13939 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13942 if(_class && _class->type == 2 && source->kind != 8)
13944 if(!dest->__anon1._class->__anon1.registered->dataType)
13945 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
13946 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13949 FreeType(sourceExp->expType);
13950 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
13951 source->refCount++;
13954 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
13956 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13957 struct Declarator * decl;
13960 ReadString(string, sourceExp->__anon1.__anon2.string);
13961 decl = SpecDeclFromString(string, specs, (((void *)0)));
13962 FreeExpContents(sourceExp);
13963 FreeType(sourceExp->expType);
13964 sourceExp->type = 24;
13965 sourceExp->__anon1._classExp.specifiers = specs;
13966 sourceExp->__anon1._classExp.decl = decl;
13967 sourceExp->expType = dest;
13971 if(backupSourceExpType)
13972 FreeType(backupSourceExpType);
13976 else if(source->kind == 8)
13978 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
13980 if(_class && (_class->type == 3 || _class->type == 2))
13982 if(dest->kind != 8)
13984 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13985 struct Type * tempDest, * tempSource;
13987 if(!source->__anon1._class->__anon1.registered->dataType)
13988 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
13989 for(; _class->base->type != 1000; _class = _class->base)
13992 tempSource = tempType;
13993 tempType->kind = 8;
13994 tempType->__anon1._class = FindClass(_class->fullName);
13995 tempType->truth = source->truth;
13996 tempType->classObjectType = source->classObjectType;
13997 if(tempType->__anon1._class)
13998 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13999 if(conversions && conversions->last)
14001 ((struct Conversion *)conversions->last)->resultType = dest;
14004 FreeType(sourceExp->expType);
14005 sourceExp->expType = MkClassType(_class->fullName);
14006 sourceExp->expType->truth = source->truth;
14007 sourceExp->expType->classObjectType = source->classObjectType;
14008 if(!sourceExp->destType)
14010 FreeType(sourceExp->destType);
14011 sourceExp->destType = sourceExp->expType;
14012 if(sourceExp->expType)
14013 sourceExp->expType->refCount++;
14015 if(!_class->dataType)
14016 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14018 dest = MkClassType(source->__anon1._class->string);
14019 dest->truth = source->truth;
14020 dest->classObjectType = source->classObjectType;
14022 source = _class->dataType;
14023 source->refCount++;
14024 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
14030 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
14037 if(dest->kind == 8)
14039 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
14040 unsigned int fittingValue = 0;
14042 if(_class && _class->type == 4)
14044 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14045 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14047 if(c && value >= 0 && value <= c->largest)
14050 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
14052 if(_class->type == 0 || _class->type == 5)
14054 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14056 *newExp = *sourceExp;
14057 if(sourceExp->destType)
14058 sourceExp->destType->refCount++;
14059 if(sourceExp->expType)
14060 sourceExp->expType->refCount++;
14061 sourceExp->type = 11;
14062 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
14063 sourceExp->__anon1.cast.exp = newExp;
14064 FreeType(sourceExp->expType);
14065 sourceExp->expType = (((void *)0));
14066 ProcessExpressionType(sourceExp);
14069 FreeType(sourceExp->expType);
14070 sourceExp->expType = dest;
14075 if(backupSourceExpType)
14076 FreeType(backupSourceExpType);
14079 if(!_class->dataType)
14080 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14082 dest = _class->dataType;
14085 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))
14087 specs = MkListOne(MkSpecifier(DOUBLE));
14089 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))
14091 specs = MkListOne(MkSpecifier(FLOAT));
14093 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))
14096 if(!dest->isSigned)
14097 ListAdd(specs, MkSpecifier(UNSIGNED));
14098 ListAdd(specs, MkSpecifier(INT64));
14100 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
14103 if(!dest->isSigned)
14104 ListAdd(specs, MkSpecifier(UNSIGNED));
14105 ListAdd(specs, MkSpecifier(INT));
14107 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14110 if(!dest->isSigned)
14111 ListAdd(specs, MkSpecifier(UNSIGNED));
14112 ListAdd(specs, MkSpecifier(SHORT));
14114 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14117 if(!dest->isSigned)
14118 ListAdd(specs, MkSpecifier(UNSIGNED));
14119 ListAdd(specs, MkSpecifier(CHAR));
14125 if(backupSourceExpType)
14127 if(sourceExp->expType)
14128 FreeType(sourceExp->expType);
14129 sourceExp->expType = backupSourceExpType;
14134 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))
14136 specs = MkListOne(MkSpecifier(DOUBLE));
14138 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))
14140 specs = MkListOne(MkSpecifier(FLOAT));
14142 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
14145 ListAdd(specs, MkSpecifier(BOOL));
14147 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)))
14149 if(source->kind == 3)
14153 if(backupSourceExpType)
14154 FreeType(backupSourceExpType);
14160 if(!dest->isSigned)
14161 ListAdd(specs, MkSpecifier(UNSIGNED));
14162 ListAdd(specs, MkSpecifier(CHAR));
14165 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)))))
14167 if(source->kind == 3)
14171 if(backupSourceExpType)
14172 FreeType(backupSourceExpType);
14178 if(!dest->isSigned)
14179 ListAdd(specs, MkSpecifier(UNSIGNED));
14180 ListAdd(specs, MkSpecifier(SHORT));
14183 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
14186 if(!dest->isSigned)
14187 ListAdd(specs, MkSpecifier(UNSIGNED));
14188 ListAdd(specs, MkSpecifier(INT));
14190 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
14193 if(!dest->isSigned)
14194 ListAdd(specs, MkSpecifier(UNSIGNED));
14195 ListAdd(specs, MkSpecifier(INT64));
14197 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
14199 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
14205 if(backupSourceExpType)
14207 if(sourceExp->expType)
14208 FreeType(sourceExp->expType);
14209 sourceExp->expType = backupSourceExpType;
14213 if(!flag && !sourceExp->opDestType)
14215 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14217 *newExp = *sourceExp;
14218 newExp->prev = (((void *)0));
14219 newExp->next = (((void *)0));
14220 if(sourceExp->destType)
14221 sourceExp->destType->refCount++;
14222 if(sourceExp->expType)
14223 sourceExp->expType->refCount++;
14224 sourceExp->type = 11;
14225 if(realDest->kind == 8)
14227 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
14228 FreeList(specs, (void *)(FreeSpecifier));
14231 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
14232 if(newExp->type == 4)
14234 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
14237 sourceExp->__anon1.cast.exp = newExp;
14238 FreeType(sourceExp->expType);
14239 sourceExp->expType = (((void *)0));
14240 ProcessExpressionType(sourceExp);
14243 FreeList(specs, (void *)(FreeSpecifier));
14246 if(backupSourceExpType)
14247 FreeType(backupSourceExpType);
14252 if(computedExp != nbExp)
14254 FreeExpression(computedExp);
14255 computedExp = nbExp;
14257 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
14258 sourceExp = (*sourceExp->__anon1.list).last;
14259 if(sourceExp->type == 0)
14261 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
14263 if(dest->kind == 8)
14265 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
14267 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
14268 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14272 for(; _class && _class->type == 4; _class = _class->base)
14274 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
14275 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14277 for(value = e->values.first; value; value = value->next)
14279 if(!strcmp(value->name, id->string))
14284 FreeType(sourceExp->expType);
14285 sourceExp->isConstant = 1;
14286 sourceExp->expType = MkClassType(_class->fullName);
14287 if(inCompiler || inPreCompiler || inDebugger)
14289 FreeExpContents(sourceExp);
14290 sourceExp->type = 2;
14291 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
14292 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
14294 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
14303 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
14314 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
14316 unsigned int result = 1;
14320 struct __ecereNameSpace__ecere__sys__OldList converts =
14324 struct Conversion * convert;
14326 if(destType->kind == 0)
14328 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
14332 for(convert = converts.first; convert; convert = convert->next)
14334 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
14338 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14339 int objectType = exp->expType ? exp->expType->classObjectType : 0;
14342 newExp->prev = (((void *)0));
14343 newExp->next = (((void *)0));
14344 newExp->destType = (((void *)0));
14348 exp->addedThis = 1;
14349 exp->__anon1.member.exp = newExp;
14350 FreeType(exp->__anon1.member.exp->expType);
14351 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
14352 exp->__anon1.member.exp->expType->classObjectType = objectType;
14353 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
14354 exp->__anon1.member.memberType = 1;
14355 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14358 exp->expType->refCount++;
14359 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14365 exp->addedThis = 1;
14366 exp->__anon1.member.exp = newExp;
14367 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)
14369 newExp->byReference = 1;
14371 FreeType(exp->__anon1.member.exp->expType);
14372 exp->__anon1.member.exp->expType = (((void *)0));
14373 if(convert->convert->dataType)
14375 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14376 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
14377 exp->__anon1.member.exp->expType->refCount = 1;
14378 exp->__anon1.member.exp->expType->classObjectType = objectType;
14379 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14381 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
14382 exp->__anon1.member.memberType = 4;
14383 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14385 if(convert->resultType)
14386 convert->resultType->refCount++;
14392 FreeType(exp->expType);
14395 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14396 if(exp->destType->casted)
14399 exp->expType->refCount++;
14403 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14404 if(exp->destType->casted)
14406 if(convert->resultType)
14407 convert->resultType->refCount++;
14411 if(exp->isConstant && inCompiler)
14412 ComputeExpression(exp);
14413 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
14415 if(!result && exp->expType && converts.count)
14417 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14419 if(!result && exp->expType && exp->destType)
14421 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))
14428 static void ProcessFunction(struct FunctionDefinition * function);
14430 void ProcessInstantiationType(struct Instantiation * inst)
14432 yylloc = inst->loc;
14435 struct MembersInit * members;
14436 struct Symbol * classSym;
14437 struct __ecereNameSpace__ecere__com__Class * _class;
14439 classSym = inst->_class->__anon1.__anon1.symbol;
14440 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14441 if(!_class || _class->type != 5)
14442 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14443 afterExternal = afterExternal ? afterExternal : curExternal;
14445 ProcessExpressionType(inst->exp);
14446 inst->isConstant = 1;
14449 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14450 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14451 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14452 int subMemberStackPos = 0;
14454 for(members = (*inst->members).first; members; members = members->next)
14456 switch(members->type)
14461 static unsigned int instMethodID = 0;
14462 struct External * external = curExternal;
14463 struct Context * context = curContext;
14464 struct Declarator * declarator = members->__anon1.function->declarator;
14465 struct Identifier * nameID = GetDeclId(declarator);
14466 char * unmangled = nameID ? nameID->string : (((void *)0));
14467 struct Expression * exp;
14468 struct External * createdExternal = (((void *)0));
14474 strcpy(name, "__ecereInstMeth_");
14475 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14477 strcat(name, nameID->string);
14479 sprintf(number, "_%08d", instMethodID++);
14480 strcat(name, number);
14481 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14485 struct Symbol * symbol = declarator->symbol;
14486 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14488 if(method && method->type == 1)
14490 symbol->__anon1.method = method;
14491 ProcessMethodType(method);
14492 if(!symbol->type->__anon1.__anon2.thisClass)
14494 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14496 if(!currentClass->symbol)
14497 currentClass->symbol = FindClass(currentClass->fullName);
14498 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14502 if(!_class->symbol)
14503 _class->symbol = FindClass(_class->fullName);
14504 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14507 DeclareType(curExternal, symbol->type, 1, 1);
14511 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14514 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14517 FreeSpecifier(nameID->_class);
14518 nameID->_class = (((void *)0));
14520 curExternal = createdExternal;
14523 if(createdExternal->__anon1.function)
14524 ProcessFunction(createdExternal->__anon1.function);
14526 else if(declarator)
14528 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14529 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14531 curExternal = external;
14532 curContext = context;
14535 FreeClassFunction(members->__anon1.function);
14536 exp = QMkExpId(name);
14538 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14539 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14545 if(members->__anon1.dataMembers && classSym)
14547 struct MemberInit * member;
14548 struct Location oldyyloc = yylloc;
14550 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14552 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14553 if(member->initializer && !member->initializer->isConstant)
14554 inst->isConstant = 0;
14566 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
14568 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
14574 if(spec->__anon1.specifier == THISCLASS)
14579 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14580 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14581 ProcessSpecifier(spec, declareStruct, 0);
14588 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
14591 DeclareType(curExternal, symbol->type, 1, 1);
14592 else if(spec->__anon1.__anon1.symbol)
14594 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
14596 if(warnClasses && !c)
14597 Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
14598 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
14604 struct Enumerator * e;
14606 if(spec->__anon1.__anon2.list)
14608 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
14611 ProcessExpressionType(e->exp);
14620 if(spec->__anon1.__anon2.definitions)
14622 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
14624 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
14631 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
14636 if(decl->__anon1.identifier->classSym)
14638 FreeSpecifier(decl->__anon1.identifier->_class);
14639 decl->__anon1.identifier->_class = (((void *)0));
14643 if(decl->__anon1.array.exp)
14644 ProcessExpressionType(decl->__anon1.array.exp);
14652 struct Identifier * id = (((void *)0));
14653 struct Specifier * classSpec = (((void *)0));
14655 if(decl->type == 4)
14657 id = GetDeclId(decl);
14658 if(id && id->_class)
14660 classSpec = id->_class;
14661 id->_class = (((void *)0));
14664 if(decl->declarator)
14665 ProcessDeclarator(decl->declarator, isFunction);
14666 if(decl->type == 4)
14670 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
14672 if(!decl->__anon1.function.parameters)
14673 decl->__anon1.function.parameters = MkList();
14674 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
14676 if(decl->__anon1.function.parameters)
14678 struct TypeName * param;
14680 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
14682 if(param->qualifiers)
14684 struct Specifier * spec;
14686 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
14688 if(spec->type == 0)
14690 if(spec->__anon1.specifier == TYPED_OBJECT)
14692 struct Declarator * d = param->declarator;
14693 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);
14695 if(!d || d->type != 5)
14696 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
14697 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14698 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
14699 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
14700 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
14701 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
14705 else if(spec->__anon1.specifier == ANY_OBJECT)
14707 struct Declarator * d = param->declarator;
14709 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14710 param->qualifiers = MkListOne(MkSpecifier(VOID));
14711 if(!d || d->type != 5)
14712 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
14713 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
14716 else if(spec->__anon1.specifier == THISCLASS)
14721 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14722 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14723 ProcessSpecifier(spec, 0, 0);
14728 else if(spec->type == 1)
14730 ProcessSpecifier(spec, isFunction, 1);
14732 else if((spec->type == 3 || spec->type == 4) && !spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id && spec->__anon1.__anon2.id->string)
14734 struct Declarator * d = param->declarator;
14736 if(!d || d->type != 5)
14737 DeclareStruct(curExternal, spec->__anon1.__anon2.id->string, 0, 1);
14741 if(param->declarator)
14742 ProcessDeclarator(param->declarator, 0);
14751 static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
14753 yylloc = decl->loc;
14758 unsigned int declareStruct = 0;
14760 if(decl->__anon1.__anon1.declarators)
14762 struct InitDeclarator * d;
14764 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14766 struct Type * type, * subType;
14768 ProcessDeclarator(d->declarator, 0);
14769 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14772 ProcessInitializer(d->initializer, type);
14773 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
14775 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
14777 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
14779 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
14780 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
14781 if(decl->__anon1.__anon1.specifiers)
14782 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
14783 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
14786 decl->__anon1.inst = inst;
14790 for(subType = type; subType; )
14792 if(subType->kind == 8)
14797 else if(subType->kind == 13)
14799 else if(subType->kind == 12)
14800 subType = subType->__anon1.__anon4.arrayType;
14809 if(decl->__anon1.__anon1.specifiers)
14811 struct Specifier * s;
14813 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
14815 ProcessSpecifier(s, declareStruct, 1);
14822 ProcessInstantiationType(decl->__anon1.inst);
14827 struct Specifier * spec;
14828 struct Declarator * d;
14829 unsigned int declareStruct = 0;
14831 if(decl->__anon1.__anon1.declarators)
14833 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14835 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14836 struct Type * subType;
14838 ProcessDeclarator(d, 0);
14839 for(subType = type; subType; )
14841 if(subType->kind == 8)
14846 else if(subType->kind == 13)
14848 else if(subType->kind == 12)
14849 subType = subType->__anon1.__anon4.arrayType;
14856 if(decl->__anon1.__anon1.specifiers)
14858 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
14859 ProcessSpecifier(spec, declareStruct, warnClasses);
14866 static void ProcessStatement(struct Statement * stmt)
14868 yylloc = stmt->loc;
14872 ProcessStatement(stmt->__anon1.labeled.stmt);
14875 if(stmt->__anon1.caseStmt.exp)
14877 FreeType(stmt->__anon1.caseStmt.exp->destType);
14878 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
14880 curSwitchType->refCount++;
14881 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
14882 ComputeExpression(stmt->__anon1.caseStmt.exp);
14884 if(stmt->__anon1.caseStmt.stmt)
14885 ProcessStatement(stmt->__anon1.caseStmt.stmt);
14889 if(stmt->__anon1.compound.context)
14891 struct Declaration * decl;
14892 struct Statement * s;
14893 struct Statement * prevCompound = curCompound;
14894 struct Context * prevContext = curContext;
14896 if(!stmt->__anon1.compound.isSwitch)
14897 curCompound = stmt;
14898 curContext = stmt->__anon1.compound.context;
14899 if(stmt->__anon1.compound.declarations)
14901 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
14902 ProcessDeclaration(decl, 1);
14904 if(stmt->__anon1.compound.statements)
14906 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
14907 ProcessStatement(s);
14909 curContext = prevContext;
14910 curCompound = prevCompound;
14916 struct Expression * exp;
14918 if(stmt->__anon1.expressions)
14920 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14921 ProcessExpressionType(exp);
14927 struct Expression * exp;
14929 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
14930 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
14931 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
14932 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
14934 ProcessExpressionType(exp);
14936 if(stmt->__anon1.ifStmt.stmt)
14937 ProcessStatement(stmt->__anon1.ifStmt.stmt);
14938 if(stmt->__anon1.ifStmt.elseStmt)
14939 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
14944 struct Type * oldSwitchType = curSwitchType;
14946 if(stmt->__anon1.switchStmt.exp)
14948 struct Expression * exp;
14950 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
14954 ProcessExpressionType(exp);
14957 curSwitchType = exp->expType;
14960 ProcessStatement(stmt->__anon1.switchStmt.stmt);
14961 curSwitchType = oldSwitchType;
14966 if(stmt->__anon1.whileStmt.exp)
14968 struct Expression * exp;
14970 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
14971 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
14972 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
14973 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
14975 ProcessExpressionType(exp);
14978 if(stmt->__anon1.whileStmt.stmt)
14979 ProcessStatement(stmt->__anon1.whileStmt.stmt);
14984 if(stmt->__anon1.doWhile.exp)
14986 struct Expression * exp;
14988 if((*stmt->__anon1.doWhile.exp).last)
14990 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
14991 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
14992 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
14994 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
14996 ProcessExpressionType(exp);
14999 if(stmt->__anon1.doWhile.stmt)
15000 ProcessStatement(stmt->__anon1.doWhile.stmt);
15005 struct Expression * exp;
15007 if(stmt->__anon1.forStmt.init)
15008 ProcessStatement(stmt->__anon1.forStmt.init);
15009 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
15011 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
15012 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
15013 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
15015 if(stmt->__anon1.forStmt.check)
15016 ProcessStatement(stmt->__anon1.forStmt.check);
15017 if(stmt->__anon1.forStmt.increment)
15019 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
15020 ProcessExpressionType(exp);
15022 if(stmt->__anon1.forStmt.stmt)
15023 ProcessStatement(stmt->__anon1.forStmt.stmt);
15028 struct Identifier * id = stmt->__anon1.forEachStmt.id;
15029 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
15030 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
15031 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
15032 char iteratorType[1024];
15033 struct Type * source;
15034 struct Expression * e;
15035 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));
15036 struct Expression * arrayExp;
15037 const char * typeString = (((void *)0));
15038 int builtinCount = 0;
15040 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
15044 FreeType(e->destType);
15045 e->destType = ProcessTypeString("Container", 0);
15047 if(!isBuiltin || e->next)
15048 ProcessExpressionType(e);
15050 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
15051 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)))
15053 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
15054 struct Symbol * symbol;
15055 struct Expression * expIt = (((void *)0));
15056 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
15057 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
15058 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
15059 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
15064 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
15065 stmt->__anon1.compound.context->parent = curContext;
15066 curContext = stmt->__anon1.compound.context;
15068 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
15070 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
15072 isCustomAVLTree = 1;
15073 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
15076 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
15078 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
15080 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
15083 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
15085 if(inCompiler && isArray)
15087 struct Declarator * decl;
15088 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15090 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
15091 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15092 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
15096 struct Type * type = (((void *)0));
15097 char typeStringBuf[1024];
15099 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
15100 if(((struct Expression *)(*exp).last)->type == 11)
15102 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
15105 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
15107 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)
15109 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
15111 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
15113 else if(arrayExp->__anon1.list)
15115 struct Expression * e;
15117 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15119 ProcessExpressionType(e);
15129 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15133 e->expType = (((void *)0));
15134 e = (*arrayExp->__anon1.list).first;
15135 ProcessExpressionType(e);
15138 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15140 FreeType(e->expType);
15141 e->expType = (((void *)0));
15143 type = (((void *)0));
15151 FreeType(e->expType);
15152 e->expType = (((void *)0));
15158 typeStringBuf[0] = '\0';
15159 PrintType(type, typeStringBuf, 0, 1);
15160 typeString = typeStringBuf;
15168 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
15169 struct Declarator * decl;
15170 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15172 if(arrayExp->__anon1.list)
15174 struct Expression * e;
15176 builtinCount = (*arrayExp->__anon1.list).count;
15177 type = ProcessTypeString(typeString, 0);
15178 while((e = (*arrayExp->__anon1.list).first))
15180 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
15181 e->destType = type;
15183 ProcessExpressionType(e);
15185 ListAdd(initializers, MkInitializerAssignment(e));
15188 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
15190 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
15191 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
15192 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
15193 FreeList(exp, (void *)(FreeExpression));
15195 else if(arrayExp->__anon1.list)
15197 struct Expression * e;
15199 type = ProcessTypeString(typeString, 0);
15200 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15202 e->destType = type;
15204 ProcessExpressionType(e);
15211 arrayExp->expType = ProcessTypeString("Container", 0);
15212 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
15215 else if(inCompiler && isLinkList && !isList)
15217 struct Declarator * decl;
15218 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15220 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
15221 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15222 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
15224 else if(inCompiler && _class->templateArgs)
15227 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
15229 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
15230 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)))))))));
15234 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
15237 switch(block->type)
15240 if(block->__anon1.compound.context)
15241 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15244 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
15245 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15246 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
15247 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15250 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
15251 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15254 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
15255 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15258 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
15259 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15262 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
15263 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15266 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
15267 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15273 block = MkIfStmt(filter, block, (((void *)0)));
15277 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));
15278 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15279 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15280 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15286 sprintf(count, "%d", builtinCount);
15287 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));
15288 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15289 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15290 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15292 else if(isLinkList && !isList)
15294 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
15295 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
15297 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
15299 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));
15303 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15304 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
15306 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));
15308 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15309 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15310 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15314 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
15316 ProcessExpressionType(expIt);
15317 if((*stmt->__anon1.compound.declarations).first)
15318 ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
15320 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
15321 ProcessStatement(stmt);
15324 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
15326 curContext = stmt->__anon1.compound.context->parent;
15331 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
15343 struct Expression * exp;
15345 if(stmt->__anon1.expressions)
15347 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15351 if(curFunction && !curFunction->type)
15352 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
15353 FreeType(exp->destType);
15354 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
15356 exp->destType->refCount++;
15358 ProcessExpressionType(exp);
15365 ProcessDeclaration(stmt->__anon1.decl, 1);
15370 struct AsmField * field;
15372 if(stmt->__anon1.asmStmt.inputFields)
15374 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15375 if(field->expression)
15376 ProcessExpressionType(field->expression);
15378 if(stmt->__anon1.asmStmt.outputFields)
15380 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15381 if(field->expression)
15382 ProcessExpressionType(field->expression);
15384 if(stmt->__anon1.asmStmt.clobberedFields)
15386 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15388 if(field->expression)
15389 ProcessExpressionType(field->expression);
15396 struct PropertyWatch * propWatch;
15397 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15398 struct Expression * object = stmt->__anon1._watch.object;
15399 struct Expression * watcher = stmt->__anon1._watch.watcher;
15402 ProcessExpressionType(watcher);
15404 ProcessExpressionType(object);
15407 if(watcher || thisClass)
15409 struct External * external = curExternal;
15410 struct Context * context = curContext;
15413 stmt->__anon1.expressions = MkList();
15414 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15416 struct ClassFunction * func;
15417 char watcherName[1024];
15418 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;
15419 struct External * createdExternal;
15421 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15422 if(propWatch->deleteWatch)
15423 strcat(watcherName, "_delete");
15426 struct Identifier * propID;
15428 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15430 strcat(watcherName, "_");
15431 strcat(watcherName, propID->string);
15434 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15436 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)));
15437 ProcessClassFunctionBody(func, propWatch->compound);
15438 propWatch->compound = (((void *)0));
15439 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15440 FreeClassFunction(func);
15441 curExternal = createdExternal;
15442 ProcessFunction(createdExternal->__anon1.function);
15443 if(propWatch->deleteWatch)
15445 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15447 ListAdd(args, CopyExpression(object));
15448 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15449 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15450 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15454 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15455 struct Identifier * propID;
15457 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15459 char propName[1024];
15460 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15464 char getName[1024], setName[1024];
15465 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15467 DeclareProperty(createdExternal, prop, setName, getName);
15468 strcpy(propName, "__ecereProp_");
15469 FullClassNameCat(propName, prop->_class->fullName, 0);
15470 strcat(propName, "_");
15471 FullClassNameCat(propName, prop->name, 1);
15472 ListAdd(args, CopyExpression(object));
15473 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15474 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15475 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15476 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15477 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15480 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15485 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15487 curExternal = external;
15488 curContext = context;
15490 FreeExpression(watcher);
15492 FreeExpression(object);
15493 FreeList(watches, (void *)(FreePropertyWatch));
15496 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15500 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15502 ProcessStatement(propWatch->compound);
15509 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15510 struct Expression * object = stmt->__anon1._watch.object;
15511 struct __ecereNameSpace__ecere__com__Class * _class;
15514 ProcessExpressionType(object);
15517 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15520 struct Identifier * propID;
15523 stmt->__anon1.expressions = MkList();
15524 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15526 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15533 for(propID = (*watches).first; propID; propID = propID->next)
15535 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15539 CreateFireWatcher(prop, object, stmt);
15542 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15547 struct __ecereNameSpace__ecere__com__Property * prop;
15548 struct __ecereNameSpace__ecere__com__Class * base;
15550 for(base = _class; base; base = base->base)
15552 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15554 if(prop->isProperty && prop->isWatchable)
15556 CreateFireWatcher(prop, object, stmt);
15562 FreeExpression(object);
15563 FreeList(watches, (void *)(FreeIdentifier));
15566 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15572 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15573 struct Expression * object = stmt->__anon1._watch.object;
15574 struct Expression * watcher = stmt->__anon1._watch.watcher;
15575 struct __ecereNameSpace__ecere__com__Class * _class;
15578 ProcessExpressionType(object);
15580 ProcessExpressionType(watcher);
15583 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15584 if(watcher || thisClass)
15588 struct Identifier * propID;
15591 stmt->__anon1.expressions = MkList();
15594 struct __ecereNameSpace__ecere__sys__OldList * args;
15597 ListAdd(args, CopyExpression(object));
15598 ListAdd(args, MkExpConstant("0"));
15599 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15600 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15604 for(propID = (*watches).first; propID; propID = propID->next)
15606 char propName[1024];
15607 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15611 char getName[1024], setName[1024];
15612 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15614 DeclareProperty(curExternal, prop, setName, getName);
15615 strcpy(propName, "__ecereProp_");
15616 FullClassNameCat(propName, prop->_class->fullName, 0);
15617 strcat(propName, "_");
15618 FullClassNameCat(propName, prop->name, 1);
15619 ListAdd(args, CopyExpression(object));
15620 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15621 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15622 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15625 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15629 FreeExpression(object);
15631 FreeExpression(watcher);
15632 FreeList(watches, (void *)(FreeIdentifier));
15635 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15638 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15645 void ComputeDataTypes()
15647 struct External * external;
15649 currentClass = (((void *)0));
15650 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
15651 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
15652 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
15653 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
15654 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
15655 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
15656 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
15657 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
15658 DeclareFunctionUtil((((void *)0)), "eSystem_New");
15659 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
15660 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
15661 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
15662 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
15663 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
15664 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
15665 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
15666 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
15667 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
15668 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
15669 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
15670 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
15672 for(external = (*ast).first; external; external = external->next)
15674 afterExternal = curExternal = external;
15675 if(external->type == 0)
15679 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15680 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15682 currentClass = external->__anon1.function->_class;
15683 ProcessFunction(external->__anon1.function);
15685 else if(external->type == 1)
15687 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
15689 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15690 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15692 currentClass = (((void *)0));
15693 if(external->__anon1.declaration)
15694 ProcessDeclaration(external->__anon1.declaration, 1);
15696 else if(external->type == 2)
15698 struct ClassDefinition * _class = external->__anon1._class;
15700 currentClass = external->symbol->__anon1.registered;
15703 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15704 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15706 if(_class->definitions)
15708 ProcessClass(_class->definitions, _class->symbol);
15712 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
15713 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
15716 else if(external->type == 4)
15718 thisNameSpace = external->__anon1.id->string;
15721 currentClass = (((void *)0));
15722 thisNameSpace = (((void *)0));
15723 curExternal = (((void *)0));
15726 void ProcessExpressionType(struct Expression * exp)
15728 unsigned int unresolved = 0;
15729 struct Location oldyylloc = yylloc;
15730 unsigned int notByReference = 0;
15732 if(!exp || exp->expType)
15739 struct Identifier * id = exp->__anon1.__anon1.identifier;
15741 if(!id || !topContext)
15743 if(id->_class && id->_class->__anon1.__anon1.name)
15745 id->classSym = id->_class->__anon1.__anon1.symbol;
15747 if(!strcmp(id->string, "__runtimePlatform"))
15749 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15752 else if(strstr(id->string, "__ecereClass") == id->string)
15754 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15757 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15759 ReplaceClassMembers(exp, thisClass);
15762 ProcessExpressionType(exp);
15765 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15770 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15774 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15780 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15783 ProcessExpressionType(exp);
15787 else if(currentClass && !id->_class)
15789 if(ResolveIdWithClass(exp, currentClass, 1))
15792 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15797 struct Type * type = symbol->type;
15798 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15800 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15802 struct Context * context = SetupTemplatesContext(_class);
15804 type = ReplaceThisClassType(_class);
15805 FinishTemplatesContext(context);
15807 type->refCount = 0;
15809 FreeSpecifier(id->_class);
15810 id->_class = (((void *)0));
15811 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15812 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15813 id->classSym = (((void *)0));
15814 exp->expType = type;
15817 if(type && (type->kind == 15))
15818 exp->isConstant = 1;
15819 if(symbol->isParam || !strcmp(id->string, "this"))
15821 if(_class && _class->type == 1 && !type->declaredWithStruct)
15822 exp->byReference = 1;
15824 if(symbol->isIterator)
15826 if(symbol->isIterator == 3)
15829 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
15830 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
15831 exp->expType = (((void *)0));
15832 ProcessExpressionType(exp);
15834 else if(symbol->isIterator != 4)
15837 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
15838 exp->__anon1.member.exp->expType = exp->expType;
15839 exp->__anon1.member.member = MkIdentifier("data");
15840 exp->expType = (((void *)0));
15841 ProcessExpressionType(exp);
15848 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
15850 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15854 strcpy(name, thisNameSpace);
15855 strcat(name, "::");
15856 strcat(name, id->string);
15857 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
15860 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
15865 for(c = 0; c < definedExpStackPos; c++)
15866 if(definedExpStack[c] == definedExp)
15868 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
15870 struct Location backupYylloc = yylloc;
15871 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
15873 definedExpStack[definedExpStackPos++] = definedExp;
15874 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
15875 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
15876 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15878 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15879 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
15880 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
15881 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15883 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15884 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
15886 parsedExpression = (((void *)0));
15888 expression_yyparse();
15889 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
15891 fileInput = backInput;
15892 yylloc = backupYylloc;
15893 if(parsedExpression)
15895 FreeIdentifier(id);
15897 exp->__anon1.list = MkListOne(parsedExpression);
15898 ApplyLocation(parsedExpression, &yylloc);
15899 ProcessExpressionType(exp);
15900 definedExpStackPos--;
15903 definedExpStackPos--;
15909 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
15915 struct GlobalData * data = (((void *)0));
15917 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15921 strcpy(name, thisNameSpace);
15922 strcat(name, "::");
15923 strcat(name, id->string);
15924 data = FindGlobalData(name);
15927 data = FindGlobalData(id->string);
15930 DeclareGlobalData(curExternal, data);
15931 exp->expType = data->dataType;
15933 data->dataType->refCount++;
15934 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15935 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
15936 FreeSpecifier(id->_class);
15937 id->_class = (((void *)0));
15942 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
15944 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15948 strcpy(name, thisNameSpace);
15949 strcat(name, "::");
15950 strcat(name, id->string);
15951 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
15954 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
15959 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15960 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
15962 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
15963 strcpy(name, "__ecereFunction_");
15964 FullClassNameCat(name, id->string, 0);
15965 if(DeclareFunction(curExternal, function, name))
15967 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15968 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
15970 exp->expType = function->dataType;
15971 if(function->dataType)
15972 function->dataType->refCount++;
15973 FreeSpecifier(id->_class);
15974 id->_class = (((void *)0));
15986 if(!exp->__anon1.instance->_class)
15988 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
15990 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
15993 ProcessInstantiationType(exp->__anon1.instance);
15994 exp->isConstant = exp->__anon1.instance->isConstant;
15995 if(exp->__anon1.instance->_class)
15997 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
16005 char * constant = exp->__anon1.__anon1.constant;
16006 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
16008 exp->expType = type;
16009 if(constant[0] == '\'')
16011 if((int)((unsigned char *)constant)[1] > 127)
16014 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
16018 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
16019 exp->__anon1.__anon1.constant = PrintUInt(ch);
16021 type->__anon1._class = FindClass("unichar");
16022 type->isSigned = 0;
16027 type->isSigned = 1;
16032 char * dot = strchr(constant, '.');
16033 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
16038 exponent = strchr(constant, 'p');
16040 exponent = strchr(constant, 'P');
16044 exponent = strchr(constant, 'e');
16046 exponent = strchr(constant, 'E');
16048 if(dot || exponent)
16050 if(strchr(constant, 'f') || strchr(constant, 'F'))
16054 type->isSigned = 1;
16058 unsigned int isSigned = constant[0] == '-';
16059 char * endP = (((void *)0));
16060 long long i64 = strtoll(constant, &endP, 0);
16061 uint64 ui64 = strtoull(constant, &endP, 0);
16062 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16063 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16067 if(i64 < (((int)0x80000000)))
16072 if(ui64 > (((int)0x7fffffff)))
16074 if(ui64 > (0xffffffff))
16077 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
16081 else if(constant[0] != '0' || !constant[1])
16086 type->kind = is64Bit ? 4 : 3;
16087 type->isSigned = isSigned;
16090 exp->isConstant = 1;
16091 if(exp->destType && exp->destType->kind == 7)
16093 else if(exp->destType && exp->destType->kind == 6)
16095 else if(exp->destType && exp->destType->kind == 4)
16102 exp->isConstant = 1;
16103 exp->expType = __extension__ ({
16104 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16106 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
16107 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16109 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
16110 }), __ecereInstance2;
16116 ProcessExpressionType(exp->__anon1._new.size);
16117 exp->expType = __extension__ ({
16118 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16120 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
16122 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16126 ProcessExpressionType(exp->__anon1._renew.size);
16127 ProcessExpressionType(exp->__anon1._renew.exp);
16128 exp->expType = __extension__ ({
16129 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16131 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
16133 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16137 unsigned int assign = 0, boolResult = 0, boolOps = 0;
16138 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
16139 unsigned int useDestType = 0, useSideType = 0;
16140 struct Location oldyylloc = yylloc;
16141 unsigned int useSideUnit = 0;
16142 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
16143 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16145 switch(exp->__anon1.op.op)
16197 if(exp->__anon1.op.exp1)
16204 if(exp->__anon1.op.op == '&')
16206 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
16208 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
16209 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16211 if(symbol && symbol->isIterator == 2)
16214 exp->__anon1.member.exp = exp->__anon1.op.exp2;
16215 exp->__anon1.member.member = MkIdentifier("key");
16216 exp->expType = (((void *)0));
16217 exp->__anon1.op.exp2->expType = symbol->type;
16218 symbol->type->refCount++;
16219 ProcessExpressionType(exp);
16225 if(exp->__anon1.op.exp1)
16227 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
16229 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
16231 if(exp->__anon1.op.exp1->destType)
16232 FreeType(exp->__anon1.op.exp1->destType);
16233 exp->__anon1.op.exp1->destType = exp->destType;
16234 exp->__anon1.op.exp1->opDestType = 1;
16236 exp->destType->refCount++;
16240 if(exp->__anon1.op.exp1->destType)
16241 FreeType(exp->__anon1.op.exp1->destType);
16242 exp->__anon1.op.exp1->destType = dummy;
16245 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16246 exp->__anon1.op.exp1->destType->count++;
16247 ProcessExpressionType(exp->__anon1.op.exp1);
16248 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16249 exp->__anon1.op.exp1->destType->count--;
16250 exp->__anon1.op.exp1->opDestType = 0;
16251 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)
16253 exp->__anon1.op.exp2 = MkExpConstant("1");
16254 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
16257 if(exp->__anon1.op.exp1->destType == dummy)
16260 exp->__anon1.op.exp1->destType = (((void *)0));
16262 if(exp->__anon1.op.exp2)
16264 if(!assign && exp->__anon1.op.exp1->expType && (exp->__anon1.op.exp1->expType->kind == 1 || exp->__anon1.op.exp1->expType->kind == 2))
16266 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);
16268 FreeType(exp->__anon1.op.exp1->expType);
16269 exp->__anon1.op.exp1->expType = type;
16272 type1 = exp->__anon1.op.exp1->expType;
16274 if(exp->__anon1.op.exp2)
16276 char expString[10240];
16278 expString[0] = '\0';
16279 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
16281 if(exp->__anon1.op.exp1)
16283 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
16284 if(exp->__anon1.op.exp1->expType)
16285 exp->__anon1.op.exp1->expType->refCount++;
16289 exp->__anon1.op.exp2->destType = exp->destType;
16290 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
16291 exp->__anon1.op.exp2->opDestType = 1;
16293 exp->destType->refCount++;
16297 exp->expType = type1;
16302 PrintExpression(exp->__anon1.op.exp2, expString);
16303 if(type1 && type1->kind == 13)
16305 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)
16306 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
16307 else if(exp->__anon1.op.op == '=')
16309 if(exp->__anon1.op.exp2->destType)
16310 FreeType(exp->__anon1.op.exp2->destType);
16311 exp->__anon1.op.exp2->destType = type1;
16318 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)
16322 if(exp->__anon1.op.exp2->destType)
16323 FreeType(exp->__anon1.op.exp2->destType);
16324 exp->__anon1.op.exp2->destType = type1;
16331 exp->expType = type1;
16333 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
16335 if(exp->__anon1.op.exp2->destType)
16336 FreeType(exp->__anon1.op.exp2->destType);
16337 exp->__anon1.op.exp2->destType = exp->destType;
16338 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
16339 exp->__anon1.op.exp2->opDestType = 1;
16341 exp->destType->refCount++;
16345 if(exp->__anon1.op.exp2->destType)
16346 FreeType(exp->__anon1.op.exp2->destType);
16347 exp->__anon1.op.exp2->destType = dummy;
16350 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))
16352 FreeType(exp->__anon1.op.exp2->destType);
16353 exp->__anon1.op.exp2->destType = type1;
16356 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16357 exp->__anon1.op.exp2->destType->count++;
16358 if(exp->__anon1.op.op == SIZEOF)
16360 struct Expression * e = exp->__anon1.op.exp2;
16362 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
16364 if(e->type == 5 || e->type == 32 || e->type == 23)
16367 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
16369 e = (*e->__anon1.list).last;
16372 if(e->type == 11 && e->__anon1.cast.exp)
16373 e->__anon1.cast.exp->needCast = 1;
16375 ProcessExpressionType(exp->__anon1.op.exp2);
16376 exp->__anon1.op.exp2->opDestType = 0;
16377 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16378 exp->__anon1.op.exp2->destType->count--;
16379 if(!assign && (exp->__anon1.op.exp1 || exp->__anon1.op.op == '~'))
16381 if(exp->__anon1.op.exp2->expType && (exp->__anon1.op.exp2->expType->kind == 1 || exp->__anon1.op.exp2->expType->kind == 2))
16383 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);
16385 FreeType(exp->__anon1.op.exp2->expType);
16386 exp->__anon1.op.exp2->expType = type;
16389 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
16391 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)
16393 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
16394 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16396 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)))
16398 if(exp->__anon1.op.op == ADD_ASSIGN)
16399 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16401 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))
16403 if(exp->__anon1.op.op == ADD_ASSIGN)
16404 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16406 else if(inCompiler)
16408 char type1String[1024];
16409 char type2String[1024];
16411 type1String[0] = '\0';
16412 type2String[0] = '\0';
16413 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
16414 PrintType(type1, type2String, 0, 1);
16415 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16416 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
16419 if(exp->__anon1.op.exp2->destType == dummy)
16422 exp->__anon1.op.exp2->destType = (((void *)0));
16424 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
16426 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16427 type2->refCount = 1;
16428 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
16429 type2->isSigned = 1;
16431 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))
16433 type2 = __extension__ ({
16434 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16436 __ecereInstance1->kind = 3, __ecereInstance1;
16438 type2->refCount = 1;
16439 type2->isSigned = 1;
16443 type2 = exp->__anon1.op.exp2->expType;
16449 if(exp->__anon1.op.op == SIZEOF)
16451 exp->expType = __extension__ ({
16452 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16454 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16456 exp->isConstant = 1;
16458 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
16460 exp->expType = Dereference(type2);
16461 if(type2 && type2->kind == 8)
16462 notByReference = 1;
16464 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
16465 exp->expType = Reference(type2);
16466 else if(exp->__anon1.op.op == LEFT_OP || exp->__anon1.op.op == RIGHT_OP)
16468 if(exp->__anon1.op.exp1->expType)
16470 exp->expType = exp->__anon1.op.exp1->expType;
16471 exp->expType->refCount++;
16478 if(exp->__anon1.op.exp1)
16480 if(exp->__anon1.op.exp1->destType)
16481 FreeType(exp->__anon1.op.exp1->destType);
16482 exp->__anon1.op.exp1->destType = MkClassType("bool");
16483 exp->__anon1.op.exp1->destType->truth = 1;
16484 if(!exp->__anon1.op.exp1->expType)
16485 ProcessExpressionType(exp->__anon1.op.exp1);
16487 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16488 FreeType(exp->__anon1.op.exp1->expType);
16489 exp->__anon1.op.exp1->expType = MkClassType("bool");
16490 exp->__anon1.op.exp1->expType->truth = 1;
16492 if(exp->__anon1.op.exp2)
16494 if(exp->__anon1.op.exp2->destType)
16495 FreeType(exp->__anon1.op.exp2->destType);
16496 exp->__anon1.op.exp2->destType = MkClassType("bool");
16497 exp->__anon1.op.exp2->destType->truth = 1;
16498 if(!exp->__anon1.op.exp2->expType)
16499 ProcessExpressionType(exp->__anon1.op.exp2);
16501 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16502 FreeType(exp->__anon1.op.exp2->expType);
16503 exp->__anon1.op.exp2->expType = MkClassType("bool");
16504 exp->__anon1.op.exp2->expType->truth = 1;
16507 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")))))
16509 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"))))
16511 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)))
16513 struct Type * intType;
16515 if(!type1->__anon1._class->__anon1.registered->dataType)
16516 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16517 if(!type2->__anon1._class->__anon1.registered->dataType)
16518 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16519 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
16520 if(exp->__anon1.op.exp1->destType)
16521 FreeType(exp->__anon1.op.exp1->destType);
16522 if(exp->__anon1.op.exp2->destType)
16523 FreeType(exp->__anon1.op.exp2->destType);
16524 exp->__anon1.op.exp1->destType = intType;
16525 exp->__anon1.op.exp2->destType = intType;
16526 intType->refCount++;
16530 if(exp->__anon1.op.exp2->destType)
16531 FreeType(exp->__anon1.op.exp2->destType);
16532 exp->__anon1.op.exp2->destType = type1;
16534 if(exp->__anon1.op.exp1->destType)
16535 FreeType(exp->__anon1.op.exp1->destType);
16536 exp->__anon1.op.exp1->destType = type2;
16539 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)
16540 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);
16541 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16543 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16547 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16549 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16550 ProcessExpressionType(exp->__anon1.op.exp1);
16551 if(type2->kind != 13)
16553 ProcessExpressionType(classExp);
16554 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16555 if(!exp->__anon1.op.exp2->expType)
16559 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16562 ProcessExpressionType(exp->__anon1.op.exp2);
16566 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)))
16568 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16569 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16570 exp->expType = type1;
16574 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)))
16576 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16577 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16578 exp->expType = type2;
16582 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))
16584 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16588 unsigned int success = 0;
16590 if(type1->kind == 13 && type2->kind == 13)
16592 if(exp->__anon1.op.op == '+')
16593 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16594 else if(exp->__anon1.op.op == '-')
16596 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16598 exp->expType = __extension__ ({
16599 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16601 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16604 if(type1->__anon1.type->kind == 20)
16606 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16610 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16612 ProcessExpressionType(classExp);
16614 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"))));
16615 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16623 if(!success && exp->__anon1.op.exp1->type == 2)
16625 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16628 FreeType(exp->expType);
16629 exp->expType = exp->__anon1.op.exp1->destType;
16630 if(exp->__anon1.op.exp1->destType)
16631 exp->__anon1.op.exp1->destType->refCount++;
16634 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16637 FreeType(exp->expType);
16638 exp->expType = exp->__anon1.op.exp2->destType;
16639 if(exp->__anon1.op.exp2->destType)
16640 exp->__anon1.op.exp2->destType->refCount++;
16646 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16649 FreeType(exp->expType);
16650 exp->expType = exp->__anon1.op.exp2->destType;
16651 if(exp->__anon1.op.exp2->destType)
16652 exp->__anon1.op.exp2->destType->refCount++;
16655 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16658 FreeType(exp->expType);
16659 exp->expType = exp->__anon1.op.exp1->destType;
16660 if(exp->__anon1.op.exp1->destType)
16661 exp->__anon1.op.exp1->destType->refCount++;
16667 char expString1[10240];
16668 char expString2[10240];
16672 expString1[0] = '\0';
16673 expString2[0] = '\0';
16678 PrintExpression(exp->__anon1.op.exp1, expString1);
16679 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16680 PrintExpression(exp->__anon1.op.exp2, expString2);
16681 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16682 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16683 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16685 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16689 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)
16691 if(exp->__anon1.op.exp1->destType)
16692 FreeType(exp->__anon1.op.exp1->destType);
16693 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16694 if(type2->__anon1._class->__anon1.registered->dataType)
16695 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16696 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16697 exp->expType = type2;
16701 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)
16703 if(exp->__anon1.op.exp2->destType)
16704 FreeType(exp->__anon1.op.exp2->destType);
16705 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16706 if(type1->__anon1._class->__anon1.registered->dataType)
16707 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16708 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16709 exp->expType = type1;
16715 unsigned int valid = 0;
16717 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
16719 if(exp->__anon1.op.exp2->destType)
16720 FreeType(exp->__anon1.op.exp2->destType);
16721 if(!type1->__anon1._class->__anon1.registered->dataType)
16722 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16723 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16724 exp->__anon1.op.exp2->destType->refCount++;
16725 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16728 type2 = exp->__anon1.op.exp2->destType;
16731 exp->expType = type2;
16734 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
16736 if(exp->__anon1.op.exp1->destType)
16737 FreeType(exp->__anon1.op.exp1->destType);
16738 if(!type2->__anon1._class->__anon1.registered->dataType)
16739 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16740 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16741 exp->__anon1.op.exp1->destType->refCount++;
16742 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16743 type1 = exp->__anon1.op.exp1->destType;
16744 exp->expType = type1;
16747 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16749 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
16750 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
16752 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16754 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16756 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16759 FreeType(exp->expType);
16760 exp->expType = exp->__anon1.op.exp2->expType;
16761 if(exp->__anon1.op.exp2->expType)
16762 exp->__anon1.op.exp2->expType->refCount++;
16766 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16768 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16771 FreeType(exp->expType);
16772 exp->expType = exp->__anon1.op.exp1->expType;
16773 if(exp->__anon1.op.exp1->expType)
16774 exp->__anon1.op.exp1->expType->refCount++;
16781 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16783 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16786 FreeType(exp->expType);
16787 exp->expType = exp->__anon1.op.exp1->expType;
16788 if(exp->__anon1.op.exp1->expType)
16789 exp->__anon1.op.exp1->expType->refCount++;
16793 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16795 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16798 FreeType(exp->expType);
16799 exp->expType = exp->__anon1.op.exp2->expType;
16800 if(exp->__anon1.op.exp2->expType)
16801 exp->__anon1.op.exp2->expType->refCount++;
16809 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))
16811 if(exp->__anon1.op.exp1->destType)
16812 FreeType(exp->__anon1.op.exp1->destType);
16813 exp->__anon1.op.exp1->destType = type2;
16815 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16818 FreeType(exp->expType);
16819 exp->expType = exp->__anon1.op.exp1->destType;
16820 if(exp->__anon1.op.exp1->destType)
16821 exp->__anon1.op.exp1->destType->refCount++;
16826 if(exp->__anon1.op.exp2->destType)
16827 FreeType(exp->__anon1.op.exp2->destType);
16828 exp->__anon1.op.exp2->destType = type1;
16830 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16833 FreeType(exp->expType);
16834 exp->expType = exp->__anon1.op.exp2->destType;
16835 if(exp->__anon1.op.exp2->destType)
16836 exp->__anon1.op.exp2->destType->refCount++;
16838 else if(type1 && type2)
16840 char expString1[10240];
16841 char expString2[10240];
16842 char type1String[1024];
16843 char type2String[1024];
16845 expString1[0] = '\0';
16846 expString2[0] = '\0';
16847 type1String[0] = '\0';
16848 type2String[0] = '\0';
16851 PrintExpression(exp->__anon1.op.exp1, expString1);
16852 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16853 PrintExpression(exp->__anon1.op.exp2, expString2);
16854 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16855 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
16856 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
16858 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
16859 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
16861 exp->expType = exp->__anon1.op.exp1->expType;
16862 if(exp->__anon1.op.exp1->expType)
16863 exp->__anon1.op.exp1->expType->refCount++;
16865 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16867 exp->expType = exp->__anon1.op.exp2->expType;
16868 if(exp->__anon1.op.exp2->expType)
16869 exp->__anon1.op.exp2->expType->refCount++;
16877 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16879 struct Type * oldType = exp->__anon1.op.exp1->expType;
16881 exp->__anon1.op.exp1->expType = (((void *)0));
16882 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16885 exp->__anon1.op.exp1->expType = oldType;
16887 if(exp->__anon1.op.exp1->destType)
16888 FreeType(exp->__anon1.op.exp1->destType);
16889 exp->__anon1.op.exp1->destType = type2;
16891 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16894 FreeType(exp->expType);
16895 exp->expType = exp->__anon1.op.exp1->destType;
16896 if(exp->__anon1.op.exp1->destType)
16897 exp->__anon1.op.exp1->destType->refCount++;
16901 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
16903 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16905 if(exp->__anon1.op.exp1->destType)
16906 FreeType(exp->__anon1.op.exp1->destType);
16907 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16908 if(type2->__anon1._class->__anon1.registered->dataType)
16909 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16910 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16912 if(exp->__anon1.op.op == '!')
16914 exp->expType = MkClassType("bool");
16915 exp->expType->truth = 1;
16919 exp->expType = type2;
16924 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
16926 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16928 if(exp->__anon1.op.exp2->destType)
16929 FreeType(exp->__anon1.op.exp2->destType);
16930 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16931 if(type1->__anon1._class->__anon1.registered->dataType)
16932 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16933 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16935 exp->expType = type1;
16941 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
16943 char expString[10000];
16945 expString[0] = '\0';
16948 PrintExpression(exp->__anon1.op.exp1, expString);
16949 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16952 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16954 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
16956 char expString[10240];
16958 expString[0] = '\0';
16961 PrintExpression(exp->__anon1.op.exp2, expString);
16962 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16965 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16969 FreeType(exp->expType);
16970 exp->expType = MkClassType("bool");
16971 exp->expType->truth = 1;
16973 if(exp->__anon1.op.op != SIZEOF)
16974 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
16975 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
16977 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
16979 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
16980 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
16981 yylloc = oldyylloc;
16990 struct Expression * e;
16992 exp->isConstant = 1;
16993 for(e = (*exp->__anon1.list).first; e; e = e->next)
16997 FreeType(e->destType);
16998 e->opDestType = exp->opDestType;
16999 e->destType = exp->destType;
17002 exp->destType->refCount++;
17005 ProcessExpressionType(e);
17006 if(!exp->expType && !e->next)
17008 exp->expType = e->expType;
17010 e->expType->refCount++;
17013 exp->isConstant = 0;
17015 e = (*exp->__anon1.list).first;
17016 if(!e->next && e->type == 8)
17018 struct Expression * next = exp->next, * prev = exp->prev;
17020 FreeType(exp->expType);
17021 FreeType(exp->destType);
17022 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
17026 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
17027 ProcessExpressionType(exp);
17033 struct Expression * e;
17035 exp->isConstant = 1;
17036 ProcessExpressionType(exp->__anon1.index.exp);
17037 if(!exp->__anon1.index.exp->isConstant)
17038 exp->isConstant = 0;
17039 if(exp->__anon1.index.exp->expType)
17041 struct Type * source = exp->__anon1.index.exp->expType;
17043 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
17045 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
17046 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
17048 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
17050 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
17051 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
17053 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
17055 if(type->kind == 8)
17056 type->constant = 1;
17057 else if(type->kind == 13)
17059 struct Type * t = type;
17061 while(t->kind == 13)
17062 t = t->__anon1.type;
17065 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
17070 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
17072 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
17075 FreeType(e->destType);
17076 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
17078 ProcessExpressionType(e);
17083 exp->isConstant = 0;
17086 exp->expType = Dereference(exp->__anon1.index.exp->expType);
17088 DeclareType(curExternal, exp->expType, 1, 0);
17093 struct Expression * e;
17094 struct Type * functionType;
17095 struct Type * methodType = (((void *)0));
17101 PrintExpression(exp->__anon1.call.exp, name);
17102 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
17104 PrintExpression(exp->__anon1.call.exp, name);
17107 if(exp->__anon1.call.exp->type == 0)
17109 struct Expression * idExp = exp->__anon1.call.exp;
17110 struct Identifier * id = idExp->__anon1.__anon1.identifier;
17112 if(!strcmp(id->string, "__builtin_frame_address"))
17114 exp->expType = ProcessTypeString("void *", 1);
17115 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17116 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17119 else if(!strcmp(id->string, "__ENDIAN_PAD"))
17121 exp->expType = ProcessTypeString("int", 1);
17122 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17123 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17126 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
17128 struct Expression * a = (((void *)0));
17129 struct Expression * b = (((void *)0));
17130 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
17132 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
17134 a = (*exp->__anon1.call.arguments).first;
17135 b = (*exp->__anon1.call.arguments).last;
17139 else if((*exp->__anon1.call.arguments).count == 1)
17141 a = (*exp->__anon1.call.arguments).first;
17146 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
17147 idExp->__anon1.__anon1.identifier = (((void *)0));
17148 FreeExpContents(exp);
17149 ProcessExpressionType(a);
17151 ProcessExpressionType(b);
17153 exp->__anon1.list = MkList();
17154 if(a->expType && (!b || b->expType))
17156 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
17160 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17161 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
17162 struct Declaration * decl;
17163 char temp1[1024], temp2[1024];
17165 GetTypeSpecs(a->expType, specs);
17166 if(a && !a->isConstant && a->type != 0)
17168 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
17169 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
17170 tempExp1 = QMkExpId(temp1);
17171 tempExp1->expType = a->expType;
17173 a->expType->refCount++;
17174 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
17176 if(b && !b->isConstant && b->type != 0)
17178 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
17179 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
17180 tempExp2 = QMkExpId(temp2);
17181 tempExp2->expType = b->expType;
17183 b->expType->refCount++;
17184 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
17186 decl = MkDeclaration(specs, decls);
17187 if(!curCompound->__anon1.compound.declarations)
17188 curCompound->__anon1.compound.declarations = MkList();
17189 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
17193 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
17195 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
17197 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
17198 exp->expType = a->expType;
17200 a->expType->refCount++;
17202 else if(!strcmp(id->string, "Abs"))
17204 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
17205 exp->expType = a->expType;
17207 a->expType->refCount++;
17209 else if(!strcmp(id->string, "Sgn"))
17211 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"))))));
17212 exp->expType = ProcessTypeString("int", 0);
17214 FreeExpression(tempExp1);
17216 FreeExpression(tempExp2);
17217 FreeIdentifier(id);
17223 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
17225 if(!exp->__anon1.call.exp->destType)
17227 exp->__anon1.call.exp->destType = dummy;
17230 ProcessExpressionType(exp->__anon1.call.exp);
17231 if(exp->__anon1.call.exp->destType == dummy)
17234 exp->__anon1.call.exp->destType = (((void *)0));
17238 functionType = exp->__anon1.call.exp->expType;
17239 if(functionType && functionType->kind == 16)
17241 methodType = functionType;
17242 functionType = methodType->__anon1.__anon3.method->dataType;
17243 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
17245 char typeString[1024];
17247 typeString[0] = '\0';
17249 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
17251 functionType->__anon1.__anon2.thisClass = (((void *)0));
17252 PrintType(functionType, typeString, 1, 1);
17253 functionType->__anon1.__anon2.thisClass = back;
17255 if(strstr(typeString, "thisclass"))
17257 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17258 struct Declarator * decl;
17261 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17263 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17264 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))
17265 thisClassParams = 0;
17266 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17268 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
17270 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
17271 ProcessDeclarator(decl, 1);
17272 thisClass = backupThisClass;
17274 thisClassParams = 1;
17275 functionType = ProcessType(specs, decl);
17276 functionType->refCount = 0;
17277 FinishTemplatesContext(context);
17279 struct Type * p, * op;
17281 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)
17284 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17287 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
17289 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17292 FreeList(specs, (void *)(FreeSpecifier));
17293 FreeDeclarator(decl);
17297 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
17299 struct Type * type = functionType->__anon1.type;
17301 if(!functionType->refCount)
17303 functionType->__anon1.type = (((void *)0));
17304 FreeType(functionType);
17306 functionType = type;
17308 if(functionType && functionType->kind != 11)
17310 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
17312 else if(functionType)
17314 unsigned int emptyParams = 0, noParams = 0;
17315 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
17316 struct Type * type = functionType->__anon1.__anon2.params.first;
17317 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
17319 struct Location oldyylloc = yylloc;
17323 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
17325 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
17328 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
17330 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)
17332 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
17335 e->destType = type;
17337 type = functionType->__anon1.__anon2.params.first;
17340 type->refCount = 0;
17342 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
17344 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
17345 type->byReference = functionType->byReference;
17346 type->typedByReference = functionType->typedByReference;
17349 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
17351 e->destType = type;
17353 type = functionType->__anon1.__anon2.params.first;
17356 type->refCount = 0;
17359 if(type && type->kind == 0)
17362 if(!type->refCount)
17364 type = (((void *)0));
17366 for(; e; e = e->next)
17368 if(!type && !emptyParams)
17371 if(methodType && methodType->__anon1.__anon3.methodClass)
17372 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);
17374 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);
17377 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
17379 struct Type * templatedType = (((void *)0));
17380 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
17381 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17384 if(_class && _class->templateArgs)
17386 struct __ecereNameSpace__ecere__com__Class * sClass;
17388 for(sClass = _class; sClass; sClass = sClass->base)
17390 if(sClass->templateClass)
17391 sClass = sClass->templateClass;
17393 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17395 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
17397 struct __ecereNameSpace__ecere__com__Class * nextClass;
17399 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17401 if(nextClass->templateClass)
17402 nextClass = nextClass->templateClass;
17403 id += nextClass->templateParams.count;
17413 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
17415 unsigned int constant = type->constant;
17416 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
17419 struct Context * context = SetupTemplatesContext(_class);
17421 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17422 FinishTemplatesContext(context);
17424 if(templatedType->kind == 8 && constant)
17425 templatedType->constant = 1;
17426 else if(templatedType->kind == 13)
17428 struct Type * t = templatedType->__anon1.type;
17430 while(t->kind == 13)
17431 t = t->__anon1.type;
17433 t->constant = constant;
17435 e->destType = templatedType;
17438 templatedType->passAsTemplate = 1;
17443 e->destType = type;
17450 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
17452 e->destType = type->prev;
17453 e->destType->refCount++;
17457 e->destType = type;
17462 if(type && type->kind != 14)
17464 struct Type * next = type->next;
17466 if(!type->refCount)
17471 if(type && type->kind != 14)
17473 if(methodType && methodType->__anon1.__anon3.methodClass)
17474 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);
17476 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);
17478 yylloc = oldyylloc;
17479 if(type && !type->refCount)
17484 functionType = __extension__ ({
17485 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17487 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17489 if(exp->__anon1.call.exp->type == 0)
17491 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17495 struct Symbol * symbol;
17496 struct Location oldyylloc = yylloc;
17498 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17499 if(strstr(string, "__builtin_") == string)
17503 functionType->__anon1.__anon2.returnType = exp->destType;
17504 exp->destType->refCount++;
17508 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17509 symbol = __extension__ ({
17510 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17512 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17514 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17515 if(strstr(symbol->string, "::"))
17516 globalContext->hasNameSpace = 1;
17517 yylloc = oldyylloc;
17520 else if(exp->__anon1.call.exp->type == 8)
17524 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17525 if(!functionType->__anon1.__anon2.returnType)
17527 functionType->__anon1.__anon2.returnType = __extension__ ({
17528 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17530 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17534 if(functionType && functionType->kind == 11)
17536 exp->expType = functionType->__anon1.__anon2.returnType;
17537 if(functionType->__anon1.__anon2.returnType)
17538 functionType->__anon1.__anon2.returnType->refCount++;
17539 if(!functionType->refCount)
17540 FreeType(functionType);
17542 if(exp->__anon1.call.arguments)
17544 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17545 ProcessExpressionType(e);
17551 struct Type * type;
17552 struct Location oldyylloc = yylloc;
17553 unsigned int thisPtr;
17554 struct Expression * checkExp = exp->__anon1.member.exp;
17558 if(checkExp->type == 11)
17559 checkExp = checkExp->__anon1.cast.exp;
17560 else if(checkExp->type == 5)
17561 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17565 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17566 exp->thisPtr = thisPtr;
17567 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17569 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17571 ProcessExpressionType(exp->__anon1.member.exp);
17572 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)
17574 exp->isConstant = 0;
17577 exp->isConstant = exp->__anon1.member.exp->isConstant;
17578 type = exp->__anon1.member.exp->expType;
17580 if(type && (type->kind == 20))
17582 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17583 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17587 for(param = _class->templateParams.first; param; param = param->next)
17589 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17593 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17595 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17599 struct Expression * expMember = exp->__anon1.member.exp;
17600 struct Declarator * decl;
17601 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17602 char thisClassTypeString[1024];
17604 FreeIdentifier(exp->__anon1.member.member);
17605 ProcessExpressionType(argExp);
17607 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17611 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17612 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17615 strcpy(thisClassTypeString, _class->fullName);
17617 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17618 exp->expType = ProcessType(specs, decl);
17619 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17621 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17622 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17623 int paramCount = 0;
17624 int lastParam = -1;
17625 char templateString[1024];
17626 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17628 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17629 for(cClass = expClass; cClass; cClass = cClass->base)
17633 for(param = cClass->templateParams.first; param; param = param->next)
17636 struct __ecereNameSpace__ecere__com__Class * sClass;
17637 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17639 for(sClass = cClass->base; sClass; sClass = sClass->base)
17640 id += sClass->templateParams.count;
17641 arg = expClass->templateArgs[id];
17642 for(sClass = _class; sClass; sClass = sClass->base)
17644 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17646 struct __ecereNameSpace__ecere__com__Class * nextClass;
17648 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17649 p += nextClass->templateParams.count;
17650 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17652 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17654 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17656 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17657 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17664 char argument[256];
17666 argument[0] = '\0';
17667 switch(param->type)
17671 char expString[1024];
17672 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17673 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17674 struct Expression * exp;
17675 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17677 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17678 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17679 ProcessExpressionType(exp);
17680 ComputeExpression(exp);
17681 expString[0] = '\0';
17682 PrintExpression(exp, expString);
17683 strcat(argument, expString);
17684 FreeExpression(exp);
17689 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17694 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17696 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17697 strcat(argument, thisClassTypeString);
17699 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17707 strcat(templateString, ", ");
17708 if(lastParam != p - 1)
17710 strcat(templateString, param->name);
17711 strcat(templateString, " = ");
17713 strcat(templateString, argument);
17722 int len = strlen(templateString);
17724 if(templateString[len - 1] == '>')
17725 templateString[len++] = ' ';
17726 templateString[len++] = '>';
17727 templateString[len++] = '\0';
17730 struct Context * context = SetupTemplatesContext(_class);
17732 FreeType(exp->expType);
17733 exp->expType = ProcessTypeString(templateString, 0);
17734 FinishTemplatesContext(context);
17737 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17738 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17740 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")))))))));
17743 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17745 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17748 if(type && (type->kind == 20))
17750 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)))
17752 struct Identifier * id = exp->__anon1.member.member;
17753 int typeKind = type->kind;
17754 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));
17756 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
17758 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
17763 if(typeKind == 3 || typeKind == 15)
17764 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
17767 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17769 _class = type->__anon1._class->__anon1.registered;
17771 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
17773 _class = FindClass("char *")->__anon1.registered;
17775 else if(type->kind == 13)
17777 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
17778 FreeType(exp->expType);
17779 exp->expType = ProcessTypeString("uintptr", 0);
17780 exp->byReference = 1;
17784 char string[1024] = "";
17785 struct Symbol * classSym;
17787 PrintTypeNoConst(type, string, 0, 1);
17788 classSym = FindClass(string);
17790 _class = classSym->__anon1.registered;
17796 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
17797 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
17798 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
17799 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
17800 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
17802 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
17803 exp->__anon1.member.memberType = 1;
17804 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
17805 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
17808 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
17810 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17811 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
17813 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17815 member = (((void *)0));
17817 if(!member && !prop)
17818 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17819 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
17820 exp->__anon1.member.thisPtr = 1;
17824 unsigned int useMemberForNonConst = 0;
17828 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
17829 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);
17830 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17831 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
17833 if((!prop || useMemberForNonConst) && !member)
17835 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
17838 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17839 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);
17840 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17841 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17846 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
17847 prop = (((void *)0));
17849 member = (((void *)0));
17853 if(!prop && !member && !method)
17854 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
17855 if(!prop && !member && !method)
17859 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
17862 exp->__anon1.member.memberType = 5;
17863 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
17867 char structName[1024];
17868 struct Identifier * id = exp->__anon1.member.member;
17869 struct Expression * classExp = exp->__anon1.member.exp;
17872 FreeType(classExp->expType);
17873 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
17874 strcpy(structName, "__ecereClassData_");
17875 FullClassNameCat(structName, type->__anon1._class->string, 0);
17877 exp->__anon1.member.member = id;
17878 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"))))))));
17880 ProcessExpressionType(exp);
17886 struct Symbol * classSym = FindClass(id->string);
17890 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
17893 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
17897 if(exp->__anon1.member.exp->destType)
17898 FreeType(exp->__anon1.member.exp->destType);
17900 if(method && !method->_class->symbol)
17901 method->_class->symbol = FindClass(method->_class->fullName);
17902 if(prop && !prop->_class->symbol)
17903 prop->_class->symbol = FindClass(prop->_class->fullName);
17904 exp->__anon1.member.exp->destType = __extension__ ({
17905 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17907 __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;
17912 exp->__anon1.member.memberType = 1;
17913 if(!prop->dataType)
17914 ProcessPropertyType(prop);
17915 exp->expType = prop->dataType;
17916 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
17918 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17920 CopyTypeInto(type, exp->expType);
17921 type->refCount = 1;
17922 type->constant = 1;
17923 exp->expType = type;
17925 else if(prop->dataType)
17926 prop->dataType->refCount++;
17930 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17932 FreeExpContents(exp);
17934 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17935 ProcessExpressionType(exp);
17938 exp->__anon1.member.memberType = 3;
17939 DeclareStruct(curExternal, _class->fullName, 0, 1);
17940 if(member->_class != _class)
17941 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
17942 if(!member->dataType)
17944 struct Context * context = SetupTemplatesContext(_class);
17946 member->dataType = ProcessTypeString(member->dataTypeString, 0);
17947 FinishTemplatesContext(context);
17949 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)
17950 member->dataType->bitMemberSize = ((struct __ecereNameSpace__ecere__com__BitMember *)member)->size;
17951 exp->expType = member->dataType;
17952 if(member->dataType)
17953 member->dataType->refCount++;
17955 else if(revConvert)
17957 exp->__anon1.member.memberType = 4;
17958 exp->expType = MkClassType(revConvert->_class->fullName);
17963 exp->__anon1.member.memberType = 2;
17965 if(!method->dataType)
17966 ProcessMethodType(method);
17967 exp->expType = __extension__ ({
17968 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17970 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
17972 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
17973 exp->expType->__anon1.__anon3.usedClass = _class;
17975 else if(!classProp)
17977 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17979 FreeExpContents(exp);
17981 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17982 FreeType(exp->expType);
17983 exp->expType = MkClassType("ecere::com::Class");
17986 yylloc = exp->__anon1.member.member->loc;
17987 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
17989 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
17991 if(_class && exp->expType)
17993 struct __ecereNameSpace__ecere__com__Class * tClass;
17995 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
17996 while(tClass && !tClass->templateClass)
17997 tClass = tClass->base;
17998 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
18001 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18002 struct __ecereNameSpace__ecere__com__Class * sClass;
18004 for(sClass = tClass; sClass; sClass = sClass->base)
18007 if(sClass->templateClass)
18008 sClass = sClass->templateClass;
18009 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18011 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
18013 for(sClass = sClass->base; sClass; sClass = sClass->base)
18014 id += sClass->templateParams.count;
18022 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
18024 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18025 struct Context * context = SetupTemplatesContext(tClass);
18026 unsigned int constant = exp->expType->constant;
18027 unsigned int passAsTemplate = 0;
18028 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
18029 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
18031 if(t && t->kind == 8 && t->__anon1._class)
18032 thisClassFrom = t->__anon1._class->__anon1.registered;
18034 thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
18036 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
18037 FreeType(exp->expType);
18038 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18039 exp->expType->thisClassFrom = thisClassFrom;
18040 if(exp->expType->kind == 8 && constant)
18041 exp->expType->constant = 1;
18042 else if(exp->expType->kind == 13)
18044 struct Type * t = exp->expType->__anon1.type;
18046 while(t->kind == 13)
18047 t = t->__anon1.type;
18049 t->constant = constant;
18053 if(exp->expType->kind == 21)
18055 FreeType(exp->expType);
18056 exp->expType = ReplaceThisClassType(_class);
18059 exp->expType->passAsTemplate = 1;
18062 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18063 if(exp->destType->kind == 8 && constant)
18064 exp->destType->constant = 1;
18065 else if(exp->destType->kind == 13)
18067 struct Type * t = exp->destType->__anon1.type;
18069 while(t->kind == 13)
18070 t = t->__anon1.type;
18072 t->constant = constant;
18074 if(exp->destType->kind == 21)
18076 FreeType(exp->destType);
18077 exp->destType = ReplaceThisClassType(_class);
18081 FinishTemplatesContext(context);
18084 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)
18087 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18088 struct __ecereNameSpace__ecere__com__Class * sClass;
18090 for(sClass = tClass; sClass; sClass = sClass->base)
18093 if(sClass->templateClass)
18094 sClass = sClass->templateClass;
18095 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18097 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
18099 for(sClass = sClass->base; sClass; sClass = sClass->base)
18100 id += sClass->templateParams.count;
18110 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18111 struct Context * context = SetupTemplatesContext(tClass);
18112 struct Type * basicType;
18114 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18117 if(basicType->kind == 21)
18119 FreeType(basicType);
18120 basicType = ReplaceThisClassType(_class);
18122 FreeType(exp->expType);
18123 exp->expType = __extension__ ({
18124 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18126 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
18130 exp->destType = exp->expType;
18131 exp->destType->refCount++;
18134 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18135 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18136 struct Declarator * decl;
18138 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18141 exp->destType->refCount++;
18143 exp->expType->refCount++;
18145 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
18146 exp->__anon1.cast.exp = newExp;
18149 FinishTemplatesContext(context);
18152 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
18154 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
18158 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
18160 int paramCount = 0;
18161 int lastParam = -1;
18162 char templateString[1024];
18163 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
18165 sprintf(templateString, "%s<", expClass->templateClass->fullName);
18166 while(cClass != expClass)
18168 struct __ecereNameSpace__ecere__com__Class * sClass;
18170 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
18173 for(param = cClass->templateParams.first; param; param = param->next)
18175 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
18177 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
18178 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
18180 while(cClassCur != tClass && !paramCur)
18182 struct __ecereNameSpace__ecere__com__Class * sClassCur;
18184 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
18186 cClassCur = sClassCur;
18187 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
18189 if(!strcmp(paramCur->name, param->name))
18196 if(paramCur && paramCur->type == 0)
18197 arg = tClass->templateArgs[cp];
18199 arg = expClass->templateArgs[p];
18201 char argument[256];
18203 argument[0] = '\0';
18204 switch(param->type)
18208 char expString[1024];
18209 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18210 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
18211 struct Expression * exp;
18212 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
18214 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
18215 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
18216 ProcessExpressionType(exp);
18217 ComputeExpression(exp);
18218 expString[0] = '\0';
18219 PrintExpression(exp, expString);
18220 strcat(argument, expString);
18221 FreeExpression(exp);
18226 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
18231 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
18232 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18239 strcat(templateString, ", ");
18240 if(lastParam != p - 1)
18242 strcat(templateString, param->name);
18243 strcat(templateString, " = ");
18245 strcat(templateString, argument);
18254 int len = strlen(templateString);
18256 if(templateString[len - 1] == '>')
18257 templateString[len++] = ' ';
18258 templateString[len++] = '>';
18259 templateString[len++] = '\0';
18261 FreeType(exp->expType);
18263 struct Context * context = SetupTemplatesContext(tClass);
18265 exp->expType = ProcessTypeString(templateString, 0);
18266 FinishTemplatesContext(context);
18273 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)");
18275 else if(type && (type->kind == 9 || type->kind == 10))
18277 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
18281 exp->expType = memberType;
18283 memberType->refCount++;
18288 char expString[10240];
18290 expString[0] = '\0';
18293 PrintExpression(exp, expString);
18294 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18296 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
18298 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
18300 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
18302 struct Identifier * id = exp->__anon1.member.member;
18303 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));
18307 FreeType(exp->expType);
18308 exp->expType = ReplaceThisClassType(_class);
18312 yylloc = oldyylloc;
18317 struct Type * destType = exp->destType;
18319 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
18321 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
18323 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
18327 ProcessExpressionType(exp);
18334 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
18336 if(classSym && classSym->__anon1.registered)
18338 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
18341 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
18344 DeclareStruct(curExternal, classSym->string, 0, 1);
18345 FreeSpecifier(exp->__anon1._class);
18346 FullClassNameCat(name, classSym->string, 0);
18350 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
18354 struct Expression * e;
18357 if(b->structSize == b->offset)
18358 exp->__anon1.op.exp1 = MkExpConstant("0");
18360 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18361 exp->__anon1.op.op = '+';
18363 while(b->offset != 0)
18365 struct Symbol * sym;
18366 struct Expression * typeSize;
18369 sym = FindClass(b->fullName);
18371 DeclareStruct(curExternal, sym->string, 0, 1);
18372 FullClassNameCat(name, sym->string, 0);
18373 if(b->structSize == b->offset)
18374 typeSize = MkExpConstant("0");
18376 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18377 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
18378 e = e->__anon1.op.exp2;
18384 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
18386 FreeSpecifier(exp->__anon1._class);
18387 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
18392 char className[1024];
18394 strcpy(className, "__ecereClass_");
18395 FullClassNameCat(className, classSym->string, 1);
18396 DeclareClass(curExternal, classSym, className);
18397 FreeExpContents(exp);
18399 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
18400 exp->__anon1.member.member = MkIdentifier("structSize");
18404 exp->expType = __extension__ ({
18405 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18407 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18413 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
18415 exp->expType = __extension__ ({
18416 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18418 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18420 exp->isConstant = 1;
18421 DeclareType(curExternal, type, 1, 0);
18427 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
18430 FreeType(exp->__anon1.cast.exp->destType);
18431 exp->__anon1.cast.exp->destType = type;
18434 ProcessExpressionType(exp->__anon1.cast.exp);
18437 exp->expType = type;
18438 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
18440 void * prev = exp->prev, * next = exp->next;
18441 struct Type * expType = exp->__anon1.cast.exp->destType;
18442 struct Expression * castExp = exp->__anon1.cast.exp;
18443 struct Type * destType = exp->destType;
18446 expType->refCount++;
18447 FreeType(exp->expType);
18448 FreeTypeName(exp->__anon1.cast.typeName);
18450 FreeType(exp->expType);
18451 FreeType(exp->destType);
18452 exp->expType = expType;
18453 exp->destType = destType;
18454 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
18460 exp->isConstant = exp->__anon1.cast.exp->isConstant;
18466 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
18468 exp->expType = type;
18473 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
18475 ProcessExpressionType(exp->__anon1.vaArg.exp);
18476 exp->expType = type;
18481 struct Expression * e;
18482 struct Type * t = exp->destType;
18484 if(t && !exp->destType->casted)
18486 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18487 CopyTypeInto(t, exp->destType);
18492 exp->isConstant = 1;
18493 FreeType(exp->__anon1.cond.cond->destType);
18494 exp->__anon1.cond.cond->destType = MkClassType("bool");
18495 exp->__anon1.cond.cond->destType->truth = 1;
18496 ProcessExpressionType(exp->__anon1.cond.cond);
18497 if(!exp->__anon1.cond.cond->isConstant)
18498 exp->isConstant = 0;
18499 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18503 FreeType(e->destType);
18506 e->destType->refCount++;
18508 ProcessExpressionType(e);
18511 exp->expType = e->expType;
18513 e->expType->refCount++;
18516 exp->isConstant = 0;
18518 FreeType(exp->__anon1.cond.elseExp->destType);
18519 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18520 if(exp->__anon1.cond.elseExp->destType)
18521 exp->__anon1.cond.elseExp->destType->refCount++;
18522 ProcessExpressionType(exp->__anon1.cond.elseExp);
18523 if(!exp->__anon1.cond.elseExp->isConstant)
18524 exp->isConstant = 0;
18530 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18532 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18534 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18536 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18538 exp->destType->refCount++;
18540 ProcessStatement(exp->__anon1.compound);
18541 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18543 exp->expType->refCount++;
18549 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18551 if(spec && spec->type == 1)
18553 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18554 exp->expType->kind = 19;
18555 exp->byReference = 1;
18559 exp->expType = MkClassType("ecere::com::Class");
18560 exp->byReference = 1;
18566 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18570 struct Identifier * id = exp->__anon1.classData.id;
18571 char structName[1024];
18572 struct Expression * classExp;
18574 strcpy(structName, "__ecereClassData_");
18575 FullClassNameCat(structName, _class->fullName, 0);
18577 exp->__anon1.member.member = id;
18578 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18579 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18581 classExp = MkExpIdentifier(MkIdentifier("class"));
18582 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"))))))));
18583 ProcessExpressionType(exp);
18590 struct Type * type = (((void *)0));
18591 const char * typeString = (((void *)0));
18592 char typeStringBuf[1024];
18594 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))
18596 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18598 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18600 else if(exp->__anon1.list)
18602 struct Expression * e;
18604 for(e = (*exp->__anon1.list).first; e; e = e->next)
18606 ProcessExpressionType(e);
18616 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18620 e->expType = (((void *)0));
18621 e = (*exp->__anon1.list).first;
18622 ProcessExpressionType(e);
18625 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18627 FreeType(e->expType);
18628 e->expType = (((void *)0));
18630 type = (((void *)0));
18638 FreeType(e->expType);
18639 e->expType = (((void *)0));
18645 typeStringBuf[0] = '\0';
18646 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18647 typeString = typeStringBuf;
18649 type = (((void *)0));
18654 char templateString[1024];
18655 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18656 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18657 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18658 struct Expression * expExt;
18659 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18661 sprintf(templateString, "Container<%s>", typeString);
18662 if(exp->__anon1.list)
18664 struct Expression * e;
18666 type = ProcessTypeString(typeString, 0);
18667 while((e = (*exp->__anon1.list).first))
18669 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18670 e->destType = type;
18672 ProcessExpressionType(e);
18673 ListAdd(initializers, MkInitializerAssignment(e));
18676 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18678 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18679 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18680 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18681 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18682 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18683 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18684 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18685 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18686 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18687 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18688 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18690 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18692 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18693 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18694 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18695 exp->expType = ProcessTypeString(templateString, 0);
18697 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18698 ProcessExpressionType(expExt);
18702 exp->expType = ProcessTypeString("Container", 0);
18703 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18708 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18710 FreeType(exp->expType);
18711 exp->expType = ReplaceThisClassType(thisClass);
18713 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)
18715 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18719 if(exp->expType->kind != 15)
18721 struct Type * member;
18722 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18724 FreeType(exp->expType);
18725 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18726 exp->expType->kind = symbol->type->kind;
18727 exp->expType->refCount++;
18728 exp->expType->__anon1.__anon1.enumName = enumName;
18729 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18730 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18731 member->refCount++;
18735 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18737 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18739 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);
18741 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18746 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)))
18748 exp->byReference = 1;
18751 if(exp->destType && (exp->destType->kind == 18))
18753 else if(exp->destType && !exp->destType->keepCast)
18755 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
18756 exp->needTemplateCast = 1;
18757 if(exp->destType->kind == 0)
18759 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
18761 unsigned int invalidCast = 0;
18763 if(inCompiler && exp->destType->count && exp->expType)
18765 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
18766 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
18768 if(c1 && c1->type != 1)
18769 c1 = (((void *)0));
18770 if(c2 && c2->type != 1)
18771 c2 = (((void *)0));
18772 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
18775 if(!exp->destType->count || unresolved || invalidCast)
18780 if(exp->destType->kind != 14)
18787 char expString[10240];
18789 expString[0] = '\0';
18790 PrintType(exp->destType, type2, 0, 1);
18793 PrintExpression(exp, expString);
18794 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18797 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
18798 else if(exp->type != 16)
18799 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
18804 char expString[10240];
18806 expString[0] = '\0';
18809 PrintExpression(exp, expString);
18810 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18813 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
18814 else if(exp->type != 16)
18815 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18827 PrintType(exp->expType, type1, 0, 1);
18828 PrintType(exp->destType, type2, 0, 1);
18830 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)))
18834 struct Expression * nbExp = GetNonBracketsExp(exp);
18835 unsigned int skipWarning = 0;
18836 int kind = exp->destType->kind;
18838 if(nbExp->type == 12 && !nbExp->destType->casted && nbExp->destType->kind == exp->destType->kind)
18840 if((kind == 1 || kind == 2) && exp->destType->isSigned == exp->expType->signedBeforePromotion && nbExp->type == 4 && nbExp->__anon1.op.exp1 && nbExp->__anon1.op.exp2)
18842 int op = nbExp->__anon1.op.op;
18843 struct Expression * nbExp1, * nbExp2;
18850 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18851 from = nbExp1->expType->promotedFrom;
18852 if(from == 1 || (kind == 2 && from == 2))
18857 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18858 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18859 from = nbExp1->expType->promotedFrom;
18860 if(op == RIGHT_OP && (from == 1 || (kind == 2 && from == 2)))
18862 else if(nbExp2->isConstant && nbExp2->type == 2 && (nbExp->__anon1.op.op == RIGHT_OP || nbExp1->expType->bitMemberSize))
18864 int n = strtol(nbExp2->__anon1.__anon1.constant, (((void *)0)), 0);
18865 int s = from == 1 ? 8 : 16;
18867 if(nbExp1->expType->bitMemberSize && nbExp1->expType->bitMemberSize < s)
18868 s = nbExp1->expType->bitMemberSize;
18869 if(nbExp->__anon1.op.op == RIGHT_OP)
18873 if(s <= (kind == 1 ? 8 : 16))
18878 if(!exp->destType->isSigned)
18880 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18881 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18882 from = nbExp2->expType->promotedFrom;
18883 if((from == 1 || from == 2) && nbExp1->isConstant && nbExp1->type == 2)
18885 int n = strtol(nbExp1->__anon1.__anon1.constant, (((void *)0)), 0);
18887 if(n == (from == 1 ? 255 : 65535))
18896 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18897 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18898 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
18899 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
18900 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)))
18908 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18909 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18910 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
18911 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
18912 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)))
18920 char expString[10240];
18922 expString[0] = '\0';
18925 PrintExpression(exp, expString);
18926 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18928 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")))
18931 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18933 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18938 FreeType(exp->expType);
18939 exp->destType->refCount++;
18940 exp->expType = exp->destType;
18946 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))
18948 struct Expression * nbExp = GetNonBracketsExp(exp);
18950 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
18952 struct Expression * e = MoveExpContents(exp);
18954 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
18956 exp->__anon1.cast.exp->destType = exp->destType;
18958 exp->destType->refCount++;
18959 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
18963 else if(unresolved)
18965 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
18966 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);
18967 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
18968 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
18970 else if(!exp->expType && exp->type != 16)
18972 char expString[10240];
18974 expString[0] = '\0';
18977 PrintExpression(exp, expString);
18978 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18980 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18983 ApplyAnyObjectLogic(exp);
18984 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)))
18986 exp->byReference = 1;
18988 yylloc = oldyylloc;
18991 static void ProcessFunction(struct FunctionDefinition * function)
18993 struct Identifier * id = GetDeclId(function->declarator);
18994 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18995 struct Type * type = symbol ? symbol->type : (((void *)0));
18996 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18997 struct Context * oldTopContext = topContext;
18999 yylloc = function->loc;
19000 if(type && type->__anon1.__anon2.thisClass)
19002 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
19003 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
19004 char className[1024];
19005 char structName[1024];
19006 struct Declarator * funcDecl;
19007 struct Symbol * thisSymbol;
19008 unsigned int typedObject = 0;
19010 if(_class && !_class->base)
19012 _class = currentClass;
19013 if(_class && !_class->symbol)
19014 _class->symbol = FindClass(_class->fullName);
19015 classSym = _class ? _class->symbol : (((void *)0));
19018 thisClass = _class;
19019 if(inCompiler && _class)
19021 if(type->kind == 11)
19023 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
19025 struct Type * param = symbol->type->__anon1.__anon2.params.first;
19027 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
19030 if(type->classObjectType != 1)
19032 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
19033 symbol->type->__anon1.__anon2.staticMethod = 1;
19034 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
19035 symbol->type->extraParam = 0;
19038 strcpy(className, "__ecereClass_");
19039 FullClassNameCat(className, _class->fullName, 1);
19041 FullClassNameCat(structName, _class->fullName, 0);
19042 funcDecl = GetFuncDecl(function->declarator);
19045 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19047 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19049 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19051 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19052 FreeTypeName(param);
19055 if(!function->propertyNoThis)
19057 struct TypeName * thisParam = (((void *)0));
19059 if(type->classObjectType != 1)
19061 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19062 if(!funcDecl->__anon1.function.parameters)
19063 funcDecl->__anon1.function.parameters = MkList();
19064 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19068 if(type->classObjectType != 1)
19070 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
19071 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
19073 thisParam = __extension__ ({
19074 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
19076 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
19078 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
19079 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19083 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19085 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19087 funcDecl = GetFuncDecl(initDecl->declarator);
19090 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19092 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19094 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19096 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19097 FreeTypeName(param);
19100 if(type->classObjectType != 1)
19102 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
19104 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19106 if(!funcDecl->__anon1.function.parameters)
19107 funcDecl->__anon1.function.parameters = MkList();
19108 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19116 if(type->classObjectType != 1)
19118 thisSymbol = __extension__ ({
19119 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
19121 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
19123 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19124 if(typedObject && thisSymbol->type)
19126 thisSymbol->type->classObjectType = 2;
19127 thisSymbol->type->byReference = type->byReference;
19128 thisSymbol->type->typedByReference = type->byReference;
19132 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
19134 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
19137 struct __ecereNameSpace__ecere__com__Class * base;
19139 for(base = _class; base && base->type != 1000; base = base->next)
19141 for(member = base->membersAndProperties.first; member; member = member->next)
19142 if(!member->isProperty)
19148 for(member = _class->membersAndProperties.first; member; member = member->next)
19149 if(!member->isProperty)
19153 char pointerName[1024];
19154 struct Declaration * decl;
19155 struct Initializer * initializer;
19156 struct Expression * exp, * bytePtr;
19158 strcpy(pointerName, "__ecerePointer_");
19159 FullClassNameCat(pointerName, _class->fullName, 0);
19161 char className[1024];
19163 strcpy(className, "__ecereClass_");
19164 FullClassNameCat(className, classSym->string, 1);
19165 DeclareClass(curExternal, classSym, className);
19167 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
19170 struct Expression * e;
19172 if(_class->offset && _class->offset == _class->base->structSize)
19174 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
19175 ProcessExpressionType(e);
19181 sprintf(string, "%d", _class->offset);
19182 e = MkExpConstant(string);
19184 exp = QBrackets(MkExpOp(bytePtr, '+', e));
19188 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
19190 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
19191 exp->expType = __extension__ ({
19192 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19194 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
19195 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19197 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
19198 }), __ecereInstance2;
19202 yylloc = function->body->loc;
19203 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
19205 struct Context * prevContext = curContext;
19206 struct __ecereNameSpace__ecere__sys__OldList * list;
19208 curContext = function->body->__anon1.compound.context;
19209 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
19210 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
19211 curContext = prevContext;
19213 decl->symbol = (((void *)0));
19214 if(!function->body->__anon1.compound.declarations)
19215 function->body->__anon1.compound.declarations = MkList();
19216 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
19222 thisClass = (((void *)0));
19225 FreeSpecifier(id->_class);
19226 id->_class = (((void *)0));
19227 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19229 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19231 id = GetDeclId(initDecl->declarator);
19232 FreeSpecifier(id->_class);
19233 id->_class = (((void *)0));
19237 topContext = function->body->__anon1.compound.context;
19239 struct FunctionDefinition * oldFunction = curFunction;
19241 curFunction = function;
19243 ProcessStatement(function->body);
19244 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
19246 struct Statement * prevCompound = curCompound;
19247 struct Context * prevContext = curContext;
19248 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
19250 if(!function->body->__anon1.compound.statements)
19251 function->body->__anon1.compound.statements = MkList();
19252 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
19253 curCompound = function->body;
19254 curContext = function->body->__anon1.compound.context;
19255 ProcessStatement(fireWatchers);
19256 curContext = prevContext;
19257 curCompound = prevCompound;
19259 curFunction = oldFunction;
19261 if(function->declarator)
19263 ProcessDeclarator(function->declarator, 1);
19265 topContext = oldTopContext;
19266 thisClass = oldThisClass;
19269 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
19271 struct ClassDef * def;
19272 struct External * external = curExternal;
19273 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
19275 for(def = definitions->first; def; def = def->next)
19279 if(def->__anon1.function->declarator)
19280 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
19282 curExternal = external;
19283 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
19285 else if(def->type == 2)
19287 if(def->__anon1.decl->type == 2)
19289 thisClass = regClass;
19290 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
19291 thisClass = (((void *)0));
19295 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
19298 thisClass = regClass;
19299 ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
19300 thisClass = backThisClass;
19303 else if(def->type == 1 && def->__anon1.defProperties)
19305 struct MemberInit * defProperty;
19306 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);
19308 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19309 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
19311 thisClass = regClass;
19312 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
19313 thisClass = (((void *)0));
19315 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19316 FreeSymbol(thisSymbol);
19318 else if(def->type == 3 && def->__anon1.propertyDef)
19320 struct PropertyDef * prop = def->__anon1.propertyDef;
19322 thisClass = regClass;
19327 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19329 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19331 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
19332 ProcessStatement(prop->setStmt);
19338 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19340 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19342 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
19343 ProcessStatement(prop->getStmt);
19345 if(prop->issetStmt)
19349 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19351 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19353 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
19354 ProcessStatement(prop->issetStmt);
19356 thisClass = (((void *)0));
19358 else if(def->type == 4 && def->__anon1.propertyWatch)
19360 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
19362 thisClass = regClass;
19363 if(propertyWatch->compound)
19365 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);
19367 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19368 curExternal = (((void *)0));
19369 ProcessStatement(propertyWatch->compound);
19371 thisClass = (((void *)0));
19376 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19378 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19380 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19381 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19382 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19383 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19384 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19385 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19386 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19387 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19388 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19389 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19390 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19391 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19392 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19393 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19394 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19395 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19396 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19397 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19398 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19399 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19400 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19401 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19402 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19403 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19404 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19405 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19406 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19407 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19408 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19409 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19410 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19411 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19412 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19413 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19414 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19415 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19416 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19417 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19418 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19419 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19420 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19421 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19422 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19423 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19424 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19425 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19426 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19427 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19428 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19429 __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);
19430 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19431 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19432 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19433 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19434 __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);
19435 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19436 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19437 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19438 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19439 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19440 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19441 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19442 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19443 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19444 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19445 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19446 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19447 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19448 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19449 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19450 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)
19451 __ecereClass_Conversion = class;
19452 __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);
19453 __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);
19454 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19455 __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);
19456 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19457 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19458 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19459 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19460 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19461 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19462 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19463 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19464 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19465 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19466 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19467 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19468 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19469 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19470 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19471 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19472 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19473 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19474 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19475 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19476 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19477 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);