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, BUILTIN_OFFSETOF = 374
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;
1385 struct TypeName * typeName;
1386 struct Identifier * id;
1387 } ecere_gcc_struct offset;
1388 } ecere_gcc_struct __anon1;
1389 unsigned int debugValue;
1390 struct __ecereNameSpace__ecere__com__DataValue val;
1392 unsigned int hasAddress;
1393 struct Type * expType;
1394 struct Type * destType;
1397 unsigned int byReference;
1398 unsigned int isConstant;
1399 unsigned int addedThis;
1400 unsigned int needCast;
1401 unsigned int thisPtr;
1402 unsigned int opDestType;
1403 unsigned int needTemplateCast;
1406 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
1410 struct Initializer * prev;
1411 struct Initializer * next;
1412 struct Location loc;
1416 struct Expression * exp;
1417 struct __ecereNameSpace__ecere__sys__OldList * list;
1418 } ecere_gcc_struct __anon1;
1419 unsigned int isConstant;
1420 struct Identifier * id;
1423 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
1425 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
1427 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
1429 struct InitDeclarator
1431 struct InitDeclarator * prev;
1432 struct InitDeclarator * next;
1433 struct Location loc;
1434 struct Declarator * declarator;
1435 struct Initializer * initializer;
1438 void ApplyLocation(struct Expression * exp, struct Location * loc)
1444 if(exp->__anon1.op.exp1)
1445 ApplyLocation(exp->__anon1.op.exp1, loc);
1446 if(exp->__anon1.op.exp2)
1447 ApplyLocation(exp->__anon1.op.exp2, loc);
1450 if(exp->__anon1.list)
1452 struct Expression * e;
1454 for(e = (*exp->__anon1.list).first; e; e = e->next)
1455 ApplyLocation(e, loc);
1459 if(exp->__anon1.index.index)
1461 struct Expression * e;
1463 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
1464 ApplyLocation(e, loc);
1466 if(exp->__anon1.index.exp)
1467 ApplyLocation(exp->__anon1.index.exp, loc);
1470 if(exp->__anon1.call.arguments)
1472 struct Expression * arg;
1474 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
1475 ApplyLocation(arg, loc);
1477 if(exp->__anon1.call.exp)
1478 ApplyLocation(exp->__anon1.call.exp, loc);
1482 if(exp->__anon1.member.exp)
1483 ApplyLocation(exp->__anon1.member.exp, loc);
1486 if(exp->__anon1.cast.exp)
1487 ApplyLocation(exp->__anon1.cast.exp, loc);
1490 if(exp->__anon1.cond.exp)
1492 struct Expression * e;
1494 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
1495 ApplyLocation(e, loc);
1497 if(exp->__anon1.cond.cond)
1498 ApplyLocation(exp->__anon1.cond.cond, loc);
1499 if(exp->__anon1.cond.elseExp)
1500 ApplyLocation(exp->__anon1.cond.elseExp, loc);
1503 if(exp->__anon1.vaArg.exp)
1504 ApplyLocation(exp->__anon1.vaArg.exp, loc);
1511 void __ecereMethod_Expression_Clear();
1517 struct MembersInit * prev;
1518 struct MembersInit * next;
1519 struct Location loc;
1523 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1524 struct ClassFunction * function;
1525 } ecere_gcc_struct __anon1;
1528 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
1534 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1535 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1536 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1537 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1538 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1539 unsigned int (* Neg)(struct Expression *, struct Operand *);
1540 unsigned int (* Inc)(struct Expression *, struct Operand *);
1541 unsigned int (* Dec)(struct Expression *, struct Operand *);
1542 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1543 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1544 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1545 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1546 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1547 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1548 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1549 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1550 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1551 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1552 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1553 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1554 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1555 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1556 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1557 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1558 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1559 unsigned int (* Not)(struct Expression *, struct Operand *);
1560 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1561 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1562 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1563 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1564 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1565 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1566 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1567 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1568 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1575 unsigned int ptrSize;
1588 } ecere_gcc_struct __anon1;
1592 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl);
1594 struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference)
1596 return _DeclareStruct(neededBy, name, skipNoHead, needDereference, 0);
1599 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl);
1601 void DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1603 _DeclareType(neededFor, type, needDereference, forFunctionDef, 0);
1606 void DeclareTypeForwardDeclare(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1608 _DeclareType(neededFor, type, needDereference, forFunctionDef, 1);
1611 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst);
1613 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1615 _PrintType(type, string, printName, fullName, 1);
1618 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1620 _PrintType(type, string, printName, fullName, 0);
1623 struct __ecereNameSpace__ecere__com__Method;
1625 struct __ecereNameSpace__ecere__com__Method
1628 struct __ecereNameSpace__ecere__com__Method * parent;
1629 struct __ecereNameSpace__ecere__com__Method * left;
1630 struct __ecereNameSpace__ecere__com__Method * right;
1635 struct __ecereNameSpace__ecere__com__Class * _class;
1637 const char * dataTypeString;
1638 struct Type * dataType;
1645 struct Symbol * parent;
1646 struct Symbol * left;
1647 struct Symbol * right;
1652 struct __ecereNameSpace__ecere__com__Method * method;
1653 struct __ecereNameSpace__ecere__com__Property * _property;
1654 struct __ecereNameSpace__ecere__com__Class * registered;
1655 } ecere_gcc_struct __anon1;
1656 unsigned int notYetDeclared;
1661 struct External * pointerExternal;
1662 struct External * structExternal;
1663 } ecere_gcc_struct __anon1;
1666 struct External * externalGet;
1667 struct External * externalSet;
1668 struct External * externalPtr;
1669 struct External * externalIsSet;
1670 } ecere_gcc_struct __anon2;
1673 struct External * methodExternal;
1674 struct External * methodCodeExternal;
1675 } ecere_gcc_struct __anon3;
1676 } ecere_gcc_struct __anon2;
1677 unsigned int imported;
1678 unsigned int declaredStructSym;
1679 struct __ecereNameSpace__ecere__com__Class * _class;
1680 unsigned int declaredStruct;
1681 unsigned int needConstructor;
1682 unsigned int needDestructor;
1683 char * constructorName;
1686 char * destructorName;
1687 struct ModuleImport * module;
1688 struct ClassImport * _import;
1689 struct Location nameLoc;
1690 unsigned int isParam;
1691 unsigned int isRemote;
1692 unsigned int isStruct;
1693 unsigned int fireWatchersDone;
1695 unsigned int classData;
1696 unsigned int isStatic;
1698 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
1699 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1700 struct Context * ctx;
1702 struct Expression * propCategory;
1703 unsigned int mustRegister;
1706 struct __ecereNameSpace__ecere__com__ClassProperty;
1708 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1710 struct __ecereNameSpace__ecere__com__ClassProperty
1713 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1714 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1715 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1717 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1718 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1719 const char * dataTypeString;
1720 struct Type * dataType;
1721 unsigned int constant;
1724 struct __ecereNameSpace__ecere__com__BitMember;
1726 struct __ecereNameSpace__ecere__com__BitMember
1728 struct __ecereNameSpace__ecere__com__BitMember * prev;
1729 struct __ecereNameSpace__ecere__com__BitMember * next;
1731 unsigned int isProperty;
1734 struct __ecereNameSpace__ecere__com__Class * _class;
1735 const char * dataTypeString;
1736 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1737 struct Type * dataType;
1744 struct __ecereNameSpace__ecere__com__DataMember;
1746 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1752 const char * dataTypeString;
1753 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1754 } ecere_gcc_struct __anon1;
1755 struct __ecereNameSpace__ecere__com__DataValue expression;
1758 const char * memberString;
1761 struct __ecereNameSpace__ecere__com__DataMember * member;
1762 struct __ecereNameSpace__ecere__com__Property * prop;
1763 struct __ecereNameSpace__ecere__com__Method * method;
1764 } ecere_gcc_struct __anon1;
1765 } ecere_gcc_struct __anon2;
1766 } ecere_gcc_struct __anon1;
1769 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);
1771 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);
1773 struct TemplateParameter;
1775 struct TemplateParameter
1777 struct TemplateParameter * prev;
1778 struct TemplateParameter * next;
1779 struct Location loc;
1781 struct Identifier * identifier;
1784 struct TemplateDatatype * dataType;
1786 } ecere_gcc_struct __anon1;
1787 struct TemplateArgument * defaultArgument;
1788 const char * dataTypeString;
1789 struct Type * baseType;
1799 struct Symbol * _class;
1802 struct __ecereNameSpace__ecere__sys__OldList members;
1804 } ecere_gcc_struct __anon1;
1807 struct Type * returnType;
1808 struct __ecereNameSpace__ecere__sys__OldList params;
1809 struct Symbol * thisClass;
1810 unsigned int staticMethod;
1811 struct TemplateParameter * thisClassTemplate;
1812 } ecere_gcc_struct __anon2;
1815 struct __ecereNameSpace__ecere__com__Method * method;
1816 struct __ecereNameSpace__ecere__com__Class * methodClass;
1817 struct __ecereNameSpace__ecere__com__Class * usedClass;
1818 } ecere_gcc_struct __anon3;
1821 struct Type * arrayType;
1823 struct Expression * arraySizeExp;
1824 unsigned int freeExp;
1825 struct Symbol * enumClass;
1826 } ecere_gcc_struct __anon4;
1828 struct TemplateParameter * templateParameter;
1829 } ecere_gcc_struct __anon1;
1834 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1836 int classObjectType;
1838 unsigned int offset;
1842 unsigned int isSigned : 1;
1843 unsigned int constant : 1;
1844 unsigned int truth : 1;
1845 unsigned int byReference : 1;
1846 unsigned int extraParam : 1;
1847 unsigned int directClassAccess : 1;
1848 unsigned int computing : 1;
1849 unsigned int keepCast : 1;
1850 unsigned int passAsTemplate : 1;
1851 unsigned int dllExport : 1;
1852 unsigned int attrStdcall : 1;
1853 unsigned int declaredWithStruct : 1;
1854 unsigned int typedByReference : 1;
1855 unsigned int casted : 1;
1856 unsigned int pointerAlignment : 1;
1857 unsigned int isLong : 1;
1858 unsigned int signedBeforePromotion : 1;
1863 struct Specifier * prev;
1864 struct Specifier * next;
1865 struct Location loc;
1872 struct ExtDecl * extDecl;
1874 struct Symbol * symbol;
1875 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1876 struct Specifier * nsSpec;
1877 } ecere_gcc_struct __anon1;
1880 struct Identifier * id;
1881 struct __ecereNameSpace__ecere__sys__OldList * list;
1882 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1883 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1884 unsigned int addNameSpace;
1885 struct Context * ctx;
1886 struct ExtDecl * extDeclStruct;
1887 } ecere_gcc_struct __anon2;
1888 struct Expression * expression;
1889 struct Specifier * _class;
1890 struct TemplateParameter * templateParameter;
1891 } ecere_gcc_struct __anon1;
1894 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
1896 struct TemplatedType
1899 struct __ecereNameSpace__ecere__sys__BTNode * parent;
1900 struct __ecereNameSpace__ecere__sys__BTNode * left;
1901 struct __ecereNameSpace__ecere__sys__BTNode * right;
1903 struct TemplateParameter * param;
1906 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1908 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1910 if(!param->baseType)
1912 if(param->dataTypeString)
1913 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1915 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1917 return param->baseType;
1919 return (((void *)0));
1922 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1924 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1926 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1930 if(type1->kind == type2->kind && type1->isLong == type2->isLong)
1941 if(type1->passAsTemplate && !type2->passAsTemplate)
1943 return type1->isSigned != type2->isSigned;
1945 return type1->__anon1._class != type2->__anon1._class;
1947 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1955 unsigned int GetOpInt(struct Operand * op2, int * value2)
1957 if(op2->kind == 3 && op2->type->isSigned)
1958 *value2 = op2->__anon1.i;
1959 else if(op2->kind == 3)
1960 *value2 = (int)op2->__anon1.ui;
1961 else if(op2->kind == 4 && op2->type->isSigned)
1962 *value2 = (int)op2->__anon1.i64;
1963 else if(op2->kind == 4)
1964 *value2 = (int)op2->__anon1.ui64;
1965 else if(op2->kind == 23 && op2->type->isSigned)
1966 *value2 = (int)op2->__anon1.i64;
1967 else if(op2->kind == 23)
1968 *value2 = (int)op2->__anon1.ui64;
1969 else if(op2->kind == 22 && op2->type->isSigned)
1970 *value2 = (int)op2->__anon1.i64;
1971 else if(op2->kind == 22)
1972 *value2 = (int)op2->__anon1.ui64;
1973 else if(op2->kind == 2 && op2->type->isSigned)
1974 *value2 = (int)op2->__anon1.s;
1975 else if(op2->kind == 2)
1976 *value2 = (int)op2->__anon1.us;
1977 else if(op2->kind == 1 && op2->type->isSigned)
1978 *value2 = (int)op2->__anon1.c;
1979 else if(op2->kind == 24 || op2->kind == 1)
1980 *value2 = (int)op2->__anon1.uc;
1981 else if(op2->kind == 6)
1982 *value2 = (int)op2->__anon1.f;
1983 else if(op2->kind == 7)
1984 *value2 = (int)op2->__anon1.d;
1985 else if(op2->kind == 13)
1986 *value2 = (int)op2->__anon1.ui64;
1992 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1994 if(op2->kind == 3 && op2->type->isSigned)
1995 *value2 = (unsigned int)op2->__anon1.i;
1996 else if(op2->kind == 3)
1997 *value2 = op2->__anon1.ui;
1998 else if(op2->kind == 4 && op2->type->isSigned)
1999 *value2 = (unsigned int)op2->__anon1.i64;
2000 else if(op2->kind == 4)
2001 *value2 = (unsigned int)op2->__anon1.ui64;
2002 else if(op2->kind == 23 && op2->type->isSigned)
2003 *value2 = (unsigned int)op2->__anon1.i64;
2004 else if(op2->kind == 23)
2005 *value2 = (unsigned int)op2->__anon1.ui64;
2006 else if(op2->kind == 22 && op2->type->isSigned)
2007 *value2 = (unsigned int)op2->__anon1.i64;
2008 else if(op2->kind == 22)
2009 *value2 = (unsigned int)op2->__anon1.ui64;
2010 else if(op2->kind == 2 && op2->type->isSigned)
2011 *value2 = (unsigned int)op2->__anon1.s;
2012 else if(op2->kind == 2)
2013 *value2 = (unsigned int)op2->__anon1.us;
2014 else if(op2->kind == 1 && op2->type->isSigned)
2015 *value2 = (unsigned int)op2->__anon1.c;
2016 else if(op2->kind == 24 || op2->kind == 1)
2017 *value2 = (unsigned int)op2->__anon1.uc;
2018 else if(op2->kind == 6)
2019 *value2 = (unsigned int)op2->__anon1.f;
2020 else if(op2->kind == 7)
2021 *value2 = (unsigned int)op2->__anon1.d;
2022 else if(op2->kind == 13)
2023 *value2 = (unsigned int)op2->__anon1.ui64;
2029 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
2031 if(op2->kind == 3 && op2->type->isSigned)
2032 *value2 = (long long)op2->__anon1.i;
2033 else if(op2->kind == 3)
2034 *value2 = (long long)op2->__anon1.ui;
2035 else if(op2->kind == 4 && op2->type->isSigned)
2036 *value2 = op2->__anon1.i64;
2037 else if(op2->kind == 4)
2038 *value2 = (long long)op2->__anon1.ui64;
2039 else if(op2->kind == 23 && op2->type->isSigned)
2040 *value2 = op2->__anon1.i64;
2041 else if(op2->kind == 23)
2042 *value2 = (long long)op2->__anon1.ui64;
2043 else if(op2->kind == 22 && op2->type->isSigned)
2044 *value2 = op2->__anon1.i64;
2045 else if(op2->kind == 22)
2046 *value2 = (long long)op2->__anon1.ui64;
2047 else if(op2->kind == 2 && op2->type->isSigned)
2048 *value2 = (long long)op2->__anon1.s;
2049 else if(op2->kind == 2)
2050 *value2 = (long long)op2->__anon1.us;
2051 else if(op2->kind == 1 && op2->type->isSigned)
2052 *value2 = (long long)op2->__anon1.c;
2053 else if(op2->kind == 24 || op2->kind == 1)
2054 *value2 = (long long)op2->__anon1.uc;
2055 else if(op2->kind == 6)
2056 *value2 = (long long)op2->__anon1.f;
2057 else if(op2->kind == 7)
2058 *value2 = (long long)op2->__anon1.d;
2059 else if(op2->kind == 13)
2060 *value2 = (long long)op2->__anon1.ui64;
2066 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
2068 if(op2->kind == 3 && op2->type->isSigned)
2069 *value2 = (uint64)op2->__anon1.i;
2070 else if(op2->kind == 3)
2071 *value2 = (uint64)op2->__anon1.ui;
2072 else if(op2->kind == 4 && op2->type->isSigned)
2073 *value2 = (uint64)op2->__anon1.i64;
2074 else if(op2->kind == 4)
2075 *value2 = op2->__anon1.ui64;
2076 else if(op2->kind == 23 && op2->type->isSigned)
2077 *value2 = (uint64)op2->__anon1.i64;
2078 else if(op2->kind == 23)
2079 *value2 = op2->__anon1.ui64;
2080 else if(op2->kind == 22 && op2->type->isSigned)
2081 *value2 = (uint64)op2->__anon1.i64;
2082 else if(op2->kind == 22)
2083 *value2 = op2->__anon1.ui64;
2084 else if(op2->kind == 2 && op2->type->isSigned)
2085 *value2 = (uint64)op2->__anon1.s;
2086 else if(op2->kind == 2)
2087 *value2 = (uint64)op2->__anon1.us;
2088 else if(op2->kind == 1 && op2->type->isSigned)
2089 *value2 = (uint64)op2->__anon1.c;
2090 else if(op2->kind == 24 || op2->kind == 1)
2091 *value2 = (uint64)op2->__anon1.uc;
2092 else if(op2->kind == 6)
2093 *value2 = (uint64)op2->__anon1.f;
2094 else if(op2->kind == 7)
2095 *value2 = (uint64)op2->__anon1.d;
2096 else if(op2->kind == 13)
2097 *value2 = op2->__anon1.ui64;
2103 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
2105 if(op2->kind == 3 && op2->type->isSigned)
2106 *value2 = (intptr_t)op2->__anon1.i;
2107 else if(op2->kind == 3)
2108 *value2 = (intptr_t)op2->__anon1.ui;
2109 else if(op2->kind == 4 && op2->type->isSigned)
2110 *value2 = (intptr_t)op2->__anon1.i64;
2111 else if(op2->kind == 4)
2112 *value2 = (intptr_t)op2->__anon1.ui64;
2113 else if(op2->kind == 23 && op2->type->isSigned)
2114 *value2 = (intptr_t)op2->__anon1.i64;
2115 else if(op2->kind == 23)
2116 *value2 = (intptr_t)op2->__anon1.ui64;
2117 else if(op2->kind == 22 && op2->type->isSigned)
2118 *value2 = (intptr_t)op2->__anon1.i64;
2119 else if(op2->kind == 22)
2120 *value2 = (intptr_t)op2->__anon1.ui64;
2121 else if(op2->kind == 2 && op2->type->isSigned)
2122 *value2 = (intptr_t)op2->__anon1.s;
2123 else if(op2->kind == 2)
2124 *value2 = (intptr_t)op2->__anon1.us;
2125 else if(op2->kind == 1 && op2->type->isSigned)
2126 *value2 = (intptr_t)op2->__anon1.c;
2127 else if(op2->kind == 24 || op2->kind == 1)
2128 *value2 = (intptr_t)op2->__anon1.uc;
2129 else if(op2->kind == 6)
2130 *value2 = (intptr_t)op2->__anon1.f;
2131 else if(op2->kind == 7)
2132 *value2 = (intptr_t)op2->__anon1.d;
2133 else if(op2->kind == 13)
2134 *value2 = (intptr_t)op2->__anon1.ui64;
2140 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
2142 if(op2->kind == 3 && op2->type->isSigned)
2143 *value2 = (uintptr_t)op2->__anon1.i;
2144 else if(op2->kind == 3)
2145 *value2 = (uintptr_t)op2->__anon1.ui;
2146 else if(op2->kind == 4 && op2->type->isSigned)
2147 *value2 = (uintptr_t)op2->__anon1.i64;
2148 else if(op2->kind == 4)
2149 *value2 = (uintptr_t)op2->__anon1.ui64;
2150 else if(op2->kind == 23 && op2->type->isSigned)
2151 *value2 = (uintptr_t)op2->__anon1.i64;
2152 else if(op2->kind == 23)
2153 *value2 = (uintptr_t)op2->__anon1.ui64;
2154 else if(op2->kind == 22 && op2->type->isSigned)
2155 *value2 = (uintptr_t)op2->__anon1.i64;
2156 else if(op2->kind == 22)
2157 *value2 = (uintptr_t)op2->__anon1.ui64;
2158 else if(op2->kind == 2 && op2->type->isSigned)
2159 *value2 = (uintptr_t)op2->__anon1.s;
2160 else if(op2->kind == 2)
2161 *value2 = (uintptr_t)op2->__anon1.us;
2162 else if(op2->kind == 1 && op2->type->isSigned)
2163 *value2 = (uintptr_t)op2->__anon1.c;
2164 else if(op2->kind == 24 || op2->kind == 1)
2165 *value2 = (uintptr_t)op2->__anon1.uc;
2166 else if(op2->kind == 6)
2167 *value2 = (uintptr_t)op2->__anon1.f;
2168 else if(op2->kind == 7)
2169 *value2 = (uintptr_t)op2->__anon1.d;
2170 else if(op2->kind == 13)
2171 *value2 = (uintptr_t)op2->__anon1.ui64;
2177 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2179 if(op2->kind == 3 && op2->type->isSigned)
2180 *value2 = (ssize_t)op2->__anon1.i;
2181 else if(op2->kind == 3)
2182 *value2 = (ssize_t)op2->__anon1.ui;
2183 else if(op2->kind == 4 && op2->type->isSigned)
2184 *value2 = (ssize_t)op2->__anon1.i64;
2185 else if(op2->kind == 4)
2186 *value2 = (ssize_t)op2->__anon1.ui64;
2187 else if(op2->kind == 23 && op2->type->isSigned)
2188 *value2 = (ssize_t)op2->__anon1.i64;
2189 else if(op2->kind == 23)
2190 *value2 = (ssize_t)op2->__anon1.ui64;
2191 else if(op2->kind == 22 && op2->type->isSigned)
2192 *value2 = (ssize_t)op2->__anon1.i64;
2193 else if(op2->kind == 22)
2194 *value2 = (ssize_t)op2->__anon1.ui64;
2195 else if(op2->kind == 2 && op2->type->isSigned)
2196 *value2 = (ssize_t)op2->__anon1.s;
2197 else if(op2->kind == 2)
2198 *value2 = (ssize_t)op2->__anon1.us;
2199 else if(op2->kind == 1 && op2->type->isSigned)
2200 *value2 = (ssize_t)op2->__anon1.c;
2201 else if(op2->kind == 24 || op2->kind == 1)
2202 *value2 = (ssize_t)op2->__anon1.uc;
2203 else if(op2->kind == 6)
2204 *value2 = (ssize_t)op2->__anon1.f;
2205 else if(op2->kind == 7)
2206 *value2 = (ssize_t)op2->__anon1.d;
2207 else if(op2->kind == 13)
2208 *value2 = (ssize_t)op2->__anon1.ui64;
2214 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2216 if(op2->kind == 3 && op2->type->isSigned)
2217 *value2 = (size_t)op2->__anon1.i;
2218 else if(op2->kind == 3)
2219 *value2 = (size_t)op2->__anon1.ui;
2220 else if(op2->kind == 4 && op2->type->isSigned)
2221 *value2 = (size_t)op2->__anon1.i64;
2222 else if(op2->kind == 4)
2223 *value2 = (size_t)op2->__anon1.ui64;
2224 else if(op2->kind == 23 && op2->type->isSigned)
2225 *value2 = (size_t)op2->__anon1.i64;
2226 else if(op2->kind == 23)
2227 *value2 = (size_t)op2->__anon1.ui64;
2228 else if(op2->kind == 22 && op2->type->isSigned)
2229 *value2 = (size_t)op2->__anon1.i64;
2230 else if(op2->kind == 22)
2231 *value2 = (size_t)op2->__anon1.ui64;
2232 else if(op2->kind == 2 && op2->type->isSigned)
2233 *value2 = (size_t)op2->__anon1.s;
2234 else if(op2->kind == 2)
2235 *value2 = (size_t)op2->__anon1.us;
2236 else if(op2->kind == 1 && op2->type->isSigned)
2237 *value2 = (size_t)op2->__anon1.c;
2238 else if(op2->kind == 24 || op2->kind == 1)
2239 *value2 = (size_t)op2->__anon1.uc;
2240 else if(op2->kind == 6)
2241 *value2 = (size_t)op2->__anon1.f;
2242 else if(op2->kind == 7)
2243 *value2 = (size_t)op2->__anon1.d;
2244 else if(op2->kind == 13)
2245 *value2 = (size_t)op2->__anon1.ui64;
2251 unsigned int GetOpShort(struct Operand * op2, short * value2)
2253 if(op2->kind == 3 && op2->type->isSigned)
2254 *value2 = (short)op2->__anon1.i;
2255 else if(op2->kind == 3)
2256 *value2 = (short)op2->__anon1.ui;
2257 else if(op2->kind == 4 && op2->type->isSigned)
2258 *value2 = (short)op2->__anon1.i64;
2259 else if(op2->kind == 4)
2260 *value2 = (short)op2->__anon1.ui64;
2261 else if(op2->kind == 23 && op2->type->isSigned)
2262 *value2 = (short)op2->__anon1.i64;
2263 else if(op2->kind == 23)
2264 *value2 = (short)op2->__anon1.ui64;
2265 else if(op2->kind == 22 && op2->type->isSigned)
2266 *value2 = (short)op2->__anon1.i64;
2267 else if(op2->kind == 22)
2268 *value2 = (short)op2->__anon1.ui64;
2269 else if(op2->kind == 2 && op2->type->isSigned)
2270 *value2 = op2->__anon1.s;
2271 else if(op2->kind == 2)
2272 *value2 = (short)op2->__anon1.us;
2273 else if(op2->kind == 1 && op2->type->isSigned)
2274 *value2 = (short)op2->__anon1.c;
2275 else if(op2->kind == 24 || op2->kind == 1)
2276 *value2 = (short)op2->__anon1.uc;
2277 else if(op2->kind == 6)
2278 *value2 = (short)op2->__anon1.f;
2279 else if(op2->kind == 7)
2280 *value2 = (short)op2->__anon1.d;
2281 else if(op2->kind == 13)
2282 *value2 = (short)op2->__anon1.ui64;
2288 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2290 if(op2->kind == 3 && op2->type->isSigned)
2291 *value2 = (unsigned short)op2->__anon1.i;
2292 else if(op2->kind == 3)
2293 *value2 = (unsigned short)op2->__anon1.ui;
2294 else if(op2->kind == 4 && op2->type->isSigned)
2295 *value2 = (unsigned short)op2->__anon1.i64;
2296 else if(op2->kind == 4)
2297 *value2 = (unsigned short)op2->__anon1.ui64;
2298 else if(op2->kind == 23 && op2->type->isSigned)
2299 *value2 = (unsigned short)op2->__anon1.i64;
2300 else if(op2->kind == 23)
2301 *value2 = (unsigned short)op2->__anon1.ui64;
2302 else if(op2->kind == 22 && op2->type->isSigned)
2303 *value2 = (unsigned short)op2->__anon1.i64;
2304 else if(op2->kind == 22)
2305 *value2 = (unsigned short)op2->__anon1.ui64;
2306 else if(op2->kind == 2 && op2->type->isSigned)
2307 *value2 = (unsigned short)op2->__anon1.s;
2308 else if(op2->kind == 2)
2309 *value2 = op2->__anon1.us;
2310 else if(op2->kind == 1 && op2->type->isSigned)
2311 *value2 = (unsigned short)op2->__anon1.c;
2312 else if(op2->kind == 24 || op2->kind == 1)
2313 *value2 = (unsigned short)op2->__anon1.uc;
2314 else if(op2->kind == 6)
2315 *value2 = (unsigned short)op2->__anon1.f;
2316 else if(op2->kind == 7)
2317 *value2 = (unsigned short)op2->__anon1.d;
2318 else if(op2->kind == 13)
2319 *value2 = (unsigned short)op2->__anon1.ui64;
2325 unsigned int GetOpChar(struct Operand * op2, char * value2)
2327 if(op2->kind == 3 && op2->type->isSigned)
2328 *value2 = (char)op2->__anon1.i;
2329 else if(op2->kind == 3)
2330 *value2 = (char)op2->__anon1.ui;
2331 else if(op2->kind == 4 && op2->type->isSigned)
2332 *value2 = (char)op2->__anon1.i64;
2333 else if(op2->kind == 4)
2334 *value2 = (char)op2->__anon1.ui64;
2335 else if(op2->kind == 23 && op2->type->isSigned)
2336 *value2 = (char)op2->__anon1.i64;
2337 else if(op2->kind == 23)
2338 *value2 = (char)op2->__anon1.ui64;
2339 else if(op2->kind == 22 && op2->type->isSigned)
2340 *value2 = (char)op2->__anon1.i64;
2341 else if(op2->kind == 22)
2342 *value2 = (char)op2->__anon1.ui64;
2343 else if(op2->kind == 2 && op2->type->isSigned)
2344 *value2 = (char)op2->__anon1.s;
2345 else if(op2->kind == 2)
2346 *value2 = (char)op2->__anon1.us;
2347 else if(op2->kind == 1 && op2->type->isSigned)
2348 *value2 = op2->__anon1.c;
2349 else if(op2->kind == 24 || op2->kind == 1)
2350 *value2 = (char)op2->__anon1.uc;
2351 else if(op2->kind == 6)
2352 *value2 = (char)op2->__anon1.f;
2353 else if(op2->kind == 7)
2354 *value2 = (char)op2->__anon1.d;
2355 else if(op2->kind == 13)
2356 *value2 = (char)op2->__anon1.ui64;
2362 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2364 if(op2->kind == 3 && op2->type->isSigned)
2365 *value2 = (unsigned char)op2->__anon1.i;
2366 else if(op2->kind == 3)
2367 *value2 = (unsigned char)op2->__anon1.ui;
2368 else if(op2->kind == 4 && op2->type->isSigned)
2369 *value2 = (unsigned char)op2->__anon1.i64;
2370 else if(op2->kind == 4)
2371 *value2 = (unsigned char)op2->__anon1.ui64;
2372 else if(op2->kind == 23 && op2->type->isSigned)
2373 *value2 = (unsigned char)op2->__anon1.i64;
2374 else if(op2->kind == 23)
2375 *value2 = (unsigned char)op2->__anon1.ui64;
2376 else if(op2->kind == 22 && op2->type->isSigned)
2377 *value2 = (unsigned char)op2->__anon1.i64;
2378 else if(op2->kind == 22)
2379 *value2 = (unsigned char)op2->__anon1.ui64;
2380 else if(op2->kind == 2 && op2->type->isSigned)
2381 *value2 = (unsigned char)op2->__anon1.s;
2382 else if(op2->kind == 2)
2383 *value2 = (unsigned char)op2->__anon1.us;
2384 else if(op2->kind == 1 && op2->type->isSigned)
2385 *value2 = (unsigned char)op2->__anon1.c;
2386 else if(op2->kind == 24 || op2->kind == 1)
2387 *value2 = op2->__anon1.uc;
2388 else if(op2->kind == 6)
2389 *value2 = (unsigned char)op2->__anon1.f;
2390 else if(op2->kind == 7)
2391 *value2 = (unsigned char)op2->__anon1.d;
2392 else if(op2->kind == 13)
2393 *value2 = (unsigned char)op2->__anon1.ui64;
2399 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2401 if(op2->kind == 3 && op2->type->isSigned)
2402 *value2 = (float)(float)op2->__anon1.i;
2403 else if(op2->kind == 3)
2404 *value2 = (float)(float)op2->__anon1.ui;
2405 else if(op2->kind == 4 && op2->type->isSigned)
2406 *value2 = (float)(float)op2->__anon1.i64;
2407 else if(op2->kind == 4)
2408 *value2 = (float)(float)op2->__anon1.ui64;
2409 else if(op2->kind == 23 && op2->type->isSigned)
2410 *value2 = (float)(float)op2->__anon1.i64;
2411 else if(op2->kind == 23)
2412 *value2 = (float)(float)op2->__anon1.ui64;
2413 else if(op2->kind == 22 && op2->type->isSigned)
2414 *value2 = (float)(float)op2->__anon1.i64;
2415 else if(op2->kind == 22)
2416 *value2 = (float)(float)op2->__anon1.ui64;
2417 else if(op2->kind == 2 && op2->type->isSigned)
2418 *value2 = (float)(float)op2->__anon1.s;
2419 else if(op2->kind == 2)
2420 *value2 = (float)(float)op2->__anon1.us;
2421 else if(op2->kind == 1 && op2->type->isSigned)
2422 *value2 = (float)(float)op2->__anon1.c;
2423 else if(op2->kind == 24 || op2->kind == 1)
2424 *value2 = (float)(float)op2->__anon1.uc;
2425 else if(op2->kind == 6)
2426 *value2 = (float)op2->__anon1.f;
2427 else if(op2->kind == 7)
2428 *value2 = (float)op2->__anon1.d;
2429 else if(op2->kind == 13)
2430 *value2 = (float)(float)op2->__anon1.ui64;
2436 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2438 if(op2->kind == 3 && op2->type->isSigned)
2439 *value2 = (double)(double)op2->__anon1.i;
2440 else if(op2->kind == 3)
2441 *value2 = (double)(double)op2->__anon1.ui;
2442 else if(op2->kind == 4 && op2->type->isSigned)
2443 *value2 = (double)(double)op2->__anon1.i64;
2444 else if(op2->kind == 4)
2445 *value2 = (double)(double)op2->__anon1.ui64;
2446 else if(op2->kind == 23 && op2->type->isSigned)
2447 *value2 = (double)(double)op2->__anon1.i64;
2448 else if(op2->kind == 23)
2449 *value2 = (double)(double)op2->__anon1.ui64;
2450 else if(op2->kind == 22 && op2->type->isSigned)
2451 *value2 = (double)(double)op2->__anon1.i64;
2452 else if(op2->kind == 22)
2453 *value2 = (double)(double)op2->__anon1.ui64;
2454 else if(op2->kind == 2 && op2->type->isSigned)
2455 *value2 = (double)(double)op2->__anon1.s;
2456 else if(op2->kind == 2)
2457 *value2 = (double)(double)op2->__anon1.us;
2458 else if(op2->kind == 1 && op2->type->isSigned)
2459 *value2 = (double)(double)op2->__anon1.c;
2460 else if(op2->kind == 24 || op2->kind == 1)
2461 *value2 = (double)(double)op2->__anon1.uc;
2462 else if(op2->kind == 6)
2463 *value2 = (double)op2->__anon1.f;
2464 else if(op2->kind == 7)
2465 *value2 = (double)op2->__anon1.d;
2466 else if(op2->kind == 13)
2467 *value2 = (double)(double)op2->__anon1.ui64;
2473 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2475 int value2 = op2->__anon1.i;
2478 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
2481 exp->expType = op1->type;
2483 op1->type->refCount++;
2488 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2490 unsigned int value2 = op2->__anon1.ui;
2493 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
2496 exp->expType = op1->type;
2498 op1->type->refCount++;
2503 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2505 long long value2 = op2->__anon1.i64;
2508 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
2511 exp->expType = op1->type;
2513 op1->type->refCount++;
2518 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2520 uint64 value2 = op2->__anon1.ui64;
2523 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
2526 exp->expType = op1->type;
2528 op1->type->refCount++;
2533 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2535 short value2 = op2->__anon1.s;
2538 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s + value2));
2541 exp->expType = op1->type;
2543 op1->type->refCount++;
2548 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2550 unsigned short value2 = op2->__anon1.us;
2553 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us + value2));
2556 exp->expType = op1->type;
2558 op1->type->refCount++;
2563 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2565 char value2 = op2->__anon1.c;
2568 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c + value2));
2571 exp->expType = op1->type;
2573 op1->type->refCount++;
2578 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2580 unsigned char value2 = op2->__anon1.uc;
2583 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc + value2));
2586 exp->expType = op1->type;
2588 op1->type->refCount++;
2593 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2595 float value2 = op2->__anon1.f;
2598 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
2601 exp->expType = op1->type;
2603 op1->type->refCount++;
2608 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2610 double value2 = op2->__anon1.d;
2613 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
2616 exp->expType = op1->type;
2618 op1->type->refCount++;
2623 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2625 int value2 = op2->__anon1.i;
2628 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
2631 exp->expType = op1->type;
2633 op1->type->refCount++;
2638 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2640 unsigned int value2 = op2->__anon1.ui;
2643 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
2646 exp->expType = op1->type;
2648 op1->type->refCount++;
2653 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2655 long long value2 = op2->__anon1.i64;
2658 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
2661 exp->expType = op1->type;
2663 op1->type->refCount++;
2668 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2670 uint64 value2 = op2->__anon1.ui64;
2673 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
2676 exp->expType = op1->type;
2678 op1->type->refCount++;
2683 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2685 short value2 = op2->__anon1.s;
2688 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s - value2));
2691 exp->expType = op1->type;
2693 op1->type->refCount++;
2698 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2700 unsigned short value2 = op2->__anon1.us;
2703 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us - value2));
2706 exp->expType = op1->type;
2708 op1->type->refCount++;
2713 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2715 char value2 = op2->__anon1.c;
2718 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c - value2));
2721 exp->expType = op1->type;
2723 op1->type->refCount++;
2728 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2730 unsigned char value2 = op2->__anon1.uc;
2733 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc - value2));
2736 exp->expType = op1->type;
2738 op1->type->refCount++;
2743 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2745 float value2 = op2->__anon1.f;
2748 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
2751 exp->expType = op1->type;
2753 op1->type->refCount++;
2758 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2760 double value2 = op2->__anon1.d;
2763 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
2766 exp->expType = op1->type;
2768 op1->type->refCount++;
2773 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2775 int value2 = op2->__anon1.i;
2778 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
2781 exp->expType = op1->type;
2783 op1->type->refCount++;
2788 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2790 unsigned int value2 = op2->__anon1.ui;
2793 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
2796 exp->expType = op1->type;
2798 op1->type->refCount++;
2803 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2805 long long value2 = op2->__anon1.i64;
2808 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
2811 exp->expType = op1->type;
2813 op1->type->refCount++;
2818 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2820 uint64 value2 = op2->__anon1.ui64;
2823 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
2826 exp->expType = op1->type;
2828 op1->type->refCount++;
2833 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2835 short value2 = op2->__anon1.s;
2838 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s * value2));
2841 exp->expType = op1->type;
2843 op1->type->refCount++;
2848 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2850 unsigned short value2 = op2->__anon1.us;
2853 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us * value2));
2856 exp->expType = op1->type;
2858 op1->type->refCount++;
2863 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2865 char value2 = op2->__anon1.c;
2868 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c * value2));
2871 exp->expType = op1->type;
2873 op1->type->refCount++;
2878 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2880 unsigned char value2 = op2->__anon1.uc;
2883 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc * value2));
2886 exp->expType = op1->type;
2888 op1->type->refCount++;
2893 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2895 float value2 = op2->__anon1.f;
2898 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
2901 exp->expType = op1->type;
2903 op1->type->refCount++;
2908 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2910 double value2 = op2->__anon1.d;
2913 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
2916 exp->expType = op1->type;
2918 op1->type->refCount++;
2923 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2925 int value2 = op2->__anon1.i;
2928 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i / value2)) : 0);
2931 exp->expType = op1->type;
2933 op1->type->refCount++;
2938 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2940 unsigned int value2 = op2->__anon1.ui;
2943 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui / value2)) : 0);
2946 exp->expType = op1->type;
2948 op1->type->refCount++;
2953 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2955 long long value2 = op2->__anon1.i64;
2958 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 / value2)) : 0);
2961 exp->expType = op1->type;
2963 op1->type->refCount++;
2968 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2970 uint64 value2 = op2->__anon1.ui64;
2973 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 / value2)) : 0);
2976 exp->expType = op1->type;
2978 op1->type->refCount++;
2983 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2985 short value2 = op2->__anon1.s;
2988 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s / value2)) : 0);
2991 exp->expType = op1->type;
2993 op1->type->refCount++;
2998 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3000 unsigned short value2 = op2->__anon1.us;
3003 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us / value2)) : 0);
3006 exp->expType = op1->type;
3008 op1->type->refCount++;
3013 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3015 char value2 = op2->__anon1.c;
3018 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c / value2)) : 0);
3021 exp->expType = op1->type;
3023 op1->type->refCount++;
3028 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3030 unsigned char value2 = op2->__anon1.uc;
3033 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc / value2)) : 0);
3036 exp->expType = op1->type;
3038 op1->type->refCount++;
3043 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3045 float value2 = op2->__anon1.f;
3048 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f / value2));
3051 exp->expType = op1->type;
3053 op1->type->refCount++;
3058 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3060 double value2 = op2->__anon1.d;
3063 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d / value2));
3066 exp->expType = op1->type;
3068 op1->type->refCount++;
3073 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3075 int value2 = op2->__anon1.i;
3078 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i % value2)) : 0);
3081 exp->expType = op1->type;
3083 op1->type->refCount++;
3088 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3090 unsigned int value2 = op2->__anon1.ui;
3093 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui % value2)) : 0);
3096 exp->expType = op1->type;
3098 op1->type->refCount++;
3103 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3105 long long value2 = op2->__anon1.i64;
3108 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 % value2)) : 0);
3111 exp->expType = op1->type;
3113 op1->type->refCount++;
3118 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3120 uint64 value2 = op2->__anon1.ui64;
3123 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 % value2)) : 0);
3126 exp->expType = op1->type;
3128 op1->type->refCount++;
3133 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3135 short value2 = op2->__anon1.s;
3138 exp->__anon1.__anon2.string = PrintShort(value2 ? ((short)(op1->__anon1.s % value2)) : 0);
3141 exp->expType = op1->type;
3143 op1->type->refCount++;
3148 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3150 unsigned short value2 = op2->__anon1.us;
3153 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((unsigned short)(op1->__anon1.us % value2)) : 0);
3156 exp->expType = op1->type;
3158 op1->type->refCount++;
3163 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3165 char value2 = op2->__anon1.c;
3168 exp->__anon1.__anon2.string = PrintChar(value2 ? ((char)(op1->__anon1.c % value2)) : 0);
3171 exp->expType = op1->type;
3173 op1->type->refCount++;
3178 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3180 unsigned char value2 = op2->__anon1.uc;
3183 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((unsigned char)(op1->__anon1.uc % value2)) : 0);
3186 exp->expType = op1->type;
3188 op1->type->refCount++;
3193 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
3196 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
3199 exp->expType = op1->type;
3201 op1->type->refCount++;
3206 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
3209 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
3212 exp->expType = op1->type;
3214 op1->type->refCount++;
3219 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
3222 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
3225 exp->expType = op1->type;
3227 op1->type->refCount++;
3232 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
3235 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
3238 exp->expType = op1->type;
3240 op1->type->refCount++;
3245 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
3248 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
3251 exp->expType = op1->type;
3253 op1->type->refCount++;
3258 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
3261 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
3264 exp->expType = op1->type;
3266 op1->type->refCount++;
3271 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
3274 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
3277 exp->expType = op1->type;
3279 op1->type->refCount++;
3284 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
3287 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
3290 exp->expType = op1->type;
3292 op1->type->refCount++;
3297 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
3300 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
3303 exp->expType = op1->type;
3305 op1->type->refCount++;
3310 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
3313 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
3316 exp->expType = op1->type;
3318 op1->type->refCount++;
3323 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
3326 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
3329 exp->expType = op1->type;
3331 op1->type->refCount++;
3336 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
3339 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
3342 exp->expType = op1->type;
3344 op1->type->refCount++;
3349 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
3352 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
3355 exp->expType = op1->type;
3357 op1->type->refCount++;
3362 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
3365 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
3368 exp->expType = op1->type;
3370 op1->type->refCount++;
3375 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
3378 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
3381 exp->expType = op1->type;
3383 op1->type->refCount++;
3388 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
3391 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
3394 exp->expType = op1->type;
3396 op1->type->refCount++;
3401 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
3404 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
3407 exp->expType = op1->type;
3409 op1->type->refCount++;
3414 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
3417 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
3420 exp->expType = op1->type;
3422 op1->type->refCount++;
3427 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
3430 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
3433 exp->expType = op1->type;
3435 op1->type->refCount++;
3440 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
3443 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
3446 exp->expType = op1->type;
3448 op1->type->refCount++;
3453 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
3456 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
3459 exp->expType = op1->type;
3461 op1->type->refCount++;
3466 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
3469 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
3472 exp->expType = op1->type;
3474 op1->type->refCount++;
3479 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
3482 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
3485 exp->expType = op1->type;
3487 op1->type->refCount++;
3492 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
3495 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
3498 exp->expType = op1->type;
3500 op1->type->refCount++;
3505 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
3508 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
3511 exp->expType = op1->type;
3513 op1->type->refCount++;
3518 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
3521 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
3524 exp->expType = op1->type;
3526 op1->type->refCount++;
3531 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
3534 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
3537 exp->expType = op1->type;
3539 op1->type->refCount++;
3544 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
3547 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
3550 exp->expType = op1->type;
3552 op1->type->refCount++;
3557 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
3560 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
3563 exp->expType = op1->type;
3565 op1->type->refCount++;
3570 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
3573 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
3576 exp->expType = op1->type;
3578 op1->type->refCount++;
3583 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3585 int value2 = op2->__anon1.i;
3588 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
3591 exp->expType = op1->type;
3593 op1->type->refCount++;
3598 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3600 unsigned int value2 = op2->__anon1.ui;
3603 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
3606 exp->expType = op1->type;
3608 op1->type->refCount++;
3613 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3615 long long value2 = op2->__anon1.i64;
3618 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
3621 exp->expType = op1->type;
3623 op1->type->refCount++;
3628 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3630 uint64 value2 = op2->__anon1.ui64;
3633 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
3636 exp->expType = op1->type;
3638 op1->type->refCount++;
3643 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3645 short value2 = op2->__anon1.s;
3648 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
3651 exp->expType = op1->type;
3653 op1->type->refCount++;
3658 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3660 unsigned short value2 = op2->__anon1.us;
3663 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
3666 exp->expType = op1->type;
3668 op1->type->refCount++;
3673 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3675 char value2 = op2->__anon1.c;
3678 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
3681 exp->expType = op1->type;
3683 op1->type->refCount++;
3688 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3690 unsigned char value2 = op2->__anon1.uc;
3693 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
3696 exp->expType = op1->type;
3698 op1->type->refCount++;
3703 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3705 float value2 = op2->__anon1.f;
3708 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
3711 exp->expType = op1->type;
3713 op1->type->refCount++;
3718 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3720 double value2 = op2->__anon1.d;
3723 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
3726 exp->expType = op1->type;
3728 op1->type->refCount++;
3733 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3735 int value2 = op2->__anon1.i;
3738 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
3741 exp->expType = op1->type;
3743 op1->type->refCount++;
3748 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3750 unsigned int value2 = op2->__anon1.ui;
3753 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
3756 exp->expType = op1->type;
3758 op1->type->refCount++;
3763 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3765 long long value2 = op2->__anon1.i64;
3768 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
3771 exp->expType = op1->type;
3773 op1->type->refCount++;
3778 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3780 uint64 value2 = op2->__anon1.ui64;
3783 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
3786 exp->expType = op1->type;
3788 op1->type->refCount++;
3793 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3795 short value2 = op2->__anon1.s;
3798 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
3801 exp->expType = op1->type;
3803 op1->type->refCount++;
3808 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3810 unsigned short value2 = op2->__anon1.us;
3813 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
3816 exp->expType = op1->type;
3818 op1->type->refCount++;
3823 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3825 char value2 = op2->__anon1.c;
3828 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
3831 exp->expType = op1->type;
3833 op1->type->refCount++;
3838 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3840 unsigned char value2 = op2->__anon1.uc;
3843 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
3846 exp->expType = op1->type;
3848 op1->type->refCount++;
3853 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3855 float value2 = op2->__anon1.f;
3858 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
3861 exp->expType = op1->type;
3863 op1->type->refCount++;
3868 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3870 double value2 = op2->__anon1.d;
3873 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
3876 exp->expType = op1->type;
3878 op1->type->refCount++;
3883 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3885 int value2 = op2->__anon1.i;
3888 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
3891 exp->expType = op1->type;
3893 op1->type->refCount++;
3898 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3900 unsigned int value2 = op2->__anon1.ui;
3903 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
3906 exp->expType = op1->type;
3908 op1->type->refCount++;
3913 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3915 long long value2 = op2->__anon1.i64;
3918 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
3921 exp->expType = op1->type;
3923 op1->type->refCount++;
3928 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3930 uint64 value2 = op2->__anon1.ui64;
3933 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
3936 exp->expType = op1->type;
3938 op1->type->refCount++;
3943 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3945 short value2 = op2->__anon1.s;
3948 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
3951 exp->expType = op1->type;
3953 op1->type->refCount++;
3958 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3960 unsigned short value2 = op2->__anon1.us;
3963 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
3966 exp->expType = op1->type;
3968 op1->type->refCount++;
3973 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3975 char value2 = op2->__anon1.c;
3978 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
3981 exp->expType = op1->type;
3983 op1->type->refCount++;
3988 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3990 unsigned char value2 = op2->__anon1.uc;
3993 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
3996 exp->expType = op1->type;
3998 op1->type->refCount++;
4003 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4005 float value2 = op2->__anon1.f;
4008 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
4011 exp->expType = op1->type;
4013 op1->type->refCount++;
4018 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4020 double value2 = op2->__anon1.d;
4023 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
4026 exp->expType = op1->type;
4028 op1->type->refCount++;
4033 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4035 int value2 = op2->__anon1.i;
4038 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
4041 exp->expType = op1->type;
4043 op1->type->refCount++;
4048 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4050 unsigned int value2 = op2->__anon1.ui;
4053 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
4056 exp->expType = op1->type;
4058 op1->type->refCount++;
4063 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4065 long long value2 = op2->__anon1.i64;
4068 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
4071 exp->expType = op1->type;
4073 op1->type->refCount++;
4078 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4080 uint64 value2 = op2->__anon1.ui64;
4083 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
4086 exp->expType = op1->type;
4088 op1->type->refCount++;
4093 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4095 short value2 = op2->__anon1.s;
4098 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
4101 exp->expType = op1->type;
4103 op1->type->refCount++;
4108 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4110 unsigned short value2 = op2->__anon1.us;
4113 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
4116 exp->expType = op1->type;
4118 op1->type->refCount++;
4123 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4125 char value2 = op2->__anon1.c;
4128 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
4131 exp->expType = op1->type;
4133 op1->type->refCount++;
4138 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4140 unsigned char value2 = op2->__anon1.uc;
4143 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
4146 exp->expType = op1->type;
4148 op1->type->refCount++;
4153 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4155 float value2 = op2->__anon1.f;
4158 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
4161 exp->expType = op1->type;
4163 op1->type->refCount++;
4168 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4170 double value2 = op2->__anon1.d;
4173 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
4176 exp->expType = op1->type;
4178 op1->type->refCount++;
4183 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4185 int value2 = op2->__anon1.i;
4188 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i /= value2)) : 0);
4191 exp->expType = op1->type;
4193 op1->type->refCount++;
4198 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4200 unsigned int value2 = op2->__anon1.ui;
4203 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui /= value2)) : 0);
4206 exp->expType = op1->type;
4208 op1->type->refCount++;
4213 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4215 long long value2 = op2->__anon1.i64;
4218 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 /= value2)) : 0);
4221 exp->expType = op1->type;
4223 op1->type->refCount++;
4228 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4230 uint64 value2 = op2->__anon1.ui64;
4233 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 /= value2)) : 0);
4236 exp->expType = op1->type;
4238 op1->type->refCount++;
4243 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4245 short value2 = op2->__anon1.s;
4248 exp->__anon1.__anon2.string = PrintShort(value2 ? ((op1->__anon1.s /= value2)) : 0);
4251 exp->expType = op1->type;
4253 op1->type->refCount++;
4258 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4260 unsigned short value2 = op2->__anon1.us;
4263 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((op1->__anon1.us /= value2)) : 0);
4266 exp->expType = op1->type;
4268 op1->type->refCount++;
4273 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4275 char value2 = op2->__anon1.c;
4278 exp->__anon1.__anon2.string = PrintChar(value2 ? ((op1->__anon1.c /= value2)) : 0);
4281 exp->expType = op1->type;
4283 op1->type->refCount++;
4288 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4290 unsigned char value2 = op2->__anon1.uc;
4293 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((op1->__anon1.uc /= value2)) : 0);
4296 exp->expType = op1->type;
4298 op1->type->refCount++;
4303 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4305 float value2 = op2->__anon1.f;
4308 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f /= value2));
4311 exp->expType = op1->type;
4313 op1->type->refCount++;
4318 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4320 double value2 = op2->__anon1.d;
4323 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d /= value2));
4326 exp->expType = op1->type;
4328 op1->type->refCount++;
4333 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4335 int value2 = op2->__anon1.i;
4338 exp->__anon1.__anon2.string = PrintInt(value2 ? ((op1->__anon1.i %= value2)) : 0);
4341 exp->expType = op1->type;
4343 op1->type->refCount++;
4348 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4350 unsigned int value2 = op2->__anon1.ui;
4353 exp->__anon1.__anon2.string = PrintUInt(value2 ? ((op1->__anon1.ui %= value2)) : 0);
4356 exp->expType = op1->type;
4358 op1->type->refCount++;
4363 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4365 long long value2 = op2->__anon1.i64;
4368 exp->__anon1.__anon2.string = PrintInt64(value2 ? ((op1->__anon1.i64 %= value2)) : 0);
4371 exp->expType = op1->type;
4373 op1->type->refCount++;
4378 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4380 uint64 value2 = op2->__anon1.ui64;
4383 exp->__anon1.__anon2.string = PrintUInt64(value2 ? ((op1->__anon1.ui64 %= value2)) : 0);
4386 exp->expType = op1->type;
4388 op1->type->refCount++;
4393 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4395 short value2 = op2->__anon1.s;
4398 exp->__anon1.__anon2.string = PrintShort(value2 ? ((op1->__anon1.s %= value2)) : 0);
4401 exp->expType = op1->type;
4403 op1->type->refCount++;
4408 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4410 unsigned short value2 = op2->__anon1.us;
4413 exp->__anon1.__anon2.string = PrintUShort(value2 ? ((op1->__anon1.us %= value2)) : 0);
4416 exp->expType = op1->type;
4418 op1->type->refCount++;
4423 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4425 char value2 = op2->__anon1.c;
4428 exp->__anon1.__anon2.string = PrintChar(value2 ? ((op1->__anon1.c %= value2)) : 0);
4431 exp->expType = op1->type;
4433 op1->type->refCount++;
4438 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4440 unsigned char value2 = op2->__anon1.uc;
4443 exp->__anon1.__anon2.string = PrintUChar(value2 ? ((op1->__anon1.uc %= value2)) : 0);
4446 exp->expType = op1->type;
4448 op1->type->refCount++;
4453 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4455 int value2 = op2->__anon1.i;
4458 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
4461 exp->expType = op1->type;
4463 op1->type->refCount++;
4468 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4470 unsigned int value2 = op2->__anon1.ui;
4473 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
4476 exp->expType = op1->type;
4478 op1->type->refCount++;
4483 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4485 long long value2 = op2->__anon1.i64;
4488 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
4491 exp->expType = op1->type;
4493 op1->type->refCount++;
4498 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4500 uint64 value2 = op2->__anon1.ui64;
4503 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
4506 exp->expType = op1->type;
4508 op1->type->refCount++;
4513 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4515 short value2 = op2->__anon1.s;
4518 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s & value2));
4521 exp->expType = op1->type;
4523 op1->type->refCount++;
4528 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4530 unsigned short value2 = op2->__anon1.us;
4533 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us & value2));
4536 exp->expType = op1->type;
4538 op1->type->refCount++;
4543 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4545 char value2 = op2->__anon1.c;
4548 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c & value2));
4551 exp->expType = op1->type;
4553 op1->type->refCount++;
4558 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4560 unsigned char value2 = op2->__anon1.uc;
4563 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc & value2));
4566 exp->expType = op1->type;
4568 op1->type->refCount++;
4573 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4575 int value2 = op2->__anon1.i;
4578 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
4581 exp->expType = op1->type;
4583 op1->type->refCount++;
4588 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4590 unsigned int value2 = op2->__anon1.ui;
4593 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
4596 exp->expType = op1->type;
4598 op1->type->refCount++;
4603 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4605 long long value2 = op2->__anon1.i64;
4608 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
4611 exp->expType = op1->type;
4613 op1->type->refCount++;
4618 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4620 uint64 value2 = op2->__anon1.ui64;
4623 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
4626 exp->expType = op1->type;
4628 op1->type->refCount++;
4633 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4635 short value2 = op2->__anon1.s;
4638 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s | value2));
4641 exp->expType = op1->type;
4643 op1->type->refCount++;
4648 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4650 unsigned short value2 = op2->__anon1.us;
4653 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us | value2));
4656 exp->expType = op1->type;
4658 op1->type->refCount++;
4663 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4665 char value2 = op2->__anon1.c;
4668 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c | value2));
4671 exp->expType = op1->type;
4673 op1->type->refCount++;
4678 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4680 unsigned char value2 = op2->__anon1.uc;
4683 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc | value2));
4686 exp->expType = op1->type;
4688 op1->type->refCount++;
4693 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4695 int value2 = op2->__anon1.i;
4698 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
4701 exp->expType = op1->type;
4703 op1->type->refCount++;
4708 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4710 unsigned int value2 = op2->__anon1.ui;
4713 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
4716 exp->expType = op1->type;
4718 op1->type->refCount++;
4723 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4725 long long value2 = op2->__anon1.i64;
4728 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
4731 exp->expType = op1->type;
4733 op1->type->refCount++;
4738 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4740 uint64 value2 = op2->__anon1.ui64;
4743 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
4746 exp->expType = op1->type;
4748 op1->type->refCount++;
4753 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4755 short value2 = op2->__anon1.s;
4758 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s ^ value2));
4761 exp->expType = op1->type;
4763 op1->type->refCount++;
4768 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4770 unsigned short value2 = op2->__anon1.us;
4773 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us ^ value2));
4776 exp->expType = op1->type;
4778 op1->type->refCount++;
4783 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4785 char value2 = op2->__anon1.c;
4788 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c ^ value2));
4791 exp->expType = op1->type;
4793 op1->type->refCount++;
4798 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4800 unsigned char value2 = op2->__anon1.uc;
4803 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc ^ value2));
4806 exp->expType = op1->type;
4808 op1->type->refCount++;
4813 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4815 int value2 = op2->__anon1.i;
4818 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
4821 exp->expType = op1->type;
4823 op1->type->refCount++;
4828 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4830 unsigned int value2 = op2->__anon1.ui;
4833 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
4836 exp->expType = op1->type;
4838 op1->type->refCount++;
4843 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4845 long long value2 = op2->__anon1.i64;
4848 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
4851 exp->expType = op1->type;
4853 op1->type->refCount++;
4858 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4860 uint64 value2 = op2->__anon1.ui64;
4863 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
4866 exp->expType = op1->type;
4868 op1->type->refCount++;
4873 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4875 short value2 = op2->__anon1.s;
4878 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s << value2));
4881 exp->expType = op1->type;
4883 op1->type->refCount++;
4888 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4890 unsigned short value2 = op2->__anon1.us;
4893 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us << value2));
4896 exp->expType = op1->type;
4898 op1->type->refCount++;
4903 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4905 char value2 = op2->__anon1.c;
4908 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c << value2));
4911 exp->expType = op1->type;
4913 op1->type->refCount++;
4918 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4920 unsigned char value2 = op2->__anon1.uc;
4923 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc << value2));
4926 exp->expType = op1->type;
4928 op1->type->refCount++;
4933 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4935 int value2 = op2->__anon1.i;
4938 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
4941 exp->expType = op1->type;
4943 op1->type->refCount++;
4948 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4950 unsigned int value2 = op2->__anon1.ui;
4953 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
4956 exp->expType = op1->type;
4958 op1->type->refCount++;
4963 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4965 long long value2 = op2->__anon1.i64;
4968 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
4971 exp->expType = op1->type;
4973 op1->type->refCount++;
4978 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4980 uint64 value2 = op2->__anon1.ui64;
4983 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
4986 exp->expType = op1->type;
4988 op1->type->refCount++;
4993 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4995 short value2 = op2->__anon1.s;
4998 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >> value2));
5001 exp->expType = op1->type;
5003 op1->type->refCount++;
5008 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5010 unsigned short value2 = op2->__anon1.us;
5013 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >> value2));
5016 exp->expType = op1->type;
5018 op1->type->refCount++;
5023 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5025 char value2 = op2->__anon1.c;
5028 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >> value2));
5031 exp->expType = op1->type;
5033 op1->type->refCount++;
5038 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5040 unsigned char value2 = op2->__anon1.uc;
5043 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >> value2));
5046 exp->expType = op1->type;
5048 op1->type->refCount++;
5053 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
5056 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
5059 exp->expType = op1->type;
5061 op1->type->refCount++;
5066 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
5069 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
5072 exp->expType = op1->type;
5074 op1->type->refCount++;
5079 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
5082 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
5085 exp->expType = op1->type;
5087 op1->type->refCount++;
5092 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
5095 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
5098 exp->expType = op1->type;
5100 op1->type->refCount++;
5105 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
5108 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
5111 exp->expType = op1->type;
5113 op1->type->refCount++;
5118 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
5121 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
5124 exp->expType = op1->type;
5126 op1->type->refCount++;
5131 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
5134 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
5137 exp->expType = op1->type;
5139 op1->type->refCount++;
5144 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
5147 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
5150 exp->expType = op1->type;
5152 op1->type->refCount++;
5157 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5159 int value2 = op2->__anon1.i;
5162 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
5165 exp->expType = op1->type;
5167 op1->type->refCount++;
5172 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5174 unsigned int value2 = op2->__anon1.ui;
5177 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
5180 exp->expType = op1->type;
5182 op1->type->refCount++;
5187 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5189 long long value2 = op2->__anon1.i64;
5192 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
5195 exp->expType = op1->type;
5197 op1->type->refCount++;
5202 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5204 uint64 value2 = op2->__anon1.ui64;
5207 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
5210 exp->expType = op1->type;
5212 op1->type->refCount++;
5217 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5219 short value2 = op2->__anon1.s;
5222 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
5225 exp->expType = op1->type;
5227 op1->type->refCount++;
5232 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5234 unsigned short value2 = op2->__anon1.us;
5237 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
5240 exp->expType = op1->type;
5242 op1->type->refCount++;
5247 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5249 char value2 = op2->__anon1.c;
5252 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
5255 exp->expType = op1->type;
5257 op1->type->refCount++;
5262 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5264 unsigned char value2 = op2->__anon1.uc;
5267 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
5270 exp->expType = op1->type;
5272 op1->type->refCount++;
5277 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5279 int value2 = op2->__anon1.i;
5282 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
5285 exp->expType = op1->type;
5287 op1->type->refCount++;
5292 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5294 unsigned int value2 = op2->__anon1.ui;
5297 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
5300 exp->expType = op1->type;
5302 op1->type->refCount++;
5307 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5309 long long value2 = op2->__anon1.i64;
5312 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
5315 exp->expType = op1->type;
5317 op1->type->refCount++;
5322 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5324 uint64 value2 = op2->__anon1.ui64;
5327 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
5330 exp->expType = op1->type;
5332 op1->type->refCount++;
5337 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5339 short value2 = op2->__anon1.s;
5342 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
5345 exp->expType = op1->type;
5347 op1->type->refCount++;
5352 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5354 unsigned short value2 = op2->__anon1.us;
5357 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
5360 exp->expType = op1->type;
5362 op1->type->refCount++;
5367 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5369 char value2 = op2->__anon1.c;
5372 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
5375 exp->expType = op1->type;
5377 op1->type->refCount++;
5382 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5384 unsigned char value2 = op2->__anon1.uc;
5387 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
5390 exp->expType = op1->type;
5392 op1->type->refCount++;
5397 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5399 int value2 = op2->__anon1.i;
5402 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
5405 exp->expType = op1->type;
5407 op1->type->refCount++;
5412 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5414 unsigned int value2 = op2->__anon1.ui;
5417 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
5420 exp->expType = op1->type;
5422 op1->type->refCount++;
5427 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5429 long long value2 = op2->__anon1.i64;
5432 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
5435 exp->expType = op1->type;
5437 op1->type->refCount++;
5442 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5444 uint64 value2 = op2->__anon1.ui64;
5447 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
5450 exp->expType = op1->type;
5452 op1->type->refCount++;
5457 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5459 short value2 = op2->__anon1.s;
5462 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
5465 exp->expType = op1->type;
5467 op1->type->refCount++;
5472 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5474 unsigned short value2 = op2->__anon1.us;
5477 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
5480 exp->expType = op1->type;
5482 op1->type->refCount++;
5487 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5489 char value2 = op2->__anon1.c;
5492 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
5495 exp->expType = op1->type;
5497 op1->type->refCount++;
5502 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5504 unsigned char value2 = op2->__anon1.uc;
5507 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
5510 exp->expType = op1->type;
5512 op1->type->refCount++;
5517 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5519 int value2 = op2->__anon1.i;
5522 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
5525 exp->expType = op1->type;
5527 op1->type->refCount++;
5532 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5534 unsigned int value2 = op2->__anon1.ui;
5537 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
5540 exp->expType = op1->type;
5542 op1->type->refCount++;
5547 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5549 long long value2 = op2->__anon1.i64;
5552 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
5555 exp->expType = op1->type;
5557 op1->type->refCount++;
5562 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5564 uint64 value2 = op2->__anon1.ui64;
5567 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
5570 exp->expType = op1->type;
5572 op1->type->refCount++;
5577 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5579 short value2 = op2->__anon1.s;
5582 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
5585 exp->expType = op1->type;
5587 op1->type->refCount++;
5592 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5594 unsigned short value2 = op2->__anon1.us;
5597 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
5600 exp->expType = op1->type;
5602 op1->type->refCount++;
5607 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5609 char value2 = op2->__anon1.c;
5612 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
5615 exp->expType = op1->type;
5617 op1->type->refCount++;
5622 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5624 unsigned char value2 = op2->__anon1.uc;
5627 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
5630 exp->expType = op1->type;
5632 op1->type->refCount++;
5637 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5639 int value2 = op2->__anon1.i;
5642 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
5645 exp->expType = op1->type;
5647 op1->type->refCount++;
5652 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5654 unsigned int value2 = op2->__anon1.ui;
5657 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
5660 exp->expType = op1->type;
5662 op1->type->refCount++;
5667 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5669 long long value2 = op2->__anon1.i64;
5672 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
5675 exp->expType = op1->type;
5677 op1->type->refCount++;
5682 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5684 uint64 value2 = op2->__anon1.ui64;
5687 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
5690 exp->expType = op1->type;
5692 op1->type->refCount++;
5697 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5699 short value2 = op2->__anon1.s;
5702 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
5705 exp->expType = op1->type;
5707 op1->type->refCount++;
5712 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5714 unsigned short value2 = op2->__anon1.us;
5717 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
5720 exp->expType = op1->type;
5722 op1->type->refCount++;
5727 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5729 char value2 = op2->__anon1.c;
5732 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
5735 exp->expType = op1->type;
5737 op1->type->refCount++;
5742 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5744 unsigned char value2 = op2->__anon1.uc;
5747 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
5750 exp->expType = op1->type;
5752 op1->type->refCount++;
5757 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
5760 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
5763 exp->expType = op1->type;
5765 op1->type->refCount++;
5770 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
5773 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
5776 exp->expType = op1->type;
5778 op1->type->refCount++;
5783 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
5786 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
5789 exp->expType = op1->type;
5791 op1->type->refCount++;
5796 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
5799 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
5802 exp->expType = op1->type;
5804 op1->type->refCount++;
5809 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
5812 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
5815 exp->expType = op1->type;
5817 op1->type->refCount++;
5822 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
5825 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
5828 exp->expType = op1->type;
5830 op1->type->refCount++;
5835 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
5838 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
5841 exp->expType = op1->type;
5843 op1->type->refCount++;
5848 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
5851 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
5854 exp->expType = op1->type;
5856 op1->type->refCount++;
5861 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5863 int value2 = op2->__anon1.i;
5866 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
5869 exp->expType = op1->type;
5871 op1->type->refCount++;
5876 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5878 unsigned int value2 = op2->__anon1.ui;
5881 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
5884 exp->expType = op1->type;
5886 op1->type->refCount++;
5891 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5893 long long value2 = op2->__anon1.i64;
5896 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
5899 exp->expType = op1->type;
5901 op1->type->refCount++;
5906 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5908 uint64 value2 = op2->__anon1.ui64;
5911 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
5914 exp->expType = op1->type;
5916 op1->type->refCount++;
5921 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5923 short value2 = op2->__anon1.s;
5926 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
5929 exp->expType = op1->type;
5931 op1->type->refCount++;
5936 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5938 unsigned short value2 = op2->__anon1.us;
5941 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
5944 exp->expType = op1->type;
5946 op1->type->refCount++;
5951 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5953 char value2 = op2->__anon1.c;
5956 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
5959 exp->expType = op1->type;
5961 op1->type->refCount++;
5966 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5968 unsigned char value2 = op2->__anon1.uc;
5971 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
5974 exp->expType = op1->type;
5976 op1->type->refCount++;
5981 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5983 float value2 = op2->__anon1.f;
5986 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
5989 exp->expType = op1->type;
5991 op1->type->refCount++;
5996 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5998 double value2 = op2->__anon1.d;
6001 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
6004 exp->expType = op1->type;
6006 op1->type->refCount++;
6011 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6013 int value2 = op2->__anon1.i;
6016 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
6019 exp->expType = op1->type;
6021 op1->type->refCount++;
6026 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6028 unsigned int value2 = op2->__anon1.ui;
6031 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
6034 exp->expType = op1->type;
6036 op1->type->refCount++;
6041 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6043 long long value2 = op2->__anon1.i64;
6046 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
6049 exp->expType = op1->type;
6051 op1->type->refCount++;
6056 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6058 uint64 value2 = op2->__anon1.ui64;
6061 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
6064 exp->expType = op1->type;
6066 op1->type->refCount++;
6071 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6073 short value2 = op2->__anon1.s;
6076 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
6079 exp->expType = op1->type;
6081 op1->type->refCount++;
6086 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6088 unsigned short value2 = op2->__anon1.us;
6091 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
6094 exp->expType = op1->type;
6096 op1->type->refCount++;
6101 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6103 char value2 = op2->__anon1.c;
6106 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
6109 exp->expType = op1->type;
6111 op1->type->refCount++;
6116 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6118 unsigned char value2 = op2->__anon1.uc;
6121 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
6124 exp->expType = op1->type;
6126 op1->type->refCount++;
6131 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6133 float value2 = op2->__anon1.f;
6136 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
6139 exp->expType = op1->type;
6141 op1->type->refCount++;
6146 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6148 double value2 = op2->__anon1.d;
6151 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
6154 exp->expType = op1->type;
6156 op1->type->refCount++;
6161 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6163 int value2 = op2->__anon1.i;
6166 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
6169 exp->expType = op1->type;
6171 op1->type->refCount++;
6176 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6178 unsigned int value2 = op2->__anon1.ui;
6181 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
6184 exp->expType = op1->type;
6186 op1->type->refCount++;
6191 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6193 long long value2 = op2->__anon1.i64;
6196 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
6199 exp->expType = op1->type;
6201 op1->type->refCount++;
6206 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6208 uint64 value2 = op2->__anon1.ui64;
6211 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
6214 exp->expType = op1->type;
6216 op1->type->refCount++;
6221 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6223 short value2 = op2->__anon1.s;
6226 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
6229 exp->expType = op1->type;
6231 op1->type->refCount++;
6236 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6238 unsigned short value2 = op2->__anon1.us;
6241 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
6244 exp->expType = op1->type;
6246 op1->type->refCount++;
6251 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6253 char value2 = op2->__anon1.c;
6256 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
6259 exp->expType = op1->type;
6261 op1->type->refCount++;
6266 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6268 unsigned char value2 = op2->__anon1.uc;
6271 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
6274 exp->expType = op1->type;
6276 op1->type->refCount++;
6281 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6283 float value2 = op2->__anon1.f;
6286 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
6289 exp->expType = op1->type;
6291 op1->type->refCount++;
6296 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6298 double value2 = op2->__anon1.d;
6301 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
6304 exp->expType = op1->type;
6306 op1->type->refCount++;
6311 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6313 int value2 = op2->__anon1.i;
6316 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
6319 exp->expType = op1->type;
6321 op1->type->refCount++;
6326 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6328 unsigned int value2 = op2->__anon1.ui;
6331 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
6334 exp->expType = op1->type;
6336 op1->type->refCount++;
6341 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6343 long long value2 = op2->__anon1.i64;
6346 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
6349 exp->expType = op1->type;
6351 op1->type->refCount++;
6356 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6358 uint64 value2 = op2->__anon1.ui64;
6361 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
6364 exp->expType = op1->type;
6366 op1->type->refCount++;
6371 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6373 short value2 = op2->__anon1.s;
6376 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
6379 exp->expType = op1->type;
6381 op1->type->refCount++;
6386 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6388 unsigned short value2 = op2->__anon1.us;
6391 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
6394 exp->expType = op1->type;
6396 op1->type->refCount++;
6401 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6403 char value2 = op2->__anon1.c;
6406 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
6409 exp->expType = op1->type;
6411 op1->type->refCount++;
6416 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6418 unsigned char value2 = op2->__anon1.uc;
6421 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
6424 exp->expType = op1->type;
6426 op1->type->refCount++;
6431 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6433 float value2 = op2->__anon1.f;
6436 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
6439 exp->expType = op1->type;
6441 op1->type->refCount++;
6446 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6448 double value2 = op2->__anon1.d;
6451 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
6454 exp->expType = op1->type;
6456 op1->type->refCount++;
6461 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6463 int value2 = op2->__anon1.i;
6466 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
6469 exp->expType = op1->type;
6471 op1->type->refCount++;
6476 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6478 unsigned int value2 = op2->__anon1.ui;
6481 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
6484 exp->expType = op1->type;
6486 op1->type->refCount++;
6491 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6493 long long value2 = op2->__anon1.i64;
6496 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
6499 exp->expType = op1->type;
6501 op1->type->refCount++;
6506 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6508 uint64 value2 = op2->__anon1.ui64;
6511 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
6514 exp->expType = op1->type;
6516 op1->type->refCount++;
6521 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6523 short value2 = op2->__anon1.s;
6526 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
6529 exp->expType = op1->type;
6531 op1->type->refCount++;
6536 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6538 unsigned short value2 = op2->__anon1.us;
6541 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
6544 exp->expType = op1->type;
6546 op1->type->refCount++;
6551 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6553 char value2 = op2->__anon1.c;
6556 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
6559 exp->expType = op1->type;
6561 op1->type->refCount++;
6566 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6568 unsigned char value2 = op2->__anon1.uc;
6571 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
6574 exp->expType = op1->type;
6576 op1->type->refCount++;
6581 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6583 float value2 = op2->__anon1.f;
6586 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
6589 exp->expType = op1->type;
6591 op1->type->refCount++;
6596 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6598 double value2 = op2->__anon1.d;
6601 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
6604 exp->expType = op1->type;
6606 op1->type->refCount++;
6611 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6613 int value2 = op2->__anon1.i;
6616 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
6619 exp->expType = op1->type;
6621 op1->type->refCount++;
6626 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6628 unsigned int value2 = op2->__anon1.ui;
6631 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
6634 exp->expType = op1->type;
6636 op1->type->refCount++;
6641 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6643 long long value2 = op2->__anon1.i64;
6646 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
6649 exp->expType = op1->type;
6651 op1->type->refCount++;
6656 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6658 uint64 value2 = op2->__anon1.ui64;
6661 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
6664 exp->expType = op1->type;
6666 op1->type->refCount++;
6671 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6673 short value2 = op2->__anon1.s;
6676 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
6679 exp->expType = op1->type;
6681 op1->type->refCount++;
6686 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6688 unsigned short value2 = op2->__anon1.us;
6691 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
6694 exp->expType = op1->type;
6696 op1->type->refCount++;
6701 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6703 char value2 = op2->__anon1.c;
6706 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
6709 exp->expType = op1->type;
6711 op1->type->refCount++;
6716 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6718 unsigned char value2 = op2->__anon1.uc;
6721 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
6724 exp->expType = op1->type;
6726 op1->type->refCount++;
6731 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6733 float value2 = op2->__anon1.f;
6736 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
6739 exp->expType = op1->type;
6741 op1->type->refCount++;
6746 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6748 double value2 = op2->__anon1.d;
6751 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
6754 exp->expType = op1->type;
6756 op1->type->refCount++;
6761 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6763 int value2 = op2->__anon1.i;
6766 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
6769 exp->expType = op1->type;
6771 op1->type->refCount++;
6776 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6778 unsigned int value2 = op2->__anon1.ui;
6781 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
6784 exp->expType = op1->type;
6786 op1->type->refCount++;
6791 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6793 long long value2 = op2->__anon1.i64;
6796 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
6799 exp->expType = op1->type;
6801 op1->type->refCount++;
6806 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6808 uint64 value2 = op2->__anon1.ui64;
6811 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
6814 exp->expType = op1->type;
6816 op1->type->refCount++;
6821 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6823 short value2 = op2->__anon1.s;
6826 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
6829 exp->expType = op1->type;
6831 op1->type->refCount++;
6836 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6838 unsigned short value2 = op2->__anon1.us;
6841 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
6844 exp->expType = op1->type;
6846 op1->type->refCount++;
6851 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6853 char value2 = op2->__anon1.c;
6856 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
6859 exp->expType = op1->type;
6861 op1->type->refCount++;
6866 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6868 unsigned char value2 = op2->__anon1.uc;
6871 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
6874 exp->expType = op1->type;
6876 op1->type->refCount++;
6881 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6883 float value2 = op2->__anon1.f;
6886 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
6889 exp->expType = op1->type;
6891 op1->type->refCount++;
6896 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6898 double value2 = op2->__anon1.d;
6901 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
6904 exp->expType = op1->type;
6906 op1->type->refCount++;
6911 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6913 int value2 = op2->__anon1.i;
6916 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
6919 exp->expType = op1->type;
6921 op1->type->refCount++;
6926 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6928 unsigned int value2 = op2->__anon1.ui;
6931 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
6934 exp->expType = op1->type;
6936 op1->type->refCount++;
6941 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6943 long long value2 = op2->__anon1.i64;
6946 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
6949 exp->expType = op1->type;
6951 op1->type->refCount++;
6956 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6958 uint64 value2 = op2->__anon1.ui64;
6961 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
6964 exp->expType = op1->type;
6966 op1->type->refCount++;
6971 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6973 short value2 = op2->__anon1.s;
6976 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
6979 exp->expType = op1->type;
6981 op1->type->refCount++;
6986 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6988 unsigned short value2 = op2->__anon1.us;
6991 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
6994 exp->expType = op1->type;
6996 op1->type->refCount++;
7001 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7003 char value2 = op2->__anon1.c;
7006 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
7009 exp->expType = op1->type;
7011 op1->type->refCount++;
7016 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7018 unsigned char value2 = op2->__anon1.uc;
7021 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
7024 exp->expType = op1->type;
7026 op1->type->refCount++;
7031 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7033 float value2 = op2->__anon1.f;
7036 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
7039 exp->expType = op1->type;
7041 op1->type->refCount++;
7046 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7048 double value2 = op2->__anon1.d;
7051 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
7054 exp->expType = op1->type;
7056 op1->type->refCount++;
7061 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7064 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
7067 exp->expType = op1->type;
7069 op1->type->refCount++;
7074 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7077 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
7080 exp->expType = op1->type;
7082 op1->type->refCount++;
7087 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7090 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
7093 exp->expType = op1->type;
7095 op1->type->refCount++;
7100 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7103 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
7106 exp->expType = op1->type;
7108 op1->type->refCount++;
7113 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7116 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
7119 exp->expType = op1->type;
7121 op1->type->refCount++;
7126 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7129 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
7132 exp->expType = op1->type;
7134 op1->type->refCount++;
7139 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7142 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
7145 exp->expType = op1->type;
7147 op1->type->refCount++;
7152 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7155 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
7158 exp->expType = op1->type;
7160 op1->type->refCount++;
7165 static void PrintName(struct Type * type, char * string, unsigned int fullName)
7167 if(type->name && type->name[0])
7170 strcat(string, type->name);
7173 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
7179 strcat(string, name);
7184 static void PrintAttribs(struct Type * type, char * string)
7189 strcat(string, "dllexport ");
7190 if(type->attrStdcall)
7191 strcat(string, "stdcall ");
7195 static struct Type * FindMember(struct Type * type, char * string)
7197 struct Type * memberType;
7199 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7201 if(!memberType->name)
7203 struct Type * subType = FindMember(memberType, string);
7208 else if(!strcmp(memberType->name, string))
7211 return (((void *)0));
7214 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
7216 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
7218 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
7220 unsigned int result = 0;
7225 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
7226 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
7230 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
7231 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7234 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)
7235 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7238 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)
7239 result = GetOpFloat(op, &op->__anon1.f);
7242 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)
7243 result = GetOpDouble(op, &op->__anon1.d);
7246 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)
7247 result = GetOpUInt64(op, &op->__anon1.ui64);
7250 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)
7251 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7254 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7255 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7258 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7259 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7265 struct OpTable floatOps =
7267 (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)
7270 struct OpTable doubleOps =
7272 (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)
7275 struct OpTable intOps =
7277 (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)
7280 struct OpTable uintOps =
7282 (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)
7285 struct OpTable int64Ops =
7287 (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)
7290 struct OpTable uint64Ops =
7292 (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)
7295 struct OpTable shortOps =
7297 (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)
7300 struct OpTable ushortOps =
7302 (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)
7305 struct OpTable charOps =
7307 (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)
7310 struct OpTable ucharOps =
7312 (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)
7315 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
7317 struct Type * memberType;
7319 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7321 if(!memberType->name)
7323 struct Type * subType = FindMember(memberType, string);
7327 *offset += memberType->offset;
7331 else if(!strcmp(memberType->name, string))
7333 *offset += memberType->offset;
7337 return (((void *)0));
7340 struct __ecereNameSpace__ecere__com__Module;
7342 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);
7344 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
7346 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);
7348 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);
7350 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
7352 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7357 struct __ecereNameSpace__ecere__sys__BTNode * parent;
7358 struct __ecereNameSpace__ecere__sys__BTNode * left;
7359 struct __ecereNameSpace__ecere__sys__BTNode * right;
7361 struct __ecereNameSpace__ecere__com__Instance * module;
7362 char * dataTypeString;
7363 struct Type * dataType;
7368 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);
7370 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
7372 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);
7374 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
7376 struct __ecereNameSpace__ecere__com__DefinedExpression;
7378 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7380 struct __ecereNameSpace__ecere__com__DefinedExpression
7382 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
7383 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
7386 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7389 struct __ecereNameSpace__ecere__sys__BinaryTree;
7391 struct __ecereNameSpace__ecere__sys__BinaryTree
7393 struct __ecereNameSpace__ecere__sys__BTNode * root;
7395 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
7396 void (* FreeKey)(void * key);
7399 struct __ecereNameSpace__ecere__com__Class
7401 struct __ecereNameSpace__ecere__com__Class * prev;
7402 struct __ecereNameSpace__ecere__com__Class * next;
7408 unsigned int (* Constructor)(void * );
7409 void (* Destructor)(void * );
7412 struct __ecereNameSpace__ecere__com__Class * base;
7413 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
7414 struct __ecereNameSpace__ecere__sys__BinaryTree members;
7415 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
7416 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
7417 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
7418 struct __ecereNameSpace__ecere__sys__OldList derivatives;
7422 struct __ecereNameSpace__ecere__com__Instance * module;
7423 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7424 const char * dataTypeString;
7425 struct Type * dataType;
7427 int defaultAlignment;
7428 void (* Initialize)();
7430 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
7431 const char * designerClass;
7432 unsigned int noExpansion;
7433 const char * defaultProperty;
7434 unsigned int comRedefinition;
7437 unsigned int internalDecl;
7439 unsigned int computeSize;
7440 short structAlignment;
7441 short pointerAlignment;
7442 int destructionWatchOffset;
7444 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
7445 int inheritanceAccess;
7446 const char * fullName;
7448 struct __ecereNameSpace__ecere__sys__OldList conversions;
7449 struct __ecereNameSpace__ecere__sys__OldList templateParams;
7450 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
7451 struct __ecereNameSpace__ecere__com__Class * templateClass;
7452 struct __ecereNameSpace__ecere__sys__OldList templatized;
7454 unsigned int isInstanceClass;
7455 unsigned int byValueSystemClass;
7458 struct __ecereNameSpace__ecere__com__NameSpace
7461 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
7462 struct __ecereNameSpace__ecere__com__NameSpace * left;
7463 struct __ecereNameSpace__ecere__com__NameSpace * right;
7465 struct __ecereNameSpace__ecere__com__NameSpace * parent;
7466 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
7467 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
7468 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
7469 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
7472 struct __ecereNameSpace__ecere__com__DataMember
7474 struct __ecereNameSpace__ecere__com__DataMember * prev;
7475 struct __ecereNameSpace__ecere__com__DataMember * next;
7477 unsigned int isProperty;
7480 struct __ecereNameSpace__ecere__com__Class * _class;
7481 const char * dataTypeString;
7482 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
7483 struct Type * dataType;
7487 struct __ecereNameSpace__ecere__sys__OldList members;
7488 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
7490 short structAlignment;
7491 short pointerAlignment;
7494 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7496 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7498 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
7500 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7502 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7504 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
7506 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl)
7510 if(type->kind == 11)
7512 struct Type * param;
7514 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
7515 _DeclareType(neededFor, param, forFunctionDef, 0, fwdDecl);
7516 _DeclareType(neededFor, type->__anon1.__anon2.returnType, forFunctionDef, 0, fwdDecl);
7518 else if(type->kind == 13)
7519 _DeclareType(neededFor, type->__anon1.type, 0, 0, fwdDecl);
7520 else if(type->kind == 8)
7522 struct __ecereNameSpace__ecere__com__Class * c = type->__anon1._class->__anon1.registered;
7524 _DeclareStruct(neededFor, c ? c->fullName : "ecere::com::Instance", c ? c->type == 5 : 0, needDereference && c && c->type == 1, fwdDecl);
7526 else if(type->kind == 9 || type->kind == 10)
7528 struct Type * member;
7530 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7531 _DeclareType(neededFor, member, needDereference, forFunctionDef, fwdDecl);
7533 else if(type->kind == 12)
7534 _DeclareType(neededFor, type->__anon1.__anon4.arrayType, 1, 0, fwdDecl);
7538 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
7540 unsigned int status = 1;
7542 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))
7544 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
7545 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
7547 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
7549 struct Type * sourceType = source, * destType = dest;
7551 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
7552 sourceType = sourceType->__anon1.type;
7553 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
7554 destType = destType->__anon1.type;
7555 if(!destType->constant && sourceType->constant)
7559 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
7566 struct Operand GetOperand(struct Expression * exp)
7575 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
7578 struct Type * type = exp->expType;
7582 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))
7584 if(!type->__anon1._class->__anon1.registered->dataType)
7585 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7586 type = type->__anon1._class->__anon1.registered->dataType;
7588 if(exp->type == 3 && op.kind == 13)
7590 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
7594 else if(exp->isConstant && exp->type == 2)
7596 op.kind = type->kind;
7603 if(exp->__anon1.__anon1.constant[0] == '\'')
7605 op.__anon1.c = exp->__anon1.__anon1.constant[1];
7608 else if(type->isSigned)
7610 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7615 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7621 if(exp->__anon1.__anon1.constant[0] == '\'')
7623 op.__anon1.s = exp->__anon1.__anon1.constant[1];
7626 else if(type->isSigned)
7628 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7633 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7639 if(exp->__anon1.__anon1.constant[0] == '\'')
7641 op.__anon1.i = exp->__anon1.__anon1.constant[1];
7644 else if(type->isSigned)
7646 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7651 op.__anon1.ui = (unsigned int)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7659 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7664 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7672 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7677 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7685 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7690 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7696 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7697 op.__anon1.f = __ecereMethod_float_inf();
7698 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7699 op.__anon1.f = -__ecereMethod_float_inf();
7700 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7701 op.__anon1.f = __ecereMethod_float_nan();
7702 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7703 op.__anon1.f = -__ecereMethod_float_nan();
7705 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7709 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7710 op.__anon1.d = __ecereMethod_double_inf();
7711 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7712 op.__anon1.d = -__ecereMethod_double_inf();
7713 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7714 op.__anon1.d = __ecereMethod_double_nan();
7715 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7716 op.__anon1.d = -__ecereMethod_double_nan();
7718 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7724 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7734 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
7738 switch(_class->typeSize)
7741 if(!strcmp(_class->dataTypeString, "uint64"))
7742 v = (long long)*(uint64 *)ptr;
7744 v = *(long long *)ptr;
7747 if(!strcmp(_class->dataTypeString, "uint"))
7748 v = (long long)*(unsigned int *)ptr;
7750 v = (long long)*(int *)ptr;
7753 if(!strcmp(_class->dataTypeString, "uint16"))
7754 v = (long long)*(unsigned short *)ptr;
7756 v = (long long)*(short *)ptr;
7759 if(!strcmp(_class->dataTypeString, "byte"))
7760 v = (long long)*(unsigned char *)ptr;
7762 v = (long long)*(char *)ptr;
7768 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
7770 if(!type->isSigned && type->kind != 22 && type->kind != 23)
7771 ListAdd(specs, MkSpecifier(UNSIGNED));
7776 if(type->__anon1._class->__anon1.registered)
7778 if(!type->__anon1._class->__anon1.registered->dataType)
7779 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7780 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
7785 ListAdd(specs, MkSpecifier(DOUBLE));
7788 ListAdd(specs, MkSpecifier(FLOAT));
7791 ListAdd(specs, MkSpecifier(CHAR));
7794 ListAdd(specs, MkSpecifier(_BOOL));
7797 ListAdd(specs, MkSpecifier(SHORT));
7800 ListAdd(specs, MkSpecifier(INT64));
7803 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
7806 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
7810 ListAdd(specs, MkSpecifier(INT));
7815 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
7819 if(printConst && type->constant)
7820 strcat(string, "const ");
7825 struct Symbol * c = type->__anon1._class;
7826 unsigned int isObjectBaseClass = !c || !c->string || !strcmp(c->string, "class");
7828 if(type->classObjectType == 2 && isObjectBaseClass)
7829 strcat(string, "typed_object");
7830 else if(type->classObjectType == 3 && isObjectBaseClass)
7831 strcat(string, "any_object");
7835 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
7837 if(type->byReference)
7838 strcat(string, " &");
7842 strcat(string, "void");
7845 strcat(string, type->isSigned ? "int" : "uint");
7848 strcat(string, type->isSigned ? "int64" : "uint64");
7851 strcat(string, type->isSigned ? "intptr" : "uintptr");
7854 strcat(string, type->isSigned ? "intsize" : "uintsize");
7857 strcat(string, type->isSigned ? "char" : "byte");
7860 strcat(string, "_Bool");
7863 strcat(string, type->isSigned ? "short" : "uint16");
7866 strcat(string, "float");
7869 strcat(string, "double");
7872 if(type->__anon1.__anon1.enumName)
7874 strcat(string, "struct ");
7875 strcat(string, type->__anon1.__anon1.enumName);
7877 else if(type->typeName)
7878 strcat(string, type->typeName);
7881 struct Type * member;
7883 strcat(string, "struct { ");
7884 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7886 PrintType(member, string, 1, fullName);
7887 strcat(string, "; ");
7889 strcat(string, "}");
7893 if(type->__anon1.__anon1.enumName)
7895 strcat(string, "union ");
7896 strcat(string, type->__anon1.__anon1.enumName);
7898 else if(type->typeName)
7899 strcat(string, type->typeName);
7902 strcat(string, "union ");
7903 strcat(string, "(unnamed)");
7907 if(type->__anon1.__anon1.enumName)
7909 strcat(string, "enum ");
7910 strcat(string, type->__anon1.__anon1.enumName);
7912 else if(type->typeName)
7913 strcat(string, type->typeName);
7915 strcat(string, "int");
7918 strcat(string, "...");
7921 strcat(string, "subclass(");
7922 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
7923 strcat(string, ")");
7926 strcat(string, type->__anon1.templateParameter->identifier->string);
7929 strcat(string, "thisclass");
7932 strcat(string, "__builtin_va_list");
7938 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
7940 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
7942 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
7944 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
7946 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
7948 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
7950 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
7952 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
7954 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
7956 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
7958 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
7960 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
7962 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
7964 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
7966 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
7968 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
7970 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
7972 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
7974 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
7976 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
7978 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
7980 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
7982 struct __ecereNameSpace__ecere__com__Application
7985 const char * * argv;
7987 unsigned int isGUIApp;
7988 struct __ecereNameSpace__ecere__sys__OldList allModules;
7989 char * parsedCommand;
7990 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
7993 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)
7997 *curMember = (*curMember)->next;
7998 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
8000 *curMember = subMemberStack[--(*subMemberStackPos)];
8001 *curMember = (*curMember)->next;
8003 while((*curMember) && (*curMember)->isProperty)
8004 *curMember = (*curMember)->next;
8005 if(subMemberStackPos)
8007 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8009 subMemberStack[(*subMemberStackPos)++] = *curMember;
8010 *curMember = (*curMember)->members.first;
8011 while(*curMember && (*curMember)->isProperty)
8012 *curMember = (*curMember)->next;
8020 if(subMemberStackPos && *subMemberStackPos)
8022 *curMember = subMemberStack[--(*subMemberStackPos)];
8023 *curMember = (*curMember)->next;
8027 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
8029 if(*curClass == _class)
8031 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
8033 *curMember = (*curClass)->membersAndProperties.first;
8035 while((*curMember) && (*curMember)->isProperty)
8036 *curMember = (*curMember)->next;
8037 if(subMemberStackPos)
8039 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
8041 subMemberStack[(*subMemberStackPos)++] = *curMember;
8042 *curMember = (*curMember)->members.first;
8043 while(*curMember && (*curMember)->isProperty)
8044 *curMember = (*curMember)->next;
8051 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
8053 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
8054 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
8055 struct __ecereNameSpace__ecere__com__NameSpace * child;
8059 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)))
8061 data = ScanGlobalData(child, name);
8069 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
8071 int nsLen = strlen(nameSpace);
8072 struct Symbol * symbol;
8074 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)))
8076 char * s = symbol->string;
8078 if(!strncmp(s, nameSpace, nsLen))
8083 for(c = strlen(s) - 1; c >= 0; c--)
8086 namePart = s + c + 1;
8087 if(!strcmp(namePart, name))
8095 return (((void *)0));
8098 unsigned int GetInt(struct Expression * exp, int * value2)
8100 struct Operand op2 = GetOperand(exp);
8102 return GetOpInt(&op2, value2);
8105 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
8107 struct Operand op2 = GetOperand(exp);
8109 return GetOpUInt(&op2, value2);
8112 unsigned int GetInt64(struct Expression * exp, long long * value2)
8114 struct Operand op2 = GetOperand(exp);
8116 return GetOpInt64(&op2, value2);
8119 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
8121 struct Operand op2 = GetOperand(exp);
8123 return GetOpUInt64(&op2, value2);
8126 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
8128 struct Operand op2 = GetOperand(exp);
8130 return GetOpIntPtr(&op2, value2);
8133 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
8135 struct Operand op2 = GetOperand(exp);
8137 return GetOpUIntPtr(&op2, value2);
8140 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
8142 struct Operand op2 = GetOperand(exp);
8144 return GetOpIntSize(&op2, value2);
8147 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
8149 struct Operand op2 = GetOperand(exp);
8151 return GetOpUIntSize(&op2, value2);
8154 unsigned int GetShort(struct Expression * exp, short * value2)
8156 struct Operand op2 = GetOperand(exp);
8158 return GetOpShort(&op2, value2);
8161 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
8163 struct Operand op2 = GetOperand(exp);
8165 return GetOpUShort(&op2, value2);
8168 unsigned int GetChar(struct Expression * exp, char * value2)
8170 struct Operand op2 = GetOperand(exp);
8172 return GetOpChar(&op2, value2);
8175 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
8177 struct Operand op2 = GetOperand(exp);
8179 return GetOpUChar(&op2, value2);
8182 unsigned int GetFloat(struct Expression * exp, float * value2)
8184 struct Operand op2 = GetOperand(exp);
8186 return GetOpFloat(&op2, value2);
8189 unsigned int GetDouble(struct Expression * exp, double * value2)
8191 struct Operand op2 = GetOperand(exp);
8193 return GetOpDouble(&op2, value2);
8196 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
8198 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8200 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
8201 PrintAttribs(type, string);
8202 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
8203 strcat(string, " const");
8204 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
8205 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8206 strcat(string, " (");
8207 if(type->kind == 13)
8209 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
8210 PrintAttribs(type->__anon1.type, string);
8212 if(type->kind == 13)
8214 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
8215 strcat(string, "*");
8217 strcat(string, " *");
8219 if(printConst && type->constant && type->kind == 13)
8220 strcat(string, " const");
8223 PrintTypeSpecs(type, string, fullName, printConst);
8226 void PrintExpression(struct Expression * exp, char * string)
8229 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8231 unsigned int backOutputLineNumbers = outputLineNumbers;
8233 outputLineNumbers = 0;
8235 OutputExpression(exp, f);
8236 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8237 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8239 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8240 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
8241 count = strlen(string);
8242 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
8243 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8245 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8246 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
8247 string[count] = '\0';
8248 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
8249 outputLineNumbers = backOutputLineNumbers;
8253 struct Type * Dereference(struct Type * source)
8255 struct Type * type = (((void *)0));
8259 if(source->kind == 13 || source->kind == 12)
8261 type = source->__anon1.type;
8262 source->__anon1.type->refCount++;
8264 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
8266 type = __extension__ ({
8267 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8269 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
8272 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
8278 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
8283 static struct Type * Reference(struct Type * source)
8285 struct Type * type = (((void *)0));
8289 type = __extension__ ({
8290 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8292 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
8299 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
8301 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
8303 FreeExpContents(checkedExp);
8304 FreeType(checkedExp->expType);
8305 FreeType(checkedExp->destType);
8306 *checkedExp = *newExp;
8307 ((newExp ? __extension__ ({
8308 void * __ecerePtrToDelete = (newExp);
8310 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
8311 }) : 0), newExp = 0);
8312 checkedExp->prev = prev;
8313 checkedExp->next = next;
8316 void FinishTemplatesContext(struct Context * context)
8318 PopContext(context);
8319 FreeContext(context);
8320 ((context ? __extension__ ({
8321 void * __ecerePtrToDelete = (context);
8323 __ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
8324 }) : 0), context = 0);
8327 static __attribute__((unused)) void UnusedFunction()
8331 ((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);
8334 struct Expression * ParseExpressionString(char * expression)
8337 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8338 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
8339 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8341 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8342 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
8343 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8344 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8346 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8347 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
8349 parsedExpression = (((void *)0));
8351 expression_yyparse();
8352 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
8353 return parsedExpression;
8356 struct __ecereNameSpace__ecere__com__Module
8358 struct __ecereNameSpace__ecere__com__Instance * application;
8359 struct __ecereNameSpace__ecere__sys__OldList classes;
8360 struct __ecereNameSpace__ecere__sys__OldList defines;
8361 struct __ecereNameSpace__ecere__sys__OldList functions;
8362 struct __ecereNameSpace__ecere__sys__OldList modules;
8363 struct __ecereNameSpace__ecere__com__Instance * prev;
8364 struct __ecereNameSpace__ecere__com__Instance * next;
8370 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
8371 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
8374 static struct GlobalData * FindGlobalData(char * name)
8377 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
8379 nameSpace = globalData;
8380 for(c = 0; name[c]; c++)
8382 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
8384 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
8385 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
8387 strncpy(spaceName, name + start, c - start);
8388 spaceName[c - start] = '\0';
8389 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
8390 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
8392 return (((void *)0));
8393 nameSpace = newSpace;
8401 return ScanGlobalData(nameSpace, name + start);
8403 return (((void *)0));
8406 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
8409 char nameSpace[1024];
8410 const char * namePart;
8411 unsigned int gotColon = 0;
8413 nameSpace[0] = '\0';
8414 for(c = strlen(name) - 1; c >= 0; c--)
8420 namePart = name + c + 1;
8421 while(c >= 0 && name[c] == ':')
8425 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
8429 memcpy(nameSpace, name, c + 1);
8430 nameSpace[c + 1] = 0;
8431 return ScanWithNameSpace(tree, nameSpace, namePart);
8435 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8441 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8445 return ScanWithNameSpace(tree, "", namePart);
8447 return (((void *)0));
8450 static void PrintArraySize(struct Type * arrayType, char * string)
8456 if(arrayType->__anon1.__anon4.enumClass)
8457 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
8458 else if(arrayType->__anon1.__anon4.arraySizeExp)
8459 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
8461 strcat(string, size);
8464 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
8469 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
8471 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8472 strcat(string, ")");
8473 if(type->kind == 12)
8474 PrintArraySize(type, string);
8475 else if(type->kind == 11)
8477 struct Type * param;
8479 strcat(string, "(");
8480 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
8482 PrintType(param, string, 1, fullName);
8484 strcat(string, ", ");
8486 strcat(string, ")");
8488 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8489 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
8492 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
8494 PrePrintType(type, string, fullName, (((void *)0)), printConst);
8495 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
8496 strcat(string, " ");
8497 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
8499 struct Symbol * _class = type->__anon1.__anon2.thisClass;
8501 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
8503 if(type->classObjectType == 1)
8504 strcat(string, "class");
8506 strcat(string, type->byReference ? "typed_object&" : "typed_object");
8508 else if(_class && _class->string)
8510 char * s = _class->string;
8516 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
8522 strcat(string, name);
8525 strcat(string, "::");
8527 if(printName && type->name)
8528 PrintName(type, string, fullName);
8529 PostPrintType(type, string, fullName);
8530 if(type->bitFieldCount)
8534 sprintf(count, ":%d", type->bitFieldCount);
8535 strcat(string, count);
8543 struct Conversion * prev, * next;
8544 struct __ecereNameSpace__ecere__com__Property * convert;
8546 struct Type * resultType;
8549 static void FreeConvert(struct Conversion * convert)
8551 if(convert->resultType)
8552 FreeType(convert->resultType);
8559 struct Enumerator * prev;
8560 struct Enumerator * next;
8561 struct Location loc;
8562 struct Identifier * id;
8563 struct Expression * exp;
8570 struct AsmField * prev;
8571 struct AsmField * next;
8572 struct Location loc;
8574 struct Expression * expression;
8575 struct Identifier * symbolic;
8578 struct ClassDefinition;
8582 struct Context * parent;
8583 struct __ecereNameSpace__ecere__sys__BinaryTree types;
8584 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
8585 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
8586 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
8589 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
8590 struct ClassDefinition * classDef;
8591 unsigned int templateTypesOnly;
8592 unsigned int hasNameSpace;
8597 struct External * prev;
8598 struct External * next;
8599 struct Location loc;
8601 struct Symbol * symbol;
8604 struct FunctionDefinition * function;
8605 struct ClassDefinition * _class;
8606 struct Declaration * declaration;
8607 char * importString;
8608 struct Identifier * id;
8609 struct DBTableDef * table;
8610 } ecere_gcc_struct __anon1;
8612 struct External * fwdDecl;
8613 struct __ecereNameSpace__ecere__com__Instance * outgoing;
8614 struct __ecereNameSpace__ecere__com__Instance * incoming;
8615 int nonBreakableIncoming;
8618 struct ClassDefinition
8620 struct ClassDefinition * prev;
8621 struct ClassDefinition * next;
8622 struct Location loc;
8623 struct Specifier * _class;
8624 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
8625 struct __ecereNameSpace__ecere__sys__OldList * definitions;
8626 struct Symbol * symbol;
8627 struct Location blockStart;
8628 struct Location nameLoc;
8630 unsigned int deleteWatchable;
8633 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
8635 void __ecereMethod_External_CreateEdge(struct External * this, struct External * from, unsigned int soft);
8637 void DeclareGlobalData(struct External * neededFor, struct GlobalData * data)
8639 struct Symbol * symbol = data->symbol;
8641 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
8646 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
8649 data->dataType = ProcessTypeString(data->dataTypeString, 0);
8652 struct Declaration * decl;
8653 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
8654 struct Declarator * d;
8655 struct External * external;
8657 specifiers = MkList();
8658 declarators = MkList();
8659 ListAdd(specifiers, MkSpecifier(EXTERN));
8660 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
8661 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
8662 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
8663 decl = MkDeclaration(specifiers, declarators);
8664 external = MkExternalDeclaration(decl);
8666 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
8667 external->symbol = symbol;
8668 symbol->__anon2.__anon1.pointerExternal = external;
8669 DeclareType(external, data->dataType, 1, 1);
8672 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
8673 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, 0);
8676 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
8678 struct Context * ctx;
8679 struct Symbol * symbol = (((void *)0));
8681 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
8683 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
8685 symbol = (((void *)0));
8690 strcpy(curName, thisNameSpace);
8691 strcat(curName, "::");
8692 strcat(curName, name);
8693 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
8696 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
8699 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
8700 if(symbol || ctx == endContext)
8703 if(inCompiler && symbol && ctx == globalContext && symbol->__anon2.__anon1.pointerExternal && curExternal && symbol->__anon2.__anon1.pointerExternal != curExternal)
8704 __ecereMethod_External_CreateUniqueEdge(curExternal, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
8712 struct ClassDef * prev;
8713 struct ClassDef * next;
8714 struct Location loc;
8718 struct Declaration * decl;
8719 struct ClassFunction * function;
8720 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
8721 struct PropertyDef * propertyDef;
8722 struct PropertyWatch * propertyWatch;
8724 struct Identifier * defaultProperty;
8727 struct Identifier * id;
8728 struct Initializer * initializer;
8729 } ecere_gcc_struct __anon1;
8730 } ecere_gcc_struct __anon1;
8737 struct PropertyDef * prev;
8738 struct PropertyDef * next;
8739 struct Location loc;
8740 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
8741 struct Declarator * declarator;
8742 struct Identifier * id;
8743 struct Statement * getStmt;
8744 struct Statement * setStmt;
8745 struct Statement * issetStmt;
8746 struct Symbol * symbol;
8747 struct Expression * category;
8750 unsigned int conversion : 1;
8751 unsigned int isWatchable : 1;
8752 unsigned int isDBProp : 1;
8753 } ecere_gcc_struct __anon1;
8756 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
8758 struct ClassDef * def;
8761 for(def = (*definitions).first; def; def = def->next)
8765 struct Declaration * decl = def->__anon1.decl;
8767 if(decl && decl->__anon1.__anon1.specifiers)
8769 struct Specifier * spec;
8770 unsigned int isStruct = 0;
8772 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
8774 if(spec->type == 3 || spec->type == 4)
8776 if(spec->__anon1.__anon2.definitions)
8777 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
8783 struct Declarator * d = (((void *)0));
8785 if(decl->__anon1.__anon1.declarators)
8787 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
8789 struct Identifier * idDecl = GetDeclId(d);
8799 sprintf(id, "__anon%d", anonID++);
8800 if(!decl->__anon1.__anon1.declarators)
8801 decl->__anon1.__anon1.declarators = MkList();
8802 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
8812 typedef union YYSTYPE
8817 struct Identifier * id;
8818 struct Expression * exp;
8819 struct Specifier * specifier;
8820 struct __ecereNameSpace__ecere__sys__OldList * list;
8821 struct Enumerator * enumerator;
8822 struct Declarator * declarator;
8823 struct Pointer * pointer;
8824 struct Initializer * initializer;
8825 struct InitDeclarator * initDeclarator;
8826 struct TypeName * typeName;
8827 struct Declaration * declaration;
8828 struct Statement * stmt;
8829 struct FunctionDefinition * function;
8830 struct External * external;
8831 struct Context * context;
8832 struct AsmField * asmField;
8833 struct Attrib * attrib;
8834 struct ExtDecl * extDecl;
8835 struct Attribute * attribute;
8836 struct Instantiation * instance;
8837 struct MembersInit * membersInit;
8838 struct MemberInit * memberInit;
8839 struct ClassFunction * classFunction;
8840 struct ClassDefinition * _class;
8841 struct ClassDef * classDef;
8842 struct PropertyDef * prop;
8844 struct Symbol * symbol;
8845 struct PropertyWatch * propertyWatch;
8846 struct TemplateParameter * templateParameter;
8847 struct TemplateArgument * templateArgument;
8848 struct TemplateDatatype * templateDatatype;
8849 struct DBTableEntry * dbtableEntry;
8850 struct DBIndexItem * dbindexItem;
8851 struct DBTableDef * dbtableDef;
8852 } ecere_gcc_struct YYSTYPE;
8854 extern YYSTYPE yylval;
8858 struct MemberInit * prev;
8859 struct MemberInit * next;
8860 struct Location loc;
8861 struct Location realLoc;
8862 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
8863 struct Initializer * initializer;
8865 unsigned int variable;
8866 unsigned int takeOutExp;
8869 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
8871 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
8873 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
8875 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
8876 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
8881 const char * dataTypeString;
8883 } ecere_gcc_struct __anon1;
8884 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
8888 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
8890 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
8892 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
8893 struct __ecereNameSpace__ecere__com__Class * sClass;
8895 for(sClass = _class; sClass; sClass = sClass->base)
8898 if(sClass->templateClass)
8899 sClass = sClass->templateClass;
8900 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
8902 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
8904 for(sClass = sClass->base; sClass; sClass = sClass->base)
8906 if(sClass->templateClass)
8907 sClass = sClass->templateClass;
8908 id += sClass->templateParams.count;
8919 arg = &_class->templateArgs[id];
8920 if(arg && param->type == 0)
8921 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
8926 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
8928 struct Context * context = PushContext();
8930 context->templateTypesOnly = 1;
8931 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
8933 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
8935 for(; param; param = param->next)
8937 if(param->type == 0 && param->identifier)
8939 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
8941 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8947 struct __ecereNameSpace__ecere__com__Class * sClass;
8949 for(sClass = _class; sClass; sClass = sClass->base)
8951 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
8953 for(p = sClass->templateParams.first; p; p = p->next)
8957 struct TemplateParameter * param = p->param;
8958 struct TemplatedType * type;
8962 p->param = param = __extension__ ({
8963 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
8965 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
8968 type = __extension__ ({
8969 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
8971 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
8973 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8981 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
8983 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8985 unsigned int first = 1;
8987 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8989 char className[1024];
8991 strcpy(className, _class->fullName);
8992 for(param = _class->templateParams.first; param; param = param->next)
8996 strcat(className, "<");
8998 strcat(className, ", ");
8999 if(lastParam + 1 != p)
9001 strcat(className, param->name);
9002 strcat(className, " = ");
9004 strcat(className, param->name);
9012 int len = strlen(className);
9014 if(className[len - 1] == '>')
9015 className[len++] = ' ';
9016 className[len++] = '>';
9017 className[len++] = '\0';
9019 return __ecereNameSpace__ecere__sys__CopyString(className);
9022 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
9025 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
9029 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
9031 unsigned int first = 1;
9033 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9035 char className[1024];
9037 strcpy(className, _class->fullName);
9038 for(param = _class->templateParams.first; param; param = param->next)
9042 strcat(className, "<");
9044 strcat(className, ", ");
9045 if(lastParam + 1 != p)
9047 strcat(className, param->name);
9048 strcat(className, " = ");
9050 strcat(className, param->name);
9058 int len = strlen(className);
9060 if(className[len - 1] == '>')
9061 className[len++] = ' ';
9062 className[len++] = '>';
9063 className[len++] = '\0';
9065 type = MkClassType(className);
9069 type = MkClassType(_class->fullName);
9074 static int DeclareMembers(struct External * neededBy, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9076 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9077 struct __ecereNameSpace__ecere__com__DataMember * member;
9078 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9080 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
9081 DeclareMembers(neededBy, _class->base, 0);
9082 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
9084 if(!member->isProperty)
9086 switch(member->type)
9090 if(!member->dataType && member->dataTypeString)
9091 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9092 if(member->dataType)
9093 DeclareType(neededBy, member->dataType, 1, 0);
9099 DeclareMembers(neededBy, (struct __ecereNameSpace__ecere__com__Class *)member, 1);
9106 FinishTemplatesContext(context);
9107 return topMember ? topMember->memberID : _class->memberID;
9110 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
9112 if(!method->dataType)
9114 struct Context * context = SetupTemplatesContext(method->_class);
9116 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9117 FinishTemplatesContext(context);
9118 if(method->type != 1 && method->dataType)
9120 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
9122 if(!method->_class->symbol)
9123 method->_class->symbol = FindClass(method->_class->fullName);
9124 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
9130 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
9134 struct Context * context = SetupTemplatesContext(prop->_class);
9136 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
9137 FinishTemplatesContext(context);
9141 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
9143 if(specs != (((void *)0)) && _class)
9145 struct Specifier * spec;
9147 for(spec = specs->first; spec; spec = spec->next)
9149 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
9152 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
9153 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
9159 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
9161 struct Identifier * id = exp->__anon1.__anon1.identifier;
9162 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9163 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
9164 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9165 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9167 if(_class && _class->type == 4)
9169 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
9170 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9174 struct __ecereNameSpace__ecere__com__Class * baseClass;
9176 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
9178 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
9180 for(value = e->values.first; value; value = value->next)
9182 if(!strcmp(value->name, id->string))
9187 exp->isConstant = 1;
9188 if(inCompiler || inPreCompiler || inDebugger)
9192 FreeExpContents(exp);
9194 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
9195 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
9197 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
9198 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9200 exp->expType = MkClassType(baseClass->fullName);
9208 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
9210 ProcessMethodType(method);
9211 exp->expType = __extension__ ({
9212 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
9214 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
9218 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
9221 ProcessPropertyType(prop);
9222 exp->expType = prop->dataType;
9224 prop->dataType->refCount++;
9227 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
9229 if(!member->dataType)
9230 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9231 exp->expType = member->dataType;
9232 if(member->dataType)
9233 member->dataType->refCount++;
9236 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
9238 if(!classProp->dataType)
9239 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
9240 if(classProp->constant)
9242 FreeExpContents(exp);
9243 exp->isConstant = 1;
9244 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
9247 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
9254 sprintf(constant, "%d", (int)classProp->Get(_class));
9255 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9261 exp->expType = classProp->dataType;
9262 if(classProp->dataType)
9263 classProp->dataType->refCount++;
9269 void DeclareProperty(struct External * neededBy, struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
9271 struct Symbol * symbol = prop->symbol;
9272 unsigned int imported = 0;
9273 unsigned int dllImport = 0;
9274 struct External * structExternal = (((void *)0));
9275 struct External * instExternal = (((void *)0));
9277 strcpy(setName, "__ecereProp_");
9278 FullClassNameCat(setName, prop->_class->fullName, 0);
9279 strcat(setName, "_Set_");
9280 FullClassNameCat(setName, prop->name, 1);
9281 strcpy(getName, "__ecereProp_");
9282 FullClassNameCat(getName, prop->_class->fullName, 0);
9283 strcat(getName, "_Get_");
9284 FullClassNameCat(getName, prop->name, 1);
9285 if(!symbol || symbol->_import)
9289 struct Symbol * classSym;
9291 if(!prop->_class->symbol)
9292 prop->_class->symbol = FindClass(prop->_class->fullName);
9293 classSym = prop->_class->symbol;
9294 if(classSym && !classSym->_import)
9296 struct ModuleImport * module;
9298 if(prop->_class->module)
9299 module = FindModule(prop->_class->module);
9301 module = mainModule;
9302 classSym->_import = __extension__ ({
9303 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9305 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
9307 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9309 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9310 symbol->_import = (struct ClassImport *)__extension__ ({
9311 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
9313 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
9316 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
9319 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)
9324 struct Context * context = SetupTemplatesContext(prop->_class);
9326 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
9327 FinishTemplatesContext(context);
9329 if((prop->Get && !symbol->__anon2.__anon2.externalGet) || (prop->Set && !symbol->__anon2.__anon2.externalSet))
9331 if(prop->_class->type == 0 && prop->_class->structSize)
9332 instExternal = DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
9333 structExternal = DeclareStruct((((void *)0)), prop->_class->fullName, prop->_class->type != 1, 0);
9335 if(prop->Get && !symbol->__anon2.__anon2.externalGet)
9337 struct Declaration * decl;
9338 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9339 struct Declarator * d;
9340 struct __ecereNameSpace__ecere__sys__OldList * params;
9341 struct Specifier * spec = (((void *)0));
9342 struct External * external;
9343 struct Declarator * typeDecl;
9344 unsigned int simple = 0;
9345 unsigned int needReference;
9347 specifiers = MkList();
9348 declarators = MkList();
9350 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9351 d = MkDeclaratorIdentifier(MkIdentifier(getName));
9353 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9355 struct Context * context = SetupTemplatesContext(prop->_class);
9357 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
9358 FinishTemplatesContext(context);
9360 needReference = !typeDecl || typeDecl->type == 1;
9361 for(spec = (*specifiers).first; spec; spec = spec->next)
9365 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9369 symbol->_class = classSym->__anon1.registered;
9370 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
9377 d = PlugDeclarator(typeDecl, d);
9380 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
9381 specifiers = MkList();
9383 d = MkDeclaratorFunction(d, params);
9385 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9386 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9387 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9389 ListAdd(specifiers, MkSpecifier(VOID));
9390 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9391 decl = MkDeclaration(specifiers, declarators);
9392 external = MkExternalDeclaration(decl);
9394 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9396 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9398 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9399 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9400 external->symbol = symbol;
9401 symbol->__anon2.__anon2.externalGet = external;
9402 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9404 FreeDeclarator(typeDecl);
9406 if(prop->Set && !symbol->__anon2.__anon2.externalSet)
9408 struct Declaration * decl;
9409 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9410 struct Declarator * d;
9411 struct __ecereNameSpace__ecere__sys__OldList * params;
9412 struct Specifier * spec = (((void *)0));
9413 struct External * external;
9414 struct Declarator * typeDecl;
9415 unsigned int needReference;
9417 declarators = MkList();
9419 if(!prop->conversion || prop->_class->type == 1)
9421 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9423 specifiers = MkList();
9425 struct Context * context = SetupTemplatesContext(prop->_class);
9427 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
9428 FinishTemplatesContext(context);
9430 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
9431 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
9432 ListAdd(params, MkTypeName(specifiers, d));
9433 d = MkDeclaratorIdentifier(MkIdentifier(setName));
9435 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9436 d = MkDeclaratorFunction(d, params);
9437 needReference = !typeDecl || typeDecl->type == 1;
9438 for(spec = (*specifiers).first; spec; spec = spec->next)
9442 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9445 symbol->_class = classSym->__anon1.registered;
9449 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9450 specifiers = MkList();
9452 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9453 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9454 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9455 if(!prop->conversion || prop->_class->type == 1)
9456 ListAdd(specifiers, MkSpecifier(VOID));
9458 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
9459 decl = MkDeclaration(specifiers, declarators);
9460 external = MkExternalDeclaration(decl);
9462 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9464 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9466 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9467 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9468 external->symbol = symbol;
9469 symbol->__anon2.__anon2.externalSet = external;
9470 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9472 if(!symbol->__anon2.__anon2.externalPtr)
9474 struct Declaration * decl;
9475 struct External * external;
9476 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
9477 char propName[1024];
9480 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9483 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9484 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
9486 ListAdd(specifiers, MkSpecifierName("Property"));
9487 strcpy(propName, "__ecereProp_");
9488 FullClassNameCat(propName, prop->_class->fullName, 0);
9489 strcat(propName, "_");
9490 FullClassNameCat(propName, prop->name, 1);
9492 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
9494 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9497 strcpy(propName, "__ecerePropM_");
9498 FullClassNameCat(propName, prop->_class->fullName, 0);
9499 strcat(propName, "_");
9500 FullClassNameCat(propName, prop->name, 1);
9501 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9503 decl = MkDeclaration(specifiers, list);
9505 external = MkExternalDeclaration(decl);
9506 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
9507 external->symbol = symbol;
9508 symbol->__anon2.__anon2.externalPtr = external;
9510 if(inCompiler && neededBy)
9512 if(symbol->__anon2.__anon2.externalPtr)
9513 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalPtr, 0);
9514 if(symbol->__anon2.__anon2.externalGet)
9515 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalGet, symbol->__anon2.__anon2.externalGet->type == 0);
9516 if(symbol->__anon2.__anon2.externalSet)
9517 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalSet, symbol->__anon2.__anon2.externalSet->type == 0);
9521 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction);
9523 void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name)
9525 struct Symbol * symbol = method->symbol;
9527 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && (!symbol->__anon2.__anon3.methodCodeExternal || method->type == 1)))
9529 unsigned int dllImport = 0;
9531 if(!method->dataType)
9532 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9534 if(!symbol || method->type == 1)
9536 struct Symbol * classSym;
9538 if(!method->_class->symbol)
9539 method->_class->symbol = FindClass(method->_class->fullName);
9540 classSym = method->_class->symbol;
9541 if(!classSym->_import)
9543 struct ModuleImport * module;
9545 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name)
9546 module = FindModule(method->_class->module);
9548 module = mainModule;
9549 classSym->_import = __extension__ ({
9550 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9552 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
9554 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9558 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9560 if(!symbol->_import)
9562 symbol->_import = (struct ClassImport *)__extension__ ({
9563 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
9565 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
9567 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
9571 symbol->type = method->dataType;
9573 symbol->type->refCount++;
9576 if(!method->dataType->dllExport)
9578 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)
9584 struct Declaration * decl;
9585 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9586 struct Declarator * d;
9587 struct Declarator * funcDecl;
9588 struct External * external;
9590 specifiers = MkList();
9591 declarators = MkList();
9593 ListAdd(specifiers, MkSpecifier(EXTERN));
9594 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
9595 ListAdd(specifiers, MkSpecifier(STATIC));
9596 if(method->type == 1)
9598 ListAdd(specifiers, MkSpecifier(INT));
9599 d = MkDeclaratorIdentifier(MkIdentifier(name));
9603 d = MkDeclaratorIdentifier(MkIdentifier(name));
9605 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9607 struct Context * context = SetupTemplatesContext(method->_class);
9609 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
9610 FinishTemplatesContext(context);
9612 funcDecl = GetFuncDecl(d);
9615 struct Specifier * spec, * next;
9617 for(spec = (*specifiers).first; spec; spec = next)
9622 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9623 FreeSpecifier(spec);
9627 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
9629 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
9631 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
9632 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")));
9633 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
9634 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
9636 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
9638 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
9640 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
9641 FreeTypeName(param);
9643 if(!funcDecl->__anon1.function.parameters)
9644 funcDecl->__anon1.function.parameters = MkList();
9645 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
9649 ProcessDeclarator(d, 1);
9650 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9651 decl = MkDeclaration(specifiers, declarators);
9652 ReplaceThisClassSpecifiers(specifiers, method->_class);
9653 external = MkExternalDeclaration(decl);
9654 external->symbol = symbol;
9655 symbol->__anon2.__anon1.pointerExternal = external;
9656 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9657 DeclareStruct(external, method->_class->fullName, 1, 1);
9658 if(method->dataType)
9659 DeclareType(external, method->dataType, 1, 1);
9662 if(inCompiler && neededFor)
9664 struct External * external = symbol->__anon2.__anon1.pointerExternal ? symbol->__anon2.__anon1.pointerExternal : symbol->__anon2.__anon3.methodCodeExternal;
9666 __ecereMethod_External_CreateUniqueEdge(neededFor, external, external->type == 0);
9670 struct __ecereNameSpace__ecere__com__GlobalFunction;
9672 struct __ecereNameSpace__ecere__com__GlobalFunction
9674 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
9675 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
9678 struct __ecereNameSpace__ecere__com__Instance * module;
9679 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
9680 const char * dataTypeString;
9681 struct Type * dataType;
9685 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
9687 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);
9689 unsigned int DeclareFunction(struct External * neededFor, struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
9691 struct Symbol * symbol = function->symbol;
9693 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
9695 unsigned int imported = 0;
9696 unsigned int dllImport = 0;
9698 if(!function->dataType)
9700 function->dataType = ProcessTypeString(function->dataTypeString, 0);
9701 if(!function->dataType->__anon1.__anon2.thisClass)
9702 function->dataType->__anon1.__anon2.staticMethod = 1;
9708 struct ModuleImport * module = FindModule(function->module);
9710 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9713 if(!function->dataType->dllExport)
9715 symbol->_import = (struct ClassImport *)__extension__ ({
9716 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
9718 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
9720 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
9724 symbol->type = ProcessTypeString(function->dataTypeString, 0);
9725 if(!symbol->type->__anon1.__anon2.thisClass)
9726 symbol->type->__anon1.__anon2.staticMethod = 1;
9729 imported = symbol->_import ? 1 : 0;
9730 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9736 struct Declaration * decl;
9737 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9738 struct Declarator * d;
9739 struct Declarator * funcDecl;
9740 struct External * external;
9742 specifiers = MkList();
9743 declarators = MkList();
9744 ListAdd(specifiers, MkSpecifier(EXTERN));
9745 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
9747 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9748 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
9749 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType == 1)
9751 struct Specifier * spec;
9753 for(spec = (*specifiers).first; spec; spec = spec->next)
9754 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
9756 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9757 FreeSpecifier(spec);
9761 funcDecl = GetFuncDecl(d);
9762 if(funcDecl && !funcDecl->__anon1.function.parameters)
9764 funcDecl->__anon1.function.parameters = MkList();
9765 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
9767 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9769 struct Context * oldCtx = curContext;
9771 curContext = globalContext;
9772 decl = MkDeclaration(specifiers, declarators);
9773 curContext = oldCtx;
9775 external = MkExternalDeclaration(decl);
9776 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9777 external->symbol = symbol;
9778 symbol->__anon2.__anon1.pointerExternal = external;
9779 DeclareType(external, function->dataType, 1, 1);
9783 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
9784 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
9785 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;
9788 void DeclareFunctionUtil(struct External * neededBy, const char * s)
9790 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
9797 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
9798 strcpy(name, "__ecereFunction_");
9799 FullClassNameCat(name, s, 0);
9800 DeclareFunction(neededBy, function, name);
9803 FindSymbol(s, globalContext, globalContext, 0, 0);
9806 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
9808 char propName[1024], propNameM[1024];
9809 char getName[1024], setName[1024];
9810 struct __ecereNameSpace__ecere__sys__OldList * args;
9812 DeclareProperty(curExternal, prop, setName, getName);
9813 strcpy(propName, "__ecereProp_");
9814 FullClassNameCat(propName, prop->_class->fullName, 0);
9815 strcat(propName, "_");
9816 FullClassNameCat(propName, prop->name, 1);
9817 strcpy(propNameM, "__ecerePropM_");
9818 FullClassNameCat(propNameM, prop->_class->fullName, 0);
9819 strcat(propNameM, "_");
9820 FullClassNameCat(propNameM, prop->name, 1);
9821 if(prop->isWatchable)
9824 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9825 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9826 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9828 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9829 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9830 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9831 DeclareFunctionUtil(curExternal, "eInstance_FireWatchers");
9835 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9836 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9837 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9839 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9840 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9841 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9842 DeclareFunctionUtil(curExternal, "eInstance_FireSelfWatchers");
9844 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
9845 curFunction->propSet->fireWatchersDone = 1;
9848 struct __ecereNameSpace__ecere__com__SubModule;
9850 struct __ecereNameSpace__ecere__com__SubModule
9852 struct __ecereNameSpace__ecere__com__SubModule * prev;
9853 struct __ecereNameSpace__ecere__com__SubModule * next;
9854 struct __ecereNameSpace__ecere__com__Instance * module;
9858 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
9860 struct __ecereNameSpace__ecere__com__SubModule * subModule;
9862 if(searchFor == searchIn)
9864 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
9866 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
9868 if(ModuleVisibility(subModule->module, searchFor))
9875 void ProcessExpressionType(struct Expression * exp);
9877 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
9879 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
9881 struct Identifier * id = exp->__anon1.__anon1.identifier;
9882 struct Context * ctx;
9883 struct Symbol * symbol = (((void *)0));
9885 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
9887 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
9889 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
9894 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))))
9896 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
9897 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9898 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9899 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9903 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
9905 if(!prop && !method)
9906 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
9907 if(!prop && !method && !member)
9909 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
9911 if(prop || method || member || classProp)
9914 exp->__anon1.member.member = id;
9915 exp->__anon1.member.memberType = 0;
9916 exp->__anon1.member.exp = QMkExpId("this");
9919 else if(_class && _class->templateParams.first)
9921 struct __ecereNameSpace__ecere__com__Class * sClass;
9923 for(sClass = _class; sClass; sClass = sClass->base)
9925 if(sClass->templateParams.first)
9927 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9929 for(param = sClass->templateParams.first; param; param = param->next)
9931 if(param->type == 2 && !strcmp(param->name, id->string))
9933 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
9937 struct Declarator * decl;
9938 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
9940 FreeIdentifier(exp->__anon1.member.member);
9941 ProcessExpressionType(argExp);
9942 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
9943 exp->expType = ProcessType(specs, decl);
9945 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
9956 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
9958 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9960 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
9962 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
9963 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
9966 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
9967 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
9969 void * ptr = inst->data + dataMember->offset + offset;
9970 char * result = (((void *)0));
9972 exp->loc = member->loc = inst->loc;
9973 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
9974 if(!dataMember->dataType)
9975 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
9976 type = dataMember->dataType;
9979 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
9981 if(_class->type == 4)
9983 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9987 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
9988 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
9990 for(item = e->values.first; item; item = item->next)
9992 if(item->data == GetEnumValue(_class, ptr))
9994 result = item->name;
10000 exp->__anon1.__anon1.identifier = MkIdentifier(result);
10002 exp->destType = MkClassType(_class->fullName);
10003 ProcessExpressionType(exp);
10007 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
10009 if(!_class->dataType)
10010 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
10011 type = _class->dataType;
10020 FreeExpContents(exp);
10021 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10027 FreeExpContents(exp);
10028 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10034 FreeExpContents(exp);
10035 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10041 FreeExpContents(exp);
10042 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10048 FreeExpContents(exp);
10049 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10055 FreeExpContents(exp);
10056 exp->__anon1.__anon1.constant = PrintInt64((long long)*(ssize_t *)ptr);
10061 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10064 ListAdd(memberList, member);
10066 if(parentDataMember->type == 1)
10071 void CheckTemplateTypes(struct Expression * exp)
10073 struct Expression * nbExp = GetNonBracketsExp(exp);
10075 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
10077 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10078 struct Context * context;
10079 int kind = exp->expType->kind;
10083 exp->destType->refCount++;
10085 exp->expType->refCount++;
10086 newExp->prev = (((void *)0));
10087 newExp->next = (((void *)0));
10088 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10090 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10092 if(c->type == 2 || c->type == 4 || c->type == 3)
10095 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10096 kind = c->dataType->kind;
10102 if(exp->destType->classObjectType)
10105 exp->destType->refCount--;
10107 exp->expType->refCount--;
10108 ((newExp ? __extension__ ({
10109 void * __ecerePtrToDelete = (newExp);
10111 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
10112 }) : 0), newExp = 0);
10116 struct __ecereNameSpace__ecere__sys__OldList * specs;
10117 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10118 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10120 context = PushContext();
10121 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10122 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10123 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10125 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10126 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
10127 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
10128 exp->__anon1.compound->__anon1.compound.context = context;
10129 PopContext(context);
10134 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
10135 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))
10136 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
10138 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10143 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
10145 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10146 struct Context * context;
10147 int kind = exp->expType->kind;
10151 exp->destType->refCount++;
10153 exp->expType->refCount++;
10154 newExp->prev = (((void *)0));
10155 newExp->next = (((void *)0));
10156 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10158 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10160 if(c->type == 2 || c->type == 4 || c->type == 3)
10163 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10164 kind = c->dataType->kind;
10170 if(exp->destType->classObjectType)
10173 exp->destType->refCount--;
10175 exp->expType->refCount--;
10176 ((newExp ? __extension__ ({
10177 void * __ecerePtrToDelete = (newExp);
10179 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
10180 }) : 0), newExp = 0);
10184 struct __ecereNameSpace__ecere__sys__OldList * specs;
10185 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10186 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10188 context = PushContext();
10189 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10190 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10191 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10193 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10194 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
10195 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
10196 exp->__anon1.compound->__anon1.compound.context = context;
10197 PopContext(context);
10202 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
10205 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10206 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)));
10207 ProcessExpressionType((*exp->__anon1.list).first);
10213 if(__ecereProp_Type_Get_isPointerType(exp->expType))
10215 exp->needTemplateCast = 2;
10216 newExp->needCast = 1;
10217 newExp->needTemplateCast = 2;
10218 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10220 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
10221 exp->needTemplateCast = 2;
10222 newExp->needCast = 1;
10223 newExp->needTemplateCast = 2;
10224 ProcessExpressionType((*exp->__anon1.list).first);
10230 if(exp->expType->kind == 20)
10232 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
10236 FreeType(exp->destType);
10237 FreeType(exp->expType);
10238 ((newExp ? __extension__ ({
10239 void * __ecerePtrToDelete = (newExp);
10241 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
10242 }) : 0), newExp = 0);
10247 char typeString[1024];
10248 struct Declarator * decl;
10249 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
10251 typeString[0] = '\0';
10252 PrintType(exp->expType, typeString, 0, 0);
10253 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
10255 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
10256 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10257 exp->__anon1.cast.exp->needCast = 1;
10258 exp->needTemplateCast = 2;
10259 newExp->needTemplateCast = 2;
10267 static void ProcessInitializer(struct Initializer * init, struct Type * type)
10272 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
10274 if(init->__anon1.exp && !init->__anon1.exp->destType)
10276 FreeType(init->__anon1.exp->destType);
10277 init->__anon1.exp->destType = type;
10281 if(init->__anon1.exp)
10283 ProcessExpressionType(init->__anon1.exp);
10284 init->isConstant = init->__anon1.exp->isConstant;
10290 struct Expression * exp = init->__anon1.exp;
10291 struct Instantiation * inst = exp->__anon1.instance;
10292 struct MembersInit * members;
10295 init->__anon1.list = MkList();
10298 for(members = (*inst->members).first; members; members = members->next)
10300 if(members->type == 0)
10302 struct MemberInit * member;
10304 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
10306 ListAdd(init->__anon1.list, member->initializer);
10307 member->initializer = (((void *)0));
10312 FreeExpression(exp);
10316 struct Initializer * i;
10317 struct Type * initializerType = (((void *)0));
10318 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
10319 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
10320 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
10321 int subMemberStackPos = 0;
10323 if(type && type->kind == 12)
10324 initializerType = Dereference(type);
10325 else if(type && (type->kind == 9 || type->kind == 10))
10326 initializerType = type->__anon1.__anon1.members.first;
10327 for(i = (*init->__anon1.list).first; i; i = i->next)
10329 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
10331 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
10334 if(!curMember->dataType)
10335 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
10336 initializerType = curMember->dataType;
10339 ProcessInitializer(i, initializerType);
10340 if(initializerType && type && (type->kind == 9 || type->kind == 10))
10341 initializerType = initializerType->next;
10343 init->isConstant = 0;
10345 if(type && type->kind == 12)
10346 FreeType(initializerType);
10347 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))
10349 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
10356 void PopulateInstance(struct Instantiation * inst)
10358 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
10359 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
10360 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10361 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
10364 inst->members = MkListOne(MkMembersInitList(memberList));
10366 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
10367 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10369 if(!dataMember->isProperty)
10371 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
10372 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
10375 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10376 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
10377 struct Type * type;
10378 void * ptr = inst->data + dataMember->offset;
10379 char * result = (((void *)0));
10381 exp->loc = member->loc = inst->loc;
10382 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
10383 if(!dataMember->dataType)
10384 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10385 type = dataMember->dataType;
10386 if(type->kind == 8)
10388 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
10390 if(_class->type == 4)
10392 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
10396 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
10397 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
10399 for(item = e->values.first; item; item = item->next)
10401 if(item->data == GetEnumValue(_class, ptr))
10403 result = item->name;
10410 exp->__anon1.__anon1.identifier = MkIdentifier(result);
10412 exp->destType = MkClassType(_class->fullName);
10413 ProcessExpressionType(exp);
10416 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
10418 if(!_class->dataType)
10419 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
10420 type = _class->dataType;
10429 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10435 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10441 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10447 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10453 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10458 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10461 ListAdd(memberList, member);
10467 int ComputeTypeSize(struct Type * type);
10469 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
10471 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10472 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10474 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))
10476 int unionMemberOffset = 0;
10481 member->memberOffset = 0;
10482 if(targetBits < sizeof(void *) * 8)
10483 member->structAlignment = 0;
10485 else if(targetBits < sizeof(void *) * 8)
10486 _class->structAlignment = 0;
10487 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
10488 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
10489 if(!member && _class->destructionWatchOffset)
10490 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10492 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10494 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10496 if(!dataMember->isProperty)
10498 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
10500 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10506 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10508 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10510 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
10512 if(!isMember && _class->type == 2 && dataMember->dataType)
10514 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
10518 ComputeTypeSize(dataMember->dataType);
10519 if(bitMember->pos == -1)
10520 bitMember->pos = _class->memberOffset;
10521 if(!bitMember->size)
10522 bitMember->size = dataMember->dataType->size * 8;
10523 _class->memberOffset = bitMember->pos + bitMember->size;
10524 for(d = 0; d < bitMember->size; d++)
10530 bitMember->mask = mask << bitMember->pos;
10532 else if(dataMember->type == 0 && dataMember->dataType)
10537 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)))
10538 ComputeTypeSize(dataMember->dataType);
10539 if(dataMember->dataType->bitFieldCount)
10541 bitFields += dataMember->dataType->bitFieldCount;
10548 int size = (bitFields + 7) / 8;
10552 int __simpleStruct0;
10556 short __simpleStruct0;
10558 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10559 if(member->memberOffset % alignment)
10560 member->memberOffset += alignment - (member->memberOffset % alignment);
10562 dataMember->offset = member->memberOffset;
10563 if(member->type == 1)
10564 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10567 member->memberOffset += size;
10574 short __simpleStruct0;
10576 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10577 if(_class->memberOffset % alignment)
10578 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10580 dataMember->offset = _class->memberOffset;
10581 _class->memberOffset += size;
10585 size = dataMember->dataType->size;
10586 alignment = dataMember->dataType->alignment;
10590 int __simpleStruct0;
10594 short __simpleStruct0;
10596 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10597 if(member->memberOffset % alignment)
10598 member->memberOffset += alignment - (member->memberOffset % alignment);
10600 dataMember->offset = member->memberOffset;
10601 if(member->type == 1)
10602 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10605 member->memberOffset += size;
10612 short __simpleStruct0;
10614 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10615 if(_class->memberOffset % alignment)
10616 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10618 dataMember->offset = _class->memberOffset;
10619 _class->memberOffset += size;
10626 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
10627 alignment = dataMember->structAlignment;
10630 int __simpleStruct0;
10634 short __simpleStruct0;
10636 if(member->memberOffset % alignment)
10637 member->memberOffset += alignment - (member->memberOffset % alignment);
10638 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10640 dataMember->offset = member->memberOffset;
10641 if(member->type == 1)
10642 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10644 member->memberOffset += dataMember->memberOffset;
10650 short __simpleStruct0;
10652 if(_class->memberOffset % alignment)
10653 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10654 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10656 dataMember->offset = _class->memberOffset;
10657 _class->memberOffset += dataMember->memberOffset;
10665 int size = (bitFields + 7) / 8;
10669 int __simpleStruct0;
10673 short __simpleStruct0;
10675 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10676 if(member->memberOffset % alignment)
10677 member->memberOffset += alignment - (member->memberOffset % alignment);
10679 if(member->type == 1)
10680 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10683 member->memberOffset += size;
10690 short __simpleStruct0;
10692 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10693 if(_class->memberOffset % alignment)
10694 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10696 _class->memberOffset += size;
10701 if(member && member->type == 1)
10703 member->memberOffset = unionMemberOffset;
10707 if(_class->type != 2)
10711 if(_class->structAlignment)
10713 if(_class->memberOffset % _class->structAlignment)
10714 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
10716 _class->structSize = (_class->base ? (_class->base->templateClass ? (_class->base->type == 5 ? _class->base->templateClass->memberOffset : _class->base->templateClass->structSize) : (_class->base->type == 5 ? _class->base->memberOffset : _class->base->structSize)) : 0) + _class->memberOffset + extra;
10719 struct __ecereNameSpace__ecere__com__Property * prop;
10721 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
10723 if(prop->isProperty && prop->isWatchable)
10725 prop->watcherOffset = _class->structSize;
10726 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10731 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
10733 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
10735 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
10737 if(deriv->computeSize)
10739 deriv->offset = (_class->type == 5 ? _class->memberOffset : _class->structSize);
10740 deriv->memberOffset = 0;
10741 deriv->structSize = deriv->offset;
10742 ComputeClassMembers(deriv, 0);
10750 FinishTemplatesContext(context);
10753 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)
10755 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10756 unsigned int totalSize = 0;
10757 unsigned int maxSize = 0;
10760 struct __ecereNameSpace__ecere__com__DataMember * member;
10762 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10766 if(!isMember && _class->base)
10768 maxSize = _class->structSize;
10770 if(_class->type == 1 || _class->type == 5)
10771 AddMembers(neededBy, declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
10774 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
10776 if(maxSize > baseSize)
10777 maxSize -= baseSize;
10783 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
10785 if(!member->isProperty)
10787 switch(member->type)
10791 if(member->dataTypeString)
10793 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
10794 struct Declarator * decl;
10796 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
10797 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
10798 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
10799 if(!member->dataType)
10800 member->dataType = ProcessType(specs, decl);
10801 ReplaceThisClassSpecifiers(specs, topClass);
10803 struct Type * type = ProcessType(specs, decl);
10805 DeclareType(neededBy, member->dataType, 1, 0);
10808 ComputeTypeSize(member->dataType);
10809 size = member->dataType->size;
10810 alignment = member->dataType->alignment;
10813 if(totalSize % alignment)
10814 totalSize += alignment - (totalSize % alignment);
10823 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
10826 sprintf(id, "__anon%d", anonID++);
10828 AddMembers(neededBy, list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
10829 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
10830 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
10831 alignment = member->structAlignment;
10834 if(totalSize % alignment)
10835 totalSize += alignment - (totalSize % alignment);
10845 unsigned int __simpleStruct0;
10847 if(topMember && topMember->type == 1)
10848 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
10850 *retSize += totalSize;
10852 else if(totalSize < maxSize && _class->type != 1000)
10854 int autoPadding = 0;
10856 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
10857 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
10858 if(totalSize + autoPadding < maxSize)
10860 char sizeString[50];
10862 sprintf(sizeString, "%d", maxSize - totalSize);
10863 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
10869 FinishTemplatesContext(context);
10870 return topMember ? topMember->memberID : _class->memberID;
10873 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)
10878 CheckConstCompatibility(source, dest, 1);
10879 if(source->kind == 20 && dest->kind != 20)
10881 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
10886 if(dest->kind == 20 && source->kind != 20)
10888 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
10893 if(dest->classObjectType == 2 && dest->kind != 11)
10895 if(source->classObjectType != 3)
10899 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
10907 if(source->kind != 11 && source->classObjectType == 3)
10909 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
10912 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
10914 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))
10917 if(dest->kind == 14 && source->kind != 0)
10919 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))
10921 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))
10923 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
10925 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
10927 if(conversions != (((void *)0)))
10929 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
10934 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
10936 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
10938 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
10940 if(sourceBase == destBase)
10944 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))
10948 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))
10950 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
10957 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
10961 if(source->kind == 8)
10963 struct __ecereNameSpace__ecere__com__Class * _class;
10965 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10967 struct __ecereNameSpace__ecere__com__Property * convert;
10969 for(convert = _class->conversions.first; convert; convert = convert->next)
10971 if(convert->memberAccess == 1 || _class->module == privateModule)
10973 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10975 if(!convert->dataType)
10976 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10977 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))
10979 if(!conversions && !convert->Get)
10981 else if(conversions != (((void *)0)))
10983 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))
10987 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10989 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10998 if(dest->kind == 8)
11000 struct __ecereNameSpace__ecere__com__Class * _class;
11002 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
11004 struct __ecereNameSpace__ecere__com__Property * convert;
11006 for(convert = _class->conversions.first; convert; convert = convert->next)
11008 if(convert->memberAccess == 1 || _class->module == privateModule)
11010 struct Type * constType = (((void *)0));
11011 unsigned int success = 0;
11013 if(!convert->dataType)
11014 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
11015 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
11017 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11019 constType = __extension__ ({
11020 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
11022 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
11024 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
11025 ptrType->constant = 1;
11027 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
11029 if(!conversions && !convert->Set)
11031 else if(conversions != (((void *)0)))
11033 if(_class->type == 3 && convert->dataType->kind == 8 && convert->dataType->__anon1._class && convert->dataType->__anon1._class->__anon1.registered && _class->base == convert->dataType->__anon1._class->__anon1.registered->base && (source->kind != 8 || source->__anon1._class->__anon1.registered != _class->base))
11037 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
11039 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
11045 FreeType(constType);
11051 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
11053 if(!dest->__anon1._class->__anon1.registered->dataType)
11054 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
11055 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
11057 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))
11064 if(source->kind == 8)
11066 struct __ecereNameSpace__ecere__com__Class * _class;
11068 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
11070 struct __ecereNameSpace__ecere__com__Property * convert;
11072 for(convert = _class->conversions.first; convert; convert = convert->next)
11074 if(convert->memberAccess == 1 || _class->module == privateModule)
11076 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
11078 if(!convert->dataType)
11079 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
11080 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))
11082 if(!conversions && !convert->Get)
11084 else if(conversions != (((void *)0)))
11086 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))
11090 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
11092 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
11100 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
11102 if(!source->__anon1._class->__anon1.registered->dataType)
11103 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
11104 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
11106 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))
11108 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
11114 if(source->kind == 8 || source->kind == 19)
11116 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
11118 else if(dest->kind == 7 && source->kind == 6)
11120 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
11122 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
11124 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
11126 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
11128 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
11130 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))
11132 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))
11134 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)))
11136 struct Type * paramSource, * paramDest;
11138 if(dest->kind == 16)
11139 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
11140 if(source->kind == 16)
11141 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
11142 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
11143 dest = dest->__anon1.type;
11144 if(source->kind == 13 && source->__anon1.type->kind == 11)
11145 source = source->__anon1.type;
11146 if(dest->kind == 16)
11147 dest = dest->__anon1.__anon3.method->dataType;
11148 if(source->kind == 16)
11149 source = source->__anon1.__anon3.method->dataType;
11150 paramSource = source->__anon1.__anon2.params.first;
11151 if(paramSource && paramSource->kind == 0)
11152 paramSource = (((void *)0));
11153 paramDest = dest->__anon1.__anon2.params.first;
11154 if(paramDest && paramDest->kind == 0)
11155 paramDest = (((void *)0));
11156 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11158 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))))
11160 if(paramDest && paramDest->kind == 8)
11161 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
11163 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
11166 paramDest = paramDest->next;
11168 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
11170 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11172 if(dest->__anon1.__anon2.thisClass)
11174 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
11176 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11182 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
11184 if(owningClassDest)
11185 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
11187 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
11191 paramSource = paramSource->next;
11195 if(dest->__anon1.__anon2.thisClass)
11197 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
11199 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11205 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
11207 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
11213 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11215 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
11219 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
11220 for(; paramDest; paramDest = paramDest->next)
11224 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
11228 struct Type * paramDestType = paramDest;
11229 struct Type * paramSourceType = paramSource;
11230 struct Type * type = paramDestType;
11232 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
11235 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
11236 struct __ecereNameSpace__ecere__com__Class * sClass;
11238 for(sClass = owningClassSource; sClass; sClass = sClass->base)
11241 if(sClass->templateClass)
11242 sClass = sClass->templateClass;
11243 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
11245 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
11247 for(sClass = sClass->base; sClass; sClass = sClass->base)
11249 if(sClass->templateClass)
11250 sClass = sClass->templateClass;
11251 id += sClass->templateParams.count;
11262 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
11264 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
11267 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)))
11272 PrintType(paramDest, type, 0, 1);
11273 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
11274 if(paramDestType != paramDest)
11275 FreeType(paramDestType);
11278 if(paramDestType != paramDest)
11279 FreeType(paramDestType);
11281 paramSource = paramSource->next;
11285 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
11290 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
11294 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
11296 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))
11298 ComputeTypeSize(source->__anon1.type);
11299 ComputeTypeSize(dest->__anon1.type);
11300 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))
11308 void ComputeInstantiation(struct Expression * exp)
11310 struct Instantiation * inst = exp->__anon1.instance;
11311 struct MembersInit * members;
11312 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11313 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11314 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11315 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11316 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11317 int subMemberStackPos = 0;
11320 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11324 if(_class->type == 0 || _class->type == 5)
11326 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11327 if(_class->type == 0)
11328 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11331 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11335 for(members = (*inst->members).first; members; members = members->next)
11337 switch(members->type)
11341 if(members->__anon1.dataMembers)
11343 struct MemberInit * member;
11345 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11347 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11348 unsigned int found = 0;
11349 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11350 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11351 unsigned int dataMemberOffset;
11355 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11358 if(curMember->isProperty)
11359 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11362 dataMember = curMember;
11363 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11364 if(_class->type == 0)
11365 dataMemberOffset += _class->base->structSize;
11372 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11376 if(prop->memberAccess == 1)
11378 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11379 curClass = prop->_class;
11384 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11385 int _subMemberStackPos = 0;
11387 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11391 if(dataMember->memberAccess == 1)
11393 curMember = dataMember;
11394 curClass = dataMember->_class;
11395 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11396 subMemberStackPos = _subMemberStackPos;
11401 if(found && member->initializer && member->initializer->type == 0)
11403 struct Expression * value = member->initializer->__anon1.exp;
11404 struct Type * type = (((void *)0));
11405 unsigned int deepMember = 0;
11409 type = prop->dataType;
11411 else if(dataMember)
11413 if(!dataMember->dataType)
11414 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11415 type = dataMember->dataType;
11417 if(ident && ident->next)
11420 for(ident = ident->next; ident && type; ident = ident->next)
11422 if(type->kind == 8)
11424 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11426 type = prop->dataType;
11429 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11431 type = dataMember->dataType;
11434 else if(type->kind == 9 || type->kind == 10)
11436 struct Type * memberType;
11438 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11440 if(!strcmp(memberType->name, ident->string))
11451 FreeType(value->destType);
11452 value->destType = type;
11455 ComputeExpression(value);
11457 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11459 if(type->kind == 8)
11461 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11463 if(_class && (_class->type == 2 || _class->type == 3 || _class->type == 4))
11465 if(!_class->dataType)
11466 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11467 type = _class->dataType;
11472 void * ptr = inst->data + dataMemberOffset;
11474 if(value->type == 2)
11480 GetInt(value, (int *)ptr);
11485 GetInt64(value, (long long *)ptr);
11490 GetIntPtr(value, (intptr_t *)ptr);
11495 GetIntSize(value, (ssize_t *)ptr);
11500 GetFloat(value, (float *)ptr);
11505 GetDouble(value, (double *)ptr);
11510 else if(value->type == 1)
11512 if(type->kind == 8)
11514 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11516 if(_class->type == 1)
11518 ComputeTypeSize(type);
11519 if(value->__anon1.instance->data)
11520 memcpy(ptr, value->__anon1.instance->data, type->size);
11525 else if(prop && prop->Set != (void *)(intptr_t)1)
11527 if(value->type == 1 && value->__anon1.instance->data)
11529 if(type->kind == 8)
11531 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11533 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)))
11535 void (* Set)(void *, void *) = (void *)prop->Set;
11537 Set(inst->data, value->__anon1.instance->data);
11538 PopulateInstance(inst);
11542 else if(value->type == 2)
11548 void (* Set)(void *, double) = (void *)prop->Set;
11550 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11555 void (* Set)(void *, float) = (void *)prop->Set;
11557 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11562 void (* Set)(void *, int) = (void *)prop->Set;
11564 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11569 void (* Set)(void *, long long) = (void *)prop->Set;
11571 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11576 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11578 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11583 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11585 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11590 else if(value->type == 3)
11594 ReadString(temp, value->__anon1.__anon2.string);
11595 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11599 else if(!deepMember && type && _class->type == 3)
11603 if(value->type == 2)
11605 if(type->kind == 8)
11607 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11609 if(_class->type == 3)
11611 if(!_class->dataType)
11612 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11613 type = _class->dataType;
11621 float (* Set)(float) = (void *)prop->Set;
11623 GetFloat(member->initializer->__anon1.exp, &fValue);
11624 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11631 double (* Set)(double) = (void *)prop->Set;
11633 GetDouble(member->initializer->__anon1.exp, &dValue);
11634 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11642 else if(!deepMember && type && _class->type == 2)
11646 if(value->type == 1 && value->__anon1.instance->data)
11648 unsigned int (* Set)(void *) = (void *)prop->Set;
11650 bits = Set(value->__anon1.instance->data);
11652 else if(value->type == 2)
11656 else if(dataMember)
11658 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11659 struct Type * type;
11662 bits = (bits & ~bitMember->mask);
11663 if(!bitMember->dataType)
11664 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11665 type = bitMember->dataType;
11666 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11668 if(!type->__anon1._class->__anon1.registered->dataType)
11669 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11670 type = type->__anon1._class->__anon1.registered->dataType;
11679 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11687 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11696 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11704 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11712 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11720 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11725 bits |= part << bitMember->pos;
11731 if(_class && _class->type == 3)
11733 ComputeExpression(member->initializer->__anon1.exp);
11734 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11736 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11746 if(_class && _class->type == 2)
11748 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11753 FreeInstance(inst);
11757 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11759 if(exp->__anon1.op.op == SIZEOF)
11761 FreeExpContents(exp);
11763 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11767 if(!exp->__anon1.op.exp1)
11769 switch(exp->__anon1.op.op)
11773 struct Expression * exp2 = exp->__anon1.op.exp2;
11775 exp->__anon1.op.exp2 = (((void *)0));
11776 FreeExpContents(exp);
11777 FreeType(exp->expType);
11778 FreeType(exp->destType);
11780 ((exp2 ? __extension__ ({
11781 void * __ecerePtrToDelete = (exp2);
11783 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
11784 }) : 0), exp2 = 0);
11790 FreeExpContents(exp);
11791 op1->ops.Neg(exp, op1);
11795 if(op1->ops.BitNot)
11797 FreeExpContents(exp);
11798 op1->ops.BitNot(exp, op1);
11804 FreeExpContents(exp);
11805 op1->ops.Not(exp, op1);
11812 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11814 if(Promote(op2, op1->kind, op1->type->isSigned))
11815 op2->kind = op1->kind, op2->ops = op1->ops;
11816 else if(Promote(op1, op2->kind, op2->type->isSigned))
11817 op1->kind = op2->kind, op1->ops = op2->ops;
11819 switch(exp->__anon1.op.op)
11824 FreeExpContents(exp);
11825 op1->ops.Add(exp, op1, op2);
11831 FreeExpContents(exp);
11832 op1->ops.Sub(exp, op1, op2);
11838 FreeExpContents(exp);
11839 op1->ops.Mul(exp, op1, op2);
11845 FreeExpContents(exp);
11846 op1->ops.Div(exp, op1, op2);
11852 FreeExpContents(exp);
11853 op1->ops.Mod(exp, op1, op2);
11857 if(exp->__anon1.op.exp2)
11859 if(op1->ops.BitAnd)
11861 FreeExpContents(exp);
11862 op1->ops.BitAnd(exp, op1, op2);
11869 FreeExpContents(exp);
11870 op1->ops.BitOr(exp, op1, op2);
11874 if(op1->ops.BitXor)
11876 FreeExpContents(exp);
11877 op1->ops.BitXor(exp, op1, op2);
11881 if(op1->ops.LShift)
11883 FreeExpContents(exp);
11884 op1->ops.LShift(exp, op1, op2);
11888 if(op1->ops.RShift)
11890 FreeExpContents(exp);
11891 op1->ops.RShift(exp, op1, op2);
11897 FreeExpContents(exp);
11898 op1->ops.Equ(exp, op1, op2);
11904 FreeExpContents(exp);
11905 op1->ops.Nqu(exp, op1, op2);
11911 FreeExpContents(exp);
11912 op1->ops.And(exp, op1, op2);
11918 FreeExpContents(exp);
11919 op1->ops.Or(exp, op1, op2);
11925 FreeExpContents(exp);
11926 op1->ops.Grt(exp, op1, op2);
11932 FreeExpContents(exp);
11933 op1->ops.Sma(exp, op1, op2);
11937 if(op1->ops.GrtEqu)
11939 FreeExpContents(exp);
11940 op1->ops.GrtEqu(exp, op1, op2);
11944 if(op1->ops.SmaEqu)
11946 FreeExpContents(exp);
11947 op1->ops.SmaEqu(exp, op1, op2);
11955 void ApplyAnyObjectLogic(struct Expression * e)
11957 struct Type * destType = e->destType;
11959 if(destType && (destType->classObjectType == 3))
11961 if(e && e->expType)
11963 struct Type * type = e->expType;
11964 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
11966 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11968 _class = type->__anon1._class->__anon1.registered;
11970 else if(type->kind == 19)
11972 _class = FindClass("ecere::com::Class")->__anon1.registered;
11976 char string[1024] = "";
11977 struct Symbol * classSym;
11979 PrintTypeNoConst(type, string, 0, 1);
11980 classSym = FindClass(string);
11982 _class = classSym->__anon1.registered;
11984 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)))
11986 if(!_class || strcmp(_class->fullName, "char *"))
11988 struct Expression * checkedExp = e, * newExp;
11990 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11992 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11994 if(checkedExp->type == 23)
11996 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11999 checkedExp = (*checkedExp->__anon1.list).last;
12001 else if(checkedExp->type == 11)
12002 checkedExp = checkedExp->__anon1.cast.exp;
12004 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
12006 newExp = checkedExp->__anon1.op.exp2;
12007 checkedExp->__anon1.op.exp2 = (((void *)0));
12008 FreeExpContents(checkedExp);
12009 if(e->expType && e->expType->passAsTemplate)
12013 ComputeTypeSize(e->expType);
12014 sprintf(size, "%d", e->expType->size);
12015 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))))));
12017 ReplaceExpContents(checkedExp, newExp);
12018 e->byReference = 1;
12020 else if(!e->byReference || (_class && _class->type == 5))
12022 struct Expression * checkedExp;
12025 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;
12027 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
12029 struct Context * context = PushContext();
12030 struct Declarator * decl;
12031 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12032 char typeString[1024];
12033 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12035 typeString[0] = '\0';
12037 newExp->prev = (((void *)0));
12038 newExp->next = (((void *)0));
12039 newExp->expType = (((void *)0));
12040 PrintTypeNoConst(e->expType, typeString, 0, 1);
12041 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12042 newExp->destType = ProcessType(specs, decl);
12043 curContext = context;
12047 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
12050 sprintf(name, "__internalValue%03X", internalValueCounter++);
12051 if(!curCompound->__anon1.compound.declarations)
12052 curCompound->__anon1.compound.declarations = MkList();
12053 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
12054 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
12055 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
12056 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
12059 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
12061 struct Type * type = e->destType;
12063 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12064 CopyTypeInto(e->destType, type);
12065 e->destType->refCount = 1;
12066 e->destType->classObjectType = 0;
12069 e->__anon1.compound->__anon1.compound.context = context;
12070 PopContext(context);
12071 curContext = context->parent;
12075 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
12077 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
12079 if(checkedExp->type == 23)
12081 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12084 checkedExp = (*checkedExp->__anon1.list).last;
12086 else if(checkedExp->type == 11)
12087 checkedExp = checkedExp->__anon1.cast.exp;
12090 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12092 *operand = *checkedExp;
12093 __ecereMethod_Expression_Clear(checkedExp);
12094 checkedExp->destType = ProcessTypeString("void *", 0);
12095 checkedExp->expType = checkedExp->destType;
12096 checkedExp->destType->refCount++;
12097 checkedExp->type = 4;
12098 checkedExp->__anon1.op.op = '&';
12099 checkedExp->__anon1.op.exp1 = (((void *)0));
12100 checkedExp->__anon1.op.exp2 = operand;
12109 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))))
12111 if(e->expType->classObjectType && destType && destType->classObjectType)
12117 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12120 thisExp->prev = (((void *)0));
12121 thisExp->next = (((void *)0));
12122 __ecereMethod_Expression_Clear(e);
12124 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
12125 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
12126 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
12128 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12129 CopyTypeInto(e->expType, thisExp->expType);
12130 e->expType->byReference = 0;
12131 e->expType->refCount = 1;
12132 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))
12134 e->expType->classObjectType = 0;
12139 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
12141 if(destType->kind == 14)
12143 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
12145 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))
12147 unsigned int byReference = e->expType->byReference;
12148 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12149 struct Declarator * decl;
12150 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12151 char typeString[1024];
12152 struct Type * type;
12153 int backupClassObjectType;
12154 unsigned int backupByReference;
12156 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
12160 backupClassObjectType = type->classObjectType;
12161 backupByReference = type->byReference;
12162 type->classObjectType = 0;
12163 type->byReference = 0;
12164 typeString[0] = '\0';
12165 PrintType(type, typeString, 0, 1);
12166 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12167 type->classObjectType = backupClassObjectType;
12168 type->byReference = backupByReference;
12170 thisExp->prev = (((void *)0));
12171 thisExp->next = (((void *)0));
12172 __ecereMethod_Expression_Clear(e);
12173 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)))
12175 unsigned int passAsTemplate = thisExp->destType->passAsTemplate;
12178 destType->refCount++;
12180 e->__anon1.op.op = '*';
12181 e->__anon1.op.exp1 = (((void *)0));
12182 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
12183 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12184 CopyTypeInto(t, thisExp->destType);
12185 t->passAsTemplate = 0;
12186 FreeType(thisExp->destType);
12187 thisExp->destType = t;
12188 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12189 CopyTypeInto(t, destType);
12190 t->passAsTemplate = passAsTemplate;
12191 FreeType(destType);
12193 destType->refCount = 0;
12194 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12195 CopyTypeInto(e->expType, type);
12196 if(type->passAsTemplate)
12198 e->expType->classObjectType = 0;
12199 e->expType->passAsTemplate = 0;
12201 e->expType->byReference = 0;
12202 e->expType->refCount = 1;
12207 e->__anon1.cast.typeName = MkTypeName(specs, decl);
12208 e->__anon1.cast.exp = thisExp;
12209 e->byReference = 1;
12214 FreeType(e->destType);
12215 e->destType = destType;
12216 destType->refCount++;
12221 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
12223 struct __ecereNameSpace__ecere__com__Class * _class;
12224 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
12226 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
12227 ComputeModuleClasses(subModule->data);
12228 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
12229 ComputeClassMembers(_class, 0);
12232 int ComputeTypeSize(struct Type * type)
12234 unsigned int size = type ? type->size : 0;
12236 if(!size && type && !type->computing)
12238 type->computing = 1;
12242 type->alignment = size = sizeof(char);
12245 type->alignment = size = sizeof(char);
12248 type->alignment = size = sizeof(int);
12251 type->alignment = size = sizeof(long long);
12254 type->alignment = size = targetBits / 8;
12255 type->pointerAlignment = 1;
12258 type->alignment = size = targetBits / 8;
12259 type->pointerAlignment = 1;
12262 type->alignment = size = sizeof(long);
12265 type->alignment = size = sizeof(short);
12268 type->alignment = size = sizeof(float);
12271 type->alignment = size = sizeof(double);
12275 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
12277 if(_class && _class->type == 1)
12279 ComputeClassMembers(_class, 0);
12280 type->alignment = _class->structAlignment;
12281 type->pointerAlignment = (unsigned int)_class->pointerAlignment;
12282 size = _class->structSize;
12283 if(type->alignment && size % type->alignment)
12284 size += type->alignment - (size % type->alignment);
12286 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
12288 if(!_class->dataType)
12289 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12290 size = type->alignment = ComputeTypeSize(_class->dataType);
12294 size = type->alignment = targetBits / 8;
12295 type->pointerAlignment = 1;
12301 size = type->alignment = targetBits / 8;
12302 type->pointerAlignment = 1;
12305 if(type->__anon1.__anon4.arraySizeExp)
12307 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
12308 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
12309 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)))
12311 struct Location oldLoc = yylloc;
12312 char expression[10240];
12314 expression[0] = '\0';
12315 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
12316 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
12318 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
12319 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
12322 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
12324 else if(type->__anon1.__anon4.enumClass)
12326 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
12328 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
12331 type->__anon1.__anon4.arraySize = 0;
12335 type->__anon1.__anon4.arraySize = 0;
12337 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
12338 if(type->__anon1.type)
12340 type->alignment = type->__anon1.type->alignment;
12341 type->pointerAlignment = type->__anon1.type->pointerAlignment;
12346 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12348 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12350 if(symbol && symbol->type)
12352 ComputeTypeSize(symbol->type);
12353 size = symbol->type->size;
12358 struct Type * member;
12360 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12362 int __simpleStruct0, __simpleStruct1;
12363 unsigned int addSize = ComputeTypeSize(member);
12365 member->offset = size;
12366 if(member->alignment && size % member->alignment)
12367 member->offset += member->alignment - (size % member->alignment);
12368 size = member->offset;
12369 if(member->pointerAlignment && type->size <= 4)
12370 type->pointerAlignment = 1;
12371 else if(!member->pointerAlignment && member->alignment >= 8)
12372 type->pointerAlignment = 0;
12373 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12376 if(type->alignment && size % type->alignment)
12377 size += type->alignment - (size % type->alignment);
12383 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12385 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12387 if(symbol && symbol->type)
12389 ComputeTypeSize(symbol->type);
12390 size = symbol->type->size;
12391 type->alignment = symbol->type->alignment;
12396 struct Type * member;
12398 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12400 int __simpleStruct0, __simpleStruct1;
12401 unsigned int addSize = ComputeTypeSize(member);
12403 member->offset = size;
12404 if(member->alignment && size % member->alignment)
12405 member->offset += member->alignment - (size % member->alignment);
12406 size = member->offset;
12407 if(member->pointerAlignment && type->size <= 4)
12408 type->pointerAlignment = 1;
12409 else if(!member->pointerAlignment && member->alignment >= 8)
12410 type->pointerAlignment = 0;
12411 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12412 size = ((size > addSize) ? size : addSize);
12414 if(type->alignment && size % type->alignment)
12415 size += type->alignment - (size % type->alignment);
12421 struct TemplateParameter * param = type->__anon1.templateParameter;
12422 struct Type * baseType = ProcessTemplateParameterType(param);
12426 size = ComputeTypeSize(baseType);
12427 type->alignment = baseType->alignment;
12428 type->pointerAlignment = baseType->pointerAlignment;
12431 type->alignment = size = sizeof(uint64);
12436 type->alignment = size = sizeof(enum
12444 type->alignment = size = targetBits / 8;
12445 type->pointerAlignment = 1;
12450 type->computing = 0;
12455 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl)
12457 struct External * external = (((void *)0));
12458 struct Symbol * classSym = FindClass(name);
12459 struct __ecereNameSpace__ecere__sys__OldList * curDeclarations = (((void *)0));
12461 if(!inCompiler || !classSym)
12462 return (((void *)0));
12463 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
12464 return (((void *)0));
12465 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
12466 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
12467 external = classSym->__anon2.__anon1.structExternal;
12468 if(external && external->__anon1.declaration)
12470 struct Specifier * spec;
12472 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12473 if(spec->type == 3 || spec->type == 4)
12475 curDeclarations = spec->__anon1.__anon2.definitions;
12479 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
12481 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12482 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
12483 char structName[1024];
12484 unsigned int addedPadding = 0;
12485 struct Specifier * curSpec = (((void *)0));
12487 classSym->declaring++;
12488 if(strchr(classSym->string, '<'))
12490 if(classSym->__anon1.registered->templateClass)
12491 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
12492 classSym->declaring--;
12496 FullClassNameCat(structName, name, 0);
12497 classSym->declaredStructSym = 1;
12498 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
12500 unsigned int add = 0;
12504 external = MkExternalDeclaration((((void *)0)));
12505 classSym->__anon2.__anon1.structExternal = external;
12506 external->symbol = classSym;
12511 declarations = MkList();
12512 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
12514 if(external->__anon1.declaration)
12516 struct Specifier * spec;
12518 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12519 if(spec->type == 3 || spec->type == 4)
12522 curDeclarations = spec->__anon1.__anon2.definitions;
12526 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
12528 FreeList(declarations, (void *)(FreeClassDef));
12529 declarations = (((void *)0));
12531 if(classSym->__anon1.registered->type != 5 && !declarations)
12533 FreeExternal(external);
12534 external = (((void *)0));
12535 classSym->__anon2.__anon1.structExternal = (((void *)0));
12540 curSpec->__anon1.__anon2.definitions = declarations;
12543 specifiers = MkList();
12544 declarators = MkList();
12545 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
12546 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12549 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12552 classSym->declaring--;
12554 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
12556 classSym->declaredStructSym = 1;
12557 if(classSym->__anon1.registered)
12558 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
12559 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
12561 struct Specifier * spec;
12563 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
12565 if(spec->__anon1.__anon2.definitions)
12566 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
12570 if(inCompiler && neededBy && (external || !classSym->imported))
12574 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
12575 external->symbol = classSym;
12576 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12578 if(reachedPass15 && !external->__anon1.declaration && classSym->__anon1.registered && classSym->__anon1.registered->type == 5)
12580 char structName[1024];
12581 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12584 FullClassNameCat(structName, name, 0);
12585 specifiers = MkList();
12586 declarators = MkList();
12587 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))));
12588 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12592 struct External * e = external->fwdDecl ? external->fwdDecl : external;
12594 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
12595 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
12598 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
12603 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)
12605 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
12606 unsigned int found = 0;
12607 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
12608 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
12609 unsigned int freeType = 0;
12611 yylloc = member->loc;
12616 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
12620 dataMember = *curMember;
12626 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
12627 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
12628 int _subMemberStackPos = 0;
12631 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
12634 dataMember = thisMember;
12635 if(curMember && thisMember->memberAccess == 1)
12637 *curMember = thisMember;
12638 *curClass = thisMember->_class;
12639 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
12640 *subMemberStackPos = _subMemberStackPos;
12646 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
12647 if(method && method->type == 1)
12650 method = (((void *)0));
12655 struct Type * type = (((void *)0));
12659 if(!dataMember->dataType && dataMember->dataTypeString)
12661 struct Context * context = SetupTemplatesContext(_class);
12663 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12664 FinishTemplatesContext(context);
12666 type = dataMember->dataType;
12670 if(!method->dataType)
12671 ProcessMethodType(method);
12672 type = method->dataType;
12674 if(ident && ident->next)
12676 for(ident = ident->next; ident && type; ident = ident->next)
12678 if(type->kind == 8)
12680 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
12682 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
12684 type = dataMember->dataType;
12686 else if(type->kind == 9 || type->kind == 10)
12688 struct Type * memberType;
12690 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
12692 if(!strcmp(memberType->name, ident->string))
12701 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
12704 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
12705 struct __ecereNameSpace__ecere__com__Class * sClass;
12707 for(sClass = _class; sClass; sClass = sClass->base)
12710 if(sClass->templateClass)
12711 sClass = sClass->templateClass;
12712 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
12714 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
12716 for(sClass = sClass->base; sClass; sClass = sClass->base)
12718 if(sClass->templateClass)
12719 sClass = sClass->templateClass;
12720 id += sClass->templateParams.count;
12731 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
12733 if(arg.__anon1.__anon1.dataTypeString)
12735 unsigned int constant = type->constant;
12737 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
12738 if(type->kind == 8 && constant)
12739 type->constant = 1;
12740 else if(type->kind == 13)
12742 struct Type * t = type->__anon1.type;
12744 while(t->kind == 13)
12745 t = t->__anon1.type;
12747 t->constant = constant;
12750 if(type && _class->templateClass)
12751 type->passAsTemplate = 1;
12758 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
12760 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
12761 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
12762 int paramCount = 0;
12763 int lastParam = -1;
12764 char templateString[1024];
12765 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
12767 sprintf(templateString, "%s<", expClass->templateClass->fullName);
12768 for(cClass = expClass; cClass; cClass = cClass->base)
12772 if(cClass->templateClass)
12773 cClass = cClass->templateClass;
12774 for(param = cClass->templateParams.first; param; param = param->next)
12777 struct __ecereNameSpace__ecere__com__Class * sClass;
12778 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
12780 for(sClass = cClass->base; sClass; sClass = sClass->base)
12782 if(sClass->templateClass)
12783 sClass = sClass->templateClass;
12784 id += sClass->templateParams.count;
12786 arg = expClass->templateArgs[id];
12787 for(sClass = _class; sClass; sClass = sClass->base)
12789 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
12791 struct __ecereNameSpace__ecere__com__Class * nextClass;
12793 if(sClass->templateClass)
12794 sClass = sClass->templateClass;
12795 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
12797 if(nextClass->templateClass)
12798 nextClass = nextClass->templateClass;
12799 p += nextClass->templateParams.count;
12801 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
12803 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
12805 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12807 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
12808 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
12815 char argument[256];
12817 argument[0] = '\0';
12818 switch(param->type)
12822 char expString[1024];
12823 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12824 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
12825 struct Expression * exp;
12826 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
12828 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
12829 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
12830 ProcessExpressionType(exp);
12831 ComputeExpression(exp);
12832 expString[0] = '\0';
12833 PrintExpression(exp, expString);
12834 strcat(argument, expString);
12835 FreeExpression(exp);
12840 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
12845 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12846 strcat(argument, arg.__anon1.__anon1.dataTypeString);
12853 strcat(templateString, ", ");
12854 if(lastParam != p - 1)
12856 strcat(templateString, param->name);
12857 strcat(templateString, " = ");
12859 strcat(templateString, argument);
12868 int len = strlen(templateString);
12870 if(templateString[len - 1] == '<')
12874 if(templateString[len - 1] == '>')
12875 templateString[len++] = ' ';
12876 templateString[len++] = '>';
12878 templateString[len++] = '\0';
12881 struct Context * context = SetupTemplatesContext(_class);
12885 type = ProcessTypeString(templateString, 0);
12887 FinishTemplatesContext(context);
12890 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
12892 ProcessExpressionType(member->initializer->__anon1.exp);
12893 if(!member->initializer->__anon1.exp->expType)
12897 char expString[10240];
12899 expString[0] = '\0';
12900 PrintExpression(member->initializer->__anon1.exp, expString);
12901 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
12902 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
12905 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
12907 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
12910 else if(member->initializer)
12912 ProcessInitializer(member->initializer, type);
12919 if(_class && _class->type == 3)
12921 if(member->initializer)
12923 struct Type * type = MkClassType(_class->fullName);
12925 ProcessInitializer(member->initializer, type);
12931 if(member->initializer)
12933 ProcessInitializer(member->initializer, (((void *)0)));
12939 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12943 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12945 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
12949 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
12954 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
12956 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
12958 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)))
12960 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
12962 if(_class->type == 4)
12964 struct __ecereNameSpace__ecere__sys__OldList converts =
12968 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12971 if(!_class->symbol)
12972 _class->symbol = FindClass(_class->fullName);
12973 type->__anon1._class = _class->symbol;
12974 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))
12976 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12977 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12981 struct __ecereNameSpace__ecere__com__Class * baseClass;
12983 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
12985 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
12987 for(value = e->values.first; value; value = value->next)
12989 if(!strcmp(value->name, string))
12994 FreeType(sourceExp->expType);
12995 sourceExp->isConstant = 1;
12996 sourceExp->expType = MkClassType(baseClass->fullName);
12997 if(inCompiler || inPreCompiler || inDebugger)
12999 char constant[256];
13001 FreeExpContents(sourceExp);
13002 sourceExp->type = 2;
13003 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
13004 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
13006 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
13007 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13009 while(converts.first)
13011 struct Conversion * convert = converts.first;
13013 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
13014 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
13016 ((type ? __extension__ ({
13017 void * __ecerePtrToDelete = (type);
13019 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
13020 }) : 0), type = 0);
13027 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
13028 ((type ? __extension__ ({
13029 void * __ecerePtrToDelete = (type);
13031 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
13032 }) : 0), type = 0);
13035 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)))
13036 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
13041 void ComputeExpression(struct Expression * exp)
13047 struct Identifier * id = exp->__anon1.__anon1.identifier;
13049 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
13051 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
13053 if(c && c->type == 4)
13055 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13059 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
13060 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
13062 for(value = e->values.first; value; value = value->next)
13064 if(!strcmp(value->name, id->string))
13069 const char * dts = c->dataTypeString;
13071 FreeExpContents(exp);
13073 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13082 ComputeInstantiation(exp);
13087 struct Expression * exp1, * exp2 = (((void *)0));
13088 struct Operand op1 =
13095 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13098 struct Operand op2 =
13105 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13109 if(exp->__anon1.op.exp2)
13111 struct Expression * e = exp->__anon1.op.exp2;
13113 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13115 if(e->type == 5 || e->type == 32 || e->type == 23)
13118 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13120 e = (*e->__anon1.list).last;
13123 if(exp->__anon1.op.op == 261 && e && e->expType)
13125 if(e->type == 3 && e->__anon1.__anon2.string)
13127 char * string = e->__anon1.__anon2.string;
13128 int len = strlen(string);
13129 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13131 len = UnescapeString(tmp, string + 1, len - 2);
13132 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13133 FreeExpContents(exp);
13135 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13139 struct Type * type = e->expType;
13142 FreeExpContents(exp);
13144 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13150 ComputeExpression(exp->__anon1.op.exp2);
13152 if(exp->__anon1.op.exp1)
13154 ComputeExpression(exp->__anon1.op.exp1);
13155 exp1 = exp->__anon1.op.exp1;
13156 exp2 = exp->__anon1.op.exp2;
13157 op1 = GetOperand(exp1);
13159 op1.type->refCount++;
13162 op2 = GetOperand(exp2);
13164 op2.type->refCount++;
13169 exp1 = exp->__anon1.op.exp2;
13170 op1 = GetOperand(exp1);
13172 op1.type->refCount++;
13174 CallOperator(exp, exp1, exp2, &op1, &op2);
13176 FreeType(op1.type);
13178 FreeType(op2.type);
13184 struct Expression * e, * n;
13186 for(e = (*exp->__anon1.list).first; e; e = n)
13191 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13192 struct Expression * prev = exp->prev;
13193 struct Expression * next = exp->next;
13195 ComputeExpression(e);
13196 FreeType(exp->expType);
13197 FreeType(exp->destType);
13201 ((e ? __extension__ ({
13202 void * __ecerePtrToDelete = (e);
13204 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
13206 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
13217 struct Expression * memberExp = exp->__anon1.member.exp;
13218 struct Identifier * memberID = exp->__anon1.member.member;
13219 struct Type * type;
13221 ComputeExpression(exp->__anon1.member.exp);
13222 type = exp->__anon1.member.exp->expType;
13225 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)));
13226 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13227 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13228 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
13230 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
13231 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
13235 struct Symbol * classSym;
13238 PrintTypeNoConst(type, string, 0, 1);
13239 classSym = FindClass(string);
13240 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13242 if(exp->__anon1.member.member)
13244 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
13246 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
13248 if(!prop && !member && _class && exp->__anon1.member.member)
13250 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
13252 convertTo = _class;
13253 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13254 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
13260 struct Type * type = prop->dataType;
13262 if(_class->type == 3)
13264 if(type->kind == 8)
13266 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13268 if(_class->type == 3)
13270 if(!_class->dataType)
13271 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13272 type = _class->dataType;
13280 float (* Get)(float) = (void *)prop->Get;
13282 GetFloat(exp->__anon1.member.exp, &value);
13283 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
13290 double (* Get)(double);
13292 GetDouble(exp->__anon1.member.exp, &value);
13294 Get = (void *)prop->Set;
13296 Get = (void *)prop->Get;
13297 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
13307 struct Expression * value = exp->__anon1.member.exp;
13308 struct Type * type;
13310 if(!prop->dataType)
13311 ProcessPropertyType(prop);
13312 type = prop->dataType;
13316 else if(_class->type == 1)
13322 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13324 if(propertyClass->type == 1 && value->type == 1)
13326 void (* Set)(void *, void *) = (void *)prop->Set;
13328 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13329 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13330 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13331 exp->__anon1.instance->loc = exp->loc;
13333 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
13334 PopulateInstance(exp->__anon1.instance);
13341 void (* Set)(void *, int) = (void *)prop->Set;
13343 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13344 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13345 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13346 exp->__anon1.instance->loc = exp->loc;
13348 GetInt(value, &intValue);
13349 Set(exp->__anon1.instance->data, intValue);
13350 PopulateInstance(exp->__anon1.instance);
13355 long long intValue;
13356 void (* Set)(void *, long long) = (void *)prop->Set;
13358 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13359 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13360 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13361 exp->__anon1.instance->loc = exp->loc;
13363 GetInt64(value, &intValue);
13364 Set(exp->__anon1.instance->data, intValue);
13365 PopulateInstance(exp->__anon1.instance);
13371 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13373 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13374 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13375 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13376 exp->__anon1.instance->loc = exp->loc;
13378 GetIntPtr(value, &intValue);
13379 Set(exp->__anon1.instance->data, intValue);
13380 PopulateInstance(exp->__anon1.instance);
13386 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13388 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13389 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13390 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13391 exp->__anon1.instance->loc = exp->loc;
13393 GetIntSize(value, &intValue);
13394 Set(exp->__anon1.instance->data, intValue);
13395 PopulateInstance(exp->__anon1.instance);
13401 void (* Set)(void *, float) = (void *)prop->Set;
13403 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13404 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13405 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13406 exp->__anon1.instance->loc = exp->loc;
13408 GetFloat(value, &floatValue);
13409 Set(exp->__anon1.instance->data, floatValue);
13410 PopulateInstance(exp->__anon1.instance);
13415 double doubleValue;
13416 void (* Set)(void *, double) = (void *)prop->Set;
13418 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13419 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13420 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13421 exp->__anon1.instance->loc = exp->loc;
13423 GetDouble(value, &doubleValue);
13424 Set(exp->__anon1.instance->data, doubleValue);
13425 PopulateInstance(exp->__anon1.instance);
13430 else if(_class->type == 2)
13436 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13438 if(propertyClass->type == 1 && value->__anon1.instance->data)
13440 unsigned int (* Set)(void *) = (void *)prop->Set;
13441 unsigned int bits = Set(value->__anon1.instance->data);
13443 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13447 else if(_class->type == 2)
13449 unsigned int value;
13450 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
13453 GetUInt(exp->__anon1.member.exp, &value);
13455 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13464 if(_class->type == 2)
13466 unsigned int value;
13468 GetUInt(exp->__anon1.member.exp, &value);
13473 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13475 if(_class->type == 1)
13477 void (* Get)(unsigned int, void *) = (void *)prop->Get;
13479 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13480 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13481 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13482 exp->__anon1.instance->loc = exp->loc;
13484 Get(value, exp->__anon1.instance->data);
13485 PopulateInstance(exp->__anon1.instance);
13487 else if(_class->type == 2)
13489 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
13490 uint64 bits = Get(value);
13492 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
13499 else if(_class->type == 1)
13501 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
13507 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13509 if(_class->type == 1 && value)
13511 void (* Get)(void *, void *) = (void *)prop->Get;
13513 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13514 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13515 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13516 exp->__anon1.instance->loc = exp->loc;
13518 Get(value, exp->__anon1.instance->data);
13519 PopulateInstance(exp->__anon1.instance);
13530 exp->isConstant = 0;
13539 FreeExpression(memberExp);
13540 FreeIdentifier(memberID);
13546 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
13548 FreeExpContents(exp);
13549 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13556 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
13558 if(classSym && classSym->__anon1.registered)
13560 if(classSym->__anon1.registered->fixed)
13562 FreeSpecifier(exp->__anon1._class);
13563 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
13568 char className[1024];
13570 strcpy(className, "__ecereClass_");
13571 FullClassNameCat(className, classSym->string, 1);
13572 DeclareClass(curExternal, classSym, className);
13573 FreeExpContents(exp);
13575 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
13576 exp->__anon1.member.member = MkIdentifier("structSize");
13583 struct Type * type;
13584 struct Expression * e = exp;
13586 if(exp->type == 11)
13588 if(exp->__anon1.cast.exp)
13589 ComputeExpression(exp->__anon1.cast.exp);
13590 e = exp->__anon1.cast.exp;
13592 if(e && exp->expType)
13594 type = exp->expType;
13595 if(type->kind == 8)
13597 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13599 if(_class && (_class->type == 3 || _class->type == 2))
13601 if(!_class->dataType)
13602 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13603 type = _class->dataType;
13614 if(GetChar(e, &value))
13616 FreeExpContents(exp);
13617 exp->__anon1.__anon1.constant = PrintChar(value);
13623 unsigned char value = 0;
13625 if(GetUChar(e, &value))
13627 FreeExpContents(exp);
13628 exp->__anon1.__anon1.constant = PrintUChar(value);
13638 if(GetShort(e, &value))
13640 FreeExpContents(exp);
13641 exp->__anon1.__anon1.constant = PrintShort(value);
13647 unsigned short value = 0;
13649 if(GetUShort(e, &value))
13651 FreeExpContents(exp);
13652 exp->__anon1.__anon1.constant = PrintUShort(value);
13662 if(GetInt(e, &value))
13664 FreeExpContents(exp);
13665 exp->__anon1.__anon1.constant = PrintInt(value);
13671 unsigned int value = 0;
13673 if(GetUInt(e, &value))
13675 FreeExpContents(exp);
13676 exp->__anon1.__anon1.constant = PrintUInt(value);
13684 long long value = 0;
13686 if(GetInt64(e, &value))
13688 FreeExpContents(exp);
13689 exp->__anon1.__anon1.constant = PrintInt64(value);
13697 if(GetUInt64(e, &value))
13699 FreeExpContents(exp);
13700 exp->__anon1.__anon1.constant = PrintUInt64(value);
13708 intptr_t value = 0;
13710 if(GetIntPtr(e, &value))
13712 FreeExpContents(exp);
13713 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13719 uintptr_t value = 0;
13721 if(GetUIntPtr(e, &value))
13723 FreeExpContents(exp);
13724 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13734 if(GetIntSize(e, &value))
13736 FreeExpContents(exp);
13737 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13745 if(GetUIntSize(e, &value))
13747 FreeExpContents(exp);
13748 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13757 if(GetFloat(e, &value))
13759 FreeExpContents(exp);
13760 exp->__anon1.__anon1.constant = PrintFloat(value);
13769 if(GetDouble(e, &value))
13771 FreeExpContents(exp);
13772 exp->__anon1.__anon1.constant = PrintDouble(value);
13783 struct Operand op1 =
13790 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13793 struct Operand op2 =
13800 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13803 struct Operand op3 =
13810 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13814 if(exp->__anon1.cond.exp)
13815 ComputeExpression((*exp->__anon1.cond.exp).last);
13816 if(exp->__anon1.cond.elseExp)
13817 ComputeExpression(exp->__anon1.cond.elseExp);
13818 if(exp->__anon1.cond.cond)
13819 ComputeExpression(exp->__anon1.cond.cond);
13820 op1 = GetOperand(exp->__anon1.cond.cond);
13822 op1.type->refCount++;
13823 op2 = GetOperand((*exp->__anon1.cond.exp).last);
13825 op2.type->refCount++;
13826 op3 = GetOperand(exp->__anon1.cond.elseExp);
13828 op3.type->refCount++;
13831 FreeExpContents(exp);
13832 op1.ops.Cond(exp, &op1, &op2, &op3);
13835 FreeType(op1.type);
13837 FreeType(op2.type);
13839 FreeType(op3.type);
13845 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
13847 struct __ecereNameSpace__ecere__com__Instance * module;
13849 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))
13851 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))
13853 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))
13855 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)
13857 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
13863 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
13865 struct Type * source;
13866 struct Type * realDest = dest;
13867 struct Type * backupSourceExpType = (((void *)0));
13868 struct Expression * nbExp = GetNonBracketsExp(sourceExp);
13869 struct Expression * computedExp = nbExp;
13872 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)
13874 computedExp = CopyExpression(nbExp);
13875 ComputeExpression(computedExp);
13877 source = sourceExp->expType;
13878 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
13880 if(computedExp != nbExp)
13882 FreeExpression(computedExp);
13883 computedExp = nbExp;
13888 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
13890 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
13892 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
13894 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
13896 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
13898 if(sourceBase == destBase)
13900 if(computedExp != nbExp)
13902 FreeExpression(computedExp);
13903 computedExp = nbExp;
13912 struct __ecereNameSpace__ecere__sys__OldList * specs;
13913 unsigned int flag = 0;
13914 long long value = (((int)0x7fffffff));
13916 source->refCount++;
13917 if(computedExp->type == 2)
13919 if(source->isSigned)
13920 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13922 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13924 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
13926 if(source->isSigned)
13927 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13929 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13931 if(computedExp != nbExp)
13933 FreeExpression(computedExp);
13934 computedExp = nbExp;
13936 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
13939 source = __extension__ ({
13940 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13942 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
13945 if(dest->kind == 8)
13947 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13949 if(_class && _class->type == 3)
13951 if(source->kind != 8)
13953 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13954 struct Type * tempDest, * tempSource;
13956 for(; _class->base->type != 1000; _class = _class->base)
13959 tempDest = tempType;
13960 tempType->kind = 8;
13961 if(!_class->symbol)
13962 _class->symbol = FindClass(_class->fullName);
13963 tempType->__anon1._class = _class->symbol;
13964 tempType->truth = dest->truth;
13965 if(tempType->__anon1._class)
13966 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13967 backupSourceExpType = sourceExp->expType;
13968 if(dest->passAsTemplate)
13970 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13971 CopyTypeInto(sourceExp->expType, dest);
13972 sourceExp->expType->passAsTemplate = 0;
13976 sourceExp->expType = dest;
13980 ((tempType ? __extension__ ({
13981 void * __ecerePtrToDelete = (tempType);
13983 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
13984 }) : 0), tempType = 0);
13987 if(_class && _class->type == 2 && source->kind != 8)
13989 if(!dest->__anon1._class->__anon1.registered->dataType)
13990 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
13991 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13994 FreeType(sourceExp->expType);
13995 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
13996 source->refCount++;
13999 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
14001 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
14002 struct Declarator * decl;
14005 ReadString(string, sourceExp->__anon1.__anon2.string);
14006 decl = SpecDeclFromString(string, specs, (((void *)0)));
14007 FreeExpContents(sourceExp);
14008 FreeType(sourceExp->expType);
14009 sourceExp->type = 24;
14010 sourceExp->__anon1._classExp.specifiers = specs;
14011 sourceExp->__anon1._classExp.decl = decl;
14012 sourceExp->expType = dest;
14016 if(backupSourceExpType)
14017 FreeType(backupSourceExpType);
14021 else if(source->kind == 8)
14023 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
14025 if(_class && (_class->type == 3 || _class->type == 2))
14027 if(dest->kind != 8)
14029 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14030 struct Type * tempDest, * tempSource;
14032 if(!source->__anon1._class->__anon1.registered->dataType)
14033 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
14034 for(; _class->base->type != 1000; _class = _class->base)
14037 tempSource = tempType;
14038 tempType->kind = 8;
14039 tempType->__anon1._class = FindClass(_class->fullName);
14040 tempType->truth = source->truth;
14041 tempType->classObjectType = source->classObjectType;
14042 if(tempType->__anon1._class)
14043 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14044 if(conversions && conversions->last)
14046 ((struct Conversion *)conversions->last)->resultType = dest;
14049 FreeType(sourceExp->expType);
14050 sourceExp->expType = MkClassType(_class->fullName);
14051 sourceExp->expType->truth = source->truth;
14052 sourceExp->expType->classObjectType = source->classObjectType;
14053 if(!sourceExp->destType)
14055 FreeType(sourceExp->destType);
14056 sourceExp->destType = sourceExp->expType;
14057 if(sourceExp->expType)
14058 sourceExp->expType->refCount++;
14060 if(!_class->dataType)
14061 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14063 dest = MkClassType(source->__anon1._class->string);
14064 dest->truth = source->truth;
14065 dest->classObjectType = source->classObjectType;
14067 source = _class->dataType;
14068 source->refCount++;
14069 ((tempType ? __extension__ ({
14070 void * __ecerePtrToDelete = (tempType);
14072 __ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
14073 }) : 0), tempType = 0);
14079 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
14086 if(dest->kind == 8)
14088 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
14089 unsigned int fittingValue = 0;
14091 if(_class && _class->type == 4)
14093 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14094 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14096 if(c && value >= 0 && value <= c->largest)
14099 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
14101 if(_class->type == 0 || _class->type == 5)
14103 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14105 *newExp = *sourceExp;
14106 if(sourceExp->destType)
14107 sourceExp->destType->refCount++;
14108 if(sourceExp->expType)
14109 sourceExp->expType->refCount++;
14110 sourceExp->type = 11;
14111 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
14112 sourceExp->__anon1.cast.exp = newExp;
14113 FreeType(sourceExp->expType);
14114 sourceExp->expType = (((void *)0));
14115 ProcessExpressionType(sourceExp);
14118 FreeType(sourceExp->expType);
14119 sourceExp->expType = dest;
14124 if(backupSourceExpType)
14125 FreeType(backupSourceExpType);
14128 if(!_class->dataType)
14129 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14131 dest = _class->dataType;
14134 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))
14136 specs = MkListOne(MkSpecifier(DOUBLE));
14138 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))
14140 specs = MkListOne(MkSpecifier(FLOAT));
14142 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))
14145 if(!dest->isSigned)
14146 ListAdd(specs, MkSpecifier(UNSIGNED));
14147 ListAdd(specs, MkSpecifier(INT64));
14149 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
14152 if(!dest->isSigned)
14153 ListAdd(specs, MkSpecifier(UNSIGNED));
14154 ListAdd(specs, MkSpecifier(INT));
14156 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14159 if(!dest->isSigned)
14160 ListAdd(specs, MkSpecifier(UNSIGNED));
14161 ListAdd(specs, MkSpecifier(SHORT));
14163 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14166 if(!dest->isSigned)
14167 ListAdd(specs, MkSpecifier(UNSIGNED));
14168 ListAdd(specs, MkSpecifier(CHAR));
14174 if(backupSourceExpType)
14176 if(sourceExp->expType)
14177 FreeType(sourceExp->expType);
14178 sourceExp->expType = backupSourceExpType;
14183 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))
14185 specs = MkListOne(MkSpecifier(DOUBLE));
14187 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))
14189 specs = MkListOne(MkSpecifier(FLOAT));
14191 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
14194 ListAdd(specs, MkSpecifier(BOOL));
14196 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)))
14198 if(source->kind == 3)
14202 if(backupSourceExpType)
14203 FreeType(backupSourceExpType);
14209 if(!dest->isSigned)
14210 ListAdd(specs, MkSpecifier(UNSIGNED));
14211 ListAdd(specs, MkSpecifier(CHAR));
14214 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)))))
14216 if(source->kind == 3)
14220 if(backupSourceExpType)
14221 FreeType(backupSourceExpType);
14227 if(!dest->isSigned)
14228 ListAdd(specs, MkSpecifier(UNSIGNED));
14229 ListAdd(specs, MkSpecifier(SHORT));
14232 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
14235 if(!dest->isSigned)
14236 ListAdd(specs, MkSpecifier(UNSIGNED));
14237 ListAdd(specs, MkSpecifier(INT));
14239 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
14242 if(!dest->isSigned)
14243 ListAdd(specs, MkSpecifier(UNSIGNED));
14244 ListAdd(specs, MkSpecifier(INT64));
14246 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
14248 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
14254 if(backupSourceExpType)
14256 if(sourceExp->expType)
14257 FreeType(sourceExp->expType);
14258 sourceExp->expType = backupSourceExpType;
14262 if(!flag && !sourceExp->opDestType)
14264 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14266 *newExp = *sourceExp;
14267 newExp->prev = (((void *)0));
14268 newExp->next = (((void *)0));
14269 if(sourceExp->destType)
14270 sourceExp->destType->refCount++;
14271 if(sourceExp->expType)
14272 sourceExp->expType->refCount++;
14273 sourceExp->type = 11;
14274 if(realDest->kind == 8)
14276 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
14277 FreeList(specs, (void *)(FreeSpecifier));
14280 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
14281 if(newExp->type == 4)
14283 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
14286 sourceExp->__anon1.cast.exp = newExp;
14287 FreeType(sourceExp->expType);
14288 sourceExp->expType = (((void *)0));
14289 ProcessExpressionType(sourceExp);
14292 FreeList(specs, (void *)(FreeSpecifier));
14295 if(backupSourceExpType)
14296 FreeType(backupSourceExpType);
14301 if(computedExp != nbExp)
14303 FreeExpression(computedExp);
14304 computedExp = nbExp;
14306 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
14307 sourceExp = (*sourceExp->__anon1.list).last;
14308 if(sourceExp->type == 0)
14310 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
14312 if(dest->kind == 8)
14314 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
14316 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
14317 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14321 for(; _class && _class->type == 4; _class = _class->base)
14323 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
14324 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14326 for(value = e->values.first; value; value = value->next)
14328 if(!strcmp(value->name, id->string))
14333 FreeType(sourceExp->expType);
14334 sourceExp->isConstant = 1;
14335 sourceExp->expType = MkClassType(_class->fullName);
14336 if(inCompiler || inPreCompiler || inDebugger)
14338 FreeExpContents(sourceExp);
14339 sourceExp->type = 2;
14340 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
14341 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
14343 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
14352 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
14363 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
14365 unsigned int result = 1;
14369 struct __ecereNameSpace__ecere__sys__OldList converts =
14373 struct Conversion * convert;
14375 if(destType->kind == 0)
14377 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
14381 for(convert = converts.first; convert; convert = convert->next)
14383 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
14387 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14388 int objectType = exp->expType ? exp->expType->classObjectType : 0;
14391 newExp->prev = (((void *)0));
14392 newExp->next = (((void *)0));
14393 newExp->destType = (((void *)0));
14397 exp->addedThis = 1;
14398 exp->__anon1.member.exp = newExp;
14399 FreeType(exp->__anon1.member.exp->expType);
14400 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
14401 exp->__anon1.member.exp->expType->classObjectType = objectType;
14402 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
14403 exp->__anon1.member.memberType = 1;
14404 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14407 exp->expType->refCount++;
14408 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14414 exp->addedThis = 1;
14415 exp->__anon1.member.exp = newExp;
14416 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)
14418 newExp->byReference = 1;
14420 FreeType(exp->__anon1.member.exp->expType);
14421 exp->__anon1.member.exp->expType = (((void *)0));
14422 if(convert->convert->dataType)
14424 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14425 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
14426 exp->__anon1.member.exp->expType->refCount = 1;
14427 exp->__anon1.member.exp->expType->classObjectType = objectType;
14428 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14430 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
14431 exp->__anon1.member.memberType = 4;
14432 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14434 if(convert->resultType)
14435 convert->resultType->refCount++;
14441 FreeType(exp->expType);
14444 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14445 if(exp->destType->casted)
14448 exp->expType->refCount++;
14452 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14453 if(exp->destType->casted)
14455 if(convert->resultType)
14456 convert->resultType->refCount++;
14460 if(exp->isConstant && inCompiler)
14461 ComputeExpression(exp);
14462 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
14464 if(!result && exp->expType && converts.count)
14466 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14468 if(!result && exp->expType && exp->destType)
14470 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))
14477 static void ProcessFunction(struct FunctionDefinition * function);
14479 void ProcessInstantiationType(struct Instantiation * inst)
14481 yylloc = inst->loc;
14484 struct MembersInit * members;
14485 struct Symbol * classSym;
14486 struct __ecereNameSpace__ecere__com__Class * _class;
14488 classSym = inst->_class->__anon1.__anon1.symbol;
14489 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14490 if(!_class || _class->type != 5)
14491 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14492 afterExternal = afterExternal ? afterExternal : curExternal;
14494 ProcessExpressionType(inst->exp);
14495 inst->isConstant = 1;
14498 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14499 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14500 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14501 int subMemberStackPos = 0;
14503 for(members = (*inst->members).first; members; members = members->next)
14505 switch(members->type)
14510 static unsigned int instMethodID = 0;
14511 struct External * external = curExternal;
14512 struct Context * context = curContext;
14513 struct Declarator * declarator = members->__anon1.function->declarator;
14514 struct Identifier * nameID = GetDeclId(declarator);
14515 char * unmangled = nameID ? nameID->string : (((void *)0));
14516 struct Expression * exp;
14517 struct External * createdExternal = (((void *)0));
14523 strcpy(name, "__ecereInstMeth_");
14524 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14526 strcat(name, nameID->string);
14528 sprintf(number, "_%08d", instMethodID++);
14529 strcat(name, number);
14530 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14534 struct Symbol * symbol = declarator->symbol;
14535 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14537 if(method && method->type == 1)
14539 symbol->__anon1.method = method;
14540 ProcessMethodType(method);
14541 if(!symbol->type->__anon1.__anon2.thisClass)
14543 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14545 if(!currentClass->symbol)
14546 currentClass->symbol = FindClass(currentClass->fullName);
14547 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14551 if(!_class->symbol)
14552 _class->symbol = FindClass(_class->fullName);
14553 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14556 DeclareType(curExternal, symbol->type, 1, 1);
14560 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14563 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14566 FreeSpecifier(nameID->_class);
14567 nameID->_class = (((void *)0));
14569 curExternal = createdExternal;
14572 if(createdExternal->__anon1.function)
14573 ProcessFunction(createdExternal->__anon1.function);
14575 else if(declarator)
14577 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14578 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14580 curExternal = external;
14581 curContext = context;
14584 FreeClassFunction(members->__anon1.function);
14585 exp = QMkExpId(name);
14587 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14588 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14594 if(members->__anon1.dataMembers && classSym)
14596 struct MemberInit * member;
14597 struct Location oldyyloc = yylloc;
14599 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14601 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14602 if(member->initializer && !member->initializer->isConstant)
14603 inst->isConstant = 0;
14615 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
14617 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
14623 if(spec->__anon1.specifier == THISCLASS)
14628 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14629 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14630 ProcessSpecifier(spec, declareStruct, 0);
14637 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
14640 DeclareType(curExternal, symbol->type, 1, 1);
14641 else if(spec->__anon1.__anon1.symbol)
14643 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
14645 if(warnClasses && !c)
14646 Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
14647 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
14653 struct Enumerator * e;
14655 if(spec->__anon1.__anon2.list)
14657 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
14660 ProcessExpressionType(e->exp);
14669 if(spec->__anon1.__anon2.definitions)
14671 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
14673 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
14680 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
14685 if(decl->__anon1.identifier->classSym)
14687 FreeSpecifier(decl->__anon1.identifier->_class);
14688 decl->__anon1.identifier->_class = (((void *)0));
14692 if(decl->__anon1.array.exp)
14693 ProcessExpressionType(decl->__anon1.array.exp);
14701 struct Identifier * id = (((void *)0));
14702 struct Specifier * classSpec = (((void *)0));
14704 if(decl->type == 4)
14706 id = GetDeclId(decl);
14707 if(id && id->_class)
14709 classSpec = id->_class;
14710 id->_class = (((void *)0));
14713 if(decl->declarator)
14714 ProcessDeclarator(decl->declarator, isFunction);
14715 if(decl->type == 4)
14719 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
14721 if(!decl->__anon1.function.parameters)
14722 decl->__anon1.function.parameters = MkList();
14723 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
14725 if(decl->__anon1.function.parameters)
14727 struct TypeName * param;
14729 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
14731 if(param->qualifiers)
14733 struct Specifier * spec;
14735 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
14737 if(spec->type == 0)
14739 if(spec->__anon1.specifier == TYPED_OBJECT)
14741 struct Declarator * d = param->declarator;
14742 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);
14744 if(!d || d->type != 5)
14745 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
14746 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14747 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
14748 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
14749 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
14750 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
14754 else if(spec->__anon1.specifier == ANY_OBJECT)
14756 struct Declarator * d = param->declarator;
14758 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14759 param->qualifiers = MkListOne(MkSpecifier(VOID));
14760 if(!d || d->type != 5)
14761 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
14762 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
14765 else if(spec->__anon1.specifier == THISCLASS)
14770 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14771 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14772 ProcessSpecifier(spec, 0, 0);
14777 else if(spec->type == 1)
14779 ProcessSpecifier(spec, isFunction, 1);
14781 else if((spec->type == 3 || spec->type == 4) && !spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id && spec->__anon1.__anon2.id->string)
14783 struct Declarator * d = param->declarator;
14785 if(!d || d->type != 5)
14786 DeclareStruct(curExternal, spec->__anon1.__anon2.id->string, 0, 1);
14790 if(param->declarator)
14791 ProcessDeclarator(param->declarator, 0);
14800 static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
14802 yylloc = decl->loc;
14807 unsigned int declareStruct = 0;
14809 if(decl->__anon1.__anon1.declarators)
14811 struct InitDeclarator * d;
14813 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14815 struct Type * type, * subType;
14817 ProcessDeclarator(d->declarator, 0);
14818 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14821 ProcessInitializer(d->initializer, type);
14822 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
14824 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
14826 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
14828 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
14829 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
14830 if(decl->__anon1.__anon1.specifiers)
14831 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
14832 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
14835 decl->__anon1.inst = inst;
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;
14858 if(decl->__anon1.__anon1.specifiers)
14860 struct Specifier * s;
14862 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
14864 ProcessSpecifier(s, declareStruct, 1);
14871 ProcessInstantiationType(decl->__anon1.inst);
14876 struct Specifier * spec;
14877 struct Declarator * d;
14878 unsigned int declareStruct = 0;
14880 if(decl->__anon1.__anon1.declarators)
14882 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14884 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14885 struct Type * subType;
14887 ProcessDeclarator(d, 0);
14888 for(subType = type; subType; )
14890 if(subType->kind == 8)
14895 else if(subType->kind == 13)
14897 else if(subType->kind == 12)
14898 subType = subType->__anon1.__anon4.arrayType;
14905 if(decl->__anon1.__anon1.specifiers)
14907 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
14908 ProcessSpecifier(spec, declareStruct, warnClasses);
14915 static void ProcessStatement(struct Statement * stmt)
14917 yylloc = stmt->loc;
14921 ProcessStatement(stmt->__anon1.labeled.stmt);
14924 if(stmt->__anon1.caseStmt.exp)
14926 FreeType(stmt->__anon1.caseStmt.exp->destType);
14927 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
14929 curSwitchType->refCount++;
14930 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
14931 ComputeExpression(stmt->__anon1.caseStmt.exp);
14933 if(stmt->__anon1.caseStmt.stmt)
14934 ProcessStatement(stmt->__anon1.caseStmt.stmt);
14938 if(stmt->__anon1.compound.context)
14940 struct Declaration * decl;
14941 struct Statement * s;
14942 struct Statement * prevCompound = curCompound;
14943 struct Context * prevContext = curContext;
14945 if(!stmt->__anon1.compound.isSwitch)
14946 curCompound = stmt;
14947 curContext = stmt->__anon1.compound.context;
14948 if(stmt->__anon1.compound.declarations)
14950 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
14951 ProcessDeclaration(decl, 1);
14953 if(stmt->__anon1.compound.statements)
14955 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
14956 ProcessStatement(s);
14958 curContext = prevContext;
14959 curCompound = prevCompound;
14965 struct Expression * exp;
14967 if(stmt->__anon1.expressions)
14969 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14970 ProcessExpressionType(exp);
14976 struct Expression * exp;
14978 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
14979 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
14980 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
14981 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
14983 ProcessExpressionType(exp);
14985 if(stmt->__anon1.ifStmt.stmt)
14986 ProcessStatement(stmt->__anon1.ifStmt.stmt);
14987 if(stmt->__anon1.ifStmt.elseStmt)
14988 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
14993 struct Type * oldSwitchType = curSwitchType;
14995 if(stmt->__anon1.switchStmt.exp)
14997 struct Expression * exp;
14999 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
15003 ProcessExpressionType(exp);
15006 curSwitchType = exp->expType;
15009 ProcessStatement(stmt->__anon1.switchStmt.stmt);
15010 curSwitchType = oldSwitchType;
15015 if(stmt->__anon1.whileStmt.exp)
15017 struct Expression * exp;
15019 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
15020 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
15021 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
15022 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
15024 ProcessExpressionType(exp);
15027 if(stmt->__anon1.whileStmt.stmt)
15028 ProcessStatement(stmt->__anon1.whileStmt.stmt);
15033 if(stmt->__anon1.doWhile.exp)
15035 struct Expression * exp;
15037 if((*stmt->__anon1.doWhile.exp).last)
15039 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
15040 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
15041 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
15043 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
15045 ProcessExpressionType(exp);
15048 if(stmt->__anon1.doWhile.stmt)
15049 ProcessStatement(stmt->__anon1.doWhile.stmt);
15054 struct Expression * exp;
15056 if(stmt->__anon1.forStmt.init)
15057 ProcessStatement(stmt->__anon1.forStmt.init);
15058 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
15060 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
15061 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
15062 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
15064 if(stmt->__anon1.forStmt.check)
15065 ProcessStatement(stmt->__anon1.forStmt.check);
15066 if(stmt->__anon1.forStmt.increment)
15068 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
15069 ProcessExpressionType(exp);
15071 if(stmt->__anon1.forStmt.stmt)
15072 ProcessStatement(stmt->__anon1.forStmt.stmt);
15077 struct Identifier * id = stmt->__anon1.forEachStmt.id;
15078 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
15079 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
15080 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
15081 char iteratorType[1024];
15082 struct Type * source;
15083 struct Expression * e;
15084 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));
15085 struct Expression * arrayExp;
15086 const char * typeString = (((void *)0));
15087 int builtinCount = 0;
15089 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
15093 FreeType(e->destType);
15094 e->destType = ProcessTypeString("Container", 0);
15096 if(!isBuiltin || e->next)
15097 ProcessExpressionType(e);
15099 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
15100 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)))
15102 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
15103 struct Symbol * symbol;
15104 struct Expression * expIt = (((void *)0));
15105 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
15106 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
15107 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
15108 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
15113 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
15114 stmt->__anon1.compound.context->parent = curContext;
15115 curContext = stmt->__anon1.compound.context;
15117 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
15119 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
15121 isCustomAVLTree = 1;
15122 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
15125 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
15127 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
15129 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
15132 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
15134 if(inCompiler && isArray)
15136 struct Declarator * decl;
15137 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15139 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
15140 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15141 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
15145 struct Type * type = (((void *)0));
15146 char typeStringBuf[1024];
15148 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
15149 if(((struct Expression *)(*exp).last)->type == 11)
15151 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
15154 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
15156 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)
15158 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
15160 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
15162 else if(arrayExp->__anon1.list)
15164 struct Expression * e;
15166 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15168 ProcessExpressionType(e);
15178 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15182 e->expType = (((void *)0));
15183 e = (*arrayExp->__anon1.list).first;
15184 ProcessExpressionType(e);
15187 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15189 FreeType(e->expType);
15190 e->expType = (((void *)0));
15192 type = (((void *)0));
15200 FreeType(e->expType);
15201 e->expType = (((void *)0));
15207 typeStringBuf[0] = '\0';
15208 PrintType(type, typeStringBuf, 0, 1);
15209 typeString = typeStringBuf;
15217 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
15218 struct Declarator * decl;
15219 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15221 if(arrayExp->__anon1.list)
15223 struct Expression * e;
15225 builtinCount = (*arrayExp->__anon1.list).count;
15226 type = ProcessTypeString(typeString, 0);
15227 while((e = (*arrayExp->__anon1.list).first))
15229 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
15230 e->destType = type;
15232 ProcessExpressionType(e);
15234 ListAdd(initializers, MkInitializerAssignment(e));
15237 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
15239 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
15240 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
15241 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
15242 FreeList(exp, (void *)(FreeExpression));
15244 else if(arrayExp->__anon1.list)
15246 struct Expression * e;
15248 type = ProcessTypeString(typeString, 0);
15249 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15251 e->destType = type;
15253 ProcessExpressionType(e);
15260 arrayExp->expType = ProcessTypeString("Container", 0);
15261 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
15264 else if(inCompiler && isLinkList && !isList)
15266 struct Declarator * decl;
15267 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15269 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
15270 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15271 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
15273 else if(inCompiler && _class->templateArgs)
15276 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
15278 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
15279 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)))))))));
15283 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
15286 switch(block->type)
15289 if(block->__anon1.compound.context)
15290 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15293 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
15294 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15295 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
15296 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15299 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
15300 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15303 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
15304 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15307 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
15308 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15311 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
15312 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15315 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
15316 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15322 block = MkIfStmt(filter, block, (((void *)0)));
15326 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));
15327 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15328 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15329 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15335 sprintf(count, "%d", builtinCount);
15336 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));
15337 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15338 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15339 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15341 else if(isLinkList && !isList)
15343 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
15344 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
15346 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
15348 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));
15352 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15353 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
15355 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));
15357 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15358 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15359 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15363 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
15365 ProcessExpressionType(expIt);
15366 if((*stmt->__anon1.compound.declarations).first)
15367 ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
15369 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
15370 ProcessStatement(stmt);
15373 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
15375 curContext = stmt->__anon1.compound.context->parent;
15380 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
15392 struct Expression * exp;
15394 if(stmt->__anon1.expressions)
15396 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15400 if(curFunction && !curFunction->type)
15401 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
15402 FreeType(exp->destType);
15403 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
15405 exp->destType->refCount++;
15407 ProcessExpressionType(exp);
15414 ProcessDeclaration(stmt->__anon1.decl, 1);
15419 struct AsmField * field;
15421 if(stmt->__anon1.asmStmt.inputFields)
15423 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15424 if(field->expression)
15425 ProcessExpressionType(field->expression);
15427 if(stmt->__anon1.asmStmt.outputFields)
15429 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15430 if(field->expression)
15431 ProcessExpressionType(field->expression);
15433 if(stmt->__anon1.asmStmt.clobberedFields)
15435 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15437 if(field->expression)
15438 ProcessExpressionType(field->expression);
15445 struct PropertyWatch * propWatch;
15446 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15447 struct Expression * object = stmt->__anon1._watch.object;
15448 struct Expression * watcher = stmt->__anon1._watch.watcher;
15451 ProcessExpressionType(watcher);
15453 ProcessExpressionType(object);
15456 if(watcher || thisClass)
15458 struct External * external = curExternal;
15459 struct Context * context = curContext;
15462 stmt->__anon1.expressions = MkList();
15463 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15465 struct ClassFunction * func;
15466 char watcherName[1024];
15467 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;
15468 struct External * createdExternal;
15470 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15471 if(propWatch->deleteWatch)
15472 strcat(watcherName, "_delete");
15475 struct Identifier * propID;
15477 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15479 strcat(watcherName, "_");
15480 strcat(watcherName, propID->string);
15483 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15485 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)));
15486 ProcessClassFunctionBody(func, propWatch->compound);
15487 propWatch->compound = (((void *)0));
15488 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15489 FreeClassFunction(func);
15490 curExternal = createdExternal;
15491 ProcessFunction(createdExternal->__anon1.function);
15492 if(propWatch->deleteWatch)
15494 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15496 ListAdd(args, CopyExpression(object));
15497 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15498 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15499 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15503 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15504 struct Identifier * propID;
15506 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15508 char propName[1024];
15509 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15513 char getName[1024], setName[1024];
15514 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15516 DeclareProperty(createdExternal, prop, setName, getName);
15517 strcpy(propName, "__ecereProp_");
15518 FullClassNameCat(propName, prop->_class->fullName, 0);
15519 strcat(propName, "_");
15520 FullClassNameCat(propName, prop->name, 1);
15521 ListAdd(args, CopyExpression(object));
15522 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15523 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15524 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15525 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15526 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15529 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15534 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15536 curExternal = external;
15537 curContext = context;
15539 FreeExpression(watcher);
15541 FreeExpression(object);
15542 FreeList(watches, (void *)(FreePropertyWatch));
15545 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15549 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15551 ProcessStatement(propWatch->compound);
15558 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15559 struct Expression * object = stmt->__anon1._watch.object;
15560 struct __ecereNameSpace__ecere__com__Class * _class;
15563 ProcessExpressionType(object);
15566 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15569 struct Identifier * propID;
15572 stmt->__anon1.expressions = MkList();
15573 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15575 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15582 for(propID = (*watches).first; propID; propID = propID->next)
15584 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15588 CreateFireWatcher(prop, object, stmt);
15591 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15596 struct __ecereNameSpace__ecere__com__Property * prop;
15597 struct __ecereNameSpace__ecere__com__Class * base;
15599 for(base = _class; base; base = base->base)
15601 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15603 if(prop->isProperty && prop->isWatchable)
15605 CreateFireWatcher(prop, object, stmt);
15611 FreeExpression(object);
15612 FreeList(watches, (void *)(FreeIdentifier));
15615 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15621 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15622 struct Expression * object = stmt->__anon1._watch.object;
15623 struct Expression * watcher = stmt->__anon1._watch.watcher;
15624 struct __ecereNameSpace__ecere__com__Class * _class;
15627 ProcessExpressionType(object);
15629 ProcessExpressionType(watcher);
15632 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15633 if(watcher || thisClass)
15637 struct Identifier * propID;
15640 stmt->__anon1.expressions = MkList();
15643 struct __ecereNameSpace__ecere__sys__OldList * args;
15646 ListAdd(args, CopyExpression(object));
15647 ListAdd(args, MkExpConstant("0"));
15648 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15649 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15653 for(propID = (*watches).first; propID; propID = propID->next)
15655 char propName[1024];
15656 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15660 char getName[1024], setName[1024];
15661 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15663 DeclareProperty(curExternal, prop, setName, getName);
15664 strcpy(propName, "__ecereProp_");
15665 FullClassNameCat(propName, prop->_class->fullName, 0);
15666 strcat(propName, "_");
15667 FullClassNameCat(propName, prop->name, 1);
15668 ListAdd(args, CopyExpression(object));
15669 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15670 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15671 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15674 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15678 FreeExpression(object);
15680 FreeExpression(watcher);
15681 FreeList(watches, (void *)(FreeIdentifier));
15684 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15687 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15694 void ComputeDataTypes()
15696 struct External * external;
15698 currentClass = (((void *)0));
15699 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
15700 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
15701 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
15702 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
15703 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
15704 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
15705 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
15706 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
15707 DeclareFunctionUtil((((void *)0)), "eSystem_New");
15708 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
15709 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
15710 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
15711 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
15712 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
15713 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
15714 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
15715 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
15716 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
15717 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
15718 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
15719 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
15721 for(external = (*ast).first; external; external = external->next)
15723 afterExternal = curExternal = external;
15724 if(external->type == 0)
15728 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15729 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15731 currentClass = external->__anon1.function->_class;
15732 ProcessFunction(external->__anon1.function);
15734 else if(external->type == 1)
15736 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
15738 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15739 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15741 currentClass = (((void *)0));
15742 if(external->__anon1.declaration)
15743 ProcessDeclaration(external->__anon1.declaration, 1);
15745 else if(external->type == 2)
15747 struct ClassDefinition * _class = external->__anon1._class;
15749 currentClass = external->symbol->__anon1.registered;
15752 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15753 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15755 if(_class->definitions)
15757 ProcessClass(_class->definitions, _class->symbol);
15761 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
15762 ((external ? __extension__ ({
15763 void * __ecerePtrToDelete = (external);
15765 __ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
15766 }) : 0), external = 0);
15769 else if(external->type == 4)
15771 thisNameSpace = external->__anon1.id->string;
15774 currentClass = (((void *)0));
15775 thisNameSpace = (((void *)0));
15776 curExternal = (((void *)0));
15779 void ProcessExpressionType(struct Expression * exp)
15781 unsigned int unresolved = 0;
15782 struct Location oldyylloc = yylloc;
15783 unsigned int notByReference = 0;
15785 if(!exp || exp->expType)
15792 struct Identifier * id = exp->__anon1.__anon1.identifier;
15794 if(!id || !topContext)
15796 if(id->_class && id->_class->__anon1.__anon1.name)
15798 id->classSym = id->_class->__anon1.__anon1.symbol;
15800 if(!strcmp(id->string, "__runtimePlatform"))
15802 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15805 else if(strstr(id->string, "__ecereClass") == id->string)
15807 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15810 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15812 ReplaceClassMembers(exp, thisClass);
15815 ProcessExpressionType(exp);
15818 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15823 struct Symbol * symbol = (((void *)0));
15824 unsigned int findInGlobal = 0;
15826 if(!topContext->parent && exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class && exp->destType->__anon1._class->__anon1.registered && exp->destType->__anon1._class->__anon1.registered->type == 4)
15829 symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15832 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15838 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15841 ProcessExpressionType(exp);
15845 else if(currentClass && !id->_class)
15847 if(ResolveIdWithClass(exp, currentClass, 1))
15850 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15854 symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15857 struct Type * type = symbol->type;
15858 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15860 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15862 struct Context * context = SetupTemplatesContext(_class);
15864 type = ReplaceThisClassType(_class);
15865 FinishTemplatesContext(context);
15867 type->refCount = 0;
15869 FreeSpecifier(id->_class);
15870 id->_class = (((void *)0));
15871 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15872 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15873 id->classSym = (((void *)0));
15874 exp->expType = type;
15877 if(type && (type->kind == 15))
15878 exp->isConstant = 1;
15879 if(symbol->isParam || !strcmp(id->string, "this"))
15881 if(_class && _class->type == 1 && !type->declaredWithStruct)
15882 exp->byReference = 1;
15884 if(symbol->isIterator)
15886 if(symbol->isIterator == 3)
15889 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
15890 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
15891 exp->expType = (((void *)0));
15892 ProcessExpressionType(exp);
15894 else if(symbol->isIterator != 4)
15897 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
15898 exp->__anon1.member.exp->expType = exp->expType;
15899 exp->__anon1.member.member = MkIdentifier("data");
15900 exp->expType = (((void *)0));
15901 ProcessExpressionType(exp);
15908 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
15910 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15914 strcpy(name, thisNameSpace);
15915 strcat(name, "::");
15916 strcat(name, id->string);
15917 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
15920 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
15925 for(c = 0; c < definedExpStackPos; c++)
15926 if(definedExpStack[c] == definedExp)
15928 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
15930 struct Location backupYylloc = yylloc;
15931 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
15933 definedExpStack[definedExpStackPos++] = definedExp;
15934 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
15935 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
15936 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15938 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15939 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
15940 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
15941 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15943 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15944 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
15946 parsedExpression = (((void *)0));
15948 expression_yyparse();
15949 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
15951 fileInput = backInput;
15952 yylloc = backupYylloc;
15953 if(parsedExpression)
15955 FreeIdentifier(id);
15957 exp->__anon1.list = MkListOne(parsedExpression);
15958 ApplyLocation(parsedExpression, &yylloc);
15959 ProcessExpressionType(exp);
15960 definedExpStackPos--;
15963 definedExpStackPos--;
15969 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
15975 struct GlobalData * data = (((void *)0));
15977 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15981 strcpy(name, thisNameSpace);
15982 strcat(name, "::");
15983 strcat(name, id->string);
15984 data = FindGlobalData(name);
15987 data = FindGlobalData(id->string);
15990 DeclareGlobalData(curExternal, data);
15991 exp->expType = data->dataType;
15993 data->dataType->refCount++;
15994 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15995 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
15996 FreeSpecifier(id->_class);
15997 id->_class = (((void *)0));
16002 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
16004 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
16008 strcpy(name, thisNameSpace);
16009 strcat(name, "::");
16010 strcat(name, id->string);
16011 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
16014 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
16019 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
16020 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
16022 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
16023 strcpy(name, "__ecereFunction_");
16024 FullClassNameCat(name, id->string, 0);
16025 if(DeclareFunction(curExternal, function, name))
16027 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
16028 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
16030 exp->expType = function->dataType;
16031 if(function->dataType)
16032 function->dataType->refCount++;
16033 FreeSpecifier(id->_class);
16034 id->_class = (((void *)0));
16046 if(!exp->__anon1.instance->_class)
16048 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
16050 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
16053 ProcessInstantiationType(exp->__anon1.instance);
16054 exp->isConstant = exp->__anon1.instance->isConstant;
16055 if(exp->__anon1.instance->_class)
16057 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
16065 char * constant = exp->__anon1.__anon1.constant;
16066 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
16068 exp->expType = type;
16069 if(constant[0] == '\'')
16071 if((int)((unsigned char *)constant)[1] > 127)
16074 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
16078 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
16079 exp->__anon1.__anon1.constant = PrintUInt(ch);
16081 type->__anon1._class = FindClass("unichar");
16082 type->isSigned = 0;
16087 type->isSigned = 1;
16092 char * dot = strchr(constant, '.');
16093 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
16098 exponent = strchr(constant, 'p');
16100 exponent = strchr(constant, 'P');
16104 exponent = strchr(constant, 'e');
16106 exponent = strchr(constant, 'E');
16108 if(dot || exponent)
16110 if(strchr(constant, 'f') || strchr(constant, 'F'))
16114 type->isSigned = 1;
16118 unsigned int isSigned = constant[0] == '-';
16119 char * endP = (((void *)0));
16120 long long i64 = strtoll(constant, &endP, 0);
16121 uint64 ui64 = strtoull(constant, &endP, 0);
16122 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16123 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
16127 if(i64 < (((int)0x80000000)))
16132 if(ui64 > (((int)0x7fffffff)))
16134 if(ui64 > (0xffffffff))
16137 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
16141 else if(constant[0] != '0' || !constant[1])
16146 type->kind = is64Bit ? 4 : 3;
16147 type->isSigned = isSigned;
16150 exp->isConstant = 1;
16151 if(exp->destType && exp->destType->kind == 7)
16153 else if(exp->destType && exp->destType->kind == 6)
16155 else if(exp->destType && exp->destType->kind == 4)
16162 exp->isConstant = 1;
16163 exp->expType = __extension__ ({
16164 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16166 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
16167 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16169 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
16170 }), __ecereInstance2;
16176 ProcessExpressionType(exp->__anon1._new.size);
16177 exp->expType = __extension__ ({
16178 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16180 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
16182 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16186 ProcessExpressionType(exp->__anon1._renew.size);
16187 ProcessExpressionType(exp->__anon1._renew.exp);
16188 exp->expType = __extension__ ({
16189 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16191 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
16193 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16197 unsigned int assign = 0, boolResult = 0, boolOps = 0;
16198 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
16199 unsigned int useDestType = 0, useSideType = 0;
16200 struct Location oldyylloc = yylloc;
16201 unsigned int useSideUnit = 0;
16202 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
16203 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16205 switch(exp->__anon1.op.op)
16257 if(exp->__anon1.op.exp1)
16264 if(exp->__anon1.op.op == '&')
16266 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
16268 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
16269 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16271 if(symbol && symbol->isIterator == 2)
16274 exp->__anon1.member.exp = exp->__anon1.op.exp2;
16275 exp->__anon1.member.member = MkIdentifier("key");
16276 exp->expType = (((void *)0));
16277 exp->__anon1.op.exp2->expType = symbol->type;
16278 symbol->type->refCount++;
16279 ProcessExpressionType(exp);
16285 if(exp->__anon1.op.exp1)
16287 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
16289 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
16291 if(exp->__anon1.op.exp1->destType)
16292 FreeType(exp->__anon1.op.exp1->destType);
16293 exp->__anon1.op.exp1->destType = exp->destType;
16294 exp->__anon1.op.exp1->opDestType = 1;
16296 exp->destType->refCount++;
16300 if(exp->__anon1.op.exp1->destType)
16301 FreeType(exp->__anon1.op.exp1->destType);
16302 exp->__anon1.op.exp1->destType = dummy;
16305 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16306 exp->__anon1.op.exp1->destType->count++;
16307 ProcessExpressionType(exp->__anon1.op.exp1);
16308 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16309 exp->__anon1.op.exp1->destType->count--;
16310 exp->__anon1.op.exp1->opDestType = 0;
16311 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)
16313 exp->__anon1.op.exp2 = MkExpConstant("1");
16314 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
16317 if(exp->__anon1.op.exp1->destType == dummy)
16320 exp->__anon1.op.exp1->destType = (((void *)0));
16322 if(exp->__anon1.op.exp2)
16324 if(!assign && exp->__anon1.op.exp1->expType && (exp->__anon1.op.exp1->expType->kind == 1 || exp->__anon1.op.exp1->expType->kind == 2))
16326 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);
16328 FreeType(exp->__anon1.op.exp1->expType);
16329 exp->__anon1.op.exp1->expType = type;
16332 type1 = exp->__anon1.op.exp1->expType;
16334 if(exp->__anon1.op.exp2)
16336 char expString[10240];
16338 expString[0] = '\0';
16339 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
16341 if(exp->__anon1.op.exp1)
16343 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
16344 if(exp->__anon1.op.exp1->expType)
16345 exp->__anon1.op.exp1->expType->refCount++;
16349 exp->__anon1.op.exp2->destType = exp->destType;
16350 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
16351 exp->__anon1.op.exp2->opDestType = 1;
16353 exp->destType->refCount++;
16357 exp->expType = type1;
16362 PrintExpression(exp->__anon1.op.exp2, expString);
16363 if(type1 && type1->kind == 13)
16365 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)
16366 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
16367 else if(exp->__anon1.op.op == '=')
16369 if(exp->__anon1.op.exp2->destType)
16370 FreeType(exp->__anon1.op.exp2->destType);
16371 exp->__anon1.op.exp2->destType = type1;
16378 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)
16382 if(exp->__anon1.op.exp2->destType)
16383 FreeType(exp->__anon1.op.exp2->destType);
16384 exp->__anon1.op.exp2->destType = type1;
16391 exp->expType = type1;
16393 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
16395 if(exp->__anon1.op.exp2->destType)
16396 FreeType(exp->__anon1.op.exp2->destType);
16397 exp->__anon1.op.exp2->destType = exp->destType;
16398 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
16399 exp->__anon1.op.exp2->opDestType = 1;
16401 exp->destType->refCount++;
16405 if(exp->__anon1.op.exp2->destType)
16406 FreeType(exp->__anon1.op.exp2->destType);
16407 exp->__anon1.op.exp2->destType = dummy;
16410 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))
16412 FreeType(exp->__anon1.op.exp2->destType);
16413 exp->__anon1.op.exp2->destType = type1;
16416 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16417 exp->__anon1.op.exp2->destType->count++;
16418 if(exp->__anon1.op.op == SIZEOF)
16420 struct Expression * e = exp->__anon1.op.exp2;
16422 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
16424 if(e->type == 5 || e->type == 32 || e->type == 23)
16427 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
16429 e = (*e->__anon1.list).last;
16432 if(e->type == 11 && e->__anon1.cast.exp)
16433 e->__anon1.cast.exp->needCast = 1;
16435 ProcessExpressionType(exp->__anon1.op.exp2);
16436 exp->__anon1.op.exp2->opDestType = 0;
16437 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16438 exp->__anon1.op.exp2->destType->count--;
16439 if(!assign && (exp->__anon1.op.exp1 || exp->__anon1.op.op == '~'))
16441 if(exp->__anon1.op.exp2->expType && (exp->__anon1.op.exp2->expType->kind == 1 || exp->__anon1.op.exp2->expType->kind == 2))
16443 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);
16445 FreeType(exp->__anon1.op.exp2->expType);
16446 exp->__anon1.op.exp2->expType = type;
16449 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
16451 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)
16453 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
16454 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16456 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)))
16458 if(exp->__anon1.op.op == ADD_ASSIGN)
16459 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16461 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))
16463 if(exp->__anon1.op.op == ADD_ASSIGN)
16464 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16466 else if(inCompiler)
16468 char type1String[1024];
16469 char type2String[1024];
16471 type1String[0] = '\0';
16472 type2String[0] = '\0';
16473 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
16474 PrintType(type1, type2String, 0, 1);
16475 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16476 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
16479 if(exp->__anon1.op.exp2->destType == dummy)
16482 exp->__anon1.op.exp2->destType = (((void *)0));
16484 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
16486 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16487 type2->refCount = 1;
16488 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
16489 type2->isSigned = 1;
16491 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))
16493 type2 = __extension__ ({
16494 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16496 __ecereInstance1->kind = 3, __ecereInstance1;
16498 type2->refCount = 1;
16499 type2->isSigned = 1;
16503 type2 = exp->__anon1.op.exp2->expType;
16509 if(exp->__anon1.op.op == SIZEOF)
16511 exp->expType = __extension__ ({
16512 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16514 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16516 exp->isConstant = 1;
16518 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
16520 exp->expType = Dereference(type2);
16521 if(type2 && type2->kind == 8)
16522 notByReference = 1;
16524 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
16525 exp->expType = Reference(type2);
16526 else if(exp->__anon1.op.op == LEFT_OP || exp->__anon1.op.op == RIGHT_OP)
16528 if(exp->__anon1.op.exp1->expType)
16530 exp->expType = exp->__anon1.op.exp1->expType;
16531 exp->expType->refCount++;
16538 if(exp->__anon1.op.exp1)
16540 if(exp->__anon1.op.exp1->destType)
16541 FreeType(exp->__anon1.op.exp1->destType);
16542 exp->__anon1.op.exp1->destType = MkClassType("bool");
16543 exp->__anon1.op.exp1->destType->truth = 1;
16544 if(!exp->__anon1.op.exp1->expType)
16545 ProcessExpressionType(exp->__anon1.op.exp1);
16547 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16548 FreeType(exp->__anon1.op.exp1->expType);
16549 exp->__anon1.op.exp1->expType = MkClassType("bool");
16550 exp->__anon1.op.exp1->expType->truth = 1;
16552 if(exp->__anon1.op.exp2)
16554 if(exp->__anon1.op.exp2->destType)
16555 FreeType(exp->__anon1.op.exp2->destType);
16556 exp->__anon1.op.exp2->destType = MkClassType("bool");
16557 exp->__anon1.op.exp2->destType->truth = 1;
16558 if(!exp->__anon1.op.exp2->expType)
16559 ProcessExpressionType(exp->__anon1.op.exp2);
16561 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16562 FreeType(exp->__anon1.op.exp2->expType);
16563 exp->__anon1.op.exp2->expType = MkClassType("bool");
16564 exp->__anon1.op.exp2->expType->truth = 1;
16567 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")))))
16569 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"))))
16571 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)))
16573 struct Type * intType;
16575 if(!type1->__anon1._class->__anon1.registered->dataType)
16576 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16577 if(!type2->__anon1._class->__anon1.registered->dataType)
16578 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16579 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
16580 if(exp->__anon1.op.exp1->destType)
16581 FreeType(exp->__anon1.op.exp1->destType);
16582 if(exp->__anon1.op.exp2->destType)
16583 FreeType(exp->__anon1.op.exp2->destType);
16584 exp->__anon1.op.exp1->destType = intType;
16585 exp->__anon1.op.exp2->destType = intType;
16586 intType->refCount++;
16590 if(exp->__anon1.op.exp2->destType)
16591 FreeType(exp->__anon1.op.exp2->destType);
16592 exp->__anon1.op.exp2->destType = type1;
16594 if(exp->__anon1.op.exp1->destType)
16595 FreeType(exp->__anon1.op.exp1->destType);
16596 exp->__anon1.op.exp1->destType = type2;
16599 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)
16600 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);
16601 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16603 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16607 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16609 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16610 ProcessExpressionType(exp->__anon1.op.exp1);
16611 if(type2->kind != 13)
16613 ProcessExpressionType(classExp);
16614 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16615 if(!exp->__anon1.op.exp2->expType)
16619 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16622 ProcessExpressionType(exp->__anon1.op.exp2);
16626 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)))
16628 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16629 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16630 exp->expType = type1;
16634 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)))
16636 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16637 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16638 exp->expType = type2;
16642 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))
16644 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16648 unsigned int success = 0;
16650 if(type1->kind == 13 && type2->kind == 13)
16652 if(exp->__anon1.op.op == '+')
16653 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16654 else if(exp->__anon1.op.op == '-')
16656 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16658 exp->expType = __extension__ ({
16659 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16661 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16664 if(type1->__anon1.type->kind == 20)
16666 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16670 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16672 ProcessExpressionType(classExp);
16674 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"))));
16675 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16683 if(!success && exp->__anon1.op.exp1->type == 2)
16685 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16688 FreeType(exp->expType);
16689 exp->expType = exp->__anon1.op.exp1->destType;
16690 if(exp->__anon1.op.exp1->destType)
16691 exp->__anon1.op.exp1->destType->refCount++;
16694 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16697 FreeType(exp->expType);
16698 exp->expType = exp->__anon1.op.exp2->destType;
16699 if(exp->__anon1.op.exp2->destType)
16700 exp->__anon1.op.exp2->destType->refCount++;
16706 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16709 FreeType(exp->expType);
16710 exp->expType = exp->__anon1.op.exp2->destType;
16711 if(exp->__anon1.op.exp2->destType)
16712 exp->__anon1.op.exp2->destType->refCount++;
16715 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16718 FreeType(exp->expType);
16719 exp->expType = exp->__anon1.op.exp1->destType;
16720 if(exp->__anon1.op.exp1->destType)
16721 exp->__anon1.op.exp1->destType->refCount++;
16727 char expString1[10240];
16728 char expString2[10240];
16732 expString1[0] = '\0';
16733 expString2[0] = '\0';
16738 PrintExpression(exp->__anon1.op.exp1, expString1);
16739 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16740 PrintExpression(exp->__anon1.op.exp2, expString2);
16741 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16742 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16743 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16745 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16749 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)
16751 if(exp->__anon1.op.exp1->destType)
16752 FreeType(exp->__anon1.op.exp1->destType);
16753 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16754 if(type2->__anon1._class->__anon1.registered->dataType)
16755 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16756 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16757 exp->expType = type2;
16761 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)
16763 if(exp->__anon1.op.exp2->destType)
16764 FreeType(exp->__anon1.op.exp2->destType);
16765 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16766 if(type1->__anon1._class->__anon1.registered->dataType)
16767 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16768 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16769 exp->expType = type1;
16775 unsigned int valid = 0;
16777 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
16779 if(exp->__anon1.op.exp2->destType)
16780 FreeType(exp->__anon1.op.exp2->destType);
16781 if(!type1->__anon1._class->__anon1.registered->dataType)
16782 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16783 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16784 exp->__anon1.op.exp2->destType->refCount++;
16785 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16788 type2 = exp->__anon1.op.exp2->destType;
16791 exp->expType = type2;
16794 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
16796 if(exp->__anon1.op.exp1->destType)
16797 FreeType(exp->__anon1.op.exp1->destType);
16798 if(!type2->__anon1._class->__anon1.registered->dataType)
16799 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16800 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16801 exp->__anon1.op.exp1->destType->refCount++;
16802 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16803 type1 = exp->__anon1.op.exp1->destType;
16804 exp->expType = type1;
16807 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16809 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
16810 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
16812 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16814 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16816 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16819 FreeType(exp->expType);
16820 exp->expType = exp->__anon1.op.exp2->expType;
16821 if(exp->__anon1.op.exp2->expType)
16822 exp->__anon1.op.exp2->expType->refCount++;
16826 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16828 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16831 FreeType(exp->expType);
16832 exp->expType = exp->__anon1.op.exp1->expType;
16833 if(exp->__anon1.op.exp1->expType)
16834 exp->__anon1.op.exp1->expType->refCount++;
16841 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16843 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16846 FreeType(exp->expType);
16847 exp->expType = exp->__anon1.op.exp1->expType;
16848 if(exp->__anon1.op.exp1->expType)
16849 exp->__anon1.op.exp1->expType->refCount++;
16853 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16855 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16858 FreeType(exp->expType);
16859 exp->expType = exp->__anon1.op.exp2->expType;
16860 if(exp->__anon1.op.exp2->expType)
16861 exp->__anon1.op.exp2->expType->refCount++;
16869 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))
16871 if(exp->__anon1.op.exp1->destType)
16872 FreeType(exp->__anon1.op.exp1->destType);
16873 exp->__anon1.op.exp1->destType = type2;
16875 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16878 FreeType(exp->expType);
16879 exp->expType = exp->__anon1.op.exp1->destType;
16880 if(exp->__anon1.op.exp1->destType)
16881 exp->__anon1.op.exp1->destType->refCount++;
16886 if(exp->__anon1.op.exp2->destType)
16887 FreeType(exp->__anon1.op.exp2->destType);
16888 exp->__anon1.op.exp2->destType = type1;
16890 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16893 FreeType(exp->expType);
16894 exp->expType = exp->__anon1.op.exp2->destType;
16895 if(exp->__anon1.op.exp2->destType)
16896 exp->__anon1.op.exp2->destType->refCount++;
16898 else if(type1 && type2)
16900 char expString1[10240];
16901 char expString2[10240];
16902 char type1String[1024];
16903 char type2String[1024];
16905 expString1[0] = '\0';
16906 expString2[0] = '\0';
16907 type1String[0] = '\0';
16908 type2String[0] = '\0';
16911 PrintExpression(exp->__anon1.op.exp1, expString1);
16912 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16913 PrintExpression(exp->__anon1.op.exp2, expString2);
16914 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16915 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
16916 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
16918 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
16919 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
16921 exp->expType = exp->__anon1.op.exp1->expType;
16922 if(exp->__anon1.op.exp1->expType)
16923 exp->__anon1.op.exp1->expType->refCount++;
16925 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16927 exp->expType = exp->__anon1.op.exp2->expType;
16928 if(exp->__anon1.op.exp2->expType)
16929 exp->__anon1.op.exp2->expType->refCount++;
16937 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16939 struct Type * oldType = exp->__anon1.op.exp1->expType;
16941 exp->__anon1.op.exp1->expType = (((void *)0));
16942 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16945 exp->__anon1.op.exp1->expType = oldType;
16947 if(exp->__anon1.op.exp1->destType)
16948 FreeType(exp->__anon1.op.exp1->destType);
16949 exp->__anon1.op.exp1->destType = type2;
16951 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16954 FreeType(exp->expType);
16955 exp->expType = exp->__anon1.op.exp1->destType;
16956 if(exp->__anon1.op.exp1->destType)
16957 exp->__anon1.op.exp1->destType->refCount++;
16961 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
16963 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16965 if(exp->__anon1.op.exp1->destType)
16966 FreeType(exp->__anon1.op.exp1->destType);
16967 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16968 if(type2->__anon1._class->__anon1.registered->dataType)
16969 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16970 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16972 if(exp->__anon1.op.op == '!')
16974 exp->expType = MkClassType("bool");
16975 exp->expType->truth = 1;
16979 exp->expType = type2;
16984 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
16986 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16988 if(exp->__anon1.op.exp2->destType)
16989 FreeType(exp->__anon1.op.exp2->destType);
16990 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16991 if(type1->__anon1._class->__anon1.registered->dataType)
16992 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16993 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16995 exp->expType = type1;
17001 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
17003 char expString[10000];
17005 expString[0] = '\0';
17008 PrintExpression(exp->__anon1.op.exp1, expString);
17009 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17012 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17014 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
17016 char expString[10240];
17018 expString[0] = '\0';
17021 PrintExpression(exp->__anon1.op.exp2, expString);
17022 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17025 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17029 FreeType(exp->expType);
17030 exp->expType = MkClassType("bool");
17031 exp->expType->truth = 1;
17033 if(exp->__anon1.op.op != SIZEOF)
17034 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
17035 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
17037 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
17039 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
17040 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
17041 yylloc = oldyylloc;
17050 struct Expression * e;
17052 exp->isConstant = 1;
17053 for(e = (*exp->__anon1.list).first; e; e = e->next)
17057 FreeType(e->destType);
17058 e->opDestType = exp->opDestType;
17059 e->destType = exp->destType;
17062 exp->destType->refCount++;
17065 ProcessExpressionType(e);
17066 if(!exp->expType && !e->next)
17068 exp->expType = e->expType;
17070 e->expType->refCount++;
17073 exp->isConstant = 0;
17075 e = (*exp->__anon1.list).first;
17076 if(!e->next && e->type == 8)
17078 struct Expression * next = exp->next, * prev = exp->prev;
17080 FreeType(exp->expType);
17081 FreeType(exp->destType);
17082 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
17086 ((e ? __extension__ ({
17087 void * __ecerePtrToDelete = (e);
17089 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
17091 ProcessExpressionType(exp);
17097 struct Expression * e;
17099 exp->isConstant = 1;
17100 ProcessExpressionType(exp->__anon1.index.exp);
17101 if(!exp->__anon1.index.exp->isConstant)
17102 exp->isConstant = 0;
17103 if(exp->__anon1.index.exp->expType)
17105 struct Type * source = exp->__anon1.index.exp->expType;
17107 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
17109 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
17110 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
17112 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
17114 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
17115 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
17117 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
17119 if(type->kind == 8)
17120 type->constant = 1;
17121 else if(type->kind == 13)
17123 struct Type * t = type;
17125 while(t->kind == 13)
17126 t = t->__anon1.type;
17129 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
17134 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
17136 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
17139 FreeType(e->destType);
17140 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
17142 ProcessExpressionType(e);
17147 exp->isConstant = 0;
17150 exp->expType = Dereference(exp->__anon1.index.exp->expType);
17152 DeclareType(curExternal, exp->expType, 1, 0);
17157 struct Expression * e;
17158 struct Type * functionType;
17159 struct Type * methodType = (((void *)0));
17165 PrintExpression(exp->__anon1.call.exp, name);
17166 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
17168 PrintExpression(exp->__anon1.call.exp, name);
17171 if(exp->__anon1.call.exp->type == 0)
17173 struct Expression * idExp = exp->__anon1.call.exp;
17174 struct Identifier * id = idExp->__anon1.__anon1.identifier;
17176 if(!strcmp(id->string, "__builtin_frame_address"))
17178 exp->expType = ProcessTypeString("void *", 1);
17179 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17180 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17183 else if(!strcmp(id->string, "__ENDIAN_PAD"))
17185 exp->expType = ProcessTypeString("int", 1);
17186 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17187 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17190 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
17192 struct Expression * a = (((void *)0));
17193 struct Expression * b = (((void *)0));
17194 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
17196 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
17198 a = (*exp->__anon1.call.arguments).first;
17199 b = (*exp->__anon1.call.arguments).last;
17203 else if((*exp->__anon1.call.arguments).count == 1)
17205 a = (*exp->__anon1.call.arguments).first;
17210 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
17211 idExp->__anon1.__anon1.identifier = (((void *)0));
17212 FreeExpContents(exp);
17213 ProcessExpressionType(a);
17215 ProcessExpressionType(b);
17217 exp->__anon1.list = MkList();
17218 if(a->expType && (!b || b->expType))
17220 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
17224 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17225 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
17226 struct Declaration * decl;
17227 char temp1[1024], temp2[1024];
17229 GetTypeSpecs(a->expType, specs);
17230 if(a && !a->isConstant && a->type != 0)
17232 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
17233 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
17234 tempExp1 = QMkExpId(temp1);
17235 tempExp1->expType = a->expType;
17237 a->expType->refCount++;
17238 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
17240 if(b && !b->isConstant && b->type != 0)
17242 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
17243 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
17244 tempExp2 = QMkExpId(temp2);
17245 tempExp2->expType = b->expType;
17247 b->expType->refCount++;
17248 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
17250 decl = MkDeclaration(specs, decls);
17251 if(!curCompound->__anon1.compound.declarations)
17252 curCompound->__anon1.compound.declarations = MkList();
17253 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
17257 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
17259 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
17261 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
17262 exp->expType = a->expType;
17264 a->expType->refCount++;
17266 else if(!strcmp(id->string, "Abs"))
17268 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
17269 exp->expType = a->expType;
17271 a->expType->refCount++;
17273 else if(!strcmp(id->string, "Sgn"))
17275 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"))))));
17276 exp->expType = ProcessTypeString("int", 0);
17278 FreeExpression(tempExp1);
17280 FreeExpression(tempExp2);
17281 FreeIdentifier(id);
17287 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
17289 if(!exp->__anon1.call.exp->destType)
17291 exp->__anon1.call.exp->destType = dummy;
17294 ProcessExpressionType(exp->__anon1.call.exp);
17295 if(exp->__anon1.call.exp->destType == dummy)
17298 exp->__anon1.call.exp->destType = (((void *)0));
17302 functionType = exp->__anon1.call.exp->expType;
17303 if(functionType && functionType->kind == 16)
17305 methodType = functionType;
17306 functionType = methodType->__anon1.__anon3.method->dataType;
17307 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
17309 char typeString[1024];
17311 typeString[0] = '\0';
17313 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
17315 functionType->__anon1.__anon2.thisClass = (((void *)0));
17316 PrintType(functionType, typeString, 1, 1);
17317 functionType->__anon1.__anon2.thisClass = back;
17319 if(strstr(typeString, "thisclass"))
17321 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17322 struct Declarator * decl;
17325 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17327 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17328 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))
17329 thisClassParams = 0;
17330 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17332 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
17334 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
17335 ProcessDeclarator(decl, 1);
17336 thisClass = backupThisClass;
17338 thisClassParams = 1;
17339 functionType = ProcessType(specs, decl);
17340 functionType->refCount = 0;
17341 FinishTemplatesContext(context);
17343 struct Type * p, * op;
17345 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)
17348 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17351 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
17353 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17356 FreeList(specs, (void *)(FreeSpecifier));
17357 FreeDeclarator(decl);
17361 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
17363 struct Type * type = functionType->__anon1.type;
17365 if(!functionType->refCount)
17367 functionType->__anon1.type = (((void *)0));
17368 FreeType(functionType);
17370 functionType = type;
17372 if(functionType && functionType->kind != 11)
17374 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
17376 else if(functionType)
17378 unsigned int emptyParams = 0, noParams = 0;
17379 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
17380 struct Type * type = functionType->__anon1.__anon2.params.first;
17381 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
17383 struct Location oldyylloc = yylloc;
17387 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
17389 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
17392 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
17394 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)
17396 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
17399 e->destType = type;
17401 type = functionType->__anon1.__anon2.params.first;
17404 type->refCount = 0;
17406 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
17408 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
17409 type->byReference = functionType->byReference;
17410 type->typedByReference = functionType->typedByReference;
17413 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
17415 e->destType = type;
17417 type = functionType->__anon1.__anon2.params.first;
17420 type->refCount = 0;
17423 if(type && type->kind == 0)
17426 if(!type->refCount)
17428 type = (((void *)0));
17430 for(; e; e = e->next)
17432 if(!type && !emptyParams)
17435 if(methodType && methodType->__anon1.__anon3.methodClass)
17436 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);
17438 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);
17441 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
17443 struct Type * templatedType = (((void *)0));
17444 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
17445 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17448 if(_class && _class->templateArgs)
17450 struct __ecereNameSpace__ecere__com__Class * sClass;
17452 for(sClass = _class; sClass; sClass = sClass->base)
17454 if(sClass->templateClass)
17455 sClass = sClass->templateClass;
17457 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17459 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
17461 struct __ecereNameSpace__ecere__com__Class * nextClass;
17463 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17465 if(nextClass->templateClass)
17466 nextClass = nextClass->templateClass;
17467 id += nextClass->templateParams.count;
17477 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
17479 unsigned int constant = type->constant;
17480 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
17483 struct Context * context = SetupTemplatesContext(_class);
17485 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17486 FinishTemplatesContext(context);
17488 if(templatedType->kind == 8 && constant)
17489 templatedType->constant = 1;
17490 else if(templatedType->kind == 13)
17492 struct Type * t = templatedType->__anon1.type;
17494 while(t->kind == 13)
17495 t = t->__anon1.type;
17497 t->constant = constant;
17499 e->destType = templatedType;
17502 templatedType->passAsTemplate = 1;
17507 e->destType = type;
17514 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
17516 e->destType = type->prev;
17517 e->destType->refCount++;
17521 e->destType = type;
17526 if(type && type->kind != 14)
17528 struct Type * next = type->next;
17530 if(!type->refCount)
17535 if(type && type->kind != 14)
17537 if(methodType && methodType->__anon1.__anon3.methodClass)
17538 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);
17540 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);
17542 yylloc = oldyylloc;
17543 if(type && !type->refCount)
17548 functionType = __extension__ ({
17549 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17551 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17553 if(exp->__anon1.call.exp->type == 0)
17555 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17559 struct Symbol * symbol;
17560 struct Location oldyylloc = yylloc;
17562 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17563 if(strstr(string, "__builtin_") == string)
17567 functionType->__anon1.__anon2.returnType = exp->destType;
17568 exp->destType->refCount++;
17572 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17573 symbol = __extension__ ({
17574 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17576 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17578 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17579 if(strstr(symbol->string, "::"))
17580 globalContext->hasNameSpace = 1;
17581 yylloc = oldyylloc;
17584 else if(exp->__anon1.call.exp->type == 8)
17588 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17589 if(!functionType->__anon1.__anon2.returnType)
17591 functionType->__anon1.__anon2.returnType = __extension__ ({
17592 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17594 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17598 if(functionType && functionType->kind == 11)
17600 exp->expType = functionType->__anon1.__anon2.returnType;
17601 if(functionType->__anon1.__anon2.returnType)
17602 functionType->__anon1.__anon2.returnType->refCount++;
17603 if(!functionType->refCount)
17604 FreeType(functionType);
17606 if(exp->__anon1.call.arguments)
17608 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17609 ProcessExpressionType(e);
17615 struct Type * type;
17616 struct Location oldyylloc = yylloc;
17617 unsigned int thisPtr;
17618 struct Expression * checkExp = exp->__anon1.member.exp;
17622 if(checkExp->type == 11)
17623 checkExp = checkExp->__anon1.cast.exp;
17624 else if(checkExp->type == 5)
17625 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17629 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17630 exp->thisPtr = thisPtr;
17631 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17633 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17635 ProcessExpressionType(exp->__anon1.member.exp);
17636 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)
17638 exp->isConstant = 0;
17641 exp->isConstant = exp->__anon1.member.exp->isConstant;
17642 type = exp->__anon1.member.exp->expType;
17644 if(type && (type->kind == 20))
17646 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17647 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17651 for(param = _class->templateParams.first; param; param = param->next)
17653 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17657 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17659 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17663 struct Expression * expMember = exp->__anon1.member.exp;
17664 struct Declarator * decl;
17665 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17666 char thisClassTypeString[1024];
17668 FreeIdentifier(exp->__anon1.member.member);
17669 ProcessExpressionType(argExp);
17671 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17675 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17676 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17679 strcpy(thisClassTypeString, _class->fullName);
17681 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17682 exp->expType = ProcessType(specs, decl);
17683 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17685 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17686 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17687 int paramCount = 0;
17688 int lastParam = -1;
17689 char templateString[1024];
17690 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17692 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17693 for(cClass = expClass; cClass; cClass = cClass->base)
17697 for(param = cClass->templateParams.first; param; param = param->next)
17700 struct __ecereNameSpace__ecere__com__Class * sClass;
17701 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17703 for(sClass = cClass->base; sClass; sClass = sClass->base)
17704 id += sClass->templateParams.count;
17705 arg = expClass->templateArgs[id];
17706 for(sClass = _class; sClass; sClass = sClass->base)
17708 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17710 struct __ecereNameSpace__ecere__com__Class * nextClass;
17712 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17713 p += nextClass->templateParams.count;
17714 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17716 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17718 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17720 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17721 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17728 char argument[256];
17730 argument[0] = '\0';
17731 switch(param->type)
17735 char expString[1024];
17736 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17737 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17738 struct Expression * exp;
17739 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17741 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17742 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17743 ProcessExpressionType(exp);
17744 ComputeExpression(exp);
17745 expString[0] = '\0';
17746 PrintExpression(exp, expString);
17747 strcat(argument, expString);
17748 FreeExpression(exp);
17753 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17758 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17760 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17761 strcat(argument, thisClassTypeString);
17763 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17771 strcat(templateString, ", ");
17772 if(lastParam != p - 1)
17774 strcat(templateString, param->name);
17775 strcat(templateString, " = ");
17777 strcat(templateString, argument);
17786 int len = strlen(templateString);
17788 if(templateString[len - 1] == '>')
17789 templateString[len++] = ' ';
17790 templateString[len++] = '>';
17791 templateString[len++] = '\0';
17794 struct Context * context = SetupTemplatesContext(_class);
17796 FreeType(exp->expType);
17797 exp->expType = ProcessTypeString(templateString, 0);
17798 FinishTemplatesContext(context);
17801 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17802 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17804 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")))))))));
17807 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17809 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17812 if(type && (type->kind == 20))
17814 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)))
17816 struct Identifier * id = exp->__anon1.member.member;
17817 int typeKind = type->kind;
17818 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));
17820 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
17822 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
17827 if(typeKind == 3 || typeKind == 15)
17828 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
17831 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17833 _class = type->__anon1._class->__anon1.registered;
17835 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
17837 _class = FindClass("char *")->__anon1.registered;
17839 else if(type->kind == 13)
17841 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
17842 FreeType(exp->expType);
17843 exp->expType = ProcessTypeString("uintptr", 0);
17844 exp->byReference = 1;
17848 char string[1024] = "";
17849 struct Symbol * classSym;
17851 PrintTypeNoConst(type, string, 0, 1);
17852 classSym = FindClass(string);
17854 _class = classSym->__anon1.registered;
17860 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
17861 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
17862 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
17863 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
17864 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
17866 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
17867 exp->__anon1.member.memberType = 1;
17868 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
17869 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
17872 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
17874 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17875 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
17877 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17879 member = (((void *)0));
17881 if(!member && !prop)
17882 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17883 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
17884 exp->__anon1.member.thisPtr = 1;
17888 unsigned int useMemberForNonConst = 0;
17892 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
17893 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);
17894 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17895 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
17897 if((!prop || useMemberForNonConst) && !member)
17899 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
17902 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17903 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);
17904 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17905 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17910 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
17911 prop = (((void *)0));
17913 member = (((void *)0));
17917 if(!prop && !member && !method)
17918 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
17919 if(!prop && !member && !method)
17923 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
17926 exp->__anon1.member.memberType = 5;
17927 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
17931 char structName[1024];
17932 struct Identifier * id = exp->__anon1.member.member;
17933 struct Expression * classExp = exp->__anon1.member.exp;
17936 FreeType(classExp->expType);
17937 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
17938 strcpy(structName, "__ecereClassData_");
17939 FullClassNameCat(structName, type->__anon1._class->string, 0);
17941 exp->__anon1.member.member = id;
17942 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"))))))));
17944 ProcessExpressionType(exp);
17950 struct Symbol * classSym = FindClass(id->string);
17954 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
17957 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
17961 if(exp->__anon1.member.exp->destType)
17962 FreeType(exp->__anon1.member.exp->destType);
17964 if(method && !method->_class->symbol)
17965 method->_class->symbol = FindClass(method->_class->fullName);
17966 if(prop && !prop->_class->symbol)
17967 prop->_class->symbol = FindClass(prop->_class->fullName);
17968 exp->__anon1.member.exp->destType = __extension__ ({
17969 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17971 __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;
17976 exp->__anon1.member.memberType = 1;
17977 if(!prop->dataType)
17978 ProcessPropertyType(prop);
17979 exp->expType = prop->dataType;
17980 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
17982 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17984 CopyTypeInto(type, exp->expType);
17985 type->refCount = 1;
17986 type->constant = 1;
17987 exp->expType = type;
17989 else if(prop->dataType)
17990 prop->dataType->refCount++;
17994 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17996 FreeExpContents(exp);
17998 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17999 ProcessExpressionType(exp);
18002 exp->__anon1.member.memberType = 3;
18003 DeclareStruct(curExternal, _class->fullName, 0, 1);
18004 if(member->_class != _class)
18005 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
18006 if(!member->dataType)
18008 struct Context * context = SetupTemplatesContext(_class);
18010 member->dataType = ProcessTypeString(member->dataTypeString, 0);
18011 FinishTemplatesContext(context);
18013 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)
18014 member->dataType->bitMemberSize = ((struct __ecereNameSpace__ecere__com__BitMember *)member)->size;
18015 exp->expType = member->dataType;
18016 if(member->dataType)
18017 member->dataType->refCount++;
18019 else if(revConvert)
18021 exp->__anon1.member.memberType = 4;
18022 exp->expType = MkClassType(revConvert->_class->fullName);
18027 exp->__anon1.member.memberType = 2;
18029 if(!method->dataType)
18030 ProcessMethodType(method);
18031 exp->expType = __extension__ ({
18032 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18034 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
18036 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
18037 exp->expType->__anon1.__anon3.usedClass = _class;
18039 else if(!classProp)
18041 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
18043 FreeExpContents(exp);
18045 exp->__anon1.__anon1.identifier = MkIdentifier("class");
18046 FreeType(exp->expType);
18047 exp->expType = MkClassType("ecere::com::Class");
18050 yylloc = exp->__anon1.member.member->loc;
18051 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
18053 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
18055 if(_class && exp->expType)
18057 struct __ecereNameSpace__ecere__com__Class * tClass;
18059 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
18060 while(tClass && !tClass->templateClass)
18061 tClass = tClass->base;
18062 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
18065 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18066 struct __ecereNameSpace__ecere__com__Class * sClass;
18068 for(sClass = tClass; sClass; sClass = sClass->base)
18071 if(sClass->templateClass)
18072 sClass = sClass->templateClass;
18073 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18075 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
18077 for(sClass = sClass->base; sClass; sClass = sClass->base)
18078 id += sClass->templateParams.count;
18086 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
18088 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18089 struct Context * context = SetupTemplatesContext(tClass);
18090 unsigned int constant = exp->expType->constant;
18091 unsigned int passAsTemplate = 0;
18092 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
18093 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
18095 if(t && t->kind == 8 && t->__anon1._class)
18096 thisClassFrom = t->__anon1._class->__anon1.registered;
18098 thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
18100 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
18101 FreeType(exp->expType);
18102 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18103 exp->expType->thisClassFrom = thisClassFrom;
18104 if(exp->expType->kind == 8 && constant)
18105 exp->expType->constant = 1;
18106 else if(exp->expType->kind == 13)
18108 struct Type * t = exp->expType->__anon1.type;
18110 while(t->kind == 13)
18111 t = t->__anon1.type;
18113 t->constant = constant;
18117 if(exp->expType->kind == 21)
18119 FreeType(exp->expType);
18120 exp->expType = ReplaceThisClassType(_class);
18123 exp->expType->passAsTemplate = 1;
18126 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18127 if(exp->destType->kind == 8 && constant)
18128 exp->destType->constant = 1;
18129 else if(exp->destType->kind == 13)
18131 struct Type * t = exp->destType->__anon1.type;
18133 while(t->kind == 13)
18134 t = t->__anon1.type;
18136 t->constant = constant;
18138 if(exp->destType->kind == 21)
18140 FreeType(exp->destType);
18141 exp->destType = ReplaceThisClassType(_class);
18145 FinishTemplatesContext(context);
18148 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)
18151 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
18152 struct __ecereNameSpace__ecere__com__Class * sClass;
18154 for(sClass = tClass; sClass; sClass = sClass->base)
18157 if(sClass->templateClass)
18158 sClass = sClass->templateClass;
18159 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
18161 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
18163 for(sClass = sClass->base; sClass; sClass = sClass->base)
18164 id += sClass->templateParams.count;
18174 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18175 struct Context * context = SetupTemplatesContext(tClass);
18176 struct Type * basicType;
18178 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18181 if(basicType->kind == 21)
18183 FreeType(basicType);
18184 basicType = ReplaceThisClassType(_class);
18186 FreeType(exp->expType);
18187 exp->expType = __extension__ ({
18188 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18190 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
18194 exp->destType = exp->expType;
18195 exp->destType->refCount++;
18198 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18199 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18200 struct Declarator * decl;
18202 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18205 exp->destType->refCount++;
18207 exp->expType->refCount++;
18209 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
18210 exp->__anon1.cast.exp = newExp;
18213 FinishTemplatesContext(context);
18216 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
18218 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
18222 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
18224 int paramCount = 0;
18225 int lastParam = -1;
18226 char templateString[1024];
18227 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
18229 sprintf(templateString, "%s<", expClass->templateClass->fullName);
18230 while(cClass != expClass)
18232 struct __ecereNameSpace__ecere__com__Class * sClass;
18234 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
18237 for(param = cClass->templateParams.first; param; param = param->next)
18239 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
18241 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
18242 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
18244 while(cClassCur != tClass && !paramCur)
18246 struct __ecereNameSpace__ecere__com__Class * sClassCur;
18248 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
18250 cClassCur = sClassCur;
18251 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
18253 if(!strcmp(paramCur->name, param->name))
18260 if(paramCur && paramCur->type == 0)
18261 arg = tClass->templateArgs[cp];
18263 arg = expClass->templateArgs[p];
18265 char argument[256];
18267 argument[0] = '\0';
18268 switch(param->type)
18272 char expString[1024];
18273 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18274 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
18275 struct Expression * exp;
18276 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
18278 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
18279 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
18280 ProcessExpressionType(exp);
18281 ComputeExpression(exp);
18282 expString[0] = '\0';
18283 PrintExpression(exp, expString);
18284 strcat(argument, expString);
18285 FreeExpression(exp);
18290 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
18295 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
18296 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18303 strcat(templateString, ", ");
18304 if(lastParam != p - 1)
18306 strcat(templateString, param->name);
18307 strcat(templateString, " = ");
18309 strcat(templateString, argument);
18318 int len = strlen(templateString);
18320 if(templateString[len - 1] == '>')
18321 templateString[len++] = ' ';
18322 templateString[len++] = '>';
18323 templateString[len++] = '\0';
18325 FreeType(exp->expType);
18327 struct Context * context = SetupTemplatesContext(tClass);
18329 exp->expType = ProcessTypeString(templateString, 0);
18330 FinishTemplatesContext(context);
18337 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)");
18339 else if(type && (type->kind == 9 || type->kind == 10))
18341 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
18345 exp->expType = memberType;
18347 memberType->refCount++;
18352 char expString[10240];
18354 expString[0] = '\0';
18357 PrintExpression(exp, expString);
18358 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18360 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
18362 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
18364 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
18366 struct Identifier * id = exp->__anon1.member.member;
18367 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));
18371 FreeType(exp->expType);
18372 exp->expType = ReplaceThisClassType(_class);
18376 yylloc = oldyylloc;
18381 struct Type * destType = exp->destType;
18383 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
18385 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
18387 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
18391 ProcessExpressionType(exp);
18398 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
18400 if(classSym && classSym->__anon1.registered)
18402 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
18405 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
18408 DeclareStruct(curExternal, classSym->string, 0, 1);
18409 FreeSpecifier(exp->__anon1._class);
18410 FullClassNameCat(name, classSym->string, 0);
18414 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
18418 struct Expression * e;
18421 if(b->structSize == b->offset)
18422 exp->__anon1.op.exp1 = MkExpConstant("0");
18424 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18425 exp->__anon1.op.op = '+';
18427 while(b->offset != 0)
18429 struct Symbol * sym;
18430 struct Expression * typeSize;
18433 sym = FindClass(b->fullName);
18435 DeclareStruct(curExternal, sym->string, 0, 1);
18436 FullClassNameCat(name, sym->string, 0);
18437 if(b->structSize == b->offset)
18438 typeSize = MkExpConstant("0");
18440 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18441 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
18442 e = e->__anon1.op.exp2;
18448 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
18450 FreeSpecifier(exp->__anon1._class);
18451 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
18456 char className[1024];
18458 strcpy(className, "__ecereClass_");
18459 FullClassNameCat(className, classSym->string, 1);
18460 DeclareClass(curExternal, classSym, className);
18461 FreeExpContents(exp);
18463 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
18464 exp->__anon1.member.member = MkIdentifier("structSize");
18468 exp->expType = __extension__ ({
18469 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18471 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18477 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
18479 exp->expType = __extension__ ({
18480 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18482 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18484 exp->isConstant = 1;
18485 DeclareType(curExternal, type, 1, 0);
18491 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
18494 FreeType(exp->__anon1.cast.exp->destType);
18495 exp->__anon1.cast.exp->destType = type;
18498 ProcessExpressionType(exp->__anon1.cast.exp);
18501 exp->expType = type;
18502 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
18504 void * prev = exp->prev, * next = exp->next;
18505 struct Type * expType = exp->__anon1.cast.exp->destType;
18506 struct Expression * castExp = exp->__anon1.cast.exp;
18507 struct Type * destType = exp->destType;
18510 expType->refCount++;
18511 FreeType(exp->expType);
18512 FreeTypeName(exp->__anon1.cast.typeName);
18514 FreeType(exp->expType);
18515 FreeType(exp->destType);
18516 exp->expType = expType;
18517 exp->destType = destType;
18518 ((castExp ? __extension__ ({
18519 void * __ecerePtrToDelete = (castExp);
18521 __ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)__ecerePtrToDelete) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(__ecerePtrToDelete);
18522 }) : 0), castExp = 0);
18528 exp->isConstant = exp->__anon1.cast.exp->isConstant;
18534 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
18536 exp->expType = type;
18541 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
18543 ProcessExpressionType(exp->__anon1.vaArg.exp);
18544 exp->expType = type;
18549 struct Expression * e;
18550 struct Type * t = exp->destType;
18552 if(t && !exp->destType->casted)
18554 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18555 CopyTypeInto(t, exp->destType);
18560 exp->isConstant = 1;
18561 FreeType(exp->__anon1.cond.cond->destType);
18562 exp->__anon1.cond.cond->destType = MkClassType("bool");
18563 exp->__anon1.cond.cond->destType->truth = 1;
18564 ProcessExpressionType(exp->__anon1.cond.cond);
18565 if(!exp->__anon1.cond.cond->isConstant)
18566 exp->isConstant = 0;
18567 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18571 FreeType(e->destType);
18574 e->destType->refCount++;
18576 ProcessExpressionType(e);
18579 exp->expType = e->expType;
18581 e->expType->refCount++;
18584 exp->isConstant = 0;
18586 FreeType(exp->__anon1.cond.elseExp->destType);
18587 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18588 if(exp->__anon1.cond.elseExp->destType)
18589 exp->__anon1.cond.elseExp->destType->refCount++;
18590 ProcessExpressionType(exp->__anon1.cond.elseExp);
18591 if(!exp->__anon1.cond.elseExp->isConstant)
18592 exp->isConstant = 0;
18598 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18600 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18602 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18604 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18606 exp->destType->refCount++;
18608 ProcessStatement(exp->__anon1.compound);
18609 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18611 exp->expType->refCount++;
18617 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18619 if(spec && spec->type == 1)
18621 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18622 exp->expType->kind = 19;
18623 exp->byReference = 1;
18627 exp->expType = MkClassType("ecere::com::Class");
18628 exp->byReference = 1;
18634 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18638 struct Identifier * id = exp->__anon1.classData.id;
18639 char structName[1024];
18640 struct Expression * classExp;
18642 strcpy(structName, "__ecereClassData_");
18643 FullClassNameCat(structName, _class->fullName, 0);
18645 exp->__anon1.member.member = id;
18646 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18647 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18649 classExp = MkExpIdentifier(MkIdentifier("class"));
18650 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"))))))));
18651 ProcessExpressionType(exp);
18658 struct Type * type = (((void *)0));
18659 const char * typeString = (((void *)0));
18660 char typeStringBuf[1024];
18662 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))
18664 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18666 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18668 else if(exp->__anon1.list)
18670 struct Expression * e;
18672 for(e = (*exp->__anon1.list).first; e; e = e->next)
18674 ProcessExpressionType(e);
18684 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18688 e->expType = (((void *)0));
18689 e = (*exp->__anon1.list).first;
18690 ProcessExpressionType(e);
18693 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18695 FreeType(e->expType);
18696 e->expType = (((void *)0));
18698 type = (((void *)0));
18706 FreeType(e->expType);
18707 e->expType = (((void *)0));
18713 typeStringBuf[0] = '\0';
18714 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18715 typeString = typeStringBuf;
18717 type = (((void *)0));
18722 char templateString[1024];
18723 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18724 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18725 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18726 struct Expression * expExt;
18727 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18729 sprintf(templateString, "Container<%s>", typeString);
18730 if(exp->__anon1.list)
18732 struct Expression * e;
18734 type = ProcessTypeString(typeString, 0);
18735 while((e = (*exp->__anon1.list).first))
18737 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18738 e->destType = type;
18740 ProcessExpressionType(e);
18741 ListAdd(initializers, MkInitializerAssignment(e));
18744 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18746 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18747 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18748 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18749 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18750 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18751 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18752 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18753 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18754 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18755 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18756 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18758 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18760 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18761 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18762 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18763 exp->expType = ProcessTypeString(templateString, 0);
18765 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18766 ProcessExpressionType(expExt);
18770 exp->expType = ProcessTypeString("Container", 0);
18771 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18776 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18778 FreeType(exp->expType);
18779 exp->expType = ReplaceThisClassType(thisClass);
18781 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)
18783 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18787 if(exp->expType->kind != 15)
18789 struct Type * member;
18790 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18792 FreeType(exp->expType);
18793 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18794 exp->expType->kind = symbol->type->kind;
18795 exp->expType->refCount++;
18796 exp->expType->__anon1.__anon1.enumName = enumName;
18797 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18798 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18799 member->refCount++;
18803 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18805 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18807 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);
18809 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18814 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)))
18816 exp->byReference = 1;
18819 if(exp->destType && (exp->destType->kind == 18))
18821 else if(exp->destType && !exp->destType->keepCast)
18823 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
18824 exp->needTemplateCast = 1;
18825 if(exp->destType->kind == 0)
18827 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
18829 unsigned int invalidCast = 0;
18831 if(inCompiler && exp->destType->count && exp->expType)
18833 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
18834 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
18836 if(c1 && c1->type != 1)
18837 c1 = (((void *)0));
18838 if(c2 && c2->type != 1)
18839 c2 = (((void *)0));
18840 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
18843 if(!exp->destType->count || unresolved || invalidCast)
18848 if(exp->destType->kind != 14)
18855 char expString[10240];
18857 expString[0] = '\0';
18858 PrintType(exp->destType, type2, 0, 1);
18861 PrintExpression(exp, expString);
18862 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18865 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
18866 else if(exp->type != 16)
18867 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
18872 char expString[10240];
18874 expString[0] = '\0';
18877 PrintExpression(exp, expString);
18878 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18881 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
18882 else if(exp->type != 16)
18883 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18895 PrintType(exp->expType, type1, 0, 1);
18896 PrintType(exp->destType, type2, 0, 1);
18898 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)))
18902 struct Expression * nbExp = GetNonBracketsExp(exp);
18903 unsigned int skipWarning = 0;
18904 int kind = exp->destType->kind;
18906 if(nbExp->type == 12 && nbExp->destType && !nbExp->destType->casted && nbExp->destType->kind == exp->destType->kind)
18908 if((kind == 1 || kind == 2) && exp->destType->isSigned == exp->expType->signedBeforePromotion && nbExp->type == 4 && nbExp->__anon1.op.exp1 && nbExp->__anon1.op.exp2)
18910 int op = nbExp->__anon1.op.op;
18911 struct Expression * nbExp1, * nbExp2;
18918 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18919 from = nbExp1->expType->promotedFrom;
18920 if(from == 1 || (kind == 2 && from == 2))
18925 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18926 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18927 from = nbExp1->expType->promotedFrom;
18928 if(op == RIGHT_OP && (from == 1 || (kind == 2 && from == 2)))
18930 else if(nbExp2->isConstant && nbExp2->type == 2 && (nbExp->__anon1.op.op == RIGHT_OP || nbExp1->expType->bitMemberSize))
18932 int n = strtol(nbExp2->__anon1.__anon1.constant, (((void *)0)), 0);
18933 int s = from == 1 ? 8 : 16;
18935 if(nbExp1->expType->bitMemberSize && nbExp1->expType->bitMemberSize < s)
18936 s = nbExp1->expType->bitMemberSize;
18937 if(nbExp->__anon1.op.op == RIGHT_OP)
18941 if(s <= (kind == 1 ? 8 : 16))
18946 if(!exp->destType->isSigned)
18948 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18949 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18950 from = nbExp2->expType->promotedFrom;
18951 if((from == 1 || from == 2) && nbExp1->isConstant && nbExp1->type == 2)
18953 int n = strtol(nbExp1->__anon1.__anon1.constant, (((void *)0)), 0);
18955 if(n == (from == 1 ? 255 : 65535))
18964 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18965 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18966 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
18967 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
18968 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)))
18976 nbExp1 = GetNonBracketsExp(nbExp->__anon1.op.exp1);
18977 nbExp2 = GetNonBracketsExp(nbExp->__anon1.op.exp2);
18978 kind1 = nbExp1->expType->promotedFrom ? nbExp1->expType->promotedFrom : nbExp1->expType->kind;
18979 kind2 = nbExp2->expType->promotedFrom ? nbExp2->expType->promotedFrom : nbExp2->expType->kind;
18980 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)))
18988 char expString[10240];
18990 expString[0] = '\0';
18993 PrintExpression(exp, expString);
18994 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18996 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")))
18999 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
19001 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
19006 FreeType(exp->expType);
19007 exp->destType->refCount++;
19008 exp->expType = exp->destType;
19014 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))
19016 struct Expression * nbExp = GetNonBracketsExp(exp);
19018 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
19020 struct Expression * e = MoveExpContents(exp);
19022 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
19024 exp->__anon1.cast.exp->destType = exp->destType;
19026 exp->destType->refCount++;
19027 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
19031 else if(unresolved)
19033 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
19034 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);
19035 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
19036 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
19038 else if(!exp->expType && exp->type != 16)
19040 char expString[10240];
19042 expString[0] = '\0';
19045 PrintExpression(exp, expString);
19046 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
19048 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
19051 ApplyAnyObjectLogic(exp);
19052 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)))
19054 exp->byReference = 1;
19056 yylloc = oldyylloc;
19059 static void ProcessFunction(struct FunctionDefinition * function)
19061 struct Identifier * id = GetDeclId(function->declarator);
19062 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
19063 struct Type * type = symbol ? symbol->type : (((void *)0));
19064 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
19065 struct Context * oldTopContext = topContext;
19067 yylloc = function->loc;
19068 if(type && type->__anon1.__anon2.thisClass)
19070 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
19071 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
19072 char className[1024];
19073 char structName[1024];
19074 struct Declarator * funcDecl;
19075 struct Symbol * thisSymbol;
19076 unsigned int typedObject = 0;
19078 if(_class && !_class->base)
19080 _class = currentClass;
19081 if(_class && !_class->symbol)
19082 _class->symbol = FindClass(_class->fullName);
19083 classSym = _class ? _class->symbol : (((void *)0));
19086 thisClass = _class;
19087 if(inCompiler && _class)
19089 if(type->kind == 11)
19091 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
19093 struct Type * param = symbol->type->__anon1.__anon2.params.first;
19095 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
19098 if(type->classObjectType != 1)
19100 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
19101 symbol->type->__anon1.__anon2.staticMethod = 1;
19102 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
19103 symbol->type->extraParam = 0;
19106 strcpy(className, "__ecereClass_");
19107 FullClassNameCat(className, _class->fullName, 1);
19109 FullClassNameCat(structName, _class->fullName, 0);
19110 funcDecl = GetFuncDecl(function->declarator);
19113 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19115 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19117 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19119 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19120 FreeTypeName(param);
19123 if(!function->propertyNoThis)
19125 struct TypeName * thisParam = (((void *)0));
19127 if(type->classObjectType != 1)
19129 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19130 if(!funcDecl->__anon1.function.parameters)
19131 funcDecl->__anon1.function.parameters = MkList();
19132 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19136 if(type->classObjectType != 1)
19138 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
19139 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
19141 thisParam = __extension__ ({
19142 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
19144 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
19146 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
19147 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19151 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19153 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19155 funcDecl = GetFuncDecl(initDecl->declarator);
19158 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
19160 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
19162 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
19164 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
19165 FreeTypeName(param);
19168 if(type->classObjectType != 1)
19170 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
19172 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
19174 if(!funcDecl->__anon1.function.parameters)
19175 funcDecl->__anon1.function.parameters = MkList();
19176 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
19184 if(type->classObjectType != 1)
19186 thisSymbol = __extension__ ({
19187 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
19189 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
19191 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19192 if(typedObject && thisSymbol->type)
19194 thisSymbol->type->classObjectType = 2;
19195 thisSymbol->type->byReference = type->byReference;
19196 thisSymbol->type->typedByReference = type->byReference;
19200 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
19202 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
19205 struct __ecereNameSpace__ecere__com__Class * base;
19207 for(base = _class; base && base->type != 1000; base = base->next)
19209 for(member = base->membersAndProperties.first; member; member = member->next)
19210 if(!member->isProperty)
19216 for(member = _class->membersAndProperties.first; member; member = member->next)
19217 if(!member->isProperty)
19221 char pointerName[1024];
19222 struct Declaration * decl;
19223 struct Initializer * initializer;
19224 struct Expression * exp, * bytePtr;
19226 strcpy(pointerName, "__ecerePointer_");
19227 FullClassNameCat(pointerName, _class->fullName, 0);
19229 char className[1024];
19231 strcpy(className, "__ecereClass_");
19232 FullClassNameCat(className, classSym->string, 1);
19233 DeclareClass(curExternal, classSym, className);
19235 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
19238 struct Expression * e;
19240 if(_class->offset && _class->offset == (_class->base->type == 5 ? _class->base->memberOffset : _class->base->structSize))
19242 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
19243 ProcessExpressionType(e);
19249 sprintf(string, "%d", _class->offset);
19250 e = MkExpConstant(string);
19252 exp = QBrackets(MkExpOp(bytePtr, '+', e));
19256 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
19258 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
19259 exp->expType = __extension__ ({
19260 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19262 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
19263 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19265 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
19266 }), __ecereInstance2;
19270 yylloc = function->body->loc;
19271 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
19273 struct Context * prevContext = curContext;
19274 struct __ecereNameSpace__ecere__sys__OldList * list;
19276 curContext = function->body->__anon1.compound.context;
19277 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
19278 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
19279 curContext = prevContext;
19281 decl->symbol = (((void *)0));
19282 if(!function->body->__anon1.compound.declarations)
19283 function->body->__anon1.compound.declarations = MkList();
19284 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
19290 thisClass = (((void *)0));
19293 FreeSpecifier(id->_class);
19294 id->_class = (((void *)0));
19295 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19297 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19299 id = GetDeclId(initDecl->declarator);
19300 FreeSpecifier(id->_class);
19301 id->_class = (((void *)0));
19305 topContext = function->body->__anon1.compound.context;
19307 struct FunctionDefinition * oldFunction = curFunction;
19309 curFunction = function;
19311 ProcessStatement(function->body);
19312 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
19314 struct Statement * prevCompound = curCompound;
19315 struct Context * prevContext = curContext;
19316 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
19318 if(!function->body->__anon1.compound.statements)
19319 function->body->__anon1.compound.statements = MkList();
19320 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
19321 curCompound = function->body;
19322 curContext = function->body->__anon1.compound.context;
19323 ProcessStatement(fireWatchers);
19324 curContext = prevContext;
19325 curCompound = prevCompound;
19327 curFunction = oldFunction;
19329 if(function->declarator)
19331 ProcessDeclarator(function->declarator, 1);
19333 topContext = oldTopContext;
19334 thisClass = oldThisClass;
19337 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
19339 struct ClassDef * def;
19340 struct External * external = curExternal;
19341 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
19343 for(def = definitions->first; def; def = def->next)
19347 if(def->__anon1.function->declarator)
19348 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
19350 curExternal = external;
19351 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
19353 else if(def->type == 2)
19355 if(def->__anon1.decl->type == 2)
19357 thisClass = regClass;
19358 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
19359 thisClass = (((void *)0));
19363 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
19366 thisClass = regClass;
19367 ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
19368 thisClass = backThisClass;
19371 else if(def->type == 1 && def->__anon1.defProperties)
19373 struct MemberInit * defProperty;
19374 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);
19376 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19377 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
19379 thisClass = regClass;
19380 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
19381 thisClass = (((void *)0));
19383 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19384 FreeSymbol(thisSymbol);
19386 else if(def->type == 3 && def->__anon1.propertyDef)
19388 struct PropertyDef * prop = def->__anon1.propertyDef;
19390 thisClass = regClass;
19395 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19397 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19399 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
19400 ProcessStatement(prop->setStmt);
19406 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19408 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19410 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
19411 ProcessStatement(prop->getStmt);
19413 if(prop->issetStmt)
19417 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19419 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19421 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
19422 ProcessStatement(prop->issetStmt);
19424 thisClass = (((void *)0));
19426 else if(def->type == 4 && def->__anon1.propertyWatch)
19428 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
19430 thisClass = regClass;
19431 if(propertyWatch->compound)
19433 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);
19435 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19436 curExternal = (((void *)0));
19437 ProcessStatement(propertyWatch->compound);
19439 thisClass = (((void *)0));
19444 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19446 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19448 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19449 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19450 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19451 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19452 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19453 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19454 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19455 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19456 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19457 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19458 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19459 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19460 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19461 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19462 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19463 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19464 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19465 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19466 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19467 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19468 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19469 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19470 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19471 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19472 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19473 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19474 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19475 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19476 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19477 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19478 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19479 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19480 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19481 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19482 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19483 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19484 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19485 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19486 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19487 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19488 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19489 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19490 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19491 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19492 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19493 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19494 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19495 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19496 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19497 __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);
19498 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19499 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19500 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19501 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19502 __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);
19503 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19504 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19505 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19506 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19507 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19508 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19509 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19510 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19511 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19512 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19513 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19514 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19515 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19516 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19517 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19518 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)
19519 __ecereClass_Conversion = class;
19520 __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);
19521 __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);
19522 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19523 __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);
19524 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19525 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19526 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19527 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19528 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19529 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19530 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19531 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19532 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19533 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19534 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19535 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19536 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19537 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19538 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19539 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19540 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19541 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19542 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19543 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19544 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19545 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);