1 /* Code generated from eC source file: pass15.ec */
3 typedef long long int64;
4 typedef unsigned long long uint64;
8 #elif defined(__TINYC__)
10 #define __builtin_va_list va_list
11 #define __builtin_va_start va_start
12 #define __builtin_va_end va_end
14 #define strcasecmp stricmp
15 #define strncasecmp strnicmp
16 #define __declspec(x) __attribute__((x))
20 typedef long long int64;
21 typedef unsigned long long uint64;
23 typedef __int64 int64;
24 typedef unsigned __int64 uint64;
27 #define __ENDIAN_PAD(x) (8 - (x))
29 #define __ENDIAN_PAD(x) 0
32 #include <sys/types.h>
34 #if /*defined(_W64) || */(defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
40 #define arch_PointerSize sizeof(void *)
41 #define structSize_Instance (_64BIT ? 24 : 12)
42 #define structSize_Module (_64BIT ? 560 : 300)
43 #define structSize_NamedLink (_64BIT ? 32 : 16)
45 struct __ecereNameSpace__ecere__com__Instance;
47 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
49 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
51 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
53 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
55 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
57 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
59 struct __ecereNameSpace__ecere__sys__BTNode;
61 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
63 struct __ecereNameSpace__ecere__sys__BinaryTree
65 struct __ecereNameSpace__ecere__sys__BTNode * root;
67 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
68 void (* FreeKey)(void * key);
69 } __attribute__ ((gcc_struct));
71 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
73 struct __ecereNameSpace__ecere__sys__OldList
80 } __attribute__ ((gcc_struct));
82 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
84 struct __ecereNameSpace__ecere__com__Method
87 struct __ecereNameSpace__ecere__com__Method * parent;
88 struct __ecereNameSpace__ecere__com__Method * left;
89 struct __ecereNameSpace__ecere__com__Method * right;
94 struct __ecereNameSpace__ecere__com__Class * _class;
96 const char * dataTypeString;
97 struct Type * dataType;
99 } __attribute__ ((gcc_struct));
101 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
103 struct __ecereNameSpace__ecere__com__Property
105 struct __ecereNameSpace__ecere__com__Property * prev;
106 struct __ecereNameSpace__ecere__com__Property * next;
108 unsigned int isProperty;
111 struct __ecereNameSpace__ecere__com__Class * _class;
112 const char * dataTypeString;
113 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
114 struct Type * dataType;
115 void (* Set)(void * , int);
116 int (* Get)(void * );
117 unsigned int (* IsSet)(void * );
121 unsigned int conversion;
122 unsigned int watcherOffset;
123 const char * category;
124 unsigned int compiled;
125 unsigned int selfWatchable;
126 unsigned int isWatchable;
127 } __attribute__ ((gcc_struct));
129 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
137 } __attribute__ ((gcc_struct));
139 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
143 struct CodePosition start;
144 struct CodePosition end;
145 } __attribute__ ((gcc_struct));
147 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
151 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
160 struct Attrib * attr;
161 } __attribute__ ((gcc_struct)) __anon1;
162 } __attribute__ ((gcc_struct));
164 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
166 struct ClassDefinition
168 struct ClassDefinition * prev;
169 struct ClassDefinition * next;
171 struct Specifier * _class;
172 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
173 struct __ecereNameSpace__ecere__sys__OldList * definitions;
174 struct Symbol * symbol;
175 struct Location blockStart;
176 struct Location nameLoc;
179 unsigned int deleteWatchable;
180 } __attribute__ ((gcc_struct));
182 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
186 struct Context * parent;
187 struct __ecereNameSpace__ecere__sys__BinaryTree types;
188 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
189 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
190 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
193 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
194 struct ClassDefinition * classDef;
195 unsigned int templateTypesOnly;
196 unsigned int hasNameSpace;
197 } __attribute__ ((gcc_struct));
199 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
203 struct Instantiation * prev;
204 struct Instantiation * next;
206 struct Specifier * _class;
207 struct Expression * exp;
208 struct __ecereNameSpace__ecere__sys__OldList * members;
209 struct Symbol * symbol;
210 unsigned int fullSet;
211 unsigned int isConstant;
212 unsigned char * data;
213 struct Location nameLoc;
214 struct Location insideLoc;
216 } __attribute__ ((gcc_struct));
218 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
222 struct Declaration * prev;
223 struct Declaration * next;
230 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
231 struct __ecereNameSpace__ecere__sys__OldList * declarators;
232 } __attribute__ ((gcc_struct)) __anon1;
233 struct Instantiation * inst;
236 struct Identifier * id;
237 struct Expression * exp;
238 } __attribute__ ((gcc_struct)) __anon2;
239 } __attribute__ ((gcc_struct)) __anon1;
240 struct Specifier * extStorage;
241 struct Symbol * symbol;
243 } __attribute__ ((gcc_struct));
245 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
249 struct Statement * prev;
250 struct Statement * next;
255 struct __ecereNameSpace__ecere__sys__OldList * expressions;
258 struct Identifier * id;
259 struct Statement * stmt;
260 } __attribute__ ((gcc_struct)) labeled;
263 struct Expression * exp;
264 struct Statement * stmt;
265 } __attribute__ ((gcc_struct)) caseStmt;
268 struct __ecereNameSpace__ecere__sys__OldList * declarations;
269 struct __ecereNameSpace__ecere__sys__OldList * statements;
270 struct Context * context;
271 unsigned int isSwitch;
272 } __attribute__ ((gcc_struct)) compound;
275 struct __ecereNameSpace__ecere__sys__OldList * exp;
276 struct Statement * stmt;
277 struct Statement * elseStmt;
278 } __attribute__ ((gcc_struct)) ifStmt;
281 struct __ecereNameSpace__ecere__sys__OldList * exp;
282 struct Statement * stmt;
283 } __attribute__ ((gcc_struct)) switchStmt;
286 struct __ecereNameSpace__ecere__sys__OldList * exp;
287 struct Statement * stmt;
288 } __attribute__ ((gcc_struct)) whileStmt;
291 struct __ecereNameSpace__ecere__sys__OldList * exp;
292 struct Statement * stmt;
293 } __attribute__ ((gcc_struct)) doWhile;
296 struct Statement * init;
297 struct Statement * check;
298 struct __ecereNameSpace__ecere__sys__OldList * increment;
299 struct Statement * stmt;
300 } __attribute__ ((gcc_struct)) forStmt;
303 struct Identifier * id;
304 } __attribute__ ((gcc_struct)) gotoStmt;
307 struct Specifier * spec;
309 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
310 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
311 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
312 } __attribute__ ((gcc_struct)) asmStmt;
315 struct Expression * watcher;
316 struct Expression * object;
317 struct __ecereNameSpace__ecere__sys__OldList * watches;
318 } __attribute__ ((gcc_struct)) _watch;
321 struct Identifier * id;
322 struct __ecereNameSpace__ecere__sys__OldList * exp;
323 struct __ecereNameSpace__ecere__sys__OldList * filter;
324 struct Statement * stmt;
325 } __attribute__ ((gcc_struct)) forEachStmt;
326 struct Declaration * decl;
327 } __attribute__ ((gcc_struct)) __anon1;
328 } __attribute__ ((gcc_struct));
330 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
334 struct TypeName * prev;
335 struct TypeName * next;
337 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
338 struct Declarator * declarator;
340 struct Expression * bitCount;
341 } __attribute__ ((gcc_struct));
343 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
347 struct Initializer * prev;
348 struct Initializer * next;
353 struct Expression * exp;
354 struct __ecereNameSpace__ecere__sys__OldList * list;
355 } __attribute__ ((gcc_struct)) __anon1;
356 unsigned int isConstant;
357 struct Identifier * id;
358 } __attribute__ ((gcc_struct));
360 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
362 struct __ecereNameSpace__ecere__com__DataValue
377 } __attribute__ ((gcc_struct)) __anon1;
378 } __attribute__ ((gcc_struct));
380 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
384 struct Expression * prev;
385 struct Expression * next;
393 struct Identifier * identifier;
394 } __attribute__ ((gcc_struct)) __anon1;
395 struct Statement * compound;
396 struct Instantiation * instance;
400 unsigned int intlString;
401 } __attribute__ ((gcc_struct)) __anon2;
402 struct __ecereNameSpace__ecere__sys__OldList * list;
405 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
406 struct Declarator * decl;
407 } __attribute__ ((gcc_struct)) _classExp;
410 struct Identifier * id;
411 } __attribute__ ((gcc_struct)) classData;
414 struct Expression * exp;
415 struct __ecereNameSpace__ecere__sys__OldList * arguments;
416 struct Location argLoc;
417 } __attribute__ ((gcc_struct)) call;
420 struct Expression * exp;
421 struct __ecereNameSpace__ecere__sys__OldList * index;
422 } __attribute__ ((gcc_struct)) index;
425 struct Expression * exp;
426 struct Identifier * member;
428 unsigned int thisPtr;
429 } __attribute__ ((gcc_struct)) member;
433 struct Expression * exp1;
434 struct Expression * exp2;
435 } __attribute__ ((gcc_struct)) op;
436 struct TypeName * typeName;
437 struct Specifier * _class;
440 struct TypeName * typeName;
441 struct Expression * exp;
442 } __attribute__ ((gcc_struct)) cast;
445 struct Expression * cond;
446 struct __ecereNameSpace__ecere__sys__OldList * exp;
447 struct Expression * elseExp;
448 } __attribute__ ((gcc_struct)) cond;
451 struct TypeName * typeName;
452 struct Expression * size;
453 } __attribute__ ((gcc_struct)) _new;
456 struct TypeName * typeName;
457 struct Expression * size;
458 struct Expression * exp;
459 } __attribute__ ((gcc_struct)) _renew;
463 struct Identifier * id;
464 } __attribute__ ((gcc_struct)) db;
467 struct Expression * ds;
468 struct Expression * name;
469 } __attribute__ ((gcc_struct)) dbopen;
472 struct TypeName * typeName;
473 struct Initializer * initializer;
474 } __attribute__ ((gcc_struct)) initializer;
477 struct Expression * exp;
478 struct TypeName * typeName;
479 } __attribute__ ((gcc_struct)) vaArg;
480 } __attribute__ ((gcc_struct)) __anon1;
481 unsigned int debugValue;
482 struct __ecereNameSpace__ecere__com__DataValue val;
484 unsigned int hasAddress;
485 struct Type * expType;
486 struct Type * destType;
489 unsigned int byReference;
490 unsigned int isConstant;
491 unsigned int addedThis;
492 unsigned int needCast;
493 unsigned int thisPtr;
494 unsigned int opDestType;
495 unsigned int needTemplateCast;
496 } __attribute__ ((gcc_struct));
498 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
500 struct TemplateDatatype
502 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
503 struct Declarator * decl;
504 } __attribute__ ((gcc_struct));
506 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
508 struct TemplateArgument;
510 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
512 struct TemplateParameter
514 struct TemplateParameter * prev;
515 struct TemplateParameter * next;
518 struct Identifier * identifier;
521 struct TemplateDatatype * dataType;
523 } __attribute__ ((gcc_struct)) __anon1;
524 struct TemplateArgument * defaultArgument;
525 const char * dataTypeString;
526 struct Type * baseType;
527 } __attribute__ ((gcc_struct));
529 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
533 struct Specifier * prev;
534 struct Specifier * next;
542 struct ExtDecl * extDecl;
544 struct Symbol * symbol;
545 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
546 } __attribute__ ((gcc_struct)) __anon1;
549 struct Identifier * id;
550 struct __ecereNameSpace__ecere__sys__OldList * list;
551 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
552 struct __ecereNameSpace__ecere__sys__OldList * definitions;
553 unsigned int addNameSpace;
554 struct Context * ctx;
555 struct ExtDecl * extDeclStruct;
556 } __attribute__ ((gcc_struct)) __anon2;
557 struct Expression * expression;
558 struct Specifier * _class;
559 struct TemplateParameter * templateParameter;
560 } __attribute__ ((gcc_struct)) __anon1;
561 } __attribute__ ((gcc_struct));
563 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
567 struct Identifier * prev;
568 struct Identifier * next;
570 struct Symbol * classSym;
571 struct Specifier * _class;
573 struct Identifier * badID;
574 } __attribute__ ((gcc_struct));
576 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
580 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
584 struct Declarator * prev;
585 struct Declarator * next;
588 struct Symbol * symbol;
589 struct Declarator * declarator;
592 struct Identifier * identifier;
595 struct Expression * exp;
596 struct Expression * posExp;
597 struct Attrib * attrib;
598 } __attribute__ ((gcc_struct)) structDecl;
601 struct Expression * exp;
602 struct Specifier * enumClass;
603 } __attribute__ ((gcc_struct)) array;
606 struct __ecereNameSpace__ecere__sys__OldList * parameters;
607 } __attribute__ ((gcc_struct)) function;
610 struct Pointer * pointer;
611 } __attribute__ ((gcc_struct)) pointer;
614 struct ExtDecl * extended;
615 } __attribute__ ((gcc_struct)) extended;
616 } __attribute__ ((gcc_struct)) __anon1;
617 } __attribute__ ((gcc_struct));
619 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
621 struct FunctionDefinition
623 struct FunctionDefinition * prev;
624 struct FunctionDefinition * next;
626 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
627 struct Declarator * declarator;
628 struct __ecereNameSpace__ecere__sys__OldList * declarations;
629 struct Statement * body;
630 struct __ecereNameSpace__ecere__com__Class * _class;
631 struct __ecereNameSpace__ecere__sys__OldList attached;
634 struct Symbol * propSet;
636 unsigned int propertyNoThis;
637 } __attribute__ ((gcc_struct));
639 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
643 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
647 struct External * prev;
648 struct External * next;
651 struct Symbol * symbol;
654 struct FunctionDefinition * function;
655 struct ClassDefinition * _class;
656 struct Declaration * declaration;
658 struct Identifier * id;
659 struct DBTableDef * table;
660 } __attribute__ ((gcc_struct)) __anon1;
662 } __attribute__ ((gcc_struct));
664 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
668 struct ModuleImport * prev;
669 struct ModuleImport * next;
671 struct __ecereNameSpace__ecere__sys__OldList classes;
672 struct __ecereNameSpace__ecere__sys__OldList functions;
675 } __attribute__ ((gcc_struct));
677 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
681 struct ClassImport * prev;
682 struct ClassImport * next;
684 struct __ecereNameSpace__ecere__sys__OldList methods;
685 struct __ecereNameSpace__ecere__sys__OldList properties;
688 } __attribute__ ((gcc_struct));
690 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
695 struct Symbol * parent;
696 struct Symbol * left;
697 struct Symbol * right;
702 struct __ecereNameSpace__ecere__com__Method * method;
703 struct __ecereNameSpace__ecere__com__Property * _property;
704 struct __ecereNameSpace__ecere__com__Class * registered;
705 } __attribute__ ((gcc_struct)) __anon1;
712 struct External * pointerExternal;
713 struct External * structExternal;
714 } __attribute__ ((gcc_struct)) __anon1;
717 struct External * externalGet;
718 struct External * externalSet;
719 struct External * externalPtr;
720 struct External * externalIsSet;
721 } __attribute__ ((gcc_struct)) __anon2;
724 struct External * methodExternal;
725 struct External * methodCodeExternal;
726 } __attribute__ ((gcc_struct)) __anon3;
727 } __attribute__ ((gcc_struct)) __anon2;
728 unsigned int imported;
729 unsigned int declaredStructSym;
730 struct __ecereNameSpace__ecere__com__Class * _class;
731 unsigned int declaredStruct;
732 unsigned int needConstructor;
733 unsigned int needDestructor;
734 char * constructorName;
737 char * destructorName;
738 struct ModuleImport * module;
739 struct ClassImport * _import;
740 struct Location nameLoc;
741 unsigned int isParam;
742 unsigned int isRemote;
743 unsigned int isStruct;
744 unsigned int fireWatchersDone;
746 unsigned int classData;
747 unsigned int isStatic;
749 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
750 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
751 struct Context * ctx;
753 struct Expression * propCategory;
754 } __attribute__ ((gcc_struct));
756 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
765 struct Symbol * _class;
768 struct __ecereNameSpace__ecere__sys__OldList members;
770 } __attribute__ ((gcc_struct)) __anon1;
773 struct Type * returnType;
774 struct __ecereNameSpace__ecere__sys__OldList params;
775 struct Symbol * thisClass;
776 unsigned int staticMethod;
777 struct TemplateParameter * thisClassTemplate;
778 } __attribute__ ((gcc_struct)) __anon2;
781 struct __ecereNameSpace__ecere__com__Method * method;
782 struct __ecereNameSpace__ecere__com__Class * methodClass;
783 struct __ecereNameSpace__ecere__com__Class * usedClass;
784 } __attribute__ ((gcc_struct)) __anon3;
787 struct Type * arrayType;
789 struct Expression * arraySizeExp;
790 unsigned int freeExp;
791 struct Symbol * enumClass;
792 } __attribute__ ((gcc_struct)) __anon4;
794 struct TemplateParameter * templateParameter;
795 } __attribute__ ((gcc_struct)) __anon1;
805 unsigned int isSigned : 1;
806 unsigned int constant : 1;
807 unsigned int truth : 1;
808 unsigned int byReference : 1;
809 unsigned int extraParam : 1;
810 unsigned int directClassAccess : 1;
811 unsigned int computing : 1;
812 unsigned int keepCast : 1;
813 unsigned int passAsTemplate : 1;
814 unsigned int dllExport : 1;
815 unsigned int attrStdcall : 1;
816 unsigned int declaredWithStruct : 1;
817 unsigned int typedByReference : 1;
818 unsigned int casted : 1;
819 } __attribute__ ((gcc_struct));
821 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
823 struct __ecereNameSpace__ecere__com__Class
825 struct __ecereNameSpace__ecere__com__Class * prev;
826 struct __ecereNameSpace__ecere__com__Class * next;
832 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
833 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
836 struct __ecereNameSpace__ecere__com__Class * base;
837 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
838 struct __ecereNameSpace__ecere__sys__BinaryTree members;
839 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
840 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
841 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
842 struct __ecereNameSpace__ecere__sys__OldList derivatives;
846 struct __ecereNameSpace__ecere__com__Instance * module;
847 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
848 const char * dataTypeString;
849 struct Type * dataType;
851 int defaultAlignment;
852 void (* Initialize)();
854 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
855 const char * designerClass;
856 unsigned int noExpansion;
857 const char * defaultProperty;
858 unsigned int comRedefinition;
861 unsigned int internalDecl;
863 unsigned int computeSize;
865 int destructionWatchOffset;
867 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
868 int inheritanceAccess;
869 const char * fullName;
871 struct __ecereNameSpace__ecere__sys__OldList conversions;
872 struct __ecereNameSpace__ecere__sys__OldList templateParams;
873 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
874 struct __ecereNameSpace__ecere__com__Class * templateClass;
875 struct __ecereNameSpace__ecere__sys__OldList templatized;
877 unsigned int isInstanceClass;
878 unsigned int byValueSystemClass;
879 } __attribute__ ((gcc_struct));
881 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
883 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
885 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
887 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
889 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
891 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);
893 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
895 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
897 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
899 struct __ecereNameSpace__ecere__com__Instance
902 struct __ecereNameSpace__ecere__com__Class * _class;
904 } __attribute__ ((gcc_struct));
906 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
908 struct __ecereNameSpace__ecere__com__DataMember
910 struct __ecereNameSpace__ecere__com__DataMember * prev;
911 struct __ecereNameSpace__ecere__com__DataMember * next;
913 unsigned int isProperty;
916 struct __ecereNameSpace__ecere__com__Class * _class;
917 const char * dataTypeString;
918 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
919 struct Type * dataType;
923 struct __ecereNameSpace__ecere__sys__OldList members;
924 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
927 } __attribute__ ((gcc_struct));
929 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
931 struct __ecereNameSpace__ecere__com__SerialBuffer
933 unsigned char * _buffer;
937 } __attribute__ ((gcc_struct));
939 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
941 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
947 const char * dataTypeString;
948 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
949 } __attribute__ ((gcc_struct)) __anon1;
950 struct __ecereNameSpace__ecere__com__DataValue expression;
953 const char * memberString;
956 struct __ecereNameSpace__ecere__com__DataMember * member;
957 struct __ecereNameSpace__ecere__com__Property * prop;
958 struct __ecereNameSpace__ecere__com__Method * method;
959 } __attribute__ ((gcc_struct)) __anon1;
960 } __attribute__ ((gcc_struct)) __anon2;
961 } __attribute__ ((gcc_struct)) __anon1;
962 } __attribute__ ((gcc_struct));
964 void exit(int status);
966 void * calloc(size_t nmemb, size_t size);
968 void free(void * ptr);
970 void * malloc(size_t size);
972 void * realloc(void * ptr, size_t size);
974 long int strtol(const char * nptr, char ** endptr, int base);
976 long long int strtoll(const char * nptr, char ** endptr, int base);
978 unsigned long long int strtoull(const char * nptr, char ** endptr, int base);
982 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
985 typedef union YYSTYPE
990 struct Identifier * id;
991 struct Expression * exp;
992 struct Specifier * specifier;
993 struct __ecereNameSpace__ecere__sys__OldList * list;
994 struct Enumerator * enumerator;
995 struct Declarator * declarator;
996 struct Pointer * pointer;
997 struct Initializer * initializer;
998 struct InitDeclarator * initDeclarator;
999 struct TypeName * typeName;
1000 struct Declaration * declaration;
1001 struct Statement * stmt;
1002 struct FunctionDefinition * function;
1003 struct External * external;
1004 struct Context * context;
1005 struct AsmField * asmField;
1006 struct Attrib * attrib;
1007 struct ExtDecl * extDecl;
1008 struct Attribute * attribute;
1009 struct Instantiation * instance;
1010 struct MembersInit * membersInit;
1011 struct MemberInit * memberInit;
1012 struct ClassFunction * classFunction;
1013 struct ClassDefinition * _class;
1014 struct ClassDef * classDef;
1015 struct PropertyDef * prop;
1017 struct Symbol * symbol;
1018 struct PropertyWatch * propertyWatch;
1019 struct TemplateParameter * templateParameter;
1020 struct TemplateArgument * templateArgument;
1021 struct TemplateDatatype * templateDatatype;
1022 struct DBTableEntry * dbtableEntry;
1023 struct DBIndexItem * dbindexItem;
1024 struct DBTableDef * dbtableDef;
1025 } __attribute__ ((gcc_struct)) YYSTYPE;
1027 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
1031 struct Enumerator * prev;
1032 struct Enumerator * next;
1033 struct Location loc;
1034 struct Identifier * id;
1035 struct Expression * exp;
1036 } __attribute__ ((gcc_struct));
1038 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
1040 struct InitDeclarator
1042 struct InitDeclarator * prev;
1043 struct InitDeclarator * next;
1044 struct Location loc;
1045 struct Declarator * declarator;
1046 struct Initializer * initializer;
1047 } __attribute__ ((gcc_struct));
1049 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
1053 struct AsmField * prev;
1054 struct AsmField * next;
1055 struct Location loc;
1057 struct Expression * expression;
1058 struct Identifier * symbolic;
1059 } __attribute__ ((gcc_struct));
1061 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
1065 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
1067 struct ClassFunction
1069 struct ClassFunction * prev;
1070 struct ClassFunction * next;
1071 struct Location loc;
1072 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1073 struct Declarator * declarator;
1074 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1075 struct Statement * body;
1076 struct __ecereNameSpace__ecere__com__Class * _class;
1077 struct __ecereNameSpace__ecere__sys__OldList attached;
1080 struct Symbol * propSet;
1081 unsigned int isVirtual;
1082 unsigned int isConstructor;
1083 unsigned int isDestructor;
1084 unsigned int dontMangle;
1087 } __attribute__ ((gcc_struct));
1089 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1093 struct MembersInit * prev;
1094 struct MembersInit * next;
1095 struct Location loc;
1099 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1100 struct ClassFunction * function;
1101 } __attribute__ ((gcc_struct)) __anon1;
1102 } __attribute__ ((gcc_struct));
1104 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1108 struct MemberInit * prev;
1109 struct MemberInit * next;
1110 struct Location loc;
1111 struct Location realLoc;
1112 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1113 struct Initializer * initializer;
1115 unsigned int variable;
1116 unsigned int takeOutExp;
1117 } __attribute__ ((gcc_struct));
1119 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1123 struct PropertyDef * prev;
1124 struct PropertyDef * next;
1125 struct Location loc;
1126 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1127 struct Declarator * declarator;
1128 struct Identifier * id;
1129 struct Statement * getStmt;
1130 struct Statement * setStmt;
1131 struct Statement * issetStmt;
1132 struct Symbol * symbol;
1133 struct Expression * category;
1136 unsigned int conversion : 1;
1137 unsigned int isWatchable : 1;
1138 unsigned int isDBProp : 1;
1139 } __attribute__ ((gcc_struct)) __anon1;
1140 } __attribute__ ((gcc_struct));
1142 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1144 struct PropertyWatch
1146 struct PropertyWatch * prev;
1147 struct PropertyWatch * next;
1148 struct Location loc;
1149 struct Statement * compound;
1150 struct __ecereNameSpace__ecere__sys__OldList * properties;
1151 unsigned int deleteWatch;
1152 } __attribute__ ((gcc_struct));
1154 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1158 struct ClassDef * prev;
1159 struct ClassDef * next;
1160 struct Location loc;
1164 struct Declaration * decl;
1165 struct ClassFunction * function;
1166 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1167 struct PropertyDef * propertyDef;
1168 struct PropertyWatch * propertyWatch;
1170 struct Identifier * defaultProperty;
1173 struct Identifier * id;
1174 struct Initializer * initializer;
1175 } __attribute__ ((gcc_struct)) __anon1;
1176 } __attribute__ ((gcc_struct)) __anon1;
1179 } __attribute__ ((gcc_struct));
1181 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1183 struct DBTableEntry;
1185 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1189 extern YYSTYPE yylval;
1191 extern struct Location yylloc;
1193 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
1195 extern int returnCode;
1197 extern struct Expression * parsedExpression;
1199 extern unsigned int yydebug;
1201 void SetYydebug(unsigned int b)
1206 extern unsigned int echoOn;
1208 void resetScanner();
1212 int expression_yyparse();
1214 static struct Statement * curCompound;
1216 struct External * curExternal, * afterExternal;
1218 static struct Type * curSwitchType;
1220 static struct __ecereNameSpace__ecere__com__Class * currentClass;
1222 struct __ecereNameSpace__ecere__com__Class * thisClass;
1224 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
1229 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
1234 static char * thisNameSpace;
1236 struct __ecereNameSpace__ecere__com__Class * containerClass;
1238 unsigned int thisClassParams = 0x1;
1240 unsigned int internalValueCounter;
1242 extern unsigned int outputLineNumbers;
1244 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
1246 extern size_t strlen(const char * );
1248 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
1250 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
1252 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
1254 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
1256 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
1258 void PrintExpression(struct Expression * exp, char * string)
1261 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
1263 unsigned int backOutputLineNumbers = outputLineNumbers;
1265 outputLineNumbers = 0x0;
1267 OutputExpression(exp, f);
1268 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
1269 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1271 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1272 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
1273 count = strlen(string);
1274 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
1275 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1277 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1278 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
1279 string[count] = '\0';
1280 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
1281 outputLineNumbers = backOutputLineNumbers;
1285 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
1287 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1289 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1291 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1293 if(!param->baseType)
1295 if(param->dataTypeString)
1296 param->baseType = ProcessTypeString(param->dataTypeString, 0x0);
1298 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1300 return param->baseType;
1302 return (((void *)0));
1305 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1307 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1309 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0x0)
1313 if(type1->kind == type2->kind)
1324 if(type1->passAsTemplate && !type2->passAsTemplate)
1326 return type1->isSigned != type2->isSigned;
1328 return type1->__anon1._class != type2->__anon1._class;
1330 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1338 extern int strcmp(const char * , const char * );
1340 extern struct Context * curContext;
1342 extern struct Context * topContext;
1344 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
1346 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);
1348 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
1350 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);
1352 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);
1354 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassProperty;
1356 struct __ecereNameSpace__ecere__com__ClassProperty
1359 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1360 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1361 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1363 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1364 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1365 const char * dataTypeString;
1366 struct Type * dataType;
1367 unsigned int constant;
1368 } __attribute__ ((gcc_struct));
1370 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1372 extern struct Expression * QMkExpId(const char * id);
1374 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateParameter;
1376 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
1378 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
1379 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
1384 const char * dataTypeString;
1386 } __attribute__ ((gcc_struct)) __anon1;
1387 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
1389 } __attribute__ ((gcc_struct));
1391 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
1393 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1395 extern void FreeIdentifier(struct Identifier * id);
1397 void ProcessExpressionType(struct Expression * exp);
1399 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1401 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
1403 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
1405 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1407 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1409 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
1411 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
1413 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
1415 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
1417 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
1419 struct Identifier * id = exp->__anon1.__anon1.identifier;
1420 struct Context * ctx;
1421 struct Symbol * symbol = (((void *)0));
1423 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
1425 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
1427 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
1432 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))))
1434 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
1435 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
1436 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
1437 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
1441 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
1443 if(!prop && !method)
1444 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
1445 if(!prop && !method && !member)
1447 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
1449 if(prop || method || member || classProp)
1452 exp->__anon1.member.member = id;
1453 exp->__anon1.member.memberType = 0;
1454 exp->__anon1.member.exp = QMkExpId("this");
1455 exp->addedThis = 0x1;
1457 else if(_class && _class->templateParams.first)
1459 struct __ecereNameSpace__ecere__com__Class * sClass;
1461 for(sClass = _class; sClass; sClass = sClass->base)
1463 if(sClass->templateParams.first)
1465 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
1467 for(param = sClass->templateParams.first; param; param = param->next)
1469 if(param->type == 2 && !strcmp(param->name, id->string))
1471 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
1475 struct Declarator * decl;
1476 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1478 FreeIdentifier(exp->__anon1.member.member);
1479 ProcessExpressionType(argExp);
1480 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
1481 exp->expType = ProcessType(specs, decl);
1483 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
1494 extern int sprintf(char * , const char * , ...);
1496 extern int __ecereNameSpace__ecere__com__GetRuntimePlatform(void);
1498 extern char * strcat(char * , const char * );
1500 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
1502 char * PrintInt(long long result)
1506 if(result > (((int)0x7fffffff)))
1507 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1509 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64d" : "%lld"), result);
1510 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
1512 return __ecereNameSpace__ecere__sys__CopyString(temp);
1515 char * PrintUInt(uint64 result)
1519 if(result > (0xffffffff))
1520 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1521 else if(result > (((int)0x7fffffff)))
1522 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1524 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64d" : "%lld"), result);
1525 return __ecereNameSpace__ecere__sys__CopyString(temp);
1528 char * PrintInt64(long long result)
1532 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64dLL" : "%lldLL"), result);
1533 return __ecereNameSpace__ecere__sys__CopyString(temp);
1536 char * PrintUInt64(uint64 result)
1540 if(result > (((long long)0x7fffffffffffffffLL)))
1541 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1543 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64dLL" : "%lldLL"), result);
1544 return __ecereNameSpace__ecere__sys__CopyString(temp);
1547 char * PrintHexUInt(uint64 result)
1551 if(result > (0xffffffff))
1552 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1554 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1555 if(result > (0xffffffff))
1557 return __ecereNameSpace__ecere__sys__CopyString(temp);
1560 char * PrintHexUInt64(uint64 result)
1564 if(result > (0xffffffff))
1565 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1567 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1568 return __ecereNameSpace__ecere__sys__CopyString(temp);
1571 char * PrintShort(short result)
1575 sprintf(temp, "%d", (unsigned short)result);
1576 return __ecereNameSpace__ecere__sys__CopyString(temp);
1579 char * PrintUShort(unsigned short result)
1583 if(result > (unsigned short)32767)
1584 sprintf(temp, "0x%X", (int)result);
1586 sprintf(temp, "%d", (int)result);
1587 return __ecereNameSpace__ecere__sys__CopyString(temp);
1590 extern int isprint(int c);
1592 char * PrintChar(char result)
1596 if(result > (char)0 && isprint(result))
1597 sprintf(temp, "'%c'", result);
1598 else if(result < (char)0)
1599 sprintf(temp, "%d", (int)result);
1601 sprintf(temp, "0x%X", (unsigned char)result);
1602 return __ecereNameSpace__ecere__sys__CopyString(temp);
1605 char * PrintUChar(unsigned char result)
1609 sprintf(temp, "0x%X", result);
1610 return __ecereNameSpace__ecere__sys__CopyString(temp);
1613 extern char * strcpy(char * , const char * );
1615 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
1617 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_isInf;
1619 extern int (* __ecereProp_float_Get_signBit)(float this);
1621 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_signBit;
1623 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
1625 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_isNan;
1627 char * PrintFloat(float result)
1631 if(__ecereProp_float_Get_isInf(result))
1633 if(__ecereProp_float_Get_signBit(result))
1634 strcpy(temp, "-inf");
1636 strcpy(temp, "inf");
1638 else if(__ecereProp_float_Get_isNan(result))
1640 if(__ecereProp_float_Get_signBit(result))
1641 strcpy(temp, "-nan");
1643 strcpy(temp, "nan");
1646 sprintf(temp, "%.16ff", result);
1647 return __ecereNameSpace__ecere__sys__CopyString(temp);
1650 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
1652 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_isInf;
1654 extern int (* __ecereProp_double_Get_signBit)(double this);
1656 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_signBit;
1658 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
1660 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_isNan;
1662 char * PrintDouble(double result)
1666 if(__ecereProp_double_Get_isInf(result))
1668 if(__ecereProp_double_Get_signBit(result))
1669 strcpy(temp, "-inf");
1671 strcpy(temp, "inf");
1673 else if(__ecereProp_double_Get_isNan(result))
1675 if(__ecereProp_double_Get_signBit(result))
1676 strcpy(temp, "-nan");
1678 strcpy(temp, "nan");
1681 sprintf(temp, "%.16f", result);
1682 return __ecereNameSpace__ecere__sys__CopyString(temp);
1685 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_OpTable;
1689 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1690 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1691 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1692 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1693 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1694 unsigned int (* Neg)(struct Expression *, struct Operand *);
1695 unsigned int (* Inc)(struct Expression *, struct Operand *);
1696 unsigned int (* Dec)(struct Expression *, struct Operand *);
1697 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1698 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1699 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1700 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1701 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1702 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1703 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1704 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1705 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1706 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1707 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1708 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1709 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1710 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1711 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1712 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1713 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1714 unsigned int (* Not)(struct Expression *, struct Operand *);
1715 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1716 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1717 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1718 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1719 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1720 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1721 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1722 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1723 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1724 } __attribute__ ((gcc_struct));
1726 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Operand;
1732 unsigned int ptrSize;
1745 } __attribute__ ((gcc_struct)) __anon1;
1747 } __attribute__ ((gcc_struct));
1749 unsigned int GetOpInt(struct Operand * op2, int * value2)
1751 if(op2->kind == 3 && op2->type->isSigned)
1752 *value2 = op2->__anon1.i;
1753 else if(op2->kind == 3)
1754 *value2 = (int)op2->__anon1.ui;
1755 else if(op2->kind == 4 && op2->type->isSigned)
1756 *value2 = (int)op2->__anon1.i64;
1757 else if(op2->kind == 4)
1758 *value2 = (int)op2->__anon1.ui64;
1759 else if(op2->kind == 23 && op2->type->isSigned)
1760 *value2 = (int)op2->__anon1.i64;
1761 else if(op2->kind == 23)
1762 *value2 = (int)op2->__anon1.ui64;
1763 else if(op2->kind == 22 && op2->type->isSigned)
1764 *value2 = (int)op2->__anon1.i64;
1765 else if(op2->kind == 22)
1766 *value2 = (int)op2->__anon1.ui64;
1767 else if(op2->kind == 2 && op2->type->isSigned)
1768 *value2 = (int)op2->__anon1.s;
1769 else if(op2->kind == 2)
1770 *value2 = (int)op2->__anon1.us;
1771 else if(op2->kind == 1 && op2->type->isSigned)
1772 *value2 = (int)op2->__anon1.c;
1773 else if(op2->kind == 24 || op2->kind == 1)
1774 *value2 = (int)op2->__anon1.uc;
1775 else if(op2->kind == 6)
1776 *value2 = (int)op2->__anon1.f;
1777 else if(op2->kind == 7)
1778 *value2 = (int)op2->__anon1.d;
1779 else if(op2->kind == 13)
1780 *value2 = (int)op2->__anon1.ui64;
1786 struct Operand GetOperand(struct Expression * exp);
1788 unsigned int GetInt(struct Expression * exp, int * value2)
1790 struct Operand op2 = GetOperand(exp);
1792 return GetOpInt(&op2, value2);
1795 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1797 if(op2->kind == 3 && op2->type->isSigned)
1798 *value2 = (unsigned int)op2->__anon1.i;
1799 else if(op2->kind == 3)
1800 *value2 = op2->__anon1.ui;
1801 else if(op2->kind == 4 && op2->type->isSigned)
1802 *value2 = (unsigned int)op2->__anon1.i64;
1803 else if(op2->kind == 4)
1804 *value2 = (unsigned int)op2->__anon1.ui64;
1805 else if(op2->kind == 23 && op2->type->isSigned)
1806 *value2 = (unsigned int)op2->__anon1.i64;
1807 else if(op2->kind == 23)
1808 *value2 = (unsigned int)op2->__anon1.ui64;
1809 else if(op2->kind == 22 && op2->type->isSigned)
1810 *value2 = (unsigned int)op2->__anon1.i64;
1811 else if(op2->kind == 22)
1812 *value2 = (unsigned int)op2->__anon1.ui64;
1813 else if(op2->kind == 2 && op2->type->isSigned)
1814 *value2 = (unsigned int)op2->__anon1.s;
1815 else if(op2->kind == 2)
1816 *value2 = (unsigned int)op2->__anon1.us;
1817 else if(op2->kind == 1 && op2->type->isSigned)
1818 *value2 = (unsigned int)op2->__anon1.c;
1819 else if(op2->kind == 24 || op2->kind == 1)
1820 *value2 = (unsigned int)op2->__anon1.uc;
1821 else if(op2->kind == 6)
1822 *value2 = (unsigned int)op2->__anon1.f;
1823 else if(op2->kind == 7)
1824 *value2 = (unsigned int)op2->__anon1.d;
1825 else if(op2->kind == 13)
1826 *value2 = (unsigned int)op2->__anon1.ui64;
1832 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
1834 struct Operand op2 = GetOperand(exp);
1836 return GetOpUInt(&op2, value2);
1839 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
1841 if(op2->kind == 3 && op2->type->isSigned)
1842 *value2 = (long long)op2->__anon1.i;
1843 else if(op2->kind == 3)
1844 *value2 = (long long)op2->__anon1.ui;
1845 else if(op2->kind == 4 && op2->type->isSigned)
1846 *value2 = op2->__anon1.i64;
1847 else if(op2->kind == 4)
1848 *value2 = (long long)op2->__anon1.ui64;
1849 else if(op2->kind == 23 && op2->type->isSigned)
1850 *value2 = op2->__anon1.i64;
1851 else if(op2->kind == 23)
1852 *value2 = (long long)op2->__anon1.ui64;
1853 else if(op2->kind == 22 && op2->type->isSigned)
1854 *value2 = op2->__anon1.i64;
1855 else if(op2->kind == 22)
1856 *value2 = (long long)op2->__anon1.ui64;
1857 else if(op2->kind == 2 && op2->type->isSigned)
1858 *value2 = (long long)op2->__anon1.s;
1859 else if(op2->kind == 2)
1860 *value2 = (long long)op2->__anon1.us;
1861 else if(op2->kind == 1 && op2->type->isSigned)
1862 *value2 = (long long)op2->__anon1.c;
1863 else if(op2->kind == 24 || op2->kind == 1)
1864 *value2 = (long long)op2->__anon1.uc;
1865 else if(op2->kind == 6)
1866 *value2 = (long long)op2->__anon1.f;
1867 else if(op2->kind == 7)
1868 *value2 = (long long)op2->__anon1.d;
1869 else if(op2->kind == 13)
1870 *value2 = (long long)op2->__anon1.ui64;
1876 unsigned int GetInt64(struct Expression * exp, long long * value2)
1878 struct Operand op2 = GetOperand(exp);
1880 return GetOpInt64(&op2, value2);
1883 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
1885 if(op2->kind == 3 && op2->type->isSigned)
1886 *value2 = (uint64)op2->__anon1.i;
1887 else if(op2->kind == 3)
1888 *value2 = (uint64)op2->__anon1.ui;
1889 else if(op2->kind == 4 && op2->type->isSigned)
1890 *value2 = (uint64)op2->__anon1.i64;
1891 else if(op2->kind == 4)
1892 *value2 = op2->__anon1.ui64;
1893 else if(op2->kind == 23 && op2->type->isSigned)
1894 *value2 = (uint64)op2->__anon1.i64;
1895 else if(op2->kind == 23)
1896 *value2 = op2->__anon1.ui64;
1897 else if(op2->kind == 22 && op2->type->isSigned)
1898 *value2 = (uint64)op2->__anon1.i64;
1899 else if(op2->kind == 22)
1900 *value2 = op2->__anon1.ui64;
1901 else if(op2->kind == 2 && op2->type->isSigned)
1902 *value2 = (uint64)op2->__anon1.s;
1903 else if(op2->kind == 2)
1904 *value2 = (uint64)op2->__anon1.us;
1905 else if(op2->kind == 1 && op2->type->isSigned)
1906 *value2 = (uint64)op2->__anon1.c;
1907 else if(op2->kind == 24 || op2->kind == 1)
1908 *value2 = (uint64)op2->__anon1.uc;
1909 else if(op2->kind == 6)
1910 *value2 = (uint64)op2->__anon1.f;
1911 else if(op2->kind == 7)
1912 *value2 = (uint64)op2->__anon1.d;
1913 else if(op2->kind == 13)
1914 *value2 = op2->__anon1.ui64;
1920 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
1922 struct Operand op2 = GetOperand(exp);
1924 return GetOpUInt64(&op2, value2);
1927 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
1929 if(op2->kind == 3 && op2->type->isSigned)
1930 *value2 = (intptr_t)op2->__anon1.i;
1931 else if(op2->kind == 3)
1932 *value2 = (intptr_t)op2->__anon1.ui;
1933 else if(op2->kind == 4 && op2->type->isSigned)
1934 *value2 = (intptr_t)op2->__anon1.i64;
1935 else if(op2->kind == 4)
1936 *value2 = (intptr_t)op2->__anon1.ui64;
1937 else if(op2->kind == 23 && op2->type->isSigned)
1938 *value2 = (intptr_t)op2->__anon1.i64;
1939 else if(op2->kind == 23)
1940 *value2 = (intptr_t)op2->__anon1.ui64;
1941 else if(op2->kind == 22 && op2->type->isSigned)
1942 *value2 = (intptr_t)op2->__anon1.i64;
1943 else if(op2->kind == 22)
1944 *value2 = (intptr_t)op2->__anon1.ui64;
1945 else if(op2->kind == 2 && op2->type->isSigned)
1946 *value2 = (intptr_t)op2->__anon1.s;
1947 else if(op2->kind == 2)
1948 *value2 = (intptr_t)op2->__anon1.us;
1949 else if(op2->kind == 1 && op2->type->isSigned)
1950 *value2 = (intptr_t)op2->__anon1.c;
1951 else if(op2->kind == 24 || op2->kind == 1)
1952 *value2 = (intptr_t)op2->__anon1.uc;
1953 else if(op2->kind == 6)
1954 *value2 = (intptr_t)op2->__anon1.f;
1955 else if(op2->kind == 7)
1956 *value2 = (intptr_t)op2->__anon1.d;
1957 else if(op2->kind == 13)
1958 *value2 = (intptr_t)op2->__anon1.ui64;
1964 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
1966 struct Operand op2 = GetOperand(exp);
1968 return GetOpIntPtr(&op2, value2);
1971 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
1973 if(op2->kind == 3 && op2->type->isSigned)
1974 *value2 = (uintptr_t)op2->__anon1.i;
1975 else if(op2->kind == 3)
1976 *value2 = (uintptr_t)op2->__anon1.ui;
1977 else if(op2->kind == 4 && op2->type->isSigned)
1978 *value2 = (uintptr_t)op2->__anon1.i64;
1979 else if(op2->kind == 4)
1980 *value2 = (uintptr_t)op2->__anon1.ui64;
1981 else if(op2->kind == 23 && op2->type->isSigned)
1982 *value2 = (uintptr_t)op2->__anon1.i64;
1983 else if(op2->kind == 23)
1984 *value2 = (uintptr_t)op2->__anon1.ui64;
1985 else if(op2->kind == 22 && op2->type->isSigned)
1986 *value2 = (uintptr_t)op2->__anon1.i64;
1987 else if(op2->kind == 22)
1988 *value2 = (uintptr_t)op2->__anon1.ui64;
1989 else if(op2->kind == 2 && op2->type->isSigned)
1990 *value2 = (uintptr_t)op2->__anon1.s;
1991 else if(op2->kind == 2)
1992 *value2 = (uintptr_t)op2->__anon1.us;
1993 else if(op2->kind == 1 && op2->type->isSigned)
1994 *value2 = (uintptr_t)op2->__anon1.c;
1995 else if(op2->kind == 24 || op2->kind == 1)
1996 *value2 = (uintptr_t)op2->__anon1.uc;
1997 else if(op2->kind == 6)
1998 *value2 = (uintptr_t)op2->__anon1.f;
1999 else if(op2->kind == 7)
2000 *value2 = (uintptr_t)op2->__anon1.d;
2001 else if(op2->kind == 13)
2002 *value2 = (uintptr_t)op2->__anon1.ui64;
2008 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
2010 struct Operand op2 = GetOperand(exp);
2012 return GetOpUIntPtr(&op2, value2);
2015 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2017 if(op2->kind == 3 && op2->type->isSigned)
2018 *value2 = (ssize_t)op2->__anon1.i;
2019 else if(op2->kind == 3)
2020 *value2 = (ssize_t)op2->__anon1.ui;
2021 else if(op2->kind == 4 && op2->type->isSigned)
2022 *value2 = (ssize_t)op2->__anon1.i64;
2023 else if(op2->kind == 4)
2024 *value2 = (ssize_t)op2->__anon1.ui64;
2025 else if(op2->kind == 23 && op2->type->isSigned)
2026 *value2 = (ssize_t)op2->__anon1.i64;
2027 else if(op2->kind == 23)
2028 *value2 = (ssize_t)op2->__anon1.ui64;
2029 else if(op2->kind == 22 && op2->type->isSigned)
2030 *value2 = (ssize_t)op2->__anon1.i64;
2031 else if(op2->kind == 22)
2032 *value2 = (ssize_t)op2->__anon1.ui64;
2033 else if(op2->kind == 2 && op2->type->isSigned)
2034 *value2 = (ssize_t)op2->__anon1.s;
2035 else if(op2->kind == 2)
2036 *value2 = (ssize_t)op2->__anon1.us;
2037 else if(op2->kind == 1 && op2->type->isSigned)
2038 *value2 = (ssize_t)op2->__anon1.c;
2039 else if(op2->kind == 24 || op2->kind == 1)
2040 *value2 = (ssize_t)op2->__anon1.uc;
2041 else if(op2->kind == 6)
2042 *value2 = (ssize_t)op2->__anon1.f;
2043 else if(op2->kind == 7)
2044 *value2 = (ssize_t)op2->__anon1.d;
2045 else if(op2->kind == 13)
2046 *value2 = (ssize_t)op2->__anon1.ui64;
2052 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
2054 struct Operand op2 = GetOperand(exp);
2056 return GetOpIntSize(&op2, value2);
2059 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2061 if(op2->kind == 3 && op2->type->isSigned)
2062 *value2 = (size_t)op2->__anon1.i;
2063 else if(op2->kind == 3)
2064 *value2 = (size_t)op2->__anon1.ui;
2065 else if(op2->kind == 4 && op2->type->isSigned)
2066 *value2 = (size_t)op2->__anon1.i64;
2067 else if(op2->kind == 4)
2068 *value2 = (size_t)op2->__anon1.ui64;
2069 else if(op2->kind == 23 && op2->type->isSigned)
2070 *value2 = (size_t)op2->__anon1.i64;
2071 else if(op2->kind == 23)
2072 *value2 = (size_t)op2->__anon1.ui64;
2073 else if(op2->kind == 22 && op2->type->isSigned)
2074 *value2 = (size_t)op2->__anon1.i64;
2075 else if(op2->kind == 22)
2076 *value2 = (size_t)op2->__anon1.ui64;
2077 else if(op2->kind == 2 && op2->type->isSigned)
2078 *value2 = (size_t)op2->__anon1.s;
2079 else if(op2->kind == 2)
2080 *value2 = (size_t)op2->__anon1.us;
2081 else if(op2->kind == 1 && op2->type->isSigned)
2082 *value2 = (size_t)op2->__anon1.c;
2083 else if(op2->kind == 24 || op2->kind == 1)
2084 *value2 = (size_t)op2->__anon1.uc;
2085 else if(op2->kind == 6)
2086 *value2 = (size_t)op2->__anon1.f;
2087 else if(op2->kind == 7)
2088 *value2 = (size_t)op2->__anon1.d;
2089 else if(op2->kind == 13)
2090 *value2 = (size_t)op2->__anon1.ui64;
2096 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
2098 struct Operand op2 = GetOperand(exp);
2100 return GetOpUIntSize(&op2, value2);
2103 unsigned int GetOpShort(struct Operand * op2, short * value2)
2105 if(op2->kind == 3 && op2->type->isSigned)
2106 *value2 = (short)op2->__anon1.i;
2107 else if(op2->kind == 3)
2108 *value2 = (short)op2->__anon1.ui;
2109 else if(op2->kind == 4 && op2->type->isSigned)
2110 *value2 = (short)op2->__anon1.i64;
2111 else if(op2->kind == 4)
2112 *value2 = (short)op2->__anon1.ui64;
2113 else if(op2->kind == 23 && op2->type->isSigned)
2114 *value2 = (short)op2->__anon1.i64;
2115 else if(op2->kind == 23)
2116 *value2 = (short)op2->__anon1.ui64;
2117 else if(op2->kind == 22 && op2->type->isSigned)
2118 *value2 = (short)op2->__anon1.i64;
2119 else if(op2->kind == 22)
2120 *value2 = (short)op2->__anon1.ui64;
2121 else if(op2->kind == 2 && op2->type->isSigned)
2122 *value2 = op2->__anon1.s;
2123 else if(op2->kind == 2)
2124 *value2 = (short)op2->__anon1.us;
2125 else if(op2->kind == 1 && op2->type->isSigned)
2126 *value2 = (short)op2->__anon1.c;
2127 else if(op2->kind == 24 || op2->kind == 1)
2128 *value2 = (short)op2->__anon1.uc;
2129 else if(op2->kind == 6)
2130 *value2 = (short)op2->__anon1.f;
2131 else if(op2->kind == 7)
2132 *value2 = (short)op2->__anon1.d;
2133 else if(op2->kind == 13)
2134 *value2 = (short)op2->__anon1.ui64;
2140 unsigned int GetShort(struct Expression * exp, short * value2)
2142 struct Operand op2 = GetOperand(exp);
2144 return GetOpShort(&op2, value2);
2147 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2149 if(op2->kind == 3 && op2->type->isSigned)
2150 *value2 = (unsigned short)op2->__anon1.i;
2151 else if(op2->kind == 3)
2152 *value2 = (unsigned short)op2->__anon1.ui;
2153 else if(op2->kind == 4 && op2->type->isSigned)
2154 *value2 = (unsigned short)op2->__anon1.i64;
2155 else if(op2->kind == 4)
2156 *value2 = (unsigned short)op2->__anon1.ui64;
2157 else if(op2->kind == 23 && op2->type->isSigned)
2158 *value2 = (unsigned short)op2->__anon1.i64;
2159 else if(op2->kind == 23)
2160 *value2 = (unsigned short)op2->__anon1.ui64;
2161 else if(op2->kind == 22 && op2->type->isSigned)
2162 *value2 = (unsigned short)op2->__anon1.i64;
2163 else if(op2->kind == 22)
2164 *value2 = (unsigned short)op2->__anon1.ui64;
2165 else if(op2->kind == 2 && op2->type->isSigned)
2166 *value2 = (unsigned short)op2->__anon1.s;
2167 else if(op2->kind == 2)
2168 *value2 = op2->__anon1.us;
2169 else if(op2->kind == 1 && op2->type->isSigned)
2170 *value2 = (unsigned short)op2->__anon1.c;
2171 else if(op2->kind == 24 || op2->kind == 1)
2172 *value2 = (unsigned short)op2->__anon1.uc;
2173 else if(op2->kind == 6)
2174 *value2 = (unsigned short)op2->__anon1.f;
2175 else if(op2->kind == 7)
2176 *value2 = (unsigned short)op2->__anon1.d;
2177 else if(op2->kind == 13)
2178 *value2 = (unsigned short)op2->__anon1.ui64;
2184 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
2186 struct Operand op2 = GetOperand(exp);
2188 return GetOpUShort(&op2, value2);
2191 unsigned int GetOpChar(struct Operand * op2, char * value2)
2193 if(op2->kind == 3 && op2->type->isSigned)
2194 *value2 = (char)op2->__anon1.i;
2195 else if(op2->kind == 3)
2196 *value2 = (char)op2->__anon1.ui;
2197 else if(op2->kind == 4 && op2->type->isSigned)
2198 *value2 = (char)op2->__anon1.i64;
2199 else if(op2->kind == 4)
2200 *value2 = (char)op2->__anon1.ui64;
2201 else if(op2->kind == 23 && op2->type->isSigned)
2202 *value2 = (char)op2->__anon1.i64;
2203 else if(op2->kind == 23)
2204 *value2 = (char)op2->__anon1.ui64;
2205 else if(op2->kind == 22 && op2->type->isSigned)
2206 *value2 = (char)op2->__anon1.i64;
2207 else if(op2->kind == 22)
2208 *value2 = (char)op2->__anon1.ui64;
2209 else if(op2->kind == 2 && op2->type->isSigned)
2210 *value2 = (char)op2->__anon1.s;
2211 else if(op2->kind == 2)
2212 *value2 = (char)op2->__anon1.us;
2213 else if(op2->kind == 1 && op2->type->isSigned)
2214 *value2 = op2->__anon1.c;
2215 else if(op2->kind == 24 || op2->kind == 1)
2216 *value2 = (char)op2->__anon1.uc;
2217 else if(op2->kind == 6)
2218 *value2 = (char)op2->__anon1.f;
2219 else if(op2->kind == 7)
2220 *value2 = (char)op2->__anon1.d;
2221 else if(op2->kind == 13)
2222 *value2 = (char)op2->__anon1.ui64;
2228 unsigned int GetChar(struct Expression * exp, char * value2)
2230 struct Operand op2 = GetOperand(exp);
2232 return GetOpChar(&op2, value2);
2235 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2237 if(op2->kind == 3 && op2->type->isSigned)
2238 *value2 = (unsigned char)op2->__anon1.i;
2239 else if(op2->kind == 3)
2240 *value2 = (unsigned char)op2->__anon1.ui;
2241 else if(op2->kind == 4 && op2->type->isSigned)
2242 *value2 = (unsigned char)op2->__anon1.i64;
2243 else if(op2->kind == 4)
2244 *value2 = (unsigned char)op2->__anon1.ui64;
2245 else if(op2->kind == 23 && op2->type->isSigned)
2246 *value2 = (unsigned char)op2->__anon1.i64;
2247 else if(op2->kind == 23)
2248 *value2 = (unsigned char)op2->__anon1.ui64;
2249 else if(op2->kind == 22 && op2->type->isSigned)
2250 *value2 = (unsigned char)op2->__anon1.i64;
2251 else if(op2->kind == 22)
2252 *value2 = (unsigned char)op2->__anon1.ui64;
2253 else if(op2->kind == 2 && op2->type->isSigned)
2254 *value2 = (unsigned char)op2->__anon1.s;
2255 else if(op2->kind == 2)
2256 *value2 = (unsigned char)op2->__anon1.us;
2257 else if(op2->kind == 1 && op2->type->isSigned)
2258 *value2 = (unsigned char)op2->__anon1.c;
2259 else if(op2->kind == 24 || op2->kind == 1)
2260 *value2 = op2->__anon1.uc;
2261 else if(op2->kind == 6)
2262 *value2 = (unsigned char)op2->__anon1.f;
2263 else if(op2->kind == 7)
2264 *value2 = (unsigned char)op2->__anon1.d;
2265 else if(op2->kind == 13)
2266 *value2 = (unsigned char)op2->__anon1.ui64;
2272 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
2274 struct Operand op2 = GetOperand(exp);
2276 return GetOpUChar(&op2, value2);
2279 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2281 if(op2->kind == 3 && op2->type->isSigned)
2282 *value2 = (float)(float)op2->__anon1.i;
2283 else if(op2->kind == 3)
2284 *value2 = (float)(float)op2->__anon1.ui;
2285 else if(op2->kind == 4 && op2->type->isSigned)
2286 *value2 = (float)(float)op2->__anon1.i64;
2287 else if(op2->kind == 4)
2288 *value2 = (float)(float)op2->__anon1.ui64;
2289 else if(op2->kind == 23 && op2->type->isSigned)
2290 *value2 = (float)(float)op2->__anon1.i64;
2291 else if(op2->kind == 23)
2292 *value2 = (float)(float)op2->__anon1.ui64;
2293 else if(op2->kind == 22 && op2->type->isSigned)
2294 *value2 = (float)(float)op2->__anon1.i64;
2295 else if(op2->kind == 22)
2296 *value2 = (float)(float)op2->__anon1.ui64;
2297 else if(op2->kind == 2 && op2->type->isSigned)
2298 *value2 = (float)(float)op2->__anon1.s;
2299 else if(op2->kind == 2)
2300 *value2 = (float)(float)op2->__anon1.us;
2301 else if(op2->kind == 1 && op2->type->isSigned)
2302 *value2 = (float)(float)op2->__anon1.c;
2303 else if(op2->kind == 24 || op2->kind == 1)
2304 *value2 = (float)(float)op2->__anon1.uc;
2305 else if(op2->kind == 6)
2306 *value2 = (float)op2->__anon1.f;
2307 else if(op2->kind == 7)
2308 *value2 = (float)op2->__anon1.d;
2309 else if(op2->kind == 13)
2310 *value2 = (float)(float)op2->__anon1.ui64;
2316 unsigned int GetFloat(struct Expression * exp, float * value2)
2318 struct Operand op2 = GetOperand(exp);
2320 return GetOpFloat(&op2, value2);
2323 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2325 if(op2->kind == 3 && op2->type->isSigned)
2326 *value2 = (double)(double)op2->__anon1.i;
2327 else if(op2->kind == 3)
2328 *value2 = (double)(double)op2->__anon1.ui;
2329 else if(op2->kind == 4 && op2->type->isSigned)
2330 *value2 = (double)(double)op2->__anon1.i64;
2331 else if(op2->kind == 4)
2332 *value2 = (double)(double)op2->__anon1.ui64;
2333 else if(op2->kind == 23 && op2->type->isSigned)
2334 *value2 = (double)(double)op2->__anon1.i64;
2335 else if(op2->kind == 23)
2336 *value2 = (double)(double)op2->__anon1.ui64;
2337 else if(op2->kind == 22 && op2->type->isSigned)
2338 *value2 = (double)(double)op2->__anon1.i64;
2339 else if(op2->kind == 22)
2340 *value2 = (double)(double)op2->__anon1.ui64;
2341 else if(op2->kind == 2 && op2->type->isSigned)
2342 *value2 = (double)(double)op2->__anon1.s;
2343 else if(op2->kind == 2)
2344 *value2 = (double)(double)op2->__anon1.us;
2345 else if(op2->kind == 1 && op2->type->isSigned)
2346 *value2 = (double)(double)op2->__anon1.c;
2347 else if(op2->kind == 24 || op2->kind == 1)
2348 *value2 = (double)(double)op2->__anon1.uc;
2349 else if(op2->kind == 6)
2350 *value2 = (double)op2->__anon1.f;
2351 else if(op2->kind == 7)
2352 *value2 = (double)op2->__anon1.d;
2353 else if(op2->kind == 13)
2354 *value2 = (double)(double)op2->__anon1.ui64;
2360 unsigned int GetDouble(struct Expression * exp, double * value2)
2362 struct Operand op2 = GetOperand(exp);
2364 return GetOpDouble(&op2, value2);
2367 void ComputeExpression(struct Expression * exp);
2369 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class);
2371 extern int targetBits;
2373 int ComputeTypeSize(struct Type * type);
2375 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
2377 struct __ecereNameSpace__ecere__com__BitMember
2379 struct __ecereNameSpace__ecere__com__BitMember * prev;
2380 struct __ecereNameSpace__ecere__com__BitMember * next;
2382 unsigned int isProperty;
2385 struct __ecereNameSpace__ecere__com__Class * _class;
2386 const char * dataTypeString;
2387 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
2388 struct Type * dataType;
2393 } __attribute__ ((gcc_struct));
2395 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldLink;
2397 struct __ecereNameSpace__ecere__sys__OldLink
2399 struct __ecereNameSpace__ecere__sys__OldLink * prev;
2400 struct __ecereNameSpace__ecere__sys__OldLink * next;
2402 } __attribute__ ((gcc_struct));
2404 void FinishTemplatesContext(struct Context * context);
2406 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
2408 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2409 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2411 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))
2413 int unionMemberOffset = 0;
2418 member->memberOffset = 0;
2419 if(targetBits < sizeof(void *) * 8)
2420 member->structAlignment = 0;
2422 else if(targetBits < sizeof(void *) * 8)
2423 _class->structAlignment = 0;
2424 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
2425 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
2426 if(!member && _class->destructionWatchOffset)
2427 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2429 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2431 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2433 if(!dataMember->isProperty)
2435 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
2437 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
2443 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2445 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2447 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
2449 if(!isMember && _class->type == 2 && dataMember->dataType)
2451 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
2455 ComputeTypeSize(dataMember->dataType);
2456 if(bitMember->pos == -1)
2457 bitMember->pos = _class->memberOffset;
2458 if(!bitMember->size)
2459 bitMember->size = dataMember->dataType->size * 8;
2460 _class->memberOffset = bitMember->pos + bitMember->size;
2461 for(d = 0; d < bitMember->size; d++)
2467 bitMember->mask = mask << bitMember->pos;
2469 else if(dataMember->type == 0 && dataMember->dataType)
2474 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)))
2475 ComputeTypeSize(dataMember->dataType);
2476 if(dataMember->dataType->bitFieldCount)
2478 bitFields += dataMember->dataType->bitFieldCount;
2485 int size = (bitFields + 7) / 8;
2489 int __simpleStruct0;
2493 int __simpleStruct0;
2495 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2496 if(member->memberOffset % alignment)
2497 member->memberOffset += alignment - (member->memberOffset % alignment);
2499 dataMember->offset = member->memberOffset;
2500 if(member->type == 1)
2501 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2504 member->memberOffset += size;
2511 int __simpleStruct0;
2513 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2514 if(_class->memberOffset % alignment)
2515 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2517 dataMember->offset = _class->memberOffset;
2518 _class->memberOffset += size;
2522 size = dataMember->dataType->size;
2523 alignment = dataMember->dataType->alignment;
2527 int __simpleStruct0;
2531 int __simpleStruct0;
2533 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2534 if(member->memberOffset % alignment)
2535 member->memberOffset += alignment - (member->memberOffset % alignment);
2537 dataMember->offset = member->memberOffset;
2538 if(member->type == 1)
2539 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2542 member->memberOffset += size;
2549 int __simpleStruct0;
2551 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2552 if(_class->memberOffset % alignment)
2553 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2555 dataMember->offset = _class->memberOffset;
2556 _class->memberOffset += size;
2563 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 0x1);
2564 alignment = dataMember->structAlignment;
2567 int __simpleStruct0;
2571 int __simpleStruct0;
2573 if(member->memberOffset % alignment)
2574 member->memberOffset += alignment - (member->memberOffset % alignment);
2575 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2577 dataMember->offset = member->memberOffset;
2578 if(member->type == 1)
2579 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2581 member->memberOffset += dataMember->memberOffset;
2587 int __simpleStruct0;
2589 if(_class->memberOffset % alignment)
2590 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2591 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2593 dataMember->offset = _class->memberOffset;
2594 _class->memberOffset += dataMember->memberOffset;
2602 int size = (bitFields + 7) / 8;
2606 int __simpleStruct0;
2610 int __simpleStruct0;
2612 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2613 if(member->memberOffset % alignment)
2614 member->memberOffset += alignment - (member->memberOffset % alignment);
2616 if(member->type == 1)
2617 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2620 member->memberOffset += size;
2627 int __simpleStruct0;
2629 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2630 if(_class->memberOffset % alignment)
2631 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2633 _class->memberOffset += size;
2638 if(member && member->type == 1)
2640 member->memberOffset = unionMemberOffset;
2644 if(_class->type != 2)
2648 if(_class->structAlignment)
2650 if(_class->memberOffset % _class->structAlignment)
2651 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
2653 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
2656 struct __ecereNameSpace__ecere__com__Property * prop;
2658 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
2660 if(prop->isProperty && prop->isWatchable)
2662 prop->watcherOffset = _class->structSize;
2663 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2668 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
2670 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
2672 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
2674 if(deriv->computeSize)
2676 deriv->offset = _class->structSize;
2677 deriv->memberOffset = 0;
2678 deriv->structSize = deriv->offset;
2679 ComputeClassMembers(deriv, 0x0);
2687 FinishTemplatesContext(context);
2690 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
2692 struct __ecereNameSpace__ecere__com__NameSpace
2695 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
2696 struct __ecereNameSpace__ecere__com__NameSpace * left;
2697 struct __ecereNameSpace__ecere__com__NameSpace * right;
2699 struct __ecereNameSpace__ecere__com__NameSpace * parent;
2700 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
2701 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
2702 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
2703 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
2704 } __attribute__ ((gcc_struct));
2706 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2708 struct __ecereNameSpace__ecere__com__Module
2710 struct __ecereNameSpace__ecere__com__Instance * application;
2711 struct __ecereNameSpace__ecere__sys__OldList classes;
2712 struct __ecereNameSpace__ecere__sys__OldList defines;
2713 struct __ecereNameSpace__ecere__sys__OldList functions;
2714 struct __ecereNameSpace__ecere__sys__OldList modules;
2715 struct __ecereNameSpace__ecere__com__Instance * prev;
2716 struct __ecereNameSpace__ecere__com__Instance * next;
2722 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
2723 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
2724 } __attribute__ ((gcc_struct));
2726 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
2728 struct __ecereNameSpace__ecere__com__Class * _class;
2729 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
2731 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
2732 ComputeModuleClasses(subModule->data);
2733 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes.first; _class; _class = _class->next)
2734 ComputeClassMembers(_class, 0x0);
2737 extern unsigned int inCompiler;
2739 extern void Compiler_Error(const char * format, ...);
2741 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
2743 int ComputeTypeSize(struct Type * type)
2745 unsigned int size = type ? type->size : 0;
2747 if(!size && type && !type->computing)
2749 type->computing = 0x1;
2753 type->alignment = size = sizeof(char);
2756 type->alignment = size = sizeof(char);
2759 type->alignment = size = sizeof(int);
2762 type->alignment = size = sizeof(long long);
2765 type->alignment = size = targetBits / 8;
2768 type->alignment = size = targetBits / 8;
2771 type->alignment = size = sizeof(long);
2774 type->alignment = size = sizeof(short);
2777 type->alignment = size = sizeof(float);
2780 type->alignment = size = sizeof(double);
2784 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
2786 if(_class && _class->type == 1)
2788 ComputeClassMembers(_class, 0x0);
2789 type->alignment = _class->structAlignment;
2790 size = _class->structSize;
2791 if(type->alignment && size % type->alignment)
2792 size += type->alignment - (size % type->alignment);
2794 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
2796 if(!_class->dataType)
2797 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
2798 size = type->alignment = ComputeTypeSize(_class->dataType);
2801 size = type->alignment = targetBits / 8;
2806 size = type->alignment = targetBits / 8;
2809 if(type->__anon1.__anon4.arraySizeExp)
2811 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
2812 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
2813 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)))
2815 struct Location oldLoc = yylloc;
2816 char expression[10240];
2818 expression[0] = '\0';
2819 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
2820 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
2822 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
2823 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
2826 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
2828 else if(type->__anon1.__anon4.enumClass)
2830 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
2832 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
2835 type->__anon1.__anon4.arraySize = 0;
2839 type->__anon1.__anon4.arraySize = 0;
2841 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
2842 if(type->__anon1.type)
2843 type->alignment = type->__anon1.type->alignment;
2847 struct Type * member;
2849 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2851 int __simpleStruct0, __simpleStruct1;
2852 unsigned int addSize = ComputeTypeSize(member);
2854 member->offset = size;
2855 if(member->alignment && size % member->alignment)
2856 member->offset += member->alignment - (size % member->alignment);
2857 size = member->offset;
2858 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2861 if(type->alignment && size % type->alignment)
2862 size += type->alignment - (size % type->alignment);
2867 struct Type * member;
2869 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2871 int __simpleStruct0, __simpleStruct1;
2872 unsigned int addSize = ComputeTypeSize(member);
2874 member->offset = size;
2875 if(member->alignment && size % member->alignment)
2876 member->offset += member->alignment - (size % member->alignment);
2877 size = member->offset;
2878 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2879 size = ((size > addSize) ? size : addSize);
2881 if(type->alignment && size % type->alignment)
2882 size += type->alignment - (size % type->alignment);
2887 struct TemplateParameter * param = type->__anon1.templateParameter;
2888 struct Type * baseType = ProcessTemplateParameterType(param);
2892 size = ComputeTypeSize(baseType);
2893 type->alignment = baseType->alignment;
2896 type->alignment = size = sizeof(uint64);
2901 type->alignment = size = sizeof(enum
2909 type->alignment = size = targetBits / 8;
2914 type->computing = 0x0;
2919 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
2921 extern struct Identifier * MkIdentifier(const char * string);
2923 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
2925 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
2927 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
2929 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
2931 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class);
2933 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams);
2935 extern void FreeType(struct Type * type);
2937 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
2939 extern struct Specifier * MkSpecifier(int specifier);
2941 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
2943 extern struct Expression * MkExpConstant(const char * string);
2945 int AddMembers(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)
2947 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2948 unsigned int totalSize = 0;
2949 unsigned int maxSize = 0;
2952 struct __ecereNameSpace__ecere__com__DataMember * member;
2954 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2957 *addedPadding = 0x0;
2958 if(!isMember && _class->base)
2960 maxSize = _class->structSize;
2962 if(_class->type == 1 || _class->type == 5)
2963 AddMembers(declarations, _class->base, 0x0, &totalSize, topClass, (((void *)0)));
2966 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
2968 if(maxSize > baseSize)
2969 maxSize -= baseSize;
2975 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
2977 if(!member->isProperty)
2979 switch(member->type)
2983 if(member->dataTypeString)
2985 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
2986 struct Declarator * decl;
2988 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
2989 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
2990 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
2991 if(!member->dataType)
2992 member->dataType = ProcessType(specs, decl);
2993 ReplaceThisClassSpecifiers(specs, topClass);
2995 struct Type * type = ProcessType(specs, decl);
2997 DeclareType(member->dataType, 0x0, 0x0);
3000 ComputeTypeSize(member->dataType);
3001 size = member->dataType->size;
3002 alignment = member->dataType->alignment;
3005 if(totalSize % alignment)
3006 totalSize += alignment - (totalSize % alignment);
3015 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
3018 sprintf(id, "__anon%d", anonID++);
3020 AddMembers(list, (struct __ecereNameSpace__ecere__com__Class *)member, 0x1, &size, topClass, (((void *)0)));
3021 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
3022 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
3023 alignment = member->structAlignment;
3026 if(totalSize % alignment)
3027 totalSize += alignment - (totalSize % alignment);
3037 unsigned int __simpleStruct0;
3039 if(topMember && topMember->type == 1)
3040 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
3042 *retSize += totalSize;
3044 else if(totalSize < maxSize && _class->type != 1000)
3046 int autoPadding = 0;
3048 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
3049 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
3050 if(totalSize + autoPadding < maxSize)
3052 char sizeString[50];
3054 sprintf(sizeString, "%d", maxSize - totalSize);
3055 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
3057 *addedPadding = 0x1;
3061 FinishTemplatesContext(context);
3062 return topMember ? topMember->memberID : _class->memberID;
3065 static int DeclareMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
3067 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
3068 struct __ecereNameSpace__ecere__com__DataMember * member;
3069 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
3071 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
3072 DeclareMembers(_class->base, 0x0);
3073 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
3075 if(!member->isProperty)
3077 switch(member->type)
3081 if(!member->dataType && member->dataTypeString)
3082 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
3083 if(member->dataType)
3084 DeclareType(member->dataType, 0x0, 0x0);
3090 DeclareMembers((struct __ecereNameSpace__ecere__com__Class *)member, 0x1);
3097 FinishTemplatesContext(context);
3098 return topMember ? topMember->memberID : _class->memberID;
3101 extern struct Identifier * GetDeclId(struct Declarator * decl);
3103 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
3105 struct ClassDef * def;
3108 for(def = (*definitions).first; def; def = def->next)
3112 struct Declaration * decl = def->__anon1.decl;
3114 if(decl && decl->__anon1.__anon1.specifiers)
3116 struct Specifier * spec;
3117 unsigned int isStruct = 0x0;
3119 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3121 if(spec->type == 3 || spec->type == 4)
3123 if(spec->__anon1.__anon2.definitions)
3124 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3130 struct Declarator * d = (((void *)0));
3132 if(decl->__anon1.__anon1.declarators)
3134 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
3136 struct Identifier * idDecl = GetDeclId(d);
3146 sprintf(id, "__anon%d", anonID++);
3147 if(!decl->__anon1.__anon1.declarators)
3148 decl->__anon1.__anon1.declarators = MkList();
3149 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
3157 extern struct Symbol * FindClass(const char * name);
3159 extern char * strchr(const char * , int);
3161 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
3163 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
3165 extern void FreeClassDef(struct ClassDef * def);
3167 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
3169 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
3171 extern void DeclareClass(struct Symbol * classSym, const char * className);
3173 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move(struct __ecereNameSpace__ecere__sys__OldList * this, void * item, void * prevItem);
3175 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
3177 void DeclareStruct(const char * name, unsigned int skipNoHead)
3179 struct External * external = (((void *)0));
3180 struct Symbol * classSym = FindClass(name);
3182 if(!inCompiler || !classSym)
3184 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
3186 if(classSym->__anon1.registered && classSym->imported && !classSym->declaredStructSym)
3188 struct Declaration * decl;
3189 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3190 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
3191 char structName[1024];
3192 struct Specifier * spec = (((void *)0));
3194 external = (classSym->__anon1.registered && classSym->__anon1.registered->type == 1) ? classSym->__anon2.__anon1.pointerExternal : classSym->__anon2.__anon1.structExternal;
3195 classSym->declaring++;
3196 if(strchr(classSym->string, '<'))
3198 if(classSym->__anon1.registered->templateClass)
3200 DeclareStruct(classSym->__anon1.registered->templateClass->fullName, skipNoHead);
3201 classSym->declaring--;
3205 DeclareMembers(classSym->__anon1.registered, 0x0);
3206 structName[0] = (char)0;
3207 FullClassNameCat(structName, name, 0x0);
3208 if(external && external->__anon1.declaration && external->__anon1.declaration->__anon1.__anon1.specifiers)
3210 for(spec = (*external->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3212 if(spec->type == 3 || spec->type == 4)
3216 if(!skipNoHead && (!spec || !spec->__anon1.__anon2.definitions))
3218 unsigned int addedPadding = 0x0;
3220 classSym->declaredStructSym = 0x1;
3221 declarations = MkList();
3222 AddMembers(declarations, classSym->__anon1.registered, 0x0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
3223 if(!(*declarations).count || ((*declarations).count == 1 && addedPadding))
3225 FreeList(declarations, FreeClassDef);
3226 declarations = (((void *)0));
3229 if(skipNoHead || declarations)
3234 spec->__anon1.__anon2.definitions = declarations;
3235 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3237 if(classSym->__anon2.__anon1.structExternal)
3238 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3239 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3240 classSym->id = curExternal->symbol->idCode;
3241 classSym->idCode = curExternal->symbol->idCode;
3247 external = MkExternalDeclaration((((void *)0)));
3248 specifiers = MkList();
3249 declarators = MkList();
3250 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
3251 external->__anon1.declaration = decl = MkDeclaration(specifiers, declarators);
3252 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
3253 decl->symbol->__anon2.__anon1.pointerExternal = external;
3254 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3256 char className[1024];
3258 strcpy(className, "__ecereClass_");
3259 FullClassNameCat(className, classSym->string, 0x1);
3260 DeclareClass(classSym, className);
3261 external->symbol = classSym;
3262 classSym->__anon2.__anon1.pointerExternal = external;
3263 classSym->id = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3264 classSym->idCode = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3268 char className[1024];
3270 strcpy(className, "__ecereClass_");
3271 FullClassNameCat(className, classSym->string, 0x1);
3272 classSym->__anon2.__anon1.structExternal = external;
3273 DeclareClass(classSym, className);
3274 external->symbol = classSym;
3276 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
3279 classSym->declaring--;
3283 if(classSym->__anon2.__anon1.structExternal && classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
3285 struct Specifier * spec;
3287 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3289 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3292 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3294 classSym->declaring++;
3296 if(classSym->__anon1.registered)
3297 DeclareMembers(classSym->__anon1.registered, 0x0);
3299 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 1 || classSym->__anon1.registered->type == 5))
3301 if(classSym->__anon2.__anon1.structExternal)
3302 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3303 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3304 classSym->id = curExternal->symbol->idCode;
3305 classSym->idCode = curExternal->symbol->idCode;
3307 classSym->declaring--;
3312 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
3314 extern struct ModuleImport * mainModule;
3316 extern struct Specifier * MkSpecifierName(const char * name);
3318 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
3320 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
3322 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
3324 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
3326 extern void FreeDeclarator(struct Declarator * decl);
3328 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
3330 struct PropertyImport
3332 struct PropertyImport * prev;
3333 struct PropertyImport * next;
3335 unsigned int isVirtual;
3336 unsigned int hasSet;
3337 unsigned int hasGet;
3338 } __attribute__ ((gcc_struct));
3340 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
3342 void DeclareProperty(struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
3344 struct Symbol * symbol = prop->symbol;
3346 strcpy(setName, "__ecereProp_");
3347 FullClassNameCat(setName, prop->_class->fullName, 0x0);
3348 strcat(setName, "_Set_");
3349 FullClassNameCat(setName, prop->name, 0x1);
3350 strcpy(getName, "__ecereProp_");
3351 FullClassNameCat(getName, prop->_class->fullName, 0x0);
3352 strcat(getName, "_Get_");
3353 FullClassNameCat(getName, prop->name, 0x1);
3354 if(prop->_class->type == 1)
3355 DeclareStruct(prop->_class->fullName, 0x0);
3356 if(!symbol || curExternal->symbol->idCode < symbol->id)
3358 unsigned int imported = 0x0;
3359 unsigned int dllImport = 0x0;
3361 if(!symbol || symbol->_import)
3365 struct Symbol * classSym;
3367 if(!prop->_class->symbol)
3368 prop->_class->symbol = FindClass(prop->_class->fullName);
3369 classSym = prop->_class->symbol;
3370 if(classSym && !classSym->_import)
3372 struct ModuleImport * module;
3374 if(prop->_class->module)
3375 module = FindModule(prop->_class->module);
3377 module = mainModule;
3378 classSym->_import = __extension__ ({
3379 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
3381 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
3383 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
3385 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
3386 symbol->_import = (struct ClassImport *)__extension__ ({
3387 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
3389 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0x0, __ecereInstance1->hasSet = prop->Set ? 0x1 : 0x0, __ecereInstance1->hasGet = prop->Get ? 0x1 : 0x0, __ecereInstance1;
3392 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
3395 if((prop->_class->module != privateModule || !strcmp(prop->_class->name, "float") || !strcmp(prop->_class->name, "double")) && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)prop->_class->module + structSize_Instance)))->importType != 1)
3400 struct Context * context = SetupTemplatesContext(prop->_class);
3402 symbol->type = ProcessTypeString(prop->dataTypeString, 0x0);
3403 FinishTemplatesContext(context);
3407 if(!symbol->__anon2.__anon2.externalGet || symbol->__anon2.__anon2.externalGet->type == 0)
3409 struct Declaration * decl;
3410 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3411 struct Declarator * d;
3412 struct __ecereNameSpace__ecere__sys__OldList * params;
3413 struct Specifier * spec;
3414 struct External * external;
3415 struct Declarator * typeDecl;
3416 unsigned int simple = 0x0;
3418 specifiers = MkList();
3419 declarators = MkList();
3421 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3422 d = MkDeclaratorIdentifier(MkIdentifier(getName));
3424 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3426 struct Context * context = SetupTemplatesContext(prop->_class);
3428 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
3429 FinishTemplatesContext(context);
3431 for(spec = (*specifiers).first; spec; spec = spec->next)
3435 if((!typeDecl || typeDecl->type == 1))
3437 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3439 symbol->_class = classSym->__anon1.registered;
3440 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3442 DeclareStruct(spec->__anon1.__anon1.name, 0x0);
3449 d = PlugDeclarator(typeDecl, d);
3452 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
3453 specifiers = MkList();
3455 d = MkDeclaratorFunction(d, params);
3457 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3458 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3459 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3461 ListAdd(specifiers, MkSpecifier(VOID));
3462 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3463 decl = MkDeclaration(specifiers, declarators);
3464 external = MkExternalDeclaration(decl);
3465 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3466 external->symbol = symbol;
3467 symbol->__anon2.__anon2.externalGet = external;
3468 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3470 FreeDeclarator(typeDecl);
3474 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalGet, curExternal->prev);
3479 if(!symbol->__anon2.__anon2.externalSet || symbol->__anon2.__anon2.externalSet->type == 0)
3481 struct Declaration * decl;
3482 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3483 struct Declarator * d;
3484 struct __ecereNameSpace__ecere__sys__OldList * params;
3485 struct Specifier * spec;
3486 struct External * external;
3487 struct Declarator * typeDecl;
3489 declarators = MkList();
3491 if(!prop->conversion || prop->_class->type == 1)
3493 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3495 specifiers = MkList();
3497 struct Context * context = SetupTemplatesContext(prop->_class);
3499 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
3500 FinishTemplatesContext(context);
3502 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
3503 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
3504 ListAdd(params, MkTypeName(specifiers, d));
3505 d = MkDeclaratorIdentifier(MkIdentifier(setName));
3507 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3508 d = MkDeclaratorFunction(d, params);
3509 for(spec = (*specifiers).first; spec; spec = spec->next)
3513 if((!typeDecl || typeDecl->type == 1))
3515 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3517 symbol->_class = classSym->__anon1.registered;
3518 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3519 DeclareStruct(spec->__anon1.__anon1.name, 0x0);
3523 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3524 specifiers = MkList();
3526 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3527 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3528 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3529 if(!prop->conversion || prop->_class->type == 1)
3530 ListAdd(specifiers, MkSpecifier(VOID));
3532 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
3533 decl = MkDeclaration(specifiers, declarators);
3534 external = MkExternalDeclaration(decl);
3535 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3536 external->symbol = symbol;
3537 symbol->__anon2.__anon2.externalSet = external;
3538 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3542 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalSet, curExternal->prev);
3545 if(!symbol->__anon2.__anon2.externalPtr)
3547 struct Declaration * decl;
3548 struct External * external;
3549 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
3550 char propName[1024];
3553 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3555 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3556 ListAdd(specifiers, MkSpecifierName("Property"));
3557 strcpy(propName, "__ecereProp_");
3558 FullClassNameCat(propName, prop->_class->fullName, 0x0);
3559 strcat(propName, "_");
3560 FullClassNameCat(propName, prop->name, 0x1);
3562 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
3564 ListAdd(list, MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(propName))), (((void *)0))));
3567 strcpy(propName, "__ecerePropM_");
3568 FullClassNameCat(propName, prop->_class->fullName, 0x0);
3569 strcat(propName, "_");
3570 FullClassNameCat(propName, prop->name, 0x1);
3571 ListAdd(list, MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(propName))), (((void *)0))));
3573 decl = MkDeclaration(specifiers, list);
3575 external = MkExternalDeclaration(decl);
3576 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3577 external->symbol = symbol;
3578 symbol->__anon2.__anon2.externalPtr = external;
3582 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalPtr, curExternal->prev);
3584 symbol->id = curExternal->symbol->idCode;
3588 struct Type * Dereference(struct Type * source)
3590 struct Type * type = (((void *)0));
3594 if(source->kind == 13 || source->kind == 12)
3596 type = source->__anon1.type;
3597 source->__anon1.type->refCount++;
3599 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
3601 type = __extension__ ({
3602 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
3604 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
3607 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
3613 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
3618 static struct Type * Reference(struct Type * source)
3620 struct Type * type = (((void *)0));
3624 type = __extension__ ({
3625 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
3627 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
3634 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);
3636 extern void * memcpy(void * , const void * , size_t size);
3638 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method);
3640 extern void FreeExpression(struct Expression * exp);
3642 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
3644 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);
3646 static void ProcessInitializer(struct Initializer * init, struct Type * type);
3648 extern struct Type * MkClassType(const char * name);
3650 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);
3652 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)
3654 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
3655 unsigned int found = 0x0;
3656 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
3657 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
3658 unsigned int freeType = 0x0;
3660 yylloc = member->loc;
3665 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
3669 dataMember = *curMember;
3675 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
3676 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
3677 int _subMemberStackPos = 0;
3680 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
3683 dataMember = thisMember;
3684 if(curMember && thisMember->memberAccess == 1)
3686 *curMember = thisMember;
3687 *curClass = thisMember->_class;
3688 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
3689 *subMemberStackPos = _subMemberStackPos;
3695 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
3696 if(method && method->type == 1)
3699 method = (((void *)0));
3704 struct Type * type = (((void *)0));
3708 if(!dataMember->dataType && dataMember->dataTypeString)
3710 struct Context * context = SetupTemplatesContext(_class);
3712 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
3713 FinishTemplatesContext(context);
3715 type = dataMember->dataType;
3719 if(!method->dataType)
3720 ProcessMethodType(method);
3721 type = method->dataType;
3723 if(ident && ident->next)
3725 for(ident = ident->next; ident && type; ident = ident->next)
3729 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
3731 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
3733 type = dataMember->dataType;
3735 else if(type->kind == 9 || type->kind == 10)
3737 struct Type * memberType;
3739 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
3741 if(!strcmp(memberType->name, ident->string))
3750 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
3753 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
3754 struct __ecereNameSpace__ecere__com__Class * sClass;
3756 for(sClass = _class; sClass; sClass = sClass->base)
3759 if(sClass->templateClass)
3760 sClass = sClass->templateClass;
3761 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
3763 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
3765 for(sClass = sClass->base; sClass; sClass = sClass->base)
3767 if(sClass->templateClass)
3768 sClass = sClass->templateClass;
3769 id += sClass->templateParams.count;
3780 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
3782 if(arg.__anon1.__anon1.dataTypeString)
3784 unsigned int constant = type->constant;
3786 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
3787 if(type->kind == 8 && constant)
3788 type->constant = 0x1;
3789 else if(type->kind == 13)
3791 struct Type * t = type->__anon1.type;
3793 while(t->kind == 13)
3794 t = t->__anon1.type;
3796 t->constant = constant;
3799 if(type && _class->templateClass)
3800 type->passAsTemplate = 0x1;
3807 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
3809 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
3810 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
3813 char templateString[1024];
3814 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
3816 sprintf(templateString, "%s<", expClass->templateClass->fullName);
3817 for(cClass = expClass; cClass; cClass = cClass->base)
3821 if(cClass->templateClass)
3822 cClass = cClass->templateClass;
3823 for(param = cClass->templateParams.first; param; param = param->next)
3826 struct __ecereNameSpace__ecere__com__Class * sClass;
3827 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
3829 for(sClass = cClass->base; sClass; sClass = sClass->base)
3831 if(sClass->templateClass)
3832 sClass = sClass->templateClass;
3833 id += sClass->templateParams.count;
3835 arg = expClass->templateArgs[id];
3836 for(sClass = _class; sClass; sClass = sClass->base)
3838 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
3840 struct __ecereNameSpace__ecere__com__Class * nextClass;
3842 if(sClass->templateClass)
3843 sClass = sClass->templateClass;
3844 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
3846 if(nextClass->templateClass)
3847 nextClass = nextClass->templateClass;
3848 p += nextClass->templateParams.count;
3850 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
3852 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
3854 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3856 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
3857 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
3871 char expString[1024];
3872 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
3873 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
3874 struct Expression * exp;
3875 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
3877 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
3878 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3879 ProcessExpressionType(exp);
3880 ComputeExpression(exp);
3881 expString[0] = '\0';
3882 PrintExpression(exp, expString);
3883 strcat(argument, expString);
3884 FreeExpression(exp);
3889 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
3894 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3895 strcat(argument, arg.__anon1.__anon1.dataTypeString);
3902 strcat(templateString, ", ");
3903 if(lastParam != p - 1)
3905 strcat(templateString, param->name);
3906 strcat(templateString, " = ");
3908 strcat(templateString, argument);
3917 int len = strlen(templateString);
3919 if(templateString[len - 1] == '<')
3923 if(templateString[len - 1] == '>')
3924 templateString[len++] = ' ';
3925 templateString[len++] = '>';
3927 templateString[len++] = '\0';
3930 struct Context * context = SetupTemplatesContext(_class);
3934 type = ProcessTypeString(templateString, 0x0);
3936 FinishTemplatesContext(context);
3939 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
3941 ProcessExpressionType(member->initializer->__anon1.exp);
3942 if(!member->initializer->__anon1.exp->expType)
3946 char expString[10240];
3948 expString[0] = '\0';
3949 PrintExpression(member->initializer->__anon1.exp, expString);
3950 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
3951 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
3954 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 0x1, 0x1, 0x0, 0x0, 0x1))
3956 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
3959 else if(member->initializer)
3961 ProcessInitializer(member->initializer, type);
3968 if(_class && _class->type == 3)
3970 if(member->initializer)
3972 struct Type * type = MkClassType(_class->fullName);
3974 ProcessInitializer(member->initializer, type);
3980 if(member->initializer)
3982 ProcessInitializer(member->initializer, (((void *)0)));
3988 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
3992 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
3994 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
3998 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
4003 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);
4005 extern void FreeSpecifier(struct Specifier * spec);
4007 static void ProcessFunction(struct FunctionDefinition * function);
4009 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
4011 extern struct Specifier * CopySpecifier(struct Specifier * spec);
4013 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
4015 extern void FreeClassFunction(struct ClassFunction * func);
4017 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
4019 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
4021 void ProcessInstantiationType(struct Instantiation * inst)
4026 struct MembersInit * members;
4027 struct Symbol * classSym;
4028 struct __ecereNameSpace__ecere__com__Class * _class;
4030 classSym = inst->_class->__anon1.__anon1.symbol;
4031 _class = classSym ? classSym->__anon1.registered : (((void *)0));
4032 if(!_class || _class->type != 5)
4033 DeclareStruct(inst->_class->__anon1.__anon1.name, 0x0);
4034 afterExternal = afterExternal ? afterExternal : curExternal;
4036 ProcessExpressionType(inst->exp);
4037 inst->isConstant = 0x1;
4040 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
4041 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
4042 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
4043 int subMemberStackPos = 0;
4045 for(members = (*inst->members).first; members; members = members->next)
4047 switch(members->type)
4052 static unsigned int instMethodID = 0;
4053 struct External * external = curExternal;
4054 struct Context * context = curContext;
4055 struct Declarator * declarator = members->__anon1.function->declarator;
4056 struct Identifier * nameID = GetDeclId(declarator);
4057 char * unmangled = nameID ? nameID->string : (((void *)0));
4058 struct Expression * exp;
4059 struct External * createdExternal = (((void *)0));
4065 strcpy(name, "__ecereInstMeth_");
4066 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0x0);
4068 strcat(name, nameID->string);
4070 sprintf(number, "_%08d", instMethodID++);
4071 strcat(name, number);
4072 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
4076 struct Symbol * symbol = declarator->symbol;
4077 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
4079 if(method && method->type == 1)
4081 symbol->__anon1.method = method;
4082 ProcessMethodType(method);
4083 if(!symbol->type->__anon1.__anon2.thisClass)
4085 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
4087 if(!currentClass->symbol)
4088 currentClass->symbol = FindClass(currentClass->fullName);
4089 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
4094 _class->symbol = FindClass(_class->fullName);
4095 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
4098 DeclareType(symbol->type, 0x1, 0x1);
4102 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
4105 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 0x1);
4108 FreeSpecifier(nameID->_class);
4109 nameID->_class = (((void *)0));
4113 struct External * oldExternal = curExternal;
4115 declarator->symbol->id = declarator->symbol->idCode = curExternal->symbol->idCode;
4117 struct External * externalDecl;
4119 externalDecl = MkExternalDeclaration((((void *)0)));
4120 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), oldExternal->prev, externalDecl);
4121 if(createdExternal->__anon1.function)
4123 ProcessFunction(createdExternal->__anon1.function);
4125 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(declarator), (((void *)0)))));
4127 externalDecl->__anon1.declaration = decl;
4128 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
4129 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4130 declarator->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4137 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
4138 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
4140 curExternal = external;
4141 curContext = context;
4144 FreeClassFunction(members->__anon1.function);
4145 exp = QMkExpId(name);
4147 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
4148 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
4154 if(members->__anon1.dataMembers && classSym)
4156 struct MemberInit * member;
4157 struct Location oldyyloc = yylloc;
4159 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
4161 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
4162 if(member->initializer && !member->initializer->isConstant)
4163 inst->isConstant = 0x0;
4175 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams)
4179 if(type->kind == 11)
4181 struct Type * param;
4185 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
4186 DeclareType(param, declarePointers, 0x1);
4188 DeclareType(type->__anon1.__anon2.returnType, declarePointers, 0x1);
4190 else if(type->kind == 13 && declarePointers)
4191 DeclareType(type->__anon1.type, declarePointers, 0x0);
4192 else if(type->kind == 8)
4194 if(type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 1 || type->__anon1._class->__anon1.registered->type == 5) && !type->__anon1._class->declaring)
4195 DeclareStruct(type->__anon1._class->__anon1.registered->fullName, type->__anon1._class->__anon1.registered->type == 5);
4197 else if(type->kind == 9 || type->kind == 10)
4199 struct Type * member;
4201 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
4202 DeclareType(member, 0x0, 0x0);
4204 else if(type->kind == 12)
4205 DeclareType(type->__anon1.__anon4.arrayType, declarePointers, 0x0);
4209 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
4211 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
4213 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
4215 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
4216 struct __ecereNameSpace__ecere__com__Class * sClass;
4218 for(sClass = _class; sClass; sClass = sClass->base)
4221 if(sClass->templateClass)
4222 sClass = sClass->templateClass;
4223 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
4225 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
4227 for(sClass = sClass->base; sClass; sClass = sClass->base)
4229 if(sClass->templateClass)
4230 sClass = sClass->templateClass;
4231 id += sClass->templateParams.count;
4242 arg = &_class->templateArgs[id];
4243 if(arg && param->type == 0)
4244 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
4249 extern struct Context * PushContext(void);
4251 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
4253 struct TemplatedType
4256 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4257 struct __ecereNameSpace__ecere__sys__BTNode * left;
4258 struct __ecereNameSpace__ecere__sys__BTNode * right;
4260 struct TemplateParameter * param;
4261 } __attribute__ ((gcc_struct));
4263 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
4265 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
4267 struct Context * context = PushContext();
4269 context->templateTypesOnly = 0x1;
4270 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
4272 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
4274 for(; param; param = param->next)
4276 if(param->type == 0 && param->identifier)
4278 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
4280 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4286 struct __ecereNameSpace__ecere__com__Class * sClass;
4288 for(sClass = _class; sClass; sClass = sClass->base)
4290 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
4292 for(p = sClass->templateParams.first; p; p = p->next)
4296 struct TemplateParameter * param = p->param;
4297 struct TemplatedType * type;
4301 p->param = param = __extension__ ({
4302 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
4304 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
4307 type = __extension__ ({
4308 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
4310 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
4312 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4320 extern void PopContext(struct Context * ctx);
4322 extern void FreeContext(struct Context * context);
4324 void FinishTemplatesContext(struct Context * context)
4326 PopContext(context);
4327 FreeContext(context);
4328 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
4331 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
4333 if(!method->dataType)
4335 struct Context * context = SetupTemplatesContext(method->_class);
4337 method->dataType = ProcessTypeString(method->dataTypeString, 0x0);
4338 FinishTemplatesContext(context);
4339 if(method->type != 1 && method->dataType)
4341 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
4343 if(!method->_class->symbol)
4344 method->_class->symbol = FindClass(method->_class->fullName);
4345 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
4351 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
4355 struct Context * context = SetupTemplatesContext(prop->_class);
4357 prop->dataType = ProcessTypeString(prop->dataTypeString, 0x0);
4358 FinishTemplatesContext(context);
4362 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
4364 extern void FreeTypeName(struct TypeName * typeName);
4366 static void ProcessDeclarator(struct Declarator * decl);
4368 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
4370 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
4374 struct MethodImport * prev;
4375 struct MethodImport * next;
4377 unsigned int isVirtual;
4378 } __attribute__ ((gcc_struct));
4380 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
4382 void DeclareMethod(struct __ecereNameSpace__ecere__com__Method * method, const char * name)
4384 struct Symbol * symbol = method->symbol;
4386 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && method->type == 1) || symbol->id > (curExternal ? curExternal->symbol->idCode : -1))
4388 unsigned int dllImport = 0x0;
4390 if(!method->dataType)
4391 method->dataType = ProcessTypeString(method->dataTypeString, 0x0);
4392 if(!symbol || symbol->_import || method->type == 1)
4394 if(!symbol || method->type == 1)
4396 struct Symbol * classSym;
4398 if(!method->_class->symbol)
4399 method->_class->symbol = FindClass(method->_class->fullName);
4400 classSym = method->_class->symbol;
4401 if(!classSym->_import)
4403 struct ModuleImport * module;
4405 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + structSize_Instance)))->name)
4406 module = FindModule(method->_class->module);
4408 module = mainModule;
4409 classSym->_import = __extension__ ({
4410 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
4412 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
4414 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
4418 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4420 if(!symbol->_import)
4422 symbol->_import = (struct ClassImport *)__extension__ ({
4423 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
4425 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
4427 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
4431 symbol->type = method->dataType;
4433 symbol->type->refCount++;
4436 if(!method->dataType->dllExport)
4438 if((method->_class->module != privateModule || !strcmp(method->_class->name, "float") || !strcmp(method->_class->name, "double")) && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + structSize_Instance)))->importType != 1)
4442 if(method->type != 1 && method->dataType)
4443 DeclareType(method->dataType, 0x1, 0x1);
4444 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4446 struct Declaration * decl;
4447 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4448 struct Declarator * d;
4449 struct Declarator * funcDecl;
4450 struct External * external;
4452 specifiers = MkList();
4453 declarators = MkList();
4455 ListAdd(specifiers, MkSpecifier(EXTERN));
4456 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
4457 ListAdd(specifiers, MkSpecifier(STATIC));
4458 if(method->type == 1)
4460 ListAdd(specifiers, MkSpecifier(INT));
4461 d = MkDeclaratorIdentifier(MkIdentifier(name));
4465 d = MkDeclaratorIdentifier(MkIdentifier(name));
4467 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4469 struct Context * context = SetupTemplatesContext(method->_class);
4471 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
4472 FinishTemplatesContext(context);
4474 funcDecl = GetFuncDecl(d);
4477 struct Specifier * spec, * next;
4479 for(spec = (*specifiers).first; spec; spec = next)
4484 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4485 FreeSpecifier(spec);
4489 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
4491 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
4493 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
4494 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")));
4495 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
4496 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
4498 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
4500 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
4502 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
4503 FreeTypeName(param);
4505 if(!funcDecl->__anon1.function.parameters)
4506 funcDecl->__anon1.function.parameters = MkList();
4507 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
4511 ProcessDeclarator(d);
4512 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4513 decl = MkDeclaration(specifiers, declarators);
4514 ReplaceThisClassSpecifiers(specifiers, method->_class);
4515 if(symbol->__anon2.__anon1.pointerExternal)
4517 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4520 *functionSymbol = *symbol;
4521 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4522 if(functionSymbol->type)
4523 functionSymbol->type->refCount++;
4525 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4526 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4528 external = MkExternalDeclaration(decl);
4530 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
4531 external->symbol = symbol;
4532 symbol->__anon2.__anon1.pointerExternal = external;
4536 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4538 symbol->id = curExternal ? curExternal->symbol->idCode : (((int)0x7fffffff));
4542 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
4544 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4546 unsigned int first = 0x1;
4548 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4550 char className[1024];
4552 strcpy(className, _class->fullName);
4553 for(param = _class->templateParams.first; param; param = param->next)
4557 strcat(className, "<");
4559 strcat(className, ", ");
4560 if(lastParam + 1 != p)
4562 strcat(className, param->name);
4563 strcat(className, " = ");
4565 strcat(className, param->name);
4573 int len = strlen(className);
4575 if(className[len - 1] == '>')
4576 className[len++] = ' ';
4577 className[len++] = '>';
4578 className[len++] = '\0';
4580 return __ecereNameSpace__ecere__sys__CopyString(className);
4583 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
4586 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
4590 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4592 unsigned int first = 0x1;
4594 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4596 char className[1024];
4598 strcpy(className, _class->fullName);
4599 for(param = _class->templateParams.first; param; param = param->next)
4603 strcat(className, "<");
4605 strcat(className, ", ");
4606 if(lastParam + 1 != p)
4608 strcat(className, param->name);
4609 strcat(className, " = ");
4611 strcat(className, param->name);
4619 int len = strlen(className);
4621 if(className[len - 1] == '>')
4622 className[len++] = ' ';
4623 className[len++] = '>';
4624 className[len++] = '\0';
4626 type = MkClassType(className);
4630 type = MkClassType(_class->fullName);
4635 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
4637 if(specs != (((void *)0)) && _class)
4639 struct Specifier * spec;
4641 for(spec = specs->first; spec; spec = spec->next)
4643 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
4646 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
4647 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
4653 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
4655 struct __ecereNameSpace__ecere__com__GlobalFunction
4657 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
4658 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
4661 struct __ecereNameSpace__ecere__com__Instance * module;
4662 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
4663 const char * dataTypeString;
4664 struct Type * dataType;
4666 } __attribute__ ((gcc_struct));
4668 extern struct Context * globalContext;
4670 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
4672 struct FunctionImport
4674 struct FunctionImport * prev;
4675 struct FunctionImport * next;
4677 } __attribute__ ((gcc_struct));
4679 unsigned int DeclareFunction(struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
4681 struct Symbol * symbol = function->symbol;
4683 if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
4685 unsigned int imported = 0x0;
4686 unsigned int dllImport = 0x0;
4688 if(!function->dataType)
4690 function->dataType = ProcessTypeString(function->dataTypeString, 0x0);
4691 if(!function->dataType->__anon1.__anon2.thisClass)
4692 function->dataType->__anon1.__anon2.staticMethod = 0x1;
4698 struct ModuleImport * module = FindModule(function->module);
4700 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4703 if(!function->dataType->dllExport)
4705 symbol->_import = (struct ClassImport *)__extension__ ({
4706 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
4708 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
4710 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
4714 symbol->type = ProcessTypeString(function->dataTypeString, 0x0);
4715 if(!symbol->type->__anon1.__anon2.thisClass)
4716 symbol->type->__anon1.__anon2.staticMethod = 0x1;
4719 imported = symbol->_import ? 0x1 : 0x0;
4720 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1)
4723 DeclareType(function->dataType, 0x1, 0x1);
4726 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4728 struct Declaration * decl;
4729 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4730 struct Declarator * d;
4731 struct Declarator * funcDecl;
4732 struct External * external;
4734 specifiers = MkList();
4735 declarators = MkList();
4736 ListAdd(specifiers, MkSpecifier(EXTERN));
4737 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
4739 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4740 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
4741 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType == 1)
4743 struct Specifier * spec;
4745 for(spec = (*specifiers).first; spec; spec = spec->next)
4746 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
4748 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4749 FreeSpecifier(spec);
4753 funcDecl = GetFuncDecl(d);
4754 if(funcDecl && !funcDecl->__anon1.function.parameters)
4756 funcDecl->__anon1.function.parameters = MkList();
4757 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
4759 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4761 struct Context * oldCtx = curContext;
4763 curContext = globalContext;
4764 decl = MkDeclaration(specifiers, declarators);
4765 curContext = oldCtx;
4767 if(symbol->__anon2.__anon1.pointerExternal)
4769 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4772 *functionSymbol = *symbol;
4773 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4774 if(functionSymbol->type)
4775 functionSymbol->type->refCount++;
4777 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4778 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4780 external = MkExternalDeclaration(decl);
4782 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
4783 external->symbol = symbol;
4784 symbol->__anon2.__anon1.pointerExternal = external;
4788 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4791 symbol->id = curExternal->symbol->idCode;
4794 return (symbol && symbol->_import && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1) ? 0x1 : 0x0;
4797 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_GlobalData;
4802 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4803 struct __ecereNameSpace__ecere__sys__BTNode * left;
4804 struct __ecereNameSpace__ecere__sys__BTNode * right;
4806 struct __ecereNameSpace__ecere__com__Instance * module;
4807 char * dataTypeString;
4808 struct Type * dataType;
4811 } __attribute__ ((gcc_struct));
4813 void DeclareGlobalData(struct GlobalData * data)
4815 struct Symbol * symbol = data->symbol;
4817 if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
4822 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4825 data->dataType = ProcessTypeString(data->dataTypeString, 0x0);
4826 DeclareType(data->dataType, 0x1, 0x1);
4829 if(!symbol->__anon2.__anon1.pointerExternal)
4831 struct Declaration * decl;
4832 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4833 struct Declarator * d;
4834 struct External * external;
4836 specifiers = MkList();
4837 declarators = MkList();
4838 ListAdd(specifiers, MkSpecifier(EXTERN));
4839 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
4840 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
4841 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4842 decl = MkDeclaration(specifiers, declarators);
4843 external = MkExternalDeclaration(decl);
4845 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
4846 external->symbol = symbol;
4847 symbol->__anon2.__anon1.pointerExternal = external;
4851 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4854 symbol->id = curExternal->symbol->idCode;
4861 struct Conversion * prev, * next;
4862 struct __ecereNameSpace__ecere__com__Property * convert;
4864 struct Type * resultType;
4865 } __attribute__ ((gcc_struct));
4867 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
4869 extern void Compiler_Warning(const char * format, ...);
4871 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
4873 unsigned int status = 0x1;
4875 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))
4877 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
4878 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
4880 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
4882 struct Type * sourceType = source, * destType = dest;
4884 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
4885 sourceType = sourceType->__anon1.type;
4886 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
4887 destType = destType->__anon1.type;
4888 if(!destType->constant && sourceType->constant)
4892 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
4899 extern void CopyTypeInto(struct Type * type, struct Type * src);
4901 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
4903 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)
4908 CheckConstCompatibility(source, dest, 0x1);
4909 if(source->kind == 20 && dest->kind != 20)
4911 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
4916 if(dest->kind == 20 && source->kind != 20)
4918 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
4923 if(dest->classObjectType == 2 && dest->kind != 11)
4925 if(source->classObjectType != 3)
4929 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
4937 if(source->kind != 11 && source->classObjectType == 3)
4939 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
4942 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
4944 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))
4947 if(dest->kind == 14 && source->kind != 0)
4949 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))
4951 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))
4953 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
4955 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
4957 if(conversions != (((void *)0)))
4959 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
4964 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
4966 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
4968 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
4970 if(sourceBase == destBase)
4974 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))
4978 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))
4980 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
4987 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
4991 if(source->kind == 8)
4993 struct __ecereNameSpace__ecere__com__Class * _class;
4995 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
4997 struct __ecereNameSpace__ecere__com__Property * convert;
4999 for(convert = _class->conversions.first; convert; convert = convert->next)
5001 if(convert->memberAccess == 1 || _class->module == privateModule)
5003 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5005 if(!convert->dataType)
5006 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
5007 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")) ? 0x1 : 0x0, convert->dataType->kind == 8, 0x0, 0x1, warnConst))
5009 if(!conversions && !convert->Get)
5011 else if(conversions != (((void *)0)))
5013 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))
5017 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 0x1, conv);
5019 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5030 struct __ecereNameSpace__ecere__com__Class * _class;
5032 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5034 struct __ecereNameSpace__ecere__com__Property * convert;
5036 for(convert = _class->conversions.first; convert; convert = convert->next)
5038 if(convert->memberAccess == 1 || _class->module == privateModule)
5040 struct Type * constType = (((void *)0));
5041 unsigned int success = 0x0;
5043 if(!convert->dataType)
5044 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
5045 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
5047 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5049 constType = __extension__ ({
5050 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5052 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
5054 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
5055 ptrType->constant = 0x1;
5057 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, 0x0, 0x0, 0x1, warnConst))
5059 if(!conversions && !convert->Set)
5061 else if(conversions != (((void *)0)))
5063 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))
5067 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
5069 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
5075 FreeType(constType);
5081 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5083 if(!dest->__anon1._class->__anon1.registered->dataType)
5084 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5085 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
5087 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, dest->__anon1._class->__anon1.registered->dataType->kind == 8, 0x0, 0x0, warnConst))
5094 if(source->kind == 8)
5096 struct __ecereNameSpace__ecere__com__Class * _class;
5098 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5100 struct __ecereNameSpace__ecere__com__Property * convert;
5102 for(convert = _class->conversions.first; convert; convert = convert->next)
5104 if(convert->memberAccess == 1 || _class->module == privateModule)
5106 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5108 if(!convert->dataType)
5109 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
5110 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, 0x0, 0x1, warnConst))
5112 if(!conversions && !convert->Get)
5114 else if(conversions != (((void *)0)))
5116 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))
5120 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 0x1, conv);
5122 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5130 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
5132 if(!source->__anon1._class->__anon1.registered->dataType)
5133 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5134 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
5136 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, 0x0, 0x0, warnConst))
5138 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0, warnConst))
5144 if(source->kind == 8 || source->kind == 19)
5146 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
5148 else if(dest->kind == 7 && source->kind == 6)
5150 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
5152 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
5154 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
5156 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
5158 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
5160 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))
5162 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))
5164 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)))
5166 struct Type * paramSource, * paramDest;
5168 if(dest->kind == 16)
5169 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
5170 if(source->kind == 16)
5171 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
5172 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
5173 dest = dest->__anon1.type;
5174 if(source->kind == 13 && source->__anon1.type->kind == 11)
5175 source = source->__anon1.type;
5176 if(dest->kind == 16)
5177 dest = dest->__anon1.__anon3.method->dataType;
5178 if(source->kind == 16)
5179 source = source->__anon1.__anon3.method->dataType;
5180 paramSource = source->__anon1.__anon2.params.first;
5181 if(paramSource && paramSource->kind == 0)
5182 paramSource = (((void *)0));
5183 paramDest = dest->__anon1.__anon2.params.first;
5184 if(paramDest && paramDest->kind == 0)
5185 paramDest = (((void *)0));
5186 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5188 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))))
5190 if(paramDest && paramDest->kind == 8)
5191 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
5193 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
5196 paramDest = paramDest->next;
5198 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
5200 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5202 if(dest->__anon1.__anon2.thisClass)
5204 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
5206 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5212 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
5215 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
5217 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
5221 paramSource = paramSource->next;
5225 if(dest->__anon1.__anon2.thisClass)
5227 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
5229 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5235 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
5237 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
5243 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5245 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
5249 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 0x1);
5250 for(; paramDest; paramDest = paramDest->next)
5254 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
5258 struct Type * paramDestType = paramDest;
5259 struct Type * paramSourceType = paramSource;
5260 struct Type * type = paramDestType;
5262 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
5265 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
5266 struct __ecereNameSpace__ecere__com__Class * sClass;
5268 for(sClass = owningClassSource; sClass; sClass = sClass->base)
5271 if(sClass->templateClass)
5272 sClass = sClass->templateClass;
5273 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
5275 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
5277 for(sClass = sClass->base; sClass; sClass = sClass->base)
5279 if(sClass->templateClass)
5280 sClass = sClass->templateClass;
5281 id += sClass->templateParams.count;
5292 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
5294 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
5297 if(!MatchTypes(paramDestType, paramSourceType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst) && (!acceptReversedParams || !MatchTypes(paramSourceType, paramDestType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst)))
5302 PrintType(paramDest, type, 0x0, 0x1);
5303 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
5304 if(paramDestType != paramDest)
5305 FreeType(paramDestType);
5308 if(paramDestType != paramDest)
5309 FreeType(paramDestType);
5311 paramSource = paramSource->next;
5315 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
5320 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
5324 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
5326 if(MatchTypes(source->__anon1.type, dest->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5333 static void FreeConvert(struct Conversion * convert)
5335 if(convert->resultType)
5336 FreeType(convert->resultType);
5339 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BTNamedLink;
5341 struct __ecereNameSpace__ecere__com__BTNamedLink
5344 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
5345 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
5346 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
5349 } __attribute__ ((gcc_struct));
5351 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__EnumClassData;
5353 struct __ecereNameSpace__ecere__com__EnumClassData
5355 struct __ecereNameSpace__ecere__sys__OldList values;
5357 } __attribute__ ((gcc_struct));
5359 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink;
5361 struct __ecereNameSpace__ecere__sys__NamedLink
5363 struct __ecereNameSpace__ecere__sys__NamedLink * prev;
5364 struct __ecereNameSpace__ecere__sys__NamedLink * next;
5367 } __attribute__ ((gcc_struct));
5369 extern void FreeExpContents(struct Expression * exp);
5371 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
5373 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
5375 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
5377 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
5379 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
5381 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5383 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
5385 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)))
5387 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
5389 if(_class->type == 4)
5391 struct __ecereNameSpace__ecere__sys__OldList converts =
5395 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5399 _class->symbol = FindClass(_class->fullName);
5400 type->__anon1._class = _class->symbol;
5401 if(MatchTypes(type, dest, &converts, (((void *)0)), (((void *)0)), 0x1, 0x0, 0x0, 0x0, 0x0))
5403 struct __ecereNameSpace__ecere__sys__NamedLink * value;
5404 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5408 struct __ecereNameSpace__ecere__com__Class * baseClass;
5410 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
5412 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
5414 for(value = e->values.first; value; value = value->next)
5416 if(!strcmp(value->name, string))
5421 FreeExpContents(sourceExp);
5422 FreeType(sourceExp->expType);
5423 sourceExp->isConstant = 0x1;
5424 sourceExp->expType = MkClassType(baseClass->fullName);
5428 sourceExp->type = 2;
5429 if(!strcmp(baseClass->dataTypeString, "int"))
5430 sprintf(constant, "%d", (int)value->data);
5432 sprintf(constant, "0x%X", (int)value->data);
5433 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5435 while(converts.first)
5437 struct Conversion * convert = converts.first;
5439 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
5440 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
5442 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5449 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
5450 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5453 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)))
5454 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
5459 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SubModule;
5461 struct __ecereNameSpace__ecere__com__SubModule
5463 struct __ecereNameSpace__ecere__com__SubModule * prev;
5464 struct __ecereNameSpace__ecere__com__SubModule * next;
5465 struct __ecereNameSpace__ecere__com__Instance * module;
5467 } __attribute__ ((gcc_struct));
5469 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
5471 struct __ecereNameSpace__ecere__com__SubModule * subModule;
5473 if(searchFor == searchIn)
5475 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
5477 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->application)
5479 if(ModuleVisibility(subModule->module, searchFor))
5486 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
5488 struct __ecereNameSpace__ecere__com__Application
5491 const char * * argv;
5493 unsigned int isGUIApp;
5494 struct __ecereNameSpace__ecere__sys__OldList allModules;
5495 char * parsedCommand;
5496 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
5497 } __attribute__ ((gcc_struct));
5499 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5501 struct __ecereNameSpace__ecere__com__Instance * module;
5503 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Module)))->systemNameSpace, sourceExp, dest, string, conversions))
5505 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Instance)))->privateNameSpace, sourceExp, dest, string, conversions))
5507 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
5509 for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
5511 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
5517 extern struct Expression * CopyExpression(struct Expression * exp);
5519 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
5521 void ReadString(char * output, char * string);
5523 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
5525 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
5527 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
5529 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
5531 struct Type * source;
5532 struct Type * realDest = dest;
5533 struct Type * backupSourceExpType = (((void *)0));
5534 struct Expression * computedExp = sourceExp;
5537 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)
5539 computedExp = CopyExpression(sourceExp);
5540 ComputeExpression(computedExp);
5542 source = sourceExp->expType;
5543 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
5545 if(computedExp != sourceExp)
5547 FreeExpression(computedExp);
5548 computedExp = sourceExp;
5553 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
5555 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
5557 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
5559 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
5561 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
5563 if(sourceBase == destBase)
5565 if(computedExp != sourceExp)
5567 FreeExpression(computedExp);
5568 computedExp = sourceExp;
5577 struct __ecereNameSpace__ecere__sys__OldList * specs;
5578 unsigned int flag = 0x0;
5579 long long value = (((int)0x7fffffff));
5582 if(computedExp->type == 2)
5584 if(source->isSigned)
5585 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5587 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5589 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
5591 if(source->isSigned)
5592 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5594 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5596 if(computedExp != sourceExp)
5598 FreeExpression(computedExp);
5599 computedExp = sourceExp;
5601 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "ecere::com::unichar"))
5604 source = __extension__ ({
5605 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5607 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0x0, __ecereInstance1->refCount = 1, __ecereInstance1;
5612 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5614 if(_class && _class->type == 3)
5616 if(source->kind != 8)
5618 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5619 struct Type * tempDest, * tempSource;
5621 for(; _class->base->type != 1000; _class = _class->base)
5624 tempDest = tempType;
5627 _class->symbol = FindClass(_class->fullName);
5628 tempType->__anon1._class = _class->symbol;
5629 tempType->truth = dest->truth;
5630 if(tempType->__anon1._class)
5631 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
5632 backupSourceExpType = sourceExp->expType;
5633 sourceExp->expType = dest;
5636 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5639 if(_class && _class->type == 2 && source->kind != 8)
5641 if(!dest->__anon1._class->__anon1.registered->dataType)
5642 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5643 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5646 FreeType(sourceExp->expType);
5647 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
5651 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
5653 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
5654 struct Declarator * decl;
5657 ReadString(string, sourceExp->__anon1.__anon2.string);
5658 decl = SpecDeclFromString(string, specs, (((void *)0)));
5659 FreeExpContents(sourceExp);
5660 FreeType(sourceExp->expType);
5661 sourceExp->type = 24;
5662 sourceExp->__anon1._classExp.specifiers = specs;
5663 sourceExp->__anon1._classExp.decl = decl;
5664 sourceExp->expType = dest;
5668 if(backupSourceExpType)
5669 FreeType(backupSourceExpType);
5673 else if(source->kind == 8)
5675 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
5677 if(_class && (_class->type == 3 || _class->type == 2))
5681 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5682 struct Type * tempDest, * tempSource;
5684 if(!source->__anon1._class->__anon1.registered->dataType)
5685 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5686 for(; _class->base->type != 1000; _class = _class->base)
5689 tempSource = tempType;
5691 tempType->__anon1._class = FindClass(_class->fullName);
5692 tempType->truth = source->truth;
5693 tempType->classObjectType = source->classObjectType;
5694 if(tempType->__anon1._class)
5695 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
5696 if(conversions->last)
5698 ((struct Conversion *)conversions->last)->resultType = dest;
5701 FreeType(sourceExp->expType);
5702 sourceExp->expType = MkClassType(_class->fullName);
5703 sourceExp->expType->truth = source->truth;
5704 sourceExp->expType->classObjectType = source->classObjectType;
5705 if(!sourceExp->destType)
5707 FreeType(sourceExp->destType);
5708 sourceExp->destType = sourceExp->expType;
5709 if(sourceExp->expType)
5710 sourceExp->expType->refCount++;
5712 if(!_class->dataType)
5713 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
5715 dest = MkClassType(source->__anon1._class->string);
5716 dest->truth = source->truth;
5717 dest->classObjectType = source->classObjectType;
5719 source = _class->dataType;
5721 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5727 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5736 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5737 unsigned int fittingValue = 0x0;
5739 if(_class && _class->type == 4)
5741 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5742 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5744 if(c && value >= 0 && value <= c->largest)
5747 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
5749 if(_class->type == 0 || _class->type == 5)
5751 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5753 *newExp = *sourceExp;
5754 if(sourceExp->destType)
5755 sourceExp->destType->refCount++;
5756 if(sourceExp->expType)
5757 sourceExp->expType->refCount++;
5758 sourceExp->type = 11;
5759 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
5760 sourceExp->__anon1.cast.exp = newExp;
5761 FreeType(sourceExp->expType);
5762 sourceExp->expType = (((void *)0));
5763 ProcessExpressionType(sourceExp);
5766 FreeType(sourceExp->expType);
5767 sourceExp->expType = dest;
5772 if(backupSourceExpType)
5773 FreeType(backupSourceExpType);
5776 if(!_class->dataType)
5777 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
5779 dest = _class->dataType;
5782 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))
5784 specs = MkListOne(MkSpecifier(DOUBLE));
5786 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))
5788 specs = MkListOne(MkSpecifier(FLOAT));
5790 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))
5794 ListAdd(specs, MkSpecifier(UNSIGNED));
5795 ListAdd(specs, MkSpecifier(INT64));
5797 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
5801 ListAdd(specs, MkSpecifier(UNSIGNED));
5802 ListAdd(specs, MkSpecifier(INT));
5804 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5808 ListAdd(specs, MkSpecifier(UNSIGNED));
5809 ListAdd(specs, MkSpecifier(SHORT));
5811 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5815 ListAdd(specs, MkSpecifier(UNSIGNED));
5816 ListAdd(specs, MkSpecifier(CHAR));
5822 if(backupSourceExpType)
5824 if(sourceExp->expType)
5825 FreeType(sourceExp->expType);
5826 sourceExp->expType = backupSourceExpType;
5831 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))
5833 specs = MkListOne(MkSpecifier(DOUBLE));
5835 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))
5837 specs = MkListOne(MkSpecifier(FLOAT));
5839 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
5842 ListAdd(specs, MkSpecifier(BOOL));
5844 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)))
5848 ListAdd(specs, MkSpecifier(UNSIGNED));
5849 ListAdd(specs, MkSpecifier(CHAR));
5851 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)))))
5855 ListAdd(specs, MkSpecifier(UNSIGNED));
5856 ListAdd(specs, MkSpecifier(SHORT));
5858 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
5862 ListAdd(specs, MkSpecifier(UNSIGNED));
5863 ListAdd(specs, MkSpecifier(INT));
5865 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
5869 ListAdd(specs, MkSpecifier(UNSIGNED));
5870 ListAdd(specs, MkSpecifier(INT64));
5872 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5874 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
5880 if(backupSourceExpType)
5882 if(sourceExp->expType)
5883 FreeType(sourceExp->expType);
5884 sourceExp->expType = backupSourceExpType;
5888 if(!flag && !sourceExp->opDestType)
5890 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5892 *newExp = *sourceExp;
5893 newExp->prev = (((void *)0));
5894 newExp->next = (((void *)0));
5895 if(sourceExp->destType)
5896 sourceExp->destType->refCount++;
5897 if(sourceExp->expType)
5898 sourceExp->expType->refCount++;
5899 sourceExp->type = 11;
5900 if(realDest->kind == 8)
5902 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
5903 FreeList(specs, FreeSpecifier);
5906 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
5907 if(newExp->type == 4)
5909 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
5912 sourceExp->__anon1.cast.exp = newExp;
5913 FreeType(sourceExp->expType);
5914 sourceExp->expType = (((void *)0));
5915 ProcessExpressionType(sourceExp);
5918 FreeList(specs, FreeSpecifier);
5921 if(backupSourceExpType)
5922 FreeType(backupSourceExpType);
5927 if(computedExp != sourceExp)
5929 FreeExpression(computedExp);
5930 computedExp = sourceExp;
5932 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
5933 sourceExp = (*sourceExp->__anon1.list).last;
5934 if(sourceExp->type == 0)
5936 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
5940 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5942 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
5943 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5947 for(; _class && _class->type == 4; _class = _class->base)
5949 struct __ecereNameSpace__ecere__sys__NamedLink * value;
5950 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5952 for(value = e->values.first; value; value = value->next)
5954 if(!strcmp(value->name, id->string))
5959 FreeExpContents(sourceExp);
5960 FreeType(sourceExp->expType);
5961 sourceExp->isConstant = 0x1;
5962 sourceExp->expType = MkClassType(_class->fullName);
5966 sourceExp->type = 2;
5967 if(_class->dataTypeString && !strcmp(_class->dataTypeString, "int"))
5968 sprintf(constant, "%d", (int)value->data);
5970 sprintf(constant, "0x%X", (int)value->data);
5971 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5980 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
5991 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5993 int value2 = op2->__anon1.i;
5996 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
5999 exp->expType = op1->type;
6001 op1->type->refCount++;
6006 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6008 unsigned int value2 = op2->__anon1.ui;
6011 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
6014 exp->expType = op1->type;
6016 op1->type->refCount++;
6021 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6023 long long value2 = op2->__anon1.i64;
6026 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
6029 exp->expType = op1->type;
6031 op1->type->refCount++;
6036 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6038 uint64 value2 = op2->__anon1.ui64;
6041 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
6044 exp->expType = op1->type;
6046 op1->type->refCount++;
6051 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6053 short value2 = op2->__anon1.s;
6056 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
6059 exp->expType = op1->type;
6061 op1->type->refCount++;
6066 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6068 unsigned short value2 = op2->__anon1.us;
6071 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
6074 exp->expType = op1->type;
6076 op1->type->refCount++;
6081 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6083 char value2 = op2->__anon1.c;
6086 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
6089 exp->expType = op1->type;
6091 op1->type->refCount++;
6096 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6098 unsigned char value2 = op2->__anon1.uc;
6101 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
6104 exp->expType = op1->type;
6106 op1->type->refCount++;
6111 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6113 float value2 = op2->__anon1.f;
6116 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
6119 exp->expType = op1->type;
6121 op1->type->refCount++;
6126 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6128 double value2 = op2->__anon1.d;
6131 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
6134 exp->expType = op1->type;
6136 op1->type->refCount++;
6141 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6143 int value2 = op2->__anon1.i;
6146 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
6149 exp->expType = op1->type;
6151 op1->type->refCount++;
6156 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6158 unsigned int value2 = op2->__anon1.ui;
6161 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
6164 exp->expType = op1->type;
6166 op1->type->refCount++;
6171 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6173 long long value2 = op2->__anon1.i64;
6176 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
6179 exp->expType = op1->type;
6181 op1->type->refCount++;
6186 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6188 uint64 value2 = op2->__anon1.ui64;
6191 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
6194 exp->expType = op1->type;
6196 op1->type->refCount++;
6201 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6203 short value2 = op2->__anon1.s;
6206 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
6209 exp->expType = op1->type;
6211 op1->type->refCount++;
6216 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6218 unsigned short value2 = op2->__anon1.us;
6221 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
6224 exp->expType = op1->type;
6226 op1->type->refCount++;
6231 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6233 char value2 = op2->__anon1.c;
6236 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
6239 exp->expType = op1->type;
6241 op1->type->refCount++;
6246 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6248 unsigned char value2 = op2->__anon1.uc;
6251 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
6254 exp->expType = op1->type;
6256 op1->type->refCount++;
6261 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6263 float value2 = op2->__anon1.f;
6266 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
6269 exp->expType = op1->type;
6271 op1->type->refCount++;
6276 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6278 double value2 = op2->__anon1.d;
6281 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
6284 exp->expType = op1->type;
6286 op1->type->refCount++;
6291 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6293 int value2 = op2->__anon1.i;
6296 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
6299 exp->expType = op1->type;
6301 op1->type->refCount++;
6306 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6308 unsigned int value2 = op2->__anon1.ui;
6311 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
6314 exp->expType = op1->type;
6316 op1->type->refCount++;
6321 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6323 long long value2 = op2->__anon1.i64;
6326 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
6329 exp->expType = op1->type;
6331 op1->type->refCount++;
6336 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6338 uint64 value2 = op2->__anon1.ui64;
6341 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
6344 exp->expType = op1->type;
6346 op1->type->refCount++;
6351 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6353 short value2 = op2->__anon1.s;
6356 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
6359 exp->expType = op1->type;
6361 op1->type->refCount++;
6366 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6368 unsigned short value2 = op2->__anon1.us;
6371 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
6374 exp->expType = op1->type;
6376 op1->type->refCount++;
6381 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6383 char value2 = op2->__anon1.c;
6386 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
6389 exp->expType = op1->type;
6391 op1->type->refCount++;
6396 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6398 unsigned char value2 = op2->__anon1.uc;
6401 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
6404 exp->expType = op1->type;
6406 op1->type->refCount++;
6411 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6413 float value2 = op2->__anon1.f;
6416 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
6419 exp->expType = op1->type;
6421 op1->type->refCount++;
6426 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6428 double value2 = op2->__anon1.d;
6431 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
6434 exp->expType = op1->type;
6436 op1->type->refCount++;
6441 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6443 int value2 = op2->__anon1.i;
6446 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
6449 exp->expType = op1->type;
6451 op1->type->refCount++;
6456 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6458 unsigned int value2 = op2->__anon1.ui;
6461 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
6464 exp->expType = op1->type;
6466 op1->type->refCount++;
6471 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6473 long long value2 = op2->__anon1.i64;
6476 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
6479 exp->expType = op1->type;
6481 op1->type->refCount++;
6486 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6488 uint64 value2 = op2->__anon1.ui64;
6491 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
6494 exp->expType = op1->type;
6496 op1->type->refCount++;
6501 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6503 short value2 = op2->__anon1.s;
6506 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
6509 exp->expType = op1->type;
6511 op1->type->refCount++;
6516 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6518 unsigned short value2 = op2->__anon1.us;
6521 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
6524 exp->expType = op1->type;
6526 op1->type->refCount++;
6531 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6533 char value2 = op2->__anon1.c;
6536 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
6539 exp->expType = op1->type;
6541 op1->type->refCount++;
6546 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6548 unsigned char value2 = op2->__anon1.uc;
6551 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
6554 exp->expType = op1->type;
6556 op1->type->refCount++;
6561 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6563 float value2 = op2->__anon1.f;
6566 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
6569 exp->expType = op1->type;
6571 op1->type->refCount++;
6576 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6578 double value2 = op2->__anon1.d;
6581 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
6584 exp->expType = op1->type;
6586 op1->type->refCount++;
6591 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6593 int value2 = op2->__anon1.i;
6596 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
6599 exp->expType = op1->type;
6601 op1->type->refCount++;
6606 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6608 unsigned int value2 = op2->__anon1.ui;
6611 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
6614 exp->expType = op1->type;
6616 op1->type->refCount++;
6621 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6623 long long value2 = op2->__anon1.i64;
6626 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
6629 exp->expType = op1->type;
6631 op1->type->refCount++;
6636 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6638 uint64 value2 = op2->__anon1.ui64;
6641 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
6644 exp->expType = op1->type;
6646 op1->type->refCount++;
6651 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6653 short value2 = op2->__anon1.s;
6656 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
6659 exp->expType = op1->type;
6661 op1->type->refCount++;
6666 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6668 unsigned short value2 = op2->__anon1.us;
6671 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
6674 exp->expType = op1->type;
6676 op1->type->refCount++;
6681 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6683 char value2 = op2->__anon1.c;
6686 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
6689 exp->expType = op1->type;
6691 op1->type->refCount++;
6696 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6698 unsigned char value2 = op2->__anon1.uc;
6701 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
6704 exp->expType = op1->type;
6706 op1->type->refCount++;
6711 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
6714 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
6717 exp->expType = op1->type;
6719 op1->type->refCount++;
6724 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
6727 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
6730 exp->expType = op1->type;
6732 op1->type->refCount++;
6737 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
6740 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
6743 exp->expType = op1->type;
6745 op1->type->refCount++;
6750 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
6753 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
6756 exp->expType = op1->type;
6758 op1->type->refCount++;
6763 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
6766 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
6769 exp->expType = op1->type;
6771 op1->type->refCount++;
6776 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
6779 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
6782 exp->expType = op1->type;
6784 op1->type->refCount++;
6789 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
6792 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
6795 exp->expType = op1->type;
6797 op1->type->refCount++;
6802 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
6805 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
6808 exp->expType = op1->type;
6810 op1->type->refCount++;
6815 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
6818 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
6821 exp->expType = op1->type;
6823 op1->type->refCount++;
6828 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
6831 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
6834 exp->expType = op1->type;
6836 op1->type->refCount++;
6841 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
6844 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
6847 exp->expType = op1->type;
6849 op1->type->refCount++;
6854 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
6857 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
6860 exp->expType = op1->type;
6862 op1->type->refCount++;
6867 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
6870 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
6873 exp->expType = op1->type;
6875 op1->type->refCount++;
6880 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
6883 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
6886 exp->expType = op1->type;
6888 op1->type->refCount++;
6893 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
6896 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
6899 exp->expType = op1->type;
6901 op1->type->refCount++;
6906 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
6909 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
6912 exp->expType = op1->type;
6914 op1->type->refCount++;
6919 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
6922 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
6925 exp->expType = op1->type;
6927 op1->type->refCount++;
6932 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
6935 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
6938 exp->expType = op1->type;
6940 op1->type->refCount++;
6945 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
6948 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
6951 exp->expType = op1->type;
6953 op1->type->refCount++;
6958 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
6961 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
6964 exp->expType = op1->type;
6966 op1->type->refCount++;
6971 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
6974 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
6977 exp->expType = op1->type;
6979 op1->type->refCount++;
6984 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
6987 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
6990 exp->expType = op1->type;
6992 op1->type->refCount++;
6997 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
7000 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
7003 exp->expType = op1->type;
7005 op1->type->refCount++;
7010 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
7013 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
7016 exp->expType = op1->type;
7018 op1->type->refCount++;
7023 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
7026 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
7029 exp->expType = op1->type;
7031 op1->type->refCount++;
7036 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
7039 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
7042 exp->expType = op1->type;
7044 op1->type->refCount++;
7049 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
7052 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
7055 exp->expType = op1->type;
7057 op1->type->refCount++;
7062 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
7065 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
7068 exp->expType = op1->type;
7070 op1->type->refCount++;
7075 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
7078 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
7081 exp->expType = op1->type;
7083 op1->type->refCount++;
7088 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
7091 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
7094 exp->expType = op1->type;
7096 op1->type->refCount++;
7101 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7103 int value2 = op2->__anon1.i;
7106 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
7109 exp->expType = op1->type;
7111 op1->type->refCount++;
7116 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7118 unsigned int value2 = op2->__anon1.ui;
7121 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
7124 exp->expType = op1->type;
7126 op1->type->refCount++;
7131 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7133 long long value2 = op2->__anon1.i64;
7136 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
7139 exp->expType = op1->type;
7141 op1->type->refCount++;
7146 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7148 uint64 value2 = op2->__anon1.ui64;
7151 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
7154 exp->expType = op1->type;
7156 op1->type->refCount++;
7161 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7163 short value2 = op2->__anon1.s;
7166 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
7169 exp->expType = op1->type;
7171 op1->type->refCount++;
7176 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7178 unsigned short value2 = op2->__anon1.us;
7181 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
7184 exp->expType = op1->type;
7186 op1->type->refCount++;
7191 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7193 char value2 = op2->__anon1.c;
7196 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
7199 exp->expType = op1->type;
7201 op1->type->refCount++;
7206 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7208 unsigned char value2 = op2->__anon1.uc;
7211 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
7214 exp->expType = op1->type;
7216 op1->type->refCount++;
7221 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7223 float value2 = op2->__anon1.f;
7226 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
7229 exp->expType = op1->type;
7231 op1->type->refCount++;
7236 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7238 double value2 = op2->__anon1.d;
7241 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
7244 exp->expType = op1->type;
7246 op1->type->refCount++;
7251 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7253 int value2 = op2->__anon1.i;
7256 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
7259 exp->expType = op1->type;
7261 op1->type->refCount++;
7266 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7268 unsigned int value2 = op2->__anon1.ui;
7271 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
7274 exp->expType = op1->type;
7276 op1->type->refCount++;
7281 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7283 long long value2 = op2->__anon1.i64;
7286 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
7289 exp->expType = op1->type;
7291 op1->type->refCount++;
7296 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7298 uint64 value2 = op2->__anon1.ui64;
7301 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
7304 exp->expType = op1->type;
7306 op1->type->refCount++;
7311 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7313 short value2 = op2->__anon1.s;
7316 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
7319 exp->expType = op1->type;
7321 op1->type->refCount++;
7326 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7328 unsigned short value2 = op2->__anon1.us;
7331 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
7334 exp->expType = op1->type;
7336 op1->type->refCount++;
7341 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7343 char value2 = op2->__anon1.c;
7346 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
7349 exp->expType = op1->type;
7351 op1->type->refCount++;
7356 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7358 unsigned char value2 = op2->__anon1.uc;
7361 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
7364 exp->expType = op1->type;
7366 op1->type->refCount++;
7371 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7373 float value2 = op2->__anon1.f;
7376 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
7379 exp->expType = op1->type;
7381 op1->type->refCount++;
7386 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7388 double value2 = op2->__anon1.d;
7391 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
7394 exp->expType = op1->type;
7396 op1->type->refCount++;
7401 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7403 int value2 = op2->__anon1.i;
7406 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
7409 exp->expType = op1->type;
7411 op1->type->refCount++;
7416 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7418 unsigned int value2 = op2->__anon1.ui;
7421 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
7424 exp->expType = op1->type;
7426 op1->type->refCount++;
7431 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7433 long long value2 = op2->__anon1.i64;
7436 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
7439 exp->expType = op1->type;
7441 op1->type->refCount++;
7446 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7448 uint64 value2 = op2->__anon1.ui64;
7451 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
7454 exp->expType = op1->type;
7456 op1->type->refCount++;
7461 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7463 short value2 = op2->__anon1.s;
7466 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
7469 exp->expType = op1->type;
7471 op1->type->refCount++;
7476 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7478 unsigned short value2 = op2->__anon1.us;
7481 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
7484 exp->expType = op1->type;
7486 op1->type->refCount++;
7491 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7493 char value2 = op2->__anon1.c;
7496 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
7499 exp->expType = op1->type;
7501 op1->type->refCount++;
7506 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7508 unsigned char value2 = op2->__anon1.uc;
7511 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
7514 exp->expType = op1->type;
7516 op1->type->refCount++;
7521 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7523 float value2 = op2->__anon1.f;
7526 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
7529 exp->expType = op1->type;
7531 op1->type->refCount++;
7536 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7538 double value2 = op2->__anon1.d;
7541 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
7544 exp->expType = op1->type;
7546 op1->type->refCount++;
7551 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7553 int value2 = op2->__anon1.i;
7556 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
7559 exp->expType = op1->type;
7561 op1->type->refCount++;
7566 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7568 unsigned int value2 = op2->__anon1.ui;
7571 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
7574 exp->expType = op1->type;
7576 op1->type->refCount++;
7581 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7583 long long value2 = op2->__anon1.i64;
7586 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
7589 exp->expType = op1->type;
7591 op1->type->refCount++;
7596 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7598 uint64 value2 = op2->__anon1.ui64;
7601 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
7604 exp->expType = op1->type;
7606 op1->type->refCount++;
7611 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7613 short value2 = op2->__anon1.s;
7616 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
7619 exp->expType = op1->type;
7621 op1->type->refCount++;
7626 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7628 unsigned short value2 = op2->__anon1.us;
7631 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
7634 exp->expType = op1->type;
7636 op1->type->refCount++;
7641 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7643 char value2 = op2->__anon1.c;
7646 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
7649 exp->expType = op1->type;
7651 op1->type->refCount++;
7656 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7658 unsigned char value2 = op2->__anon1.uc;
7661 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
7664 exp->expType = op1->type;
7666 op1->type->refCount++;
7671 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7673 float value2 = op2->__anon1.f;
7676 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
7679 exp->expType = op1->type;
7681 op1->type->refCount++;
7686 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7688 double value2 = op2->__anon1.d;
7691 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
7694 exp->expType = op1->type;
7696 op1->type->refCount++;
7701 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7703 int value2 = op2->__anon1.i;
7706 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
7709 exp->expType = op1->type;
7711 op1->type->refCount++;
7716 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7718 unsigned int value2 = op2->__anon1.ui;
7721 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
7724 exp->expType = op1->type;
7726 op1->type->refCount++;
7731 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7733 long long value2 = op2->__anon1.i64;
7736 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
7739 exp->expType = op1->type;
7741 op1->type->refCount++;
7746 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7748 uint64 value2 = op2->__anon1.ui64;
7751 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
7754 exp->expType = op1->type;
7756 op1->type->refCount++;
7761 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7763 short value2 = op2->__anon1.s;
7766 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
7769 exp->expType = op1->type;
7771 op1->type->refCount++;
7776 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7778 unsigned short value2 = op2->__anon1.us;
7781 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
7784 exp->expType = op1->type;
7786 op1->type->refCount++;
7791 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7793 char value2 = op2->__anon1.c;
7796 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
7799 exp->expType = op1->type;
7801 op1->type->refCount++;
7806 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7808 unsigned char value2 = op2->__anon1.uc;
7811 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
7814 exp->expType = op1->type;
7816 op1->type->refCount++;
7821 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7823 float value2 = op2->__anon1.f;
7826 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
7829 exp->expType = op1->type;
7831 op1->type->refCount++;
7836 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7838 double value2 = op2->__anon1.d;
7841 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
7844 exp->expType = op1->type;
7846 op1->type->refCount++;
7851 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7853 int value2 = op2->__anon1.i;
7856 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
7859 exp->expType = op1->type;
7861 op1->type->refCount++;
7866 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7868 unsigned int value2 = op2->__anon1.ui;
7871 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
7874 exp->expType = op1->type;
7876 op1->type->refCount++;
7881 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7883 long long value2 = op2->__anon1.i64;
7886 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
7889 exp->expType = op1->type;
7891 op1->type->refCount++;
7896 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7898 uint64 value2 = op2->__anon1.ui64;
7901 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
7904 exp->expType = op1->type;
7906 op1->type->refCount++;
7911 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7913 short value2 = op2->__anon1.s;
7916 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
7919 exp->expType = op1->type;
7921 op1->type->refCount++;
7926 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7928 unsigned short value2 = op2->__anon1.us;
7931 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
7934 exp->expType = op1->type;
7936 op1->type->refCount++;
7941 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7943 char value2 = op2->__anon1.c;
7946 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
7949 exp->expType = op1->type;
7951 op1->type->refCount++;
7956 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7958 unsigned char value2 = op2->__anon1.uc;
7961 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
7964 exp->expType = op1->type;
7966 op1->type->refCount++;
7971 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7973 int value2 = op2->__anon1.i;
7976 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
7979 exp->expType = op1->type;
7981 op1->type->refCount++;
7986 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7988 unsigned int value2 = op2->__anon1.ui;
7991 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
7994 exp->expType = op1->type;
7996 op1->type->refCount++;
8001 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8003 long long value2 = op2->__anon1.i64;
8006 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
8009 exp->expType = op1->type;
8011 op1->type->refCount++;
8016 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8018 uint64 value2 = op2->__anon1.ui64;
8021 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
8024 exp->expType = op1->type;
8026 op1->type->refCount++;
8031 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8033 short value2 = op2->__anon1.s;
8036 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
8039 exp->expType = op1->type;
8041 op1->type->refCount++;
8046 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8048 unsigned short value2 = op2->__anon1.us;
8051 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
8054 exp->expType = op1->type;
8056 op1->type->refCount++;
8061 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8063 char value2 = op2->__anon1.c;
8066 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
8069 exp->expType = op1->type;
8071 op1->type->refCount++;
8076 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8078 unsigned char value2 = op2->__anon1.uc;
8081 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
8084 exp->expType = op1->type;
8086 op1->type->refCount++;
8091 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8093 int value2 = op2->__anon1.i;
8096 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
8099 exp->expType = op1->type;
8101 op1->type->refCount++;
8106 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8108 unsigned int value2 = op2->__anon1.ui;
8111 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
8114 exp->expType = op1->type;
8116 op1->type->refCount++;
8121 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8123 long long value2 = op2->__anon1.i64;
8126 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
8129 exp->expType = op1->type;
8131 op1->type->refCount++;
8136 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8138 uint64 value2 = op2->__anon1.ui64;
8141 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
8144 exp->expType = op1->type;
8146 op1->type->refCount++;
8151 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8153 short value2 = op2->__anon1.s;
8156 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
8159 exp->expType = op1->type;
8161 op1->type->refCount++;
8166 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8168 unsigned short value2 = op2->__anon1.us;
8171 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
8174 exp->expType = op1->type;
8176 op1->type->refCount++;
8181 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8183 char value2 = op2->__anon1.c;
8186 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
8189 exp->expType = op1->type;
8191 op1->type->refCount++;
8196 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8198 unsigned char value2 = op2->__anon1.uc;
8201 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
8204 exp->expType = op1->type;
8206 op1->type->refCount++;
8211 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8213 int value2 = op2->__anon1.i;
8216 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
8219 exp->expType = op1->type;
8221 op1->type->refCount++;
8226 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8228 unsigned int value2 = op2->__anon1.ui;
8231 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
8234 exp->expType = op1->type;
8236 op1->type->refCount++;
8241 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8243 long long value2 = op2->__anon1.i64;
8246 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
8249 exp->expType = op1->type;
8251 op1->type->refCount++;
8256 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8258 uint64 value2 = op2->__anon1.ui64;
8261 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
8264 exp->expType = op1->type;
8266 op1->type->refCount++;
8271 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8273 short value2 = op2->__anon1.s;
8276 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
8279 exp->expType = op1->type;
8281 op1->type->refCount++;
8286 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8288 unsigned short value2 = op2->__anon1.us;
8291 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
8294 exp->expType = op1->type;
8296 op1->type->refCount++;
8301 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8303 char value2 = op2->__anon1.c;
8306 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
8309 exp->expType = op1->type;
8311 op1->type->refCount++;
8316 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8318 unsigned char value2 = op2->__anon1.uc;
8321 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
8324 exp->expType = op1->type;
8326 op1->type->refCount++;
8331 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8333 int value2 = op2->__anon1.i;
8336 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
8339 exp->expType = op1->type;
8341 op1->type->refCount++;
8346 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8348 unsigned int value2 = op2->__anon1.ui;
8351 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
8354 exp->expType = op1->type;
8356 op1->type->refCount++;
8361 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8363 long long value2 = op2->__anon1.i64;
8366 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
8369 exp->expType = op1->type;
8371 op1->type->refCount++;
8376 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8378 uint64 value2 = op2->__anon1.ui64;
8381 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
8384 exp->expType = op1->type;
8386 op1->type->refCount++;
8391 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8393 short value2 = op2->__anon1.s;
8396 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
8399 exp->expType = op1->type;
8401 op1->type->refCount++;
8406 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8408 unsigned short value2 = op2->__anon1.us;
8411 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
8414 exp->expType = op1->type;
8416 op1->type->refCount++;
8421 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8423 char value2 = op2->__anon1.c;
8426 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
8429 exp->expType = op1->type;
8431 op1->type->refCount++;
8436 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8438 unsigned char value2 = op2->__anon1.uc;
8441 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
8444 exp->expType = op1->type;
8446 op1->type->refCount++;
8451 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8453 int value2 = op2->__anon1.i;
8456 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
8459 exp->expType = op1->type;
8461 op1->type->refCount++;
8466 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8468 unsigned int value2 = op2->__anon1.ui;
8471 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
8474 exp->expType = op1->type;
8476 op1->type->refCount++;
8481 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8483 long long value2 = op2->__anon1.i64;
8486 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
8489 exp->expType = op1->type;
8491 op1->type->refCount++;
8496 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8498 uint64 value2 = op2->__anon1.ui64;
8501 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
8504 exp->expType = op1->type;
8506 op1->type->refCount++;
8511 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8513 short value2 = op2->__anon1.s;
8516 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
8519 exp->expType = op1->type;
8521 op1->type->refCount++;
8526 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8528 unsigned short value2 = op2->__anon1.us;
8531 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
8534 exp->expType = op1->type;
8536 op1->type->refCount++;
8541 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8543 char value2 = op2->__anon1.c;
8546 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
8549 exp->expType = op1->type;
8551 op1->type->refCount++;
8556 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8558 unsigned char value2 = op2->__anon1.uc;
8561 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
8564 exp->expType = op1->type;
8566 op1->type->refCount++;
8571 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
8574 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
8577 exp->expType = op1->type;
8579 op1->type->refCount++;
8584 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
8587 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
8590 exp->expType = op1->type;
8592 op1->type->refCount++;
8597 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
8600 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
8603 exp->expType = op1->type;
8605 op1->type->refCount++;
8610 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
8613 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
8616 exp->expType = op1->type;
8618 op1->type->refCount++;
8623 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
8626 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
8629 exp->expType = op1->type;
8631 op1->type->refCount++;
8636 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
8639 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
8642 exp->expType = op1->type;
8644 op1->type->refCount++;
8649 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
8652 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
8655 exp->expType = op1->type;
8657 op1->type->refCount++;
8662 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
8665 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
8668 exp->expType = op1->type;
8670 op1->type->refCount++;
8675 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8677 int value2 = op2->__anon1.i;
8680 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
8683 exp->expType = op1->type;
8685 op1->type->refCount++;
8690 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8692 unsigned int value2 = op2->__anon1.ui;
8695 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
8698 exp->expType = op1->type;
8700 op1->type->refCount++;
8705 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8707 long long value2 = op2->__anon1.i64;
8710 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
8713 exp->expType = op1->type;
8715 op1->type->refCount++;
8720 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8722 uint64 value2 = op2->__anon1.ui64;
8725 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
8728 exp->expType = op1->type;
8730 op1->type->refCount++;
8735 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8737 short value2 = op2->__anon1.s;
8740 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
8743 exp->expType = op1->type;
8745 op1->type->refCount++;
8750 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8752 unsigned short value2 = op2->__anon1.us;
8755 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
8758 exp->expType = op1->type;
8760 op1->type->refCount++;
8765 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8767 char value2 = op2->__anon1.c;
8770 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
8773 exp->expType = op1->type;
8775 op1->type->refCount++;
8780 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8782 unsigned char value2 = op2->__anon1.uc;
8785 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
8788 exp->expType = op1->type;
8790 op1->type->refCount++;
8795 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8797 int value2 = op2->__anon1.i;
8800 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
8803 exp->expType = op1->type;
8805 op1->type->refCount++;
8810 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8812 unsigned int value2 = op2->__anon1.ui;
8815 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
8818 exp->expType = op1->type;
8820 op1->type->refCount++;
8825 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8827 long long value2 = op2->__anon1.i64;
8830 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
8833 exp->expType = op1->type;
8835 op1->type->refCount++;
8840 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8842 uint64 value2 = op2->__anon1.ui64;
8845 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
8848 exp->expType = op1->type;
8850 op1->type->refCount++;
8855 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8857 short value2 = op2->__anon1.s;
8860 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
8863 exp->expType = op1->type;
8865 op1->type->refCount++;
8870 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8872 unsigned short value2 = op2->__anon1.us;
8875 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
8878 exp->expType = op1->type;
8880 op1->type->refCount++;
8885 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8887 char value2 = op2->__anon1.c;
8890 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
8893 exp->expType = op1->type;
8895 op1->type->refCount++;
8900 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8902 unsigned char value2 = op2->__anon1.uc;
8905 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
8908 exp->expType = op1->type;
8910 op1->type->refCount++;
8915 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8917 int value2 = op2->__anon1.i;
8920 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
8923 exp->expType = op1->type;
8925 op1->type->refCount++;
8930 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8932 unsigned int value2 = op2->__anon1.ui;
8935 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
8938 exp->expType = op1->type;
8940 op1->type->refCount++;
8945 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8947 long long value2 = op2->__anon1.i64;
8950 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
8953 exp->expType = op1->type;
8955 op1->type->refCount++;
8960 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8962 uint64 value2 = op2->__anon1.ui64;
8965 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
8968 exp->expType = op1->type;
8970 op1->type->refCount++;
8975 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8977 short value2 = op2->__anon1.s;
8980 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
8983 exp->expType = op1->type;
8985 op1->type->refCount++;
8990 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8992 unsigned short value2 = op2->__anon1.us;
8995 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
8998 exp->expType = op1->type;
9000 op1->type->refCount++;
9005 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9007 char value2 = op2->__anon1.c;
9010 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
9013 exp->expType = op1->type;
9015 op1->type->refCount++;
9020 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9022 unsigned char value2 = op2->__anon1.uc;
9025 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
9028 exp->expType = op1->type;
9030 op1->type->refCount++;
9035 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9037 int value2 = op2->__anon1.i;
9040 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
9043 exp->expType = op1->type;
9045 op1->type->refCount++;
9050 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9052 unsigned int value2 = op2->__anon1.ui;
9055 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
9058 exp->expType = op1->type;
9060 op1->type->refCount++;
9065 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9067 long long value2 = op2->__anon1.i64;
9070 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
9073 exp->expType = op1->type;
9075 op1->type->refCount++;
9080 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9082 uint64 value2 = op2->__anon1.ui64;
9085 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
9088 exp->expType = op1->type;
9090 op1->type->refCount++;
9095 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9097 short value2 = op2->__anon1.s;
9100 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
9103 exp->expType = op1->type;
9105 op1->type->refCount++;
9110 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9112 unsigned short value2 = op2->__anon1.us;
9115 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
9118 exp->expType = op1->type;
9120 op1->type->refCount++;
9125 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9127 char value2 = op2->__anon1.c;
9130 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
9133 exp->expType = op1->type;
9135 op1->type->refCount++;
9140 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9142 unsigned char value2 = op2->__anon1.uc;
9145 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
9148 exp->expType = op1->type;
9150 op1->type->refCount++;
9155 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9157 int value2 = op2->__anon1.i;
9160 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
9163 exp->expType = op1->type;
9165 op1->type->refCount++;
9170 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9172 unsigned int value2 = op2->__anon1.ui;
9175 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
9178 exp->expType = op1->type;
9180 op1->type->refCount++;
9185 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9187 long long value2 = op2->__anon1.i64;
9190 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
9193 exp->expType = op1->type;
9195 op1->type->refCount++;
9200 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9202 uint64 value2 = op2->__anon1.ui64;
9205 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
9208 exp->expType = op1->type;
9210 op1->type->refCount++;
9215 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9217 short value2 = op2->__anon1.s;
9220 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
9223 exp->expType = op1->type;
9225 op1->type->refCount++;
9230 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9232 unsigned short value2 = op2->__anon1.us;
9235 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
9238 exp->expType = op1->type;
9240 op1->type->refCount++;
9245 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9247 char value2 = op2->__anon1.c;
9250 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
9253 exp->expType = op1->type;
9255 op1->type->refCount++;
9260 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9262 unsigned char value2 = op2->__anon1.uc;
9265 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
9268 exp->expType = op1->type;
9270 op1->type->refCount++;
9275 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
9278 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
9281 exp->expType = op1->type;
9283 op1->type->refCount++;
9288 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
9291 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
9294 exp->expType = op1->type;
9296 op1->type->refCount++;
9301 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
9304 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
9307 exp->expType = op1->type;
9309 op1->type->refCount++;
9314 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
9317 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
9320 exp->expType = op1->type;
9322 op1->type->refCount++;
9327 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
9330 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
9333 exp->expType = op1->type;
9335 op1->type->refCount++;
9340 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
9343 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
9346 exp->expType = op1->type;
9348 op1->type->refCount++;
9353 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
9356 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
9359 exp->expType = op1->type;
9361 op1->type->refCount++;
9366 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
9369 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
9372 exp->expType = op1->type;
9374 op1->type->refCount++;
9379 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9381 int value2 = op2->__anon1.i;
9384 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
9387 exp->expType = op1->type;
9389 op1->type->refCount++;
9394 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9396 unsigned int value2 = op2->__anon1.ui;
9399 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
9402 exp->expType = op1->type;
9404 op1->type->refCount++;
9409 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9411 long long value2 = op2->__anon1.i64;
9414 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
9417 exp->expType = op1->type;
9419 op1->type->refCount++;
9424 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9426 uint64 value2 = op2->__anon1.ui64;
9429 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
9432 exp->expType = op1->type;
9434 op1->type->refCount++;
9439 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9441 short value2 = op2->__anon1.s;
9444 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
9447 exp->expType = op1->type;
9449 op1->type->refCount++;
9454 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9456 unsigned short value2 = op2->__anon1.us;
9459 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
9462 exp->expType = op1->type;
9464 op1->type->refCount++;
9469 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9471 char value2 = op2->__anon1.c;
9474 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
9477 exp->expType = op1->type;
9479 op1->type->refCount++;
9484 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9486 unsigned char value2 = op2->__anon1.uc;
9489 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
9492 exp->expType = op1->type;
9494 op1->type->refCount++;
9499 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9501 float value2 = op2->__anon1.f;
9504 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
9507 exp->expType = op1->type;
9509 op1->type->refCount++;
9514 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9516 double value2 = op2->__anon1.d;
9519 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
9522 exp->expType = op1->type;
9524 op1->type->refCount++;
9529 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9531 int value2 = op2->__anon1.i;
9534 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
9537 exp->expType = op1->type;
9539 op1->type->refCount++;
9544 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9546 unsigned int value2 = op2->__anon1.ui;
9549 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
9552 exp->expType = op1->type;
9554 op1->type->refCount++;
9559 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9561 long long value2 = op2->__anon1.i64;
9564 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
9567 exp->expType = op1->type;
9569 op1->type->refCount++;
9574 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9576 uint64 value2 = op2->__anon1.ui64;
9579 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
9582 exp->expType = op1->type;
9584 op1->type->refCount++;
9589 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9591 short value2 = op2->__anon1.s;
9594 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
9597 exp->expType = op1->type;
9599 op1->type->refCount++;
9604 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9606 unsigned short value2 = op2->__anon1.us;
9609 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
9612 exp->expType = op1->type;
9614 op1->type->refCount++;
9619 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9621 char value2 = op2->__anon1.c;
9624 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
9627 exp->expType = op1->type;
9629 op1->type->refCount++;
9634 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9636 unsigned char value2 = op2->__anon1.uc;
9639 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
9642 exp->expType = op1->type;
9644 op1->type->refCount++;
9649 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9651 float value2 = op2->__anon1.f;
9654 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
9657 exp->expType = op1->type;
9659 op1->type->refCount++;
9664 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9666 double value2 = op2->__anon1.d;
9669 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
9672 exp->expType = op1->type;
9674 op1->type->refCount++;
9679 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9681 int value2 = op2->__anon1.i;
9684 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
9687 exp->expType = op1->type;
9689 op1->type->refCount++;
9694 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9696 unsigned int value2 = op2->__anon1.ui;
9699 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
9702 exp->expType = op1->type;
9704 op1->type->refCount++;
9709 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9711 long long value2 = op2->__anon1.i64;
9714 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
9717 exp->expType = op1->type;
9719 op1->type->refCount++;
9724 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9726 uint64 value2 = op2->__anon1.ui64;
9729 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
9732 exp->expType = op1->type;
9734 op1->type->refCount++;
9739 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9741 short value2 = op2->__anon1.s;
9744 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
9747 exp->expType = op1->type;
9749 op1->type->refCount++;
9754 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9756 unsigned short value2 = op2->__anon1.us;
9759 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
9762 exp->expType = op1->type;
9764 op1->type->refCount++;
9769 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9771 char value2 = op2->__anon1.c;
9774 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
9777 exp->expType = op1->type;
9779 op1->type->refCount++;
9784 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9786 unsigned char value2 = op2->__anon1.uc;
9789 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
9792 exp->expType = op1->type;
9794 op1->type->refCount++;
9799 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9801 float value2 = op2->__anon1.f;
9804 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
9807 exp->expType = op1->type;
9809 op1->type->refCount++;
9814 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9816 double value2 = op2->__anon1.d;
9819 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
9822 exp->expType = op1->type;
9824 op1->type->refCount++;
9829 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9831 int value2 = op2->__anon1.i;
9834 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
9837 exp->expType = op1->type;
9839 op1->type->refCount++;
9844 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9846 unsigned int value2 = op2->__anon1.ui;
9849 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
9852 exp->expType = op1->type;
9854 op1->type->refCount++;
9859 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9861 long long value2 = op2->__anon1.i64;
9864 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
9867 exp->expType = op1->type;
9869 op1->type->refCount++;
9874 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9876 uint64 value2 = op2->__anon1.ui64;
9879 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
9882 exp->expType = op1->type;
9884 op1->type->refCount++;
9889 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9891 short value2 = op2->__anon1.s;
9894 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
9897 exp->expType = op1->type;
9899 op1->type->refCount++;
9904 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9906 unsigned short value2 = op2->__anon1.us;
9909 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
9912 exp->expType = op1->type;
9914 op1->type->refCount++;
9919 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9921 char value2 = op2->__anon1.c;
9924 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
9927 exp->expType = op1->type;
9929 op1->type->refCount++;
9934 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9936 unsigned char value2 = op2->__anon1.uc;
9939 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
9942 exp->expType = op1->type;
9944 op1->type->refCount++;
9949 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9951 float value2 = op2->__anon1.f;
9954 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
9957 exp->expType = op1->type;
9959 op1->type->refCount++;
9964 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9966 double value2 = op2->__anon1.d;
9969 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
9972 exp->expType = op1->type;
9974 op1->type->refCount++;
9979 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9981 int value2 = op2->__anon1.i;
9984 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
9987 exp->expType = op1->type;
9989 op1->type->refCount++;
9994 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9996 unsigned int value2 = op2->__anon1.ui;
9999 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
10002 exp->expType = op1->type;
10004 op1->type->refCount++;
10009 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10011 long long value2 = op2->__anon1.i64;
10014 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
10017 exp->expType = op1->type;
10019 op1->type->refCount++;
10024 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10026 uint64 value2 = op2->__anon1.ui64;
10029 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
10032 exp->expType = op1->type;
10034 op1->type->refCount++;
10039 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10041 short value2 = op2->__anon1.s;
10044 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
10047 exp->expType = op1->type;
10049 op1->type->refCount++;
10054 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10056 unsigned short value2 = op2->__anon1.us;
10059 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
10062 exp->expType = op1->type;
10064 op1->type->refCount++;
10069 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10071 char value2 = op2->__anon1.c;
10074 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
10077 exp->expType = op1->type;
10079 op1->type->refCount++;
10084 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10086 unsigned char value2 = op2->__anon1.uc;
10089 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
10092 exp->expType = op1->type;
10094 op1->type->refCount++;
10099 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10101 float value2 = op2->__anon1.f;
10104 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
10107 exp->expType = op1->type;
10109 op1->type->refCount++;
10114 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10116 double value2 = op2->__anon1.d;
10119 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
10122 exp->expType = op1->type;
10124 op1->type->refCount++;
10129 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10131 int value2 = op2->__anon1.i;
10134 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
10137 exp->expType = op1->type;
10139 op1->type->refCount++;
10144 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10146 unsigned int value2 = op2->__anon1.ui;
10149 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
10152 exp->expType = op1->type;
10154 op1->type->refCount++;
10159 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10161 long long value2 = op2->__anon1.i64;
10164 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
10167 exp->expType = op1->type;
10169 op1->type->refCount++;
10174 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10176 uint64 value2 = op2->__anon1.ui64;
10179 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
10182 exp->expType = op1->type;
10184 op1->type->refCount++;
10189 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10191 short value2 = op2->__anon1.s;
10194 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
10197 exp->expType = op1->type;
10199 op1->type->refCount++;
10204 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10206 unsigned short value2 = op2->__anon1.us;
10209 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
10212 exp->expType = op1->type;
10214 op1->type->refCount++;
10219 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10221 char value2 = op2->__anon1.c;
10224 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
10227 exp->expType = op1->type;
10229 op1->type->refCount++;
10234 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10236 unsigned char value2 = op2->__anon1.uc;
10239 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
10242 exp->expType = op1->type;
10244 op1->type->refCount++;
10249 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10251 float value2 = op2->__anon1.f;
10254 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
10257 exp->expType = op1->type;
10259 op1->type->refCount++;
10264 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10266 double value2 = op2->__anon1.d;
10269 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
10272 exp->expType = op1->type;
10274 op1->type->refCount++;
10279 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10281 int value2 = op2->__anon1.i;
10284 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
10287 exp->expType = op1->type;
10289 op1->type->refCount++;
10294 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10296 unsigned int value2 = op2->__anon1.ui;
10299 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
10302 exp->expType = op1->type;
10304 op1->type->refCount++;
10309 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10311 long long value2 = op2->__anon1.i64;
10314 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
10317 exp->expType = op1->type;
10319 op1->type->refCount++;
10324 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10326 uint64 value2 = op2->__anon1.ui64;
10329 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
10332 exp->expType = op1->type;
10334 op1->type->refCount++;
10339 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10341 short value2 = op2->__anon1.s;
10344 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
10347 exp->expType = op1->type;
10349 op1->type->refCount++;
10354 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10356 unsigned short value2 = op2->__anon1.us;
10359 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
10362 exp->expType = op1->type;
10364 op1->type->refCount++;
10369 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10371 char value2 = op2->__anon1.c;
10374 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
10377 exp->expType = op1->type;
10379 op1->type->refCount++;
10384 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10386 unsigned char value2 = op2->__anon1.uc;
10389 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
10392 exp->expType = op1->type;
10394 op1->type->refCount++;
10399 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10401 float value2 = op2->__anon1.f;
10404 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
10407 exp->expType = op1->type;
10409 op1->type->refCount++;
10414 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10416 double value2 = op2->__anon1.d;
10419 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
10422 exp->expType = op1->type;
10424 op1->type->refCount++;
10429 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10431 int value2 = op2->__anon1.i;
10434 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
10437 exp->expType = op1->type;
10439 op1->type->refCount++;
10444 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10446 unsigned int value2 = op2->__anon1.ui;
10449 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
10452 exp->expType = op1->type;
10454 op1->type->refCount++;
10459 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10461 long long value2 = op2->__anon1.i64;
10464 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
10467 exp->expType = op1->type;
10469 op1->type->refCount++;
10474 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10476 uint64 value2 = op2->__anon1.ui64;
10479 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
10482 exp->expType = op1->type;
10484 op1->type->refCount++;
10489 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10491 short value2 = op2->__anon1.s;
10494 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
10497 exp->expType = op1->type;
10499 op1->type->refCount++;
10504 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10506 unsigned short value2 = op2->__anon1.us;
10509 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
10512 exp->expType = op1->type;
10514 op1->type->refCount++;
10519 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10521 char value2 = op2->__anon1.c;
10524 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
10527 exp->expType = op1->type;
10529 op1->type->refCount++;
10534 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10536 unsigned char value2 = op2->__anon1.uc;
10539 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
10542 exp->expType = op1->type;
10544 op1->type->refCount++;
10549 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10551 float value2 = op2->__anon1.f;
10554 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
10557 exp->expType = op1->type;
10559 op1->type->refCount++;
10564 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10566 double value2 = op2->__anon1.d;
10569 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
10572 exp->expType = op1->type;
10574 op1->type->refCount++;
10579 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10582 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
10585 exp->expType = op1->type;
10587 op1->type->refCount++;
10592 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10595 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
10598 exp->expType = op1->type;
10600 op1->type->refCount++;
10605 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10608 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
10611 exp->expType = op1->type;
10613 op1->type->refCount++;
10618 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10621 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
10624 exp->expType = op1->type;
10626 op1->type->refCount++;
10631 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10634 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
10637 exp->expType = op1->type;
10639 op1->type->refCount++;
10644 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10647 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
10650 exp->expType = op1->type;
10652 op1->type->refCount++;
10657 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10660 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
10663 exp->expType = op1->type;
10665 op1->type->refCount++;
10670 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10673 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
10676 exp->expType = op1->type;
10678 op1->type->refCount++;
10683 struct OpTable intOps =
10685 IntAdd, IntSub, IntMul, IntDiv, IntMod, IntNeg, IntInc, IntDec, IntAsign, IntAddAsign, IntSubAsign, IntMulAsign, IntDivAsign, IntModAsign, IntBitAnd, IntBitOr, IntBitXor, IntLShift, IntRShift, IntBitNot, IntAndAsign, IntOrAsign, IntXorAsign, IntLShiftAsign, IntRShiftAsign, IntNot, IntEqu, IntNqu, IntAnd, IntOr, IntGrt, IntSma, IntGrtEqu, IntSmaEqu, IntCond
10688 struct OpTable uintOps =
10690 UIntAdd, UIntSub, UIntMul, UIntDiv, UIntMod, UIntNeg, UIntInc, UIntDec, UIntAsign, UIntAddAsign, UIntSubAsign, UIntMulAsign, UIntDivAsign, UIntModAsign, UIntBitAnd, UIntBitOr, UIntBitXor, UIntLShift, UIntRShift, UIntBitNot, UIntAndAsign, UIntOrAsign, UIntXorAsign, UIntLShiftAsign, UIntRShiftAsign, UIntNot, UIntEqu, UIntNqu, UIntAnd, UIntOr, UIntGrt, UIntSma, UIntGrtEqu, UIntSmaEqu, UIntCond
10693 struct OpTable int64Ops =
10695 Int64Add, Int64Sub, Int64Mul, Int64Div, Int64Mod, Int64Neg, Int64Inc, Int64Dec, Int64Asign, Int64AddAsign, Int64SubAsign, Int64MulAsign, Int64DivAsign, Int64ModAsign, Int64BitAnd, Int64BitOr, Int64BitXor, Int64LShift, Int64RShift, Int64BitNot, Int64AndAsign, Int64OrAsign, Int64XorAsign, Int64LShiftAsign, Int64RShiftAsign, Int64Not, Int64Equ, Int64Nqu, Int64And, Int64Or, Int64Grt, Int64Sma, Int64GrtEqu, Int64SmaEqu, Int64Cond
10698 struct OpTable uint64Ops =
10700 UInt64Add, UInt64Sub, UInt64Mul, UInt64Div, UInt64Mod, UInt64Neg, UInt64Inc, UInt64Dec, UInt64Asign, UInt64AddAsign, UInt64SubAsign, UInt64MulAsign, UInt64DivAsign, UInt64ModAsign, UInt64BitAnd, UInt64BitOr, UInt64BitXor, UInt64LShift, UInt64RShift, UInt64BitNot, UInt64AndAsign, UInt64OrAsign, UInt64XorAsign, UInt64LShiftAsign, UInt64RShiftAsign, UInt64Not, UInt64Equ, UInt64Nqu, UInt64And, UInt64Or, UInt64Grt, UInt64Sma, UInt64GrtEqu, UInt64SmaEqu, UInt64Cond
10703 struct OpTable shortOps =
10705 ShortAdd, ShortSub, ShortMul, ShortDiv, ShortMod, ShortNeg, ShortInc, ShortDec, ShortAsign, ShortAddAsign, ShortSubAsign, ShortMulAsign, ShortDivAsign, ShortModAsign, ShortBitAnd, ShortBitOr, ShortBitXor, ShortLShift, ShortRShift, ShortBitNot, ShortAndAsign, ShortOrAsign, ShortXorAsign, ShortLShiftAsign, ShortRShiftAsign, ShortNot, ShortEqu, ShortNqu, ShortAnd, ShortOr, ShortGrt, ShortSma, ShortGrtEqu, ShortSmaEqu, ShortCond
10708 struct OpTable ushortOps =
10710 UShortAdd, UShortSub, UShortMul, UShortDiv, UShortMod, UShortNeg, UShortInc, UShortDec, UShortAsign, UShortAddAsign, UShortSubAsign, UShortMulAsign, UShortDivAsign, UShortModAsign, UShortBitAnd, UShortBitOr, UShortBitXor, UShortLShift, UShortRShift, UShortBitNot, UShortAndAsign, UShortOrAsign, UShortXorAsign, UShortLShiftAsign, UShortRShiftAsign, UShortNot, UShortEqu, UShortNqu, UShortAnd, UShortOr, UShortGrt, UShortSma, UShortGrtEqu, UShortSmaEqu, UShortCond
10713 struct OpTable floatOps =
10715 FloatAdd, FloatSub, FloatMul, FloatDiv, (((void *)0)), FloatNeg, FloatInc, FloatDec, FloatAsign, FloatAddAsign, FloatSubAsign, FloatMulAsign, 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)), FloatEqu, FloatNqu, FloatAnd, FloatOr, FloatGrt, FloatSma, FloatGrtEqu, FloatSmaEqu
10718 struct OpTable doubleOps =
10720 DoubleAdd, DoubleSub, DoubleMul, DoubleDiv, (((void *)0)), DoubleNeg, DoubleInc, DoubleDec, DoubleAsign, DoubleAddAsign, DoubleSubAsign, DoubleMulAsign, 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)), DoubleEqu, DoubleNqu, DoubleAnd, DoubleOr, DoubleGrt, DoubleSma, DoubleGrtEqu, DoubleSmaEqu
10723 struct OpTable charOps =
10725 CharAdd, CharSub, CharMul, CharDiv, CharMod, CharNeg, CharInc, CharDec, CharAsign, CharAddAsign, CharSubAsign, CharMulAsign, CharDivAsign, CharModAsign, CharBitAnd, CharBitOr, CharBitXor, CharLShift, CharRShift, CharBitNot, CharAndAsign, CharOrAsign, CharXorAsign, CharLShiftAsign, CharRShiftAsign, CharNot, CharEqu, CharNqu, CharAnd, CharOr, CharGrt, CharSma, CharGrtEqu, CharSmaEqu, CharCond
10728 struct OpTable ucharOps =
10730 UCharAdd, UCharSub, UCharMul, UCharDiv, UCharMod, UCharNeg, UCharInc, UCharDec, UCharAsign, UCharAddAsign, UCharSubAsign, UCharMulAsign, UCharDivAsign, UCharModAsign, UCharBitAnd, UCharBitOr, UCharBitXor, UCharLShift, UCharRShift, UCharBitNot, UCharAndAsign, UCharOrAsign, UCharXorAsign, UCharLShiftAsign, UCharRShiftAsign, UCharNot, UCharEqu, UCharNqu, UCharAnd, UCharOr, UCharGrt, UCharSma, UCharGrtEqu, UCharSmaEqu, UCharCond
10733 void ReadString(char * output, char * string)
10735 int len = strlen(string);
10737 unsigned int quoted = 0x0, escaped = 0x0;
10739 for(c = 0; c < len; c++)
10741 char ch = string[c];
10799 int UnescapeString(char * d, char * s, int len)
10804 while(j < len && (ch = s[j]))
10809 switch((ch = s[++j]))
10855 char * OffsetEscapedString(char * s, int len, int offset)
10860 while(j < len && k < offset && (ch = s[j]))
10866 return (k == offset) ? s + j : (((void *)0));
10869 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
10871 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
10873 extern double strtod(const char * , char * * );
10875 extern float (* __ecereMethod_float_inf)(void);
10877 extern float (* __ecereMethod_float_nan)(void);
10879 extern double (* __ecereMethod_double_inf)(void);
10881 extern double (* __ecereMethod_double_nan)(void);
10883 struct Operand GetOperand(struct Expression * exp)
10885 struct Operand op =
10892 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
10895 struct Type * type = exp->expType;
10899 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))
10901 if(!type->__anon1._class->__anon1.registered->dataType)
10902 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
10903 type = type->__anon1._class->__anon1.registered->dataType;
10905 if(exp->type == 3 && op.kind == 13)
10907 op.__anon1.ui64 = (uint64)exp->__anon1.__anon2.string;
10909 op.ops = uint64Ops;
10911 else if(exp->isConstant && exp->type == 2)
10913 op.kind = type->kind;
10914 op.type = exp->expType;
10920 if(exp->__anon1.__anon1.constant[0] == '\'')
10922 op.__anon1.c = exp->__anon1.__anon1.constant[1];
10925 else if(type->isSigned)
10927 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10932 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10940 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10945 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10946 op.ops = ushortOps;
10953 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10958 op.__anon1.ui = strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10966 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10971 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10972 op.ops = uint64Ops;
10979 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10984 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10985 op.ops = uint64Ops;
10992 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10997 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10998 op.ops = uint64Ops;
11003 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11004 op.__anon1.f = __ecereMethod_float_inf();
11005 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11006 op.__anon1.f = -__ecereMethod_float_inf();
11007 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11008 op.__anon1.f = __ecereMethod_float_nan();
11009 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11010 op.__anon1.f = -__ecereMethod_float_nan();
11012 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11016 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11017 op.__anon1.d = __ecereMethod_double_inf();
11018 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11019 op.__anon1.d = -__ecereMethod_double_inf();
11020 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11021 op.__anon1.d = __ecereMethod_double_nan();
11022 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11023 op.__anon1.d = -__ecereMethod_double_nan();
11025 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11026 op.ops = doubleOps;
11031 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11033 op.ops = uint64Ops;
11041 int __ecereVMethodID_class_OnGetString;
11043 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
11045 static __attribute__((unused)) void UnusedFunction()
11049 ((const char * (*)(struct __ecereNameSpace__ecere__com__Class *, const void *, char * tempString, void * fieldData, unsigned int * needClass))__ecereClass_int->_vTbl[__ecereVMethodID_class_OnGetString])(__ecereClass_int, &a, 0, 0, 0);
11052 extern int __ecereVMethodID_class_OnGetString;
11054 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
11056 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11058 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
11060 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11061 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
11064 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11065 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11066 struct Type * type;
11067 void * ptr = inst->data + dataMember->offset + offset;
11068 char * result = (((void *)0));
11070 exp->loc = member->loc = inst->loc;
11071 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11072 if(!dataMember->dataType)
11073 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11074 type = dataMember->dataType;
11075 if(type->kind == 8)
11077 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11079 if(_class->type == 4)
11081 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11085 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11086 struct __ecereNameSpace__ecere__sys__NamedLink * item;
11088 for(item = e->values.first; item; item = item->next)
11090 if((int)item->data == *(int *)ptr)
11092 result = item->name;
11098 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11100 exp->destType = MkClassType(_class->fullName);
11101 ProcessExpressionType(exp);
11105 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11107 if(!_class->dataType)
11108 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11109 type = _class->dataType;
11118 FreeExpContents(exp);
11119 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11125 FreeExpContents(exp);
11126 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11132 FreeExpContents(exp);
11133 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11139 FreeExpContents(exp);
11140 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11146 FreeExpContents(exp);
11147 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11153 FreeExpContents(exp);
11154 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11159 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11162 ListAdd(memberList, member);
11164 if(parentDataMember->type == 1)
11169 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
11171 void PopulateInstance(struct Instantiation * inst)
11173 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
11174 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
11175 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11176 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
11179 inst->members = MkListOne(MkMembersInitList(memberList));
11181 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
11182 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
11184 if(!dataMember->isProperty)
11186 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11187 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
11190 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11191 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11192 struct Type * type;
11193 void * ptr = inst->data + dataMember->offset;
11194 char * result = (((void *)0));
11196 exp->loc = member->loc = inst->loc;
11197 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11198 if(!dataMember->dataType)
11199 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11200 type = dataMember->dataType;
11201 if(type->kind == 8)
11203 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11205 if(_class->type == 4)
11207 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11211 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11212 struct __ecereNameSpace__ecere__sys__NamedLink * item;
11214 for(item = e->values.first; item; item = item->next)
11216 if((int)item->data == *(int *)ptr)
11218 result = item->name;
11225 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11227 exp->destType = MkClassType(_class->fullName);
11228 ProcessExpressionType(exp);
11231 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11233 if(!_class->dataType)
11234 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11235 type = _class->dataType;
11244 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11250 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11256 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11262 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11268 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11273 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11276 ListAdd(memberList, member);
11282 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);
11284 extern void FreeInstance(struct Instantiation * inst);
11286 void ComputeInstantiation(struct Expression * exp)
11288 struct Instantiation * inst = exp->__anon1.instance;
11289 struct MembersInit * members;
11290 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11291 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11292 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11293 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11294 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11295 int subMemberStackPos = 0;
11298 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11302 if(_class->type == 0 || _class->type == 5)
11304 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11305 if(_class->type == 0)
11306 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11309 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11313 for(members = (*inst->members).first; members; members = members->next)
11315 switch(members->type)
11319 if(members->__anon1.dataMembers)
11321 struct MemberInit * member;
11323 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11325 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11326 unsigned int found = 0x0;
11327 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11328 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11329 unsigned int dataMemberOffset;
11333 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11336 if(curMember->isProperty)
11337 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11340 dataMember = curMember;
11341 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11342 if(_class->type == 0)
11343 dataMemberOffset += _class->base->structSize;
11350 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11354 if(prop->memberAccess == 1)
11356 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11357 curClass = prop->_class;
11362 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11363 int _subMemberStackPos = 0;
11365 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11369 if(dataMember->memberAccess == 1)
11371 curMember = dataMember;
11372 curClass = dataMember->_class;
11373 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11374 subMemberStackPos = _subMemberStackPos;
11379 if(found && member->initializer && member->initializer->type == 0)
11381 struct Expression * value = member->initializer->__anon1.exp;
11382 struct Type * type = (((void *)0));
11383 unsigned int deepMember = 0x0;
11387 type = prop->dataType;
11389 else if(dataMember)
11391 if(!dataMember->dataType)
11392 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11393 type = dataMember->dataType;
11395 if(ident && ident->next)
11398 for(ident = ident->next; ident && type; ident = ident->next)
11400 if(type->kind == 8)
11402 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11404 type = prop->dataType;
11407 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11409 type = dataMember->dataType;
11412 else if(type->kind == 9 || type->kind == 10)
11414 struct Type * memberType;
11416 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11418 if(!strcmp(memberType->name, ident->string))
11429 FreeType(value->destType);
11430 value->destType = type;
11433 ComputeExpression(value);
11435 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11437 if(type->kind == 8)
11439 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11441 if(_class->type == 2 || _class->type == 3 || _class->type == 4)
11443 if(!_class->dataType)
11444 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11445 type = _class->dataType;
11450 void * ptr = inst->data + dataMemberOffset;
11452 if(value->type == 2)
11458 GetInt(value, (int *)ptr);
11463 GetInt64(value, (long long *)ptr);
11468 GetIntPtr(value, (intptr_t *)ptr);
11473 GetIntSize(value, (ssize_t *)ptr);
11478 GetFloat(value, (float *)ptr);
11483 GetDouble(value, (double *)ptr);
11488 else if(value->type == 1)
11490 if(type->kind == 8)
11492 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11494 if(_class->type == 1)
11496 ComputeTypeSize(type);
11497 if(value->__anon1.instance->data)
11498 memcpy(ptr, value->__anon1.instance->data, type->size);
11505 if(value->type == 1 && value->__anon1.instance->data)
11507 if(type->kind == 8)
11509 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11511 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)))
11513 void (* Set)(void *, void *) = (void *)prop->Set;
11515 Set(inst->data, value->__anon1.instance->data);
11516 PopulateInstance(inst);
11520 else if(value->type == 2)
11526 void (* Set)(void *, double) = (void *)prop->Set;
11528 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11533 void (* Set)(void *, float) = (void *)prop->Set;
11535 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11540 void (* Set)(void *, int) = (void *)prop->Set;
11542 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11547 void (* Set)(void *, long long) = (void *)prop->Set;
11549 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11554 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11556 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11561 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11563 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11568 else if(value->type == 3)
11572 ReadString(temp, value->__anon1.__anon2.string);
11573 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11577 else if(!deepMember && type && _class->type == 3)
11581 if(value->type == 2)
11583 if(type->kind == 8)
11585 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11587 if(_class->type == 3)
11589 if(!_class->dataType)
11590 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11591 type = _class->dataType;
11599 float (* Set)(float) = (void *)prop->Set;
11601 GetFloat(member->initializer->__anon1.exp, &fValue);
11602 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11609 double (* Set)(double) = (void *)prop->Set;
11611 GetDouble(member->initializer->__anon1.exp, &dValue);
11612 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11620 else if(!deepMember && type && _class->type == 2)
11624 if(value->type == 1 && value->__anon1.instance->data)
11626 unsigned int (* Set)(void *) = (void *)prop->Set;
11628 bits = Set(value->__anon1.instance->data);
11630 else if(value->type == 2)
11634 else if(dataMember)
11636 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11637 struct Type * type;
11640 bits = (bits & ~bitMember->mask);
11641 if(!bitMember->dataType)
11642 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0x0);
11643 type = bitMember->dataType;
11644 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11646 if(!type->__anon1._class->__anon1.registered->dataType)
11647 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
11648 type = type->__anon1._class->__anon1.registered->dataType;
11657 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11665 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11674 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11682 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11690 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11698 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11703 bits |= part << bitMember->pos;
11709 if(_class && _class->type == 3)
11711 ComputeExpression(member->initializer->__anon1.exp);
11712 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11714 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11724 if(_class && _class->type == 2)
11726 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11731 FreeInstance(inst);
11735 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
11737 unsigned int result = 0x0;
11742 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
11743 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
11747 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
11748 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11751 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)
11752 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11755 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)
11756 result = GetOpFloat(op, &op->__anon1.f);
11759 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)
11760 result = GetOpDouble(op, &op->__anon1.d);
11763 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)
11764 result = GetOpUInt64(op, &op->__anon1.ui64);
11767 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)
11768 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11771 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11772 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11775 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11776 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11782 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11784 if(exp->__anon1.op.op == SIZEOF)
11786 FreeExpContents(exp);
11788 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11792 if(!exp->__anon1.op.exp1)
11794 switch(exp->__anon1.op.op)
11798 struct Expression * exp2 = exp->__anon1.op.exp2;
11800 exp->__anon1.op.exp2 = (((void *)0));
11801 FreeExpContents(exp);
11802 FreeType(exp->expType);
11803 FreeType(exp->destType);
11805 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11811 FreeExpContents(exp);
11812 op1->ops.Neg(exp, op1);
11816 if(op1->ops.BitNot)
11818 FreeExpContents(exp);
11819 op1->ops.BitNot(exp, op1);
11825 FreeExpContents(exp);
11826 op1->ops.Not(exp, op1);
11833 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11835 if(Promote(op2, op1->kind, op1->type->isSigned))
11836 op2->kind = op1->kind, op2->ops = op1->ops;
11837 else if(Promote(op1, op2->kind, op2->type->isSigned))
11838 op1->kind = op2->kind, op1->ops = op2->ops;
11840 switch(exp->__anon1.op.op)
11845 FreeExpContents(exp);
11846 op1->ops.Add(exp, op1, op2);
11852 FreeExpContents(exp);
11853 op1->ops.Sub(exp, op1, op2);
11859 FreeExpContents(exp);
11860 op1->ops.Mul(exp, op1, op2);
11866 FreeExpContents(exp);
11867 op1->ops.Div(exp, op1, op2);
11873 FreeExpContents(exp);
11874 op1->ops.Mod(exp, op1, op2);
11878 if(exp->__anon1.op.exp2)
11880 if(op1->ops.BitAnd)
11882 FreeExpContents(exp);
11883 op1->ops.BitAnd(exp, op1, op2);
11890 FreeExpContents(exp);
11891 op1->ops.BitOr(exp, op1, op2);
11895 if(op1->ops.BitXor)
11897 FreeExpContents(exp);
11898 op1->ops.BitXor(exp, op1, op2);
11902 if(op1->ops.LShift)
11904 FreeExpContents(exp);
11905 op1->ops.LShift(exp, op1, op2);
11909 if(op1->ops.RShift)
11911 FreeExpContents(exp);
11912 op1->ops.RShift(exp, op1, op2);
11918 FreeExpContents(exp);
11919 op1->ops.Equ(exp, op1, op2);
11925 FreeExpContents(exp);
11926 op1->ops.Nqu(exp, op1, op2);
11932 FreeExpContents(exp);
11933 op1->ops.And(exp, op1, op2);
11939 FreeExpContents(exp);
11940 op1->ops.Or(exp, op1, op2);
11946 FreeExpContents(exp);
11947 op1->ops.Grt(exp, op1, op2);
11953 FreeExpContents(exp);
11954 op1->ops.Sma(exp, op1, op2);
11958 if(op1->ops.GrtEqu)
11960 FreeExpContents(exp);
11961 op1->ops.GrtEqu(exp, op1, op2);
11965 if(op1->ops.SmaEqu)
11967 FreeExpContents(exp);
11968 op1->ops.SmaEqu(exp, op1, op2);
11976 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
11978 extern struct Expression * MkExpIdentifier(struct Identifier * id);
11980 void ComputeExpression(struct Expression * exp)
11982 char expString[10240];
11984 expString[0] = '\0';
11989 ComputeInstantiation(exp);
11994 struct Expression * exp1, * exp2 = (((void *)0));
11995 struct Operand op1 =
12002 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12005 struct Operand op2 =
12012 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12016 if(exp->__anon1.op.exp2)
12018 struct Expression * e = exp->__anon1.op.exp2;
12020 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
12022 if(e->type == 5 || e->type == 32 || e->type == 23)
12025 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12027 e = (*e->__anon1.list).last;
12030 if(exp->__anon1.op.op == 261 && e && e->expType)
12032 if(e->type == 3 && e->__anon1.__anon2.string)
12034 char * string = e->__anon1.__anon2.string;
12035 int len = strlen(string);
12036 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
12038 len = UnescapeString(tmp, string + 1, len - 2);
12039 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
12040 FreeExpContents(exp);
12042 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
12046 struct Type * type = e->expType;
12049 FreeExpContents(exp);
12051 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12057 ComputeExpression(exp->__anon1.op.exp2);
12059 if(exp->__anon1.op.exp1)
12061 ComputeExpression(exp->__anon1.op.exp1);
12062 exp1 = exp->__anon1.op.exp1;
12063 exp2 = exp->__anon1.op.exp2;
12064 op1 = GetOperand(exp1);
12066 op1.type->refCount++;
12069 op2 = GetOperand(exp2);
12071 op2.type->refCount++;
12076 exp1 = exp->__anon1.op.exp2;
12077 op1 = GetOperand(exp1);
12079 op1.type->refCount++;
12081 CallOperator(exp, exp1, exp2, &op1, &op2);
12083 FreeType(op1.type);
12085 FreeType(op2.type);
12091 struct Expression * e, * n;
12093 for(e = (*exp->__anon1.list).first; e; e = n)
12098 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
12099 struct Expression * prev = exp->prev;
12100 struct Expression * next = exp->next;
12102 ComputeExpression(e);
12103 FreeType(exp->expType);
12104 FreeType(exp->destType);
12108 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
12109 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
12120 struct Expression * memberExp = exp->__anon1.member.exp;
12121 struct Identifier * memberID = exp->__anon1.member.member;
12122 struct Type * type;
12124 ComputeExpression(exp->__anon1.member.exp);
12125 type = exp->__anon1.member.exp->expType;
12128 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)));
12129 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
12130 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
12131 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
12133 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
12134 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
12138 struct Symbol * classSym;
12141 PrintTypeNoConst(type, string, 0x0, 0x1);
12142 classSym = FindClass(string);
12143 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12145 if(exp->__anon1.member.member)
12147 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
12149 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
12151 if(!prop && !member && _class && exp->__anon1.member.member)
12153 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
12155 convertTo = _class;
12156 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12157 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
12163 struct Type * type = prop->dataType;
12165 if(_class->type == 3)
12167 if(type->kind == 8)
12169 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12171 if(_class->type == 3)
12173 if(!_class->dataType)
12174 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
12175 type = _class->dataType;
12183 float (* Get)(float) = (void *)prop->Get;
12185 GetFloat(exp->__anon1.member.exp, &value);
12186 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
12193 double (* Get)(double);
12195 GetDouble(exp->__anon1.member.exp, &value);
12197 Get = (void *)prop->Set;
12199 Get = (void *)prop->Get;
12200 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
12210 struct Expression * value = exp->__anon1.member.exp;
12211 struct Type * type;
12213 if(!prop->dataType)
12214 ProcessPropertyType(prop);
12215 type = prop->dataType;
12219 else if(_class->type == 1)
12225 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12227 if(propertyClass->type == 1 && value->type == 1)
12229 void (* Set)(void *, void *) = (void *)prop->Set;
12231 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12232 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12233 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12234 exp->__anon1.instance->loc = exp->loc;
12236 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
12237 PopulateInstance(exp->__anon1.instance);
12244 void (* Set)(void *, int) = (void *)prop->Set;
12246 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12247 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12248 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12249 exp->__anon1.instance->loc = exp->loc;
12251 GetInt(value, &intValue);
12252 Set(exp->__anon1.instance->data, intValue);
12253 PopulateInstance(exp->__anon1.instance);
12258 long long intValue;
12259 void (* Set)(void *, long long) = (void *)prop->Set;
12261 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12262 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12263 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12264 exp->__anon1.instance->loc = exp->loc;
12266 GetInt64(value, &intValue);
12267 Set(exp->__anon1.instance->data, intValue);
12268 PopulateInstance(exp->__anon1.instance);
12274 void (* Set)(void *, intptr_t) = (void *)prop->Set;
12276 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12277 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12278 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12279 exp->__anon1.instance->loc = exp->loc;
12281 GetIntPtr(value, &intValue);
12282 Set(exp->__anon1.instance->data, intValue);
12283 PopulateInstance(exp->__anon1.instance);
12289 void (* Set)(void *, ssize_t) = (void *)prop->Set;
12291 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12292 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12293 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12294 exp->__anon1.instance->loc = exp->loc;
12296 GetIntSize(value, &intValue);
12297 Set(exp->__anon1.instance->data, intValue);
12298 PopulateInstance(exp->__anon1.instance);
12304 void (* Set)(void *, float) = (void *)prop->Set;
12306 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12307 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12308 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12309 exp->__anon1.instance->loc = exp->loc;
12311 GetFloat(value, &floatValue);
12312 Set(exp->__anon1.instance->data, floatValue);
12313 PopulateInstance(exp->__anon1.instance);
12318 double doubleValue;
12319 void (* Set)(void *, double) = (void *)prop->Set;
12321 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12322 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12323 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12324 exp->__anon1.instance->loc = exp->loc;
12326 GetDouble(value, &doubleValue);
12327 Set(exp->__anon1.instance->data, doubleValue);
12328 PopulateInstance(exp->__anon1.instance);
12333 else if(_class->type == 2)
12339 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12341 if(propertyClass->type == 1 && value->__anon1.instance->data)
12343 unsigned int (* Set)(void *) = (void *)prop->Set;
12344 unsigned int bits = Set(value->__anon1.instance->data);
12346 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12350 else if(_class->type == 2)
12352 unsigned int value;
12353 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
12356 GetUInt(exp->__anon1.member.exp, &value);
12358 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12367 if(_class->type == 2)
12369 unsigned int value;
12371 GetUInt(exp->__anon1.member.exp, &value);
12376 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12378 if(_class->type == 1)
12380 void (* Get)(unsigned int, void *) = (void *)prop->Get;
12382 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12383 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12384 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12385 exp->__anon1.instance->loc = exp->loc;
12387 Get(value, exp->__anon1.instance->data);
12388 PopulateInstance(exp->__anon1.instance);
12390 else if(_class->type == 2)
12392 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
12393 uint64 bits = Get(value);
12395 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
12402 else if(_class->type == 1)
12404 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
12410 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12412 if(_class->type == 1 && value)
12414 void (* Get)(void *, void *) = (void *)prop->Get;
12416 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12417 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12418 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12419 exp->__anon1.instance->loc = exp->loc;
12421 Get(value, exp->__anon1.instance->data);
12422 PopulateInstance(exp->__anon1.instance);
12433 exp->isConstant = 0x0;
12442 FreeExpression(memberExp);
12443 FreeIdentifier(memberID);
12449 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
12451 FreeExpContents(exp);
12452 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12459 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
12461 if(classSym && classSym->__anon1.registered)
12463 if(classSym->__anon1.registered->fixed)
12465 FreeSpecifier(exp->__anon1._class);
12466 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
12471 char className[1024];
12473 strcpy(className, "__ecereClass_");
12474 FullClassNameCat(className, classSym->string, 0x1);
12475 DeclareClass(classSym, className);
12476 FreeExpContents(exp);
12478 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
12479 exp->__anon1.member.member = MkIdentifier("structSize");
12486 struct Type * type;
12487 struct Expression * e = exp;
12489 if(exp->type == 11)
12491 if(exp->__anon1.cast.exp)
12492 ComputeExpression(exp->__anon1.cast.exp);
12493 e = exp->__anon1.cast.exp;
12495 if(e && exp->expType)
12497 type = exp->expType;
12498 if(type->kind == 8)
12500 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12502 if(_class && (_class->type == 3 || _class->type == 2))
12504 if(!_class->dataType)
12505 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
12506 type = _class->dataType;
12515 char value = (char)0;
12517 if(GetChar(e, &value))
12519 FreeExpContents(exp);
12520 exp->__anon1.__anon1.constant = PrintChar(value);
12526 unsigned char value = (unsigned char)0;
12528 if(GetUChar(e, &value))
12530 FreeExpContents(exp);
12531 exp->__anon1.__anon1.constant = PrintUChar(value);
12539 short value = (short)0;
12541 if(GetShort(e, &value))
12543 FreeExpContents(exp);
12544 exp->__anon1.__anon1.constant = PrintShort(value);
12550 unsigned short value = (unsigned short)0;
12552 if(GetUShort(e, &value))
12554 FreeExpContents(exp);
12555 exp->__anon1.__anon1.constant = PrintUShort(value);
12565 if(GetInt(e, &value))
12567 FreeExpContents(exp);
12568 exp->__anon1.__anon1.constant = PrintInt(value);
12574 unsigned int value = 0;
12576 if(GetUInt(e, &value))
12578 FreeExpContents(exp);
12579 exp->__anon1.__anon1.constant = PrintUInt(value);
12587 long long value = 0;
12589 if(GetInt64(e, &value))
12591 FreeExpContents(exp);
12592 exp->__anon1.__anon1.constant = PrintInt64(value);
12600 if(GetUInt64(e, &value))
12602 FreeExpContents(exp);
12603 exp->__anon1.__anon1.constant = PrintUInt64(value);
12611 intptr_t value = 0;
12613 if(GetIntPtr(e, &value))
12615 FreeExpContents(exp);
12616 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12622 uintptr_t value = 0;
12624 if(GetUIntPtr(e, &value))
12626 FreeExpContents(exp);
12627 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12637 if(GetIntSize(e, &value))
12639 FreeExpContents(exp);
12640 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12648 if(GetUIntSize(e, &value))
12650 FreeExpContents(exp);
12651 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12660 if(GetFloat(e, &value))
12662 FreeExpContents(exp);
12663 exp->__anon1.__anon1.constant = PrintFloat(value);
12672 if(GetDouble(e, &value))
12674 FreeExpContents(exp);
12675 exp->__anon1.__anon1.constant = PrintDouble(value);
12686 struct Operand op1 =
12693 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12696 struct Operand op2 =
12703 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12706 struct Operand op3 =
12713 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12717 if(exp->__anon1.cond.exp)
12718 ComputeExpression((*exp->__anon1.cond.exp).last);
12719 if(exp->__anon1.cond.elseExp)
12720 ComputeExpression(exp->__anon1.cond.elseExp);
12721 if(exp->__anon1.cond.cond)
12722 ComputeExpression(exp->__anon1.cond.cond);
12723 op1 = GetOperand(exp->__anon1.cond.cond);
12725 op1.type->refCount++;
12726 op2 = GetOperand((*exp->__anon1.cond.exp).last);
12728 op2.type->refCount++;
12729 op3 = GetOperand(exp->__anon1.cond.elseExp);
12731 op3.type->refCount++;
12734 FreeExpContents(exp);
12735 op1.ops.Cond(exp, &op1, &op2, &op3);
12738 FreeType(op1.type);
12740 FreeType(op2.type);
12742 FreeType(op3.type);
12748 void ApplyAnyObjectLogic(struct Expression * e);
12750 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
12752 unsigned int result = 0x1;
12756 struct __ecereNameSpace__ecere__sys__OldList converts =
12760 struct Conversion * convert;
12762 if(destType->kind == 0)
12764 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
12768 for(convert = converts.first; convert; convert = convert->next)
12770 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
12774 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12775 int objectType = exp->expType ? exp->expType->classObjectType : 0;
12778 newExp->prev = (((void *)0));
12779 newExp->next = (((void *)0));
12780 newExp->destType = (((void *)0));
12784 exp->addedThis = 0x1;
12785 exp->__anon1.member.exp = newExp;
12786 FreeType(exp->__anon1.member.exp->expType);
12787 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
12788 exp->__anon1.member.exp->expType->classObjectType = objectType;
12789 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
12790 exp->__anon1.member.memberType = 1;
12791 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12792 exp->needCast = 0x1;
12794 exp->expType->refCount++;
12795 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12801 exp->addedThis = 0x1;
12802 exp->__anon1.member.exp = newExp;
12803 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)
12805 newExp->byReference = 0x1;
12807 FreeType(exp->__anon1.member.exp->expType);
12808 exp->__anon1.member.exp->expType = (((void *)0));
12809 if(convert->convert->dataType)
12811 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12812 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
12813 exp->__anon1.member.exp->expType->refCount = 1;
12814 exp->__anon1.member.exp->expType->classObjectType = objectType;
12815 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12817 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
12818 exp->__anon1.member.memberType = 4;
12819 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12820 exp->needCast = 0x1;
12821 if(convert->resultType)
12822 convert->resultType->refCount++;
12828 FreeType(exp->expType);
12831 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12832 if(exp->destType->casted)
12833 exp->needCast = 0x1;
12835 exp->expType->refCount++;
12839 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12840 if(exp->destType->casted)
12841 exp->needCast = 0x1;
12842 if(convert->resultType)
12843 convert->resultType->refCount++;
12847 if(exp->isConstant && inCompiler)
12848 ComputeExpression(exp);
12849 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
12851 if(!result && exp->expType && converts.count)
12853 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
12855 if(!result && exp->expType && exp->destType)
12857 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))
12864 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
12866 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
12868 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
12870 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
12872 void CheckTemplateTypes(struct Expression * exp)
12874 struct Expression * nbExp = GetNonBracketsExp(exp);
12876 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
12878 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12879 struct Context * context;
12883 exp->destType->refCount++;
12885 exp->expType->refCount++;
12886 newExp->prev = (((void *)0));
12887 newExp->next = (((void *)0));
12888 switch(exp->expType->kind)
12891 if(exp->destType->classObjectType)
12894 exp->destType->refCount--;
12896 exp->expType->refCount--;
12897 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12901 struct __ecereNameSpace__ecere__sys__OldList * specs;
12902 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12903 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12905 context = PushContext();
12906 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12907 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12908 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12910 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12911 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
12912 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
12913 exp->__anon1.compound->__anon1.compound.context = context;
12914 PopContext(context);
12919 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
12920 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12921 exp->needCast = 0x1;
12925 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
12927 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12928 struct Context * context;
12932 exp->destType->refCount++;
12934 exp->expType->refCount++;
12935 newExp->prev = (((void *)0));
12936 newExp->next = (((void *)0));
12937 switch(exp->expType->kind)
12940 if(exp->destType->classObjectType)
12943 exp->destType->refCount--;
12945 exp->expType->refCount--;
12946 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12950 struct __ecereNameSpace__ecere__sys__OldList * specs;
12951 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12952 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12954 context = PushContext();
12955 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12956 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12957 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12959 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12960 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
12961 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
12962 exp->__anon1.compound->__anon1.compound.context = context;
12963 PopContext(context);
12968 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
12971 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)));
12972 ProcessExpressionType((*exp->__anon1.list).first);
12978 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
12979 exp->needTemplateCast = 2;
12980 newExp->needCast = 0x1;
12981 newExp->needTemplateCast = 2;
12982 ProcessExpressionType((*exp->__anon1.list).first);
12988 if(exp->expType->kind == 20)
12990 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
12994 FreeType(exp->destType);
12995 FreeType(exp->expType);
12996 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13000 if(newExp->type == 8 && newExp->__anon1.member.memberType == 3)
13003 exp->__anon1.op.op = '*';
13004 exp->__anon1.op.exp1 = (((void *)0));
13005 exp->__anon1.op.exp2 = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uint64")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '&', newExp))));
13009 char typeString[1024];
13010 struct Declarator * decl;
13011 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13013 typeString[0] = '\0';
13014 PrintType(exp->expType, typeString, 0x0, 0x0);
13015 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13017 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
13018 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
13019 exp->__anon1.cast.exp->needCast = 0x1;
13027 extern int strncmp(const char * , const char * , size_t n);
13029 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
13031 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
13033 int nsLen = strlen(nameSpace);
13034 struct Symbol * symbol;
13036 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)))
13038 char * s = symbol->string;
13040 if(!strncmp(s, nameSpace, nsLen))
13045 for(c = strlen(s) - 1; c >= 0; c--)
13048 namePart = s + c + 1;
13049 if(!strcmp(namePart, name))
13057 return (((void *)0));
13060 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
13063 char nameSpace[1024];
13064 const char * namePart;
13065 unsigned int gotColon = 0x0;
13067 nameSpace[0] = '\0';
13068 for(c = strlen(name) - 1; c >= 0; c--)
13074 namePart = name + c + 1;
13075 while(c >= 0 && name[c] == ':')
13079 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
13083 memcpy(nameSpace, name, c + 1);
13084 nameSpace[c + 1] = (char)0;
13085 return ScanWithNameSpace(tree, nameSpace, namePart);
13089 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13095 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13099 return ScanWithNameSpace(tree, "", namePart);
13101 return (((void *)0));
13104 static void ProcessDeclaration(struct Declaration * decl);
13106 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
13108 struct Context * ctx;
13109 struct Symbol * symbol = (((void *)0));
13111 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
13113 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
13115 symbol = (((void *)0));
13118 char curName[1024];
13120 strcpy(curName, thisNameSpace);
13121 strcat(curName, "::");
13122 strcat(curName, name);
13123 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
13126 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
13129 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
13130 if(symbol || ctx == endContext)
13133 if(inCompiler && curExternal && symbol && ctx == globalContext && curExternal->symbol && symbol->id > curExternal->symbol->idCode && symbol->__anon2.__anon1.pointerExternal)
13135 if(symbol->__anon2.__anon1.pointerExternal->type == 0)
13137 struct FunctionDefinition * function = symbol->__anon2.__anon1.pointerExternal->__anon1.function;
13138 struct Context * tmpContext = curContext;
13140 curContext = (((void *)0));
13141 symbol->__anon2.__anon1.pointerExternal = MkExternalDeclaration(MkDeclaration(CopyList(function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(function->declarator), (((void *)0))))));
13142 curContext = tmpContext;
13143 symbol->__anon2.__anon1.pointerExternal->symbol = symbol;
13144 DeclareType(symbol->type, 0x1, 0x1);
13145 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, symbol->__anon2.__anon1.pointerExternal);
13146 symbol->id = curExternal->symbol->idCode;
13148 else if(symbol->__anon2.__anon1.pointerExternal->type == 1 && curExternal->symbol->idCode < symbol->__anon2.__anon1.pointerExternal->symbol->id)
13150 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
13151 symbol->id = curExternal->symbol->idCode;
13157 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
13159 if(!type->isSigned && type->kind != 22 && type->kind != 23)
13160 ListAdd(specs, MkSpecifier(UNSIGNED));
13165 if(type->__anon1._class->__anon1.registered)
13167 if(!type->__anon1._class->__anon1.registered->dataType)
13168 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
13169 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
13174 ListAdd(specs, MkSpecifier(DOUBLE));
13177 ListAdd(specs, MkSpecifier(FLOAT));
13180 ListAdd(specs, MkSpecifier(CHAR));
13183 ListAdd(specs, MkSpecifier(_BOOL));
13186 ListAdd(specs, MkSpecifier(SHORT));
13189 ListAdd(specs, MkSpecifier(INT64));
13192 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
13195 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
13199 ListAdd(specs, MkSpecifier(INT));
13204 static void PrintArraySize(struct Type * arrayType, char * string)
13210 if(arrayType->__anon1.__anon4.enumClass)
13211 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
13212 else if(arrayType->__anon1.__anon4.arraySizeExp)
13213 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
13215 strcat(string, size);
13218 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
13222 if(printConst && type->constant)
13223 strcat(string, "const ");
13228 struct Symbol * c = type->__anon1._class;
13230 if(type->classObjectType == 2)
13231 strcat(string, "typed_object");
13232 else if(type->classObjectType == 3)
13233 strcat(string, "any_object");
13237 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
13239 if(type->byReference)
13240 strcat(string, " &");
13244 strcat(string, "void");
13247 strcat(string, type->isSigned ? "int" : "uint");
13250 strcat(string, type->isSigned ? "int64" : "uint64");
13253 strcat(string, type->isSigned ? "intptr" : "uintptr");
13256 strcat(string, type->isSigned ? "intsize" : "uintsize");
13259 strcat(string, type->isSigned ? "char" : "byte");
13262 strcat(string, "_Bool");
13265 strcat(string, type->isSigned ? "short" : "uint16");
13268 strcat(string, "float");
13271 strcat(string, "double");
13274 if(type->__anon1.__anon1.enumName)
13276 strcat(string, "struct ");
13277 strcat(string, type->__anon1.__anon1.enumName);
13279 else if(type->typeName)
13280 strcat(string, type->typeName);
13283 struct Type * member;
13285 strcat(string, "struct { ");
13286 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
13288 PrintType(member, string, 0x1, fullName);
13289 strcat(string, "; ");
13291 strcat(string, "}");
13295 if(type->__anon1.__anon1.enumName)
13297 strcat(string, "union ");
13298 strcat(string, type->__anon1.__anon1.enumName);
13300 else if(type->typeName)
13301 strcat(string, type->typeName);
13304 strcat(string, "union ");
13305 strcat(string, "(unnamed)");
13309 if(type->__anon1.__anon1.enumName)
13311 strcat(string, "enum ");
13312 strcat(string, type->__anon1.__anon1.enumName);
13314 else if(type->typeName)
13315 strcat(string, type->typeName);
13317 strcat(string, "int");
13320 strcat(string, "...");
13323 strcat(string, "subclass(");
13324 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
13325 strcat(string, ")");
13328 strcat(string, type->__anon1.templateParameter->identifier->string);
13331 strcat(string, "thisclass");
13334 strcat(string, "__builtin_va_list");
13340 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
13342 static void PrintName(struct Type * type, char * string, unsigned int fullName)
13344 if(type->name && type->name[0])
13347 strcat(string, type->name);
13350 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 0x1, 0x0);
13356 strcat(string, name);
13361 static void PrintAttribs(struct Type * type, char * string)
13365 if(type->dllExport)
13366 strcat(string, "dllexport ");
13367 if(type->attrStdcall)
13368 strcat(string, "stdcall ");
13372 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
13374 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13376 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
13377 PrintAttribs(type, string);
13378 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
13379 strcat(string, " const");
13380 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
13381 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13382 strcat(string, " (");
13383 if(type->kind == 13)
13385 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
13386 PrintAttribs(type->__anon1.type, string);
13388 if(type->kind == 13)
13390 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
13391 strcat(string, "*");
13393 strcat(string, " *");
13395 if(printConst && type->constant && type->kind == 13)
13396 strcat(string, " const");
13399 PrintTypeSpecs(type, string, fullName, printConst);
13402 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
13404 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13405 strcat(string, ")");
13406 if(type->kind == 12)
13407 PrintArraySize(type, string);
13408 else if(type->kind == 11)
13410 struct Type * param;
13412 strcat(string, "(");
13413 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
13415 PrintType(param, string, 0x1, fullName);
13417 strcat(string, ", ");
13419 strcat(string, ")");
13421 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13422 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
13425 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
13427 PrePrintType(type, string, fullName, (((void *)0)), printConst);
13428 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
13429 strcat(string, " ");
13430 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
13432 struct Symbol * _class = type->__anon1.__anon2.thisClass;
13434 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
13436 if(type->classObjectType == 1)
13437 strcat(string, "class");
13439 strcat(string, type->byReference ? "typed_object&" : "typed_object");
13441 else if(_class && _class->string)
13443 char * s = _class->string;
13449 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 0x1, 0x0);
13455 strcat(string, name);
13458 strcat(string, "::");
13460 if(printName && type->name)
13461 PrintName(type, string, fullName);
13462 PostPrintType(type, string, fullName);
13463 if(type->bitFieldCount)
13467 sprintf(count, ":%d", type->bitFieldCount);
13468 strcat(string, count);
13472 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13474 _PrintType(type, string, printName, fullName, 0x1);
13477 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13479 _PrintType(type, string, printName, fullName, 0x0);
13482 static struct Type * FindMember(struct Type * type, char * string)
13484 struct Type * memberType;
13486 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13488 if(!memberType->name)
13490 struct Type * subType = FindMember(memberType, string);
13495 else if(!strcmp(memberType->name, string))
13498 return (((void *)0));
13501 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
13503 struct Type * memberType;
13505 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13507 if(!memberType->name)
13509 struct Type * subType = FindMember(memberType, string);
13513 *offset += memberType->offset;
13517 else if(!strcmp(memberType->name, string))
13519 *offset += memberType->offset;
13523 return (((void *)0));
13526 extern unsigned int parseError;
13528 unsigned int GetParseError()
13533 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
13535 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
13537 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
13539 struct Expression * ParseExpressionString(char * expression)
13542 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
13543 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
13544 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13546 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13547 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
13548 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
13549 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13551 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13552 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
13554 parsedExpression = (((void *)0));
13556 expression_yyparse();
13557 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
13558 return parsedExpression;
13561 extern char * QMkString(const char * source);
13563 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
13565 struct Identifier * id = exp->__anon1.__anon1.identifier;
13566 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
13567 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13568 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13569 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
13571 if(_class && _class->type == 4)
13573 struct __ecereNameSpace__ecere__sys__NamedLink * value = (((void *)0));
13574 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13578 struct __ecereNameSpace__ecere__com__Class * baseClass;
13580 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
13582 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
13584 for(value = e->values.first; value; value = value->next)
13586 if(!strcmp(value->name, id->string))
13591 char constant[256];
13593 FreeExpContents(exp);
13595 exp->isConstant = 0x1;
13596 if(!strcmp(baseClass->dataTypeString, "int"))
13597 sprintf(constant, "%d", (int)value->data);
13599 sprintf(constant, "0x%X", (int)value->data);
13600 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13601 exp->expType = MkClassType(baseClass->fullName);
13609 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
13611 ProcessMethodType(method);
13612 exp->expType = __extension__ ({
13613 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13615 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
13619 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
13621 if(!prop->dataType)
13622 ProcessPropertyType(prop);
13623 exp->expType = prop->dataType;
13625 prop->dataType->refCount++;
13628 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
13630 if(!member->dataType)
13631 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
13632 exp->expType = member->dataType;
13633 if(member->dataType)
13634 member->dataType->refCount++;
13637 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
13639 if(!classProp->dataType)
13640 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0x0);
13641 if(classProp->constant)
13643 FreeExpContents(exp);
13644 exp->isConstant = 0x1;
13645 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
13648 exp->__anon1.__anon1.constant = QMkString((char *)classProp->Get(_class));
13652 char constant[256];
13655 sprintf(constant, "%d", (int)classProp->Get(_class));
13656 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13662 exp->expType = classProp->dataType;
13663 if(classProp->dataType)
13664 classProp->dataType->refCount++;
13670 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
13672 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
13673 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
13674 struct __ecereNameSpace__ecere__com__NameSpace * child;
13678 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)))
13680 data = ScanGlobalData(child, name);
13688 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
13690 extern char * strncpy(char * , const char * , size_t n);
13692 static struct GlobalData * FindGlobalData(char * name)
13695 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
13697 nameSpace = globalData;
13698 for(c = 0; name[c]; c++)
13700 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
13702 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
13703 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
13705 strncpy(spaceName, name + start, c - start);
13706 spaceName[c - start] = '\0';
13707 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
13708 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
13710 return (((void *)0));
13711 nameSpace = newSpace;
13719 return ScanGlobalData(nameSpace, name + start);
13721 return (((void *)0));
13724 static int definedExpStackPos;
13726 static void * definedExpStack[512];
13728 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
13730 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
13732 FreeExpContents(checkedExp);
13733 FreeType(checkedExp->expType);
13734 FreeType(checkedExp->destType);
13735 *checkedExp = *newExp;
13736 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13737 checkedExp->prev = prev;
13738 checkedExp->next = next;
13741 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
13743 extern int printf(const char * , ...);
13745 void __ecereMethod_Expression_Clear();
13747 void ApplyAnyObjectLogic(struct Expression * e)
13749 struct Type * destType = e->destType;
13751 if(destType && (destType->classObjectType == 3))
13753 if(e && e->expType)
13755 struct Type * type = e->expType;
13756 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
13758 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
13760 _class = type->__anon1._class->__anon1.registered;
13762 else if(type->kind == 19)
13764 _class = FindClass("ecere::com::Class")->__anon1.registered;
13768 char string[1024] = "";
13769 struct Symbol * classSym;
13771 PrintTypeNoConst(type, string, 0x0, 0x1);
13772 classSym = FindClass(string);
13774 _class = classSym->__anon1.registered;
13776 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)))
13778 if(!_class || strcmp(_class->fullName, "char *"))
13780 struct Expression * checkedExp = e, * newExp;
13782 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13784 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13786 if(checkedExp->type == 23)
13788 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13791 checkedExp = (*checkedExp->__anon1.list).last;
13793 else if(checkedExp->type == 11)
13794 checkedExp = checkedExp->__anon1.cast.exp;
13796 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
13798 newExp = checkedExp->__anon1.op.exp2;
13799 checkedExp->__anon1.op.exp2 = (((void *)0));
13800 FreeExpContents(checkedExp);
13801 if(e->expType && e->expType->passAsTemplate)
13805 ComputeTypeSize(e->expType);
13806 sprintf(size, "%d", e->expType->size);
13807 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))))));
13809 ReplaceExpContents(checkedExp, newExp);
13810 e->byReference = 0x1;
13812 else if(!e->byReference || (_class && _class->type == 5))
13814 struct Expression * checkedExp;
13817 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;
13819 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
13821 struct Context * context = PushContext();
13822 struct Declarator * decl;
13823 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13824 char typeString[1024];
13825 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13827 typeString[0] = '\0';
13829 newExp->prev = (((void *)0));
13830 newExp->next = (((void *)0));
13831 newExp->expType = (((void *)0));
13832 PrintTypeNoConst(e->expType, typeString, 0x0, 0x1);
13833 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13834 newExp->destType = ProcessType(specs, decl);
13835 curContext = context;
13839 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
13842 sprintf(name, "__internalValue%03X", internalValueCounter++);
13843 if(!curCompound->__anon1.compound.declarations)
13844 curCompound->__anon1.compound.declarations = MkList();
13845 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
13846 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
13847 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
13848 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
13851 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
13853 struct Type * type = e->destType;
13855 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13856 CopyTypeInto(e->destType, type);
13857 e->destType->refCount = 1;
13858 e->destType->classObjectType = 0;
13861 e->__anon1.compound->__anon1.compound.context = context;
13862 PopContext(context);
13863 curContext = context->parent;
13867 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13869 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13871 if(checkedExp->type == 23)
13873 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13876 checkedExp = (*checkedExp->__anon1.list).last;
13878 else if(checkedExp->type == 11)
13879 checkedExp = checkedExp->__anon1.cast.exp;
13882 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13884 *operand = *checkedExp;
13885 checkedExp->destType = (((void *)0));
13886 checkedExp->expType = (((void *)0));
13887 __ecereMethod_Expression_Clear(checkedExp);
13888 checkedExp->type = 4;
13889 checkedExp->__anon1.op.op = '&';
13890 checkedExp->__anon1.op.exp1 = (((void *)0));
13891 checkedExp->__anon1.op.exp2 = operand;
13900 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))))
13902 if(e->expType->classObjectType && destType && destType->classObjectType)
13908 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13911 thisExp->prev = (((void *)0));
13912 thisExp->next = (((void *)0));
13913 __ecereMethod_Expression_Clear(e);
13915 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
13916 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
13917 ((struct Expression *)(*e->__anon1.list).first)->byReference = 0x1;
13919 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13920 CopyTypeInto(e->expType, thisExp->expType);
13921 e->expType->byReference = 0x0;
13922 e->expType->refCount = 1;
13923 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))
13925 e->expType->classObjectType = 0;
13930 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
13932 if(destType->kind == 14)
13934 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
13936 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))
13938 unsigned int byReference = e->expType->byReference;
13939 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13940 struct Declarator * decl;
13941 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13942 char typeString[1024];
13943 struct Type * type;
13944 int backupClassObjectType;
13945 unsigned int backupByReference;
13947 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
13951 backupClassObjectType = type->classObjectType;
13952 backupByReference = type->byReference;
13953 type->classObjectType = 0;
13954 type->byReference = 0x0;
13955 typeString[0] = '\0';
13956 PrintType(type, typeString, 0x0, 0x1);
13957 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13958 type->classObjectType = backupClassObjectType;
13959 type->byReference = backupByReference;
13961 thisExp->prev = (((void *)0));
13962 thisExp->next = (((void *)0));
13963 __ecereMethod_Expression_Clear(e);
13964 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)))
13967 e->__anon1.op.op = '*';
13968 e->__anon1.op.exp1 = (((void *)0));
13969 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
13970 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13971 CopyTypeInto(e->expType, type);
13972 e->expType->byReference = 0x0;
13973 e->expType->refCount = 1;
13978 e->__anon1.cast.typeName = MkTypeName(specs, decl);
13979 e->__anon1.cast.exp = thisExp;
13980 e->byReference = 0x1;
13984 e->destType = destType;
13985 destType->refCount++;
13990 void ApplyLocation(struct Expression * exp, struct Location * loc)
13996 if(exp->__anon1.op.exp1)
13997 ApplyLocation(exp->__anon1.op.exp1, loc);
13998 if(exp->__anon1.op.exp2)
13999 ApplyLocation(exp->__anon1.op.exp2, loc);
14002 if(exp->__anon1.list)
14004 struct Expression * e;
14006 for(e = (*exp->__anon1.list).first; e; e = e->next)
14007 ApplyLocation(e, loc);
14011 if(exp->__anon1.index.index)
14013 struct Expression * e;
14015 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
14016 ApplyLocation(e, loc);
14018 if(exp->__anon1.index.exp)
14019 ApplyLocation(exp->__anon1.index.exp, loc);
14022 if(exp->__anon1.call.arguments)
14024 struct Expression * arg;
14026 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
14027 ApplyLocation(arg, loc);
14029 if(exp->__anon1.call.exp)
14030 ApplyLocation(exp->__anon1.call.exp, loc);
14034 if(exp->__anon1.member.exp)
14035 ApplyLocation(exp->__anon1.member.exp, loc);
14038 if(exp->__anon1.cast.exp)
14039 ApplyLocation(exp->__anon1.cast.exp, loc);
14042 if(exp->__anon1.cond.exp)
14044 struct Expression * e;
14046 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
14047 ApplyLocation(e, loc);
14049 if(exp->__anon1.cond.cond)
14050 ApplyLocation(exp->__anon1.cond.cond, loc);
14051 if(exp->__anon1.cond.elseExp)
14052 ApplyLocation(exp->__anon1.cond.elseExp, loc);
14055 if(exp->__anon1.vaArg.exp)
14056 ApplyLocation(exp->__anon1.vaArg.exp, loc);
14063 extern char * strstr(const char * , const char * );
14065 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DefinedExpression;
14067 struct __ecereNameSpace__ecere__com__DefinedExpression
14069 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
14070 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
14072 const char * value;
14073 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
14074 } __attribute__ ((gcc_struct));
14076 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14078 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14080 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
14082 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
14084 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
14086 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
14088 static void ProcessStatement(struct Statement * stmt);
14090 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
14092 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
14094 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
14096 extern const char * sourceFile;
14098 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
14100 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_Type_specConst;
14102 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
14104 void ProcessExpressionType(struct Expression * exp)
14106 unsigned int unresolved = 0x0;
14107 struct Location oldyylloc = yylloc;
14108 unsigned int notByReference = 0x0;
14110 if(!exp || exp->expType)
14117 struct Identifier * id = exp->__anon1.__anon1.identifier;
14119 if(!id || !topContext)
14121 if(id->_class && id->_class->__anon1.__anon1.name)
14123 id->classSym = id->_class->__anon1.__anon1.symbol;
14125 if(strstr(id->string, "__ecereClass") == id->string)
14127 exp->expType = ProcessTypeString("ecere::com::Class", 0x1);
14130 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
14132 ReplaceClassMembers(exp, thisClass);
14135 ProcessExpressionType(exp);
14138 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0x0))
14143 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14147 if(exp->destType && CheckExpressionType(exp, exp->destType, 0x0, 0x0))
14153 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
14156 ProcessExpressionType(exp);
14160 else if(currentClass && !id->_class)
14162 if(ResolveIdWithClass(exp, currentClass, 0x1))
14165 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14170 struct Type * type = symbol->type;
14171 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
14173 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
14175 struct Context * context = SetupTemplatesContext(_class);
14177 type = ReplaceThisClassType(_class);
14178 FinishTemplatesContext(context);
14180 type->refCount = 0;
14182 FreeSpecifier(id->_class);
14183 id->_class = (((void *)0));
14184 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14185 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
14186 id->classSym = (((void *)0));
14187 exp->expType = type;
14190 if(type && (type->kind == 15))
14191 exp->isConstant = 0x1;
14192 if(symbol->isParam || !strcmp(id->string, "this"))
14194 if(_class && _class->type == 1 && !type->declaredWithStruct)
14195 exp->byReference = 0x1;
14197 if(symbol->isIterator)
14199 if(symbol->isIterator == 3)
14202 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
14203 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
14204 exp->expType = (((void *)0));
14205 ProcessExpressionType(exp);
14207 else if(symbol->isIterator != 4)
14210 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
14211 exp->__anon1.member.exp->expType = exp->expType;
14212 exp->__anon1.member.member = MkIdentifier("data");
14213 exp->expType = (((void *)0));
14214 ProcessExpressionType(exp);
14221 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
14223 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14227 strcpy(name, thisNameSpace);
14228 strcat(name, "::");
14229 strcat(name, id->string);
14230 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
14233 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
14238 for(c = 0; c < definedExpStackPos; c++)
14239 if(definedExpStack[c] == definedExp)
14241 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
14243 struct Location backupYylloc = yylloc;
14244 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
14246 definedExpStack[definedExpStackPos++] = definedExp;
14247 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
14248 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
14249 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14251 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14252 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
14253 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
14254 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14256 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14257 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
14259 parsedExpression = (((void *)0));
14261 expression_yyparse();
14262 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
14264 fileInput = backInput;
14265 yylloc = backupYylloc;
14266 if(parsedExpression)
14268 FreeIdentifier(id);
14270 exp->__anon1.list = MkListOne(parsedExpression);
14271 ApplyLocation(parsedExpression, &yylloc);
14272 ProcessExpressionType(exp);
14273 definedExpStackPos--;
14276 definedExpStackPos--;
14282 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
14288 struct GlobalData * data = (((void *)0));
14290 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14294 strcpy(name, thisNameSpace);
14295 strcat(name, "::");
14296 strcat(name, id->string);
14297 data = FindGlobalData(name);
14300 data = FindGlobalData(id->string);
14303 DeclareGlobalData(data);
14304 exp->expType = data->dataType;
14306 data->dataType->refCount++;
14307 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14308 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
14309 FreeSpecifier(id->_class);
14310 id->_class = (((void *)0));
14315 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
14317 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14321 strcpy(name, thisNameSpace);
14322 strcat(name, "::");
14323 strcat(name, id->string);
14324 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
14327 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
14332 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14333 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
14335 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
14336 strcpy(name, "__ecereFunction_");
14337 FullClassNameCat(name, id->string, 0x0);
14338 if(DeclareFunction(function, name))
14340 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14341 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
14343 exp->expType = function->dataType;
14344 if(function->dataType)
14345 function->dataType->refCount++;
14346 FreeSpecifier(id->_class);
14347 id->_class = (((void *)0));
14359 if(!exp->__anon1.instance->_class)
14361 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
14363 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
14366 ProcessInstantiationType(exp->__anon1.instance);
14367 exp->isConstant = exp->__anon1.instance->isConstant;
14368 if(exp->__anon1.instance->_class)
14370 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
14378 char * constant = exp->__anon1.__anon1.constant;
14379 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 0x1, type);
14381 exp->expType = type;
14382 if(constant[0] == '\'')
14384 if((int)((unsigned char *)constant)[1] > 127)
14387 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
14391 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
14392 exp->__anon1.__anon1.constant = PrintUInt(ch);
14394 type->__anon1._class = FindClass("unichar");
14395 type->isSigned = 0x0;
14400 type->isSigned = 0x1;
14405 char * dot = strchr(constant, '.');
14406 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
14411 exponent = strchr(constant, 'p');
14413 exponent = strchr(constant, 'P');
14417 exponent = strchr(constant, 'e');
14419 exponent = strchr(constant, 'E');
14421 if(dot || exponent)
14423 if(strchr(constant, 'f') || strchr(constant, 'F'))
14427 type->isSigned = 0x1;
14431 unsigned int isSigned = constant[0] == '-';
14432 char * endP = (((void *)0));
14433 long long i64 = strtoll(constant, &endP, 0);
14434 uint64 ui64 = strtoull(constant, &endP, 0);
14435 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll"));
14439 if(i64 < (((int)0x80000000)))
14444 if(ui64 > (((int)0x7fffffff)))
14446 if(ui64 > (0xffffffff))
14449 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
14453 else if(constant[0] != '0' || !constant[1])
14456 type->kind = is64Bit ? 4 : 3;
14457 type->isSigned = isSigned;
14460 exp->isConstant = 0x1;
14461 if(exp->destType && exp->destType->kind == 7)
14463 else if(exp->destType && exp->destType->kind == 6)
14465 else if(exp->destType && exp->destType->kind == 4)
14472 exp->isConstant = 0x1;
14473 exp->expType = __extension__ ({
14474 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14476 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
14477 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14479 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 1, __ecereInstance1->constant = 0x1, __ecereInstance1->isSigned = 0x1, __ecereInstance1;
14480 }), __ecereInstance2;
14486 ProcessExpressionType(exp->__anon1._new.size);
14487 exp->expType = __extension__ ({
14488 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14490 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
14492 DeclareType(exp->expType->__anon1.type, 0x0, 0x0);
14496 ProcessExpressionType(exp->__anon1._renew.size);
14497 ProcessExpressionType(exp->__anon1._renew.exp);
14498 exp->expType = __extension__ ({
14499 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14501 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
14503 DeclareType(exp->expType->__anon1.type, 0x0, 0x0);
14507 unsigned int assign = 0x0, boolResult = 0x0, boolOps = 0x0;
14508 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
14509 unsigned int useDestType = 0x0, useSideType = 0x0;
14510 struct Location oldyylloc = yylloc;
14511 unsigned int useSideUnit = 0x0;
14512 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
14513 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
14515 switch(exp->__anon1.op.op)
14569 if(exp->__anon1.op.exp1)
14576 if(exp->__anon1.op.op == '&')
14578 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
14580 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
14581 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14583 if(symbol && symbol->isIterator == 2)
14586 exp->__anon1.member.exp = exp->__anon1.op.exp2;
14587 exp->__anon1.member.member = MkIdentifier("key");
14588 exp->expType = (((void *)0));
14589 exp->__anon1.op.exp2->expType = symbol->type;
14590 symbol->type->refCount++;
14591 ProcessExpressionType(exp);
14597 if(exp->__anon1.op.exp1)
14599 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
14601 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
14603 if(exp->__anon1.op.exp1->destType)
14604 FreeType(exp->__anon1.op.exp1->destType);
14605 exp->__anon1.op.exp1->destType = exp->destType;
14606 exp->__anon1.op.exp1->opDestType = 0x1;
14608 exp->destType->refCount++;
14612 if(exp->__anon1.op.exp1->destType)
14613 FreeType(exp->__anon1.op.exp1->destType);
14614 exp->__anon1.op.exp1->destType = dummy;
14617 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14618 exp->__anon1.op.exp1->destType->count++;
14619 ProcessExpressionType(exp->__anon1.op.exp1);
14620 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14621 exp->__anon1.op.exp1->destType->count--;
14622 exp->__anon1.op.exp1->opDestType = 0x0;
14623 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)
14625 exp->__anon1.op.exp2 = MkExpConstant("1");
14626 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
14629 if(exp->__anon1.op.exp1->destType == dummy)
14632 exp->__anon1.op.exp1->destType = (((void *)0));
14634 type1 = exp->__anon1.op.exp1->expType;
14636 if(exp->__anon1.op.exp2)
14638 char expString[10240];
14640 expString[0] = '\0';
14641 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
14643 if(exp->__anon1.op.exp1)
14645 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
14646 if(exp->__anon1.op.exp1->expType)
14647 exp->__anon1.op.exp1->expType->refCount++;
14651 exp->__anon1.op.exp2->destType = exp->destType;
14652 if(!exp->__anon1.op.exp1 || exp->__anon1.op.op != '&')
14653 exp->__anon1.op.exp2->opDestType = 0x1;
14655 exp->destType->refCount++;
14659 exp->expType = type1;
14664 PrintExpression(exp->__anon1.op.exp2, expString);
14665 if(type1 && type1->kind == 13)
14667 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)
14668 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
14669 else if(exp->__anon1.op.op == '=')
14671 if(exp->__anon1.op.exp2->destType)
14672 FreeType(exp->__anon1.op.exp2->destType);
14673 exp->__anon1.op.exp2->destType = type1;
14680 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)
14684 if(exp->__anon1.op.exp2->destType)
14685 FreeType(exp->__anon1.op.exp2->destType);
14686 exp->__anon1.op.exp2->destType = type1;
14693 exp->expType = type1;
14695 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
14697 if(exp->__anon1.op.exp2->destType)
14698 FreeType(exp->__anon1.op.exp2->destType);
14699 exp->__anon1.op.exp2->destType = exp->destType;
14700 if(exp->__anon1.op.op != '&')
14701 exp->__anon1.op.exp2->opDestType = 0x1;
14703 exp->destType->refCount++;
14707 if(exp->__anon1.op.exp2->destType)
14708 FreeType(exp->__anon1.op.exp2->destType);
14709 exp->__anon1.op.exp2->destType = dummy;
14712 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))
14714 FreeType(exp->__anon1.op.exp2->destType);
14715 exp->__anon1.op.exp2->destType = type1;
14718 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14719 exp->__anon1.op.exp2->destType->count++;
14720 if(exp->__anon1.op.op == SIZEOF)
14722 struct Expression * e = exp->__anon1.op.exp2;
14724 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
14726 if(e->type == 5 || e->type == 32 || e->type == 23)
14729 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
14731 e = (*e->__anon1.list).last;
14734 if(e->type == 11 && e->__anon1.cast.exp)
14735 e->__anon1.cast.exp->needCast = 0x1;
14737 ProcessExpressionType(exp->__anon1.op.exp2);
14738 exp->__anon1.op.exp2->opDestType = 0x0;
14739 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14740 exp->__anon1.op.exp2->destType->count--;
14741 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
14743 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)
14745 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
14746 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14748 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)))
14750 if(exp->__anon1.op.op == ADD_ASSIGN)
14751 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14753 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))
14755 if(exp->__anon1.op.op == ADD_ASSIGN)
14756 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14758 else if(inCompiler)
14760 char type1String[1024];
14761 char type2String[1024];
14763 type1String[0] = '\0';
14764 type2String[0] = '\0';
14765 PrintType(exp->__anon1.op.exp2->expType, type1String, 0x0, 0x1);
14766 PrintType(type1, type2String, 0x0, 0x1);
14767 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
14768 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
14771 if(exp->__anon1.op.exp2->destType == dummy)
14774 exp->__anon1.op.exp2->destType = (((void *)0));
14776 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
14778 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14779 type2->refCount = 1;
14780 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
14781 type2->isSigned = 0x1;
14783 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))
14785 type2 = __extension__ ({
14786 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14788 __ecereInstance1->kind = 3, __ecereInstance1;
14790 type2->refCount = 1;
14791 type2->isSigned = 0x1;
14795 type2 = exp->__anon1.op.exp2->expType;
14801 if(exp->__anon1.op.op == SIZEOF)
14803 exp->expType = __extension__ ({
14804 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14806 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
14808 exp->isConstant = 0x1;
14810 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
14812 exp->expType = Dereference(type2);
14813 if(type2 && type2->kind == 8)
14814 notByReference = 0x1;
14816 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
14817 exp->expType = Reference(type2);
14822 if(exp->__anon1.op.exp1)
14824 if(exp->__anon1.op.exp1->destType)
14825 FreeType(exp->__anon1.op.exp1->destType);
14826 exp->__anon1.op.exp1->destType = MkClassType("bool");
14827 exp->__anon1.op.exp1->destType->truth = 0x1;
14828 if(!exp->__anon1.op.exp1->expType)
14829 ProcessExpressionType(exp->__anon1.op.exp1);
14831 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
14832 FreeType(exp->__anon1.op.exp1->expType);
14833 exp->__anon1.op.exp1->expType = MkClassType("bool");
14834 exp->__anon1.op.exp1->expType->truth = 0x1;
14836 if(exp->__anon1.op.exp2)
14838 if(exp->__anon1.op.exp2->destType)
14839 FreeType(exp->__anon1.op.exp2->destType);
14840 exp->__anon1.op.exp2->destType = MkClassType("bool");
14841 exp->__anon1.op.exp2->destType->truth = 0x1;
14842 if(!exp->__anon1.op.exp2->expType)
14843 ProcessExpressionType(exp->__anon1.op.exp2);
14845 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
14846 FreeType(exp->__anon1.op.exp2->expType);
14847 exp->__anon1.op.exp2->expType = MkClassType("bool");
14848 exp->__anon1.op.exp2->expType->truth = 0x1;
14851 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")))))
14853 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"))))
14855 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)))
14857 struct Type * intType;
14859 if(!type1->__anon1._class->__anon1.registered->dataType)
14860 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0x0);
14861 if(!type2->__anon1._class->__anon1.registered->dataType)
14862 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0x0);
14863 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0x0);
14864 if(exp->__anon1.op.exp1->destType)
14865 FreeType(exp->__anon1.op.exp1->destType);
14866 if(exp->__anon1.op.exp2->destType)
14867 FreeType(exp->__anon1.op.exp2->destType);
14868 exp->__anon1.op.exp1->destType = intType;
14869 exp->__anon1.op.exp2->destType = intType;
14870 intType->refCount++;
14874 if(exp->__anon1.op.exp2->destType)
14875 FreeType(exp->__anon1.op.exp2->destType);
14876 exp->__anon1.op.exp2->destType = type1;
14878 if(exp->__anon1.op.exp1->destType)
14879 FreeType(exp->__anon1.op.exp1->destType);
14880 exp->__anon1.op.exp1->destType = type2;
14883 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)
14884 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);
14885 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
14887 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 0x1);
14891 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14893 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
14894 ProcessExpressionType(exp->__anon1.op.exp1);
14895 if(type2->kind != 13)
14897 ProcessExpressionType(classExp);
14898 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
14899 if(!exp->__anon1.op.exp2->expType)
14903 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0x0);
14906 ProcessExpressionType(exp->__anon1.op.exp2);
14910 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)))
14912 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
14913 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14914 exp->expType = type1;
14918 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)))
14920 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
14921 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14922 exp->expType = type2;
14926 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))
14928 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
14932 unsigned int success = 0x0;
14934 if(type1->kind == 13 && type2->kind == 13)
14936 if(exp->__anon1.op.op == '+')
14937 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14938 else if(exp->__anon1.op.op == '-')
14940 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0, 0x0))
14942 exp->expType = __extension__ ({
14943 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14945 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
14948 if(type1->__anon1.type->kind == 20)
14950 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 0x1);
14954 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14956 ProcessExpressionType(classExp);
14958 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"))));
14959 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
14967 if(!success && exp->__anon1.op.exp1->type == 2)
14969 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
14972 FreeType(exp->expType);
14973 exp->expType = exp->__anon1.op.exp1->destType;
14974 if(exp->__anon1.op.exp1->destType)
14975 exp->__anon1.op.exp1->destType->refCount++;
14978 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
14981 FreeType(exp->expType);
14982 exp->expType = exp->__anon1.op.exp2->destType;
14983 if(exp->__anon1.op.exp2->destType)
14984 exp->__anon1.op.exp2->destType->refCount++;
14990 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
14993 FreeType(exp->expType);
14994 exp->expType = exp->__anon1.op.exp2->destType;
14995 if(exp->__anon1.op.exp2->destType)
14996 exp->__anon1.op.exp2->destType->refCount++;
14999 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15002 FreeType(exp->expType);
15003 exp->expType = exp->__anon1.op.exp1->destType;
15004 if(exp->__anon1.op.exp1->destType)
15005 exp->__anon1.op.exp1->destType->refCount++;
15011 char expString1[10240];
15012 char expString2[10240];
15016 expString1[0] = '\0';
15017 expString2[0] = '\0';
15022 PrintExpression(exp->__anon1.op.exp1, expString1);
15023 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15024 PrintExpression(exp->__anon1.op.exp2, expString2);
15025 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15026 PrintType(exp->__anon1.op.exp1->expType, type1, 0x0, 0x1);
15027 PrintType(exp->__anon1.op.exp2->expType, type2, 0x0, 0x1);
15029 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
15033 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)
15035 if(exp->__anon1.op.exp1->destType)
15036 FreeType(exp->__anon1.op.exp1->destType);
15037 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15038 if(type2->__anon1._class->__anon1.registered->dataType)
15039 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15040 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15041 exp->expType = type2;
15045 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)
15047 if(exp->__anon1.op.exp2->destType)
15048 FreeType(exp->__anon1.op.exp2->destType);
15049 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15050 if(type1->__anon1._class->__anon1.registered->dataType)
15051 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15052 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15053 exp->expType = type1;
15059 unsigned int valid = 0x0;
15061 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
15063 if(exp->__anon1.op.exp2->destType)
15064 FreeType(exp->__anon1.op.exp2->destType);
15065 if(!type1->__anon1._class->__anon1.registered->dataType)
15066 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0x0);
15067 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15068 exp->__anon1.op.exp2->destType->refCount++;
15069 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15072 type2 = exp->__anon1.op.exp2->destType;
15075 exp->expType = type2;
15078 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
15080 if(exp->__anon1.op.exp1->destType)
15081 FreeType(exp->__anon1.op.exp1->destType);
15082 if(!type2->__anon1._class->__anon1.registered->dataType)
15083 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0x0);
15084 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15085 exp->__anon1.op.exp1->destType->refCount++;
15086 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15087 type1 = exp->__anon1.op.exp1->destType;
15088 exp->expType = type1;
15091 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
15093 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
15094 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
15096 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
15098 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15100 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0x0, 0x0))
15103 FreeType(exp->expType);
15104 exp->expType = exp->__anon1.op.exp2->expType;
15105 if(exp->__anon1.op.exp2->expType)
15106 exp->__anon1.op.exp2->expType->refCount++;
15110 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15112 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0x0, 0x0))
15115 FreeType(exp->expType);
15116 exp->expType = exp->__anon1.op.exp1->expType;
15117 if(exp->__anon1.op.exp1->expType)
15118 exp->__anon1.op.exp1->expType->refCount++;
15125 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15127 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0x0, 0x0))
15130 FreeType(exp->expType);
15131 exp->expType = exp->__anon1.op.exp1->expType;
15132 if(exp->__anon1.op.exp1->expType)
15133 exp->__anon1.op.exp1->expType->refCount++;
15137 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15139 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0x0, 0x0))
15142 FreeType(exp->expType);
15143 exp->expType = exp->__anon1.op.exp2->expType;
15144 if(exp->__anon1.op.exp2->expType)
15145 exp->__anon1.op.exp2->expType->refCount++;
15153 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))
15155 if(exp->__anon1.op.exp1->destType)
15156 FreeType(exp->__anon1.op.exp1->destType);
15157 exp->__anon1.op.exp1->destType = type2;
15159 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15162 FreeType(exp->expType);
15163 exp->expType = exp->__anon1.op.exp1->destType;
15164 if(exp->__anon1.op.exp1->destType)
15165 exp->__anon1.op.exp1->destType->refCount++;
15170 if(exp->__anon1.op.exp2->destType)
15171 FreeType(exp->__anon1.op.exp2->destType);
15172 exp->__anon1.op.exp2->destType = type1;
15174 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
15177 FreeType(exp->expType);
15178 exp->expType = exp->__anon1.op.exp2->destType;
15179 if(exp->__anon1.op.exp2->destType)
15180 exp->__anon1.op.exp2->destType->refCount++;
15182 else if(type1 && type2)
15184 char expString1[10240];
15185 char expString2[10240];
15186 char type1String[1024];
15187 char type2String[1024];
15189 expString1[0] = '\0';
15190 expString2[0] = '\0';
15191 type1String[0] = '\0';
15192 type2String[0] = '\0';
15195 PrintExpression(exp->__anon1.op.exp1, expString1);
15196 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15197 PrintExpression(exp->__anon1.op.exp2, expString2);
15198 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15199 PrintType(exp->__anon1.op.exp1->expType, type1String, 0x0, 0x1);
15200 PrintType(exp->__anon1.op.exp2->expType, type2String, 0x0, 0x1);
15202 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
15203 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
15205 exp->expType = exp->__anon1.op.exp1->expType;
15206 if(exp->__anon1.op.exp1->expType)
15207 exp->__anon1.op.exp1->expType->refCount++;
15209 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15211 exp->expType = exp->__anon1.op.exp2->expType;
15212 if(exp->__anon1.op.exp2->expType)
15213 exp->__anon1.op.exp2->expType->refCount++;
15221 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15223 struct Type * oldType = exp->__anon1.op.exp1->expType;
15225 exp->__anon1.op.exp1->expType = (((void *)0));
15226 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15229 exp->__anon1.op.exp1->expType = oldType;
15231 if(exp->__anon1.op.exp1->destType)
15232 FreeType(exp->__anon1.op.exp1->destType);
15233 exp->__anon1.op.exp1->destType = type2;
15235 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15238 FreeType(exp->expType);
15239 exp->expType = exp->__anon1.op.exp1->destType;
15240 if(exp->__anon1.op.exp1->destType)
15241 exp->__anon1.op.exp1->destType->refCount++;
15245 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
15247 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
15249 if(exp->__anon1.op.exp1->destType)
15250 FreeType(exp->__anon1.op.exp1->destType);
15251 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15252 if(type2->__anon1._class->__anon1.registered->dataType)
15253 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15254 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15256 if(exp->__anon1.op.op == '!')
15258 exp->expType = MkClassType("bool");
15259 exp->expType->truth = 0x1;
15263 exp->expType = type2;
15268 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
15270 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
15272 if(exp->__anon1.op.exp2->destType)
15273 FreeType(exp->__anon1.op.exp2->destType);
15274 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15275 if(type1->__anon1._class->__anon1.registered->dataType)
15276 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15277 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15279 exp->expType = type1;
15285 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
15287 char expString[10000];
15289 expString[0] = '\0';
15292 PrintExpression(exp->__anon1.op.exp1, expString);
15293 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15296 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15298 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
15300 char expString[10240];
15302 expString[0] = '\0';
15305 PrintExpression(exp->__anon1.op.exp2, expString);
15306 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15309 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15313 FreeType(exp->expType);
15314 exp->expType = MkClassType("bool");
15315 exp->expType->truth = 0x1;
15317 if(exp->__anon1.op.op != SIZEOF)
15318 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
15319 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
15321 DeclareType(exp->__anon1.op.exp2->expType, 0x0, 0x0);
15323 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
15324 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
15325 yylloc = oldyylloc;
15334 struct Expression * e;
15336 exp->isConstant = 0x1;
15337 for(e = (*exp->__anon1.list).first; e; e = e->next)
15339 unsigned int inced = 0x0;
15343 FreeType(e->destType);
15344 e->opDestType = exp->opDestType;
15345 e->destType = exp->destType;
15348 exp->destType->refCount++;
15349 e->destType->count++;
15353 ProcessExpressionType(e);
15355 exp->destType->count--;
15356 if(!exp->expType && !e->next)
15358 exp->expType = e->expType;
15360 e->expType->refCount++;
15363 exp->isConstant = 0x0;
15365 e = (*exp->__anon1.list).first;
15366 if(!e->next && e->type == 8)
15368 struct Expression * next = exp->next, * prev = exp->prev;
15370 FreeType(exp->expType);
15371 FreeType(exp->destType);
15372 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
15376 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
15377 ProcessExpressionType(exp);
15383 struct Expression * e;
15385 exp->isConstant = 0x1;
15386 ProcessExpressionType(exp->__anon1.index.exp);
15387 if(!exp->__anon1.index.exp->isConstant)
15388 exp->isConstant = 0x0;
15389 if(exp->__anon1.index.exp->expType)
15391 struct Type * source = exp->__anon1.index.exp->expType;
15393 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
15395 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
15396 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
15398 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
15400 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0x0);
15401 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
15403 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0x0);
15405 if(type->kind == 8)
15406 type->constant = 0x1;
15407 else if(type->kind == 13)
15409 struct Type * t = type;
15411 while(t->kind == 13)
15412 t = t->__anon1.type;
15415 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
15420 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
15422 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
15425 FreeType(e->destType);
15426 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
15428 ProcessExpressionType(e);
15433 exp->isConstant = 0x0;
15436 exp->expType = Dereference(exp->__anon1.index.exp->expType);
15438 DeclareType(exp->expType, 0x0, 0x0);
15443 struct Expression * e;
15444 struct Type * functionType;
15445 struct Type * methodType = (((void *)0));
15451 PrintExpression(exp->__anon1.call.exp, name);
15452 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
15454 PrintExpression(exp->__anon1.call.exp, name);
15457 if(exp->__anon1.call.exp->type == 0)
15459 struct Expression * idExp = exp->__anon1.call.exp;
15460 struct Identifier * id = idExp->__anon1.__anon1.identifier;
15462 if(!strcmp(id->string, "__builtin_frame_address"))
15464 exp->expType = ProcessTypeString("void *", 0x1);
15465 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15466 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15469 else if(!strcmp(id->string, "__ENDIAN_PAD"))
15471 exp->expType = ProcessTypeString("int", 0x1);
15472 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15473 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15476 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
15478 struct Expression * a = (((void *)0));
15479 struct Expression * b = (((void *)0));
15480 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
15482 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
15484 a = (*exp->__anon1.call.arguments).first;
15485 b = (*exp->__anon1.call.arguments).last;
15489 else if((*exp->__anon1.call.arguments).count == 1)
15491 a = (*exp->__anon1.call.arguments).first;
15496 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
15497 idExp->__anon1.__anon1.identifier = (((void *)0));
15498 FreeExpContents(exp);
15499 ProcessExpressionType(a);
15501 ProcessExpressionType(b);
15503 exp->__anon1.list = MkList();
15504 if(a->expType && (!b || b->expType))
15506 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
15510 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15511 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
15512 struct Declaration * decl;
15513 char temp1[1024], temp2[1024];
15515 GetTypeSpecs(a->expType, specs);
15516 if(a && !a->isConstant && a->type != 0)
15518 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
15519 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
15520 tempExp1 = QMkExpId(temp1);
15521 tempExp1->expType = a->expType;
15523 a->expType->refCount++;
15524 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
15526 if(b && !b->isConstant && b->type != 0)
15528 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
15529 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
15530 tempExp2 = QMkExpId(temp2);
15531 tempExp2->expType = b->expType;
15533 b->expType->refCount++;
15534 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
15536 decl = MkDeclaration(specs, decls);
15537 if(!curCompound->__anon1.compound.declarations)
15538 curCompound->__anon1.compound.declarations = MkList();
15539 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
15543 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
15545 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
15547 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
15548 exp->expType = a->expType;
15550 a->expType->refCount++;
15552 else if(!strcmp(id->string, "Abs"))
15554 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
15555 exp->expType = a->expType;
15557 a->expType->refCount++;
15559 else if(!strcmp(id->string, "Sgn"))
15561 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"))))));
15562 exp->expType = ProcessTypeString("int", 0x0);
15564 FreeExpression(tempExp1);
15566 FreeExpression(tempExp2);
15567 FreeIdentifier(id);
15573 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
15575 if(!exp->__anon1.call.exp->destType)
15577 exp->__anon1.call.exp->destType = dummy;
15580 ProcessExpressionType(exp->__anon1.call.exp);
15581 if(exp->__anon1.call.exp->destType == dummy)
15584 exp->__anon1.call.exp->destType = (((void *)0));
15588 functionType = exp->__anon1.call.exp->expType;
15589 if(functionType && functionType->kind == 16)
15591 methodType = functionType;
15592 functionType = methodType->__anon1.__anon3.method->dataType;
15593 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
15595 char typeString[1024];
15597 typeString[0] = '\0';
15599 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
15601 functionType->__anon1.__anon2.thisClass = (((void *)0));
15602 PrintType(functionType, typeString, 0x1, 0x1);
15603 functionType->__anon1.__anon2.thisClass = back;
15605 if(strstr(typeString, "thisclass"))
15607 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15608 struct Declarator * decl;
15611 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15613 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
15614 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))
15615 thisClassParams = 0x0;
15616 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15618 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
15620 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
15621 ProcessDeclarator(decl);
15622 thisClass = backupThisClass;
15624 thisClassParams = 0x1;
15625 functionType = ProcessType(specs, decl);
15626 functionType->refCount = 0;
15627 FinishTemplatesContext(context);
15629 FreeList(specs, FreeSpecifier);
15630 FreeDeclarator(decl);
15634 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
15636 struct Type * type = functionType->__anon1.type;
15638 if(!functionType->refCount)
15640 functionType->__anon1.type = (((void *)0));
15641 FreeType(functionType);
15643 functionType = type;
15645 if(functionType && functionType->kind != 11)
15647 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
15649 else if(functionType)
15651 unsigned int emptyParams = 0x0, noParams = 0x0;
15652 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
15653 struct Type * type = functionType->__anon1.__anon2.params.first;
15654 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
15656 struct Location oldyylloc = yylloc;
15660 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
15662 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
15665 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
15667 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)
15669 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
15672 e->destType = type;
15674 type = functionType->__anon1.__anon2.params.first;
15677 type->refCount = 0;
15679 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
15681 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
15682 type->byReference = functionType->byReference;
15683 type->typedByReference = functionType->typedByReference;
15686 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
15688 e->destType = type;
15690 type = functionType->__anon1.__anon2.params.first;
15693 type->refCount = 0;
15696 if(type && type->kind == 0)
15699 if(!type->refCount)
15701 type = (((void *)0));
15703 for(; e; e = e->next)
15705 if(!type && !emptyParams)
15708 if(methodType && methodType->__anon1.__anon3.methodClass)
15709 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);
15711 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);
15714 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
15716 struct Type * templatedType = (((void *)0));
15717 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
15718 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
15721 if(_class && _class->templateArgs)
15723 struct __ecereNameSpace__ecere__com__Class * sClass;
15725 for(sClass = _class; sClass; sClass = sClass->base)
15727 if(sClass->templateClass)
15728 sClass = sClass->templateClass;
15730 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
15732 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
15734 struct __ecereNameSpace__ecere__com__Class * nextClass;
15736 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
15738 if(nextClass->templateClass)
15739 nextClass = nextClass->templateClass;
15740 id += nextClass->templateParams.count;
15750 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
15752 unsigned int constant = type->constant;
15753 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
15756 struct Context * context = SetupTemplatesContext(_class);
15758 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
15759 FinishTemplatesContext(context);
15761 if(templatedType->kind == 8 && constant)
15762 templatedType->constant = 0x1;
15763 else if(templatedType->kind == 13)
15765 struct Type * t = templatedType->__anon1.type;
15767 while(t->kind == 13)
15768 t = t->__anon1.type;
15770 t->constant = constant;
15772 e->destType = templatedType;
15775 templatedType->passAsTemplate = 0x1;
15780 e->destType = type;
15787 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
15789 e->destType = type->prev;
15790 e->destType->refCount++;
15794 e->destType = type;
15799 if(type && type->kind != 14)
15801 struct Type * next = type->next;
15803 if(!type->refCount)
15808 if(type && type->kind != 14)
15810 if(methodType && methodType->__anon1.__anon3.methodClass)
15811 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);
15813 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);
15815 yylloc = oldyylloc;
15816 if(type && !type->refCount)
15821 functionType = __extension__ ({
15822 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15824 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
15826 if(exp->__anon1.call.exp->type == 0)
15828 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
15832 struct Symbol * symbol;
15833 struct Location oldyylloc = yylloc;
15835 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
15836 if(strstr(string, "__builtin_") == string)
15840 functionType->__anon1.__anon2.returnType = exp->destType;
15841 exp->destType->refCount++;
15845 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
15846 symbol = __extension__ ({
15847 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
15849 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 0x1), __ecereInstance1;
15851 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
15852 if(strstr(symbol->string, "::"))
15853 globalContext->hasNameSpace = 0x1;
15854 yylloc = oldyylloc;
15857 else if(exp->__anon1.call.exp->type == 8)
15861 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
15862 if(!functionType->__anon1.__anon2.returnType)
15864 functionType->__anon1.__anon2.returnType = __extension__ ({
15865 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15867 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
15871 if(functionType && functionType->kind == 11)
15873 exp->expType = functionType->__anon1.__anon2.returnType;
15874 if(functionType->__anon1.__anon2.returnType)
15875 functionType->__anon1.__anon2.returnType->refCount++;
15876 if(!functionType->refCount)
15877 FreeType(functionType);
15879 if(exp->__anon1.call.arguments)
15881 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
15882 ProcessExpressionType(e);
15888 struct Type * type;
15889 struct Location oldyylloc = yylloc;
15890 unsigned int thisPtr;
15891 struct Expression * checkExp = exp->__anon1.member.exp;
15895 if(checkExp->type == 11)
15896 checkExp = checkExp->__anon1.cast.exp;
15897 else if(checkExp->type == 5)
15898 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
15902 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
15903 exp->thisPtr = thisPtr;
15904 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
15906 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
15908 ProcessExpressionType(exp->__anon1.member.exp);
15909 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)
15911 exp->isConstant = 0x0;
15914 exp->isConstant = exp->__anon1.member.exp->isConstant;
15915 type = exp->__anon1.member.exp->expType;
15917 if(type && (type->kind == 20))
15919 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
15920 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
15924 for(param = _class->templateParams.first; param; param = param->next)
15926 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
15930 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
15932 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
15936 struct Expression * expMember = exp->__anon1.member.exp;
15937 struct Declarator * decl;
15938 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15939 char thisClassTypeString[1024];
15941 FreeIdentifier(exp->__anon1.member.member);
15942 ProcessExpressionType(argExp);
15944 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
15948 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
15949 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
15952 strcpy(thisClassTypeString, _class->fullName);
15954 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
15955 exp->expType = ProcessType(specs, decl);
15956 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
15958 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
15959 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
15960 int paramCount = 0;
15961 int lastParam = -1;
15962 char templateString[1024];
15963 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
15965 sprintf(templateString, "%s<", expClass->templateClass->fullName);
15966 for(cClass = expClass; cClass; cClass = cClass->base)
15970 for(param = cClass->templateParams.first; param; param = param->next)
15973 struct __ecereNameSpace__ecere__com__Class * sClass;
15974 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
15976 for(sClass = cClass->base; sClass; sClass = sClass->base)
15977 id += sClass->templateParams.count;
15978 arg = expClass->templateArgs[id];
15979 for(sClass = _class; sClass; sClass = sClass->base)
15981 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
15983 struct __ecereNameSpace__ecere__com__Class * nextClass;
15985 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
15986 p += nextClass->templateParams.count;
15987 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
15989 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
15991 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
15993 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
15994 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
16001 char argument[256];
16003 argument[0] = '\0';
16004 switch(param->type)
16008 char expString[1024];
16009 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16010 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16011 struct Expression * exp;
16012 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16014 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16015 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16016 ProcessExpressionType(exp);
16017 ComputeExpression(exp);
16018 expString[0] = '\0';
16019 PrintExpression(exp, expString);
16020 strcat(argument, expString);
16021 FreeExpression(exp);
16026 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16031 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16033 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
16034 strcat(argument, thisClassTypeString);
16036 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16044 strcat(templateString, ", ");
16045 if(lastParam != p - 1)
16047 strcat(templateString, param->name);
16048 strcat(templateString, " = ");
16050 strcat(templateString, argument);
16059 int len = strlen(templateString);
16061 if(templateString[len - 1] == '>')
16062 templateString[len++] = ' ';
16063 templateString[len++] = '>';
16064 templateString[len++] = '\0';
16067 struct Context * context = SetupTemplatesContext(_class);
16069 FreeType(exp->expType);
16070 exp->expType = ProcessTypeString(templateString, 0x0);
16071 FinishTemplatesContext(context);
16075 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")))))))));
16078 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
16080 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
16083 if(type && (type->kind == 20))
16085 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)))
16087 struct Identifier * id = exp->__anon1.member.member;
16088 int typeKind = type->kind;
16089 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));
16091 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
16093 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
16098 if(typeKind == 3 || typeKind == 15)
16099 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
16102 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
16104 _class = type->__anon1._class->__anon1.registered;
16106 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
16108 _class = FindClass("char *")->__anon1.registered;
16110 else if(type->kind == 13)
16112 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
16113 FreeType(exp->expType);
16114 exp->expType = ProcessTypeString("uintptr", 0x0);
16115 exp->byReference = 0x1;
16119 char string[1024] = "";
16120 struct Symbol * classSym;
16122 PrintTypeNoConst(type, string, 0x0, 0x1);
16123 classSym = FindClass(string);
16125 _class = classSym->__anon1.registered;
16131 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
16132 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
16133 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
16134 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
16135 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
16137 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
16138 exp->__anon1.member.memberType = 1;
16139 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
16140 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
16143 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
16145 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16146 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
16148 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16150 member = (((void *)0));
16152 if(!member && !prop)
16153 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16154 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
16155 exp->__anon1.member.thisPtr = 0x1;
16159 unsigned int useMemberForNonConst = 0x0;
16163 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
16164 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);
16165 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16166 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
16168 if((!prop || useMemberForNonConst) && !member)
16170 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
16173 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16174 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);
16175 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16176 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16181 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
16182 prop = (((void *)0));
16184 member = (((void *)0));
16188 if(!prop && !member && !method)
16189 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
16190 if(!prop && !member && !method)
16194 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
16197 exp->__anon1.member.memberType = 5;
16198 exp->expType = ProcessTypeString(classProp->dataTypeString, 0x0);
16202 char structName[1024];
16203 struct Identifier * id = exp->__anon1.member.member;
16204 struct Expression * classExp = exp->__anon1.member.exp;
16207 FreeType(classExp->expType);
16208 classExp->expType = ProcessTypeString("ecere::com::Class", 0x0);
16209 strcpy(structName, "__ecereClassData_");
16210 FullClassNameCat(structName, type->__anon1._class->string, 0x0);
16212 exp->__anon1.member.member = id;
16213 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"))))))));
16215 ProcessExpressionType(exp);
16221 struct Symbol * classSym = FindClass(id->string);
16225 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
16228 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
16232 if(!exp->__anon1.member.exp->destType)
16234 if(method && !method->_class->symbol)
16235 method->_class->symbol = FindClass(method->_class->fullName);
16236 exp->__anon1.member.exp->destType = __extension__ ({
16237 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16239 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 8, __ecereInstance1->__anon1._class = prop ? prop->_class->symbol : method ? method->_class->symbol : _class->symbol, __ecereInstance1;
16244 exp->__anon1.member.memberType = 1;
16245 if(!prop->dataType)
16246 ProcessPropertyType(prop);
16247 exp->expType = prop->dataType;
16248 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
16250 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16252 CopyTypeInto(type, exp->expType);
16253 type->refCount = 1;
16254 type->constant = 0x1;
16255 exp->expType = type;
16257 else if(prop->dataType)
16258 prop->dataType->refCount++;
16262 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16264 FreeExpContents(exp);
16266 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16267 ProcessExpressionType(exp);
16270 exp->__anon1.member.memberType = 3;
16271 DeclareStruct(_class->fullName, 0x0);
16272 if(!member->dataType)
16274 struct Context * context = SetupTemplatesContext(_class);
16276 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
16277 FinishTemplatesContext(context);
16279 exp->expType = member->dataType;
16280 if(member->dataType)
16281 member->dataType->refCount++;
16283 else if(revConvert)
16285 exp->__anon1.member.memberType = 4;
16286 exp->expType = MkClassType(revConvert->_class->fullName);
16291 exp->__anon1.member.memberType = 2;
16293 if(!method->dataType)
16294 ProcessMethodType(method);
16295 exp->expType = __extension__ ({
16296 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16298 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
16300 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
16301 exp->expType->__anon1.__anon3.usedClass = _class;
16303 else if(!classProp)
16305 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16307 FreeExpContents(exp);
16309 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16310 FreeType(exp->expType);
16311 exp->expType = MkClassType("ecere::com::Class");
16314 yylloc = exp->__anon1.member.member->loc;
16315 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
16317 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
16319 if(_class && exp->expType)
16321 struct __ecereNameSpace__ecere__com__Class * tClass;
16323 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
16324 while(tClass && !tClass->templateClass)
16325 tClass = tClass->base;
16326 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
16329 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16330 struct __ecereNameSpace__ecere__com__Class * sClass;
16332 for(sClass = tClass; sClass; sClass = sClass->base)
16335 if(sClass->templateClass)
16336 sClass = sClass->templateClass;
16337 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16339 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
16341 for(sClass = sClass->base; sClass; sClass = sClass->base)
16342 id += sClass->templateParams.count;
16350 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
16352 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16353 struct Context * context = SetupTemplatesContext(tClass);
16354 unsigned int constant = exp->expType->constant;
16356 FreeType(exp->expType);
16357 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16358 if(exp->expType->kind == 8 && constant)
16359 exp->expType->constant = 0x1;
16360 else if(exp->expType->kind == 13)
16362 struct Type * t = exp->expType->__anon1.type;
16364 while(t->kind == 13)
16365 t = t->__anon1.type;
16367 t->constant = constant;
16371 if(exp->expType->kind == 21)
16373 FreeType(exp->expType);
16374 exp->expType = ReplaceThisClassType(_class);
16376 if(tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType))))
16377 exp->expType->passAsTemplate = 0x1;
16380 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16381 if(exp->destType->kind == 8 && constant)
16382 exp->destType->constant = 0x1;
16383 else if(exp->destType->kind == 13)
16385 struct Type * t = exp->destType->__anon1.type;
16387 while(t->kind == 13)
16388 t = t->__anon1.type;
16390 t->constant = constant;
16392 if(exp->destType->kind == 21)
16394 FreeType(exp->destType);
16395 exp->destType = ReplaceThisClassType(_class);
16399 FinishTemplatesContext(context);
16402 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)
16405 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16406 struct __ecereNameSpace__ecere__com__Class * sClass;
16408 for(sClass = tClass; sClass; sClass = sClass->base)
16411 if(sClass->templateClass)
16412 sClass = sClass->templateClass;
16413 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16415 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
16417 for(sClass = sClass->base; sClass; sClass = sClass->base)
16418 id += sClass->templateParams.count;
16428 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16429 struct Context * context = SetupTemplatesContext(tClass);
16430 struct Type * basicType;
16432 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16435 if(basicType->kind == 21)
16437 FreeType(basicType);
16438 basicType = ReplaceThisClassType(_class);
16440 FreeType(exp->expType);
16441 exp->expType = __extension__ ({
16442 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16444 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
16448 exp->destType = exp->expType;
16449 exp->destType->refCount++;
16452 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16453 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16454 struct Declarator * decl;
16456 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
16459 exp->destType->refCount++;
16461 exp->expType->refCount++;
16463 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
16464 exp->__anon1.cast.exp = newExp;
16467 FinishTemplatesContext(context);
16470 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
16472 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
16476 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
16478 int paramCount = 0;
16479 int lastParam = -1;
16480 char templateString[1024];
16481 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
16483 sprintf(templateString, "%s<", expClass->templateClass->fullName);
16484 while(cClass != expClass)
16486 struct __ecereNameSpace__ecere__com__Class * sClass;
16488 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
16491 for(param = cClass->templateParams.first; param; param = param->next)
16493 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
16495 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
16496 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
16498 while(cClassCur != tClass && !paramCur)
16500 struct __ecereNameSpace__ecere__com__Class * sClassCur;
16502 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
16504 cClassCur = sClassCur;
16505 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
16507 if(!strcmp(paramCur->name, param->name))
16514 if(paramCur && paramCur->type == 0)
16515 arg = tClass->templateArgs[cp];
16517 arg = expClass->templateArgs[p];
16519 char argument[256];
16521 argument[0] = '\0';
16522 switch(param->type)
16526 char expString[1024];
16527 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16528 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16529 struct Expression * exp;
16530 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16532 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16533 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16534 ProcessExpressionType(exp);
16535 ComputeExpression(exp);
16536 expString[0] = '\0';
16537 PrintExpression(exp, expString);
16538 strcat(argument, expString);
16539 FreeExpression(exp);
16544 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16549 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16550 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16557 strcat(templateString, ", ");
16558 if(lastParam != p - 1)
16560 strcat(templateString, param->name);
16561 strcat(templateString, " = ");
16563 strcat(templateString, argument);
16572 int len = strlen(templateString);
16574 if(templateString[len - 1] == '>')
16575 templateString[len++] = ' ';
16576 templateString[len++] = '>';
16577 templateString[len++] = '\0';
16579 FreeType(exp->expType);
16581 struct Context * context = SetupTemplatesContext(tClass);
16583 exp->expType = ProcessTypeString(templateString, 0x0);
16584 FinishTemplatesContext(context);
16591 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)");
16593 else if(type && (type->kind == 9 || type->kind == 10))
16595 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
16599 exp->expType = memberType;
16601 memberType->refCount++;
16606 char expString[10240];
16608 expString[0] = '\0';
16611 PrintExpression(exp, expString);
16612 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16614 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
16616 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
16618 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
16620 struct Identifier * id = exp->__anon1.member.member;
16621 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));
16625 FreeType(exp->expType);
16626 exp->expType = ReplaceThisClassType(_class);
16630 yylloc = oldyylloc;
16635 struct Type * destType = exp->destType;
16637 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
16639 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
16641 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
16645 ProcessExpressionType(exp);
16652 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
16654 if(classSym && classSym->__anon1.registered)
16656 if(classSym->__anon1.registered->type == 5)
16661 DeclareStruct(classSym->string, 0x0);
16662 FreeSpecifier(exp->__anon1._class);
16664 FullClassNameCat(name, classSym->string, 0x0);
16665 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
16669 if(classSym->__anon1.registered->fixed)
16671 FreeSpecifier(exp->__anon1._class);
16672 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
16677 char className[1024];
16679 strcpy(className, "__ecereClass_");
16680 FullClassNameCat(className, classSym->string, 0x1);
16681 DeclareClass(classSym, className);
16682 FreeExpContents(exp);
16684 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
16685 exp->__anon1.member.member = MkIdentifier("structSize");
16689 exp->expType = __extension__ ({
16690 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16692 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16698 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
16700 exp->expType = __extension__ ({
16701 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16703 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16705 exp->isConstant = 0x1;
16706 DeclareType(type, 0x0, 0x0);
16712 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
16715 FreeType(exp->__anon1.cast.exp->destType);
16716 exp->__anon1.cast.exp->destType = type;
16718 type->casted = 0x1;
16719 ProcessExpressionType(exp->__anon1.cast.exp);
16720 type->casted = 0x0;
16722 exp->expType = type;
16723 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
16725 void * prev = exp->prev, * next = exp->next;
16726 struct Type * expType = exp->__anon1.cast.exp->destType;
16727 struct Expression * castExp = exp->__anon1.cast.exp;
16728 struct Type * destType = exp->destType;
16731 expType->refCount++;
16732 FreeType(exp->expType);
16733 FreeTypeName(exp->__anon1.cast.typeName);
16735 FreeType(exp->expType);
16736 FreeType(exp->destType);
16737 exp->expType = expType;
16738 exp->destType = destType;
16739 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
16745 exp->isConstant = exp->__anon1.cast.exp->isConstant;
16751 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
16753 exp->expType = type;
16758 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
16760 ProcessExpressionType(exp->__anon1.vaArg.exp);
16761 exp->expType = type;
16766 struct Expression * e;
16768 exp->isConstant = 0x1;
16769 FreeType(exp->__anon1.cond.cond->destType);
16770 exp->__anon1.cond.cond->destType = MkClassType("bool");
16771 exp->__anon1.cond.cond->destType->truth = 0x1;
16772 ProcessExpressionType(exp->__anon1.cond.cond);
16773 if(!exp->__anon1.cond.cond->isConstant)
16774 exp->isConstant = 0x0;
16775 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
16779 FreeType(e->destType);
16780 e->destType = exp->destType;
16782 e->destType->refCount++;
16784 ProcessExpressionType(e);
16787 exp->expType = e->expType;
16789 e->expType->refCount++;
16792 exp->isConstant = 0x0;
16794 FreeType(exp->__anon1.cond.elseExp->destType);
16795 exp->__anon1.cond.elseExp->destType = exp->destType ? exp->destType : exp->expType;
16796 if(exp->__anon1.cond.elseExp->destType)
16797 exp->__anon1.cond.elseExp->destType->refCount++;
16798 ProcessExpressionType(exp->__anon1.cond.elseExp);
16799 if(!exp->__anon1.cond.elseExp->isConstant)
16800 exp->isConstant = 0x0;
16805 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
16807 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
16809 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
16811 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
16813 exp->destType->refCount++;
16815 ProcessStatement(exp->__anon1.compound);
16816 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
16818 exp->expType->refCount++;
16824 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
16826 if(spec && spec->type == 1)
16828 exp->expType = MkClassType(spec->__anon1.__anon1.name);
16829 exp->expType->kind = 19;
16830 exp->byReference = 0x1;
16834 exp->expType = MkClassType("ecere::com::Class");
16835 exp->byReference = 0x1;
16841 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
16845 struct Identifier * id = exp->__anon1.classData.id;
16846 char structName[1024];
16847 struct Expression * classExp;
16849 strcpy(structName, "__ecereClassData_");
16850 FullClassNameCat(structName, _class->fullName, 0x0);
16852 exp->__anon1.member.member = id;
16853 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0x0, 0x0))
16854 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
16856 classExp = MkExpIdentifier(MkIdentifier("class"));
16857 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"))))))));
16858 ProcessExpressionType(exp);
16865 struct Type * type = (((void *)0));
16866 const char * typeString = (((void *)0));
16867 char typeStringBuf[1024];
16869 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))
16871 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
16873 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
16875 else if(exp->__anon1.list)
16877 struct Expression * e;
16879 for(e = (*exp->__anon1.list).first; e; e = e->next)
16881 ProcessExpressionType(e);
16891 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
16895 e->expType = (((void *)0));
16896 e = (*exp->__anon1.list).first;
16897 ProcessExpressionType(e);
16900 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
16902 FreeType(e->expType);
16903 e->expType = (((void *)0));
16905 type = (((void *)0));
16913 FreeType(e->expType);
16914 e->expType = (((void *)0));
16920 typeStringBuf[0] = '\0';
16921 PrintTypeNoConst(type, typeStringBuf, 0x0, 0x1);
16922 typeString = typeStringBuf;
16924 type = (((void *)0));
16929 char templateString[1024];
16930 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
16931 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
16932 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16933 struct Expression * expExt;
16934 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
16936 sprintf(templateString, "Container<%s>", typeString);
16937 if(exp->__anon1.list)
16939 struct Expression * e;
16941 type = ProcessTypeString(typeString, 0x0);
16942 while((e = (*exp->__anon1.list).first))
16944 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
16945 e->destType = type;
16947 ProcessExpressionType(e);
16948 ListAdd(initializers, MkInitializerAssignment(e));
16951 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16953 DeclareStruct("ecere::com::BuiltInContainer", 0x0);
16954 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
16955 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16956 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
16957 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16958 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
16959 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16960 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
16961 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16962 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
16963 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16965 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, &(*initializers).count, (void *)0), __ecereInstance1;
16967 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16968 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, CopySpecifier), CopyDeclarator(decl))));
16969 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16970 exp->expType = ProcessTypeString(templateString, 0x0);
16972 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
16973 ProcessExpressionType(expExt);
16977 exp->expType = ProcessTypeString("Container", 0x0);
16978 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
16983 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
16985 FreeType(exp->expType);
16986 exp->expType = ReplaceThisClassType(thisClass);
16988 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)
16990 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 0x1, 0x0);
16994 if(exp->expType->kind != 15)
16996 struct Type * member;
16997 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
16999 FreeType(exp->expType);
17000 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17001 exp->expType->kind = symbol->type->kind;
17002 exp->expType->refCount++;
17003 exp->expType->__anon1.__anon1.enumName = enumName;
17004 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
17005 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17006 member->refCount++;
17010 struct __ecereNameSpace__ecere__sys__NamedLink * member;
17012 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17014 struct __ecereNameSpace__ecere__sys__NamedLink * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
17016 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
17022 if(exp->destType && (exp->destType->kind == 18))
17024 else if(exp->destType && !exp->destType->keepCast)
17026 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
17027 exp->needTemplateCast = 1;
17028 if(exp->destType->kind == 0)
17030 else if(!CheckExpressionType(exp, exp->destType, 0x0, !exp->destType->casted))
17032 if(!exp->destType->count || unresolved)
17037 if(exp->destType->kind != 14)
17044 char expString[10240];
17046 expString[0] = '\0';
17047 PrintType(exp->destType, type2, 0x0, 0x1);
17050 PrintExpression(exp, expString);
17051 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17054 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
17055 else if(exp->type != 16)
17056 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
17061 char expString[10240];
17063 expString[0] = '\0';
17066 PrintExpression(exp, expString);
17067 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17070 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
17071 else if(exp->type != 16)
17072 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17084 PrintType(exp->expType, type1, 0x0, 0x1);
17085 PrintType(exp->destType, type2, 0x0, 0x1);
17087 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)))
17091 char expString[10240];
17093 expString[0] = '\0';
17096 PrintExpression(exp, expString);
17097 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17099 if(!sourceFile || (strcmp(sourceFile, "src\\lexer.ec") && strcmp(sourceFile, "src/lexer.ec") && strcmp(sourceFile, "src\\grammar.ec") && strcmp(sourceFile, "src/grammar.ec")))
17100 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
17101 FreeType(exp->expType);
17102 exp->destType->refCount++;
17103 exp->expType = exp->destType;
17109 else if(unresolved)
17111 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
17112 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);
17113 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
17114 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
17116 else if(!exp->expType && exp->type != 16)
17118 char expString[10240];
17120 expString[0] = '\0';
17123 PrintExpression(exp, expString);
17124 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17126 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17129 ApplyAnyObjectLogic(exp);
17130 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)))
17132 exp->byReference = 0x1;
17134 yylloc = oldyylloc;
17137 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)
17141 *curMember = (*curMember)->next;
17142 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
17144 *curMember = subMemberStack[--(*subMemberStackPos)];
17145 *curMember = (*curMember)->next;
17147 while((*curMember) && (*curMember)->isProperty)
17148 *curMember = (*curMember)->next;
17149 if(subMemberStackPos)
17151 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17153 subMemberStack[(*subMemberStackPos)++] = *curMember;
17154 *curMember = (*curMember)->members.first;
17155 while(*curMember && (*curMember)->isProperty)
17156 *curMember = (*curMember)->next;
17164 if(subMemberStackPos && *subMemberStackPos)
17166 *curMember = subMemberStack[--(*subMemberStackPos)];
17167 *curMember = (*curMember)->next;
17171 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
17173 if(*curClass == _class)
17175 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
17177 *curMember = (*curClass)->membersAndProperties.first;
17179 while((*curMember) && (*curMember)->isProperty)
17180 *curMember = (*curMember)->next;
17181 if(subMemberStackPos)
17183 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17185 subMemberStack[(*subMemberStackPos)++] = *curMember;
17186 *curMember = (*curMember)->members.first;
17187 while(*curMember && (*curMember)->isProperty)
17188 *curMember = (*curMember)->next;
17195 static void ProcessInitializer(struct Initializer * init, struct Type * type)
17200 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
17202 if(init->__anon1.exp && !init->__anon1.exp->destType)
17204 FreeType(init->__anon1.exp->destType);
17205 init->__anon1.exp->destType = type;
17209 if(init->__anon1.exp)
17211 ProcessExpressionType(init->__anon1.exp);
17212 init->isConstant = init->__anon1.exp->isConstant;
17218 struct Expression * exp = init->__anon1.exp;
17219 struct Instantiation * inst = exp->__anon1.instance;
17220 struct MembersInit * members;
17223 init->__anon1.list = MkList();
17226 for(members = (*inst->members).first; members; members = members->next)
17228 if(members->type == 0)
17230 struct MemberInit * member;
17232 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
17234 ListAdd(init->__anon1.list, member->initializer);
17235 member->initializer = (((void *)0));
17240 FreeExpression(exp);
17244 struct Initializer * i;
17245 struct Type * initializerType = (((void *)0));
17246 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
17247 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
17248 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
17249 int subMemberStackPos = 0;
17251 if(type && type->kind == 12)
17252 initializerType = Dereference(type);
17253 else if(type && (type->kind == 9 || type->kind == 10))
17254 initializerType = type->__anon1.__anon1.members.first;
17255 for(i = (*init->__anon1.list).first; i; i = i->next)
17257 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17259 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
17262 if(!curMember->dataType)
17263 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0x0);
17264 initializerType = curMember->dataType;
17267 ProcessInitializer(i, initializerType);
17268 if(initializerType && type && (type->kind == 9 || type->kind == 10))
17269 initializerType = initializerType->next;
17271 init->isConstant = 0x0;
17273 if(type && type->kind == 12)
17274 FreeType(initializerType);
17275 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))
17277 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
17284 extern struct Symbol * FindType(struct Context * ctx, const char * name);
17286 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
17288 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct)
17294 if(spec->__anon1.specifier == THISCLASS)
17299 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17300 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17301 ProcessSpecifier(spec, declareStruct);
17308 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
17311 DeclareType(symbol->type, 0x1, 0x1);
17312 else if((symbol = spec->__anon1.__anon1.symbol) && symbol->__anon1.registered && symbol->__anon1.registered->type == 1 && declareStruct)
17313 DeclareStruct(spec->__anon1.__anon1.name, 0x0);
17318 struct Enumerator * e;
17320 if(spec->__anon1.__anon2.list)
17322 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
17325 ProcessExpressionType(e->exp);
17333 if(spec->__anon1.__anon2.definitions)
17335 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
17337 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
17344 static void ProcessDeclarator(struct Declarator * decl)
17349 if(decl->__anon1.identifier->classSym)
17351 FreeSpecifier(decl->__anon1.identifier->_class);
17352 decl->__anon1.identifier->_class = (((void *)0));
17356 if(decl->__anon1.array.exp)
17357 ProcessExpressionType(decl->__anon1.array.exp);
17364 if(decl->declarator)
17365 ProcessDeclarator(decl->declarator);
17366 if(decl->type == 4)
17368 struct Identifier * id = GetDeclId(decl);
17370 if(id && id->_class)
17372 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(id->_class), param->declarator = (((void *)0)), param);
17374 if(!decl->__anon1.function.parameters)
17375 decl->__anon1.function.parameters = MkList();
17376 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
17377 id->_class = (((void *)0));
17379 if(decl->__anon1.function.parameters)
17381 struct TypeName * param;
17383 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
17385 if(param->qualifiers && (*param->qualifiers).first)
17387 struct Specifier * spec = (*param->qualifiers).first;
17389 if(spec && spec->__anon1.specifier == TYPED_OBJECT)
17391 struct Declarator * d = param->declarator;
17392 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);
17395 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
17396 FreeList(param->qualifiers, FreeSpecifier);
17397 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
17398 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
17399 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
17402 else if(spec && spec->__anon1.specifier == ANY_OBJECT)
17404 struct Declarator * d = param->declarator;
17406 FreeList(param->qualifiers, FreeSpecifier);
17407 param->qualifiers = MkListOne(MkSpecifier(VOID));
17409 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
17410 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
17412 else if(spec->__anon1.specifier == THISCLASS)
17417 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17418 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17419 ProcessSpecifier(spec, 0x0);
17423 if(param->declarator)
17424 ProcessDeclarator(param->declarator);
17432 extern struct Identifier * CopyIdentifier(struct Identifier * id);
17434 extern void FreeInitDeclarator(struct InitDeclarator * decl);
17436 static void ProcessDeclaration(struct Declaration * decl)
17438 yylloc = decl->loc;
17443 unsigned int declareStruct = 0x0;
17445 if(decl->__anon1.__anon1.declarators)
17447 struct InitDeclarator * d;
17449 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17451 struct Type * type, * subType;
17453 ProcessDeclarator(d->declarator);
17454 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17457 ProcessInitializer(d->initializer, type);
17458 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
17460 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
17462 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
17464 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
17465 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
17466 if(decl->__anon1.__anon1.specifiers)
17467 FreeList(decl->__anon1.__anon1.specifiers, FreeSpecifier);
17468 FreeList(decl->__anon1.__anon1.declarators, FreeInitDeclarator);
17471 decl->__anon1.inst = inst;
17475 for(subType = type; subType; )
17477 if(subType->kind == 8)
17479 declareStruct = 0x1;
17482 else if(subType->kind == 13)
17484 else if(subType->kind == 12)
17485 subType = subType->__anon1.__anon4.arrayType;
17494 if(decl->__anon1.__anon1.specifiers)
17496 struct Specifier * s;
17498 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
17500 ProcessSpecifier(s, declareStruct);
17507 ProcessInstantiationType(decl->__anon1.inst);
17512 struct Specifier * spec;
17513 struct Declarator * d;
17514 unsigned int declareStruct = 0x0;
17516 if(decl->__anon1.__anon1.declarators)
17518 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17520 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17521 struct Type * subType;
17523 ProcessDeclarator(d);
17524 for(subType = type; subType; )
17526 if(subType->kind == 8)
17528 declareStruct = 0x1;
17531 else if(subType->kind == 13)
17533 else if(subType->kind == 12)
17534 subType = subType->__anon1.__anon4.arrayType;
17541 if(decl->__anon1.__anon1.specifiers)
17543 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
17544 ProcessSpecifier(spec, declareStruct);
17551 static struct FunctionDefinition * curFunction;
17553 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
17555 char propName[1024], propNameM[1024];
17556 char getName[1024], setName[1024];
17557 struct __ecereNameSpace__ecere__sys__OldList * args;
17559 DeclareProperty(prop, setName, getName);
17560 strcpy(propName, "__ecereProp_");
17561 FullClassNameCat(propName, prop->_class->fullName, 0x0);
17562 strcat(propName, "_");
17563 FullClassNameCat(propName, prop->name, 0x1);
17564 strcpy(propNameM, "__ecerePropM_");
17565 FullClassNameCat(propNameM, prop->_class->fullName, 0x0);
17566 strcat(propNameM, "_");
17567 FullClassNameCat(propNameM, prop->name, 0x1);
17568 if(prop->isWatchable)
17571 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17572 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17573 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17575 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17576 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17577 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17581 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17582 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17583 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17585 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17586 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17587 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17589 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
17590 curFunction->propSet->fireWatchersDone = 0x1;
17593 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
17595 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
17597 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
17599 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
17601 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
17603 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
17605 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
17607 extern void FreePropertyWatch(struct PropertyWatch * watcher);
17609 static void ProcessStatement(struct Statement * stmt)
17611 yylloc = stmt->loc;
17615 ProcessStatement(stmt->__anon1.labeled.stmt);
17618 if(stmt->__anon1.caseStmt.exp)
17620 FreeType(stmt->__anon1.caseStmt.exp->destType);
17621 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
17623 curSwitchType->refCount++;
17624 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
17625 ComputeExpression(stmt->__anon1.caseStmt.exp);
17627 if(stmt->__anon1.caseStmt.stmt)
17628 ProcessStatement(stmt->__anon1.caseStmt.stmt);
17632 if(stmt->__anon1.compound.context)
17634 struct Declaration * decl;
17635 struct Statement * s;
17636 struct Statement * prevCompound = curCompound;
17637 struct Context * prevContext = curContext;
17639 if(!stmt->__anon1.compound.isSwitch)
17640 curCompound = stmt;
17641 curContext = stmt->__anon1.compound.context;
17642 if(stmt->__anon1.compound.declarations)
17644 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
17645 ProcessDeclaration(decl);
17647 if(stmt->__anon1.compound.statements)
17649 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
17650 ProcessStatement(s);
17652 curContext = prevContext;
17653 curCompound = prevCompound;
17659 struct Expression * exp;
17661 if(stmt->__anon1.expressions)
17663 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
17664 ProcessExpressionType(exp);
17670 struct Expression * exp;
17672 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
17673 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
17674 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 0x1;
17675 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
17677 ProcessExpressionType(exp);
17679 if(stmt->__anon1.ifStmt.stmt)
17680 ProcessStatement(stmt->__anon1.ifStmt.stmt);
17681 if(stmt->__anon1.ifStmt.elseStmt)
17682 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
17687 struct Type * oldSwitchType = curSwitchType;
17689 if(stmt->__anon1.switchStmt.exp)
17691 struct Expression * exp;
17693 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
17697 ProcessExpressionType(exp);
17700 curSwitchType = exp->expType;
17703 ProcessStatement(stmt->__anon1.switchStmt.stmt);
17704 curSwitchType = oldSwitchType;
17709 if(stmt->__anon1.whileStmt.exp)
17711 struct Expression * exp;
17713 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
17714 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
17715 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 0x1;
17716 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
17718 ProcessExpressionType(exp);
17721 if(stmt->__anon1.whileStmt.stmt)
17722 ProcessStatement(stmt->__anon1.whileStmt.stmt);
17727 if(stmt->__anon1.doWhile.exp)
17729 struct Expression * exp;
17731 if((*stmt->__anon1.doWhile.exp).last)
17733 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
17734 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
17735 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 0x1;
17737 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
17739 ProcessExpressionType(exp);
17742 if(stmt->__anon1.doWhile.stmt)
17743 ProcessStatement(stmt->__anon1.doWhile.stmt);
17748 struct Expression * exp;
17750 if(stmt->__anon1.forStmt.init)
17751 ProcessStatement(stmt->__anon1.forStmt.init);
17752 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
17754 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
17755 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
17756 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 0x1;
17758 if(stmt->__anon1.forStmt.check)
17759 ProcessStatement(stmt->__anon1.forStmt.check);
17760 if(stmt->__anon1.forStmt.increment)
17762 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
17763 ProcessExpressionType(exp);
17765 if(stmt->__anon1.forStmt.stmt)
17766 ProcessStatement(stmt->__anon1.forStmt.stmt);
17771 struct Identifier * id = stmt->__anon1.forEachStmt.id;
17772 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
17773 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
17774 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
17775 char iteratorType[1024];
17776 struct Type * source;
17777 struct Expression * e;
17778 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));
17779 struct Expression * arrayExp;
17780 const char * typeString = (((void *)0));
17781 int builtinCount = 0;
17783 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
17787 FreeType(e->destType);
17788 e->destType = ProcessTypeString("Container", 0x0);
17790 if(!isBuiltin || e->next)
17791 ProcessExpressionType(e);
17793 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
17794 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)))
17796 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
17797 struct Symbol * symbol;
17798 struct Expression * expIt = (((void *)0));
17799 unsigned int isMap = 0x0, isArray = 0x0, isLinkList = 0x0, isList = 0x0, isCustomAVLTree = 0x0;
17800 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
17801 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
17802 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
17805 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
17806 stmt->__anon1.compound.context->parent = curContext;
17807 curContext = stmt->__anon1.compound.context;
17808 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
17810 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
17812 isCustomAVLTree = 0x1;
17813 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
17816 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
17818 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
17820 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
17823 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
17827 struct Declarator * decl;
17828 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17830 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
17831 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17832 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
17836 struct Type * type = (((void *)0));
17837 char typeStringBuf[1024];
17839 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
17840 if(((struct Expression *)(*exp).last)->type == 11)
17842 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
17845 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
17847 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)
17849 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
17851 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
17853 else if(arrayExp->__anon1.list)
17855 struct Expression * e;
17857 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
17859 ProcessExpressionType(e);
17869 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
17873 e->expType = (((void *)0));
17874 e = (*arrayExp->__anon1.list).first;
17875 ProcessExpressionType(e);
17878 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
17880 FreeType(e->expType);
17881 e->expType = (((void *)0));
17883 type = (((void *)0));
17891 FreeType(e->expType);
17892 e->expType = (((void *)0));
17898 typeStringBuf[0] = '\0';
17899 PrintType(type, typeStringBuf, 0x0, 0x1);
17900 typeString = typeStringBuf;
17906 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
17907 struct Declarator * decl;
17908 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17910 if(arrayExp->__anon1.list)
17912 struct Expression * e;
17914 builtinCount = (*arrayExp->__anon1.list).count;
17915 type = ProcessTypeString(typeString, 0x0);
17916 while((e = (*arrayExp->__anon1.list).first))
17918 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
17919 e->destType = type;
17921 ProcessExpressionType(e);
17922 ListAdd(initializers, MkInitializerAssignment(e));
17925 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
17927 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
17928 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, CopySpecifier), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
17929 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
17930 FreeList(exp, FreeExpression);
17934 arrayExp->expType = ProcessTypeString("Container", 0x0);
17935 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
17938 else if(isLinkList && !isList)
17940 struct Declarator * decl;
17941 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17943 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
17944 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17945 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
17947 else if(_class->templateArgs)
17950 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
17952 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
17953 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)))))))));
17955 symbol = FindSymbol(id->string, curContext, curContext, 0x0, 0x0);
17958 switch(block->type)
17961 if(block->__anon1.compound.context)
17962 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17965 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
17966 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17967 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
17968 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17971 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
17972 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17975 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
17976 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17979 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
17980 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17983 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
17984 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17987 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
17988 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17994 block = MkIfStmt(filter, block, (((void *)0)));
17998 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));
17999 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18000 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18001 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18007 sprintf(count, "%d", builtinCount);
18008 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));
18009 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18010 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18011 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18013 else if(isLinkList && !isList)
18015 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
18016 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
18018 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
18020 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));
18024 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18025 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18027 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));
18029 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18030 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18031 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18035 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
18037 ProcessExpressionType(expIt);
18038 if((*stmt->__anon1.compound.declarations).first)
18039 ProcessDeclaration((*stmt->__anon1.compound.declarations).first);
18041 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
18042 ProcessStatement(stmt);
18043 curContext = stmt->__anon1.compound.context->parent;
18048 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
18060 struct Expression * exp;
18062 if(stmt->__anon1.expressions)
18064 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
18068 if(curFunction && !curFunction->type)
18069 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
18070 FreeType(exp->destType);
18071 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
18073 exp->destType->refCount++;
18075 ProcessExpressionType(exp);
18082 ProcessDeclaration(stmt->__anon1.decl);
18087 struct AsmField * field;
18089 if(stmt->__anon1.asmStmt.inputFields)
18091 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
18092 if(field->expression)
18093 ProcessExpressionType(field->expression);
18095 if(stmt->__anon1.asmStmt.outputFields)
18097 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
18098 if(field->expression)
18099 ProcessExpressionType(field->expression);
18101 if(stmt->__anon1.asmStmt.clobberedFields)
18103 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
18105 if(field->expression)
18106 ProcessExpressionType(field->expression);
18113 struct PropertyWatch * propWatch;
18114 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18115 struct Expression * object = stmt->__anon1._watch.object;
18116 struct Expression * watcher = stmt->__anon1._watch.watcher;
18119 ProcessExpressionType(watcher);
18121 ProcessExpressionType(object);
18124 if(watcher || thisClass)
18126 struct External * external = curExternal;
18127 struct Context * context = curContext;
18130 stmt->__anon1.expressions = MkList();
18131 curExternal = external->prev;
18132 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18134 struct ClassFunction * func;
18135 char watcherName[1024];
18136 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;
18137 struct External * createdExternal;
18138 struct External * externalDecl = MkExternalDeclaration((((void *)0)));
18140 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, externalDecl);
18141 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
18142 if(propWatch->deleteWatch)
18143 strcat(watcherName, "_delete");
18146 struct Identifier * propID;
18148 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18150 strcat(watcherName, "_");
18151 strcat(watcherName, propID->string);
18154 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
18156 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)));
18157 ProcessClassFunctionBody(func, propWatch->compound);
18158 propWatch->compound = (((void *)0));
18159 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 0x1);
18160 createdExternal->symbol->idCode = external->symbol->idCode;
18161 curExternal = createdExternal;
18162 ProcessFunction(createdExternal->__anon1.function);
18164 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(createdExternal->__anon1.function->declarator), (((void *)0)))));
18166 externalDecl->__anon1.declaration = decl;
18167 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
18168 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
18170 if(propWatch->deleteWatch)
18172 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18174 ListAdd(args, CopyExpression(object));
18175 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18176 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18177 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
18181 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
18182 struct Identifier * propID;
18184 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18186 char propName[1024];
18187 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18191 char getName[1024], setName[1024];
18192 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18194 DeclareProperty(prop, setName, getName);
18195 strcpy(propName, "__ecereProp_");
18196 FullClassNameCat(propName, prop->_class->fullName, 0x0);
18197 strcat(propName, "_");
18198 FullClassNameCat(propName, prop->name, 0x1);
18199 ListAdd(args, CopyExpression(object));
18200 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18201 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18202 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18203 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
18206 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18211 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
18213 curExternal = external;
18214 curContext = context;
18216 FreeExpression(watcher);
18218 FreeExpression(object);
18219 FreeList(watches, FreePropertyWatch);
18222 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a _class\n", (((void *)0))));
18226 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18228 ProcessStatement(propWatch->compound);
18235 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18236 struct Expression * object = stmt->__anon1._watch.object;
18237 struct __ecereNameSpace__ecere__com__Class * _class;
18240 ProcessExpressionType(object);
18243 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
18246 struct Identifier * propID;
18249 stmt->__anon1.expressions = MkList();
18250 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
18252 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
18259 for(propID = (*watches).first; propID; propID = propID->next)
18261 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18265 CreateFireWatcher(prop, object, stmt);
18268 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18273 struct __ecereNameSpace__ecere__com__Property * prop;
18274 struct __ecereNameSpace__ecere__com__Class * base;
18276 for(base = _class; base; base = base->base)
18278 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
18280 if(prop->isProperty && prop->isWatchable)
18282 CreateFireWatcher(prop, object, stmt);
18288 FreeExpression(object);
18289 FreeList(watches, FreeIdentifier);
18292 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18298 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18299 struct Expression * object = stmt->__anon1._watch.object;
18300 struct Expression * watcher = stmt->__anon1._watch.watcher;
18301 struct __ecereNameSpace__ecere__com__Class * _class;
18304 ProcessExpressionType(object);
18306 ProcessExpressionType(watcher);
18309 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
18310 if(watcher || thisClass)
18314 struct Identifier * propID;
18317 stmt->__anon1.expressions = MkList();
18320 struct __ecereNameSpace__ecere__sys__OldList * args;
18323 ListAdd(args, CopyExpression(object));
18324 ListAdd(args, MkExpConstant("0"));
18325 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18326 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18330 for(propID = (*watches).first; propID; propID = propID->next)
18332 char propName[1024];
18333 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18337 char getName[1024], setName[1024];
18338 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18340 DeclareProperty(prop, setName, getName);
18341 strcpy(propName, "__ecereProp_");
18342 FullClassNameCat(propName, prop->_class->fullName, 0x0);
18343 strcat(propName, "_");
18344 FullClassNameCat(propName, prop->name, 0x1);
18345 ListAdd(args, CopyExpression(object));
18346 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18347 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18348 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18351 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18355 FreeExpression(object);
18357 FreeExpression(watcher);
18358 FreeList(watches, FreeIdentifier);
18361 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18364 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
18371 extern struct Expression * QBrackets(struct Expression * exp);
18373 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
18375 extern struct Declarator * QMkPtrDecl(const char * id);
18377 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
18379 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
18381 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
18383 static void ProcessFunction(struct FunctionDefinition * function)
18385 struct Identifier * id = GetDeclId(function->declarator);
18386 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18387 struct Type * type = symbol ? symbol->type : (((void *)0));
18388 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18389 struct Context * oldTopContext = topContext;
18391 yylloc = function->loc;
18392 if(type && type->__anon1.__anon2.thisClass)
18394 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18395 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18396 char className[1024];
18397 char structName[1024];
18398 struct Declarator * funcDecl;
18399 struct Symbol * thisSymbol;
18400 unsigned int typedObject = 0x0;
18402 if(_class && !_class->base)
18404 _class = currentClass;
18405 if(_class && !_class->symbol)
18406 _class->symbol = FindClass(_class->fullName);
18407 classSym = _class ? _class->symbol : (((void *)0));
18410 thisClass = _class;
18411 if(inCompiler && _class)
18413 if(type->kind == 11)
18415 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18417 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18419 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18422 if(type->classObjectType != 1)
18424 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18425 symbol->type->__anon1.__anon2.staticMethod = 0x1;
18426 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18427 symbol->type->extraParam = 0x0;
18430 strcpy(className, "__ecereClass_");
18431 FullClassNameCat(className, _class->fullName, 0x1);
18432 structName[0] = (char)0;
18433 FullClassNameCat(structName, _class->fullName, 0x0);
18434 funcDecl = GetFuncDecl(function->declarator);
18437 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18439 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18441 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18443 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18444 FreeTypeName(param);
18447 if(!function->propertyNoThis)
18449 struct TypeName * thisParam;
18451 if(type->classObjectType != 1)
18453 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18454 if(!funcDecl->__anon1.function.parameters)
18455 funcDecl->__anon1.function.parameters = MkList();
18456 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18460 if(type->classObjectType != 1)
18462 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18463 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18465 thisParam = __extension__ ({
18466 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18468 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18470 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18474 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18476 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18478 funcDecl = GetFuncDecl(initDecl->declarator);
18481 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18483 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18485 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18487 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18488 FreeTypeName(param);
18491 if(type->classObjectType != 1)
18493 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18495 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18497 if(!funcDecl->__anon1.function.parameters)
18498 funcDecl->__anon1.function.parameters = MkList();
18499 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18507 if(type->classObjectType != 1)
18509 thisSymbol = __extension__ ({
18510 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18512 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18514 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18515 if(typedObject && thisSymbol->type)
18517 thisSymbol->type->classObjectType = 2;
18518 thisSymbol->type->byReference = type->byReference;
18519 thisSymbol->type->typedByReference = type->byReference;
18523 if(inCompiler && _class && (_class->type == 0) && type->classObjectType != 1)
18525 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18528 struct __ecereNameSpace__ecere__com__Class * base;
18530 for(base = _class; base && base->type != 1000; base = base->next)
18532 for(member = base->membersAndProperties.first; member; member = member->next)
18533 if(!member->isProperty)
18539 for(member = _class->membersAndProperties.first; member; member = member->next)
18540 if(!member->isProperty)
18544 char pointerName[1024];
18545 struct Declaration * decl;
18546 struct Initializer * initializer;
18547 struct Expression * exp, * bytePtr;
18549 strcpy(pointerName, "__ecerePointer_");
18550 FullClassNameCat(pointerName, _class->fullName, 0x0);
18552 char className[1024];
18554 strcpy(className, "__ecereClass_");
18555 FullClassNameCat(className, classSym->string, 0x1);
18556 DeclareClass(classSym, className);
18558 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18563 sprintf(string, "%d", _class->offset);
18564 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpConstant(string)));
18568 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
18570 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
18571 exp->expType = __extension__ ({
18572 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18574 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
18575 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18577 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
18578 }), __ecereInstance2;
18582 yylloc = function->body->loc;
18583 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
18585 struct Context * prevContext = curContext;
18587 curContext = function->body->__anon1.compound.context;
18588 decl = MkDeclaration(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
18589 curContext = prevContext;
18591 decl->symbol = (((void *)0));
18592 if(!function->body->__anon1.compound.declarations)
18593 function->body->__anon1.compound.declarations = MkList();
18594 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
18600 thisClass = (((void *)0));
18603 FreeSpecifier(id->_class);
18604 id->_class = (((void *)0));
18605 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18607 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18609 id = GetDeclId(initDecl->declarator);
18610 FreeSpecifier(id->_class);
18611 id->_class = (((void *)0));
18615 topContext = function->body->__anon1.compound.context;
18617 struct FunctionDefinition * oldFunction = curFunction;
18619 curFunction = function;
18621 ProcessStatement(function->body);
18622 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
18624 struct Statement * prevCompound = curCompound;
18625 struct Context * prevContext = curContext;
18626 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
18628 if(!function->body->__anon1.compound.statements)
18629 function->body->__anon1.compound.statements = MkList();
18630 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
18631 curCompound = function->body;
18632 curContext = function->body->__anon1.compound.context;
18633 ProcessStatement(fireWatchers);
18634 curContext = prevContext;
18635 curCompound = prevCompound;
18637 curFunction = oldFunction;
18639 if(function->declarator)
18641 ProcessDeclarator(function->declarator);
18643 topContext = oldTopContext;
18644 thisClass = oldThisClass;
18647 extern void FreeSymbol(struct Symbol * symbol);
18649 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
18651 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
18653 struct ClassDef * def;
18654 struct External * external = curExternal;
18655 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
18657 for(def = definitions->first; def; def = def->next)
18661 if(def->__anon1.function->declarator)
18662 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
18664 curExternal = external;
18665 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
18667 else if(def->type == 2)
18669 if(def->__anon1.decl->type == 2)
18671 thisClass = regClass;
18672 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
18673 thisClass = (((void *)0));
18677 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
18680 thisClass = regClass;
18681 ProcessDeclaration(def->__anon1.decl);
18682 thisClass = backThisClass;
18685 else if(def->type == 1 && def->__anon1.defProperties)
18687 struct MemberInit * defProperty;
18688 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);
18690 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18691 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
18693 thisClass = regClass;
18694 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
18695 thisClass = (((void *)0));
18697 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18698 FreeSymbol(thisSymbol);
18700 else if(def->type == 3 && def->__anon1.propertyDef)
18702 struct PropertyDef * prop = def->__anon1.propertyDef;
18704 thisClass = regClass;
18709 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18711 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18713 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
18714 ProcessStatement(prop->setStmt);
18720 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18722 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18724 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
18725 ProcessStatement(prop->getStmt);
18727 if(prop->issetStmt)
18731 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18733 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18735 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
18736 ProcessStatement(prop->issetStmt);
18738 thisClass = (((void *)0));
18740 else if(def->type == 4 && def->__anon1.propertyWatch)
18742 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
18744 thisClass = regClass;
18745 if(propertyWatch->compound)
18747 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);
18749 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18750 curExternal = (((void *)0));
18751 ProcessStatement(propertyWatch->compound);
18753 thisClass = (((void *)0));
18758 void DeclareFunctionUtil(const char * s)
18760 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
18767 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
18768 strcpy(name, "__ecereFunction_");
18769 FullClassNameCat(name, s, 0x0);
18770 DeclareFunction(function, name);
18774 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
18776 void ComputeDataTypes()
18778 struct External * external;
18779 struct External * temp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_External);
18780 struct External * after = (((void *)0));
18782 currentClass = (((void *)0));
18783 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
18784 for(external = (*ast).first; external; external = external->next)
18786 if(external->type == 1)
18788 struct Declaration * decl = external->__anon1.declaration;
18792 struct __ecereNameSpace__ecere__sys__OldList * decls = decl->__anon1.__anon1.declarators;
18796 struct InitDeclarator * initDecl = (*decls).first;
18800 struct Declarator * declarator = initDecl->declarator;
18802 if(declarator && declarator->type == 1)
18804 struct Identifier * id = declarator->__anon1.identifier;
18806 if(id && id->string)
18808 if(!strcmp(id->string, "uintptr_t") || !strcmp(id->string, "intptr_t") || !strcmp(id->string, "size_t") || !strcmp(id->string, "ssize_t"))
18810 external->symbol->id = -1001, external->symbol->idCode = -1001;
18821 struct External * e = MkExternalDeclaration(MkDeclaration(MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Instance"), (((void *)0)))), (((void *)0))));
18823 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, e);
18826 temp->symbol = __extension__ ({
18827 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18829 __ecereInstance1->id = -1000, __ecereInstance1->idCode = -1000, __ecereInstance1;
18831 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, temp);
18832 curExternal = temp;
18833 DeclareFunctionUtil("eSystem_New");
18834 DeclareFunctionUtil("eSystem_New0");
18835 DeclareFunctionUtil("eSystem_Renew");
18836 DeclareFunctionUtil("eSystem_Renew0");
18837 DeclareFunctionUtil("eSystem_Delete");
18838 DeclareFunctionUtil("eClass_GetProperty");
18839 DeclareFunctionUtil("eClass_SetProperty");
18840 DeclareFunctionUtil("eInstance_FireSelfWatchers");
18841 DeclareFunctionUtil("eInstance_SetMethod");
18842 DeclareFunctionUtil("eInstance_IncRef");
18843 DeclareFunctionUtil("eInstance_StopWatching");
18844 DeclareFunctionUtil("eInstance_Watch");
18845 DeclareFunctionUtil("eInstance_FireWatchers");
18846 DeclareStruct("ecere::com::Class", 0x0);
18847 DeclareStruct("ecere::com::Instance", 0x0);
18848 DeclareStruct("ecere::com::Property", 0x0);
18849 DeclareStruct("ecere::com::DataMember", 0x0);
18850 DeclareStruct("ecere::com::Method", 0x0);
18851 DeclareStruct("ecere::com::SerialBuffer", 0x0);
18852 DeclareStruct("ecere::com::ClassTemplateArgument", 0x0);
18853 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), temp);
18854 for(external = (*ast).first; external; external = external->next)
18856 afterExternal = curExternal = external;
18857 if(external->type == 0)
18859 currentClass = external->__anon1.function->_class;
18860 ProcessFunction(external->__anon1.function);
18862 else if(external->type == 1)
18864 currentClass = (((void *)0));
18865 if(external->__anon1.declaration)
18866 ProcessDeclaration(external->__anon1.declaration);
18868 else if(external->type == 2)
18870 struct ClassDefinition * _class = external->__anon1._class;
18872 currentClass = external->symbol->__anon1.registered;
18873 if(_class->definitions)
18875 ProcessClass(_class->definitions, _class->symbol);
18879 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
18880 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
18883 else if(external->type == 4)
18885 thisNameSpace = external->__anon1.id->string;
18888 currentClass = (((void *)0));
18889 thisNameSpace = (((void *)0));
18890 curExternal = (((void *)0));
18891 ((temp->symbol ? (__ecereClass_Symbol->Destructor ? __ecereClass_Symbol->Destructor((void *)temp->symbol) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp->symbol)) : 0), temp->symbol = 0);
18892 ((temp ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)temp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp)) : 0), temp = 0);
18895 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);
18897 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);
18899 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
18901 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
18903 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
18905 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
18906 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
18907 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
18908 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
18909 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
18910 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
18911 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
18912 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
18913 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
18914 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
18915 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
18916 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
18917 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
18918 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
18919 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
18920 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
18921 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
18922 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
18923 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
18924 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
18925 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
18926 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
18927 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
18928 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
18929 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
18930 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
18931 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
18932 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
18933 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
18934 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
18935 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
18936 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
18937 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
18938 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
18939 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
18940 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
18941 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
18942 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
18943 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
18944 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
18945 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
18946 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
18947 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
18948 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
18949 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
18950 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
18951 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
18952 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
18953 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
18954 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("AddMembers", "int AddMembers(ecere::sys::OldList * declarations, ecere::com::Class _class, bool isMember, uint * retSize, ecere::com::Class topClass, bool * addedPadding)", AddMembers, module, 2);
18955 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "void DeclareStruct(const char * name, bool skipNoHead)", DeclareStruct, module, 2);
18956 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
18957 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
18958 __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);
18959 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
18960 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
18961 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
18962 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
18963 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
18964 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
18965 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
18966 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
18967 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
18968 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
18969 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
18970 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(GlobalData data)", DeclareGlobalData, module, 2);
18971 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, 0, 0, module, 2, 1);
18972 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
18973 __ecereClass_Conversion = class;
18974 __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);
18975 __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);
18976 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
18977 __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);
18978 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
18979 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
18980 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
18981 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
18982 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
18983 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
18984 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
18985 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
18986 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
18987 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
18988 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
18989 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
18990 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
18991 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
18992 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
18993 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
18994 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
18995 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
18996 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
18997 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
18998 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(const String s)", DeclareFunctionUtil, module, 1);
18999 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);
19002 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)