1 /* Code generated from eC source file: pass15.ec */
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
7 #define __runtimePlatform 2
10 typedef long long int64;
11 typedef unsigned long long uint64;
15 #elif defined(__TINYC__)
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
27 typedef long long int64;
28 typedef unsigned long long uint64;
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
34 #define __ENDIAN_PAD(x) (8 - (x))
36 #define __ENDIAN_PAD(x) 0
39 #include <sys/types.h>
42 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366, BOOL = 367, _BOOL = 368, _COMPLEX = 369, _IMAGINARY = 370, RESTRICT = 371, THREAD = 372, WIDE_STRING_LITERAL = 373
45 extern int returnCode;
47 extern unsigned int yydebug;
49 extern unsigned int echoOn;
55 int expression_yyparse();
57 static char * thisNameSpace;
59 unsigned int thisClassParams = 1;
61 unsigned int internalValueCounter;
63 extern unsigned int outputLineNumbers;
65 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isInf;
67 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_signBit;
69 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isNan;
71 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isInf;
73 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_signBit;
75 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isNan;
77 extern int targetBits;
79 extern unsigned int inCompiler;
81 extern unsigned int inPreCompiler;
83 extern unsigned int inDebugger;
85 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
87 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
89 int UnescapeString(char * d, char * s, int len)
94 while(j < len && (ch = s[j]))
145 char * OffsetEscapedString(char * s, int len, int offset)
150 while(j < len && k < offset && (ch = s[j]))
156 return (k == offset) ? s + j : (((void *)0));
159 extern int __ecereVMethodID_class_OnGetString;
161 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
163 extern unsigned int parseError;
165 static int definedExpStackPos;
167 static void * definedExpStack[512];
169 extern const char * sourceFile;
171 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_specConst;
173 extern unsigned int memoryGuard;
175 struct __ecereNameSpace__ecere__sys__OldList
182 } __attribute__ ((gcc_struct));
184 struct __ecereNameSpace__ecere__com__DataValue
199 } __attribute__ ((gcc_struct)) __anon1;
200 } __attribute__ ((gcc_struct));
202 struct __ecereNameSpace__ecere__com__SerialBuffer
204 unsigned char * _buffer;
208 } __attribute__ ((gcc_struct));
210 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
212 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
214 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
216 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
218 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
226 struct TemplateArgument;
240 } __attribute__ ((gcc_struct));
242 extern size_t strlen(const char * );
244 extern int strcmp(const char * , const char * );
246 extern int sprintf(char * , const char * , ...);
248 extern char * strcat(char * , const char * );
250 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
252 extern int isprint(int c);
254 extern char * strcpy(char * , const char * );
256 extern void Compiler_Error(const char * format, ...);
258 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
260 struct __ecereNameSpace__ecere__com__LinkList
265 } __attribute__ ((gcc_struct));
267 extern char * strchr(const char * , int);
269 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
271 extern void * memcpy(void * , const void * , size_t size);
273 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
275 extern void Compiler_Warning(const char * format, ...);
277 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
279 extern long long strtoll(const char * nptr, char * * endptr, int base);
281 extern uint64 strtoull(const char * nptr, char * * endptr, int base);
283 extern int strtol(const char * , char * * , int base);
285 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
287 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
289 extern double strtod(const char * , char * * );
291 extern int strncmp(const char * , const char * , size_t n);
293 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
295 extern char * QMkString(const char * source);
297 extern char * strncpy(char * , const char * , size_t n);
299 extern int printf(const char * , ...);
301 extern char * strstr(const char * , const char * );
303 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
305 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
307 extern int (* __ecereProp_float_Get_signBit)(float this);
309 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
311 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
313 extern int (* __ecereProp_double_Get_signBit)(double this);
315 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
317 extern float (* __ecereMethod_float_inf)(void);
319 extern float (* __ecereMethod_float_nan)(void);
321 extern double (* __ecereMethod_double_inf)(void);
323 extern double (* __ecereMethod_double_nan)(void);
325 int __ecereVMethodID_class_OnGetString;
327 void SetYydebug(unsigned int b)
332 unsigned int GetParseError()
337 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
339 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
341 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
343 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
345 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
347 struct __ecereNameSpace__ecere__com__EnumClassData
349 struct __ecereNameSpace__ecere__sys__OldList values;
351 } __attribute__ ((gcc_struct));
353 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
355 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
357 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
359 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
361 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
363 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
365 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
367 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
371 struct CodePosition start;
372 struct CodePosition end;
373 } __attribute__ ((gcc_struct));
375 void ReadString(char * output, char * string)
377 int len = strlen(string);
379 unsigned int quoted = 0, escaped = 0;
381 for(c = 0; c < len; c++)
441 char * PrintInt(long long result)
445 if(result > (((int)0x7fffffff)))
446 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
448 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
449 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
451 return __ecereNameSpace__ecere__sys__CopyString(temp);
454 char * PrintUInt(uint64 result)
458 if(result > (0xffffffff))
459 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
460 else if(result > (((int)0x7fffffff)))
461 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
463 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
464 return __ecereNameSpace__ecere__sys__CopyString(temp);
467 char * PrintInt64(long long result)
471 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
472 sprintf(temp, ((__runtimePlatform == 1) ? "%I64dLL" : "%lldLL"), result);
474 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
475 return __ecereNameSpace__ecere__sys__CopyString(temp);
478 char * PrintUInt64(uint64 result)
482 if(result > (0xffffffff))
483 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
484 else if(result > (((int)0x7fffffff)))
485 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
487 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
488 return __ecereNameSpace__ecere__sys__CopyString(temp);
491 char * PrintHexUInt(uint64 result)
495 if(result > (0xffffffff))
496 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
498 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
499 if(result > (0xffffffff))
501 return __ecereNameSpace__ecere__sys__CopyString(temp);
504 char * PrintHexUInt64(uint64 result)
508 if(result > (0xffffffff))
509 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
511 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
512 return __ecereNameSpace__ecere__sys__CopyString(temp);
515 char * PrintShort(short result)
519 sprintf(temp, "%d", (unsigned short)result);
520 return __ecereNameSpace__ecere__sys__CopyString(temp);
523 char * PrintUShort(unsigned short result)
527 if(result > (unsigned short)32767)
528 sprintf(temp, "0x%X", (int)result);
530 sprintf(temp, "%d", (int)result);
531 return __ecereNameSpace__ecere__sys__CopyString(temp);
534 char * PrintUChar(unsigned char result)
538 sprintf(temp, "0x%X", result);
539 return __ecereNameSpace__ecere__sys__CopyString(temp);
542 char * PrintChar(char result)
546 if(result > (char)0 && isprint(result))
547 sprintf(temp, "'%c'", result);
548 else if(result < (char)0)
549 sprintf(temp, "%d", (int)result);
551 sprintf(temp, "0x%X", (unsigned char)result);
552 return __ecereNameSpace__ecere__sys__CopyString(temp);
555 char * PrintFloat(float result)
559 if(__ecereProp_float_Get_isInf(result))
561 if(__ecereProp_float_Get_signBit(result))
562 strcpy(temp, "-inf");
566 else if(__ecereProp_float_Get_isNan(result))
568 if(__ecereProp_float_Get_signBit(result))
569 strcpy(temp, "-nan");
574 sprintf(temp, "%.16ff", result);
575 return __ecereNameSpace__ecere__sys__CopyString(temp);
578 char * PrintDouble(double result)
582 if(__ecereProp_double_Get_isInf(result))
584 if(__ecereProp_double_Get_signBit(result))
585 strcpy(temp, "-inf");
589 else if(__ecereProp_double_Get_isNan(result))
591 if(__ecereProp_double_Get_signBit(result))
592 strcpy(temp, "-nan");
597 sprintf(temp, "%.16f", result);
598 return __ecereNameSpace__ecere__sys__CopyString(temp);
601 extern struct Location yylloc;
610 struct Attrib * attr;
611 } __attribute__ ((gcc_struct)) __anon1;
612 } __attribute__ ((gcc_struct));
614 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
618 extern struct Expression * parsedExpression;
620 extern struct Expression * QMkExpId(const char * id);
622 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
624 void ComputeExpression(struct Expression * exp);
626 extern struct Expression * MkExpConstant(const char * string);
628 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
630 extern void FreeExpression(struct Expression * exp);
632 extern void FreeExpContents(struct Expression * exp);
634 extern struct Expression * CopyExpression(struct Expression * exp);
636 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
638 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
640 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
642 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
644 extern struct Expression * MoveExpContents(struct Expression * exp);
646 extern struct Expression * QBrackets(struct Expression * exp);
648 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
652 static struct Statement * curCompound;
654 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
656 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
658 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
660 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
662 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
664 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
668 struct External * curExternal, * afterExternal;
670 extern void FreeExternal(struct External * external);
674 static struct Type * curSwitchType;
676 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
678 extern void FreeType(struct Type * type);
680 extern struct Type * MkClassType(const char * name);
682 extern void CopyTypeInto(struct Type * type, struct Type * src);
684 struct __ecereNameSpace__ecere__com__Class;
686 struct __ecereNameSpace__ecere__com__Instance
689 struct __ecereNameSpace__ecere__com__Class * _class;
691 } __attribute__ ((gcc_struct));
693 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
695 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
697 static struct __ecereNameSpace__ecere__com__Class * currentClass;
699 struct __ecereNameSpace__ecere__com__Class * thisClass;
701 struct __ecereNameSpace__ecere__com__Class * containerClass;
703 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
705 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
707 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
709 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
711 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
713 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
715 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
717 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
719 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
721 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
723 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
725 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
730 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
737 extern struct Context * curContext;
739 extern struct Context * topContext;
741 extern struct Context * PushContext(void);
743 extern void PopContext(struct Context * ctx);
745 extern void FreeContext(struct Context * context);
747 extern struct Context * globalContext;
751 extern struct ModuleImport * mainModule;
755 struct ModuleImport * prev;
756 struct ModuleImport * next;
758 struct __ecereNameSpace__ecere__sys__OldList classes;
759 struct __ecereNameSpace__ecere__sys__OldList functions;
762 } __attribute__ ((gcc_struct));
764 struct __ecereNameSpace__ecere__com__NameSpace;
766 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
768 struct FunctionDefinition;
770 static struct FunctionDefinition * curFunction;
772 struct __ecereNameSpace__ecere__sys__BTNode;
774 struct __ecereNameSpace__ecere__sys__BTNode
777 struct __ecereNameSpace__ecere__sys__BTNode * parent;
778 struct __ecereNameSpace__ecere__sys__BTNode * left;
779 struct __ecereNameSpace__ecere__sys__BTNode * right;
781 } __attribute__ ((gcc_struct));
783 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
785 struct __ecereNameSpace__ecere__com__Property;
787 struct __ecereNameSpace__ecere__com__Property
789 struct __ecereNameSpace__ecere__com__Property * prev;
790 struct __ecereNameSpace__ecere__com__Property * next;
792 unsigned int isProperty;
795 struct __ecereNameSpace__ecere__com__Class * _class;
796 const char * dataTypeString;
797 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
798 struct Type * dataType;
799 void (* Set)(void * , int);
800 int (* Get)(void * );
801 unsigned int (* IsSet)(void * );
805 unsigned int conversion;
806 unsigned int watcherOffset;
807 const char * category;
808 unsigned int compiled;
809 unsigned int selfWatchable;
810 unsigned int isWatchable;
811 } __attribute__ ((gcc_struct));
813 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
815 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);
817 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
819 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
823 extern void FreeIdentifier(struct Identifier * id);
825 extern struct Identifier * MkIdentifier(const char * string);
827 extern struct Expression * MkExpIdentifier(struct Identifier * id);
829 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
831 extern struct Identifier * CopyIdentifier(struct Identifier * id);
833 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
835 struct __ecereNameSpace__ecere__sys__OldLink;
837 struct __ecereNameSpace__ecere__sys__OldLink
839 struct __ecereNameSpace__ecere__sys__OldLink * prev;
840 struct __ecereNameSpace__ecere__sys__OldLink * next;
842 } __attribute__ ((gcc_struct));
846 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
848 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
852 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
854 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
856 extern struct Specifier * MkSpecifier(int specifier);
858 extern struct Specifier * MkSpecifierName(const char * name);
860 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
862 extern void FreeSpecifier(struct Specifier * spec);
864 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
868 struct Statement * prev;
869 struct Statement * next;
874 struct __ecereNameSpace__ecere__sys__OldList * expressions;
877 struct Identifier * id;
878 struct Statement * stmt;
879 } __attribute__ ((gcc_struct)) labeled;
882 struct Expression * exp;
883 struct Statement * stmt;
884 } __attribute__ ((gcc_struct)) caseStmt;
887 struct __ecereNameSpace__ecere__sys__OldList * declarations;
888 struct __ecereNameSpace__ecere__sys__OldList * statements;
889 struct Context * context;
890 unsigned int isSwitch;
891 } __attribute__ ((gcc_struct)) compound;
894 struct __ecereNameSpace__ecere__sys__OldList * exp;
895 struct Statement * stmt;
896 struct Statement * elseStmt;
897 } __attribute__ ((gcc_struct)) ifStmt;
900 struct __ecereNameSpace__ecere__sys__OldList * exp;
901 struct Statement * stmt;
902 } __attribute__ ((gcc_struct)) switchStmt;
905 struct __ecereNameSpace__ecere__sys__OldList * exp;
906 struct Statement * stmt;
907 } __attribute__ ((gcc_struct)) whileStmt;
910 struct __ecereNameSpace__ecere__sys__OldList * exp;
911 struct Statement * stmt;
912 } __attribute__ ((gcc_struct)) doWhile;
915 struct Statement * init;
916 struct Statement * check;
917 struct __ecereNameSpace__ecere__sys__OldList * increment;
918 struct Statement * stmt;
919 } __attribute__ ((gcc_struct)) forStmt;
922 struct Identifier * id;
923 } __attribute__ ((gcc_struct)) gotoStmt;
926 struct Specifier * spec;
928 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
929 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
930 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
931 } __attribute__ ((gcc_struct)) asmStmt;
934 struct Expression * watcher;
935 struct Expression * object;
936 struct __ecereNameSpace__ecere__sys__OldList * watches;
937 } __attribute__ ((gcc_struct)) _watch;
940 struct Identifier * id;
941 struct __ecereNameSpace__ecere__sys__OldList * exp;
942 struct __ecereNameSpace__ecere__sys__OldList * filter;
943 struct Statement * stmt;
944 } __attribute__ ((gcc_struct)) forEachStmt;
945 struct Declaration * decl;
946 } __attribute__ ((gcc_struct)) __anon1;
947 } __attribute__ ((gcc_struct));
949 extern struct Specifier * CopySpecifier(struct Specifier * spec);
951 extern struct Expression * MkExpClassSize(struct Specifier * _class);
957 struct Identifier * prev;
958 struct Identifier * next;
960 struct Symbol * classSym;
961 struct Specifier * _class;
963 struct Identifier * badID;
964 } __attribute__ ((gcc_struct));
966 extern struct Symbol * FindStruct(struct Context * ctx, const char * name);
968 extern struct Symbol * FindClass(const char * name);
970 extern void DeclareClass(struct External * neededFor, struct Symbol * classSym, const char * className);
972 extern struct Symbol * FindType(struct Context * ctx, const char * name);
974 extern void FreeSymbol(struct Symbol * symbol);
978 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
980 extern void FreeClassDef(struct ClassDef * def);
984 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
986 struct TemplateDatatype
988 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
989 struct Declarator * decl;
990 } __attribute__ ((gcc_struct));
992 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
994 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
996 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
998 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
1000 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
1004 struct Declarator * prev;
1005 struct Declarator * next;
1006 struct Location loc;
1008 struct Symbol * symbol;
1009 struct Declarator * declarator;
1012 struct Identifier * identifier;
1015 struct Expression * exp;
1016 struct Expression * posExp;
1017 struct Attrib * attrib;
1018 } __attribute__ ((gcc_struct)) structDecl;
1021 struct Expression * exp;
1022 struct Specifier * enumClass;
1023 } __attribute__ ((gcc_struct)) array;
1026 struct __ecereNameSpace__ecere__sys__OldList * parameters;
1027 } __attribute__ ((gcc_struct)) function;
1030 struct Pointer * pointer;
1031 } __attribute__ ((gcc_struct)) pointer;
1034 struct ExtDecl * extended;
1035 } __attribute__ ((gcc_struct)) extended;
1036 } __attribute__ ((gcc_struct)) __anon1;
1037 } __attribute__ ((gcc_struct));
1039 extern struct Identifier * GetDeclId(struct Declarator * decl);
1041 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
1043 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1045 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
1047 extern void FreeDeclarator(struct Declarator * decl);
1049 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
1051 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
1053 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
1055 struct FunctionDefinition
1057 struct FunctionDefinition * prev;
1058 struct FunctionDefinition * next;
1059 struct Location loc;
1060 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1061 struct Declarator * declarator;
1062 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1063 struct Statement * body;
1064 struct __ecereNameSpace__ecere__com__Class * _class;
1065 struct __ecereNameSpace__ecere__sys__OldList attached;
1068 struct Symbol * propSet;
1070 unsigned int propertyNoThis;
1071 } __attribute__ ((gcc_struct));
1073 extern struct Declarator * QMkPtrDecl(const char * id);
1075 struct ClassFunction;
1077 struct ClassFunction
1079 struct ClassFunction * prev;
1080 struct ClassFunction * next;
1081 struct Location loc;
1082 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1083 struct Declarator * declarator;
1084 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1085 struct Statement * body;
1086 struct __ecereNameSpace__ecere__com__Class * _class;
1087 struct __ecereNameSpace__ecere__sys__OldList attached;
1090 struct Symbol * propSet;
1091 unsigned int isVirtual;
1092 unsigned int isConstructor;
1093 unsigned int isDestructor;
1094 unsigned int dontMangle;
1097 } __attribute__ ((gcc_struct));
1099 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);
1101 extern void FreeClassFunction(struct ClassFunction * func);
1103 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
1105 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
1109 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1111 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1115 struct TypeName * prev;
1116 struct TypeName * next;
1117 struct Location loc;
1118 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
1119 struct Declarator * declarator;
1120 int classObjectType;
1121 struct Expression * bitCount;
1122 } __attribute__ ((gcc_struct));
1124 extern void FreeTypeName(struct TypeName * typeName);
1126 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
1128 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
1130 extern unsigned int IsVoidPtrCast(struct TypeName * typeName);
1132 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
1134 struct __ecereNameSpace__ecere__com__BTNamedLink;
1136 struct __ecereNameSpace__ecere__com__BTNamedLink
1139 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
1140 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
1141 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
1144 } __attribute__ ((gcc_struct));
1146 struct __ecereNameSpace__ecere__sys__NamedLink64;
1148 struct __ecereNameSpace__ecere__sys__NamedLink64
1150 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1151 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1154 } __attribute__ ((gcc_struct));
1156 struct Instantiation;
1160 struct Declaration * prev;
1161 struct Declaration * next;
1162 struct Location loc;
1168 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1169 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1170 } __attribute__ ((gcc_struct)) __anon1;
1171 struct Instantiation * inst;
1174 struct Identifier * id;
1175 struct Expression * exp;
1176 } __attribute__ ((gcc_struct)) __anon2;
1177 } __attribute__ ((gcc_struct)) __anon1;
1178 struct Specifier * extStorage;
1179 struct Symbol * symbol;
1181 } __attribute__ ((gcc_struct));
1183 struct Instantiation
1185 struct Instantiation * prev;
1186 struct Instantiation * next;
1187 struct Location loc;
1188 struct Specifier * _class;
1189 struct Expression * exp;
1190 struct __ecereNameSpace__ecere__sys__OldList * members;
1191 struct Symbol * symbol;
1192 unsigned int fullSet;
1193 unsigned int isConstant;
1194 unsigned char * data;
1195 struct Location nameLoc;
1196 struct Location insideLoc;
1198 } __attribute__ ((gcc_struct));
1200 extern void FreeInstance(struct Instantiation * inst);
1202 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
1204 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
1206 struct InitDeclarator;
1208 extern void FreeInitDeclarator(struct InitDeclarator * decl);
1210 struct PropertyWatch;
1212 struct PropertyWatch
1214 struct PropertyWatch * prev;
1215 struct PropertyWatch * next;
1216 struct Location loc;
1217 struct Statement * compound;
1218 struct __ecereNameSpace__ecere__sys__OldList * properties;
1219 unsigned int deleteWatch;
1220 } __attribute__ ((gcc_struct));
1222 extern void FreePropertyWatch(struct PropertyWatch * watcher);
1224 struct PropertyImport;
1226 struct PropertyImport
1228 struct PropertyImport * prev;
1229 struct PropertyImport * next;
1231 unsigned int isVirtual;
1232 unsigned int hasSet;
1233 unsigned int hasGet;
1234 } __attribute__ ((gcc_struct));
1236 struct MethodImport;
1240 struct MethodImport * prev;
1241 struct MethodImport * next;
1243 unsigned int isVirtual;
1244 } __attribute__ ((gcc_struct));
1246 struct FunctionImport;
1248 struct FunctionImport
1250 struct FunctionImport * prev;
1251 struct FunctionImport * next;
1253 } __attribute__ ((gcc_struct));
1259 struct ClassImport * prev;
1260 struct ClassImport * next;
1262 struct __ecereNameSpace__ecere__sys__OldList methods;
1263 struct __ecereNameSpace__ecere__sys__OldList properties;
1264 unsigned int itself;
1266 } __attribute__ ((gcc_struct));
1272 struct Expression * prev;
1273 struct Expression * next;
1274 struct Location loc;
1281 struct Identifier * identifier;
1282 } __attribute__ ((gcc_struct)) __anon1;
1283 struct Statement * compound;
1284 struct Instantiation * instance;
1288 unsigned int intlString;
1289 unsigned int wideString;
1290 } __attribute__ ((gcc_struct)) __anon2;
1291 struct __ecereNameSpace__ecere__sys__OldList * list;
1294 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1295 struct Declarator * decl;
1296 } __attribute__ ((gcc_struct)) _classExp;
1299 struct Identifier * id;
1300 } __attribute__ ((gcc_struct)) classData;
1303 struct Expression * exp;
1304 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1305 struct Location argLoc;
1306 } __attribute__ ((gcc_struct)) call;
1309 struct Expression * exp;
1310 struct __ecereNameSpace__ecere__sys__OldList * index;
1311 } __attribute__ ((gcc_struct)) index;
1314 struct Expression * exp;
1315 struct Identifier * member;
1317 unsigned int thisPtr;
1318 } __attribute__ ((gcc_struct)) member;
1322 struct Expression * exp1;
1323 struct Expression * exp2;
1324 } __attribute__ ((gcc_struct)) op;
1325 struct TypeName * typeName;
1326 struct Specifier * _class;
1329 struct TypeName * typeName;
1330 struct Expression * exp;
1331 } __attribute__ ((gcc_struct)) cast;
1334 struct Expression * cond;
1335 struct __ecereNameSpace__ecere__sys__OldList * exp;
1336 struct Expression * elseExp;
1337 } __attribute__ ((gcc_struct)) cond;
1340 struct TypeName * typeName;
1341 struct Expression * size;
1342 } __attribute__ ((gcc_struct)) _new;
1345 struct TypeName * typeName;
1346 struct Expression * size;
1347 struct Expression * exp;
1348 } __attribute__ ((gcc_struct)) _renew;
1352 struct Identifier * id;
1353 } __attribute__ ((gcc_struct)) db;
1356 struct Expression * ds;
1357 struct Expression * name;
1358 } __attribute__ ((gcc_struct)) dbopen;
1361 struct TypeName * typeName;
1362 struct Initializer * initializer;
1363 } __attribute__ ((gcc_struct)) initializer;
1366 struct Expression * exp;
1367 struct TypeName * typeName;
1368 } __attribute__ ((gcc_struct)) vaArg;
1369 } __attribute__ ((gcc_struct)) __anon1;
1370 unsigned int debugValue;
1371 struct __ecereNameSpace__ecere__com__DataValue val;
1373 unsigned int hasAddress;
1374 struct Type * expType;
1375 struct Type * destType;
1378 unsigned int byReference;
1379 unsigned int isConstant;
1380 unsigned int addedThis;
1381 unsigned int needCast;
1382 unsigned int thisPtr;
1383 unsigned int opDestType;
1384 unsigned int needTemplateCast;
1385 } __attribute__ ((gcc_struct));
1387 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
1391 struct Initializer * prev;
1392 struct Initializer * next;
1393 struct Location loc;
1397 struct Expression * exp;
1398 struct __ecereNameSpace__ecere__sys__OldList * list;
1399 } __attribute__ ((gcc_struct)) __anon1;
1400 unsigned int isConstant;
1401 struct Identifier * id;
1402 } __attribute__ ((gcc_struct));
1404 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
1406 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
1408 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
1410 struct InitDeclarator
1412 struct InitDeclarator * prev;
1413 struct InitDeclarator * next;
1414 struct Location loc;
1415 struct Declarator * declarator;
1416 struct Initializer * initializer;
1417 } __attribute__ ((gcc_struct));
1419 void ApplyLocation(struct Expression * exp, struct Location * loc)
1425 if(exp->__anon1.op.exp1)
1426 ApplyLocation(exp->__anon1.op.exp1, loc);
1427 if(exp->__anon1.op.exp2)
1428 ApplyLocation(exp->__anon1.op.exp2, loc);
1431 if(exp->__anon1.list)
1433 struct Expression * e;
1435 for(e = (*exp->__anon1.list).first; e; e = e->next)
1436 ApplyLocation(e, loc);
1440 if(exp->__anon1.index.index)
1442 struct Expression * e;
1444 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
1445 ApplyLocation(e, loc);
1447 if(exp->__anon1.index.exp)
1448 ApplyLocation(exp->__anon1.index.exp, loc);
1451 if(exp->__anon1.call.arguments)
1453 struct Expression * arg;
1455 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
1456 ApplyLocation(arg, loc);
1458 if(exp->__anon1.call.exp)
1459 ApplyLocation(exp->__anon1.call.exp, loc);
1463 if(exp->__anon1.member.exp)
1464 ApplyLocation(exp->__anon1.member.exp, loc);
1467 if(exp->__anon1.cast.exp)
1468 ApplyLocation(exp->__anon1.cast.exp, loc);
1471 if(exp->__anon1.cond.exp)
1473 struct Expression * e;
1475 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
1476 ApplyLocation(e, loc);
1478 if(exp->__anon1.cond.cond)
1479 ApplyLocation(exp->__anon1.cond.cond, loc);
1480 if(exp->__anon1.cond.elseExp)
1481 ApplyLocation(exp->__anon1.cond.elseExp, loc);
1484 if(exp->__anon1.vaArg.exp)
1485 ApplyLocation(exp->__anon1.vaArg.exp, loc);
1492 void __ecereMethod_Expression_Clear();
1498 struct MembersInit * prev;
1499 struct MembersInit * next;
1500 struct Location loc;
1504 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1505 struct ClassFunction * function;
1506 } __attribute__ ((gcc_struct)) __anon1;
1507 } __attribute__ ((gcc_struct));
1509 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
1515 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1516 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1517 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1518 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1519 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1520 unsigned int (* Neg)(struct Expression *, struct Operand *);
1521 unsigned int (* Inc)(struct Expression *, struct Operand *);
1522 unsigned int (* Dec)(struct Expression *, struct Operand *);
1523 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1524 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1525 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1526 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1527 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1528 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1529 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1530 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1531 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1532 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1533 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1534 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1535 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1536 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1537 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1538 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1539 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1540 unsigned int (* Not)(struct Expression *, struct Operand *);
1541 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1542 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1543 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1544 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1545 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1546 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1547 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1548 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1549 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1550 } __attribute__ ((gcc_struct));
1556 unsigned int ptrSize;
1569 } __attribute__ ((gcc_struct)) __anon1;
1571 } __attribute__ ((gcc_struct));
1573 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl);
1575 struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference)
1577 return _DeclareStruct(neededBy, name, skipNoHead, needDereference, 0);
1580 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl);
1582 void DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1584 _DeclareType(neededFor, type, needDereference, forFunctionDef, 0);
1587 void DeclareTypeForwardDeclare(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef)
1589 _DeclareType(neededFor, type, needDereference, forFunctionDef, 1);
1592 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst);
1594 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1596 _PrintType(type, string, printName, fullName, 1);
1599 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
1601 _PrintType(type, string, printName, fullName, 0);
1604 struct __ecereNameSpace__ecere__com__Method;
1606 struct __ecereNameSpace__ecere__com__Method
1609 struct __ecereNameSpace__ecere__com__Method * parent;
1610 struct __ecereNameSpace__ecere__com__Method * left;
1611 struct __ecereNameSpace__ecere__com__Method * right;
1616 struct __ecereNameSpace__ecere__com__Class * _class;
1618 const char * dataTypeString;
1619 struct Type * dataType;
1621 } __attribute__ ((gcc_struct));
1626 struct Symbol * parent;
1627 struct Symbol * left;
1628 struct Symbol * right;
1633 struct __ecereNameSpace__ecere__com__Method * method;
1634 struct __ecereNameSpace__ecere__com__Property * _property;
1635 struct __ecereNameSpace__ecere__com__Class * registered;
1636 } __attribute__ ((gcc_struct)) __anon1;
1637 unsigned int notYetDeclared;
1642 struct External * pointerExternal;
1643 struct External * structExternal;
1644 } __attribute__ ((gcc_struct)) __anon1;
1647 struct External * externalGet;
1648 struct External * externalSet;
1649 struct External * externalPtr;
1650 struct External * externalIsSet;
1651 } __attribute__ ((gcc_struct)) __anon2;
1654 struct External * methodExternal;
1655 struct External * methodCodeExternal;
1656 } __attribute__ ((gcc_struct)) __anon3;
1657 } __attribute__ ((gcc_struct)) __anon2;
1658 unsigned int imported;
1659 unsigned int declaredStructSym;
1660 struct __ecereNameSpace__ecere__com__Class * _class;
1661 unsigned int declaredStruct;
1662 unsigned int needConstructor;
1663 unsigned int needDestructor;
1664 char * constructorName;
1667 char * destructorName;
1668 struct ModuleImport * module;
1669 struct ClassImport * _import;
1670 struct Location nameLoc;
1671 unsigned int isParam;
1672 unsigned int isRemote;
1673 unsigned int isStruct;
1674 unsigned int fireWatchersDone;
1676 unsigned int classData;
1677 unsigned int isStatic;
1679 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
1680 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1681 struct Context * ctx;
1683 struct Expression * propCategory;
1684 unsigned int mustRegister;
1685 } __attribute__ ((gcc_struct));
1687 struct __ecereNameSpace__ecere__com__ClassProperty;
1689 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1691 struct __ecereNameSpace__ecere__com__ClassProperty
1694 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1695 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1696 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1698 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1699 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1700 const char * dataTypeString;
1701 struct Type * dataType;
1702 unsigned int constant;
1703 } __attribute__ ((gcc_struct));
1705 struct __ecereNameSpace__ecere__com__BitMember;
1707 struct __ecereNameSpace__ecere__com__BitMember
1709 struct __ecereNameSpace__ecere__com__BitMember * prev;
1710 struct __ecereNameSpace__ecere__com__BitMember * next;
1712 unsigned int isProperty;
1715 struct __ecereNameSpace__ecere__com__Class * _class;
1716 const char * dataTypeString;
1717 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1718 struct Type * dataType;
1723 } __attribute__ ((gcc_struct));
1725 struct __ecereNameSpace__ecere__com__DataMember;
1727 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1733 const char * dataTypeString;
1734 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1735 } __attribute__ ((gcc_struct)) __anon1;
1736 struct __ecereNameSpace__ecere__com__DataValue expression;
1739 const char * memberString;
1742 struct __ecereNameSpace__ecere__com__DataMember * member;
1743 struct __ecereNameSpace__ecere__com__Property * prop;
1744 struct __ecereNameSpace__ecere__com__Method * method;
1745 } __attribute__ ((gcc_struct)) __anon1;
1746 } __attribute__ ((gcc_struct)) __anon2;
1747 } __attribute__ ((gcc_struct)) __anon1;
1748 } __attribute__ ((gcc_struct));
1750 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);
1752 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);
1754 struct TemplateParameter;
1756 struct TemplateParameter
1758 struct TemplateParameter * prev;
1759 struct TemplateParameter * next;
1760 struct Location loc;
1762 struct Identifier * identifier;
1765 struct TemplateDatatype * dataType;
1767 } __attribute__ ((gcc_struct)) __anon1;
1768 struct TemplateArgument * defaultArgument;
1769 const char * dataTypeString;
1770 struct Type * baseType;
1771 } __attribute__ ((gcc_struct));
1780 struct Symbol * _class;
1783 struct __ecereNameSpace__ecere__sys__OldList members;
1785 } __attribute__ ((gcc_struct)) __anon1;
1788 struct Type * returnType;
1789 struct __ecereNameSpace__ecere__sys__OldList params;
1790 struct Symbol * thisClass;
1791 unsigned int staticMethod;
1792 struct TemplateParameter * thisClassTemplate;
1793 } __attribute__ ((gcc_struct)) __anon2;
1796 struct __ecereNameSpace__ecere__com__Method * method;
1797 struct __ecereNameSpace__ecere__com__Class * methodClass;
1798 struct __ecereNameSpace__ecere__com__Class * usedClass;
1799 } __attribute__ ((gcc_struct)) __anon3;
1802 struct Type * arrayType;
1804 struct Expression * arraySizeExp;
1805 unsigned int freeExp;
1806 struct Symbol * enumClass;
1807 } __attribute__ ((gcc_struct)) __anon4;
1809 struct TemplateParameter * templateParameter;
1810 } __attribute__ ((gcc_struct)) __anon1;
1815 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1816 int classObjectType;
1818 unsigned int offset;
1821 unsigned int isSigned : 1;
1822 unsigned int constant : 1;
1823 unsigned int truth : 1;
1824 unsigned int byReference : 1;
1825 unsigned int extraParam : 1;
1826 unsigned int directClassAccess : 1;
1827 unsigned int computing : 1;
1828 unsigned int keepCast : 1;
1829 unsigned int passAsTemplate : 1;
1830 unsigned int dllExport : 1;
1831 unsigned int attrStdcall : 1;
1832 unsigned int declaredWithStruct : 1;
1833 unsigned int typedByReference : 1;
1834 unsigned int casted : 1;
1835 unsigned int pointerAlignment : 1;
1836 unsigned int isLong : 1;
1837 } __attribute__ ((gcc_struct));
1841 struct Specifier * prev;
1842 struct Specifier * next;
1843 struct Location loc;
1850 struct ExtDecl * extDecl;
1852 struct Symbol * symbol;
1853 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1854 struct Specifier * nsSpec;
1855 } __attribute__ ((gcc_struct)) __anon1;
1858 struct Identifier * id;
1859 struct __ecereNameSpace__ecere__sys__OldList * list;
1860 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1861 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1862 unsigned int addNameSpace;
1863 struct Context * ctx;
1864 struct ExtDecl * extDeclStruct;
1865 } __attribute__ ((gcc_struct)) __anon2;
1866 struct Expression * expression;
1867 struct Specifier * _class;
1868 struct TemplateParameter * templateParameter;
1869 } __attribute__ ((gcc_struct)) __anon1;
1870 } __attribute__ ((gcc_struct));
1872 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
1874 struct TemplatedType
1877 struct __ecereNameSpace__ecere__sys__BTNode * parent;
1878 struct __ecereNameSpace__ecere__sys__BTNode * left;
1879 struct __ecereNameSpace__ecere__sys__BTNode * right;
1881 struct TemplateParameter * param;
1882 } __attribute__ ((gcc_struct));
1884 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1886 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1888 if(!param->baseType)
1890 if(param->dataTypeString)
1891 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1893 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1895 return param->baseType;
1897 return (((void *)0));
1900 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1902 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1904 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1908 if(type1->kind == type2->kind && type1->isLong == type2->isLong)
1919 if(type1->passAsTemplate && !type2->passAsTemplate)
1921 return type1->isSigned != type2->isSigned;
1923 return type1->__anon1._class != type2->__anon1._class;
1925 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1933 unsigned int GetOpInt(struct Operand * op2, int * value2)
1935 if(op2->kind == 3 && op2->type->isSigned)
1936 *value2 = op2->__anon1.i;
1937 else if(op2->kind == 3)
1938 *value2 = (int)op2->__anon1.ui;
1939 else if(op2->kind == 4 && op2->type->isSigned)
1940 *value2 = (int)op2->__anon1.i64;
1941 else if(op2->kind == 4)
1942 *value2 = (int)op2->__anon1.ui64;
1943 else if(op2->kind == 23 && op2->type->isSigned)
1944 *value2 = (int)op2->__anon1.i64;
1945 else if(op2->kind == 23)
1946 *value2 = (int)op2->__anon1.ui64;
1947 else if(op2->kind == 22 && op2->type->isSigned)
1948 *value2 = (int)op2->__anon1.i64;
1949 else if(op2->kind == 22)
1950 *value2 = (int)op2->__anon1.ui64;
1951 else if(op2->kind == 2 && op2->type->isSigned)
1952 *value2 = (int)op2->__anon1.s;
1953 else if(op2->kind == 2)
1954 *value2 = (int)op2->__anon1.us;
1955 else if(op2->kind == 1 && op2->type->isSigned)
1956 *value2 = (int)op2->__anon1.c;
1957 else if(op2->kind == 24 || op2->kind == 1)
1958 *value2 = (int)op2->__anon1.uc;
1959 else if(op2->kind == 6)
1960 *value2 = (int)op2->__anon1.f;
1961 else if(op2->kind == 7)
1962 *value2 = (int)op2->__anon1.d;
1963 else if(op2->kind == 13)
1964 *value2 = (int)op2->__anon1.ui64;
1970 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1972 if(op2->kind == 3 && op2->type->isSigned)
1973 *value2 = (unsigned int)op2->__anon1.i;
1974 else if(op2->kind == 3)
1975 *value2 = op2->__anon1.ui;
1976 else if(op2->kind == 4 && op2->type->isSigned)
1977 *value2 = (unsigned int)op2->__anon1.i64;
1978 else if(op2->kind == 4)
1979 *value2 = (unsigned int)op2->__anon1.ui64;
1980 else if(op2->kind == 23 && op2->type->isSigned)
1981 *value2 = (unsigned int)op2->__anon1.i64;
1982 else if(op2->kind == 23)
1983 *value2 = (unsigned int)op2->__anon1.ui64;
1984 else if(op2->kind == 22 && op2->type->isSigned)
1985 *value2 = (unsigned int)op2->__anon1.i64;
1986 else if(op2->kind == 22)
1987 *value2 = (unsigned int)op2->__anon1.ui64;
1988 else if(op2->kind == 2 && op2->type->isSigned)
1989 *value2 = (unsigned int)op2->__anon1.s;
1990 else if(op2->kind == 2)
1991 *value2 = (unsigned int)op2->__anon1.us;
1992 else if(op2->kind == 1 && op2->type->isSigned)
1993 *value2 = (unsigned int)op2->__anon1.c;
1994 else if(op2->kind == 24 || op2->kind == 1)
1995 *value2 = (unsigned int)op2->__anon1.uc;
1996 else if(op2->kind == 6)
1997 *value2 = (unsigned int)op2->__anon1.f;
1998 else if(op2->kind == 7)
1999 *value2 = (unsigned int)op2->__anon1.d;
2000 else if(op2->kind == 13)
2001 *value2 = (unsigned int)op2->__anon1.ui64;
2007 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
2009 if(op2->kind == 3 && op2->type->isSigned)
2010 *value2 = (long long)op2->__anon1.i;
2011 else if(op2->kind == 3)
2012 *value2 = (long long)op2->__anon1.ui;
2013 else if(op2->kind == 4 && op2->type->isSigned)
2014 *value2 = op2->__anon1.i64;
2015 else if(op2->kind == 4)
2016 *value2 = (long long)op2->__anon1.ui64;
2017 else if(op2->kind == 23 && op2->type->isSigned)
2018 *value2 = op2->__anon1.i64;
2019 else if(op2->kind == 23)
2020 *value2 = (long long)op2->__anon1.ui64;
2021 else if(op2->kind == 22 && op2->type->isSigned)
2022 *value2 = op2->__anon1.i64;
2023 else if(op2->kind == 22)
2024 *value2 = (long long)op2->__anon1.ui64;
2025 else if(op2->kind == 2 && op2->type->isSigned)
2026 *value2 = (long long)op2->__anon1.s;
2027 else if(op2->kind == 2)
2028 *value2 = (long long)op2->__anon1.us;
2029 else if(op2->kind == 1 && op2->type->isSigned)
2030 *value2 = (long long)op2->__anon1.c;
2031 else if(op2->kind == 24 || op2->kind == 1)
2032 *value2 = (long long)op2->__anon1.uc;
2033 else if(op2->kind == 6)
2034 *value2 = (long long)op2->__anon1.f;
2035 else if(op2->kind == 7)
2036 *value2 = (long long)op2->__anon1.d;
2037 else if(op2->kind == 13)
2038 *value2 = (long long)op2->__anon1.ui64;
2044 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
2046 if(op2->kind == 3 && op2->type->isSigned)
2047 *value2 = (uint64)op2->__anon1.i;
2048 else if(op2->kind == 3)
2049 *value2 = (uint64)op2->__anon1.ui;
2050 else if(op2->kind == 4 && op2->type->isSigned)
2051 *value2 = (uint64)op2->__anon1.i64;
2052 else if(op2->kind == 4)
2053 *value2 = op2->__anon1.ui64;
2054 else if(op2->kind == 23 && op2->type->isSigned)
2055 *value2 = (uint64)op2->__anon1.i64;
2056 else if(op2->kind == 23)
2057 *value2 = op2->__anon1.ui64;
2058 else if(op2->kind == 22 && op2->type->isSigned)
2059 *value2 = (uint64)op2->__anon1.i64;
2060 else if(op2->kind == 22)
2061 *value2 = op2->__anon1.ui64;
2062 else if(op2->kind == 2 && op2->type->isSigned)
2063 *value2 = (uint64)op2->__anon1.s;
2064 else if(op2->kind == 2)
2065 *value2 = (uint64)op2->__anon1.us;
2066 else if(op2->kind == 1 && op2->type->isSigned)
2067 *value2 = (uint64)op2->__anon1.c;
2068 else if(op2->kind == 24 || op2->kind == 1)
2069 *value2 = (uint64)op2->__anon1.uc;
2070 else if(op2->kind == 6)
2071 *value2 = (uint64)op2->__anon1.f;
2072 else if(op2->kind == 7)
2073 *value2 = (uint64)op2->__anon1.d;
2074 else if(op2->kind == 13)
2075 *value2 = op2->__anon1.ui64;
2081 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
2083 if(op2->kind == 3 && op2->type->isSigned)
2084 *value2 = (intptr_t)op2->__anon1.i;
2085 else if(op2->kind == 3)
2086 *value2 = (intptr_t)op2->__anon1.ui;
2087 else if(op2->kind == 4 && op2->type->isSigned)
2088 *value2 = (intptr_t)op2->__anon1.i64;
2089 else if(op2->kind == 4)
2090 *value2 = (intptr_t)op2->__anon1.ui64;
2091 else if(op2->kind == 23 && op2->type->isSigned)
2092 *value2 = (intptr_t)op2->__anon1.i64;
2093 else if(op2->kind == 23)
2094 *value2 = (intptr_t)op2->__anon1.ui64;
2095 else if(op2->kind == 22 && op2->type->isSigned)
2096 *value2 = (intptr_t)op2->__anon1.i64;
2097 else if(op2->kind == 22)
2098 *value2 = (intptr_t)op2->__anon1.ui64;
2099 else if(op2->kind == 2 && op2->type->isSigned)
2100 *value2 = (intptr_t)op2->__anon1.s;
2101 else if(op2->kind == 2)
2102 *value2 = (intptr_t)op2->__anon1.us;
2103 else if(op2->kind == 1 && op2->type->isSigned)
2104 *value2 = (intptr_t)op2->__anon1.c;
2105 else if(op2->kind == 24 || op2->kind == 1)
2106 *value2 = (intptr_t)op2->__anon1.uc;
2107 else if(op2->kind == 6)
2108 *value2 = (intptr_t)op2->__anon1.f;
2109 else if(op2->kind == 7)
2110 *value2 = (intptr_t)op2->__anon1.d;
2111 else if(op2->kind == 13)
2112 *value2 = (intptr_t)op2->__anon1.ui64;
2118 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
2120 if(op2->kind == 3 && op2->type->isSigned)
2121 *value2 = (uintptr_t)op2->__anon1.i;
2122 else if(op2->kind == 3)
2123 *value2 = (uintptr_t)op2->__anon1.ui;
2124 else if(op2->kind == 4 && op2->type->isSigned)
2125 *value2 = (uintptr_t)op2->__anon1.i64;
2126 else if(op2->kind == 4)
2127 *value2 = (uintptr_t)op2->__anon1.ui64;
2128 else if(op2->kind == 23 && op2->type->isSigned)
2129 *value2 = (uintptr_t)op2->__anon1.i64;
2130 else if(op2->kind == 23)
2131 *value2 = (uintptr_t)op2->__anon1.ui64;
2132 else if(op2->kind == 22 && op2->type->isSigned)
2133 *value2 = (uintptr_t)op2->__anon1.i64;
2134 else if(op2->kind == 22)
2135 *value2 = (uintptr_t)op2->__anon1.ui64;
2136 else if(op2->kind == 2 && op2->type->isSigned)
2137 *value2 = (uintptr_t)op2->__anon1.s;
2138 else if(op2->kind == 2)
2139 *value2 = (uintptr_t)op2->__anon1.us;
2140 else if(op2->kind == 1 && op2->type->isSigned)
2141 *value2 = (uintptr_t)op2->__anon1.c;
2142 else if(op2->kind == 24 || op2->kind == 1)
2143 *value2 = (uintptr_t)op2->__anon1.uc;
2144 else if(op2->kind == 6)
2145 *value2 = (uintptr_t)op2->__anon1.f;
2146 else if(op2->kind == 7)
2147 *value2 = (uintptr_t)op2->__anon1.d;
2148 else if(op2->kind == 13)
2149 *value2 = (uintptr_t)op2->__anon1.ui64;
2155 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2157 if(op2->kind == 3 && op2->type->isSigned)
2158 *value2 = (ssize_t)op2->__anon1.i;
2159 else if(op2->kind == 3)
2160 *value2 = (ssize_t)op2->__anon1.ui;
2161 else if(op2->kind == 4 && op2->type->isSigned)
2162 *value2 = (ssize_t)op2->__anon1.i64;
2163 else if(op2->kind == 4)
2164 *value2 = (ssize_t)op2->__anon1.ui64;
2165 else if(op2->kind == 23 && op2->type->isSigned)
2166 *value2 = (ssize_t)op2->__anon1.i64;
2167 else if(op2->kind == 23)
2168 *value2 = (ssize_t)op2->__anon1.ui64;
2169 else if(op2->kind == 22 && op2->type->isSigned)
2170 *value2 = (ssize_t)op2->__anon1.i64;
2171 else if(op2->kind == 22)
2172 *value2 = (ssize_t)op2->__anon1.ui64;
2173 else if(op2->kind == 2 && op2->type->isSigned)
2174 *value2 = (ssize_t)op2->__anon1.s;
2175 else if(op2->kind == 2)
2176 *value2 = (ssize_t)op2->__anon1.us;
2177 else if(op2->kind == 1 && op2->type->isSigned)
2178 *value2 = (ssize_t)op2->__anon1.c;
2179 else if(op2->kind == 24 || op2->kind == 1)
2180 *value2 = (ssize_t)op2->__anon1.uc;
2181 else if(op2->kind == 6)
2182 *value2 = (ssize_t)op2->__anon1.f;
2183 else if(op2->kind == 7)
2184 *value2 = (ssize_t)op2->__anon1.d;
2185 else if(op2->kind == 13)
2186 *value2 = (ssize_t)op2->__anon1.ui64;
2192 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2194 if(op2->kind == 3 && op2->type->isSigned)
2195 *value2 = (size_t)op2->__anon1.i;
2196 else if(op2->kind == 3)
2197 *value2 = (size_t)op2->__anon1.ui;
2198 else if(op2->kind == 4 && op2->type->isSigned)
2199 *value2 = (size_t)op2->__anon1.i64;
2200 else if(op2->kind == 4)
2201 *value2 = (size_t)op2->__anon1.ui64;
2202 else if(op2->kind == 23 && op2->type->isSigned)
2203 *value2 = (size_t)op2->__anon1.i64;
2204 else if(op2->kind == 23)
2205 *value2 = (size_t)op2->__anon1.ui64;
2206 else if(op2->kind == 22 && op2->type->isSigned)
2207 *value2 = (size_t)op2->__anon1.i64;
2208 else if(op2->kind == 22)
2209 *value2 = (size_t)op2->__anon1.ui64;
2210 else if(op2->kind == 2 && op2->type->isSigned)
2211 *value2 = (size_t)op2->__anon1.s;
2212 else if(op2->kind == 2)
2213 *value2 = (size_t)op2->__anon1.us;
2214 else if(op2->kind == 1 && op2->type->isSigned)
2215 *value2 = (size_t)op2->__anon1.c;
2216 else if(op2->kind == 24 || op2->kind == 1)
2217 *value2 = (size_t)op2->__anon1.uc;
2218 else if(op2->kind == 6)
2219 *value2 = (size_t)op2->__anon1.f;
2220 else if(op2->kind == 7)
2221 *value2 = (size_t)op2->__anon1.d;
2222 else if(op2->kind == 13)
2223 *value2 = (size_t)op2->__anon1.ui64;
2229 unsigned int GetOpShort(struct Operand * op2, short * value2)
2231 if(op2->kind == 3 && op2->type->isSigned)
2232 *value2 = (short)op2->__anon1.i;
2233 else if(op2->kind == 3)
2234 *value2 = (short)op2->__anon1.ui;
2235 else if(op2->kind == 4 && op2->type->isSigned)
2236 *value2 = (short)op2->__anon1.i64;
2237 else if(op2->kind == 4)
2238 *value2 = (short)op2->__anon1.ui64;
2239 else if(op2->kind == 23 && op2->type->isSigned)
2240 *value2 = (short)op2->__anon1.i64;
2241 else if(op2->kind == 23)
2242 *value2 = (short)op2->__anon1.ui64;
2243 else if(op2->kind == 22 && op2->type->isSigned)
2244 *value2 = (short)op2->__anon1.i64;
2245 else if(op2->kind == 22)
2246 *value2 = (short)op2->__anon1.ui64;
2247 else if(op2->kind == 2 && op2->type->isSigned)
2248 *value2 = op2->__anon1.s;
2249 else if(op2->kind == 2)
2250 *value2 = (short)op2->__anon1.us;
2251 else if(op2->kind == 1 && op2->type->isSigned)
2252 *value2 = (short)op2->__anon1.c;
2253 else if(op2->kind == 24 || op2->kind == 1)
2254 *value2 = (short)op2->__anon1.uc;
2255 else if(op2->kind == 6)
2256 *value2 = (short)op2->__anon1.f;
2257 else if(op2->kind == 7)
2258 *value2 = (short)op2->__anon1.d;
2259 else if(op2->kind == 13)
2260 *value2 = (short)op2->__anon1.ui64;
2266 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2268 if(op2->kind == 3 && op2->type->isSigned)
2269 *value2 = (unsigned short)op2->__anon1.i;
2270 else if(op2->kind == 3)
2271 *value2 = (unsigned short)op2->__anon1.ui;
2272 else if(op2->kind == 4 && op2->type->isSigned)
2273 *value2 = (unsigned short)op2->__anon1.i64;
2274 else if(op2->kind == 4)
2275 *value2 = (unsigned short)op2->__anon1.ui64;
2276 else if(op2->kind == 23 && op2->type->isSigned)
2277 *value2 = (unsigned short)op2->__anon1.i64;
2278 else if(op2->kind == 23)
2279 *value2 = (unsigned short)op2->__anon1.ui64;
2280 else if(op2->kind == 22 && op2->type->isSigned)
2281 *value2 = (unsigned short)op2->__anon1.i64;
2282 else if(op2->kind == 22)
2283 *value2 = (unsigned short)op2->__anon1.ui64;
2284 else if(op2->kind == 2 && op2->type->isSigned)
2285 *value2 = (unsigned short)op2->__anon1.s;
2286 else if(op2->kind == 2)
2287 *value2 = op2->__anon1.us;
2288 else if(op2->kind == 1 && op2->type->isSigned)
2289 *value2 = (unsigned short)op2->__anon1.c;
2290 else if(op2->kind == 24 || op2->kind == 1)
2291 *value2 = (unsigned short)op2->__anon1.uc;
2292 else if(op2->kind == 6)
2293 *value2 = (unsigned short)op2->__anon1.f;
2294 else if(op2->kind == 7)
2295 *value2 = (unsigned short)op2->__anon1.d;
2296 else if(op2->kind == 13)
2297 *value2 = (unsigned short)op2->__anon1.ui64;
2303 unsigned int GetOpChar(struct Operand * op2, char * value2)
2305 if(op2->kind == 3 && op2->type->isSigned)
2306 *value2 = (char)op2->__anon1.i;
2307 else if(op2->kind == 3)
2308 *value2 = (char)op2->__anon1.ui;
2309 else if(op2->kind == 4 && op2->type->isSigned)
2310 *value2 = (char)op2->__anon1.i64;
2311 else if(op2->kind == 4)
2312 *value2 = (char)op2->__anon1.ui64;
2313 else if(op2->kind == 23 && op2->type->isSigned)
2314 *value2 = (char)op2->__anon1.i64;
2315 else if(op2->kind == 23)
2316 *value2 = (char)op2->__anon1.ui64;
2317 else if(op2->kind == 22 && op2->type->isSigned)
2318 *value2 = (char)op2->__anon1.i64;
2319 else if(op2->kind == 22)
2320 *value2 = (char)op2->__anon1.ui64;
2321 else if(op2->kind == 2 && op2->type->isSigned)
2322 *value2 = (char)op2->__anon1.s;
2323 else if(op2->kind == 2)
2324 *value2 = (char)op2->__anon1.us;
2325 else if(op2->kind == 1 && op2->type->isSigned)
2326 *value2 = op2->__anon1.c;
2327 else if(op2->kind == 24 || op2->kind == 1)
2328 *value2 = (char)op2->__anon1.uc;
2329 else if(op2->kind == 6)
2330 *value2 = (char)op2->__anon1.f;
2331 else if(op2->kind == 7)
2332 *value2 = (char)op2->__anon1.d;
2333 else if(op2->kind == 13)
2334 *value2 = (char)op2->__anon1.ui64;
2340 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2342 if(op2->kind == 3 && op2->type->isSigned)
2343 *value2 = (unsigned char)op2->__anon1.i;
2344 else if(op2->kind == 3)
2345 *value2 = (unsigned char)op2->__anon1.ui;
2346 else if(op2->kind == 4 && op2->type->isSigned)
2347 *value2 = (unsigned char)op2->__anon1.i64;
2348 else if(op2->kind == 4)
2349 *value2 = (unsigned char)op2->__anon1.ui64;
2350 else if(op2->kind == 23 && op2->type->isSigned)
2351 *value2 = (unsigned char)op2->__anon1.i64;
2352 else if(op2->kind == 23)
2353 *value2 = (unsigned char)op2->__anon1.ui64;
2354 else if(op2->kind == 22 && op2->type->isSigned)
2355 *value2 = (unsigned char)op2->__anon1.i64;
2356 else if(op2->kind == 22)
2357 *value2 = (unsigned char)op2->__anon1.ui64;
2358 else if(op2->kind == 2 && op2->type->isSigned)
2359 *value2 = (unsigned char)op2->__anon1.s;
2360 else if(op2->kind == 2)
2361 *value2 = (unsigned char)op2->__anon1.us;
2362 else if(op2->kind == 1 && op2->type->isSigned)
2363 *value2 = (unsigned char)op2->__anon1.c;
2364 else if(op2->kind == 24 || op2->kind == 1)
2365 *value2 = op2->__anon1.uc;
2366 else if(op2->kind == 6)
2367 *value2 = (unsigned char)op2->__anon1.f;
2368 else if(op2->kind == 7)
2369 *value2 = (unsigned char)op2->__anon1.d;
2370 else if(op2->kind == 13)
2371 *value2 = (unsigned char)op2->__anon1.ui64;
2377 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2379 if(op2->kind == 3 && op2->type->isSigned)
2380 *value2 = (float)(float)op2->__anon1.i;
2381 else if(op2->kind == 3)
2382 *value2 = (float)(float)op2->__anon1.ui;
2383 else if(op2->kind == 4 && op2->type->isSigned)
2384 *value2 = (float)(float)op2->__anon1.i64;
2385 else if(op2->kind == 4)
2386 *value2 = (float)(float)op2->__anon1.ui64;
2387 else if(op2->kind == 23 && op2->type->isSigned)
2388 *value2 = (float)(float)op2->__anon1.i64;
2389 else if(op2->kind == 23)
2390 *value2 = (float)(float)op2->__anon1.ui64;
2391 else if(op2->kind == 22 && op2->type->isSigned)
2392 *value2 = (float)(float)op2->__anon1.i64;
2393 else if(op2->kind == 22)
2394 *value2 = (float)(float)op2->__anon1.ui64;
2395 else if(op2->kind == 2 && op2->type->isSigned)
2396 *value2 = (float)(float)op2->__anon1.s;
2397 else if(op2->kind == 2)
2398 *value2 = (float)(float)op2->__anon1.us;
2399 else if(op2->kind == 1 && op2->type->isSigned)
2400 *value2 = (float)(float)op2->__anon1.c;
2401 else if(op2->kind == 24 || op2->kind == 1)
2402 *value2 = (float)(float)op2->__anon1.uc;
2403 else if(op2->kind == 6)
2404 *value2 = (float)op2->__anon1.f;
2405 else if(op2->kind == 7)
2406 *value2 = (float)op2->__anon1.d;
2407 else if(op2->kind == 13)
2408 *value2 = (float)(float)op2->__anon1.ui64;
2414 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2416 if(op2->kind == 3 && op2->type->isSigned)
2417 *value2 = (double)(double)op2->__anon1.i;
2418 else if(op2->kind == 3)
2419 *value2 = (double)(double)op2->__anon1.ui;
2420 else if(op2->kind == 4 && op2->type->isSigned)
2421 *value2 = (double)(double)op2->__anon1.i64;
2422 else if(op2->kind == 4)
2423 *value2 = (double)(double)op2->__anon1.ui64;
2424 else if(op2->kind == 23 && op2->type->isSigned)
2425 *value2 = (double)(double)op2->__anon1.i64;
2426 else if(op2->kind == 23)
2427 *value2 = (double)(double)op2->__anon1.ui64;
2428 else if(op2->kind == 22 && op2->type->isSigned)
2429 *value2 = (double)(double)op2->__anon1.i64;
2430 else if(op2->kind == 22)
2431 *value2 = (double)(double)op2->__anon1.ui64;
2432 else if(op2->kind == 2 && op2->type->isSigned)
2433 *value2 = (double)(double)op2->__anon1.s;
2434 else if(op2->kind == 2)
2435 *value2 = (double)(double)op2->__anon1.us;
2436 else if(op2->kind == 1 && op2->type->isSigned)
2437 *value2 = (double)(double)op2->__anon1.c;
2438 else if(op2->kind == 24 || op2->kind == 1)
2439 *value2 = (double)(double)op2->__anon1.uc;
2440 else if(op2->kind == 6)
2441 *value2 = (double)op2->__anon1.f;
2442 else if(op2->kind == 7)
2443 *value2 = (double)op2->__anon1.d;
2444 else if(op2->kind == 13)
2445 *value2 = (double)(double)op2->__anon1.ui64;
2451 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2453 int value2 = op2->__anon1.i;
2456 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
2459 exp->expType = op1->type;
2461 op1->type->refCount++;
2466 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2468 unsigned int value2 = op2->__anon1.ui;
2471 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
2474 exp->expType = op1->type;
2476 op1->type->refCount++;
2481 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2483 long long value2 = op2->__anon1.i64;
2486 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
2489 exp->expType = op1->type;
2491 op1->type->refCount++;
2496 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2498 uint64 value2 = op2->__anon1.ui64;
2501 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
2504 exp->expType = op1->type;
2506 op1->type->refCount++;
2511 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2513 short value2 = op2->__anon1.s;
2516 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
2519 exp->expType = op1->type;
2521 op1->type->refCount++;
2526 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2528 unsigned short value2 = op2->__anon1.us;
2531 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
2534 exp->expType = op1->type;
2536 op1->type->refCount++;
2541 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2543 char value2 = op2->__anon1.c;
2546 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
2549 exp->expType = op1->type;
2551 op1->type->refCount++;
2556 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2558 unsigned char value2 = op2->__anon1.uc;
2561 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
2564 exp->expType = op1->type;
2566 op1->type->refCount++;
2571 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2573 float value2 = op2->__anon1.f;
2576 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
2579 exp->expType = op1->type;
2581 op1->type->refCount++;
2586 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2588 double value2 = op2->__anon1.d;
2591 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
2594 exp->expType = op1->type;
2596 op1->type->refCount++;
2601 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2603 int value2 = op2->__anon1.i;
2606 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
2609 exp->expType = op1->type;
2611 op1->type->refCount++;
2616 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2618 unsigned int value2 = op2->__anon1.ui;
2621 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
2624 exp->expType = op1->type;
2626 op1->type->refCount++;
2631 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2633 long long value2 = op2->__anon1.i64;
2636 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
2639 exp->expType = op1->type;
2641 op1->type->refCount++;
2646 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2648 uint64 value2 = op2->__anon1.ui64;
2651 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
2654 exp->expType = op1->type;
2656 op1->type->refCount++;
2661 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2663 short value2 = op2->__anon1.s;
2666 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
2669 exp->expType = op1->type;
2671 op1->type->refCount++;
2676 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2678 unsigned short value2 = op2->__anon1.us;
2681 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
2684 exp->expType = op1->type;
2686 op1->type->refCount++;
2691 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2693 char value2 = op2->__anon1.c;
2696 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
2699 exp->expType = op1->type;
2701 op1->type->refCount++;
2706 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2708 unsigned char value2 = op2->__anon1.uc;
2711 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
2714 exp->expType = op1->type;
2716 op1->type->refCount++;
2721 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2723 float value2 = op2->__anon1.f;
2726 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
2729 exp->expType = op1->type;
2731 op1->type->refCount++;
2736 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2738 double value2 = op2->__anon1.d;
2741 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
2744 exp->expType = op1->type;
2746 op1->type->refCount++;
2751 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2753 int value2 = op2->__anon1.i;
2756 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
2759 exp->expType = op1->type;
2761 op1->type->refCount++;
2766 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2768 unsigned int value2 = op2->__anon1.ui;
2771 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
2774 exp->expType = op1->type;
2776 op1->type->refCount++;
2781 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2783 long long value2 = op2->__anon1.i64;
2786 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
2789 exp->expType = op1->type;
2791 op1->type->refCount++;
2796 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2798 uint64 value2 = op2->__anon1.ui64;
2801 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
2804 exp->expType = op1->type;
2806 op1->type->refCount++;
2811 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2813 short value2 = op2->__anon1.s;
2816 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
2819 exp->expType = op1->type;
2821 op1->type->refCount++;
2826 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2828 unsigned short value2 = op2->__anon1.us;
2831 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
2834 exp->expType = op1->type;
2836 op1->type->refCount++;
2841 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2843 char value2 = op2->__anon1.c;
2846 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
2849 exp->expType = op1->type;
2851 op1->type->refCount++;
2856 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2858 unsigned char value2 = op2->__anon1.uc;
2861 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
2864 exp->expType = op1->type;
2866 op1->type->refCount++;
2871 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2873 float value2 = op2->__anon1.f;
2876 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
2879 exp->expType = op1->type;
2881 op1->type->refCount++;
2886 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2888 double value2 = op2->__anon1.d;
2891 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
2894 exp->expType = op1->type;
2896 op1->type->refCount++;
2901 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2903 int value2 = op2->__anon1.i;
2906 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
2909 exp->expType = op1->type;
2911 op1->type->refCount++;
2916 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2918 unsigned int value2 = op2->__anon1.ui;
2921 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
2924 exp->expType = op1->type;
2926 op1->type->refCount++;
2931 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2933 long long value2 = op2->__anon1.i64;
2936 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
2939 exp->expType = op1->type;
2941 op1->type->refCount++;
2946 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2948 uint64 value2 = op2->__anon1.ui64;
2951 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
2954 exp->expType = op1->type;
2956 op1->type->refCount++;
2961 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2963 short value2 = op2->__anon1.s;
2966 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
2969 exp->expType = op1->type;
2971 op1->type->refCount++;
2976 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2978 unsigned short value2 = op2->__anon1.us;
2981 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
2984 exp->expType = op1->type;
2986 op1->type->refCount++;
2991 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
2993 char value2 = op2->__anon1.c;
2996 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
2999 exp->expType = op1->type;
3001 op1->type->refCount++;
3006 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3008 unsigned char value2 = op2->__anon1.uc;
3011 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
3014 exp->expType = op1->type;
3016 op1->type->refCount++;
3021 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3023 float value2 = op2->__anon1.f;
3026 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
3029 exp->expType = op1->type;
3031 op1->type->refCount++;
3036 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3038 double value2 = op2->__anon1.d;
3041 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
3044 exp->expType = op1->type;
3046 op1->type->refCount++;
3051 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3053 int value2 = op2->__anon1.i;
3056 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
3059 exp->expType = op1->type;
3061 op1->type->refCount++;
3066 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3068 unsigned int value2 = op2->__anon1.ui;
3071 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
3074 exp->expType = op1->type;
3076 op1->type->refCount++;
3081 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3083 long long value2 = op2->__anon1.i64;
3086 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
3089 exp->expType = op1->type;
3091 op1->type->refCount++;
3096 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3098 uint64 value2 = op2->__anon1.ui64;
3101 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
3104 exp->expType = op1->type;
3106 op1->type->refCount++;
3111 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3113 short value2 = op2->__anon1.s;
3116 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
3119 exp->expType = op1->type;
3121 op1->type->refCount++;
3126 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3128 unsigned short value2 = op2->__anon1.us;
3131 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
3134 exp->expType = op1->type;
3136 op1->type->refCount++;
3141 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3143 char value2 = op2->__anon1.c;
3146 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
3149 exp->expType = op1->type;
3151 op1->type->refCount++;
3156 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3158 unsigned char value2 = op2->__anon1.uc;
3161 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
3164 exp->expType = op1->type;
3166 op1->type->refCount++;
3171 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
3174 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
3177 exp->expType = op1->type;
3179 op1->type->refCount++;
3184 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
3187 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
3190 exp->expType = op1->type;
3192 op1->type->refCount++;
3197 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
3200 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
3203 exp->expType = op1->type;
3205 op1->type->refCount++;
3210 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
3213 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
3216 exp->expType = op1->type;
3218 op1->type->refCount++;
3223 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
3226 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
3229 exp->expType = op1->type;
3231 op1->type->refCount++;
3236 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
3239 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
3242 exp->expType = op1->type;
3244 op1->type->refCount++;
3249 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
3252 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
3255 exp->expType = op1->type;
3257 op1->type->refCount++;
3262 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
3265 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
3268 exp->expType = op1->type;
3270 op1->type->refCount++;
3275 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
3278 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
3281 exp->expType = op1->type;
3283 op1->type->refCount++;
3288 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
3291 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
3294 exp->expType = op1->type;
3296 op1->type->refCount++;
3301 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
3304 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
3307 exp->expType = op1->type;
3309 op1->type->refCount++;
3314 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
3317 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
3320 exp->expType = op1->type;
3322 op1->type->refCount++;
3327 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
3330 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
3333 exp->expType = op1->type;
3335 op1->type->refCount++;
3340 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
3343 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
3346 exp->expType = op1->type;
3348 op1->type->refCount++;
3353 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
3356 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
3359 exp->expType = op1->type;
3361 op1->type->refCount++;
3366 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
3369 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
3372 exp->expType = op1->type;
3374 op1->type->refCount++;
3379 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
3382 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
3385 exp->expType = op1->type;
3387 op1->type->refCount++;
3392 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
3395 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
3398 exp->expType = op1->type;
3400 op1->type->refCount++;
3405 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
3408 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
3411 exp->expType = op1->type;
3413 op1->type->refCount++;
3418 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
3421 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
3424 exp->expType = op1->type;
3426 op1->type->refCount++;
3431 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
3434 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
3437 exp->expType = op1->type;
3439 op1->type->refCount++;
3444 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
3447 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
3450 exp->expType = op1->type;
3452 op1->type->refCount++;
3457 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
3460 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
3463 exp->expType = op1->type;
3465 op1->type->refCount++;
3470 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
3473 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
3476 exp->expType = op1->type;
3478 op1->type->refCount++;
3483 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
3486 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
3489 exp->expType = op1->type;
3491 op1->type->refCount++;
3496 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
3499 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
3502 exp->expType = op1->type;
3504 op1->type->refCount++;
3509 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
3512 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
3515 exp->expType = op1->type;
3517 op1->type->refCount++;
3522 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
3525 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
3528 exp->expType = op1->type;
3530 op1->type->refCount++;
3535 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
3538 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
3541 exp->expType = op1->type;
3543 op1->type->refCount++;
3548 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
3551 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
3554 exp->expType = op1->type;
3556 op1->type->refCount++;
3561 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3563 int value2 = op2->__anon1.i;
3566 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
3569 exp->expType = op1->type;
3571 op1->type->refCount++;
3576 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3578 unsigned int value2 = op2->__anon1.ui;
3581 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
3584 exp->expType = op1->type;
3586 op1->type->refCount++;
3591 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3593 long long value2 = op2->__anon1.i64;
3596 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
3599 exp->expType = op1->type;
3601 op1->type->refCount++;
3606 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3608 uint64 value2 = op2->__anon1.ui64;
3611 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
3614 exp->expType = op1->type;
3616 op1->type->refCount++;
3621 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3623 short value2 = op2->__anon1.s;
3626 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
3629 exp->expType = op1->type;
3631 op1->type->refCount++;
3636 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3638 unsigned short value2 = op2->__anon1.us;
3641 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
3644 exp->expType = op1->type;
3646 op1->type->refCount++;
3651 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3653 char value2 = op2->__anon1.c;
3656 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
3659 exp->expType = op1->type;
3661 op1->type->refCount++;
3666 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3668 unsigned char value2 = op2->__anon1.uc;
3671 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
3674 exp->expType = op1->type;
3676 op1->type->refCount++;
3681 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3683 float value2 = op2->__anon1.f;
3686 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
3689 exp->expType = op1->type;
3691 op1->type->refCount++;
3696 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3698 double value2 = op2->__anon1.d;
3701 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
3704 exp->expType = op1->type;
3706 op1->type->refCount++;
3711 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3713 int value2 = op2->__anon1.i;
3716 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
3719 exp->expType = op1->type;
3721 op1->type->refCount++;
3726 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3728 unsigned int value2 = op2->__anon1.ui;
3731 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
3734 exp->expType = op1->type;
3736 op1->type->refCount++;
3741 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3743 long long value2 = op2->__anon1.i64;
3746 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
3749 exp->expType = op1->type;
3751 op1->type->refCount++;
3756 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3758 uint64 value2 = op2->__anon1.ui64;
3761 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
3764 exp->expType = op1->type;
3766 op1->type->refCount++;
3771 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3773 short value2 = op2->__anon1.s;
3776 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
3779 exp->expType = op1->type;
3781 op1->type->refCount++;
3786 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3788 unsigned short value2 = op2->__anon1.us;
3791 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
3794 exp->expType = op1->type;
3796 op1->type->refCount++;
3801 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3803 char value2 = op2->__anon1.c;
3806 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
3809 exp->expType = op1->type;
3811 op1->type->refCount++;
3816 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3818 unsigned char value2 = op2->__anon1.uc;
3821 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
3824 exp->expType = op1->type;
3826 op1->type->refCount++;
3831 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3833 float value2 = op2->__anon1.f;
3836 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
3839 exp->expType = op1->type;
3841 op1->type->refCount++;
3846 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3848 double value2 = op2->__anon1.d;
3851 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
3854 exp->expType = op1->type;
3856 op1->type->refCount++;
3861 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3863 int value2 = op2->__anon1.i;
3866 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
3869 exp->expType = op1->type;
3871 op1->type->refCount++;
3876 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3878 unsigned int value2 = op2->__anon1.ui;
3881 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
3884 exp->expType = op1->type;
3886 op1->type->refCount++;
3891 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3893 long long value2 = op2->__anon1.i64;
3896 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
3899 exp->expType = op1->type;
3901 op1->type->refCount++;
3906 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3908 uint64 value2 = op2->__anon1.ui64;
3911 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
3914 exp->expType = op1->type;
3916 op1->type->refCount++;
3921 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3923 short value2 = op2->__anon1.s;
3926 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
3929 exp->expType = op1->type;
3931 op1->type->refCount++;
3936 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3938 unsigned short value2 = op2->__anon1.us;
3941 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
3944 exp->expType = op1->type;
3946 op1->type->refCount++;
3951 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3953 char value2 = op2->__anon1.c;
3956 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
3959 exp->expType = op1->type;
3961 op1->type->refCount++;
3966 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3968 unsigned char value2 = op2->__anon1.uc;
3971 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
3974 exp->expType = op1->type;
3976 op1->type->refCount++;
3981 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3983 float value2 = op2->__anon1.f;
3986 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
3989 exp->expType = op1->type;
3991 op1->type->refCount++;
3996 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
3998 double value2 = op2->__anon1.d;
4001 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
4004 exp->expType = op1->type;
4006 op1->type->refCount++;
4011 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4013 int value2 = op2->__anon1.i;
4016 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
4019 exp->expType = op1->type;
4021 op1->type->refCount++;
4026 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4028 unsigned int value2 = op2->__anon1.ui;
4031 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
4034 exp->expType = op1->type;
4036 op1->type->refCount++;
4041 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4043 long long value2 = op2->__anon1.i64;
4046 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
4049 exp->expType = op1->type;
4051 op1->type->refCount++;
4056 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4058 uint64 value2 = op2->__anon1.ui64;
4061 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
4064 exp->expType = op1->type;
4066 op1->type->refCount++;
4071 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4073 short value2 = op2->__anon1.s;
4076 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
4079 exp->expType = op1->type;
4081 op1->type->refCount++;
4086 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4088 unsigned short value2 = op2->__anon1.us;
4091 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
4094 exp->expType = op1->type;
4096 op1->type->refCount++;
4101 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4103 char value2 = op2->__anon1.c;
4106 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
4109 exp->expType = op1->type;
4111 op1->type->refCount++;
4116 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4118 unsigned char value2 = op2->__anon1.uc;
4121 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
4124 exp->expType = op1->type;
4126 op1->type->refCount++;
4131 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4133 float value2 = op2->__anon1.f;
4136 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
4139 exp->expType = op1->type;
4141 op1->type->refCount++;
4146 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4148 double value2 = op2->__anon1.d;
4151 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
4154 exp->expType = op1->type;
4156 op1->type->refCount++;
4161 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4163 int value2 = op2->__anon1.i;
4166 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
4169 exp->expType = op1->type;
4171 op1->type->refCount++;
4176 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4178 unsigned int value2 = op2->__anon1.ui;
4181 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
4184 exp->expType = op1->type;
4186 op1->type->refCount++;
4191 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4193 long long value2 = op2->__anon1.i64;
4196 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
4199 exp->expType = op1->type;
4201 op1->type->refCount++;
4206 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4208 uint64 value2 = op2->__anon1.ui64;
4211 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
4214 exp->expType = op1->type;
4216 op1->type->refCount++;
4221 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4223 short value2 = op2->__anon1.s;
4226 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
4229 exp->expType = op1->type;
4231 op1->type->refCount++;
4236 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4238 unsigned short value2 = op2->__anon1.us;
4241 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
4244 exp->expType = op1->type;
4246 op1->type->refCount++;
4251 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4253 char value2 = op2->__anon1.c;
4256 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
4259 exp->expType = op1->type;
4261 op1->type->refCount++;
4266 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4268 unsigned char value2 = op2->__anon1.uc;
4271 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
4274 exp->expType = op1->type;
4276 op1->type->refCount++;
4281 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4283 float value2 = op2->__anon1.f;
4286 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
4289 exp->expType = op1->type;
4291 op1->type->refCount++;
4296 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4298 double value2 = op2->__anon1.d;
4301 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
4304 exp->expType = op1->type;
4306 op1->type->refCount++;
4311 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4313 int value2 = op2->__anon1.i;
4316 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
4319 exp->expType = op1->type;
4321 op1->type->refCount++;
4326 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4328 unsigned int value2 = op2->__anon1.ui;
4331 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
4334 exp->expType = op1->type;
4336 op1->type->refCount++;
4341 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4343 long long value2 = op2->__anon1.i64;
4346 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
4349 exp->expType = op1->type;
4351 op1->type->refCount++;
4356 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4358 uint64 value2 = op2->__anon1.ui64;
4361 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
4364 exp->expType = op1->type;
4366 op1->type->refCount++;
4371 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4373 short value2 = op2->__anon1.s;
4376 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
4379 exp->expType = op1->type;
4381 op1->type->refCount++;
4386 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4388 unsigned short value2 = op2->__anon1.us;
4391 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
4394 exp->expType = op1->type;
4396 op1->type->refCount++;
4401 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4403 char value2 = op2->__anon1.c;
4406 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
4409 exp->expType = op1->type;
4411 op1->type->refCount++;
4416 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4418 unsigned char value2 = op2->__anon1.uc;
4421 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
4424 exp->expType = op1->type;
4426 op1->type->refCount++;
4431 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4433 int value2 = op2->__anon1.i;
4436 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
4439 exp->expType = op1->type;
4441 op1->type->refCount++;
4446 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4448 unsigned int value2 = op2->__anon1.ui;
4451 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
4454 exp->expType = op1->type;
4456 op1->type->refCount++;
4461 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4463 long long value2 = op2->__anon1.i64;
4466 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
4469 exp->expType = op1->type;
4471 op1->type->refCount++;
4476 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4478 uint64 value2 = op2->__anon1.ui64;
4481 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
4484 exp->expType = op1->type;
4486 op1->type->refCount++;
4491 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4493 short value2 = op2->__anon1.s;
4496 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
4499 exp->expType = op1->type;
4501 op1->type->refCount++;
4506 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4508 unsigned short value2 = op2->__anon1.us;
4511 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
4514 exp->expType = op1->type;
4516 op1->type->refCount++;
4521 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4523 char value2 = op2->__anon1.c;
4526 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
4529 exp->expType = op1->type;
4531 op1->type->refCount++;
4536 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4538 unsigned char value2 = op2->__anon1.uc;
4541 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
4544 exp->expType = op1->type;
4546 op1->type->refCount++;
4551 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4553 int value2 = op2->__anon1.i;
4556 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
4559 exp->expType = op1->type;
4561 op1->type->refCount++;
4566 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4568 unsigned int value2 = op2->__anon1.ui;
4571 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
4574 exp->expType = op1->type;
4576 op1->type->refCount++;
4581 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4583 long long value2 = op2->__anon1.i64;
4586 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
4589 exp->expType = op1->type;
4591 op1->type->refCount++;
4596 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4598 uint64 value2 = op2->__anon1.ui64;
4601 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
4604 exp->expType = op1->type;
4606 op1->type->refCount++;
4611 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4613 short value2 = op2->__anon1.s;
4616 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
4619 exp->expType = op1->type;
4621 op1->type->refCount++;
4626 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4628 unsigned short value2 = op2->__anon1.us;
4631 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
4634 exp->expType = op1->type;
4636 op1->type->refCount++;
4641 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4643 char value2 = op2->__anon1.c;
4646 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
4649 exp->expType = op1->type;
4651 op1->type->refCount++;
4656 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4658 unsigned char value2 = op2->__anon1.uc;
4661 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
4664 exp->expType = op1->type;
4666 op1->type->refCount++;
4671 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4673 int value2 = op2->__anon1.i;
4676 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
4679 exp->expType = op1->type;
4681 op1->type->refCount++;
4686 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4688 unsigned int value2 = op2->__anon1.ui;
4691 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
4694 exp->expType = op1->type;
4696 op1->type->refCount++;
4701 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4703 long long value2 = op2->__anon1.i64;
4706 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
4709 exp->expType = op1->type;
4711 op1->type->refCount++;
4716 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4718 uint64 value2 = op2->__anon1.ui64;
4721 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
4724 exp->expType = op1->type;
4726 op1->type->refCount++;
4731 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4733 short value2 = op2->__anon1.s;
4736 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
4739 exp->expType = op1->type;
4741 op1->type->refCount++;
4746 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4748 unsigned short value2 = op2->__anon1.us;
4751 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
4754 exp->expType = op1->type;
4756 op1->type->refCount++;
4761 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4763 char value2 = op2->__anon1.c;
4766 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
4769 exp->expType = op1->type;
4771 op1->type->refCount++;
4776 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4778 unsigned char value2 = op2->__anon1.uc;
4781 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
4784 exp->expType = op1->type;
4786 op1->type->refCount++;
4791 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4793 int value2 = op2->__anon1.i;
4796 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
4799 exp->expType = op1->type;
4801 op1->type->refCount++;
4806 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4808 unsigned int value2 = op2->__anon1.ui;
4811 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
4814 exp->expType = op1->type;
4816 op1->type->refCount++;
4821 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4823 long long value2 = op2->__anon1.i64;
4826 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
4829 exp->expType = op1->type;
4831 op1->type->refCount++;
4836 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4838 uint64 value2 = op2->__anon1.ui64;
4841 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
4844 exp->expType = op1->type;
4846 op1->type->refCount++;
4851 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4853 short value2 = op2->__anon1.s;
4856 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
4859 exp->expType = op1->type;
4861 op1->type->refCount++;
4866 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4868 unsigned short value2 = op2->__anon1.us;
4871 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
4874 exp->expType = op1->type;
4876 op1->type->refCount++;
4881 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4883 char value2 = op2->__anon1.c;
4886 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
4889 exp->expType = op1->type;
4891 op1->type->refCount++;
4896 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4898 unsigned char value2 = op2->__anon1.uc;
4901 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
4904 exp->expType = op1->type;
4906 op1->type->refCount++;
4911 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4913 int value2 = op2->__anon1.i;
4916 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
4919 exp->expType = op1->type;
4921 op1->type->refCount++;
4926 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4928 unsigned int value2 = op2->__anon1.ui;
4931 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
4934 exp->expType = op1->type;
4936 op1->type->refCount++;
4941 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4943 long long value2 = op2->__anon1.i64;
4946 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
4949 exp->expType = op1->type;
4951 op1->type->refCount++;
4956 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4958 uint64 value2 = op2->__anon1.ui64;
4961 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
4964 exp->expType = op1->type;
4966 op1->type->refCount++;
4971 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4973 short value2 = op2->__anon1.s;
4976 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
4979 exp->expType = op1->type;
4981 op1->type->refCount++;
4986 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
4988 unsigned short value2 = op2->__anon1.us;
4991 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
4994 exp->expType = op1->type;
4996 op1->type->refCount++;
5001 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5003 char value2 = op2->__anon1.c;
5006 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
5009 exp->expType = op1->type;
5011 op1->type->refCount++;
5016 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5018 unsigned char value2 = op2->__anon1.uc;
5021 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
5024 exp->expType = op1->type;
5026 op1->type->refCount++;
5031 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
5034 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
5037 exp->expType = op1->type;
5039 op1->type->refCount++;
5044 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
5047 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
5050 exp->expType = op1->type;
5052 op1->type->refCount++;
5057 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
5060 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
5063 exp->expType = op1->type;
5065 op1->type->refCount++;
5070 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
5073 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
5076 exp->expType = op1->type;
5078 op1->type->refCount++;
5083 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
5086 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
5089 exp->expType = op1->type;
5091 op1->type->refCount++;
5096 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
5099 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
5102 exp->expType = op1->type;
5104 op1->type->refCount++;
5109 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
5112 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
5115 exp->expType = op1->type;
5117 op1->type->refCount++;
5122 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
5125 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
5128 exp->expType = op1->type;
5130 op1->type->refCount++;
5135 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5137 int value2 = op2->__anon1.i;
5140 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
5143 exp->expType = op1->type;
5145 op1->type->refCount++;
5150 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5152 unsigned int value2 = op2->__anon1.ui;
5155 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
5158 exp->expType = op1->type;
5160 op1->type->refCount++;
5165 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5167 long long value2 = op2->__anon1.i64;
5170 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
5173 exp->expType = op1->type;
5175 op1->type->refCount++;
5180 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5182 uint64 value2 = op2->__anon1.ui64;
5185 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
5188 exp->expType = op1->type;
5190 op1->type->refCount++;
5195 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5197 short value2 = op2->__anon1.s;
5200 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
5203 exp->expType = op1->type;
5205 op1->type->refCount++;
5210 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5212 unsigned short value2 = op2->__anon1.us;
5215 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
5218 exp->expType = op1->type;
5220 op1->type->refCount++;
5225 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5227 char value2 = op2->__anon1.c;
5230 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
5233 exp->expType = op1->type;
5235 op1->type->refCount++;
5240 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5242 unsigned char value2 = op2->__anon1.uc;
5245 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
5248 exp->expType = op1->type;
5250 op1->type->refCount++;
5255 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5257 int value2 = op2->__anon1.i;
5260 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
5263 exp->expType = op1->type;
5265 op1->type->refCount++;
5270 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5272 unsigned int value2 = op2->__anon1.ui;
5275 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
5278 exp->expType = op1->type;
5280 op1->type->refCount++;
5285 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5287 long long value2 = op2->__anon1.i64;
5290 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
5293 exp->expType = op1->type;
5295 op1->type->refCount++;
5300 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5302 uint64 value2 = op2->__anon1.ui64;
5305 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
5308 exp->expType = op1->type;
5310 op1->type->refCount++;
5315 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5317 short value2 = op2->__anon1.s;
5320 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
5323 exp->expType = op1->type;
5325 op1->type->refCount++;
5330 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5332 unsigned short value2 = op2->__anon1.us;
5335 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
5338 exp->expType = op1->type;
5340 op1->type->refCount++;
5345 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5347 char value2 = op2->__anon1.c;
5350 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
5353 exp->expType = op1->type;
5355 op1->type->refCount++;
5360 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5362 unsigned char value2 = op2->__anon1.uc;
5365 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
5368 exp->expType = op1->type;
5370 op1->type->refCount++;
5375 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5377 int value2 = op2->__anon1.i;
5380 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
5383 exp->expType = op1->type;
5385 op1->type->refCount++;
5390 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5392 unsigned int value2 = op2->__anon1.ui;
5395 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
5398 exp->expType = op1->type;
5400 op1->type->refCount++;
5405 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5407 long long value2 = op2->__anon1.i64;
5410 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
5413 exp->expType = op1->type;
5415 op1->type->refCount++;
5420 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5422 uint64 value2 = op2->__anon1.ui64;
5425 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
5428 exp->expType = op1->type;
5430 op1->type->refCount++;
5435 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5437 short value2 = op2->__anon1.s;
5440 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
5443 exp->expType = op1->type;
5445 op1->type->refCount++;
5450 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5452 unsigned short value2 = op2->__anon1.us;
5455 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
5458 exp->expType = op1->type;
5460 op1->type->refCount++;
5465 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5467 char value2 = op2->__anon1.c;
5470 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
5473 exp->expType = op1->type;
5475 op1->type->refCount++;
5480 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5482 unsigned char value2 = op2->__anon1.uc;
5485 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
5488 exp->expType = op1->type;
5490 op1->type->refCount++;
5495 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5497 int value2 = op2->__anon1.i;
5500 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
5503 exp->expType = op1->type;
5505 op1->type->refCount++;
5510 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5512 unsigned int value2 = op2->__anon1.ui;
5515 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
5518 exp->expType = op1->type;
5520 op1->type->refCount++;
5525 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5527 long long value2 = op2->__anon1.i64;
5530 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
5533 exp->expType = op1->type;
5535 op1->type->refCount++;
5540 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5542 uint64 value2 = op2->__anon1.ui64;
5545 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
5548 exp->expType = op1->type;
5550 op1->type->refCount++;
5555 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5557 short value2 = op2->__anon1.s;
5560 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
5563 exp->expType = op1->type;
5565 op1->type->refCount++;
5570 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5572 unsigned short value2 = op2->__anon1.us;
5575 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
5578 exp->expType = op1->type;
5580 op1->type->refCount++;
5585 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5587 char value2 = op2->__anon1.c;
5590 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
5593 exp->expType = op1->type;
5595 op1->type->refCount++;
5600 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5602 unsigned char value2 = op2->__anon1.uc;
5605 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
5608 exp->expType = op1->type;
5610 op1->type->refCount++;
5615 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5617 int value2 = op2->__anon1.i;
5620 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
5623 exp->expType = op1->type;
5625 op1->type->refCount++;
5630 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5632 unsigned int value2 = op2->__anon1.ui;
5635 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
5638 exp->expType = op1->type;
5640 op1->type->refCount++;
5645 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5647 long long value2 = op2->__anon1.i64;
5650 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
5653 exp->expType = op1->type;
5655 op1->type->refCount++;
5660 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5662 uint64 value2 = op2->__anon1.ui64;
5665 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
5668 exp->expType = op1->type;
5670 op1->type->refCount++;
5675 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5677 short value2 = op2->__anon1.s;
5680 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
5683 exp->expType = op1->type;
5685 op1->type->refCount++;
5690 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5692 unsigned short value2 = op2->__anon1.us;
5695 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
5698 exp->expType = op1->type;
5700 op1->type->refCount++;
5705 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5707 char value2 = op2->__anon1.c;
5710 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
5713 exp->expType = op1->type;
5715 op1->type->refCount++;
5720 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5722 unsigned char value2 = op2->__anon1.uc;
5725 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
5728 exp->expType = op1->type;
5730 op1->type->refCount++;
5735 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
5738 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
5741 exp->expType = op1->type;
5743 op1->type->refCount++;
5748 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
5751 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
5754 exp->expType = op1->type;
5756 op1->type->refCount++;
5761 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
5764 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
5767 exp->expType = op1->type;
5769 op1->type->refCount++;
5774 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
5777 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
5780 exp->expType = op1->type;
5782 op1->type->refCount++;
5787 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
5790 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
5793 exp->expType = op1->type;
5795 op1->type->refCount++;
5800 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
5803 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
5806 exp->expType = op1->type;
5808 op1->type->refCount++;
5813 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
5816 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
5819 exp->expType = op1->type;
5821 op1->type->refCount++;
5826 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
5829 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
5832 exp->expType = op1->type;
5834 op1->type->refCount++;
5839 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5841 int value2 = op2->__anon1.i;
5844 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
5847 exp->expType = op1->type;
5849 op1->type->refCount++;
5854 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5856 unsigned int value2 = op2->__anon1.ui;
5859 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
5862 exp->expType = op1->type;
5864 op1->type->refCount++;
5869 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5871 long long value2 = op2->__anon1.i64;
5874 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
5877 exp->expType = op1->type;
5879 op1->type->refCount++;
5884 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5886 uint64 value2 = op2->__anon1.ui64;
5889 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
5892 exp->expType = op1->type;
5894 op1->type->refCount++;
5899 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5901 short value2 = op2->__anon1.s;
5904 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
5907 exp->expType = op1->type;
5909 op1->type->refCount++;
5914 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5916 unsigned short value2 = op2->__anon1.us;
5919 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
5922 exp->expType = op1->type;
5924 op1->type->refCount++;
5929 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5931 char value2 = op2->__anon1.c;
5934 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
5937 exp->expType = op1->type;
5939 op1->type->refCount++;
5944 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5946 unsigned char value2 = op2->__anon1.uc;
5949 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
5952 exp->expType = op1->type;
5954 op1->type->refCount++;
5959 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5961 float value2 = op2->__anon1.f;
5964 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
5967 exp->expType = op1->type;
5969 op1->type->refCount++;
5974 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5976 double value2 = op2->__anon1.d;
5979 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
5982 exp->expType = op1->type;
5984 op1->type->refCount++;
5989 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5991 int value2 = op2->__anon1.i;
5994 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
5997 exp->expType = op1->type;
5999 op1->type->refCount++;
6004 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6006 unsigned int value2 = op2->__anon1.ui;
6009 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
6012 exp->expType = op1->type;
6014 op1->type->refCount++;
6019 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6021 long long value2 = op2->__anon1.i64;
6024 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
6027 exp->expType = op1->type;
6029 op1->type->refCount++;
6034 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6036 uint64 value2 = op2->__anon1.ui64;
6039 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
6042 exp->expType = op1->type;
6044 op1->type->refCount++;
6049 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6051 short value2 = op2->__anon1.s;
6054 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
6057 exp->expType = op1->type;
6059 op1->type->refCount++;
6064 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6066 unsigned short value2 = op2->__anon1.us;
6069 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
6072 exp->expType = op1->type;
6074 op1->type->refCount++;
6079 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6081 char value2 = op2->__anon1.c;
6084 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
6087 exp->expType = op1->type;
6089 op1->type->refCount++;
6094 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6096 unsigned char value2 = op2->__anon1.uc;
6099 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
6102 exp->expType = op1->type;
6104 op1->type->refCount++;
6109 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6111 float value2 = op2->__anon1.f;
6114 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
6117 exp->expType = op1->type;
6119 op1->type->refCount++;
6124 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6126 double value2 = op2->__anon1.d;
6129 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
6132 exp->expType = op1->type;
6134 op1->type->refCount++;
6139 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6141 int value2 = op2->__anon1.i;
6144 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
6147 exp->expType = op1->type;
6149 op1->type->refCount++;
6154 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6156 unsigned int value2 = op2->__anon1.ui;
6159 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
6162 exp->expType = op1->type;
6164 op1->type->refCount++;
6169 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6171 long long value2 = op2->__anon1.i64;
6174 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
6177 exp->expType = op1->type;
6179 op1->type->refCount++;
6184 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6186 uint64 value2 = op2->__anon1.ui64;
6189 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
6192 exp->expType = op1->type;
6194 op1->type->refCount++;
6199 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6201 short value2 = op2->__anon1.s;
6204 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
6207 exp->expType = op1->type;
6209 op1->type->refCount++;
6214 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6216 unsigned short value2 = op2->__anon1.us;
6219 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
6222 exp->expType = op1->type;
6224 op1->type->refCount++;
6229 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6231 char value2 = op2->__anon1.c;
6234 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
6237 exp->expType = op1->type;
6239 op1->type->refCount++;
6244 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6246 unsigned char value2 = op2->__anon1.uc;
6249 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
6252 exp->expType = op1->type;
6254 op1->type->refCount++;
6259 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6261 float value2 = op2->__anon1.f;
6264 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
6267 exp->expType = op1->type;
6269 op1->type->refCount++;
6274 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6276 double value2 = op2->__anon1.d;
6279 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
6282 exp->expType = op1->type;
6284 op1->type->refCount++;
6289 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6291 int value2 = op2->__anon1.i;
6294 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
6297 exp->expType = op1->type;
6299 op1->type->refCount++;
6304 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6306 unsigned int value2 = op2->__anon1.ui;
6309 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
6312 exp->expType = op1->type;
6314 op1->type->refCount++;
6319 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6321 long long value2 = op2->__anon1.i64;
6324 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
6327 exp->expType = op1->type;
6329 op1->type->refCount++;
6334 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6336 uint64 value2 = op2->__anon1.ui64;
6339 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
6342 exp->expType = op1->type;
6344 op1->type->refCount++;
6349 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6351 short value2 = op2->__anon1.s;
6354 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
6357 exp->expType = op1->type;
6359 op1->type->refCount++;
6364 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6366 unsigned short value2 = op2->__anon1.us;
6369 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
6372 exp->expType = op1->type;
6374 op1->type->refCount++;
6379 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6381 char value2 = op2->__anon1.c;
6384 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
6387 exp->expType = op1->type;
6389 op1->type->refCount++;
6394 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6396 unsigned char value2 = op2->__anon1.uc;
6399 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
6402 exp->expType = op1->type;
6404 op1->type->refCount++;
6409 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6411 float value2 = op2->__anon1.f;
6414 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
6417 exp->expType = op1->type;
6419 op1->type->refCount++;
6424 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6426 double value2 = op2->__anon1.d;
6429 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
6432 exp->expType = op1->type;
6434 op1->type->refCount++;
6439 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6441 int value2 = op2->__anon1.i;
6444 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
6447 exp->expType = op1->type;
6449 op1->type->refCount++;
6454 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6456 unsigned int value2 = op2->__anon1.ui;
6459 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
6462 exp->expType = op1->type;
6464 op1->type->refCount++;
6469 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6471 long long value2 = op2->__anon1.i64;
6474 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
6477 exp->expType = op1->type;
6479 op1->type->refCount++;
6484 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6486 uint64 value2 = op2->__anon1.ui64;
6489 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
6492 exp->expType = op1->type;
6494 op1->type->refCount++;
6499 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6501 short value2 = op2->__anon1.s;
6504 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
6507 exp->expType = op1->type;
6509 op1->type->refCount++;
6514 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6516 unsigned short value2 = op2->__anon1.us;
6519 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
6522 exp->expType = op1->type;
6524 op1->type->refCount++;
6529 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6531 char value2 = op2->__anon1.c;
6534 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
6537 exp->expType = op1->type;
6539 op1->type->refCount++;
6544 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6546 unsigned char value2 = op2->__anon1.uc;
6549 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
6552 exp->expType = op1->type;
6554 op1->type->refCount++;
6559 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6561 float value2 = op2->__anon1.f;
6564 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
6567 exp->expType = op1->type;
6569 op1->type->refCount++;
6574 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6576 double value2 = op2->__anon1.d;
6579 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
6582 exp->expType = op1->type;
6584 op1->type->refCount++;
6589 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6591 int value2 = op2->__anon1.i;
6594 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
6597 exp->expType = op1->type;
6599 op1->type->refCount++;
6604 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6606 unsigned int value2 = op2->__anon1.ui;
6609 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
6612 exp->expType = op1->type;
6614 op1->type->refCount++;
6619 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6621 long long value2 = op2->__anon1.i64;
6624 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
6627 exp->expType = op1->type;
6629 op1->type->refCount++;
6634 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6636 uint64 value2 = op2->__anon1.ui64;
6639 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
6642 exp->expType = op1->type;
6644 op1->type->refCount++;
6649 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6651 short value2 = op2->__anon1.s;
6654 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
6657 exp->expType = op1->type;
6659 op1->type->refCount++;
6664 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6666 unsigned short value2 = op2->__anon1.us;
6669 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
6672 exp->expType = op1->type;
6674 op1->type->refCount++;
6679 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6681 char value2 = op2->__anon1.c;
6684 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
6687 exp->expType = op1->type;
6689 op1->type->refCount++;
6694 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6696 unsigned char value2 = op2->__anon1.uc;
6699 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
6702 exp->expType = op1->type;
6704 op1->type->refCount++;
6709 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6711 float value2 = op2->__anon1.f;
6714 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
6717 exp->expType = op1->type;
6719 op1->type->refCount++;
6724 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6726 double value2 = op2->__anon1.d;
6729 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
6732 exp->expType = op1->type;
6734 op1->type->refCount++;
6739 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6741 int value2 = op2->__anon1.i;
6744 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
6747 exp->expType = op1->type;
6749 op1->type->refCount++;
6754 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6756 unsigned int value2 = op2->__anon1.ui;
6759 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
6762 exp->expType = op1->type;
6764 op1->type->refCount++;
6769 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6771 long long value2 = op2->__anon1.i64;
6774 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
6777 exp->expType = op1->type;
6779 op1->type->refCount++;
6784 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6786 uint64 value2 = op2->__anon1.ui64;
6789 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
6792 exp->expType = op1->type;
6794 op1->type->refCount++;
6799 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6801 short value2 = op2->__anon1.s;
6804 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
6807 exp->expType = op1->type;
6809 op1->type->refCount++;
6814 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6816 unsigned short value2 = op2->__anon1.us;
6819 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
6822 exp->expType = op1->type;
6824 op1->type->refCount++;
6829 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6831 char value2 = op2->__anon1.c;
6834 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
6837 exp->expType = op1->type;
6839 op1->type->refCount++;
6844 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6846 unsigned char value2 = op2->__anon1.uc;
6849 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
6852 exp->expType = op1->type;
6854 op1->type->refCount++;
6859 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6861 float value2 = op2->__anon1.f;
6864 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
6867 exp->expType = op1->type;
6869 op1->type->refCount++;
6874 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6876 double value2 = op2->__anon1.d;
6879 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
6882 exp->expType = op1->type;
6884 op1->type->refCount++;
6889 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6891 int value2 = op2->__anon1.i;
6894 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
6897 exp->expType = op1->type;
6899 op1->type->refCount++;
6904 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6906 unsigned int value2 = op2->__anon1.ui;
6909 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
6912 exp->expType = op1->type;
6914 op1->type->refCount++;
6919 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6921 long long value2 = op2->__anon1.i64;
6924 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
6927 exp->expType = op1->type;
6929 op1->type->refCount++;
6934 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6936 uint64 value2 = op2->__anon1.ui64;
6939 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
6942 exp->expType = op1->type;
6944 op1->type->refCount++;
6949 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6951 short value2 = op2->__anon1.s;
6954 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
6957 exp->expType = op1->type;
6959 op1->type->refCount++;
6964 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6966 unsigned short value2 = op2->__anon1.us;
6969 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
6972 exp->expType = op1->type;
6974 op1->type->refCount++;
6979 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6981 char value2 = op2->__anon1.c;
6984 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
6987 exp->expType = op1->type;
6989 op1->type->refCount++;
6994 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6996 unsigned char value2 = op2->__anon1.uc;
6999 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
7002 exp->expType = op1->type;
7004 op1->type->refCount++;
7009 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7011 float value2 = op2->__anon1.f;
7014 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
7017 exp->expType = op1->type;
7019 op1->type->refCount++;
7024 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7026 double value2 = op2->__anon1.d;
7029 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
7032 exp->expType = op1->type;
7034 op1->type->refCount++;
7039 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7042 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
7045 exp->expType = op1->type;
7047 op1->type->refCount++;
7052 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7055 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
7058 exp->expType = op1->type;
7060 op1->type->refCount++;
7065 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7068 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
7071 exp->expType = op1->type;
7073 op1->type->refCount++;
7078 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7081 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
7084 exp->expType = op1->type;
7086 op1->type->refCount++;
7091 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7094 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
7097 exp->expType = op1->type;
7099 op1->type->refCount++;
7104 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7107 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
7110 exp->expType = op1->type;
7112 op1->type->refCount++;
7117 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7120 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
7123 exp->expType = op1->type;
7125 op1->type->refCount++;
7130 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
7133 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
7136 exp->expType = op1->type;
7138 op1->type->refCount++;
7143 static void PrintName(struct Type * type, char * string, unsigned int fullName)
7145 if(type->name && type->name[0])
7148 strcat(string, type->name);
7151 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
7157 strcat(string, name);
7162 static void PrintAttribs(struct Type * type, char * string)
7167 strcat(string, "dllexport ");
7168 if(type->attrStdcall)
7169 strcat(string, "stdcall ");
7173 static struct Type * FindMember(struct Type * type, char * string)
7175 struct Type * memberType;
7177 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7179 if(!memberType->name)
7181 struct Type * subType = FindMember(memberType, string);
7186 else if(!strcmp(memberType->name, string))
7189 return (((void *)0));
7192 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
7194 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
7196 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
7198 unsigned int result = 0;
7203 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
7204 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
7208 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
7209 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7212 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)
7213 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7216 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)
7217 result = GetOpFloat(op, &op->__anon1.f);
7220 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)
7221 result = GetOpDouble(op, &op->__anon1.d);
7224 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)
7225 result = GetOpUInt64(op, &op->__anon1.ui64);
7228 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)
7229 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
7232 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7233 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7236 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
7237 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
7243 struct OpTable floatOps =
7245 (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)
7248 struct OpTable doubleOps =
7250 (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)
7253 struct OpTable intOps =
7255 (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)
7258 struct OpTable uintOps =
7260 (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)
7263 struct OpTable int64Ops =
7265 (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)
7268 struct OpTable uint64Ops =
7270 (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)
7273 struct OpTable shortOps =
7275 (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)
7278 struct OpTable ushortOps =
7280 (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)
7283 struct OpTable charOps =
7285 (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)
7288 struct OpTable ucharOps =
7290 (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)
7293 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
7295 struct Type * memberType;
7297 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
7299 if(!memberType->name)
7301 struct Type * subType = FindMember(memberType, string);
7305 *offset += memberType->offset;
7309 else if(!strcmp(memberType->name, string))
7311 *offset += memberType->offset;
7315 return (((void *)0));
7318 struct __ecereNameSpace__ecere__com__Module;
7320 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);
7322 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
7324 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);
7326 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);
7328 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
7330 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7335 struct __ecereNameSpace__ecere__sys__BTNode * parent;
7336 struct __ecereNameSpace__ecere__sys__BTNode * left;
7337 struct __ecereNameSpace__ecere__sys__BTNode * right;
7339 struct __ecereNameSpace__ecere__com__Instance * module;
7340 char * dataTypeString;
7341 struct Type * dataType;
7344 } __attribute__ ((gcc_struct));
7346 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);
7348 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
7350 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);
7352 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
7354 struct __ecereNameSpace__ecere__com__DefinedExpression;
7356 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
7358 struct __ecereNameSpace__ecere__com__DefinedExpression
7360 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
7361 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
7364 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7365 } __attribute__ ((gcc_struct));
7367 struct __ecereNameSpace__ecere__sys__BinaryTree;
7369 struct __ecereNameSpace__ecere__sys__BinaryTree
7371 struct __ecereNameSpace__ecere__sys__BTNode * root;
7373 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
7374 void (* FreeKey)(void * key);
7375 } __attribute__ ((gcc_struct));
7377 struct __ecereNameSpace__ecere__com__Class
7379 struct __ecereNameSpace__ecere__com__Class * prev;
7380 struct __ecereNameSpace__ecere__com__Class * next;
7386 unsigned int (* Constructor)(void * );
7387 void (* Destructor)(void * );
7390 struct __ecereNameSpace__ecere__com__Class * base;
7391 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
7392 struct __ecereNameSpace__ecere__sys__BinaryTree members;
7393 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
7394 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
7395 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
7396 struct __ecereNameSpace__ecere__sys__OldList derivatives;
7400 struct __ecereNameSpace__ecere__com__Instance * module;
7401 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
7402 const char * dataTypeString;
7403 struct Type * dataType;
7405 int defaultAlignment;
7406 void (* Initialize)();
7408 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
7409 const char * designerClass;
7410 unsigned int noExpansion;
7411 const char * defaultProperty;
7412 unsigned int comRedefinition;
7415 unsigned int internalDecl;
7417 unsigned int computeSize;
7418 short structAlignment;
7419 short pointerAlignment;
7420 int destructionWatchOffset;
7422 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
7423 int inheritanceAccess;
7424 const char * fullName;
7426 struct __ecereNameSpace__ecere__sys__OldList conversions;
7427 struct __ecereNameSpace__ecere__sys__OldList templateParams;
7428 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
7429 struct __ecereNameSpace__ecere__com__Class * templateClass;
7430 struct __ecereNameSpace__ecere__sys__OldList templatized;
7432 unsigned int isInstanceClass;
7433 unsigned int byValueSystemClass;
7434 } __attribute__ ((gcc_struct));
7436 struct __ecereNameSpace__ecere__com__NameSpace
7439 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
7440 struct __ecereNameSpace__ecere__com__NameSpace * left;
7441 struct __ecereNameSpace__ecere__com__NameSpace * right;
7443 struct __ecereNameSpace__ecere__com__NameSpace * parent;
7444 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
7445 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
7446 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
7447 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
7448 } __attribute__ ((gcc_struct));
7450 struct __ecereNameSpace__ecere__com__DataMember
7452 struct __ecereNameSpace__ecere__com__DataMember * prev;
7453 struct __ecereNameSpace__ecere__com__DataMember * next;
7455 unsigned int isProperty;
7458 struct __ecereNameSpace__ecere__com__Class * _class;
7459 const char * dataTypeString;
7460 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
7461 struct Type * dataType;
7465 struct __ecereNameSpace__ecere__sys__OldList members;
7466 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
7468 short structAlignment;
7469 short pointerAlignment;
7470 } __attribute__ ((gcc_struct));
7472 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7474 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7476 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
7478 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
7480 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
7482 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
7484 static void _DeclareType(struct External * neededFor, struct Type * type, unsigned int needDereference, unsigned int forFunctionDef, unsigned int fwdDecl)
7488 if(type->kind == 11)
7490 struct Type * param;
7492 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
7493 _DeclareType(neededFor, param, forFunctionDef, 0, fwdDecl);
7494 _DeclareType(neededFor, type->__anon1.__anon2.returnType, forFunctionDef, 0, fwdDecl);
7496 else if(type->kind == 13)
7497 _DeclareType(neededFor, type->__anon1.type, 0, 0, fwdDecl);
7498 else if(type->kind == 8)
7500 struct __ecereNameSpace__ecere__com__Class * c = type->__anon1._class->__anon1.registered;
7502 _DeclareStruct(neededFor, c ? c->fullName : "ecere::com::Instance", c ? c->type == 5 : 0, needDereference && c && c->type == 1, fwdDecl);
7504 else if(type->kind == 9 || type->kind == 10)
7506 struct Type * member;
7508 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7509 _DeclareType(neededFor, member, needDereference, forFunctionDef, fwdDecl);
7511 else if(type->kind == 12)
7512 _DeclareType(neededFor, type->__anon1.__anon4.arrayType, 1, 0, fwdDecl);
7516 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
7518 unsigned int status = 1;
7520 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))
7522 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
7523 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
7525 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
7527 struct Type * sourceType = source, * destType = dest;
7529 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
7530 sourceType = sourceType->__anon1.type;
7531 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
7532 destType = destType->__anon1.type;
7533 if(!destType->constant && sourceType->constant)
7537 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
7544 struct Operand GetOperand(struct Expression * exp)
7553 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
7556 struct Type * type = exp->expType;
7560 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))
7562 if(!type->__anon1._class->__anon1.registered->dataType)
7563 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7564 type = type->__anon1._class->__anon1.registered->dataType;
7566 if(exp->type == 3 && op.kind == 13)
7568 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
7572 else if(exp->isConstant && exp->type == 2)
7574 op.kind = type->kind;
7581 if(exp->__anon1.__anon1.constant[0] == '\'')
7583 op.__anon1.c = exp->__anon1.__anon1.constant[1];
7586 else if(type->isSigned)
7588 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7593 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7601 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7606 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7614 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7619 op.__anon1.ui = (unsigned int)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7627 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7632 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7640 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7645 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7653 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7658 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7664 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7665 op.__anon1.f = __ecereMethod_float_inf();
7666 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7667 op.__anon1.f = -__ecereMethod_float_inf();
7668 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7669 op.__anon1.f = __ecereMethod_float_nan();
7670 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7671 op.__anon1.f = -__ecereMethod_float_nan();
7673 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7677 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
7678 op.__anon1.d = __ecereMethod_double_inf();
7679 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
7680 op.__anon1.d = -__ecereMethod_double_inf();
7681 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
7682 op.__anon1.d = __ecereMethod_double_nan();
7683 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
7684 op.__anon1.d = -__ecereMethod_double_nan();
7686 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
7692 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
7702 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
7706 switch(_class->typeSize)
7709 if(!strcmp(_class->dataTypeString, "uint64"))
7710 v = (long long)*(uint64 *)ptr;
7712 v = *(long long *)ptr;
7715 if(!strcmp(_class->dataTypeString, "uint"))
7716 v = (long long)*(unsigned int *)ptr;
7718 v = (long long)*(int *)ptr;
7721 if(!strcmp(_class->dataTypeString, "uint16"))
7722 v = (long long)*(unsigned short *)ptr;
7724 v = (long long)*(short *)ptr;
7727 if(!strcmp(_class->dataTypeString, "byte"))
7728 v = (long long)*(unsigned char *)ptr;
7730 v = (long long)*(char *)ptr;
7736 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
7738 if(!type->isSigned && type->kind != 22 && type->kind != 23)
7739 ListAdd(specs, MkSpecifier(UNSIGNED));
7744 if(type->__anon1._class->__anon1.registered)
7746 if(!type->__anon1._class->__anon1.registered->dataType)
7747 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
7748 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
7753 ListAdd(specs, MkSpecifier(DOUBLE));
7756 ListAdd(specs, MkSpecifier(FLOAT));
7759 ListAdd(specs, MkSpecifier(CHAR));
7762 ListAdd(specs, MkSpecifier(_BOOL));
7765 ListAdd(specs, MkSpecifier(SHORT));
7768 ListAdd(specs, MkSpecifier(INT64));
7771 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
7774 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
7778 ListAdd(specs, MkSpecifier(INT));
7783 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
7787 if(printConst && type->constant)
7788 strcat(string, "const ");
7793 struct Symbol * c = type->__anon1._class;
7794 unsigned int isObjectBaseClass = !c || !c->string || !strcmp(c->string, "class");
7796 if(type->classObjectType == 2 && isObjectBaseClass)
7797 strcat(string, "typed_object");
7798 else if(type->classObjectType == 3 && isObjectBaseClass)
7799 strcat(string, "any_object");
7803 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
7805 if(type->byReference)
7806 strcat(string, " &");
7810 strcat(string, "void");
7813 strcat(string, type->isSigned ? "int" : "uint");
7816 strcat(string, type->isSigned ? "int64" : "uint64");
7819 strcat(string, type->isSigned ? "intptr" : "uintptr");
7822 strcat(string, type->isSigned ? "intsize" : "uintsize");
7825 strcat(string, type->isSigned ? "char" : "byte");
7828 strcat(string, "_Bool");
7831 strcat(string, type->isSigned ? "short" : "uint16");
7834 strcat(string, "float");
7837 strcat(string, "double");
7840 if(type->__anon1.__anon1.enumName)
7842 strcat(string, "struct ");
7843 strcat(string, type->__anon1.__anon1.enumName);
7845 else if(type->typeName)
7846 strcat(string, type->typeName);
7849 struct Type * member;
7851 strcat(string, "struct { ");
7852 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
7854 PrintType(member, string, 1, fullName);
7855 strcat(string, "; ");
7857 strcat(string, "}");
7861 if(type->__anon1.__anon1.enumName)
7863 strcat(string, "union ");
7864 strcat(string, type->__anon1.__anon1.enumName);
7866 else if(type->typeName)
7867 strcat(string, type->typeName);
7870 strcat(string, "union ");
7871 strcat(string, "(unnamed)");
7875 if(type->__anon1.__anon1.enumName)
7877 strcat(string, "enum ");
7878 strcat(string, type->__anon1.__anon1.enumName);
7880 else if(type->typeName)
7881 strcat(string, type->typeName);
7883 strcat(string, "int");
7886 strcat(string, "...");
7889 strcat(string, "subclass(");
7890 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
7891 strcat(string, ")");
7894 strcat(string, type->__anon1.templateParameter->identifier->string);
7897 strcat(string, "thisclass");
7900 strcat(string, "__builtin_va_list");
7906 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
7908 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
7910 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
7912 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
7914 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
7916 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
7918 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
7920 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
7922 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
7924 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
7926 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
7928 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
7930 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
7932 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
7934 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
7936 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
7938 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
7940 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
7942 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
7944 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
7946 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
7948 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
7950 struct __ecereNameSpace__ecere__com__Application
7953 const char * * argv;
7955 unsigned int isGUIApp;
7956 struct __ecereNameSpace__ecere__sys__OldList allModules;
7957 char * parsedCommand;
7958 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
7959 } __attribute__ ((gcc_struct));
7961 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)
7965 *curMember = (*curMember)->next;
7966 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
7968 *curMember = subMemberStack[--(*subMemberStackPos)];
7969 *curMember = (*curMember)->next;
7971 while((*curMember) && (*curMember)->isProperty)
7972 *curMember = (*curMember)->next;
7973 if(subMemberStackPos)
7975 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
7977 subMemberStack[(*subMemberStackPos)++] = *curMember;
7978 *curMember = (*curMember)->members.first;
7979 while(*curMember && (*curMember)->isProperty)
7980 *curMember = (*curMember)->next;
7988 if(subMemberStackPos && *subMemberStackPos)
7990 *curMember = subMemberStack[--(*subMemberStackPos)];
7991 *curMember = (*curMember)->next;
7995 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
7997 if(*curClass == _class)
7999 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
8001 *curMember = (*curClass)->membersAndProperties.first;
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;
8019 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
8021 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
8022 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
8023 struct __ecereNameSpace__ecere__com__NameSpace * child;
8027 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)))
8029 data = ScanGlobalData(child, name);
8037 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
8039 int nsLen = strlen(nameSpace);
8040 struct Symbol * symbol;
8042 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)))
8044 char * s = symbol->string;
8046 if(!strncmp(s, nameSpace, nsLen))
8051 for(c = strlen(s) - 1; c >= 0; c--)
8054 namePart = s + c + 1;
8055 if(!strcmp(namePart, name))
8063 return (((void *)0));
8066 unsigned int GetInt(struct Expression * exp, int * value2)
8068 struct Operand op2 = GetOperand(exp);
8070 return GetOpInt(&op2, value2);
8073 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
8075 struct Operand op2 = GetOperand(exp);
8077 return GetOpUInt(&op2, value2);
8080 unsigned int GetInt64(struct Expression * exp, long long * value2)
8082 struct Operand op2 = GetOperand(exp);
8084 return GetOpInt64(&op2, value2);
8087 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
8089 struct Operand op2 = GetOperand(exp);
8091 return GetOpUInt64(&op2, value2);
8094 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
8096 struct Operand op2 = GetOperand(exp);
8098 return GetOpIntPtr(&op2, value2);
8101 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
8103 struct Operand op2 = GetOperand(exp);
8105 return GetOpUIntPtr(&op2, value2);
8108 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
8110 struct Operand op2 = GetOperand(exp);
8112 return GetOpIntSize(&op2, value2);
8115 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
8117 struct Operand op2 = GetOperand(exp);
8119 return GetOpUIntSize(&op2, value2);
8122 unsigned int GetShort(struct Expression * exp, short * value2)
8124 struct Operand op2 = GetOperand(exp);
8126 return GetOpShort(&op2, value2);
8129 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
8131 struct Operand op2 = GetOperand(exp);
8133 return GetOpUShort(&op2, value2);
8136 unsigned int GetChar(struct Expression * exp, char * value2)
8138 struct Operand op2 = GetOperand(exp);
8140 return GetOpChar(&op2, value2);
8143 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
8145 struct Operand op2 = GetOperand(exp);
8147 return GetOpUChar(&op2, value2);
8150 unsigned int GetFloat(struct Expression * exp, float * value2)
8152 struct Operand op2 = GetOperand(exp);
8154 return GetOpFloat(&op2, value2);
8157 unsigned int GetDouble(struct Expression * exp, double * value2)
8159 struct Operand op2 = GetOperand(exp);
8161 return GetOpDouble(&op2, value2);
8164 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
8166 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8168 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
8169 PrintAttribs(type, string);
8170 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
8171 strcat(string, " const");
8172 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
8173 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8174 strcat(string, " (");
8175 if(type->kind == 13)
8177 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
8178 PrintAttribs(type->__anon1.type, string);
8180 if(type->kind == 13)
8182 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
8183 strcat(string, "*");
8185 strcat(string, " *");
8187 if(printConst && type->constant && type->kind == 13)
8188 strcat(string, " const");
8191 PrintTypeSpecs(type, string, fullName, printConst);
8194 void PrintExpression(struct Expression * exp, char * string)
8197 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8199 unsigned int backOutputLineNumbers = outputLineNumbers;
8201 outputLineNumbers = 0;
8203 OutputExpression(exp, f);
8204 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8205 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8207 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8208 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
8209 count = strlen(string);
8210 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
8211 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
8213 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
8214 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
8215 string[count] = '\0';
8216 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
8217 outputLineNumbers = backOutputLineNumbers;
8221 struct Type * Dereference(struct Type * source)
8223 struct Type * type = (((void *)0));
8227 if(source->kind == 13 || source->kind == 12)
8229 type = source->__anon1.type;
8230 source->__anon1.type->refCount++;
8232 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
8234 type = __extension__ ({
8235 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8237 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
8240 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
8246 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
8251 static struct Type * Reference(struct Type * source)
8253 struct Type * type = (((void *)0));
8257 type = __extension__ ({
8258 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
8260 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
8267 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
8269 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
8271 FreeExpContents(checkedExp);
8272 FreeType(checkedExp->expType);
8273 FreeType(checkedExp->destType);
8274 *checkedExp = *newExp;
8275 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
8276 checkedExp->prev = prev;
8277 checkedExp->next = next;
8280 void FinishTemplatesContext(struct Context * context)
8282 PopContext(context);
8283 FreeContext(context);
8284 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
8287 static __attribute__((unused)) void UnusedFunction()
8291 ((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);
8294 struct Expression * ParseExpressionString(char * expression)
8297 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
8298 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
8299 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8301 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8302 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
8303 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
8304 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
8306 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
8307 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
8309 parsedExpression = (((void *)0));
8311 expression_yyparse();
8312 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
8313 return parsedExpression;
8316 struct __ecereNameSpace__ecere__com__Module
8318 struct __ecereNameSpace__ecere__com__Instance * application;
8319 struct __ecereNameSpace__ecere__sys__OldList classes;
8320 struct __ecereNameSpace__ecere__sys__OldList defines;
8321 struct __ecereNameSpace__ecere__sys__OldList functions;
8322 struct __ecereNameSpace__ecere__sys__OldList modules;
8323 struct __ecereNameSpace__ecere__com__Instance * prev;
8324 struct __ecereNameSpace__ecere__com__Instance * next;
8330 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
8331 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
8332 } __attribute__ ((gcc_struct));
8334 static struct GlobalData * FindGlobalData(char * name)
8337 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
8339 nameSpace = globalData;
8340 for(c = 0; name[c]; c++)
8342 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
8344 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
8345 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
8347 strncpy(spaceName, name + start, c - start);
8348 spaceName[c - start] = '\0';
8349 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
8350 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
8352 return (((void *)0));
8353 nameSpace = newSpace;
8361 return ScanGlobalData(nameSpace, name + start);
8363 return (((void *)0));
8366 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
8369 char nameSpace[1024];
8370 const char * namePart;
8371 unsigned int gotColon = 0;
8373 nameSpace[0] = '\0';
8374 for(c = strlen(name) - 1; c >= 0; c--)
8380 namePart = name + c + 1;
8381 while(c >= 0 && name[c] == ':')
8385 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
8389 memcpy(nameSpace, name, c + 1);
8390 nameSpace[c + 1] = (char)0;
8391 return ScanWithNameSpace(tree, nameSpace, namePart);
8395 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8401 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
8405 return ScanWithNameSpace(tree, "", namePart);
8407 return (((void *)0));
8410 static void PrintArraySize(struct Type * arrayType, char * string)
8416 if(arrayType->__anon1.__anon4.enumClass)
8417 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
8418 else if(arrayType->__anon1.__anon4.arraySizeExp)
8419 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
8421 strcat(string, size);
8424 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
8429 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
8431 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
8432 strcat(string, ")");
8433 if(type->kind == 12)
8434 PrintArraySize(type, string);
8435 else if(type->kind == 11)
8437 struct Type * param;
8439 strcat(string, "(");
8440 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
8442 PrintType(param, string, 1, fullName);
8444 strcat(string, ", ");
8446 strcat(string, ")");
8448 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
8449 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
8452 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
8454 PrePrintType(type, string, fullName, (((void *)0)), printConst);
8455 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
8456 strcat(string, " ");
8457 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
8459 struct Symbol * _class = type->__anon1.__anon2.thisClass;
8461 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
8463 if(type->classObjectType == 1)
8464 strcat(string, "class");
8466 strcat(string, type->byReference ? "typed_object&" : "typed_object");
8468 else if(_class && _class->string)
8470 char * s = _class->string;
8476 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
8482 strcat(string, name);
8485 strcat(string, "::");
8487 if(printName && type->name)
8488 PrintName(type, string, fullName);
8489 PostPrintType(type, string, fullName);
8490 if(type->bitFieldCount)
8494 sprintf(count, ":%d", type->bitFieldCount);
8495 strcat(string, count);
8503 struct Conversion * prev, * next;
8504 struct __ecereNameSpace__ecere__com__Property * convert;
8506 struct Type * resultType;
8507 } __attribute__ ((gcc_struct));
8509 static void FreeConvert(struct Conversion * convert)
8511 if(convert->resultType)
8512 FreeType(convert->resultType);
8519 struct Enumerator * prev;
8520 struct Enumerator * next;
8521 struct Location loc;
8522 struct Identifier * id;
8523 struct Expression * exp;
8524 } __attribute__ ((gcc_struct));
8530 struct AsmField * prev;
8531 struct AsmField * next;
8532 struct Location loc;
8534 struct Expression * expression;
8535 struct Identifier * symbolic;
8536 } __attribute__ ((gcc_struct));
8538 struct ClassDefinition;
8542 struct Context * parent;
8543 struct __ecereNameSpace__ecere__sys__BinaryTree types;
8544 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
8545 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
8546 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
8549 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
8550 struct ClassDefinition * classDef;
8551 unsigned int templateTypesOnly;
8552 unsigned int hasNameSpace;
8553 } __attribute__ ((gcc_struct));
8557 struct External * prev;
8558 struct External * next;
8559 struct Location loc;
8561 struct Symbol * symbol;
8564 struct FunctionDefinition * function;
8565 struct ClassDefinition * _class;
8566 struct Declaration * declaration;
8567 char * importString;
8568 struct Identifier * id;
8569 struct DBTableDef * table;
8570 } __attribute__ ((gcc_struct)) __anon1;
8572 struct External * fwdDecl;
8573 struct __ecereNameSpace__ecere__com__Instance * outgoing;
8574 struct __ecereNameSpace__ecere__com__Instance * incoming;
8575 int nonBreakableIncoming;
8576 } __attribute__ ((gcc_struct));
8578 struct ClassDefinition
8580 struct ClassDefinition * prev;
8581 struct ClassDefinition * next;
8582 struct Location loc;
8583 struct Specifier * _class;
8584 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
8585 struct __ecereNameSpace__ecere__sys__OldList * definitions;
8586 struct Symbol * symbol;
8587 struct Location blockStart;
8588 struct Location nameLoc;
8590 unsigned int deleteWatchable;
8591 } __attribute__ ((gcc_struct));
8593 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
8595 void __ecereMethod_External_CreateEdge(struct External * this, struct External * from, unsigned int soft);
8597 void DeclareGlobalData(struct External * neededFor, struct GlobalData * data)
8599 struct Symbol * symbol = data->symbol;
8601 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
8606 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
8609 data->dataType = ProcessTypeString(data->dataTypeString, 0);
8612 struct Declaration * decl;
8613 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
8614 struct Declarator * d;
8615 struct External * external;
8617 specifiers = MkList();
8618 declarators = MkList();
8619 ListAdd(specifiers, MkSpecifier(EXTERN));
8620 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
8621 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
8622 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
8623 decl = MkDeclaration(specifiers, declarators);
8624 external = MkExternalDeclaration(decl);
8626 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
8627 external->symbol = symbol;
8628 symbol->__anon2.__anon1.pointerExternal = external;
8629 DeclareType(external, data->dataType, 1, 1);
8632 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
8633 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, 0);
8636 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
8638 struct Context * ctx;
8639 struct Symbol * symbol = (((void *)0));
8641 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
8643 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
8645 symbol = (((void *)0));
8650 strcpy(curName, thisNameSpace);
8651 strcat(curName, "::");
8652 strcat(curName, name);
8653 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
8656 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
8659 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
8660 if(symbol || ctx == endContext)
8663 if(inCompiler && symbol && ctx == globalContext && symbol->__anon2.__anon1.pointerExternal && curExternal && symbol->__anon2.__anon1.pointerExternal != curExternal)
8664 __ecereMethod_External_CreateUniqueEdge(curExternal, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
8672 struct ClassDef * prev;
8673 struct ClassDef * next;
8674 struct Location loc;
8678 struct Declaration * decl;
8679 struct ClassFunction * function;
8680 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
8681 struct PropertyDef * propertyDef;
8682 struct PropertyWatch * propertyWatch;
8684 struct Identifier * defaultProperty;
8687 struct Identifier * id;
8688 struct Initializer * initializer;
8689 } __attribute__ ((gcc_struct)) __anon1;
8690 } __attribute__ ((gcc_struct)) __anon1;
8693 } __attribute__ ((gcc_struct));
8697 struct PropertyDef * prev;
8698 struct PropertyDef * next;
8699 struct Location loc;
8700 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
8701 struct Declarator * declarator;
8702 struct Identifier * id;
8703 struct Statement * getStmt;
8704 struct Statement * setStmt;
8705 struct Statement * issetStmt;
8706 struct Symbol * symbol;
8707 struct Expression * category;
8710 unsigned int conversion : 1;
8711 unsigned int isWatchable : 1;
8712 unsigned int isDBProp : 1;
8713 } __attribute__ ((gcc_struct)) __anon1;
8714 } __attribute__ ((gcc_struct));
8716 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
8718 struct ClassDef * def;
8721 for(def = (*definitions).first; def; def = def->next)
8725 struct Declaration * decl = def->__anon1.decl;
8727 if(decl && decl->__anon1.__anon1.specifiers)
8729 struct Specifier * spec;
8730 unsigned int isStruct = 0;
8732 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
8734 if(spec->type == 3 || spec->type == 4)
8736 if(spec->__anon1.__anon2.definitions)
8737 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
8743 struct Declarator * d = (((void *)0));
8745 if(decl->__anon1.__anon1.declarators)
8747 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
8749 struct Identifier * idDecl = GetDeclId(d);
8759 sprintf(id, "__anon%d", anonID++);
8760 if(!decl->__anon1.__anon1.declarators)
8761 decl->__anon1.__anon1.declarators = MkList();
8762 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
8772 typedef union YYSTYPE
8777 struct Identifier * id;
8778 struct Expression * exp;
8779 struct Specifier * specifier;
8780 struct __ecereNameSpace__ecere__sys__OldList * list;
8781 struct Enumerator * enumerator;
8782 struct Declarator * declarator;
8783 struct Pointer * pointer;
8784 struct Initializer * initializer;
8785 struct InitDeclarator * initDeclarator;
8786 struct TypeName * typeName;
8787 struct Declaration * declaration;
8788 struct Statement * stmt;
8789 struct FunctionDefinition * function;
8790 struct External * external;
8791 struct Context * context;
8792 struct AsmField * asmField;
8793 struct Attrib * attrib;
8794 struct ExtDecl * extDecl;
8795 struct Attribute * attribute;
8796 struct Instantiation * instance;
8797 struct MembersInit * membersInit;
8798 struct MemberInit * memberInit;
8799 struct ClassFunction * classFunction;
8800 struct ClassDefinition * _class;
8801 struct ClassDef * classDef;
8802 struct PropertyDef * prop;
8804 struct Symbol * symbol;
8805 struct PropertyWatch * propertyWatch;
8806 struct TemplateParameter * templateParameter;
8807 struct TemplateArgument * templateArgument;
8808 struct TemplateDatatype * templateDatatype;
8809 struct DBTableEntry * dbtableEntry;
8810 struct DBIndexItem * dbindexItem;
8811 struct DBTableDef * dbtableDef;
8812 } __attribute__ ((gcc_struct)) YYSTYPE;
8814 extern YYSTYPE yylval;
8818 struct MemberInit * prev;
8819 struct MemberInit * next;
8820 struct Location loc;
8821 struct Location realLoc;
8822 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
8823 struct Initializer * initializer;
8825 unsigned int variable;
8826 unsigned int takeOutExp;
8827 } __attribute__ ((gcc_struct));
8829 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
8831 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
8833 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
8835 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
8836 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
8841 const char * dataTypeString;
8843 } __attribute__ ((gcc_struct)) __anon1;
8844 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
8846 } __attribute__ ((gcc_struct));
8848 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
8850 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
8852 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
8853 struct __ecereNameSpace__ecere__com__Class * sClass;
8855 for(sClass = _class; sClass; sClass = sClass->base)
8858 if(sClass->templateClass)
8859 sClass = sClass->templateClass;
8860 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
8862 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
8864 for(sClass = sClass->base; sClass; sClass = sClass->base)
8866 if(sClass->templateClass)
8867 sClass = sClass->templateClass;
8868 id += sClass->templateParams.count;
8879 arg = &_class->templateArgs[id];
8880 if(arg && param->type == 0)
8881 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
8886 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
8888 struct Context * context = PushContext();
8890 context->templateTypesOnly = 1;
8891 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
8893 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
8895 for(; param; param = param->next)
8897 if(param->type == 0 && param->identifier)
8899 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
8901 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8907 struct __ecereNameSpace__ecere__com__Class * sClass;
8909 for(sClass = _class; sClass; sClass = sClass->base)
8911 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
8913 for(p = sClass->templateParams.first; p; p = p->next)
8917 struct TemplateParameter * param = p->param;
8918 struct TemplatedType * type;
8922 p->param = param = __extension__ ({
8923 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
8925 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
8928 type = __extension__ ({
8929 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
8931 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
8933 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
8941 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
8943 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8945 unsigned int first = 1;
8947 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8949 char className[1024];
8951 strcpy(className, _class->fullName);
8952 for(param = _class->templateParams.first; param; param = param->next)
8956 strcat(className, "<");
8958 strcat(className, ", ");
8959 if(lastParam + 1 != p)
8961 strcat(className, param->name);
8962 strcat(className, " = ");
8964 strcat(className, param->name);
8972 int len = strlen(className);
8974 if(className[len - 1] == '>')
8975 className[len++] = ' ';
8976 className[len++] = '>';
8977 className[len++] = '\0';
8979 return __ecereNameSpace__ecere__sys__CopyString(className);
8982 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
8985 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
8989 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
8991 unsigned int first = 1;
8993 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
8995 char className[1024];
8997 strcpy(className, _class->fullName);
8998 for(param = _class->templateParams.first; param; param = param->next)
9002 strcat(className, "<");
9004 strcat(className, ", ");
9005 if(lastParam + 1 != p)
9007 strcat(className, param->name);
9008 strcat(className, " = ");
9010 strcat(className, param->name);
9018 int len = strlen(className);
9020 if(className[len - 1] == '>')
9021 className[len++] = ' ';
9022 className[len++] = '>';
9023 className[len++] = '\0';
9025 type = MkClassType(className);
9029 type = MkClassType(_class->fullName);
9034 static int DeclareMembers(struct External * neededBy, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
9036 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
9037 struct __ecereNameSpace__ecere__com__DataMember * member;
9038 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
9040 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
9041 DeclareMembers(neededBy, _class->base, 0);
9042 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
9044 if(!member->isProperty)
9046 switch(member->type)
9050 if(!member->dataType && member->dataTypeString)
9051 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9052 if(member->dataType)
9053 DeclareType(neededBy, member->dataType, 1, 0);
9059 DeclareMembers(neededBy, (struct __ecereNameSpace__ecere__com__Class *)member, 1);
9066 FinishTemplatesContext(context);
9067 return topMember ? topMember->memberID : _class->memberID;
9070 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
9072 if(!method->dataType)
9074 struct Context * context = SetupTemplatesContext(method->_class);
9076 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9077 FinishTemplatesContext(context);
9078 if(method->type != 1 && method->dataType)
9080 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
9082 if(!method->_class->symbol)
9083 method->_class->symbol = FindClass(method->_class->fullName);
9084 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
9090 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
9094 struct Context * context = SetupTemplatesContext(prop->_class);
9096 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
9097 FinishTemplatesContext(context);
9101 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
9103 if(specs != (((void *)0)) && _class)
9105 struct Specifier * spec;
9107 for(spec = specs->first; spec; spec = spec->next)
9109 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
9112 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
9113 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
9119 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
9121 struct Identifier * id = exp->__anon1.__anon1.identifier;
9122 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9123 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
9124 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9125 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9127 if(_class && _class->type == 4)
9129 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
9130 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9134 struct __ecereNameSpace__ecere__com__Class * baseClass;
9136 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
9138 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
9140 for(value = e->values.first; value; value = value->next)
9142 if(!strcmp(value->name, id->string))
9147 exp->isConstant = 1;
9148 if(inCompiler || inPreCompiler || inDebugger)
9152 FreeExpContents(exp);
9154 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
9155 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
9157 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
9158 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9160 exp->expType = MkClassType(baseClass->fullName);
9168 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
9170 ProcessMethodType(method);
9171 exp->expType = __extension__ ({
9172 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
9174 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
9178 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
9181 ProcessPropertyType(prop);
9182 exp->expType = prop->dataType;
9184 prop->dataType->refCount++;
9187 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
9189 if(!member->dataType)
9190 member->dataType = ProcessTypeString(member->dataTypeString, 0);
9191 exp->expType = member->dataType;
9192 if(member->dataType)
9193 member->dataType->refCount++;
9196 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
9198 if(!classProp->dataType)
9199 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
9200 if(classProp->constant)
9202 FreeExpContents(exp);
9203 exp->isConstant = 1;
9204 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
9207 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
9214 sprintf(constant, "%d", (int)classProp->Get(_class));
9215 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
9221 exp->expType = classProp->dataType;
9222 if(classProp->dataType)
9223 classProp->dataType->refCount++;
9229 void DeclareProperty(struct External * neededBy, struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
9231 struct Symbol * symbol = prop->symbol;
9232 unsigned int imported = 0;
9233 unsigned int dllImport = 0;
9234 struct External * structExternal = (((void *)0));
9235 struct External * instExternal = (((void *)0));
9237 strcpy(setName, "__ecereProp_");
9238 FullClassNameCat(setName, prop->_class->fullName, 0);
9239 strcat(setName, "_Set_");
9240 FullClassNameCat(setName, prop->name, 1);
9241 strcpy(getName, "__ecereProp_");
9242 FullClassNameCat(getName, prop->_class->fullName, 0);
9243 strcat(getName, "_Get_");
9244 FullClassNameCat(getName, prop->name, 1);
9245 if(!symbol || symbol->_import)
9249 struct Symbol * classSym;
9251 if(!prop->_class->symbol)
9252 prop->_class->symbol = FindClass(prop->_class->fullName);
9253 classSym = prop->_class->symbol;
9254 if(classSym && !classSym->_import)
9256 struct ModuleImport * module;
9258 if(prop->_class->module)
9259 module = FindModule(prop->_class->module);
9261 module = mainModule;
9262 classSym->_import = __extension__ ({
9263 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9265 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
9267 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9269 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9270 symbol->_import = (struct ClassImport *)__extension__ ({
9271 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
9273 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
9276 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
9279 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)
9284 struct Context * context = SetupTemplatesContext(prop->_class);
9286 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
9287 FinishTemplatesContext(context);
9289 if((prop->Get && !symbol->__anon2.__anon2.externalGet) || (prop->Set && !symbol->__anon2.__anon2.externalSet))
9291 if(prop->_class->type == 0 && prop->_class->structSize)
9292 instExternal = DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
9293 structExternal = DeclareStruct((((void *)0)), prop->_class->fullName, prop->_class->type != 1, 0);
9295 if(prop->Get && !symbol->__anon2.__anon2.externalGet)
9297 struct Declaration * decl;
9298 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9299 struct Declarator * d;
9300 struct __ecereNameSpace__ecere__sys__OldList * params;
9301 struct Specifier * spec = (((void *)0));
9302 struct External * external;
9303 struct Declarator * typeDecl;
9304 unsigned int simple = 0;
9305 unsigned int needReference;
9307 specifiers = MkList();
9308 declarators = MkList();
9310 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9311 d = MkDeclaratorIdentifier(MkIdentifier(getName));
9313 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9315 struct Context * context = SetupTemplatesContext(prop->_class);
9317 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
9318 FinishTemplatesContext(context);
9320 needReference = !typeDecl || typeDecl->type == 1;
9321 for(spec = (*specifiers).first; spec; spec = spec->next)
9325 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9329 symbol->_class = classSym->__anon1.registered;
9330 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
9337 d = PlugDeclarator(typeDecl, d);
9340 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
9341 specifiers = MkList();
9343 d = MkDeclaratorFunction(d, params);
9345 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9346 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9347 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9349 ListAdd(specifiers, MkSpecifier(VOID));
9350 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9351 decl = MkDeclaration(specifiers, declarators);
9352 external = MkExternalDeclaration(decl);
9354 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9356 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9358 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9359 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9360 external->symbol = symbol;
9361 symbol->__anon2.__anon2.externalGet = external;
9362 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9364 FreeDeclarator(typeDecl);
9366 if(prop->Set && !symbol->__anon2.__anon2.externalSet)
9368 struct Declaration * decl;
9369 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9370 struct Declarator * d;
9371 struct __ecereNameSpace__ecere__sys__OldList * params;
9372 struct Specifier * spec = (((void *)0));
9373 struct External * external;
9374 struct Declarator * typeDecl;
9375 unsigned int needReference;
9377 declarators = MkList();
9379 if(!prop->conversion || prop->_class->type == 1)
9381 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
9383 specifiers = MkList();
9385 struct Context * context = SetupTemplatesContext(prop->_class);
9387 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
9388 FinishTemplatesContext(context);
9390 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
9391 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
9392 ListAdd(params, MkTypeName(specifiers, d));
9393 d = MkDeclaratorIdentifier(MkIdentifier(setName));
9395 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9396 d = MkDeclaratorFunction(d, params);
9397 needReference = !typeDecl || typeDecl->type == 1;
9398 for(spec = (*specifiers).first; spec; spec = spec->next)
9402 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
9405 symbol->_class = classSym->__anon1.registered;
9409 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9410 specifiers = MkList();
9412 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9413 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
9414 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9415 if(!prop->conversion || prop->_class->type == 1)
9416 ListAdd(specifiers, MkSpecifier(VOID));
9418 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
9419 decl = MkDeclaration(specifiers, declarators);
9420 external = MkExternalDeclaration(decl);
9422 __ecereMethod_External_CreateEdge(external, structExternal, 0);
9424 __ecereMethod_External_CreateEdge(external, instExternal, 0);
9426 DeclareStruct(external, spec->__anon1.__anon1.name, 0, needReference);
9427 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9428 external->symbol = symbol;
9429 symbol->__anon2.__anon2.externalSet = external;
9430 ReplaceThisClassSpecifiers(specifiers, prop->_class);
9432 if(!symbol->__anon2.__anon2.externalPtr)
9434 struct Declaration * decl;
9435 struct External * external;
9436 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
9437 char propName[1024];
9440 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
9443 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
9444 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
9446 ListAdd(specifiers, MkSpecifierName("Property"));
9447 strcpy(propName, "__ecereProp_");
9448 FullClassNameCat(propName, prop->_class->fullName, 0);
9449 strcat(propName, "_");
9450 FullClassNameCat(propName, prop->name, 1);
9452 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
9454 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9457 strcpy(propName, "__ecerePropM_");
9458 FullClassNameCat(propName, prop->_class->fullName, 0);
9459 strcat(propName, "_");
9460 FullClassNameCat(propName, prop->name, 1);
9461 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
9463 decl = MkDeclaration(specifiers, list);
9465 external = MkExternalDeclaration(decl);
9466 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
9467 external->symbol = symbol;
9468 symbol->__anon2.__anon2.externalPtr = external;
9470 if(inCompiler && neededBy)
9472 if(symbol->__anon2.__anon2.externalPtr)
9473 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalPtr, 0);
9474 if(symbol->__anon2.__anon2.externalGet)
9475 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalGet, symbol->__anon2.__anon2.externalGet->type == 0);
9476 if(symbol->__anon2.__anon2.externalSet)
9477 __ecereMethod_External_CreateUniqueEdge(neededBy, symbol->__anon2.__anon2.externalSet, symbol->__anon2.__anon2.externalSet->type == 0);
9481 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction);
9483 void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name)
9485 struct Symbol * symbol = method->symbol;
9487 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && (!symbol->__anon2.__anon3.methodCodeExternal || method->type == 1)))
9489 unsigned int dllImport = 0;
9491 if(!method->dataType)
9492 method->dataType = ProcessTypeString(method->dataTypeString, 0);
9494 if(!symbol || method->type == 1)
9496 struct Symbol * classSym;
9498 if(!method->_class->symbol)
9499 method->_class->symbol = FindClass(method->_class->fullName);
9500 classSym = method->_class->symbol;
9501 if(!classSym->_import)
9503 struct ModuleImport * module;
9505 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->name)
9506 module = FindModule(method->_class->module);
9508 module = mainModule;
9509 classSym->_import = __extension__ ({
9510 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
9512 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
9514 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
9518 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9520 if(!symbol->_import)
9522 symbol->_import = (struct ClassImport *)__extension__ ({
9523 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
9525 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
9527 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
9531 symbol->type = method->dataType;
9533 symbol->type->refCount++;
9536 if(!method->dataType->dllExport)
9538 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)
9544 struct Declaration * decl;
9545 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9546 struct Declarator * d;
9547 struct Declarator * funcDecl;
9548 struct External * external;
9550 specifiers = MkList();
9551 declarators = MkList();
9553 ListAdd(specifiers, MkSpecifier(EXTERN));
9554 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
9555 ListAdd(specifiers, MkSpecifier(STATIC));
9556 if(method->type == 1)
9558 ListAdd(specifiers, MkSpecifier(INT));
9559 d = MkDeclaratorIdentifier(MkIdentifier(name));
9563 d = MkDeclaratorIdentifier(MkIdentifier(name));
9565 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9567 struct Context * context = SetupTemplatesContext(method->_class);
9569 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
9570 FinishTemplatesContext(context);
9572 funcDecl = GetFuncDecl(d);
9575 struct Specifier * spec, * next;
9577 for(spec = (*specifiers).first; spec; spec = next)
9582 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9583 FreeSpecifier(spec);
9587 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
9589 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
9591 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
9592 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")));
9593 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
9594 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
9596 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
9598 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
9600 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
9601 FreeTypeName(param);
9603 if(!funcDecl->__anon1.function.parameters)
9604 funcDecl->__anon1.function.parameters = MkList();
9605 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
9609 ProcessDeclarator(d, 1);
9610 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9611 decl = MkDeclaration(specifiers, declarators);
9612 ReplaceThisClassSpecifiers(specifiers, method->_class);
9613 external = MkExternalDeclaration(decl);
9614 external->symbol = symbol;
9615 symbol->__anon2.__anon1.pointerExternal = external;
9616 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9617 DeclareStruct(external, method->_class->fullName, 1, 1);
9618 if(method->dataType)
9619 DeclareType(external, method->dataType, 1, 1);
9622 if(inCompiler && neededFor)
9624 struct External * external = symbol->__anon2.__anon1.pointerExternal ? symbol->__anon2.__anon1.pointerExternal : symbol->__anon2.__anon3.methodCodeExternal;
9626 __ecereMethod_External_CreateUniqueEdge(neededFor, external, external->type == 0);
9630 struct __ecereNameSpace__ecere__com__GlobalFunction;
9632 struct __ecereNameSpace__ecere__com__GlobalFunction
9634 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
9635 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
9638 struct __ecereNameSpace__ecere__com__Instance * module;
9639 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
9640 const char * dataTypeString;
9641 struct Type * dataType;
9643 } __attribute__ ((gcc_struct));
9645 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
9647 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);
9649 unsigned int DeclareFunction(struct External * neededFor, struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
9651 struct Symbol * symbol = function->symbol;
9653 if(!symbol || !symbol->__anon2.__anon1.pointerExternal)
9655 unsigned int imported = 0;
9656 unsigned int dllImport = 0;
9658 if(!function->dataType)
9660 function->dataType = ProcessTypeString(function->dataTypeString, 0);
9661 if(!function->dataType->__anon1.__anon2.thisClass)
9662 function->dataType->__anon1.__anon2.staticMethod = 1;
9668 struct ModuleImport * module = FindModule(function->module);
9670 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
9673 if(!function->dataType->dllExport)
9675 symbol->_import = (struct ClassImport *)__extension__ ({
9676 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
9678 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
9680 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
9684 symbol->type = ProcessTypeString(function->dataTypeString, 0);
9685 if(!symbol->type->__anon1.__anon2.thisClass)
9686 symbol->type->__anon1.__anon2.staticMethod = 1;
9689 imported = symbol->_import ? 1 : 0;
9690 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1)
9696 struct Declaration * decl;
9697 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
9698 struct Declarator * d;
9699 struct Declarator * funcDecl;
9700 struct External * external;
9702 specifiers = MkList();
9703 declarators = MkList();
9704 ListAdd(specifiers, MkSpecifier(EXTERN));
9705 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
9707 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
9708 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
9709 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType == 1)
9711 struct Specifier * spec;
9713 for(spec = (*specifiers).first; spec; spec = spec->next)
9714 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
9716 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
9717 FreeSpecifier(spec);
9721 funcDecl = GetFuncDecl(d);
9722 if(funcDecl && !funcDecl->__anon1.function.parameters)
9724 funcDecl->__anon1.function.parameters = MkList();
9725 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
9727 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
9729 struct Context * oldCtx = curContext;
9731 curContext = globalContext;
9732 decl = MkDeclaration(specifiers, declarators);
9733 curContext = oldCtx;
9735 external = MkExternalDeclaration(decl);
9736 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
9737 external->symbol = symbol;
9738 symbol->__anon2.__anon1.pointerExternal = external;
9739 DeclareType(external, function->dataType, 1, 1);
9743 if(inCompiler && neededFor && symbol && symbol->__anon2.__anon1.pointerExternal)
9744 __ecereMethod_External_CreateUniqueEdge(neededFor, symbol->__anon2.__anon1.pointerExternal, symbol->__anon2.__anon1.pointerExternal->type == 0);
9745 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;
9748 void DeclareFunctionUtil(struct External * neededBy, const char * s)
9750 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
9757 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
9758 strcpy(name, "__ecereFunction_");
9759 FullClassNameCat(name, s, 0);
9760 DeclareFunction(neededBy, function, name);
9763 FindSymbol(s, globalContext, globalContext, 0, 0);
9766 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
9768 char propName[1024], propNameM[1024];
9769 char getName[1024], setName[1024];
9770 struct __ecereNameSpace__ecere__sys__OldList * args;
9772 DeclareProperty(curExternal, prop, setName, getName);
9773 strcpy(propName, "__ecereProp_");
9774 FullClassNameCat(propName, prop->_class->fullName, 0);
9775 strcat(propName, "_");
9776 FullClassNameCat(propName, prop->name, 1);
9777 strcpy(propNameM, "__ecerePropM_");
9778 FullClassNameCat(propNameM, prop->_class->fullName, 0);
9779 strcat(propNameM, "_");
9780 FullClassNameCat(propNameM, prop->name, 1);
9781 if(prop->isWatchable)
9784 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9785 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9786 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9788 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9789 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9790 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
9791 DeclareFunctionUtil(curExternal, "eInstance_FireWatchers");
9795 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9796 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
9797 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9799 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
9800 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
9801 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
9802 DeclareFunctionUtil(curExternal, "eInstance_FireSelfWatchers");
9804 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
9805 curFunction->propSet->fireWatchersDone = 1;
9808 struct __ecereNameSpace__ecere__com__SubModule;
9810 struct __ecereNameSpace__ecere__com__SubModule
9812 struct __ecereNameSpace__ecere__com__SubModule * prev;
9813 struct __ecereNameSpace__ecere__com__SubModule * next;
9814 struct __ecereNameSpace__ecere__com__Instance * module;
9816 } __attribute__ ((gcc_struct));
9818 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
9820 struct __ecereNameSpace__ecere__com__SubModule * subModule;
9822 if(searchFor == searchIn)
9824 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
9826 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application)
9828 if(ModuleVisibility(subModule->module, searchFor))
9835 void ProcessExpressionType(struct Expression * exp);
9837 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
9839 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
9841 struct Identifier * id = exp->__anon1.__anon1.identifier;
9842 struct Context * ctx;
9843 struct Symbol * symbol = (((void *)0));
9845 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
9847 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
9849 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
9854 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))))
9856 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
9857 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
9858 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
9859 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
9863 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
9865 if(!prop && !method)
9866 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
9867 if(!prop && !method && !member)
9869 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
9871 if(prop || method || member || classProp)
9874 exp->__anon1.member.member = id;
9875 exp->__anon1.member.memberType = 0;
9876 exp->__anon1.member.exp = QMkExpId("this");
9879 else if(_class && _class->templateParams.first)
9881 struct __ecereNameSpace__ecere__com__Class * sClass;
9883 for(sClass = _class; sClass; sClass = sClass->base)
9885 if(sClass->templateParams.first)
9887 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
9889 for(param = sClass->templateParams.first; param; param = param->next)
9891 if(param->type == 2 && !strcmp(param->name, id->string))
9893 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
9897 struct Declarator * decl;
9898 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
9900 FreeIdentifier(exp->__anon1.member.member);
9901 ProcessExpressionType(argExp);
9902 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
9903 exp->expType = ProcessType(specs, decl);
9905 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
9916 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
9918 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
9920 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
9922 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
9923 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
9926 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
9927 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
9929 void * ptr = inst->data + dataMember->offset + offset;
9930 char * result = (((void *)0));
9932 exp->loc = member->loc = inst->loc;
9933 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
9934 if(!dataMember->dataType)
9935 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
9936 type = dataMember->dataType;
9939 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
9941 if(_class->type == 4)
9943 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
9947 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
9948 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
9950 for(item = e->values.first; item; item = item->next)
9952 if(item->data == GetEnumValue(_class, ptr))
9954 result = item->name;
9960 exp->__anon1.__anon1.identifier = MkIdentifier(result);
9962 exp->destType = MkClassType(_class->fullName);
9963 ProcessExpressionType(exp);
9967 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
9969 if(!_class->dataType)
9970 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
9971 type = _class->dataType;
9980 FreeExpContents(exp);
9981 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
9987 FreeExpContents(exp);
9988 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
9994 FreeExpContents(exp);
9995 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10001 FreeExpContents(exp);
10002 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10008 FreeExpContents(exp);
10009 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10015 FreeExpContents(exp);
10016 exp->__anon1.__anon1.constant = PrintInt64((long long)*(ssize_t *)ptr);
10021 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10024 ListAdd(memberList, member);
10026 if(parentDataMember->type == 1)
10031 void CheckTemplateTypes(struct Expression * exp)
10033 struct Expression * nbExp = GetNonBracketsExp(exp);
10035 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
10037 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10038 struct Context * context;
10039 int kind = exp->expType->kind;
10043 exp->destType->refCount++;
10045 exp->expType->refCount++;
10046 newExp->prev = (((void *)0));
10047 newExp->next = (((void *)0));
10048 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10050 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10052 if(c->type == 2 || c->type == 4 || c->type == 3)
10055 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10056 kind = c->dataType->kind;
10062 if(exp->destType->classObjectType)
10065 exp->destType->refCount--;
10067 exp->expType->refCount--;
10068 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10072 struct __ecereNameSpace__ecere__sys__OldList * specs;
10073 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10074 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10076 context = PushContext();
10077 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10078 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10079 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10081 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10082 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
10083 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
10084 exp->__anon1.compound->__anon1.compound.context = context;
10085 PopContext(context);
10090 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
10091 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))
10092 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
10094 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10099 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
10101 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10102 struct Context * context;
10103 int kind = exp->expType->kind;
10107 exp->destType->refCount++;
10109 exp->expType->refCount++;
10110 newExp->prev = (((void *)0));
10111 newExp->next = (((void *)0));
10112 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered)
10114 struct __ecereNameSpace__ecere__com__Class * c = exp->expType->__anon1._class->__anon1.registered;
10116 if(c->type == 2 || c->type == 4 || c->type == 3)
10119 c->dataType = ProcessTypeString(c->dataTypeString, 0);
10120 kind = c->dataType->kind;
10126 if(exp->destType->classObjectType)
10129 exp->destType->refCount--;
10131 exp->expType->refCount--;
10132 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10136 struct __ecereNameSpace__ecere__sys__OldList * specs;
10137 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
10138 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
10140 context = PushContext();
10141 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
10142 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
10143 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
10145 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
10146 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
10147 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
10148 exp->__anon1.compound->__anon1.compound.context = context;
10149 PopContext(context);
10154 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
10157 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10158 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)));
10159 ProcessExpressionType((*exp->__anon1.list).first);
10165 if(__ecereProp_Type_Get_isPointerType(exp->expType))
10167 exp->needTemplateCast = 2;
10168 newExp->needCast = 1;
10169 newExp->needTemplateCast = 2;
10170 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
10172 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
10173 exp->needTemplateCast = 2;
10174 newExp->needCast = 1;
10175 newExp->needTemplateCast = 2;
10176 ProcessExpressionType((*exp->__anon1.list).first);
10182 if(exp->expType->kind == 20)
10184 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
10188 FreeType(exp->destType);
10189 FreeType(exp->expType);
10190 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
10195 char typeString[1024];
10196 struct Declarator * decl;
10197 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
10199 typeString[0] = '\0';
10200 PrintType(exp->expType, typeString, 0, 0);
10201 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
10203 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
10204 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
10205 exp->__anon1.cast.exp->needCast = 1;
10206 exp->needTemplateCast = 2;
10207 newExp->needTemplateCast = 2;
10215 static void ProcessInitializer(struct Initializer * init, struct Type * type)
10220 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
10222 if(init->__anon1.exp && !init->__anon1.exp->destType)
10224 FreeType(init->__anon1.exp->destType);
10225 init->__anon1.exp->destType = type;
10229 if(init->__anon1.exp)
10231 ProcessExpressionType(init->__anon1.exp);
10232 init->isConstant = init->__anon1.exp->isConstant;
10238 struct Expression * exp = init->__anon1.exp;
10239 struct Instantiation * inst = exp->__anon1.instance;
10240 struct MembersInit * members;
10243 init->__anon1.list = MkList();
10246 for(members = (*inst->members).first; members; members = members->next)
10248 if(members->type == 0)
10250 struct MemberInit * member;
10252 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
10254 ListAdd(init->__anon1.list, member->initializer);
10255 member->initializer = (((void *)0));
10260 FreeExpression(exp);
10264 struct Initializer * i;
10265 struct Type * initializerType = (((void *)0));
10266 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
10267 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
10268 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
10269 int subMemberStackPos = 0;
10271 if(type && type->kind == 12)
10272 initializerType = Dereference(type);
10273 else if(type && (type->kind == 9 || type->kind == 10))
10274 initializerType = type->__anon1.__anon1.members.first;
10275 for(i = (*init->__anon1.list).first; i; i = i->next)
10277 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
10279 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
10282 if(!curMember->dataType)
10283 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
10284 initializerType = curMember->dataType;
10287 ProcessInitializer(i, initializerType);
10288 if(initializerType && type && (type->kind == 9 || type->kind == 10))
10289 initializerType = initializerType->next;
10291 init->isConstant = 0;
10293 if(type && type->kind == 12)
10294 FreeType(initializerType);
10295 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))
10297 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
10304 void PopulateInstance(struct Instantiation * inst)
10306 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
10307 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
10308 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10309 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
10312 inst->members = MkListOne(MkMembersInitList(memberList));
10314 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
10315 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10317 if(!dataMember->isProperty)
10319 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
10320 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
10323 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
10324 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
10325 struct Type * type;
10326 void * ptr = inst->data + dataMember->offset;
10327 char * result = (((void *)0));
10329 exp->loc = member->loc = inst->loc;
10330 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
10331 if(!dataMember->dataType)
10332 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10333 type = dataMember->dataType;
10334 if(type->kind == 8)
10336 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
10338 if(_class->type == 4)
10340 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
10344 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
10345 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
10347 for(item = e->values.first; item; item = item->next)
10349 if(item->data == GetEnumValue(_class, ptr))
10351 result = item->name;
10358 exp->__anon1.__anon1.identifier = MkIdentifier(result);
10360 exp->destType = MkClassType(_class->fullName);
10361 ProcessExpressionType(exp);
10364 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
10366 if(!_class->dataType)
10367 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
10368 type = _class->dataType;
10377 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
10383 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
10389 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
10395 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
10401 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
10406 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
10409 ListAdd(memberList, member);
10415 int ComputeTypeSize(struct Type * type);
10417 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
10419 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10420 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10422 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))
10424 int unionMemberOffset = 0;
10429 member->memberOffset = 0;
10430 if(targetBits < sizeof(void *) * 8)
10431 member->structAlignment = (short)0;
10433 else if(targetBits < sizeof(void *) * 8)
10434 _class->structAlignment = (short)0;
10435 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
10436 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
10437 if(!member && _class->destructionWatchOffset)
10438 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10440 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10442 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10444 if(!dataMember->isProperty)
10446 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
10448 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
10454 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
10456 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
10458 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
10460 if(!isMember && _class->type == 2 && dataMember->dataType)
10462 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
10466 ComputeTypeSize(dataMember->dataType);
10467 if(bitMember->pos == -1)
10468 bitMember->pos = _class->memberOffset;
10469 if(!bitMember->size)
10470 bitMember->size = dataMember->dataType->size * 8;
10471 _class->memberOffset = bitMember->pos + bitMember->size;
10472 for(d = 0; d < bitMember->size; d++)
10478 bitMember->mask = mask << bitMember->pos;
10480 else if(dataMember->type == 0 && dataMember->dataType)
10485 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)))
10486 ComputeTypeSize(dataMember->dataType);
10487 if(dataMember->dataType->bitFieldCount)
10489 bitFields += dataMember->dataType->bitFieldCount;
10496 int size = (bitFields + 7) / 8;
10500 int __simpleStruct0;
10504 short __simpleStruct0;
10506 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10507 if(member->memberOffset % alignment)
10508 member->memberOffset += alignment - (member->memberOffset % alignment);
10510 dataMember->offset = member->memberOffset;
10511 if(member->type == 1)
10512 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10515 member->memberOffset += size;
10522 short __simpleStruct0;
10524 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10525 if(_class->memberOffset % alignment)
10526 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10528 dataMember->offset = _class->memberOffset;
10529 _class->memberOffset += size;
10533 size = dataMember->dataType->size;
10534 alignment = dataMember->dataType->alignment;
10538 int __simpleStruct0;
10542 short __simpleStruct0;
10544 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10545 if(member->memberOffset % alignment)
10546 member->memberOffset += alignment - (member->memberOffset % alignment);
10548 dataMember->offset = member->memberOffset;
10549 if(member->type == 1)
10550 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10553 member->memberOffset += size;
10560 short __simpleStruct0;
10562 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10563 if(_class->memberOffset % alignment)
10564 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10566 dataMember->offset = _class->memberOffset;
10567 _class->memberOffset += size;
10574 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
10575 alignment = dataMember->structAlignment;
10578 int __simpleStruct0;
10582 short __simpleStruct0;
10584 if(member->memberOffset % alignment)
10585 member->memberOffset += alignment - (member->memberOffset % alignment);
10586 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10588 dataMember->offset = member->memberOffset;
10589 if(member->type == 1)
10590 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10592 member->memberOffset += dataMember->memberOffset;
10598 short __simpleStruct0;
10600 if(_class->memberOffset % alignment)
10601 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10602 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10604 dataMember->offset = _class->memberOffset;
10605 _class->memberOffset += dataMember->memberOffset;
10613 int size = (bitFields + 7) / 8;
10617 int __simpleStruct0;
10621 short __simpleStruct0;
10623 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10624 if(member->memberOffset % alignment)
10625 member->memberOffset += alignment - (member->memberOffset % alignment);
10627 if(member->type == 1)
10628 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
10631 member->memberOffset += size;
10638 short __simpleStruct0;
10640 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
10641 if(_class->memberOffset % alignment)
10642 _class->memberOffset += alignment - (_class->memberOffset % alignment);
10644 _class->memberOffset += size;
10649 if(member && member->type == 1)
10651 member->memberOffset = unionMemberOffset;
10655 if(_class->type != 2)
10659 if(_class->structAlignment)
10661 if(_class->memberOffset % _class->structAlignment)
10662 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
10664 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
10667 struct __ecereNameSpace__ecere__com__Property * prop;
10669 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
10671 if(prop->isProperty && prop->isWatchable)
10673 prop->watcherOffset = _class->structSize;
10674 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
10679 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
10681 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
10683 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
10685 if(deriv->computeSize)
10687 deriv->offset = _class->structSize;
10688 deriv->memberOffset = 0;
10689 deriv->structSize = deriv->offset;
10690 ComputeClassMembers(deriv, 0);
10698 FinishTemplatesContext(context);
10701 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)
10703 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
10704 unsigned int totalSize = 0;
10705 unsigned int maxSize = 0;
10708 struct __ecereNameSpace__ecere__com__DataMember * member;
10710 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
10714 if(!isMember && _class->base)
10716 maxSize = _class->structSize;
10718 if(_class->type == 1 || _class->type == 5)
10719 AddMembers(neededBy, declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
10722 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
10724 if(maxSize > baseSize)
10725 maxSize -= baseSize;
10731 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
10733 if(!member->isProperty)
10735 switch(member->type)
10739 if(member->dataTypeString)
10741 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
10742 struct Declarator * decl;
10744 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
10745 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
10746 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
10747 if(!member->dataType)
10748 member->dataType = ProcessType(specs, decl);
10749 ReplaceThisClassSpecifiers(specs, topClass);
10751 struct Type * type = ProcessType(specs, decl);
10753 DeclareType(neededBy, member->dataType, 1, 0);
10756 ComputeTypeSize(member->dataType);
10757 size = member->dataType->size;
10758 alignment = member->dataType->alignment;
10761 if(totalSize % alignment)
10762 totalSize += alignment - (totalSize % alignment);
10771 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
10774 sprintf(id, "__anon%d", anonID++);
10776 AddMembers(neededBy, list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
10777 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
10778 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
10779 alignment = member->structAlignment;
10782 if(totalSize % alignment)
10783 totalSize += alignment - (totalSize % alignment);
10793 unsigned int __simpleStruct0;
10795 if(topMember && topMember->type == 1)
10796 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
10798 *retSize += totalSize;
10800 else if(totalSize < maxSize && _class->type != 1000)
10802 int autoPadding = 0;
10804 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
10805 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
10806 if(totalSize + autoPadding < maxSize)
10808 char sizeString[50];
10810 sprintf(sizeString, "%d", maxSize - totalSize);
10811 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
10817 FinishTemplatesContext(context);
10818 return topMember ? topMember->memberID : _class->memberID;
10821 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)
10826 CheckConstCompatibility(source, dest, 1);
10827 if(source->kind == 20 && dest->kind != 20)
10829 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
10834 if(dest->kind == 20 && source->kind != 20)
10836 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
10841 if(dest->classObjectType == 2 && dest->kind != 11)
10843 if(source->classObjectType != 3)
10847 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
10855 if(source->kind != 11 && source->classObjectType == 3)
10857 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
10860 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
10862 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))
10865 if(dest->kind == 14 && source->kind != 0)
10867 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))
10869 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))
10871 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
10873 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
10875 if(conversions != (((void *)0)))
10877 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
10882 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
10884 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
10886 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
10888 if(sourceBase == destBase)
10892 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))
10896 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))
10898 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
10905 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
10909 if(source->kind == 8)
10911 struct __ecereNameSpace__ecere__com__Class * _class;
10913 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10915 struct __ecereNameSpace__ecere__com__Property * convert;
10917 for(convert = _class->conversions.first; convert; convert = convert->next)
10919 if(convert->memberAccess == 1 || _class->module == privateModule)
10921 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
10923 if(!convert->dataType)
10924 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10925 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))
10927 if(!conversions && !convert->Get)
10929 else if(conversions != (((void *)0)))
10931 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))
10935 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
10937 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
10946 if(dest->kind == 8)
10948 struct __ecereNameSpace__ecere__com__Class * _class;
10950 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
10952 struct __ecereNameSpace__ecere__com__Property * convert;
10954 for(convert = _class->conversions.first; convert; convert = convert->next)
10956 if(convert->memberAccess == 1 || _class->module == privateModule)
10958 struct Type * constType = (((void *)0));
10959 unsigned int success = 0;
10961 if(!convert->dataType)
10962 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
10963 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
10965 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10967 constType = __extension__ ({
10968 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
10970 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
10972 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
10973 ptrType->constant = 1;
10975 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
10977 if(!conversions && !convert->Set)
10979 else if(conversions != (((void *)0)))
10981 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))
10985 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
10987 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
10993 FreeType(constType);
10999 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
11001 if(!dest->__anon1._class->__anon1.registered->dataType)
11002 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
11003 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
11005 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))
11012 if(source->kind == 8)
11014 struct __ecereNameSpace__ecere__com__Class * _class;
11016 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
11018 struct __ecereNameSpace__ecere__com__Property * convert;
11020 for(convert = _class->conversions.first; convert; convert = convert->next)
11022 if(convert->memberAccess == 1 || _class->module == privateModule)
11024 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
11026 if(!convert->dataType)
11027 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
11028 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))
11030 if(!conversions && !convert->Get)
11032 else if(conversions != (((void *)0)))
11034 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))
11038 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
11040 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
11048 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
11050 if(!source->__anon1._class->__anon1.registered->dataType)
11051 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
11052 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
11054 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))
11056 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
11062 if(source->kind == 8 || source->kind == 19)
11064 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
11066 else if(dest->kind == 7 && source->kind == 6)
11068 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
11070 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
11072 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
11074 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
11076 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
11078 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))
11080 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))
11082 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)))
11084 struct Type * paramSource, * paramDest;
11086 if(dest->kind == 16)
11087 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
11088 if(source->kind == 16)
11089 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
11090 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
11091 dest = dest->__anon1.type;
11092 if(source->kind == 13 && source->__anon1.type->kind == 11)
11093 source = source->__anon1.type;
11094 if(dest->kind == 16)
11095 dest = dest->__anon1.__anon3.method->dataType;
11096 if(source->kind == 16)
11097 source = source->__anon1.__anon3.method->dataType;
11098 paramSource = source->__anon1.__anon2.params.first;
11099 if(paramSource && paramSource->kind == 0)
11100 paramSource = (((void *)0));
11101 paramDest = dest->__anon1.__anon2.params.first;
11102 if(paramDest && paramDest->kind == 0)
11103 paramDest = (((void *)0));
11104 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11106 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))))
11108 if(paramDest && paramDest->kind == 8)
11109 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
11111 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
11114 paramDest = paramDest->next;
11116 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
11118 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
11120 if(dest->__anon1.__anon2.thisClass)
11122 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
11124 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11130 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
11132 if(owningClassDest)
11133 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
11135 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
11139 paramSource = paramSource->next;
11143 if(dest->__anon1.__anon2.thisClass)
11145 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
11147 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
11153 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
11155 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
11161 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
11163 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
11167 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
11168 for(; paramDest; paramDest = paramDest->next)
11172 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
11176 struct Type * paramDestType = paramDest;
11177 struct Type * paramSourceType = paramSource;
11178 struct Type * type = paramDestType;
11180 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
11183 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
11184 struct __ecereNameSpace__ecere__com__Class * sClass;
11186 for(sClass = owningClassSource; sClass; sClass = sClass->base)
11189 if(sClass->templateClass)
11190 sClass = sClass->templateClass;
11191 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
11193 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
11195 for(sClass = sClass->base; sClass; sClass = sClass->base)
11197 if(sClass->templateClass)
11198 sClass = sClass->templateClass;
11199 id += sClass->templateParams.count;
11210 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
11212 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
11215 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)))
11220 PrintType(paramDest, type, 0, 1);
11221 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
11222 if(paramDestType != paramDest)
11223 FreeType(paramDestType);
11226 if(paramDestType != paramDest)
11227 FreeType(paramDestType);
11229 paramSource = paramSource->next;
11233 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
11238 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
11242 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
11244 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))
11246 ComputeTypeSize(source->__anon1.type);
11247 ComputeTypeSize(dest->__anon1.type);
11248 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))
11256 void ComputeInstantiation(struct Expression * exp)
11258 struct Instantiation * inst = exp->__anon1.instance;
11259 struct MembersInit * members;
11260 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11261 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11262 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11263 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11264 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11265 int subMemberStackPos = 0;
11268 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11272 if(_class->type == 0 || _class->type == 5)
11274 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11275 if(_class->type == 0)
11276 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11279 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11283 for(members = (*inst->members).first; members; members = members->next)
11285 switch(members->type)
11289 if(members->__anon1.dataMembers)
11291 struct MemberInit * member;
11293 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11295 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11296 unsigned int found = 0;
11297 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11298 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11299 unsigned int dataMemberOffset;
11303 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11306 if(curMember->isProperty)
11307 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11310 dataMember = curMember;
11311 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11312 if(_class->type == 0)
11313 dataMemberOffset += _class->base->structSize;
11320 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11324 if(prop->memberAccess == 1)
11326 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11327 curClass = prop->_class;
11332 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11333 int _subMemberStackPos = 0;
11335 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11339 if(dataMember->memberAccess == 1)
11341 curMember = dataMember;
11342 curClass = dataMember->_class;
11343 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11344 subMemberStackPos = _subMemberStackPos;
11349 if(found && member->initializer && member->initializer->type == 0)
11351 struct Expression * value = member->initializer->__anon1.exp;
11352 struct Type * type = (((void *)0));
11353 unsigned int deepMember = 0;
11357 type = prop->dataType;
11359 else if(dataMember)
11361 if(!dataMember->dataType)
11362 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11363 type = dataMember->dataType;
11365 if(ident && ident->next)
11368 for(ident = ident->next; ident && type; ident = ident->next)
11370 if(type->kind == 8)
11372 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11374 type = prop->dataType;
11377 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11379 type = dataMember->dataType;
11382 else if(type->kind == 9 || type->kind == 10)
11384 struct Type * memberType;
11386 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11388 if(!strcmp(memberType->name, ident->string))
11399 FreeType(value->destType);
11400 value->destType = type;
11403 ComputeExpression(value);
11405 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11407 if(type->kind == 8)
11409 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11411 if(_class && (_class->type == 2 || _class->type == 3 || _class->type == 4))
11413 if(!_class->dataType)
11414 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11415 type = _class->dataType;
11420 void * ptr = inst->data + dataMemberOffset;
11422 if(value->type == 2)
11428 GetInt(value, (int *)ptr);
11433 GetInt64(value, (long long *)ptr);
11438 GetIntPtr(value, (intptr_t *)ptr);
11443 GetIntSize(value, (ssize_t *)ptr);
11448 GetFloat(value, (float *)ptr);
11453 GetDouble(value, (double *)ptr);
11458 else if(value->type == 1)
11460 if(type->kind == 8)
11462 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11464 if(_class->type == 1)
11466 ComputeTypeSize(type);
11467 if(value->__anon1.instance->data)
11468 memcpy(ptr, value->__anon1.instance->data, type->size);
11473 else if(prop && prop->Set != (void *)(intptr_t)1)
11475 if(value->type == 1 && value->__anon1.instance->data)
11477 if(type->kind == 8)
11479 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11481 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)))
11483 void (* Set)(void *, void *) = (void *)prop->Set;
11485 Set(inst->data, value->__anon1.instance->data);
11486 PopulateInstance(inst);
11490 else if(value->type == 2)
11496 void (* Set)(void *, double) = (void *)prop->Set;
11498 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11503 void (* Set)(void *, float) = (void *)prop->Set;
11505 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11510 void (* Set)(void *, int) = (void *)prop->Set;
11512 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11517 void (* Set)(void *, long long) = (void *)prop->Set;
11519 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11524 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11526 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11531 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11533 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11538 else if(value->type == 3)
11542 ReadString(temp, value->__anon1.__anon2.string);
11543 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11547 else if(!deepMember && type && _class->type == 3)
11551 if(value->type == 2)
11553 if(type->kind == 8)
11555 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11557 if(_class->type == 3)
11559 if(!_class->dataType)
11560 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11561 type = _class->dataType;
11569 float (* Set)(float) = (void *)prop->Set;
11571 GetFloat(member->initializer->__anon1.exp, &fValue);
11572 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11579 double (* Set)(double) = (void *)prop->Set;
11581 GetDouble(member->initializer->__anon1.exp, &dValue);
11582 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11590 else if(!deepMember && type && _class->type == 2)
11594 if(value->type == 1 && value->__anon1.instance->data)
11596 unsigned int (* Set)(void *) = (void *)prop->Set;
11598 bits = Set(value->__anon1.instance->data);
11600 else if(value->type == 2)
11604 else if(dataMember)
11606 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11607 struct Type * type;
11610 bits = (bits & ~bitMember->mask);
11611 if(!bitMember->dataType)
11612 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11613 type = bitMember->dataType;
11614 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11616 if(!type->__anon1._class->__anon1.registered->dataType)
11617 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11618 type = type->__anon1._class->__anon1.registered->dataType;
11627 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11635 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11644 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11652 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11660 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11668 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11673 bits |= part << bitMember->pos;
11679 if(_class && _class->type == 3)
11681 ComputeExpression(member->initializer->__anon1.exp);
11682 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11684 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11694 if(_class && _class->type == 2)
11696 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11701 FreeInstance(inst);
11705 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11707 if(exp->__anon1.op.op == SIZEOF)
11709 FreeExpContents(exp);
11711 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11715 if(!exp->__anon1.op.exp1)
11717 switch(exp->__anon1.op.op)
11721 struct Expression * exp2 = exp->__anon1.op.exp2;
11723 exp->__anon1.op.exp2 = (((void *)0));
11724 FreeExpContents(exp);
11725 FreeType(exp->expType);
11726 FreeType(exp->destType);
11728 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11734 FreeExpContents(exp);
11735 op1->ops.Neg(exp, op1);
11739 if(op1->ops.BitNot)
11741 FreeExpContents(exp);
11742 op1->ops.BitNot(exp, op1);
11748 FreeExpContents(exp);
11749 op1->ops.Not(exp, op1);
11756 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11758 if(Promote(op2, op1->kind, op1->type->isSigned))
11759 op2->kind = op1->kind, op2->ops = op1->ops;
11760 else if(Promote(op1, op2->kind, op2->type->isSigned))
11761 op1->kind = op2->kind, op1->ops = op2->ops;
11763 switch(exp->__anon1.op.op)
11768 FreeExpContents(exp);
11769 op1->ops.Add(exp, op1, op2);
11775 FreeExpContents(exp);
11776 op1->ops.Sub(exp, op1, op2);
11782 FreeExpContents(exp);
11783 op1->ops.Mul(exp, op1, op2);
11789 FreeExpContents(exp);
11790 op1->ops.Div(exp, op1, op2);
11796 FreeExpContents(exp);
11797 op1->ops.Mod(exp, op1, op2);
11801 if(exp->__anon1.op.exp2)
11803 if(op1->ops.BitAnd)
11805 FreeExpContents(exp);
11806 op1->ops.BitAnd(exp, op1, op2);
11813 FreeExpContents(exp);
11814 op1->ops.BitOr(exp, op1, op2);
11818 if(op1->ops.BitXor)
11820 FreeExpContents(exp);
11821 op1->ops.BitXor(exp, op1, op2);
11825 if(op1->ops.LShift)
11827 FreeExpContents(exp);
11828 op1->ops.LShift(exp, op1, op2);
11832 if(op1->ops.RShift)
11834 FreeExpContents(exp);
11835 op1->ops.RShift(exp, op1, op2);
11841 FreeExpContents(exp);
11842 op1->ops.Equ(exp, op1, op2);
11848 FreeExpContents(exp);
11849 op1->ops.Nqu(exp, op1, op2);
11855 FreeExpContents(exp);
11856 op1->ops.And(exp, op1, op2);
11862 FreeExpContents(exp);
11863 op1->ops.Or(exp, op1, op2);
11869 FreeExpContents(exp);
11870 op1->ops.Grt(exp, op1, op2);
11876 FreeExpContents(exp);
11877 op1->ops.Sma(exp, op1, op2);
11881 if(op1->ops.GrtEqu)
11883 FreeExpContents(exp);
11884 op1->ops.GrtEqu(exp, op1, op2);
11888 if(op1->ops.SmaEqu)
11890 FreeExpContents(exp);
11891 op1->ops.SmaEqu(exp, op1, op2);
11899 void ApplyAnyObjectLogic(struct Expression * e)
11901 struct Type * destType = e->destType;
11903 if(destType && (destType->classObjectType == 3))
11905 if(e && e->expType)
11907 struct Type * type = e->expType;
11908 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
11910 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11912 _class = type->__anon1._class->__anon1.registered;
11914 else if(type->kind == 19)
11916 _class = FindClass("ecere::com::Class")->__anon1.registered;
11920 char string[1024] = "";
11921 struct Symbol * classSym;
11923 PrintTypeNoConst(type, string, 0, 1);
11924 classSym = FindClass(string);
11926 _class = classSym->__anon1.registered;
11928 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)))
11930 if(!_class || strcmp(_class->fullName, "char *"))
11932 struct Expression * checkedExp = e, * newExp;
11934 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
11936 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
11938 if(checkedExp->type == 23)
11940 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
11943 checkedExp = (*checkedExp->__anon1.list).last;
11945 else if(checkedExp->type == 11)
11946 checkedExp = checkedExp->__anon1.cast.exp;
11948 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
11950 newExp = checkedExp->__anon1.op.exp2;
11951 checkedExp->__anon1.op.exp2 = (((void *)0));
11952 FreeExpContents(checkedExp);
11953 if(e->expType && e->expType->passAsTemplate)
11957 ComputeTypeSize(e->expType);
11958 sprintf(size, "%d", e->expType->size);
11959 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))))));
11961 ReplaceExpContents(checkedExp, newExp);
11962 e->byReference = 1;
11964 else if(!e->byReference || (_class && _class->type == 5))
11966 struct Expression * checkedExp;
11969 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;
11971 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
11973 struct Context * context = PushContext();
11974 struct Declarator * decl;
11975 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
11976 char typeString[1024];
11977 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11979 typeString[0] = '\0';
11981 newExp->prev = (((void *)0));
11982 newExp->next = (((void *)0));
11983 newExp->expType = (((void *)0));
11984 PrintTypeNoConst(e->expType, typeString, 0, 1);
11985 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
11986 newExp->destType = ProcessType(specs, decl);
11987 curContext = context;
11991 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
11994 sprintf(name, "__internalValue%03X", internalValueCounter++);
11995 if(!curCompound->__anon1.compound.declarations)
11996 curCompound->__anon1.compound.declarations = MkList();
11997 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
11998 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
11999 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
12000 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
12003 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
12005 struct Type * type = e->destType;
12007 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12008 CopyTypeInto(e->destType, type);
12009 e->destType->refCount = 1;
12010 e->destType->classObjectType = 0;
12013 e->__anon1.compound->__anon1.compound.context = context;
12014 PopContext(context);
12015 curContext = context->parent;
12019 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
12021 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
12023 if(checkedExp->type == 23)
12025 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12028 checkedExp = (*checkedExp->__anon1.list).last;
12030 else if(checkedExp->type == 11)
12031 checkedExp = checkedExp->__anon1.cast.exp;
12034 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12036 *operand = *checkedExp;
12037 __ecereMethod_Expression_Clear(checkedExp);
12038 checkedExp->destType = ProcessTypeString("void *", 0);
12039 checkedExp->expType = checkedExp->destType;
12040 checkedExp->destType->refCount++;
12041 checkedExp->type = 4;
12042 checkedExp->__anon1.op.op = '&';
12043 checkedExp->__anon1.op.exp1 = (((void *)0));
12044 checkedExp->__anon1.op.exp2 = operand;
12053 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))))
12055 if(e->expType->classObjectType && destType && destType->classObjectType)
12061 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12064 thisExp->prev = (((void *)0));
12065 thisExp->next = (((void *)0));
12066 __ecereMethod_Expression_Clear(e);
12068 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
12069 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
12070 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
12072 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12073 CopyTypeInto(e->expType, thisExp->expType);
12074 e->expType->byReference = 0;
12075 e->expType->refCount = 1;
12076 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))
12078 e->expType->classObjectType = 0;
12083 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
12085 if(destType->kind == 14)
12087 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
12089 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))
12091 unsigned int byReference = e->expType->byReference;
12092 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12093 struct Declarator * decl;
12094 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12095 char typeString[1024];
12096 struct Type * type;
12097 int backupClassObjectType;
12098 unsigned int backupByReference;
12100 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
12104 backupClassObjectType = type->classObjectType;
12105 backupByReference = type->byReference;
12106 type->classObjectType = 0;
12107 type->byReference = 0;
12108 typeString[0] = '\0';
12109 PrintType(type, typeString, 0, 1);
12110 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
12111 type->classObjectType = backupClassObjectType;
12112 type->byReference = backupByReference;
12114 thisExp->prev = (((void *)0));
12115 thisExp->next = (((void *)0));
12116 __ecereMethod_Expression_Clear(e);
12117 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)))
12119 unsigned int passAsTemplate = thisExp->destType->passAsTemplate;
12122 destType->refCount++;
12124 e->__anon1.op.op = '*';
12125 e->__anon1.op.exp1 = (((void *)0));
12126 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
12127 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12128 CopyTypeInto(t, thisExp->destType);
12129 t->passAsTemplate = 0;
12130 FreeType(thisExp->destType);
12131 thisExp->destType = t;
12132 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12133 CopyTypeInto(t, destType);
12134 t->passAsTemplate = passAsTemplate;
12135 FreeType(destType);
12137 destType->refCount = 0;
12138 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12139 CopyTypeInto(e->expType, type);
12140 if(type->passAsTemplate)
12142 e->expType->classObjectType = 0;
12143 e->expType->passAsTemplate = 0;
12145 e->expType->byReference = 0;
12146 e->expType->refCount = 1;
12151 e->__anon1.cast.typeName = MkTypeName(specs, decl);
12152 e->__anon1.cast.exp = thisExp;
12153 e->byReference = 1;
12158 FreeType(e->destType);
12159 e->destType = destType;
12160 destType->refCount++;
12165 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
12167 struct __ecereNameSpace__ecere__com__Class * _class;
12168 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
12170 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->modules.first; subModule; subModule = subModule->next)
12171 ComputeModuleClasses(subModule->data);
12172 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->classes.first; _class; _class = _class->next)
12173 ComputeClassMembers(_class, 0);
12176 int ComputeTypeSize(struct Type * type)
12178 unsigned int size = type ? type->size : 0;
12180 if(!size && type && !type->computing)
12182 type->computing = 1;
12186 type->alignment = size = sizeof(char);
12189 type->alignment = size = sizeof(char);
12192 type->alignment = size = sizeof(int);
12195 type->alignment = size = sizeof(long long);
12198 type->alignment = size = targetBits / 8;
12199 type->pointerAlignment = 1;
12202 type->alignment = size = targetBits / 8;
12203 type->pointerAlignment = 1;
12206 type->alignment = size = sizeof(long);
12209 type->alignment = size = sizeof(short);
12212 type->alignment = size = sizeof(float);
12215 type->alignment = size = sizeof(double);
12219 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
12221 if(_class && _class->type == 1)
12223 ComputeClassMembers(_class, 0);
12224 type->alignment = _class->structAlignment;
12225 type->pointerAlignment = (unsigned int)_class->pointerAlignment;
12226 size = _class->structSize;
12227 if(type->alignment && size % type->alignment)
12228 size += type->alignment - (size % type->alignment);
12230 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
12232 if(!_class->dataType)
12233 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12234 size = type->alignment = ComputeTypeSize(_class->dataType);
12238 size = type->alignment = targetBits / 8;
12239 type->pointerAlignment = 1;
12245 size = type->alignment = targetBits / 8;
12246 type->pointerAlignment = 1;
12249 if(type->__anon1.__anon4.arraySizeExp)
12251 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
12252 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
12253 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)))
12255 struct Location oldLoc = yylloc;
12256 char expression[10240];
12258 expression[0] = '\0';
12259 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
12260 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
12262 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
12263 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
12266 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
12268 else if(type->__anon1.__anon4.enumClass)
12270 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
12272 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
12275 type->__anon1.__anon4.arraySize = 0;
12279 type->__anon1.__anon4.arraySize = 0;
12281 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
12282 if(type->__anon1.type)
12284 type->alignment = type->__anon1.type->alignment;
12285 type->pointerAlignment = type->__anon1.type->pointerAlignment;
12290 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12292 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12294 if(symbol && symbol->type)
12296 ComputeTypeSize(symbol->type);
12297 size = symbol->type->size;
12302 struct Type * member;
12304 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12306 int __simpleStruct0, __simpleStruct1;
12307 unsigned int addSize = ComputeTypeSize(member);
12309 member->offset = size;
12310 if(member->alignment && size % member->alignment)
12311 member->offset += member->alignment - (size % member->alignment);
12312 size = member->offset;
12313 if(member->pointerAlignment && type->size <= 4)
12314 type->pointerAlignment = 1;
12315 else if(!member->pointerAlignment && member->alignment >= 8)
12316 type->pointerAlignment = 0;
12317 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12320 if(type->alignment && size % type->alignment)
12321 size += type->alignment - (size % type->alignment);
12327 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
12329 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
12331 if(symbol && symbol->type)
12333 ComputeTypeSize(symbol->type);
12334 size = symbol->type->size;
12335 type->alignment = symbol->type->alignment;
12340 struct Type * member;
12342 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
12344 int __simpleStruct0, __simpleStruct1;
12345 unsigned int addSize = ComputeTypeSize(member);
12347 member->offset = size;
12348 if(member->alignment && size % member->alignment)
12349 member->offset += member->alignment - (size % member->alignment);
12350 size = member->offset;
12351 if(member->pointerAlignment && type->size <= 4)
12352 type->pointerAlignment = 1;
12353 else if(!member->pointerAlignment && member->alignment >= 8)
12354 type->pointerAlignment = 0;
12355 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
12356 size = ((size > addSize) ? size : addSize);
12358 if(type->alignment && size % type->alignment)
12359 size += type->alignment - (size % type->alignment);
12365 struct TemplateParameter * param = type->__anon1.templateParameter;
12366 struct Type * baseType = ProcessTemplateParameterType(param);
12370 size = ComputeTypeSize(baseType);
12371 type->alignment = baseType->alignment;
12372 type->pointerAlignment = baseType->pointerAlignment;
12375 type->alignment = size = sizeof(uint64);
12380 type->alignment = size = sizeof(enum
12388 type->alignment = size = targetBits / 8;
12389 type->pointerAlignment = 1;
12394 type->computing = 0;
12399 struct External * _DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference, unsigned int fwdDecl)
12401 struct External * external = (((void *)0));
12402 struct Symbol * classSym = FindClass(name);
12403 struct __ecereNameSpace__ecere__sys__OldList * curDeclarations = (((void *)0));
12404 struct Specifier * curSpec = (((void *)0));
12406 if(!inCompiler || !classSym)
12407 return (((void *)0));
12408 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
12409 return (((void *)0));
12410 if(!classSym->__anon1.registered || (classSym->__anon1.registered->type == 0 && classSym->__anon1.registered->structSize && classSym->__anon1.registered->base && classSym->__anon1.registered->base->base))
12411 _DeclareStruct(neededBy, "ecere::com::Instance", 0, 1, fwdDecl);
12412 external = classSym->__anon2.__anon1.structExternal;
12413 if(external && external->__anon1.declaration)
12415 struct Specifier * spec;
12417 for(spec = external->__anon1.declaration->__anon1.__anon1.specifiers ? (*external->__anon1.declaration->__anon1.__anon1.specifiers).first : (((void *)0)); spec; spec = spec->next)
12418 if(spec->type == 3 || spec->type == 4)
12421 curDeclarations = spec->__anon1.__anon2.definitions;
12425 if(classSym->__anon1.registered && !classSym->declaring && classSym->imported && (!classSym->declaredStructSym || (classSym->__anon1.registered->type == 5 && !skipNoHead && external && !curDeclarations)))
12427 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
12428 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
12429 char structName[1024];
12430 unsigned int addedPadding = 0;
12432 classSym->declaring++;
12433 if(strchr(classSym->string, '<'))
12435 if(classSym->__anon1.registered->templateClass)
12437 external = _DeclareStruct(neededBy, classSym->__anon1.registered->templateClass->fullName, skipNoHead, needDereference, fwdDecl);
12438 classSym->declaring--;
12442 structName[0] = (char)0;
12443 FullClassNameCat(structName, name, 0);
12444 classSym->declaredStructSym = 1;
12445 if(!external || (classSym->__anon1.registered->type == 5 && !skipNoHead && !curDeclarations))
12447 unsigned int add = 0;
12451 external = MkExternalDeclaration((((void *)0)));
12452 classSym->__anon2.__anon1.structExternal = external;
12453 external->symbol = classSym;
12458 declarations = MkList();
12459 AddMembers(external, declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
12461 if(declarations && (!(*declarations).count || ((*declarations).count == 1 && addedPadding)))
12463 FreeList(declarations, (void *)(FreeClassDef));
12464 declarations = (((void *)0));
12466 if(classSym->__anon1.registered->type != 5 && !declarations)
12468 FreeExternal(external);
12469 external = (((void *)0));
12470 classSym->__anon2.__anon1.structExternal = (((void *)0));
12475 curSpec->__anon1.__anon2.definitions = declarations;
12478 char className[1024];
12480 strcpy(className, "__ecereClass_");
12481 FullClassNameCat(className, classSym->string, 1);
12482 specifiers = MkList();
12483 declarators = MkList();
12484 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
12485 external->__anon1.declaration = MkDeclaration(specifiers, declarators);
12488 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12491 classSym->declaring--;
12493 else if(!classSym->declaredStructSym && classSym->__anon2.__anon1.structExternal)
12495 classSym->declaredStructSym = 1;
12496 if(classSym->__anon1.registered)
12497 DeclareMembers(classSym->__anon2.__anon1.structExternal, classSym->__anon1.registered, 0);
12498 if(classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
12500 struct Specifier * spec;
12502 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
12504 if(spec->__anon1.__anon2.definitions)
12505 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
12509 if(inCompiler && neededBy && (external || !classSym->imported))
12513 classSym->__anon2.__anon1.structExternal = external = MkExternalDeclaration((((void *)0)));
12514 external->symbol = classSym;
12515 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ast), external);
12519 struct External * e = external->fwdDecl ? external->fwdDecl : external;
12521 if(((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)e->incoming + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->count)
12522 __ecereMethod_External_CreateUniqueEdge(neededBy, e, !needDereference && !external->fwdDecl);
12525 __ecereMethod_External_CreateUniqueEdge(neededBy, external, !needDereference);
12530 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)
12532 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
12533 unsigned int found = 0;
12534 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
12535 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
12536 unsigned int freeType = 0;
12538 yylloc = member->loc;
12543 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
12547 dataMember = *curMember;
12553 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
12554 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
12555 int _subMemberStackPos = 0;
12558 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
12561 dataMember = thisMember;
12562 if(curMember && thisMember->memberAccess == 1)
12564 *curMember = thisMember;
12565 *curClass = thisMember->_class;
12566 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
12567 *subMemberStackPos = _subMemberStackPos;
12573 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
12574 if(method && method->type == 1)
12577 method = (((void *)0));
12582 struct Type * type = (((void *)0));
12586 if(!dataMember->dataType && dataMember->dataTypeString)
12588 struct Context * context = SetupTemplatesContext(_class);
12590 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
12591 FinishTemplatesContext(context);
12593 type = dataMember->dataType;
12597 if(!method->dataType)
12598 ProcessMethodType(method);
12599 type = method->dataType;
12601 if(ident && ident->next)
12603 for(ident = ident->next; ident && type; ident = ident->next)
12605 if(type->kind == 8)
12607 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
12609 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
12611 type = dataMember->dataType;
12613 else if(type->kind == 9 || type->kind == 10)
12615 struct Type * memberType;
12617 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
12619 if(!strcmp(memberType->name, ident->string))
12628 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
12631 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
12632 struct __ecereNameSpace__ecere__com__Class * sClass;
12634 for(sClass = _class; sClass; sClass = sClass->base)
12637 if(sClass->templateClass)
12638 sClass = sClass->templateClass;
12639 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
12641 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
12643 for(sClass = sClass->base; sClass; sClass = sClass->base)
12645 if(sClass->templateClass)
12646 sClass = sClass->templateClass;
12647 id += sClass->templateParams.count;
12658 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
12660 if(arg.__anon1.__anon1.dataTypeString)
12662 unsigned int constant = type->constant;
12664 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
12665 if(type->kind == 8 && constant)
12666 type->constant = 1;
12667 else if(type->kind == 13)
12669 struct Type * t = type->__anon1.type;
12671 while(t->kind == 13)
12672 t = t->__anon1.type;
12674 t->constant = constant;
12677 if(type && _class->templateClass)
12678 type->passAsTemplate = 1;
12685 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
12687 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
12688 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
12689 int paramCount = 0;
12690 int lastParam = -1;
12691 char templateString[1024];
12692 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
12694 sprintf(templateString, "%s<", expClass->templateClass->fullName);
12695 for(cClass = expClass; cClass; cClass = cClass->base)
12699 if(cClass->templateClass)
12700 cClass = cClass->templateClass;
12701 for(param = cClass->templateParams.first; param; param = param->next)
12704 struct __ecereNameSpace__ecere__com__Class * sClass;
12705 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
12707 for(sClass = cClass->base; sClass; sClass = sClass->base)
12709 if(sClass->templateClass)
12710 sClass = sClass->templateClass;
12711 id += sClass->templateParams.count;
12713 arg = expClass->templateArgs[id];
12714 for(sClass = _class; sClass; sClass = sClass->base)
12716 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
12718 struct __ecereNameSpace__ecere__com__Class * nextClass;
12720 if(sClass->templateClass)
12721 sClass = sClass->templateClass;
12722 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
12724 if(nextClass->templateClass)
12725 nextClass = nextClass->templateClass;
12726 p += nextClass->templateParams.count;
12728 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
12730 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
12732 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12734 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
12735 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
12742 char argument[256];
12744 argument[0] = '\0';
12745 switch(param->type)
12749 char expString[1024];
12750 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
12751 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
12752 struct Expression * exp;
12753 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
12755 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
12756 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
12757 ProcessExpressionType(exp);
12758 ComputeExpression(exp);
12759 expString[0] = '\0';
12760 PrintExpression(exp, expString);
12761 strcat(argument, expString);
12762 FreeExpression(exp);
12767 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
12772 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
12773 strcat(argument, arg.__anon1.__anon1.dataTypeString);
12780 strcat(templateString, ", ");
12781 if(lastParam != p - 1)
12783 strcat(templateString, param->name);
12784 strcat(templateString, " = ");
12786 strcat(templateString, argument);
12795 int len = strlen(templateString);
12797 if(templateString[len - 1] == '<')
12801 if(templateString[len - 1] == '>')
12802 templateString[len++] = ' ';
12803 templateString[len++] = '>';
12805 templateString[len++] = '\0';
12808 struct Context * context = SetupTemplatesContext(_class);
12812 type = ProcessTypeString(templateString, 0);
12814 FinishTemplatesContext(context);
12817 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
12819 ProcessExpressionType(member->initializer->__anon1.exp);
12820 if(!member->initializer->__anon1.exp->expType)
12824 char expString[10240];
12826 expString[0] = '\0';
12827 PrintExpression(member->initializer->__anon1.exp, expString);
12828 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
12829 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
12832 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
12834 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
12837 else if(member->initializer)
12839 ProcessInitializer(member->initializer, type);
12846 if(_class && _class->type == 3)
12848 if(member->initializer)
12850 struct Type * type = MkClassType(_class->fullName);
12852 ProcessInitializer(member->initializer, type);
12858 if(member->initializer)
12860 ProcessInitializer(member->initializer, (((void *)0)));
12866 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12870 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
12872 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
12876 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
12881 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
12883 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
12885 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)))
12887 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
12889 if(_class->type == 4)
12891 struct __ecereNameSpace__ecere__sys__OldList converts =
12895 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12898 if(!_class->symbol)
12899 _class->symbol = FindClass(_class->fullName);
12900 type->__anon1._class = _class->symbol;
12901 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))
12903 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12904 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12908 struct __ecereNameSpace__ecere__com__Class * baseClass;
12910 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
12912 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
12914 for(value = e->values.first; value; value = value->next)
12916 if(!strcmp(value->name, string))
12921 FreeType(sourceExp->expType);
12922 sourceExp->isConstant = 1;
12923 sourceExp->expType = MkClassType(baseClass->fullName);
12924 if(inCompiler || inPreCompiler || inDebugger)
12926 char constant[256];
12928 FreeExpContents(sourceExp);
12929 sourceExp->type = 2;
12930 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
12931 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
12933 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
12934 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
12936 while(converts.first)
12938 struct Conversion * convert = converts.first;
12940 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
12941 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
12943 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12950 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12951 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
12954 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)))
12955 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
12960 void ComputeExpression(struct Expression * exp)
12966 struct Identifier * id = exp->__anon1.__anon1.identifier;
12968 if(id && exp->isConstant && !inCompiler && !inPreCompiler && !inDebugger)
12970 struct __ecereNameSpace__ecere__com__Class * c = (exp->expType && exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
12972 if(c && c->type == 4)
12974 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
12978 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
12979 struct __ecereNameSpace__ecere__com__EnumClassData * e = (c ? ((void *)(((char *)c->data) + enumClass->offsetClass)) : (((void *)0)));
12981 for(value = e->values.first; value; value = value->next)
12983 if(!strcmp(value->name, id->string))
12988 const char * dts = c->dataTypeString;
12990 FreeExpContents(exp);
12992 exp->__anon1.__anon1.constant = (dts && (!strcmp(dts, "int") || !strcmp(dts, "int64") || !strcmp(dts, "short") || !strcmp(dts, "char"))) ? PrintInt64(value->data) : PrintUInt64(value->data);
13001 ComputeInstantiation(exp);
13006 struct Expression * exp1, * exp2 = (((void *)0));
13007 struct Operand op1 =
13014 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13017 struct Operand op2 =
13024 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13028 if(exp->__anon1.op.exp2)
13030 struct Expression * e = exp->__anon1.op.exp2;
13032 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
13034 if(e->type == 5 || e->type == 32 || e->type == 23)
13037 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13039 e = (*e->__anon1.list).last;
13042 if(exp->__anon1.op.op == 261 && e && e->expType)
13044 if(e->type == 3 && e->__anon1.__anon2.string)
13046 char * string = e->__anon1.__anon2.string;
13047 int len = strlen(string);
13048 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
13050 len = UnescapeString(tmp, string + 1, len - 2);
13051 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
13052 FreeExpContents(exp);
13054 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
13058 struct Type * type = e->expType;
13061 FreeExpContents(exp);
13063 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13069 ComputeExpression(exp->__anon1.op.exp2);
13071 if(exp->__anon1.op.exp1)
13073 ComputeExpression(exp->__anon1.op.exp1);
13074 exp1 = exp->__anon1.op.exp1;
13075 exp2 = exp->__anon1.op.exp2;
13076 op1 = GetOperand(exp1);
13078 op1.type->refCount++;
13081 op2 = GetOperand(exp2);
13083 op2.type->refCount++;
13088 exp1 = exp->__anon1.op.exp2;
13089 op1 = GetOperand(exp1);
13091 op1.type->refCount++;
13093 CallOperator(exp, exp1, exp2, &op1, &op2);
13095 FreeType(op1.type);
13097 FreeType(op2.type);
13103 struct Expression * e, * n;
13105 for(e = (*exp->__anon1.list).first; e; e = n)
13110 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
13111 struct Expression * prev = exp->prev;
13112 struct Expression * next = exp->next;
13114 ComputeExpression(e);
13115 FreeType(exp->expType);
13116 FreeType(exp->destType);
13120 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
13121 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
13132 struct Expression * memberExp = exp->__anon1.member.exp;
13133 struct Identifier * memberID = exp->__anon1.member.member;
13134 struct Type * type;
13136 ComputeExpression(exp->__anon1.member.exp);
13137 type = exp->__anon1.member.exp->expType;
13140 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)));
13141 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13142 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13143 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
13145 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
13146 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
13150 struct Symbol * classSym;
13153 PrintTypeNoConst(type, string, 0, 1);
13154 classSym = FindClass(string);
13155 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13157 if(exp->__anon1.member.member)
13159 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
13161 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
13163 if(!prop && !member && _class && exp->__anon1.member.member)
13165 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
13167 convertTo = _class;
13168 _class = classSym ? classSym->__anon1.registered : (((void *)0));
13169 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
13175 struct Type * type = prop->dataType;
13177 if(_class->type == 3)
13179 if(type->kind == 8)
13181 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13183 if(_class->type == 3)
13185 if(!_class->dataType)
13186 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13187 type = _class->dataType;
13195 float (* Get)(float) = (void *)prop->Get;
13197 GetFloat(exp->__anon1.member.exp, &value);
13198 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
13205 double (* Get)(double);
13207 GetDouble(exp->__anon1.member.exp, &value);
13209 Get = (void *)prop->Set;
13211 Get = (void *)prop->Get;
13212 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
13222 struct Expression * value = exp->__anon1.member.exp;
13223 struct Type * type;
13225 if(!prop->dataType)
13226 ProcessPropertyType(prop);
13227 type = prop->dataType;
13231 else if(_class->type == 1)
13237 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13239 if(propertyClass->type == 1 && value->type == 1)
13241 void (* Set)(void *, void *) = (void *)prop->Set;
13243 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13244 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13245 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13246 exp->__anon1.instance->loc = exp->loc;
13248 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
13249 PopulateInstance(exp->__anon1.instance);
13256 void (* Set)(void *, int) = (void *)prop->Set;
13258 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13259 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13260 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13261 exp->__anon1.instance->loc = exp->loc;
13263 GetInt(value, &intValue);
13264 Set(exp->__anon1.instance->data, intValue);
13265 PopulateInstance(exp->__anon1.instance);
13270 long long intValue;
13271 void (* Set)(void *, long long) = (void *)prop->Set;
13273 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13274 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13275 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13276 exp->__anon1.instance->loc = exp->loc;
13278 GetInt64(value, &intValue);
13279 Set(exp->__anon1.instance->data, intValue);
13280 PopulateInstance(exp->__anon1.instance);
13286 void (* Set)(void *, intptr_t) = (void *)prop->Set;
13288 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13289 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13290 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13291 exp->__anon1.instance->loc = exp->loc;
13293 GetIntPtr(value, &intValue);
13294 Set(exp->__anon1.instance->data, intValue);
13295 PopulateInstance(exp->__anon1.instance);
13301 void (* Set)(void *, ssize_t) = (void *)prop->Set;
13303 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13304 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13305 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13306 exp->__anon1.instance->loc = exp->loc;
13308 GetIntSize(value, &intValue);
13309 Set(exp->__anon1.instance->data, intValue);
13310 PopulateInstance(exp->__anon1.instance);
13316 void (* Set)(void *, float) = (void *)prop->Set;
13318 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13319 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13320 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13321 exp->__anon1.instance->loc = exp->loc;
13323 GetFloat(value, &floatValue);
13324 Set(exp->__anon1.instance->data, floatValue);
13325 PopulateInstance(exp->__anon1.instance);
13330 double doubleValue;
13331 void (* Set)(void *, double) = (void *)prop->Set;
13333 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13334 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13335 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13336 exp->__anon1.instance->loc = exp->loc;
13338 GetDouble(value, &doubleValue);
13339 Set(exp->__anon1.instance->data, doubleValue);
13340 PopulateInstance(exp->__anon1.instance);
13345 else if(_class->type == 2)
13351 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
13353 if(propertyClass->type == 1 && value->__anon1.instance->data)
13355 unsigned int (* Set)(void *) = (void *)prop->Set;
13356 unsigned int bits = Set(value->__anon1.instance->data);
13358 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13362 else if(_class->type == 2)
13364 unsigned int value;
13365 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
13368 GetUInt(exp->__anon1.member.exp, &value);
13370 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
13379 if(_class->type == 2)
13381 unsigned int value;
13383 GetUInt(exp->__anon1.member.exp, &value);
13388 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13390 if(_class->type == 1)
13392 void (* Get)(unsigned int, void *) = (void *)prop->Get;
13394 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13395 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13396 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13397 exp->__anon1.instance->loc = exp->loc;
13399 Get(value, exp->__anon1.instance->data);
13400 PopulateInstance(exp->__anon1.instance);
13402 else if(_class->type == 2)
13404 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
13405 uint64 bits = Get(value);
13407 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
13414 else if(_class->type == 1)
13416 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
13422 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13424 if(_class->type == 1 && value)
13426 void (* Get)(void *, void *) = (void *)prop->Get;
13428 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
13429 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
13430 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
13431 exp->__anon1.instance->loc = exp->loc;
13433 Get(value, exp->__anon1.instance->data);
13434 PopulateInstance(exp->__anon1.instance);
13445 exp->isConstant = 0;
13454 FreeExpression(memberExp);
13455 FreeIdentifier(memberID);
13461 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
13463 FreeExpContents(exp);
13464 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
13471 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
13473 if(classSym && classSym->__anon1.registered)
13475 if(classSym->__anon1.registered->fixed)
13477 FreeSpecifier(exp->__anon1._class);
13478 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
13483 char className[1024];
13485 strcpy(className, "__ecereClass_");
13486 FullClassNameCat(className, classSym->string, 1);
13487 DeclareClass(curExternal, classSym, className);
13488 FreeExpContents(exp);
13490 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
13491 exp->__anon1.member.member = MkIdentifier("structSize");
13498 struct Type * type;
13499 struct Expression * e = exp;
13501 if(exp->type == 11)
13503 if(exp->__anon1.cast.exp)
13504 ComputeExpression(exp->__anon1.cast.exp);
13505 e = exp->__anon1.cast.exp;
13507 if(e && exp->expType)
13509 type = exp->expType;
13510 if(type->kind == 8)
13512 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
13514 if(_class && (_class->type == 3 || _class->type == 2))
13516 if(!_class->dataType)
13517 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13518 type = _class->dataType;
13527 char value = (char)0;
13529 if(GetChar(e, &value))
13531 FreeExpContents(exp);
13532 exp->__anon1.__anon1.constant = PrintChar(value);
13538 unsigned char value = (unsigned char)0;
13540 if(GetUChar(e, &value))
13542 FreeExpContents(exp);
13543 exp->__anon1.__anon1.constant = PrintUChar(value);
13551 short value = (short)0;
13553 if(GetShort(e, &value))
13555 FreeExpContents(exp);
13556 exp->__anon1.__anon1.constant = PrintShort(value);
13562 unsigned short value = (unsigned short)0;
13564 if(GetUShort(e, &value))
13566 FreeExpContents(exp);
13567 exp->__anon1.__anon1.constant = PrintUShort(value);
13577 if(GetInt(e, &value))
13579 FreeExpContents(exp);
13580 exp->__anon1.__anon1.constant = PrintInt(value);
13586 unsigned int value = 0;
13588 if(GetUInt(e, &value))
13590 FreeExpContents(exp);
13591 exp->__anon1.__anon1.constant = PrintUInt(value);
13599 long long value = 0;
13601 if(GetInt64(e, &value))
13603 FreeExpContents(exp);
13604 exp->__anon1.__anon1.constant = PrintInt64(value);
13612 if(GetUInt64(e, &value))
13614 FreeExpContents(exp);
13615 exp->__anon1.__anon1.constant = PrintUInt64(value);
13623 intptr_t value = 0;
13625 if(GetIntPtr(e, &value))
13627 FreeExpContents(exp);
13628 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13634 uintptr_t value = 0;
13636 if(GetUIntPtr(e, &value))
13638 FreeExpContents(exp);
13639 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13649 if(GetIntSize(e, &value))
13651 FreeExpContents(exp);
13652 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
13660 if(GetUIntSize(e, &value))
13662 FreeExpContents(exp);
13663 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
13672 if(GetFloat(e, &value))
13674 FreeExpContents(exp);
13675 exp->__anon1.__anon1.constant = PrintFloat(value);
13684 if(GetDouble(e, &value))
13686 FreeExpContents(exp);
13687 exp->__anon1.__anon1.constant = PrintDouble(value);
13698 struct Operand op1 =
13705 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13708 struct Operand op2 =
13715 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13718 struct Operand op3 =
13725 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
13729 if(exp->__anon1.cond.exp)
13730 ComputeExpression((*exp->__anon1.cond.exp).last);
13731 if(exp->__anon1.cond.elseExp)
13732 ComputeExpression(exp->__anon1.cond.elseExp);
13733 if(exp->__anon1.cond.cond)
13734 ComputeExpression(exp->__anon1.cond.cond);
13735 op1 = GetOperand(exp->__anon1.cond.cond);
13737 op1.type->refCount++;
13738 op2 = GetOperand((*exp->__anon1.cond.exp).last);
13740 op2.type->refCount++;
13741 op3 = GetOperand(exp->__anon1.cond.elseExp);
13743 op3.type->refCount++;
13746 FreeExpContents(exp);
13747 op1.ops.Cond(exp, &op1, &op2, &op3);
13750 FreeType(op1.type);
13752 FreeType(op2.type);
13754 FreeType(op3.type);
13760 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
13762 struct __ecereNameSpace__ecere__com__Instance * module;
13764 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))
13766 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))
13768 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))
13770 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)
13772 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->publicNameSpace, sourceExp, dest, string, conversions))
13778 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
13780 struct Type * source;
13781 struct Type * realDest = dest;
13782 struct Type * backupSourceExpType = (((void *)0));
13783 struct Expression * computedExp = sourceExp;
13786 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)
13788 computedExp = CopyExpression(sourceExp);
13789 ComputeExpression(computedExp);
13791 source = sourceExp->expType;
13792 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
13794 if(computedExp != sourceExp)
13796 FreeExpression(computedExp);
13797 computedExp = sourceExp;
13802 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
13804 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
13806 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
13808 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
13810 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
13812 if(sourceBase == destBase)
13814 if(computedExp != sourceExp)
13816 FreeExpression(computedExp);
13817 computedExp = sourceExp;
13826 struct __ecereNameSpace__ecere__sys__OldList * specs;
13827 unsigned int flag = 0;
13828 long long value = (((int)0x7fffffff));
13830 source->refCount++;
13831 if(computedExp->type == 2)
13833 if(source->isSigned)
13834 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13836 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
13838 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
13840 if(source->isSigned)
13841 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13843 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
13845 if(computedExp != sourceExp)
13847 FreeExpression(computedExp);
13848 computedExp = sourceExp;
13850 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "unichar"))
13853 source = __extension__ ({
13854 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13856 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
13859 if(dest->kind == 8)
13861 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13863 if(_class && _class->type == 3)
13865 if(source->kind != 8)
13867 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13868 struct Type * tempDest, * tempSource;
13870 for(; _class->base->type != 1000; _class = _class->base)
13873 tempDest = tempType;
13874 tempType->kind = 8;
13875 if(!_class->symbol)
13876 _class->symbol = FindClass(_class->fullName);
13877 tempType->__anon1._class = _class->symbol;
13878 tempType->truth = dest->truth;
13879 if(tempType->__anon1._class)
13880 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13881 backupSourceExpType = sourceExp->expType;
13882 if(dest->passAsTemplate)
13884 sourceExp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13885 CopyTypeInto(sourceExp->expType, dest);
13886 sourceExp->expType->passAsTemplate = 0;
13890 sourceExp->expType = dest;
13894 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13897 if(_class && _class->type == 2 && source->kind != 8)
13899 if(!dest->__anon1._class->__anon1.registered->dataType)
13900 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
13901 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13904 FreeType(sourceExp->expType);
13905 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
13906 source->refCount++;
13909 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
13911 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13912 struct Declarator * decl;
13915 ReadString(string, sourceExp->__anon1.__anon2.string);
13916 decl = SpecDeclFromString(string, specs, (((void *)0)));
13917 FreeExpContents(sourceExp);
13918 FreeType(sourceExp->expType);
13919 sourceExp->type = 24;
13920 sourceExp->__anon1._classExp.specifiers = specs;
13921 sourceExp->__anon1._classExp.decl = decl;
13922 sourceExp->expType = dest;
13926 if(backupSourceExpType)
13927 FreeType(backupSourceExpType);
13931 else if(source->kind == 8)
13933 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
13935 if(_class && (_class->type == 3 || _class->type == 2))
13937 if(dest->kind != 8)
13939 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13940 struct Type * tempDest, * tempSource;
13942 if(!source->__anon1._class->__anon1.registered->dataType)
13943 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
13944 for(; _class->base->type != 1000; _class = _class->base)
13947 tempSource = tempType;
13948 tempType->kind = 8;
13949 tempType->__anon1._class = FindClass(_class->fullName);
13950 tempType->truth = source->truth;
13951 tempType->classObjectType = source->classObjectType;
13952 if(tempType->__anon1._class)
13953 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
13954 if(conversions && conversions->last)
13956 ((struct Conversion *)conversions->last)->resultType = dest;
13959 FreeType(sourceExp->expType);
13960 sourceExp->expType = MkClassType(_class->fullName);
13961 sourceExp->expType->truth = source->truth;
13962 sourceExp->expType->classObjectType = source->classObjectType;
13963 if(!sourceExp->destType)
13965 FreeType(sourceExp->destType);
13966 sourceExp->destType = sourceExp->expType;
13967 if(sourceExp->expType)
13968 sourceExp->expType->refCount++;
13970 if(!_class->dataType)
13971 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
13973 dest = MkClassType(source->__anon1._class->string);
13974 dest->truth = source->truth;
13975 dest->classObjectType = source->classObjectType;
13977 source = _class->dataType;
13978 source->refCount++;
13979 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
13985 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
13992 if(dest->kind == 8)
13994 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
13995 unsigned int fittingValue = 0;
13997 if(_class && _class->type == 4)
13999 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14000 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14002 if(c && value >= 0 && value <= c->largest)
14005 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
14007 if(_class->type == 0 || _class->type == 5)
14009 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14011 *newExp = *sourceExp;
14012 if(sourceExp->destType)
14013 sourceExp->destType->refCount++;
14014 if(sourceExp->expType)
14015 sourceExp->expType->refCount++;
14016 sourceExp->type = 11;
14017 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
14018 sourceExp->__anon1.cast.exp = newExp;
14019 FreeType(sourceExp->expType);
14020 sourceExp->expType = (((void *)0));
14021 ProcessExpressionType(sourceExp);
14024 FreeType(sourceExp->expType);
14025 sourceExp->expType = dest;
14030 if(backupSourceExpType)
14031 FreeType(backupSourceExpType);
14034 if(!_class->dataType)
14035 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
14037 dest = _class->dataType;
14040 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))
14042 specs = MkListOne(MkSpecifier(DOUBLE));
14044 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))
14046 specs = MkListOne(MkSpecifier(FLOAT));
14048 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))
14051 if(!dest->isSigned)
14052 ListAdd(specs, MkSpecifier(UNSIGNED));
14053 ListAdd(specs, MkSpecifier(INT64));
14055 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
14058 if(!dest->isSigned)
14059 ListAdd(specs, MkSpecifier(UNSIGNED));
14060 ListAdd(specs, MkSpecifier(INT));
14062 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14065 if(!dest->isSigned)
14066 ListAdd(specs, MkSpecifier(UNSIGNED));
14067 ListAdd(specs, MkSpecifier(SHORT));
14069 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
14072 if(!dest->isSigned)
14073 ListAdd(specs, MkSpecifier(UNSIGNED));
14074 ListAdd(specs, MkSpecifier(CHAR));
14080 if(backupSourceExpType)
14082 if(sourceExp->expType)
14083 FreeType(sourceExp->expType);
14084 sourceExp->expType = backupSourceExpType;
14089 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))
14091 specs = MkListOne(MkSpecifier(DOUBLE));
14093 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))
14095 specs = MkListOne(MkSpecifier(FLOAT));
14097 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
14100 ListAdd(specs, MkSpecifier(BOOL));
14102 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)))
14105 if(!dest->isSigned)
14106 ListAdd(specs, MkSpecifier(UNSIGNED));
14107 ListAdd(specs, MkSpecifier(CHAR));
14109 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)))))
14112 if(!dest->isSigned)
14113 ListAdd(specs, MkSpecifier(UNSIGNED));
14114 ListAdd(specs, MkSpecifier(SHORT));
14116 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
14119 if(!dest->isSigned)
14120 ListAdd(specs, MkSpecifier(UNSIGNED));
14121 ListAdd(specs, MkSpecifier(INT));
14123 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
14126 if(!dest->isSigned)
14127 ListAdd(specs, MkSpecifier(UNSIGNED));
14128 ListAdd(specs, MkSpecifier(INT64));
14130 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
14132 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
14138 if(backupSourceExpType)
14140 if(sourceExp->expType)
14141 FreeType(sourceExp->expType);
14142 sourceExp->expType = backupSourceExpType;
14146 if(!flag && !sourceExp->opDestType)
14148 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14150 *newExp = *sourceExp;
14151 newExp->prev = (((void *)0));
14152 newExp->next = (((void *)0));
14153 if(sourceExp->destType)
14154 sourceExp->destType->refCount++;
14155 if(sourceExp->expType)
14156 sourceExp->expType->refCount++;
14157 sourceExp->type = 11;
14158 if(realDest->kind == 8)
14160 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
14161 FreeList(specs, (void *)(FreeSpecifier));
14164 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
14165 if(newExp->type == 4)
14167 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
14170 sourceExp->__anon1.cast.exp = newExp;
14171 FreeType(sourceExp->expType);
14172 sourceExp->expType = (((void *)0));
14173 ProcessExpressionType(sourceExp);
14176 FreeList(specs, (void *)(FreeSpecifier));
14179 if(backupSourceExpType)
14180 FreeType(backupSourceExpType);
14185 if(computedExp != sourceExp)
14187 FreeExpression(computedExp);
14188 computedExp = sourceExp;
14190 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
14191 sourceExp = (*sourceExp->__anon1.list).last;
14192 if(sourceExp->type == 0)
14194 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
14196 if(dest->kind == 8)
14198 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
14200 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
14201 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
14205 for(; _class && _class->type == 4; _class = _class->base)
14207 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
14208 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
14210 for(value = e->values.first; value; value = value->next)
14212 if(!strcmp(value->name, id->string))
14217 FreeType(sourceExp->expType);
14218 sourceExp->isConstant = 1;
14219 sourceExp->expType = MkClassType(_class->fullName);
14220 if(inCompiler || inPreCompiler || inDebugger)
14222 FreeExpContents(sourceExp);
14223 sourceExp->type = 2;
14224 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
14225 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
14227 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
14236 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
14247 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
14249 unsigned int result = 1;
14253 struct __ecereNameSpace__ecere__sys__OldList converts =
14257 struct Conversion * convert;
14259 if(destType->kind == 0)
14261 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
14265 for(convert = converts.first; convert; convert = convert->next)
14267 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
14271 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14272 int objectType = exp->expType ? exp->expType->classObjectType : 0;
14275 newExp->prev = (((void *)0));
14276 newExp->next = (((void *)0));
14277 newExp->destType = (((void *)0));
14281 exp->addedThis = 1;
14282 exp->__anon1.member.exp = newExp;
14283 FreeType(exp->__anon1.member.exp->expType);
14284 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
14285 exp->__anon1.member.exp->expType->classObjectType = objectType;
14286 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
14287 exp->__anon1.member.memberType = 1;
14288 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14291 exp->expType->refCount++;
14292 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14298 exp->addedThis = 1;
14299 exp->__anon1.member.exp = newExp;
14300 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)
14302 newExp->byReference = 1;
14304 FreeType(exp->__anon1.member.exp->expType);
14305 exp->__anon1.member.exp->expType = (((void *)0));
14306 if(convert->convert->dataType)
14308 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14309 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
14310 exp->__anon1.member.exp->expType->refCount = 1;
14311 exp->__anon1.member.exp->expType->classObjectType = objectType;
14312 ApplyAnyObjectLogic(exp->__anon1.member.exp);
14314 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
14315 exp->__anon1.member.memberType = 4;
14316 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14318 if(convert->resultType)
14319 convert->resultType->refCount++;
14325 FreeType(exp->expType);
14328 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
14329 if(exp->destType->casted)
14332 exp->expType->refCount++;
14336 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
14337 if(exp->destType->casted)
14339 if(convert->resultType)
14340 convert->resultType->refCount++;
14344 if(exp->isConstant && inCompiler)
14345 ComputeExpression(exp);
14346 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
14348 if(!result && exp->expType && converts.count)
14350 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
14352 if(!result && exp->expType && exp->destType)
14354 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))
14361 static void ProcessFunction(struct FunctionDefinition * function);
14363 void ProcessInstantiationType(struct Instantiation * inst)
14365 yylloc = inst->loc;
14368 struct MembersInit * members;
14369 struct Symbol * classSym;
14370 struct __ecereNameSpace__ecere__com__Class * _class;
14372 classSym = inst->_class->__anon1.__anon1.symbol;
14373 _class = classSym ? classSym->__anon1.registered : (((void *)0));
14374 if(!_class || _class->type != 5)
14375 DeclareStruct(curExternal, inst->_class->__anon1.__anon1.name, 0, 1);
14376 afterExternal = afterExternal ? afterExternal : curExternal;
14378 ProcessExpressionType(inst->exp);
14379 inst->isConstant = 1;
14382 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
14383 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
14384 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
14385 int subMemberStackPos = 0;
14387 for(members = (*inst->members).first; members; members = members->next)
14389 switch(members->type)
14394 static unsigned int instMethodID = 0;
14395 struct External * external = curExternal;
14396 struct Context * context = curContext;
14397 struct Declarator * declarator = members->__anon1.function->declarator;
14398 struct Identifier * nameID = GetDeclId(declarator);
14399 char * unmangled = nameID ? nameID->string : (((void *)0));
14400 struct Expression * exp;
14401 struct External * createdExternal = (((void *)0));
14407 strcpy(name, "__ecereInstMeth_");
14408 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
14410 strcat(name, nameID->string);
14412 sprintf(number, "_%08d", instMethodID++);
14413 strcat(name, number);
14414 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
14418 struct Symbol * symbol = declarator->symbol;
14419 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
14421 if(method && method->type == 1)
14423 symbol->__anon1.method = method;
14424 ProcessMethodType(method);
14425 if(!symbol->type->__anon1.__anon2.thisClass)
14427 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
14429 if(!currentClass->symbol)
14430 currentClass->symbol = FindClass(currentClass->fullName);
14431 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
14435 if(!_class->symbol)
14436 _class->symbol = FindClass(_class->fullName);
14437 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
14440 DeclareType(curExternal, symbol->type, 1, 1);
14444 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
14447 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
14450 FreeSpecifier(nameID->_class);
14451 nameID->_class = (((void *)0));
14453 curExternal = createdExternal;
14456 if(createdExternal->__anon1.function)
14457 ProcessFunction(createdExternal->__anon1.function);
14459 else if(declarator)
14461 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
14462 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
14464 curExternal = external;
14465 curContext = context;
14468 FreeClassFunction(members->__anon1.function);
14469 exp = QMkExpId(name);
14471 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
14472 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
14478 if(members->__anon1.dataMembers && classSym)
14480 struct MemberInit * member;
14481 struct Location oldyyloc = yylloc;
14483 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
14485 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
14486 if(member->initializer && !member->initializer->isConstant)
14487 inst->isConstant = 0;
14499 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
14501 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct, unsigned int warnClasses)
14507 if(spec->__anon1.specifier == THISCLASS)
14512 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14513 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14514 ProcessSpecifier(spec, declareStruct, 0);
14521 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
14524 DeclareType(curExternal, symbol->type, 1, 1);
14525 else if(spec->__anon1.__anon1.symbol)
14527 struct __ecereNameSpace__ecere__com__Class * c = spec->__anon1.__anon1.symbol->__anon1.registered;
14529 if(warnClasses && !c)
14530 Compiler_Warning("Undeclared class %s\n", spec->__anon1.__anon1.name);
14531 DeclareStruct(curExternal, spec->__anon1.__anon1.name, c && c->type == 5, declareStruct && c && c->type == 1);
14537 struct Enumerator * e;
14539 if(spec->__anon1.__anon2.list)
14541 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
14544 ProcessExpressionType(e->exp);
14553 if(spec->__anon1.__anon2.definitions)
14555 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
14557 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
14564 static void ProcessDeclarator(struct Declarator * decl, unsigned int isFunction)
14569 if(decl->__anon1.identifier->classSym)
14571 FreeSpecifier(decl->__anon1.identifier->_class);
14572 decl->__anon1.identifier->_class = (((void *)0));
14576 if(decl->__anon1.array.exp)
14577 ProcessExpressionType(decl->__anon1.array.exp);
14585 struct Identifier * id = (((void *)0));
14586 struct Specifier * classSpec = (((void *)0));
14588 if(decl->type == 4)
14590 id = GetDeclId(decl);
14591 if(id && id->_class)
14593 classSpec = id->_class;
14594 id->_class = (((void *)0));
14597 if(decl->declarator)
14598 ProcessDeclarator(decl->declarator, isFunction);
14599 if(decl->type == 4)
14603 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(classSpec), param->declarator = (((void *)0)), param);
14605 if(!decl->__anon1.function.parameters)
14606 decl->__anon1.function.parameters = MkList();
14607 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
14609 if(decl->__anon1.function.parameters)
14611 struct TypeName * param;
14613 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
14615 if(param->qualifiers)
14617 struct Specifier * spec;
14619 for(spec = (*param->qualifiers).first; spec; spec = spec->next)
14621 if(spec->type == 0)
14623 if(spec->__anon1.specifier == TYPED_OBJECT)
14625 struct Declarator * d = param->declarator;
14626 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);
14629 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
14630 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14631 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
14632 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
14633 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
14634 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
14638 else if(spec->__anon1.specifier == ANY_OBJECT)
14640 struct Declarator * d = param->declarator;
14642 FreeList(param->qualifiers, (void *)(FreeSpecifier));
14643 param->qualifiers = MkListOne(MkSpecifier(VOID));
14645 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
14646 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
14649 else if(spec->__anon1.specifier == THISCLASS)
14654 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
14655 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
14656 ProcessSpecifier(spec, 0, 0);
14661 else if(spec->type == 1)
14663 ProcessSpecifier(spec, isFunction, 1);
14667 if(param->declarator)
14668 ProcessDeclarator(param->declarator, 0);
14677 static void ProcessDeclaration(struct Declaration * decl, unsigned int warnClasses)
14679 yylloc = decl->loc;
14684 unsigned int declareStruct = 0;
14686 if(decl->__anon1.__anon1.declarators)
14688 struct InitDeclarator * d;
14690 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14692 struct Type * type, * subType;
14694 ProcessDeclarator(d->declarator, 0);
14695 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14698 ProcessInitializer(d->initializer, type);
14699 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
14701 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
14703 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
14705 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
14706 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
14707 if(decl->__anon1.__anon1.specifiers)
14708 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
14709 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
14712 decl->__anon1.inst = inst;
14716 for(subType = type; subType; )
14718 if(subType->kind == 8)
14723 else if(subType->kind == 13)
14725 else if(subType->kind == 12)
14726 subType = subType->__anon1.__anon4.arrayType;
14735 if(decl->__anon1.__anon1.specifiers)
14737 struct Specifier * s;
14739 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
14741 ProcessSpecifier(s, declareStruct, 1);
14748 ProcessInstantiationType(decl->__anon1.inst);
14753 struct Specifier * spec;
14754 struct Declarator * d;
14755 unsigned int declareStruct = 0;
14757 if(decl->__anon1.__anon1.declarators)
14759 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
14761 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
14762 struct Type * subType;
14764 ProcessDeclarator(d, 0);
14765 for(subType = type; subType; )
14767 if(subType->kind == 8)
14772 else if(subType->kind == 13)
14774 else if(subType->kind == 12)
14775 subType = subType->__anon1.__anon4.arrayType;
14782 if(decl->__anon1.__anon1.specifiers)
14784 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
14785 ProcessSpecifier(spec, declareStruct, warnClasses);
14792 static void ProcessStatement(struct Statement * stmt)
14794 yylloc = stmt->loc;
14798 ProcessStatement(stmt->__anon1.labeled.stmt);
14801 if(stmt->__anon1.caseStmt.exp)
14803 FreeType(stmt->__anon1.caseStmt.exp->destType);
14804 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
14806 curSwitchType->refCount++;
14807 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
14808 ComputeExpression(stmt->__anon1.caseStmt.exp);
14810 if(stmt->__anon1.caseStmt.stmt)
14811 ProcessStatement(stmt->__anon1.caseStmt.stmt);
14815 if(stmt->__anon1.compound.context)
14817 struct Declaration * decl;
14818 struct Statement * s;
14819 struct Statement * prevCompound = curCompound;
14820 struct Context * prevContext = curContext;
14822 if(!stmt->__anon1.compound.isSwitch)
14823 curCompound = stmt;
14824 curContext = stmt->__anon1.compound.context;
14825 if(stmt->__anon1.compound.declarations)
14827 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
14828 ProcessDeclaration(decl, 1);
14830 if(stmt->__anon1.compound.statements)
14832 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
14833 ProcessStatement(s);
14835 curContext = prevContext;
14836 curCompound = prevCompound;
14842 struct Expression * exp;
14844 if(stmt->__anon1.expressions)
14846 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
14847 ProcessExpressionType(exp);
14853 struct Expression * exp;
14855 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
14856 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
14857 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
14858 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
14860 ProcessExpressionType(exp);
14862 if(stmt->__anon1.ifStmt.stmt)
14863 ProcessStatement(stmt->__anon1.ifStmt.stmt);
14864 if(stmt->__anon1.ifStmt.elseStmt)
14865 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
14870 struct Type * oldSwitchType = curSwitchType;
14872 if(stmt->__anon1.switchStmt.exp)
14874 struct Expression * exp;
14876 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
14880 ProcessExpressionType(exp);
14883 curSwitchType = exp->expType;
14886 ProcessStatement(stmt->__anon1.switchStmt.stmt);
14887 curSwitchType = oldSwitchType;
14892 if(stmt->__anon1.whileStmt.exp)
14894 struct Expression * exp;
14896 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
14897 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
14898 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
14899 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
14901 ProcessExpressionType(exp);
14904 if(stmt->__anon1.whileStmt.stmt)
14905 ProcessStatement(stmt->__anon1.whileStmt.stmt);
14910 if(stmt->__anon1.doWhile.exp)
14912 struct Expression * exp;
14914 if((*stmt->__anon1.doWhile.exp).last)
14916 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
14917 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
14918 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
14920 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
14922 ProcessExpressionType(exp);
14925 if(stmt->__anon1.doWhile.stmt)
14926 ProcessStatement(stmt->__anon1.doWhile.stmt);
14931 struct Expression * exp;
14933 if(stmt->__anon1.forStmt.init)
14934 ProcessStatement(stmt->__anon1.forStmt.init);
14935 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
14937 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
14938 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
14939 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
14941 if(stmt->__anon1.forStmt.check)
14942 ProcessStatement(stmt->__anon1.forStmt.check);
14943 if(stmt->__anon1.forStmt.increment)
14945 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
14946 ProcessExpressionType(exp);
14948 if(stmt->__anon1.forStmt.stmt)
14949 ProcessStatement(stmt->__anon1.forStmt.stmt);
14954 struct Identifier * id = stmt->__anon1.forEachStmt.id;
14955 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
14956 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
14957 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
14958 char iteratorType[1024];
14959 struct Type * source;
14960 struct Expression * e;
14961 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));
14962 struct Expression * arrayExp;
14963 const char * typeString = (((void *)0));
14964 int builtinCount = 0;
14966 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
14970 FreeType(e->destType);
14971 e->destType = ProcessTypeString("Container", 0);
14973 if(!isBuiltin || e->next)
14974 ProcessExpressionType(e);
14976 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
14977 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)))
14979 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
14980 struct Symbol * symbol;
14981 struct Expression * expIt = (((void *)0));
14982 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
14983 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
14984 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
14985 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
14990 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
14991 stmt->__anon1.compound.context->parent = curContext;
14992 curContext = stmt->__anon1.compound.context;
14994 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
14996 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
14998 isCustomAVLTree = 1;
14999 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
15002 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
15004 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
15006 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
15009 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
15011 if(inCompiler && isArray)
15013 struct Declarator * decl;
15014 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15016 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
15017 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15018 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
15022 struct Type * type = (((void *)0));
15023 char typeStringBuf[1024];
15025 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
15026 if(((struct Expression *)(*exp).last)->type == 11)
15028 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
15031 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
15033 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)
15035 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
15037 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
15039 else if(arrayExp->__anon1.list)
15041 struct Expression * e;
15043 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15045 ProcessExpressionType(e);
15055 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15059 e->expType = (((void *)0));
15060 e = (*arrayExp->__anon1.list).first;
15061 ProcessExpressionType(e);
15064 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
15066 FreeType(e->expType);
15067 e->expType = (((void *)0));
15069 type = (((void *)0));
15077 FreeType(e->expType);
15078 e->expType = (((void *)0));
15084 typeStringBuf[0] = '\0';
15085 PrintType(type, typeStringBuf, 0, 1);
15086 typeString = typeStringBuf;
15094 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
15095 struct Declarator * decl;
15096 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15098 if(arrayExp->__anon1.list)
15100 struct Expression * e;
15102 builtinCount = (*arrayExp->__anon1.list).count;
15103 type = ProcessTypeString(typeString, 0);
15104 while((e = (*arrayExp->__anon1.list).first))
15106 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
15107 e->destType = type;
15109 ProcessExpressionType(e);
15111 ListAdd(initializers, MkInitializerAssignment(e));
15114 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
15116 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
15117 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
15118 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
15119 FreeList(exp, (void *)(FreeExpression));
15121 else if(arrayExp->__anon1.list)
15123 struct Expression * e;
15125 type = ProcessTypeString(typeString, 0);
15126 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
15128 e->destType = type;
15130 ProcessExpressionType(e);
15137 arrayExp->expType = ProcessTypeString("Container", 0);
15138 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
15141 else if(inCompiler && isLinkList && !isList)
15143 struct Declarator * decl;
15144 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15146 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
15147 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
15148 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
15150 else if(inCompiler && _class->templateArgs)
15153 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
15155 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
15156 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)))))))));
15160 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
15163 switch(block->type)
15166 if(block->__anon1.compound.context)
15167 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15170 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
15171 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15172 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
15173 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15176 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
15177 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15180 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
15181 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15184 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
15185 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15188 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
15189 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15192 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
15193 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
15199 block = MkIfStmt(filter, block, (((void *)0)));
15203 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));
15204 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15205 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15206 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15212 sprintf(count, "%d", builtinCount);
15213 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));
15214 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15215 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15216 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15218 else if(isLinkList && !isList)
15220 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
15221 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
15223 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
15225 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));
15229 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15230 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
15232 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));
15234 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
15235 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
15236 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
15240 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
15242 ProcessExpressionType(expIt);
15243 if((*stmt->__anon1.compound.declarations).first)
15244 ProcessDeclaration((*stmt->__anon1.compound.declarations).first, 1);
15246 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
15247 ProcessStatement(stmt);
15250 ProcessStatement(stmt->__anon1.forEachStmt.stmt);
15252 curContext = stmt->__anon1.compound.context->parent;
15257 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
15269 struct Expression * exp;
15271 if(stmt->__anon1.expressions)
15273 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
15277 if(curFunction && !curFunction->type)
15278 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
15279 FreeType(exp->destType);
15280 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
15282 exp->destType->refCount++;
15284 ProcessExpressionType(exp);
15291 ProcessDeclaration(stmt->__anon1.decl, 1);
15296 struct AsmField * field;
15298 if(stmt->__anon1.asmStmt.inputFields)
15300 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
15301 if(field->expression)
15302 ProcessExpressionType(field->expression);
15304 if(stmt->__anon1.asmStmt.outputFields)
15306 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
15307 if(field->expression)
15308 ProcessExpressionType(field->expression);
15310 if(stmt->__anon1.asmStmt.clobberedFields)
15312 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
15314 if(field->expression)
15315 ProcessExpressionType(field->expression);
15322 struct PropertyWatch * propWatch;
15323 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15324 struct Expression * object = stmt->__anon1._watch.object;
15325 struct Expression * watcher = stmt->__anon1._watch.watcher;
15328 ProcessExpressionType(watcher);
15330 ProcessExpressionType(object);
15333 if(watcher || thisClass)
15335 struct External * external = curExternal;
15336 struct Context * context = curContext;
15339 stmt->__anon1.expressions = MkList();
15340 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15342 struct ClassFunction * func;
15343 char watcherName[1024];
15344 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;
15345 struct External * createdExternal;
15347 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
15348 if(propWatch->deleteWatch)
15349 strcat(watcherName, "_delete");
15352 struct Identifier * propID;
15354 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15356 strcat(watcherName, "_");
15357 strcat(watcherName, propID->string);
15360 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
15362 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)));
15363 ProcessClassFunctionBody(func, propWatch->compound);
15364 propWatch->compound = (((void *)0));
15365 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
15366 FreeClassFunction(func);
15367 curExternal = createdExternal;
15368 ProcessFunction(createdExternal->__anon1.function);
15369 if(propWatch->deleteWatch)
15371 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15373 ListAdd(args, CopyExpression(object));
15374 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15375 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
15376 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
15380 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
15381 struct Identifier * propID;
15383 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
15385 char propName[1024];
15386 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15390 char getName[1024], setName[1024];
15391 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15393 DeclareProperty(createdExternal, prop, setName, getName);
15394 strcpy(propName, "__ecereProp_");
15395 FullClassNameCat(propName, prop->_class->fullName, 0);
15396 strcat(propName, "_");
15397 FullClassNameCat(propName, prop->name, 1);
15398 ListAdd(args, CopyExpression(object));
15399 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15400 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15401 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
15402 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
15403 __ecereMethod_External_CreateUniqueEdge(external, createdExternal, 1);
15406 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15411 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
15413 curExternal = external;
15414 curContext = context;
15416 FreeExpression(watcher);
15418 FreeExpression(object);
15419 FreeList(watches, (void *)(FreePropertyWatch));
15422 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15426 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
15428 ProcessStatement(propWatch->compound);
15435 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15436 struct Expression * object = stmt->__anon1._watch.object;
15437 struct __ecereNameSpace__ecere__com__Class * _class;
15440 ProcessExpressionType(object);
15443 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
15446 struct Identifier * propID;
15449 stmt->__anon1.expressions = MkList();
15450 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
15452 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
15459 for(propID = (*watches).first; propID; propID = propID->next)
15461 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15465 CreateFireWatcher(prop, object, stmt);
15468 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15473 struct __ecereNameSpace__ecere__com__Property * prop;
15474 struct __ecereNameSpace__ecere__com__Class * base;
15476 for(base = _class; base; base = base->base)
15478 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
15480 if(prop->isProperty && prop->isWatchable)
15482 CreateFireWatcher(prop, object, stmt);
15488 FreeExpression(object);
15489 FreeList(watches, (void *)(FreeIdentifier));
15492 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15498 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
15499 struct Expression * object = stmt->__anon1._watch.object;
15500 struct Expression * watcher = stmt->__anon1._watch.watcher;
15501 struct __ecereNameSpace__ecere__com__Class * _class;
15504 ProcessExpressionType(object);
15506 ProcessExpressionType(watcher);
15509 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
15510 if(watcher || thisClass)
15514 struct Identifier * propID;
15517 stmt->__anon1.expressions = MkList();
15520 struct __ecereNameSpace__ecere__sys__OldList * args;
15523 ListAdd(args, CopyExpression(object));
15524 ListAdd(args, MkExpConstant("0"));
15525 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15526 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15530 for(propID = (*watches).first; propID; propID = propID->next)
15532 char propName[1024];
15533 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
15537 char getName[1024], setName[1024];
15538 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
15540 DeclareProperty(curExternal, prop, setName, getName);
15541 strcpy(propName, "__ecereProp_");
15542 FullClassNameCat(propName, prop->_class->fullName, 0);
15543 strcat(propName, "_");
15544 FullClassNameCat(propName, prop->name, 1);
15545 ListAdd(args, CopyExpression(object));
15546 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
15547 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
15548 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
15551 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
15555 FreeExpression(object);
15557 FreeExpression(watcher);
15558 FreeList(watches, (void *)(FreeIdentifier));
15561 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
15564 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
15571 void ComputeDataTypes()
15573 struct External * external;
15575 currentClass = (((void *)0));
15576 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
15577 DeclareStruct((((void *)0)), "ecere::com::Class", 0, 1);
15578 DeclareStruct((((void *)0)), "ecere::com::Instance", 0, 1);
15579 DeclareStruct((((void *)0)), "ecere::com::Property", 0, 1);
15580 DeclareStruct((((void *)0)), "ecere::com::DataMember", 0, 1);
15581 DeclareStruct((((void *)0)), "ecere::com::Method", 0, 1);
15582 DeclareStruct((((void *)0)), "ecere::com::SerialBuffer", 0, 1);
15583 DeclareStruct((((void *)0)), "ecere::com::ClassTemplateArgument", 0, 1);
15584 DeclareFunctionUtil((((void *)0)), "eSystem_New");
15585 DeclareFunctionUtil((((void *)0)), "eSystem_New0");
15586 DeclareFunctionUtil((((void *)0)), "eSystem_Renew");
15587 DeclareFunctionUtil((((void *)0)), "eSystem_Renew0");
15588 DeclareFunctionUtil((((void *)0)), "eSystem_Delete");
15589 DeclareFunctionUtil((((void *)0)), "eClass_GetProperty");
15590 DeclareFunctionUtil((((void *)0)), "eClass_SetProperty");
15591 DeclareFunctionUtil((((void *)0)), "eInstance_FireSelfWatchers");
15592 DeclareFunctionUtil((((void *)0)), "eInstance_SetMethod");
15593 DeclareFunctionUtil((((void *)0)), "eInstance_IncRef");
15594 DeclareFunctionUtil((((void *)0)), "eInstance_StopWatching");
15595 DeclareFunctionUtil((((void *)0)), "eInstance_Watch");
15596 DeclareFunctionUtil((((void *)0)), "eInstance_FireWatchers");
15597 for(external = (*ast).first; external; external = external->next)
15599 afterExternal = curExternal = external;
15600 if(external->type == 0)
15604 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15605 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15607 currentClass = external->__anon1.function->_class;
15608 ProcessFunction(external->__anon1.function);
15610 else if(external->type == 1)
15612 if(memoryGuard && external->__anon1.declaration && external->__anon1.declaration->type == 2)
15614 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15615 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15617 currentClass = (((void *)0));
15618 if(external->__anon1.declaration)
15619 ProcessDeclaration(external->__anon1.declaration, 1);
15621 else if(external->type == 2)
15623 struct ClassDefinition * _class = external->__anon1._class;
15625 currentClass = external->symbol->__anon1.registered;
15628 DeclareFunctionUtil(external, "MemoryGuard_PushLoc");
15629 DeclareFunctionUtil(external, "MemoryGuard_PopLoc");
15631 if(_class->definitions)
15633 ProcessClass(_class->definitions, _class->symbol);
15637 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
15638 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
15641 else if(external->type == 4)
15643 thisNameSpace = external->__anon1.id->string;
15646 currentClass = (((void *)0));
15647 thisNameSpace = (((void *)0));
15648 curExternal = (((void *)0));
15651 void ProcessExpressionType(struct Expression * exp)
15653 unsigned int unresolved = 0;
15654 struct Location oldyylloc = yylloc;
15655 unsigned int notByReference = 0;
15657 if(!exp || exp->expType)
15664 struct Identifier * id = exp->__anon1.__anon1.identifier;
15666 if(!id || !topContext)
15668 if(id->_class && id->_class->__anon1.__anon1.name)
15670 id->classSym = id->_class->__anon1.__anon1.symbol;
15672 if(!strcmp(id->string, "__runtimePlatform"))
15674 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
15677 else if(strstr(id->string, "__ecereClass") == id->string)
15679 exp->expType = ProcessTypeString("ecere::com::Class", 1);
15682 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
15684 ReplaceClassMembers(exp, thisClass);
15687 ProcessExpressionType(exp);
15690 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
15695 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15699 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
15705 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
15708 ProcessExpressionType(exp);
15712 else if(currentClass && !id->_class)
15714 if(ResolveIdWithClass(exp, currentClass, 1))
15717 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
15722 struct Type * type = symbol->type;
15723 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
15725 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
15727 struct Context * context = SetupTemplatesContext(_class);
15729 type = ReplaceThisClassType(_class);
15730 FinishTemplatesContext(context);
15732 type->refCount = 0;
15734 FreeSpecifier(id->_class);
15735 id->_class = (((void *)0));
15736 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15737 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
15738 id->classSym = (((void *)0));
15739 exp->expType = type;
15742 if(type && (type->kind == 15))
15743 exp->isConstant = 1;
15744 if(symbol->isParam || !strcmp(id->string, "this"))
15746 if(_class && _class->type == 1 && !type->declaredWithStruct)
15747 exp->byReference = 1;
15749 if(symbol->isIterator)
15751 if(symbol->isIterator == 3)
15754 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
15755 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
15756 exp->expType = (((void *)0));
15757 ProcessExpressionType(exp);
15759 else if(symbol->isIterator != 4)
15762 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
15763 exp->__anon1.member.exp->expType = exp->expType;
15764 exp->__anon1.member.member = MkIdentifier("data");
15765 exp->expType = (((void *)0));
15766 ProcessExpressionType(exp);
15773 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
15775 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15779 strcpy(name, thisNameSpace);
15780 strcat(name, "::");
15781 strcat(name, id->string);
15782 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
15785 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
15790 for(c = 0; c < definedExpStackPos; c++)
15791 if(definedExpStack[c] == definedExp)
15793 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
15795 struct Location backupYylloc = yylloc;
15796 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
15798 definedExpStack[definedExpStackPos++] = definedExp;
15799 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
15800 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
15801 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15803 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15804 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
15805 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
15806 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
15808 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
15809 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
15811 parsedExpression = (((void *)0));
15813 expression_yyparse();
15814 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
15816 fileInput = backInput;
15817 yylloc = backupYylloc;
15818 if(parsedExpression)
15820 FreeIdentifier(id);
15822 exp->__anon1.list = MkListOne(parsedExpression);
15823 ApplyLocation(parsedExpression, &yylloc);
15824 ProcessExpressionType(exp);
15825 definedExpStackPos--;
15828 definedExpStackPos--;
15834 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
15840 struct GlobalData * data = (((void *)0));
15842 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15846 strcpy(name, thisNameSpace);
15847 strcat(name, "::");
15848 strcat(name, id->string);
15849 data = FindGlobalData(name);
15852 data = FindGlobalData(id->string);
15855 DeclareGlobalData(curExternal, data);
15856 exp->expType = data->dataType;
15858 data->dataType->refCount++;
15859 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15860 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
15861 FreeSpecifier(id->_class);
15862 id->_class = (((void *)0));
15867 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
15869 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
15873 strcpy(name, thisNameSpace);
15874 strcat(name, "::");
15875 strcat(name, id->string);
15876 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
15879 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
15884 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15885 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
15887 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
15888 strcpy(name, "__ecereFunction_");
15889 FullClassNameCat(name, id->string, 0);
15890 if(DeclareFunction(curExternal, function, name))
15892 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
15893 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
15895 exp->expType = function->dataType;
15896 if(function->dataType)
15897 function->dataType->refCount++;
15898 FreeSpecifier(id->_class);
15899 id->_class = (((void *)0));
15911 if(!exp->__anon1.instance->_class)
15913 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
15915 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
15918 ProcessInstantiationType(exp->__anon1.instance);
15919 exp->isConstant = exp->__anon1.instance->isConstant;
15920 if(exp->__anon1.instance->_class)
15922 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
15930 char * constant = exp->__anon1.__anon1.constant;
15931 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
15933 exp->expType = type;
15934 if(constant[0] == '\'')
15936 if((int)((unsigned char *)constant)[1] > 127)
15939 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
15943 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
15944 exp->__anon1.__anon1.constant = PrintUInt(ch);
15946 type->__anon1._class = FindClass("unichar");
15947 type->isSigned = 0;
15952 type->isSigned = 1;
15957 char * dot = strchr(constant, '.');
15958 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
15963 exponent = strchr(constant, 'p');
15965 exponent = strchr(constant, 'P');
15969 exponent = strchr(constant, 'e');
15971 exponent = strchr(constant, 'E');
15973 if(dot || exponent)
15975 if(strchr(constant, 'f') || strchr(constant, 'F'))
15979 type->isSigned = 1;
15983 unsigned int isSigned = constant[0] == '-';
15984 char * endP = (((void *)0));
15985 long long i64 = strtoll(constant, &endP, 0);
15986 uint64 ui64 = strtoull(constant, &endP, 0);
15987 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
15988 unsigned int forceUnsigned = endP && (!strcmp(endP, "U") || !strcmp(endP, "u") || !strcmp(endP, "LLU") || !strcmp(endP, "llu") || !strcmp(endP, "ull") || !strcmp(endP, "ULL"));
15992 if(i64 < (((int)0x80000000)))
15997 if(ui64 > (((int)0x7fffffff)))
15999 if(ui64 > (0xffffffff))
16002 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
16006 else if(constant[0] != '0' || !constant[1])
16011 type->kind = is64Bit ? 4 : 3;
16012 type->isSigned = isSigned;
16015 exp->isConstant = 1;
16016 if(exp->destType && exp->destType->kind == 7)
16018 else if(exp->destType && exp->destType->kind == 6)
16020 else if(exp->destType && exp->destType->kind == 4)
16027 exp->isConstant = 1;
16028 exp->expType = __extension__ ({
16029 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16031 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
16032 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16034 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
16035 }), __ecereInstance2;
16041 ProcessExpressionType(exp->__anon1._new.size);
16042 exp->expType = __extension__ ({
16043 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16045 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
16047 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16051 ProcessExpressionType(exp->__anon1._renew.size);
16052 ProcessExpressionType(exp->__anon1._renew.exp);
16053 exp->expType = __extension__ ({
16054 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16056 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
16058 DeclareType(curExternal, exp->expType->__anon1.type, 1, 0);
16062 unsigned int assign = 0, boolResult = 0, boolOps = 0;
16063 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
16064 unsigned int useDestType = 0, useSideType = 0;
16065 struct Location oldyylloc = yylloc;
16066 unsigned int useSideUnit = 0;
16067 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
16068 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
16070 switch(exp->__anon1.op.op)
16124 if(exp->__anon1.op.exp1)
16131 if(exp->__anon1.op.op == '&')
16133 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
16135 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
16136 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
16138 if(symbol && symbol->isIterator == 2)
16141 exp->__anon1.member.exp = exp->__anon1.op.exp2;
16142 exp->__anon1.member.member = MkIdentifier("key");
16143 exp->expType = (((void *)0));
16144 exp->__anon1.op.exp2->expType = symbol->type;
16145 symbol->type->refCount++;
16146 ProcessExpressionType(exp);
16152 if(exp->__anon1.op.exp1)
16154 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
16156 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
16158 if(exp->__anon1.op.exp1->destType)
16159 FreeType(exp->__anon1.op.exp1->destType);
16160 exp->__anon1.op.exp1->destType = exp->destType;
16161 exp->__anon1.op.exp1->opDestType = 1;
16163 exp->destType->refCount++;
16167 if(exp->__anon1.op.exp1->destType)
16168 FreeType(exp->__anon1.op.exp1->destType);
16169 exp->__anon1.op.exp1->destType = dummy;
16172 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16173 exp->__anon1.op.exp1->destType->count++;
16174 ProcessExpressionType(exp->__anon1.op.exp1);
16175 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
16176 exp->__anon1.op.exp1->destType->count--;
16177 exp->__anon1.op.exp1->opDestType = 0;
16178 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)
16180 exp->__anon1.op.exp2 = MkExpConstant("1");
16181 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
16184 if(exp->__anon1.op.exp1->destType == dummy)
16187 exp->__anon1.op.exp1->destType = (((void *)0));
16189 type1 = exp->__anon1.op.exp1->expType;
16191 if(exp->__anon1.op.exp2)
16193 char expString[10240];
16195 expString[0] = '\0';
16196 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
16198 if(exp->__anon1.op.exp1)
16200 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
16201 if(exp->__anon1.op.exp1->expType)
16202 exp->__anon1.op.exp1->expType->refCount++;
16206 exp->__anon1.op.exp2->destType = exp->destType;
16207 if(!exp->__anon1.op.exp1 || (exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^'))
16208 exp->__anon1.op.exp2->opDestType = 1;
16210 exp->destType->refCount++;
16214 exp->expType = type1;
16219 PrintExpression(exp->__anon1.op.exp2, expString);
16220 if(type1 && type1->kind == 13)
16222 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)
16223 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
16224 else if(exp->__anon1.op.op == '=')
16226 if(exp->__anon1.op.exp2->destType)
16227 FreeType(exp->__anon1.op.exp2->destType);
16228 exp->__anon1.op.exp2->destType = type1;
16235 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)
16239 if(exp->__anon1.op.exp2->destType)
16240 FreeType(exp->__anon1.op.exp2->destType);
16241 exp->__anon1.op.exp2->destType = type1;
16248 exp->expType = type1;
16250 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
16252 if(exp->__anon1.op.exp2->destType)
16253 FreeType(exp->__anon1.op.exp2->destType);
16254 exp->__anon1.op.exp2->destType = exp->destType;
16255 if(exp->__anon1.op.op != '&' && exp->__anon1.op.op != '^')
16256 exp->__anon1.op.exp2->opDestType = 1;
16258 exp->destType->refCount++;
16262 if(exp->__anon1.op.exp2->destType)
16263 FreeType(exp->__anon1.op.exp2->destType);
16264 exp->__anon1.op.exp2->destType = dummy;
16267 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))
16269 FreeType(exp->__anon1.op.exp2->destType);
16270 exp->__anon1.op.exp2->destType = type1;
16273 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16274 exp->__anon1.op.exp2->destType->count++;
16275 if(exp->__anon1.op.op == SIZEOF)
16277 struct Expression * e = exp->__anon1.op.exp2;
16279 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
16281 if(e->type == 5 || e->type == 32 || e->type == 23)
16284 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
16286 e = (*e->__anon1.list).last;
16289 if(e->type == 11 && e->__anon1.cast.exp)
16290 e->__anon1.cast.exp->needCast = 1;
16292 ProcessExpressionType(exp->__anon1.op.exp2);
16293 exp->__anon1.op.exp2->opDestType = 0;
16294 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
16295 exp->__anon1.op.exp2->destType->count--;
16296 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
16298 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)
16300 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
16301 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16303 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)))
16305 if(exp->__anon1.op.op == ADD_ASSIGN)
16306 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16308 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))
16310 if(exp->__anon1.op.op == ADD_ASSIGN)
16311 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16313 else if(inCompiler)
16315 char type1String[1024];
16316 char type2String[1024];
16318 type1String[0] = '\0';
16319 type2String[0] = '\0';
16320 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
16321 PrintType(type1, type2String, 0, 1);
16322 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16323 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
16326 if(exp->__anon1.op.exp2->destType == dummy)
16329 exp->__anon1.op.exp2->destType = (((void *)0));
16331 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
16333 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16334 type2->refCount = 1;
16335 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
16336 type2->isSigned = 1;
16338 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))
16340 type2 = __extension__ ({
16341 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16343 __ecereInstance1->kind = 3, __ecereInstance1;
16345 type2->refCount = 1;
16346 type2->isSigned = 1;
16350 type2 = exp->__anon1.op.exp2->expType;
16356 if(exp->__anon1.op.op == SIZEOF)
16358 exp->expType = __extension__ ({
16359 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16361 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16363 exp->isConstant = 1;
16365 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
16367 exp->expType = Dereference(type2);
16368 if(type2 && type2->kind == 8)
16369 notByReference = 1;
16371 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
16372 exp->expType = Reference(type2);
16377 if(exp->__anon1.op.exp1)
16379 if(exp->__anon1.op.exp1->destType)
16380 FreeType(exp->__anon1.op.exp1->destType);
16381 exp->__anon1.op.exp1->destType = MkClassType("bool");
16382 exp->__anon1.op.exp1->destType->truth = 1;
16383 if(!exp->__anon1.op.exp1->expType)
16384 ProcessExpressionType(exp->__anon1.op.exp1);
16386 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16387 FreeType(exp->__anon1.op.exp1->expType);
16388 exp->__anon1.op.exp1->expType = MkClassType("bool");
16389 exp->__anon1.op.exp1->expType->truth = 1;
16391 if(exp->__anon1.op.exp2)
16393 if(exp->__anon1.op.exp2->destType)
16394 FreeType(exp->__anon1.op.exp2->destType);
16395 exp->__anon1.op.exp2->destType = MkClassType("bool");
16396 exp->__anon1.op.exp2->destType->truth = 1;
16397 if(!exp->__anon1.op.exp2->expType)
16398 ProcessExpressionType(exp->__anon1.op.exp2);
16400 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16401 FreeType(exp->__anon1.op.exp2->expType);
16402 exp->__anon1.op.exp2->expType = MkClassType("bool");
16403 exp->__anon1.op.exp2->expType->truth = 1;
16406 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")))))
16408 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"))))
16410 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)))
16412 struct Type * intType;
16414 if(!type1->__anon1._class->__anon1.registered->dataType)
16415 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16416 if(!type2->__anon1._class->__anon1.registered->dataType)
16417 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16418 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
16419 if(exp->__anon1.op.exp1->destType)
16420 FreeType(exp->__anon1.op.exp1->destType);
16421 if(exp->__anon1.op.exp2->destType)
16422 FreeType(exp->__anon1.op.exp2->destType);
16423 exp->__anon1.op.exp1->destType = intType;
16424 exp->__anon1.op.exp2->destType = intType;
16425 intType->refCount++;
16429 if(exp->__anon1.op.exp2->destType)
16430 FreeType(exp->__anon1.op.exp2->destType);
16431 exp->__anon1.op.exp2->destType = type1;
16433 if(exp->__anon1.op.exp1->destType)
16434 FreeType(exp->__anon1.op.exp1->destType);
16435 exp->__anon1.op.exp1->destType = type2;
16438 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)
16439 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);
16440 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
16442 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16446 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16448 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
16449 ProcessExpressionType(exp->__anon1.op.exp1);
16450 if(type2->kind != 13)
16452 ProcessExpressionType(classExp);
16453 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
16454 if(!exp->__anon1.op.exp2->expType)
16458 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
16461 ProcessExpressionType(exp->__anon1.op.exp2);
16465 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)))
16467 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
16468 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16469 exp->expType = type1;
16473 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)))
16475 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
16476 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
16477 exp->expType = type2;
16481 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))
16483 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
16487 unsigned int success = 0;
16489 if(type1->kind == 13 && type2->kind == 13)
16491 if(exp->__anon1.op.op == '+')
16492 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
16493 else if(exp->__anon1.op.op == '-')
16495 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
16497 exp->expType = __extension__ ({
16498 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16500 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
16503 if(type1->__anon1.type->kind == 20)
16505 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
16509 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
16511 ProcessExpressionType(classExp);
16513 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"))));
16514 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
16522 if(!success && exp->__anon1.op.exp1->type == 2)
16524 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16527 FreeType(exp->expType);
16528 exp->expType = exp->__anon1.op.exp1->destType;
16529 if(exp->__anon1.op.exp1->destType)
16530 exp->__anon1.op.exp1->destType->refCount++;
16533 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16536 FreeType(exp->expType);
16537 exp->expType = exp->__anon1.op.exp2->destType;
16538 if(exp->__anon1.op.exp2->destType)
16539 exp->__anon1.op.exp2->destType->refCount++;
16545 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16548 FreeType(exp->expType);
16549 exp->expType = exp->__anon1.op.exp2->destType;
16550 if(exp->__anon1.op.exp2->destType)
16551 exp->__anon1.op.exp2->destType->refCount++;
16554 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16557 FreeType(exp->expType);
16558 exp->expType = exp->__anon1.op.exp1->destType;
16559 if(exp->__anon1.op.exp1->destType)
16560 exp->__anon1.op.exp1->destType->refCount++;
16566 char expString1[10240];
16567 char expString2[10240];
16571 expString1[0] = '\0';
16572 expString2[0] = '\0';
16577 PrintExpression(exp->__anon1.op.exp1, expString1);
16578 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16579 PrintExpression(exp->__anon1.op.exp2, expString2);
16580 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16581 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
16582 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
16584 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
16588 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)
16590 if(exp->__anon1.op.exp1->destType)
16591 FreeType(exp->__anon1.op.exp1->destType);
16592 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16593 if(type2->__anon1._class->__anon1.registered->dataType)
16594 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16595 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16596 exp->expType = type2;
16600 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)
16602 if(exp->__anon1.op.exp2->destType)
16603 FreeType(exp->__anon1.op.exp2->destType);
16604 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16605 if(type1->__anon1._class->__anon1.registered->dataType)
16606 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16607 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16608 exp->expType = type1;
16614 unsigned int valid = 0;
16616 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
16618 if(exp->__anon1.op.exp2->destType)
16619 FreeType(exp->__anon1.op.exp2->destType);
16620 if(!type1->__anon1._class->__anon1.registered->dataType)
16621 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
16622 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16623 exp->__anon1.op.exp2->destType->refCount++;
16624 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16627 type2 = exp->__anon1.op.exp2->destType;
16630 exp->expType = type2;
16633 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
16635 if(exp->__anon1.op.exp1->destType)
16636 FreeType(exp->__anon1.op.exp1->destType);
16637 if(!type2->__anon1._class->__anon1.registered->dataType)
16638 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
16639 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16640 exp->__anon1.op.exp1->destType->refCount++;
16641 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16642 type1 = exp->__anon1.op.exp1->destType;
16643 exp->expType = type1;
16646 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
16648 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
16649 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
16651 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
16653 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16655 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16658 FreeType(exp->expType);
16659 exp->expType = exp->__anon1.op.exp2->expType;
16660 if(exp->__anon1.op.exp2->expType)
16661 exp->__anon1.op.exp2->expType->refCount++;
16665 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16667 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16670 FreeType(exp->expType);
16671 exp->expType = exp->__anon1.op.exp1->expType;
16672 if(exp->__anon1.op.exp1->expType)
16673 exp->__anon1.op.exp1->expType->refCount++;
16680 if(op1IsEnum && exp->__anon1.op.exp2->expType)
16682 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
16685 FreeType(exp->expType);
16686 exp->expType = exp->__anon1.op.exp1->expType;
16687 if(exp->__anon1.op.exp1->expType)
16688 exp->__anon1.op.exp1->expType->refCount++;
16692 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
16694 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
16697 FreeType(exp->expType);
16698 exp->expType = exp->__anon1.op.exp2->expType;
16699 if(exp->__anon1.op.exp2->expType)
16700 exp->__anon1.op.exp2->expType->refCount++;
16708 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))
16710 if(exp->__anon1.op.exp1->destType)
16711 FreeType(exp->__anon1.op.exp1->destType);
16712 exp->__anon1.op.exp1->destType = type2;
16714 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16717 FreeType(exp->expType);
16718 exp->expType = exp->__anon1.op.exp1->destType;
16719 if(exp->__anon1.op.exp1->destType)
16720 exp->__anon1.op.exp1->destType->refCount++;
16725 if(exp->__anon1.op.exp2->destType)
16726 FreeType(exp->__anon1.op.exp2->destType);
16727 exp->__anon1.op.exp2->destType = type1;
16729 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
16732 FreeType(exp->expType);
16733 exp->expType = exp->__anon1.op.exp2->destType;
16734 if(exp->__anon1.op.exp2->destType)
16735 exp->__anon1.op.exp2->destType->refCount++;
16737 else if(type1 && type2)
16739 char expString1[10240];
16740 char expString2[10240];
16741 char type1String[1024];
16742 char type2String[1024];
16744 expString1[0] = '\0';
16745 expString2[0] = '\0';
16746 type1String[0] = '\0';
16747 type2String[0] = '\0';
16750 PrintExpression(exp->__anon1.op.exp1, expString1);
16751 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
16752 PrintExpression(exp->__anon1.op.exp2, expString2);
16753 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
16754 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
16755 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
16757 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
16758 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
16760 exp->expType = exp->__anon1.op.exp1->expType;
16761 if(exp->__anon1.op.exp1->expType)
16762 exp->__anon1.op.exp1->expType->refCount++;
16764 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16766 exp->expType = exp->__anon1.op.exp2->expType;
16767 if(exp->__anon1.op.exp2->expType)
16768 exp->__anon1.op.exp2->expType->refCount++;
16776 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
16778 struct Type * oldType = exp->__anon1.op.exp1->expType;
16780 exp->__anon1.op.exp1->expType = (((void *)0));
16781 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16784 exp->__anon1.op.exp1->expType = oldType;
16786 if(exp->__anon1.op.exp1->destType)
16787 FreeType(exp->__anon1.op.exp1->destType);
16788 exp->__anon1.op.exp1->destType = type2;
16790 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
16793 FreeType(exp->expType);
16794 exp->expType = exp->__anon1.op.exp1->destType;
16795 if(exp->__anon1.op.exp1->destType)
16796 exp->__anon1.op.exp1->destType->refCount++;
16800 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
16802 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
16804 if(exp->__anon1.op.exp1->destType)
16805 FreeType(exp->__anon1.op.exp1->destType);
16806 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
16807 if(type2->__anon1._class->__anon1.registered->dataType)
16808 type2->__anon1._class->__anon1.registered->dataType->refCount++;
16809 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
16811 if(exp->__anon1.op.op == '!')
16813 exp->expType = MkClassType("bool");
16814 exp->expType->truth = 1;
16818 exp->expType = type2;
16823 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
16825 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
16827 if(exp->__anon1.op.exp2->destType)
16828 FreeType(exp->__anon1.op.exp2->destType);
16829 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
16830 if(type1->__anon1._class->__anon1.registered->dataType)
16831 type1->__anon1._class->__anon1.registered->dataType->refCount++;
16832 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
16834 exp->expType = type1;
16840 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
16842 char expString[10000];
16844 expString[0] = '\0';
16847 PrintExpression(exp->__anon1.op.exp1, expString);
16848 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16851 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16853 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
16855 char expString[10240];
16857 expString[0] = '\0';
16860 PrintExpression(exp->__anon1.op.exp2, expString);
16861 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16864 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
16868 FreeType(exp->expType);
16869 exp->expType = MkClassType("bool");
16870 exp->expType->truth = 1;
16872 if(exp->__anon1.op.op != SIZEOF)
16873 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
16874 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
16876 DeclareType(curExternal, exp->__anon1.op.exp2->expType, 1, 0);
16878 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
16879 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
16880 yylloc = oldyylloc;
16889 struct Expression * e;
16891 exp->isConstant = 1;
16892 for(e = (*exp->__anon1.list).first; e; e = e->next)
16896 FreeType(e->destType);
16897 e->opDestType = exp->opDestType;
16898 e->destType = exp->destType;
16901 exp->destType->refCount++;
16904 ProcessExpressionType(e);
16905 if(!exp->expType && !e->next)
16907 exp->expType = e->expType;
16909 e->expType->refCount++;
16912 exp->isConstant = 0;
16914 e = (*exp->__anon1.list).first;
16915 if(!e->next && e->type == 8)
16917 struct Expression * next = exp->next, * prev = exp->prev;
16919 FreeType(exp->expType);
16920 FreeType(exp->destType);
16921 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16925 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
16926 ProcessExpressionType(exp);
16932 struct Expression * e;
16934 exp->isConstant = 1;
16935 ProcessExpressionType(exp->__anon1.index.exp);
16936 if(!exp->__anon1.index.exp->isConstant)
16937 exp->isConstant = 0;
16938 if(exp->__anon1.index.exp->expType)
16940 struct Type * source = exp->__anon1.index.exp->expType;
16942 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
16944 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
16945 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
16947 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
16949 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
16950 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
16952 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
16954 if(type->kind == 8)
16955 type->constant = 1;
16956 else if(type->kind == 13)
16958 struct Type * t = type;
16960 while(t->kind == 13)
16961 t = t->__anon1.type;
16964 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
16969 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
16971 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
16974 FreeType(e->destType);
16975 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
16977 ProcessExpressionType(e);
16982 exp->isConstant = 0;
16985 exp->expType = Dereference(exp->__anon1.index.exp->expType);
16987 DeclareType(curExternal, exp->expType, 1, 0);
16992 struct Expression * e;
16993 struct Type * functionType;
16994 struct Type * methodType = (((void *)0));
17000 PrintExpression(exp->__anon1.call.exp, name);
17001 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
17003 PrintExpression(exp->__anon1.call.exp, name);
17006 if(exp->__anon1.call.exp->type == 0)
17008 struct Expression * idExp = exp->__anon1.call.exp;
17009 struct Identifier * id = idExp->__anon1.__anon1.identifier;
17011 if(!strcmp(id->string, "__builtin_frame_address"))
17013 exp->expType = ProcessTypeString("void *", 1);
17014 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17015 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17018 else if(!strcmp(id->string, "__ENDIAN_PAD"))
17020 exp->expType = ProcessTypeString("int", 1);
17021 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
17022 ProcessExpressionType((*exp->__anon1.call.arguments).first);
17025 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
17027 struct Expression * a = (((void *)0));
17028 struct Expression * b = (((void *)0));
17029 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
17031 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
17033 a = (*exp->__anon1.call.arguments).first;
17034 b = (*exp->__anon1.call.arguments).last;
17038 else if((*exp->__anon1.call.arguments).count == 1)
17040 a = (*exp->__anon1.call.arguments).first;
17045 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
17046 idExp->__anon1.__anon1.identifier = (((void *)0));
17047 FreeExpContents(exp);
17048 ProcessExpressionType(a);
17050 ProcessExpressionType(b);
17052 exp->__anon1.list = MkList();
17053 if(a->expType && (!b || b->expType))
17055 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
17059 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17060 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
17061 struct Declaration * decl;
17062 char temp1[1024], temp2[1024];
17064 GetTypeSpecs(a->expType, specs);
17065 if(a && !a->isConstant && a->type != 0)
17067 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
17068 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
17069 tempExp1 = QMkExpId(temp1);
17070 tempExp1->expType = a->expType;
17072 a->expType->refCount++;
17073 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
17075 if(b && !b->isConstant && b->type != 0)
17077 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
17078 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
17079 tempExp2 = QMkExpId(temp2);
17080 tempExp2->expType = b->expType;
17082 b->expType->refCount++;
17083 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
17085 decl = MkDeclaration(specs, decls);
17086 if(!curCompound->__anon1.compound.declarations)
17087 curCompound->__anon1.compound.declarations = MkList();
17088 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
17092 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
17094 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
17096 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
17097 exp->expType = a->expType;
17099 a->expType->refCount++;
17101 else if(!strcmp(id->string, "Abs"))
17103 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
17104 exp->expType = a->expType;
17106 a->expType->refCount++;
17108 else if(!strcmp(id->string, "Sgn"))
17110 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"))))));
17111 exp->expType = ProcessTypeString("int", 0);
17113 FreeExpression(tempExp1);
17115 FreeExpression(tempExp2);
17116 FreeIdentifier(id);
17122 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
17124 if(!exp->__anon1.call.exp->destType)
17126 exp->__anon1.call.exp->destType = dummy;
17129 ProcessExpressionType(exp->__anon1.call.exp);
17130 if(exp->__anon1.call.exp->destType == dummy)
17133 exp->__anon1.call.exp->destType = (((void *)0));
17137 functionType = exp->__anon1.call.exp->expType;
17138 if(functionType && functionType->kind == 16)
17140 methodType = functionType;
17141 functionType = methodType->__anon1.__anon3.method->dataType;
17142 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
17144 char typeString[1024];
17146 typeString[0] = '\0';
17148 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
17150 functionType->__anon1.__anon2.thisClass = (((void *)0));
17151 PrintType(functionType, typeString, 1, 1);
17152 functionType->__anon1.__anon2.thisClass = back;
17154 if(strstr(typeString, "thisclass"))
17156 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17157 struct Declarator * decl;
17160 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17162 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17163 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))
17164 thisClassParams = 0;
17165 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
17167 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
17169 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
17170 ProcessDeclarator(decl, 1);
17171 thisClass = backupThisClass;
17173 thisClassParams = 1;
17174 functionType = ProcessType(specs, decl);
17175 functionType->refCount = 0;
17176 FinishTemplatesContext(context);
17178 struct Type * p, * op;
17180 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)
17183 p->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17186 if(methodType->__anon1.__anon3.method->dataType->__anon1.__anon2.returnType->kind == 21)
17188 functionType->__anon1.__anon2.returnType->thisClassFrom = methodType->__anon1.__anon3.method->_class;
17191 FreeList(specs, (void *)(FreeSpecifier));
17192 FreeDeclarator(decl);
17196 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
17198 struct Type * type = functionType->__anon1.type;
17200 if(!functionType->refCount)
17202 functionType->__anon1.type = (((void *)0));
17203 FreeType(functionType);
17205 functionType = type;
17207 if(functionType && functionType->kind != 11)
17209 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
17211 else if(functionType)
17213 unsigned int emptyParams = 0, noParams = 0;
17214 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
17215 struct Type * type = functionType->__anon1.__anon2.params.first;
17216 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
17218 struct Location oldyylloc = yylloc;
17222 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
17224 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
17227 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
17229 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)
17231 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
17234 e->destType = type;
17236 type = functionType->__anon1.__anon2.params.first;
17239 type->refCount = 0;
17241 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
17243 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
17244 type->byReference = functionType->byReference;
17245 type->typedByReference = functionType->typedByReference;
17248 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
17250 e->destType = type;
17252 type = functionType->__anon1.__anon2.params.first;
17255 type->refCount = 0;
17258 if(type && type->kind == 0)
17261 if(!type->refCount)
17263 type = (((void *)0));
17265 for(; e; e = e->next)
17267 if(!type && !emptyParams)
17270 if(methodType && methodType->__anon1.__anon3.methodClass)
17271 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);
17273 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);
17276 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
17278 struct Type * templatedType = (((void *)0));
17279 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
17280 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17283 if(_class && _class->templateArgs)
17285 struct __ecereNameSpace__ecere__com__Class * sClass;
17287 for(sClass = _class; sClass; sClass = sClass->base)
17289 if(sClass->templateClass)
17290 sClass = sClass->templateClass;
17292 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17294 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
17296 struct __ecereNameSpace__ecere__com__Class * nextClass;
17298 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17300 if(nextClass->templateClass)
17301 nextClass = nextClass->templateClass;
17302 id += nextClass->templateParams.count;
17312 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
17314 unsigned int constant = type->constant;
17315 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
17318 struct Context * context = SetupTemplatesContext(_class);
17320 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17321 FinishTemplatesContext(context);
17323 if(templatedType->kind == 8 && constant)
17324 templatedType->constant = 1;
17325 else if(templatedType->kind == 13)
17327 struct Type * t = templatedType->__anon1.type;
17329 while(t->kind == 13)
17330 t = t->__anon1.type;
17332 t->constant = constant;
17334 e->destType = templatedType;
17337 templatedType->passAsTemplate = 1;
17342 e->destType = type;
17349 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
17351 e->destType = type->prev;
17352 e->destType->refCount++;
17356 e->destType = type;
17361 if(type && type->kind != 14)
17363 struct Type * next = type->next;
17365 if(!type->refCount)
17370 if(type && type->kind != 14)
17372 if(methodType && methodType->__anon1.__anon3.methodClass)
17373 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);
17375 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);
17377 yylloc = oldyylloc;
17378 if(type && !type->refCount)
17383 functionType = __extension__ ({
17384 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17386 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
17388 if(exp->__anon1.call.exp->type == 0)
17390 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
17394 struct Symbol * symbol;
17395 struct Location oldyylloc = yylloc;
17397 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
17398 if(strstr(string, "__builtin_") == string)
17402 functionType->__anon1.__anon2.returnType = exp->destType;
17403 exp->destType->refCount++;
17407 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
17408 symbol = __extension__ ({
17409 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
17411 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
17413 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
17414 if(strstr(symbol->string, "::"))
17415 globalContext->hasNameSpace = 1;
17416 yylloc = oldyylloc;
17419 else if(exp->__anon1.call.exp->type == 8)
17423 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
17424 if(!functionType->__anon1.__anon2.returnType)
17426 functionType->__anon1.__anon2.returnType = __extension__ ({
17427 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17429 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
17433 if(functionType && functionType->kind == 11)
17435 exp->expType = functionType->__anon1.__anon2.returnType;
17436 if(functionType->__anon1.__anon2.returnType)
17437 functionType->__anon1.__anon2.returnType->refCount++;
17438 if(!functionType->refCount)
17439 FreeType(functionType);
17441 if(exp->__anon1.call.arguments)
17443 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
17444 ProcessExpressionType(e);
17450 struct Type * type;
17451 struct Location oldyylloc = yylloc;
17452 unsigned int thisPtr;
17453 struct Expression * checkExp = exp->__anon1.member.exp;
17457 if(checkExp->type == 11)
17458 checkExp = checkExp->__anon1.cast.exp;
17459 else if(checkExp->type == 5)
17460 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
17464 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
17465 exp->thisPtr = thisPtr;
17466 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
17468 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
17470 ProcessExpressionType(exp->__anon1.member.exp);
17471 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)
17473 exp->isConstant = 0;
17476 exp->isConstant = exp->__anon1.member.exp->isConstant;
17477 type = exp->__anon1.member.exp->expType;
17479 if(type && (type->kind == 20))
17481 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
17482 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
17486 for(param = _class->templateParams.first; param; param = param->next)
17488 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
17492 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
17494 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
17498 struct Expression * expMember = exp->__anon1.member.exp;
17499 struct Declarator * decl;
17500 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17501 char thisClassTypeString[1024];
17503 FreeIdentifier(exp->__anon1.member.member);
17504 ProcessExpressionType(argExp);
17506 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
17510 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
17511 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
17514 strcpy(thisClassTypeString, _class->fullName);
17516 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
17517 exp->expType = ProcessType(specs, decl);
17518 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
17520 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
17521 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
17522 int paramCount = 0;
17523 int lastParam = -1;
17524 char templateString[1024];
17525 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
17527 sprintf(templateString, "%s<", expClass->templateClass->fullName);
17528 for(cClass = expClass; cClass; cClass = cClass->base)
17532 for(param = cClass->templateParams.first; param; param = param->next)
17535 struct __ecereNameSpace__ecere__com__Class * sClass;
17536 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
17538 for(sClass = cClass->base; sClass; sClass = sClass->base)
17539 id += sClass->templateParams.count;
17540 arg = expClass->templateArgs[id];
17541 for(sClass = _class; sClass; sClass = sClass->base)
17543 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
17545 struct __ecereNameSpace__ecere__com__Class * nextClass;
17547 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
17548 p += nextClass->templateParams.count;
17549 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
17551 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
17553 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17555 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
17556 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
17563 char argument[256];
17565 argument[0] = '\0';
17566 switch(param->type)
17570 char expString[1024];
17571 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17572 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
17573 struct Expression * exp;
17574 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
17576 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
17577 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
17578 ProcessExpressionType(exp);
17579 ComputeExpression(exp);
17580 expString[0] = '\0';
17581 PrintExpression(exp, expString);
17582 strcat(argument, expString);
17583 FreeExpression(exp);
17588 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
17593 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
17595 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
17596 strcat(argument, thisClassTypeString);
17598 strcat(argument, arg.__anon1.__anon1.dataTypeString);
17606 strcat(templateString, ", ");
17607 if(lastParam != p - 1)
17609 strcat(templateString, param->name);
17610 strcat(templateString, " = ");
17612 strcat(templateString, argument);
17621 int len = strlen(templateString);
17623 if(templateString[len - 1] == '>')
17624 templateString[len++] = ' ';
17625 templateString[len++] = '>';
17626 templateString[len++] = '\0';
17629 struct Context * context = SetupTemplatesContext(_class);
17631 FreeType(exp->expType);
17632 exp->expType = ProcessTypeString(templateString, 0);
17633 FinishTemplatesContext(context);
17636 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
17637 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
17639 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")))))))));
17642 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
17644 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
17647 if(type && (type->kind == 20))
17649 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)))
17651 struct Identifier * id = exp->__anon1.member.member;
17652 int typeKind = type->kind;
17653 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));
17655 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
17657 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
17662 if(typeKind == 3 || typeKind == 15)
17663 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
17666 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17668 _class = type->__anon1._class->__anon1.registered;
17670 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
17672 _class = FindClass("char *")->__anon1.registered;
17674 else if(type->kind == 13)
17676 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
17677 FreeType(exp->expType);
17678 exp->expType = ProcessTypeString("uintptr", 0);
17679 exp->byReference = 1;
17683 char string[1024] = "";
17684 struct Symbol * classSym;
17686 PrintTypeNoConst(type, string, 0, 1);
17687 classSym = FindClass(string);
17689 _class = classSym->__anon1.registered;
17695 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
17696 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
17697 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
17698 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
17699 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
17701 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
17702 exp->__anon1.member.memberType = 1;
17703 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
17704 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
17707 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
17709 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17710 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
17712 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17714 member = (((void *)0));
17716 if(!member && !prop)
17717 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17718 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
17719 exp->__anon1.member.thisPtr = 1;
17723 unsigned int useMemberForNonConst = 0;
17727 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
17728 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);
17729 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17730 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
17732 if((!prop || useMemberForNonConst) && !member)
17734 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
17737 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
17738 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);
17739 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
17740 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
17745 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
17746 prop = (((void *)0));
17748 member = (((void *)0));
17752 if(!prop && !member && !method)
17753 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
17754 if(!prop && !member && !method)
17758 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
17761 exp->__anon1.member.memberType = 5;
17762 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
17766 char structName[1024];
17767 struct Identifier * id = exp->__anon1.member.member;
17768 struct Expression * classExp = exp->__anon1.member.exp;
17771 FreeType(classExp->expType);
17772 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
17773 strcpy(structName, "__ecereClassData_");
17774 FullClassNameCat(structName, type->__anon1._class->string, 0);
17776 exp->__anon1.member.member = id;
17777 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"))))))));
17779 ProcessExpressionType(exp);
17785 struct Symbol * classSym = FindClass(id->string);
17789 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
17792 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
17796 if(exp->__anon1.member.exp->destType)
17797 FreeType(exp->__anon1.member.exp->destType);
17799 if(method && !method->_class->symbol)
17800 method->_class->symbol = FindClass(method->_class->fullName);
17801 if(prop && !prop->_class->symbol)
17802 prop->_class->symbol = FindClass(prop->_class->fullName);
17803 exp->__anon1.member.exp->destType = __extension__ ({
17804 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17806 __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;
17811 exp->__anon1.member.memberType = 1;
17812 if(!prop->dataType)
17813 ProcessPropertyType(prop);
17814 exp->expType = prop->dataType;
17815 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
17817 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17819 CopyTypeInto(type, exp->expType);
17820 type->refCount = 1;
17821 type->constant = 1;
17822 exp->expType = type;
17824 else if(prop->dataType)
17825 prop->dataType->refCount++;
17829 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17831 FreeExpContents(exp);
17833 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17834 ProcessExpressionType(exp);
17837 exp->__anon1.member.memberType = 3;
17838 DeclareStruct(curExternal, _class->fullName, 0, 1);
17839 if(member->_class != _class)
17840 DeclareStruct(curExternal, member->_class->fullName, 0, 1);
17841 if(!member->dataType)
17843 struct Context * context = SetupTemplatesContext(_class);
17845 member->dataType = ProcessTypeString(member->dataTypeString, 0);
17846 FinishTemplatesContext(context);
17848 exp->expType = member->dataType;
17849 if(member->dataType)
17850 member->dataType->refCount++;
17852 else if(revConvert)
17854 exp->__anon1.member.memberType = 4;
17855 exp->expType = MkClassType(revConvert->_class->fullName);
17860 exp->__anon1.member.memberType = 2;
17862 if(!method->dataType)
17863 ProcessMethodType(method);
17864 exp->expType = __extension__ ({
17865 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17867 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
17869 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
17870 exp->expType->__anon1.__anon3.usedClass = _class;
17872 else if(!classProp)
17874 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
17876 FreeExpContents(exp);
17878 exp->__anon1.__anon1.identifier = MkIdentifier("class");
17879 FreeType(exp->expType);
17880 exp->expType = MkClassType("ecere::com::Class");
17883 yylloc = exp->__anon1.member.member->loc;
17884 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
17886 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
17888 if(_class && exp->expType)
17890 struct __ecereNameSpace__ecere__com__Class * tClass;
17892 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
17893 while(tClass && !tClass->templateClass)
17894 tClass = tClass->base;
17895 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
17898 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17899 struct __ecereNameSpace__ecere__com__Class * sClass;
17901 for(sClass = tClass; sClass; sClass = sClass->base)
17904 if(sClass->templateClass)
17905 sClass = sClass->templateClass;
17906 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17908 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
17910 for(sClass = sClass->base; sClass; sClass = sClass->base)
17911 id += sClass->templateParams.count;
17919 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
17921 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
17922 struct Context * context = SetupTemplatesContext(tClass);
17923 unsigned int constant = exp->expType->constant;
17924 unsigned int passAsTemplate = 0;
17925 struct __ecereNameSpace__ecere__com__Class * thisClassFrom = (((void *)0));
17926 struct Type * t = ProcessTypeString(exp->expType->__anon1.templateParameter->dataTypeString, 0);
17928 if(t && t->kind == 8 && t->__anon1._class)
17929 thisClassFrom = t->__anon1._class->__anon1.registered;
17931 thisClassFrom = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "class");
17933 passAsTemplate = tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType)));
17934 FreeType(exp->expType);
17935 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17936 exp->expType->thisClassFrom = thisClassFrom;
17937 if(exp->expType->kind == 8 && constant)
17938 exp->expType->constant = 1;
17939 else if(exp->expType->kind == 13)
17941 struct Type * t = exp->expType->__anon1.type;
17943 while(t->kind == 13)
17944 t = t->__anon1.type;
17946 t->constant = constant;
17950 if(exp->expType->kind == 21)
17952 FreeType(exp->expType);
17953 exp->expType = ReplaceThisClassType(_class);
17956 exp->expType->passAsTemplate = 1;
17959 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
17960 if(exp->destType->kind == 8 && constant)
17961 exp->destType->constant = 1;
17962 else if(exp->destType->kind == 13)
17964 struct Type * t = exp->destType->__anon1.type;
17966 while(t->kind == 13)
17967 t = t->__anon1.type;
17969 t->constant = constant;
17971 if(exp->destType->kind == 21)
17973 FreeType(exp->destType);
17974 exp->destType = ReplaceThisClassType(_class);
17978 FinishTemplatesContext(context);
17981 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)
17984 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
17985 struct __ecereNameSpace__ecere__com__Class * sClass;
17987 for(sClass = tClass; sClass; sClass = sClass->base)
17990 if(sClass->templateClass)
17991 sClass = sClass->templateClass;
17992 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
17994 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
17996 for(sClass = sClass->base; sClass; sClass = sClass->base)
17997 id += sClass->templateParams.count;
18007 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
18008 struct Context * context = SetupTemplatesContext(tClass);
18009 struct Type * basicType;
18011 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
18014 if(basicType->kind == 21)
18016 FreeType(basicType);
18017 basicType = ReplaceThisClassType(_class);
18019 FreeType(exp->expType);
18020 exp->expType = __extension__ ({
18021 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18023 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
18027 exp->destType = exp->expType;
18028 exp->destType->refCount++;
18031 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18032 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18033 struct Declarator * decl;
18035 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18038 exp->destType->refCount++;
18040 exp->expType->refCount++;
18042 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
18043 exp->__anon1.cast.exp = newExp;
18046 FinishTemplatesContext(context);
18049 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
18051 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
18055 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
18057 int paramCount = 0;
18058 int lastParam = -1;
18059 char templateString[1024];
18060 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
18062 sprintf(templateString, "%s<", expClass->templateClass->fullName);
18063 while(cClass != expClass)
18065 struct __ecereNameSpace__ecere__com__Class * sClass;
18067 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
18070 for(param = cClass->templateParams.first; param; param = param->next)
18072 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
18074 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
18075 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
18077 while(cClassCur != tClass && !paramCur)
18079 struct __ecereNameSpace__ecere__com__Class * sClassCur;
18081 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
18083 cClassCur = sClassCur;
18084 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
18086 if(!strcmp(paramCur->name, param->name))
18093 if(paramCur && paramCur->type == 0)
18094 arg = tClass->templateArgs[cp];
18096 arg = expClass->templateArgs[p];
18098 char argument[256];
18100 argument[0] = '\0';
18101 switch(param->type)
18105 char expString[1024];
18106 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18107 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
18108 struct Expression * exp;
18109 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
18111 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
18112 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
18113 ProcessExpressionType(exp);
18114 ComputeExpression(exp);
18115 expString[0] = '\0';
18116 PrintExpression(exp, expString);
18117 strcat(argument, expString);
18118 FreeExpression(exp);
18123 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
18128 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
18129 strcat(argument, arg.__anon1.__anon1.dataTypeString);
18136 strcat(templateString, ", ");
18137 if(lastParam != p - 1)
18139 strcat(templateString, param->name);
18140 strcat(templateString, " = ");
18142 strcat(templateString, argument);
18151 int len = strlen(templateString);
18153 if(templateString[len - 1] == '>')
18154 templateString[len++] = ' ';
18155 templateString[len++] = '>';
18156 templateString[len++] = '\0';
18158 FreeType(exp->expType);
18160 struct Context * context = SetupTemplatesContext(tClass);
18162 exp->expType = ProcessTypeString(templateString, 0);
18163 FinishTemplatesContext(context);
18170 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)");
18172 else if(type && (type->kind == 9 || type->kind == 10))
18174 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
18178 exp->expType = memberType;
18180 memberType->refCount++;
18185 char expString[10240];
18187 expString[0] = '\0';
18190 PrintExpression(exp, expString);
18191 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18193 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
18195 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
18197 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
18199 struct Identifier * id = exp->__anon1.member.member;
18200 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));
18204 FreeType(exp->expType);
18205 exp->expType = ReplaceThisClassType(_class);
18209 yylloc = oldyylloc;
18214 struct Type * destType = exp->destType;
18216 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
18218 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
18220 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
18224 ProcessExpressionType(exp);
18231 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
18233 if(classSym && classSym->__anon1.registered)
18235 if(classSym->__anon1.registered->type == 5 || (classSym->__anon1.registered->fixed && classSym->__anon1.registered->structSize))
18238 struct __ecereNameSpace__ecere__com__Class * b = classSym->__anon1.registered;
18241 DeclareStruct(curExternal, classSym->string, 0, 1);
18242 FreeSpecifier(exp->__anon1._class);
18243 FullClassNameCat(name, classSym->string, 0);
18247 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
18251 struct Expression * e;
18254 if(b->structSize == b->offset)
18255 exp->__anon1.op.exp1 = MkExpConstant("0");
18257 exp->__anon1.op.exp1 = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18258 exp->__anon1.op.op = '+';
18260 while(b->offset != 0)
18262 struct Symbol * sym;
18263 struct Expression * typeSize;
18266 sym = FindClass(b->fullName);
18268 DeclareStruct(curExternal, sym->string, 0, 1);
18269 FullClassNameCat(name, sym->string, 0);
18270 if(b->structSize == b->offset)
18271 typeSize = MkExpConstant("0");
18273 typeSize = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0))));
18274 e->__anon1.op.exp2 = b->offset ? MkExpOp(typeSize, '+', (((void *)0))) : typeSize;
18275 e = e->__anon1.op.exp2;
18281 if(classSym->__anon1.registered->fixed && !classSym->__anon1.registered->structSize)
18283 FreeSpecifier(exp->__anon1._class);
18284 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
18289 char className[1024];
18291 strcpy(className, "__ecereClass_");
18292 FullClassNameCat(className, classSym->string, 1);
18293 DeclareClass(curExternal, classSym, className);
18294 FreeExpContents(exp);
18296 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
18297 exp->__anon1.member.member = MkIdentifier("structSize");
18301 exp->expType = __extension__ ({
18302 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18304 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18310 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
18312 exp->expType = __extension__ ({
18313 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18315 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
18317 exp->isConstant = 1;
18318 DeclareType(curExternal, type, 1, 0);
18324 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
18327 FreeType(exp->__anon1.cast.exp->destType);
18328 exp->__anon1.cast.exp->destType = type;
18331 ProcessExpressionType(exp->__anon1.cast.exp);
18334 exp->expType = type;
18335 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
18337 void * prev = exp->prev, * next = exp->next;
18338 struct Type * expType = exp->__anon1.cast.exp->destType;
18339 struct Expression * castExp = exp->__anon1.cast.exp;
18340 struct Type * destType = exp->destType;
18343 expType->refCount++;
18344 FreeType(exp->expType);
18345 FreeTypeName(exp->__anon1.cast.typeName);
18347 FreeType(exp->expType);
18348 FreeType(exp->destType);
18349 exp->expType = expType;
18350 exp->destType = destType;
18351 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
18357 exp->isConstant = exp->__anon1.cast.exp->isConstant;
18363 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
18365 exp->expType = type;
18370 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
18372 ProcessExpressionType(exp->__anon1.vaArg.exp);
18373 exp->expType = type;
18378 struct Expression * e;
18379 struct Type * t = exp->destType;
18381 if(t && !exp->destType->casted)
18383 t = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18384 CopyTypeInto(t, exp->destType);
18389 exp->isConstant = 1;
18390 FreeType(exp->__anon1.cond.cond->destType);
18391 exp->__anon1.cond.cond->destType = MkClassType("bool");
18392 exp->__anon1.cond.cond->destType->truth = 1;
18393 ProcessExpressionType(exp->__anon1.cond.cond);
18394 if(!exp->__anon1.cond.cond->isConstant)
18395 exp->isConstant = 0;
18396 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
18400 FreeType(e->destType);
18403 e->destType->refCount++;
18405 ProcessExpressionType(e);
18408 exp->expType = e->expType;
18410 e->expType->refCount++;
18413 exp->isConstant = 0;
18415 FreeType(exp->__anon1.cond.elseExp->destType);
18416 exp->__anon1.cond.elseExp->destType = t ? t : exp->expType;
18417 if(exp->__anon1.cond.elseExp->destType)
18418 exp->__anon1.cond.elseExp->destType->refCount++;
18419 ProcessExpressionType(exp->__anon1.cond.elseExp);
18420 if(!exp->__anon1.cond.elseExp->isConstant)
18421 exp->isConstant = 0;
18427 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
18429 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
18431 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
18433 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
18435 exp->destType->refCount++;
18437 ProcessStatement(exp->__anon1.compound);
18438 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
18440 exp->expType->refCount++;
18446 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
18448 if(spec && spec->type == 1)
18450 exp->expType = MkClassType(spec->__anon1.__anon1.name);
18451 exp->expType->kind = 19;
18452 exp->byReference = 1;
18456 exp->expType = MkClassType("ecere::com::Class");
18457 exp->byReference = 1;
18463 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
18467 struct Identifier * id = exp->__anon1.classData.id;
18468 char structName[1024];
18469 struct Expression * classExp;
18471 strcpy(structName, "__ecereClassData_");
18472 FullClassNameCat(structName, _class->fullName, 0);
18474 exp->__anon1.member.member = id;
18475 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
18476 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
18478 classExp = MkExpIdentifier(MkIdentifier("class"));
18479 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"))))))));
18480 ProcessExpressionType(exp);
18487 struct Type * type = (((void *)0));
18488 const char * typeString = (((void *)0));
18489 char typeStringBuf[1024];
18491 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))
18493 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
18495 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
18497 else if(exp->__anon1.list)
18499 struct Expression * e;
18501 for(e = (*exp->__anon1.list).first; e; e = e->next)
18503 ProcessExpressionType(e);
18513 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18517 e->expType = (((void *)0));
18518 e = (*exp->__anon1.list).first;
18519 ProcessExpressionType(e);
18522 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18524 FreeType(e->expType);
18525 e->expType = (((void *)0));
18527 type = (((void *)0));
18535 FreeType(e->expType);
18536 e->expType = (((void *)0));
18542 typeStringBuf[0] = '\0';
18543 PrintTypeNoConst(type, typeStringBuf, 0, 1);
18544 typeString = typeStringBuf;
18546 type = (((void *)0));
18551 char templateString[1024];
18552 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18553 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
18554 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18555 struct Expression * expExt;
18556 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
18558 sprintf(templateString, "Container<%s>", typeString);
18559 if(exp->__anon1.list)
18561 struct Expression * e;
18563 type = ProcessTypeString(typeString, 0);
18564 while((e = (*exp->__anon1.list).first))
18566 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
18567 e->destType = type;
18569 ProcessExpressionType(e);
18570 ListAdd(initializers, MkInitializerAssignment(e));
18573 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
18575 DeclareStruct(curExternal, "ecere::com::BuiltInContainer", 0, 1);
18576 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
18577 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18578 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
18579 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18580 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
18581 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18582 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
18583 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18584 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
18585 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
18587 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
18589 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18590 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
18591 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
18592 exp->expType = ProcessTypeString(templateString, 0);
18594 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
18595 ProcessExpressionType(expExt);
18599 exp->expType = ProcessTypeString("Container", 0);
18600 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18605 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
18607 FreeType(exp->expType);
18608 exp->expType = ReplaceThisClassType(thisClass);
18610 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)
18612 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
18616 if(exp->expType->kind != 15)
18618 struct Type * member;
18619 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
18621 FreeType(exp->expType);
18622 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18623 exp->expType->kind = symbol->type->kind;
18624 exp->expType->refCount++;
18625 exp->expType->__anon1.__anon1.enumName = enumName;
18626 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
18627 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18628 member->refCount++;
18632 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
18634 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
18636 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);
18638 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
18644 if(exp->destType && (exp->destType->kind == 18))
18646 else if(exp->destType && !exp->destType->keepCast)
18648 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
18649 exp->needTemplateCast = 1;
18650 if(exp->destType->kind == 0)
18652 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
18654 unsigned int invalidCast = 0;
18656 if(inCompiler && exp->destType->count && exp->expType)
18658 struct __ecereNameSpace__ecere__com__Class * c1 = (exp->expType->kind == 8 && exp->expType->__anon1._class) ? exp->expType->__anon1._class->__anon1.registered : (((void *)0));
18659 struct __ecereNameSpace__ecere__com__Class * c2 = (exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
18661 if(c1 && c1->type != 1)
18662 c1 = (((void *)0));
18663 if(c2 && c2->type != 1)
18664 c2 = (((void *)0));
18665 if((c1 && !exp->expType->byReference && !c2 && !__ecereProp_Type_Get_isPointerType(exp->destType)) || (c2 && !exp->destType->byReference && !c1 && !__ecereProp_Type_Get_isPointerType(exp->expType)))
18668 if(!exp->destType->count || unresolved || invalidCast)
18673 if(exp->destType->kind != 14)
18680 char expString[10240];
18682 expString[0] = '\0';
18683 PrintType(exp->destType, type2, 0, 1);
18686 PrintExpression(exp, expString);
18687 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18690 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
18691 else if(exp->type != 16)
18692 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
18697 char expString[10240];
18699 expString[0] = '\0';
18702 PrintExpression(exp, expString);
18703 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18706 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
18707 else if(exp->type != 16)
18708 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18720 PrintType(exp->expType, type1, 0, 1);
18721 PrintType(exp->destType, type2, 0, 1);
18723 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)))
18727 char expString[10240];
18729 expString[0] = '\0';
18732 PrintExpression(exp, expString);
18733 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18735 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")))
18738 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18740 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
18744 FreeType(exp->expType);
18745 exp->destType->refCount++;
18746 exp->expType = exp->destType;
18752 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))
18754 struct Expression * nbExp = GetNonBracketsExp(exp);
18756 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
18758 struct Expression * e = MoveExpContents(exp);
18760 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
18762 exp->__anon1.cast.exp->destType = exp->destType;
18764 exp->destType->refCount++;
18765 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
18769 else if(unresolved)
18771 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
18772 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);
18773 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
18774 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
18776 else if(!exp->expType && exp->type != 16)
18778 char expString[10240];
18780 expString[0] = '\0';
18783 PrintExpression(exp, expString);
18784 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
18786 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
18789 ApplyAnyObjectLogic(exp);
18790 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)))
18792 exp->byReference = 1;
18794 yylloc = oldyylloc;
18797 static void ProcessFunction(struct FunctionDefinition * function)
18799 struct Identifier * id = GetDeclId(function->declarator);
18800 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18801 struct Type * type = symbol ? symbol->type : (((void *)0));
18802 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18803 struct Context * oldTopContext = topContext;
18805 yylloc = function->loc;
18806 if(type && type->__anon1.__anon2.thisClass)
18808 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18809 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18810 char className[1024];
18811 char structName[1024];
18812 struct Declarator * funcDecl;
18813 struct Symbol * thisSymbol;
18814 unsigned int typedObject = 0;
18816 if(_class && !_class->base)
18818 _class = currentClass;
18819 if(_class && !_class->symbol)
18820 _class->symbol = FindClass(_class->fullName);
18821 classSym = _class ? _class->symbol : (((void *)0));
18824 thisClass = _class;
18825 if(inCompiler && _class)
18827 if(type->kind == 11)
18829 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18831 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18833 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18836 if(type->classObjectType != 1)
18838 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18839 symbol->type->__anon1.__anon2.staticMethod = 1;
18840 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18841 symbol->type->extraParam = 0;
18844 strcpy(className, "__ecereClass_");
18845 FullClassNameCat(className, _class->fullName, 1);
18846 structName[0] = (char)0;
18847 FullClassNameCat(structName, _class->fullName, 0);
18848 funcDecl = GetFuncDecl(function->declarator);
18851 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18853 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18855 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18857 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18858 FreeTypeName(param);
18861 if(!function->propertyNoThis)
18863 struct TypeName * thisParam = (((void *)0));
18865 if(type->classObjectType != 1)
18867 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18868 if(!funcDecl->__anon1.function.parameters)
18869 funcDecl->__anon1.function.parameters = MkList();
18870 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18874 if(type->classObjectType != 1)
18876 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18877 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18879 thisParam = __extension__ ({
18880 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18882 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18884 DeclareStruct(curExternal, "ecere::com::Class", 0, 1);
18885 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18889 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18891 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18893 funcDecl = GetFuncDecl(initDecl->declarator);
18896 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18898 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18900 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18902 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18903 FreeTypeName(param);
18906 if(type->classObjectType != 1)
18908 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18910 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18912 if(!funcDecl->__anon1.function.parameters)
18913 funcDecl->__anon1.function.parameters = MkList();
18914 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18922 if(type->classObjectType != 1)
18924 thisSymbol = __extension__ ({
18925 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18927 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18929 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18930 if(typedObject && thisSymbol->type)
18932 thisSymbol->type->classObjectType = 2;
18933 thisSymbol->type->byReference = type->byReference;
18934 thisSymbol->type->typedByReference = type->byReference;
18938 if(inCompiler && _class && _class->type == 0 && type->classObjectType != 1)
18940 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18943 struct __ecereNameSpace__ecere__com__Class * base;
18945 for(base = _class; base && base->type != 1000; base = base->next)
18947 for(member = base->membersAndProperties.first; member; member = member->next)
18948 if(!member->isProperty)
18954 for(member = _class->membersAndProperties.first; member; member = member->next)
18955 if(!member->isProperty)
18959 char pointerName[1024];
18960 struct Declaration * decl;
18961 struct Initializer * initializer;
18962 struct Expression * exp, * bytePtr;
18964 strcpy(pointerName, "__ecerePointer_");
18965 FullClassNameCat(pointerName, _class->fullName, 0);
18967 char className[1024];
18969 strcpy(className, "__ecereClass_");
18970 FullClassNameCat(className, classSym->string, 1);
18971 DeclareClass(curExternal, classSym, className);
18973 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18976 struct Expression * e;
18978 if(_class->offset && _class->offset == _class->base->structSize)
18980 e = MkExpClassSize(MkSpecifierName(_class->base->fullName));
18981 ProcessExpressionType(e);
18987 sprintf(string, "%d", _class->offset);
18988 e = MkExpConstant(string);
18990 exp = QBrackets(MkExpOp(bytePtr, '+', e));
18994 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
18996 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
18997 exp->expType = __extension__ ({
18998 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19000 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
19001 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
19003 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
19004 }), __ecereInstance2;
19008 yylloc = function->body->loc;
19009 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
19011 struct Context * prevContext = curContext;
19012 struct __ecereNameSpace__ecere__sys__OldList * list;
19014 curContext = function->body->__anon1.compound.context;
19015 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
19016 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
19017 curContext = prevContext;
19019 decl->symbol = (((void *)0));
19020 if(!function->body->__anon1.compound.declarations)
19021 function->body->__anon1.compound.declarations = MkList();
19022 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
19028 thisClass = (((void *)0));
19031 FreeSpecifier(id->_class);
19032 id->_class = (((void *)0));
19033 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
19035 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
19037 id = GetDeclId(initDecl->declarator);
19038 FreeSpecifier(id->_class);
19039 id->_class = (((void *)0));
19043 topContext = function->body->__anon1.compound.context;
19045 struct FunctionDefinition * oldFunction = curFunction;
19047 curFunction = function;
19049 ProcessStatement(function->body);
19050 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
19052 struct Statement * prevCompound = curCompound;
19053 struct Context * prevContext = curContext;
19054 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
19056 if(!function->body->__anon1.compound.statements)
19057 function->body->__anon1.compound.statements = MkList();
19058 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
19059 curCompound = function->body;
19060 curContext = function->body->__anon1.compound.context;
19061 ProcessStatement(fireWatchers);
19062 curContext = prevContext;
19063 curCompound = prevCompound;
19065 curFunction = oldFunction;
19067 if(function->declarator)
19069 ProcessDeclarator(function->declarator, 1);
19071 topContext = oldTopContext;
19072 thisClass = oldThisClass;
19075 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
19077 struct ClassDef * def;
19078 struct External * external = curExternal;
19079 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
19081 for(def = definitions->first; def; def = def->next)
19085 if(def->__anon1.function->declarator)
19086 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
19088 curExternal = external;
19089 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
19091 else if(def->type == 2)
19093 if(def->__anon1.decl->type == 2)
19095 thisClass = regClass;
19096 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
19097 thisClass = (((void *)0));
19101 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
19104 thisClass = regClass;
19105 ProcessDeclaration(def->__anon1.decl, symbol ? 1 : 0);
19106 thisClass = backThisClass;
19109 else if(def->type == 1 && def->__anon1.defProperties)
19111 struct MemberInit * defProperty;
19112 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);
19114 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19115 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
19117 thisClass = regClass;
19118 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
19119 thisClass = (((void *)0));
19121 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19122 FreeSymbol(thisSymbol);
19124 else if(def->type == 3 && def->__anon1.propertyDef)
19126 struct PropertyDef * prop = def->__anon1.propertyDef;
19128 thisClass = regClass;
19133 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19135 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19137 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
19138 ProcessStatement(prop->setStmt);
19144 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19146 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19148 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
19149 ProcessStatement(prop->getStmt);
19151 if(prop->issetStmt)
19155 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
19157 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19159 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
19160 ProcessStatement(prop->issetStmt);
19162 thisClass = (((void *)0));
19164 else if(def->type == 4 && def->__anon1.propertyWatch)
19166 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
19168 thisClass = regClass;
19169 if(propertyWatch->compound)
19171 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);
19173 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
19174 curExternal = (((void *)0));
19175 ProcessStatement(propertyWatch->compound);
19177 thisClass = (((void *)0));
19182 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19184 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19186 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19187 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19188 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19189 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19190 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19191 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19192 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19193 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19194 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19195 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19196 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19197 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19198 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19199 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19200 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19201 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19202 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19203 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19204 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19205 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19206 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19207 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19208 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19209 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19210 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19211 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19212 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19213 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19214 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19215 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19216 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19217 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19218 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19219 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19220 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19221 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19222 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19223 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19224 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19225 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19226 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19227 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19228 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19229 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19230 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19231 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19232 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19233 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19234 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19235 __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);
19236 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "External DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference)", DeclareStruct, module, 2);
19237 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("_DeclareStruct", "External _DeclareStruct(External neededBy, const char * name, bool skipNoHead, bool needDereference, bool fwdDecl)", _DeclareStruct, module, 2);
19238 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(External neededBy, ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19239 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19240 __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);
19241 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19242 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareType", "void DeclareType(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareType, module, 2);
19243 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareTypeForwardDeclare", "void DeclareTypeForwardDeclare(External neededFor, Type type, bool needDereference, bool forFunctionDef)", DeclareTypeForwardDeclare, module, 2);
19244 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19245 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19246 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19247 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19248 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19249 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(External neededFor, ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19250 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19251 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19252 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19253 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(External neededFor, ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19254 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(External neededFor, GlobalData data)", DeclareGlobalData, module, 2);
19255 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19256 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)
19257 __ecereClass_Conversion = class;
19258 __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);
19259 __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);
19260 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19261 __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);
19262 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19263 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19264 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19265 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19266 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19267 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19268 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19269 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19270 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19271 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19272 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19273 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19274 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19275 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19276 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19277 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19278 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19279 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19280 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19281 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19282 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(External neededBy, const String s)", DeclareFunctionUtil, module, 1);
19283 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);