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_NamedLink64 (_64BIT ? 32 : 24)
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 = 1;
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 = 0;
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, 0);
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 == 0)
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");
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 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
1533 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64dLL" : "%lldLL"), result);
1535 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64d" : "%lld"), result);
1536 return __ecereNameSpace__ecere__sys__CopyString(temp);
1539 char * PrintUInt64(uint64 result)
1543 if(result > (0xffffffff))
1544 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1545 else if(result > (((int)0x7fffffff)))
1546 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1548 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64d" : "%lld"), result);
1549 return __ecereNameSpace__ecere__sys__CopyString(temp);
1552 char * PrintHexUInt(uint64 result)
1556 if(result > (0xffffffff))
1557 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1559 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1560 if(result > (0xffffffff))
1562 return __ecereNameSpace__ecere__sys__CopyString(temp);
1565 char * PrintHexUInt64(uint64 result)
1569 if(result > (0xffffffff))
1570 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1572 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1573 return __ecereNameSpace__ecere__sys__CopyString(temp);
1576 char * PrintShort(short result)
1580 sprintf(temp, "%d", (unsigned short)result);
1581 return __ecereNameSpace__ecere__sys__CopyString(temp);
1584 char * PrintUShort(unsigned short result)
1588 if(result > (unsigned short)32767)
1589 sprintf(temp, "0x%X", (int)result);
1591 sprintf(temp, "%d", (int)result);
1592 return __ecereNameSpace__ecere__sys__CopyString(temp);
1595 extern int isprint(int c);
1597 char * PrintChar(char result)
1601 if(result > (char)0 && isprint(result))
1602 sprintf(temp, "'%c'", result);
1603 else if(result < (char)0)
1604 sprintf(temp, "%d", (int)result);
1606 sprintf(temp, "0x%X", (unsigned char)result);
1607 return __ecereNameSpace__ecere__sys__CopyString(temp);
1610 char * PrintUChar(unsigned char result)
1614 sprintf(temp, "0x%X", result);
1615 return __ecereNameSpace__ecere__sys__CopyString(temp);
1618 extern char * strcpy(char * , const char * );
1620 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
1622 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_isInf;
1624 extern int (* __ecereProp_float_Get_signBit)(float this);
1626 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_signBit;
1628 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
1630 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_isNan;
1632 char * PrintFloat(float result)
1636 if(__ecereProp_float_Get_isInf(result))
1638 if(__ecereProp_float_Get_signBit(result))
1639 strcpy(temp, "-inf");
1641 strcpy(temp, "inf");
1643 else if(__ecereProp_float_Get_isNan(result))
1645 if(__ecereProp_float_Get_signBit(result))
1646 strcpy(temp, "-nan");
1648 strcpy(temp, "nan");
1651 sprintf(temp, "%.16ff", result);
1652 return __ecereNameSpace__ecere__sys__CopyString(temp);
1655 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
1657 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_isInf;
1659 extern int (* __ecereProp_double_Get_signBit)(double this);
1661 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_signBit;
1663 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
1665 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_isNan;
1667 char * PrintDouble(double result)
1671 if(__ecereProp_double_Get_isInf(result))
1673 if(__ecereProp_double_Get_signBit(result))
1674 strcpy(temp, "-inf");
1676 strcpy(temp, "inf");
1678 else if(__ecereProp_double_Get_isNan(result))
1680 if(__ecereProp_double_Get_signBit(result))
1681 strcpy(temp, "-nan");
1683 strcpy(temp, "nan");
1686 sprintf(temp, "%.16f", result);
1687 return __ecereNameSpace__ecere__sys__CopyString(temp);
1690 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_OpTable;
1694 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1695 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1696 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1697 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1698 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1699 unsigned int (* Neg)(struct Expression *, struct Operand *);
1700 unsigned int (* Inc)(struct Expression *, struct Operand *);
1701 unsigned int (* Dec)(struct Expression *, struct Operand *);
1702 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1703 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1704 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1705 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1706 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1707 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1708 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1709 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1710 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1711 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1712 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1713 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1714 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1715 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1716 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1717 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1718 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1719 unsigned int (* Not)(struct Expression *, struct Operand *);
1720 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1721 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1722 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1723 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1724 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1725 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1726 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1727 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1728 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1729 } __attribute__ ((gcc_struct));
1731 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Operand;
1737 unsigned int ptrSize;
1750 } __attribute__ ((gcc_struct)) __anon1;
1752 } __attribute__ ((gcc_struct));
1754 unsigned int GetOpInt(struct Operand * op2, int * value2)
1756 if(op2->kind == 3 && op2->type->isSigned)
1757 *value2 = op2->__anon1.i;
1758 else if(op2->kind == 3)
1759 *value2 = (int)op2->__anon1.ui;
1760 else if(op2->kind == 4 && op2->type->isSigned)
1761 *value2 = (int)op2->__anon1.i64;
1762 else if(op2->kind == 4)
1763 *value2 = (int)op2->__anon1.ui64;
1764 else if(op2->kind == 23 && op2->type->isSigned)
1765 *value2 = (int)op2->__anon1.i64;
1766 else if(op2->kind == 23)
1767 *value2 = (int)op2->__anon1.ui64;
1768 else if(op2->kind == 22 && op2->type->isSigned)
1769 *value2 = (int)op2->__anon1.i64;
1770 else if(op2->kind == 22)
1771 *value2 = (int)op2->__anon1.ui64;
1772 else if(op2->kind == 2 && op2->type->isSigned)
1773 *value2 = (int)op2->__anon1.s;
1774 else if(op2->kind == 2)
1775 *value2 = (int)op2->__anon1.us;
1776 else if(op2->kind == 1 && op2->type->isSigned)
1777 *value2 = (int)op2->__anon1.c;
1778 else if(op2->kind == 24 || op2->kind == 1)
1779 *value2 = (int)op2->__anon1.uc;
1780 else if(op2->kind == 6)
1781 *value2 = (int)op2->__anon1.f;
1782 else if(op2->kind == 7)
1783 *value2 = (int)op2->__anon1.d;
1784 else if(op2->kind == 13)
1785 *value2 = (int)op2->__anon1.ui64;
1791 struct Operand GetOperand(struct Expression * exp);
1793 unsigned int GetInt(struct Expression * exp, int * value2)
1795 struct Operand op2 = GetOperand(exp);
1797 return GetOpInt(&op2, value2);
1800 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1802 if(op2->kind == 3 && op2->type->isSigned)
1803 *value2 = (unsigned int)op2->__anon1.i;
1804 else if(op2->kind == 3)
1805 *value2 = op2->__anon1.ui;
1806 else if(op2->kind == 4 && op2->type->isSigned)
1807 *value2 = (unsigned int)op2->__anon1.i64;
1808 else if(op2->kind == 4)
1809 *value2 = (unsigned int)op2->__anon1.ui64;
1810 else if(op2->kind == 23 && op2->type->isSigned)
1811 *value2 = (unsigned int)op2->__anon1.i64;
1812 else if(op2->kind == 23)
1813 *value2 = (unsigned int)op2->__anon1.ui64;
1814 else if(op2->kind == 22 && op2->type->isSigned)
1815 *value2 = (unsigned int)op2->__anon1.i64;
1816 else if(op2->kind == 22)
1817 *value2 = (unsigned int)op2->__anon1.ui64;
1818 else if(op2->kind == 2 && op2->type->isSigned)
1819 *value2 = (unsigned int)op2->__anon1.s;
1820 else if(op2->kind == 2)
1821 *value2 = (unsigned int)op2->__anon1.us;
1822 else if(op2->kind == 1 && op2->type->isSigned)
1823 *value2 = (unsigned int)op2->__anon1.c;
1824 else if(op2->kind == 24 || op2->kind == 1)
1825 *value2 = (unsigned int)op2->__anon1.uc;
1826 else if(op2->kind == 6)
1827 *value2 = (unsigned int)op2->__anon1.f;
1828 else if(op2->kind == 7)
1829 *value2 = (unsigned int)op2->__anon1.d;
1830 else if(op2->kind == 13)
1831 *value2 = (unsigned int)op2->__anon1.ui64;
1837 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
1839 struct Operand op2 = GetOperand(exp);
1841 return GetOpUInt(&op2, value2);
1844 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
1846 if(op2->kind == 3 && op2->type->isSigned)
1847 *value2 = (long long)op2->__anon1.i;
1848 else if(op2->kind == 3)
1849 *value2 = (long long)op2->__anon1.ui;
1850 else if(op2->kind == 4 && op2->type->isSigned)
1851 *value2 = op2->__anon1.i64;
1852 else if(op2->kind == 4)
1853 *value2 = (long long)op2->__anon1.ui64;
1854 else if(op2->kind == 23 && op2->type->isSigned)
1855 *value2 = op2->__anon1.i64;
1856 else if(op2->kind == 23)
1857 *value2 = (long long)op2->__anon1.ui64;
1858 else if(op2->kind == 22 && op2->type->isSigned)
1859 *value2 = op2->__anon1.i64;
1860 else if(op2->kind == 22)
1861 *value2 = (long long)op2->__anon1.ui64;
1862 else if(op2->kind == 2 && op2->type->isSigned)
1863 *value2 = (long long)op2->__anon1.s;
1864 else if(op2->kind == 2)
1865 *value2 = (long long)op2->__anon1.us;
1866 else if(op2->kind == 1 && op2->type->isSigned)
1867 *value2 = (long long)op2->__anon1.c;
1868 else if(op2->kind == 24 || op2->kind == 1)
1869 *value2 = (long long)op2->__anon1.uc;
1870 else if(op2->kind == 6)
1871 *value2 = (long long)op2->__anon1.f;
1872 else if(op2->kind == 7)
1873 *value2 = (long long)op2->__anon1.d;
1874 else if(op2->kind == 13)
1875 *value2 = (long long)op2->__anon1.ui64;
1881 unsigned int GetInt64(struct Expression * exp, long long * value2)
1883 struct Operand op2 = GetOperand(exp);
1885 return GetOpInt64(&op2, value2);
1888 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
1890 if(op2->kind == 3 && op2->type->isSigned)
1891 *value2 = (uint64)op2->__anon1.i;
1892 else if(op2->kind == 3)
1893 *value2 = (uint64)op2->__anon1.ui;
1894 else if(op2->kind == 4 && op2->type->isSigned)
1895 *value2 = (uint64)op2->__anon1.i64;
1896 else if(op2->kind == 4)
1897 *value2 = op2->__anon1.ui64;
1898 else if(op2->kind == 23 && op2->type->isSigned)
1899 *value2 = (uint64)op2->__anon1.i64;
1900 else if(op2->kind == 23)
1901 *value2 = op2->__anon1.ui64;
1902 else if(op2->kind == 22 && op2->type->isSigned)
1903 *value2 = (uint64)op2->__anon1.i64;
1904 else if(op2->kind == 22)
1905 *value2 = op2->__anon1.ui64;
1906 else if(op2->kind == 2 && op2->type->isSigned)
1907 *value2 = (uint64)op2->__anon1.s;
1908 else if(op2->kind == 2)
1909 *value2 = (uint64)op2->__anon1.us;
1910 else if(op2->kind == 1 && op2->type->isSigned)
1911 *value2 = (uint64)op2->__anon1.c;
1912 else if(op2->kind == 24 || op2->kind == 1)
1913 *value2 = (uint64)op2->__anon1.uc;
1914 else if(op2->kind == 6)
1915 *value2 = (uint64)op2->__anon1.f;
1916 else if(op2->kind == 7)
1917 *value2 = (uint64)op2->__anon1.d;
1918 else if(op2->kind == 13)
1919 *value2 = op2->__anon1.ui64;
1925 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
1927 struct Operand op2 = GetOperand(exp);
1929 return GetOpUInt64(&op2, value2);
1932 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
1934 if(op2->kind == 3 && op2->type->isSigned)
1935 *value2 = (intptr_t)op2->__anon1.i;
1936 else if(op2->kind == 3)
1937 *value2 = (intptr_t)op2->__anon1.ui;
1938 else if(op2->kind == 4 && op2->type->isSigned)
1939 *value2 = (intptr_t)op2->__anon1.i64;
1940 else if(op2->kind == 4)
1941 *value2 = (intptr_t)op2->__anon1.ui64;
1942 else if(op2->kind == 23 && op2->type->isSigned)
1943 *value2 = (intptr_t)op2->__anon1.i64;
1944 else if(op2->kind == 23)
1945 *value2 = (intptr_t)op2->__anon1.ui64;
1946 else if(op2->kind == 22 && op2->type->isSigned)
1947 *value2 = (intptr_t)op2->__anon1.i64;
1948 else if(op2->kind == 22)
1949 *value2 = (intptr_t)op2->__anon1.ui64;
1950 else if(op2->kind == 2 && op2->type->isSigned)
1951 *value2 = (intptr_t)op2->__anon1.s;
1952 else if(op2->kind == 2)
1953 *value2 = (intptr_t)op2->__anon1.us;
1954 else if(op2->kind == 1 && op2->type->isSigned)
1955 *value2 = (intptr_t)op2->__anon1.c;
1956 else if(op2->kind == 24 || op2->kind == 1)
1957 *value2 = (intptr_t)op2->__anon1.uc;
1958 else if(op2->kind == 6)
1959 *value2 = (intptr_t)op2->__anon1.f;
1960 else if(op2->kind == 7)
1961 *value2 = (intptr_t)op2->__anon1.d;
1962 else if(op2->kind == 13)
1963 *value2 = (intptr_t)op2->__anon1.ui64;
1969 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
1971 struct Operand op2 = GetOperand(exp);
1973 return GetOpIntPtr(&op2, value2);
1976 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
1978 if(op2->kind == 3 && op2->type->isSigned)
1979 *value2 = (uintptr_t)op2->__anon1.i;
1980 else if(op2->kind == 3)
1981 *value2 = (uintptr_t)op2->__anon1.ui;
1982 else if(op2->kind == 4 && op2->type->isSigned)
1983 *value2 = (uintptr_t)op2->__anon1.i64;
1984 else if(op2->kind == 4)
1985 *value2 = (uintptr_t)op2->__anon1.ui64;
1986 else if(op2->kind == 23 && op2->type->isSigned)
1987 *value2 = (uintptr_t)op2->__anon1.i64;
1988 else if(op2->kind == 23)
1989 *value2 = (uintptr_t)op2->__anon1.ui64;
1990 else if(op2->kind == 22 && op2->type->isSigned)
1991 *value2 = (uintptr_t)op2->__anon1.i64;
1992 else if(op2->kind == 22)
1993 *value2 = (uintptr_t)op2->__anon1.ui64;
1994 else if(op2->kind == 2 && op2->type->isSigned)
1995 *value2 = (uintptr_t)op2->__anon1.s;
1996 else if(op2->kind == 2)
1997 *value2 = (uintptr_t)op2->__anon1.us;
1998 else if(op2->kind == 1 && op2->type->isSigned)
1999 *value2 = (uintptr_t)op2->__anon1.c;
2000 else if(op2->kind == 24 || op2->kind == 1)
2001 *value2 = (uintptr_t)op2->__anon1.uc;
2002 else if(op2->kind == 6)
2003 *value2 = (uintptr_t)op2->__anon1.f;
2004 else if(op2->kind == 7)
2005 *value2 = (uintptr_t)op2->__anon1.d;
2006 else if(op2->kind == 13)
2007 *value2 = (uintptr_t)op2->__anon1.ui64;
2013 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
2015 struct Operand op2 = GetOperand(exp);
2017 return GetOpUIntPtr(&op2, value2);
2020 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2022 if(op2->kind == 3 && op2->type->isSigned)
2023 *value2 = (ssize_t)op2->__anon1.i;
2024 else if(op2->kind == 3)
2025 *value2 = (ssize_t)op2->__anon1.ui;
2026 else if(op2->kind == 4 && op2->type->isSigned)
2027 *value2 = (ssize_t)op2->__anon1.i64;
2028 else if(op2->kind == 4)
2029 *value2 = (ssize_t)op2->__anon1.ui64;
2030 else if(op2->kind == 23 && op2->type->isSigned)
2031 *value2 = (ssize_t)op2->__anon1.i64;
2032 else if(op2->kind == 23)
2033 *value2 = (ssize_t)op2->__anon1.ui64;
2034 else if(op2->kind == 22 && op2->type->isSigned)
2035 *value2 = (ssize_t)op2->__anon1.i64;
2036 else if(op2->kind == 22)
2037 *value2 = (ssize_t)op2->__anon1.ui64;
2038 else if(op2->kind == 2 && op2->type->isSigned)
2039 *value2 = (ssize_t)op2->__anon1.s;
2040 else if(op2->kind == 2)
2041 *value2 = (ssize_t)op2->__anon1.us;
2042 else if(op2->kind == 1 && op2->type->isSigned)
2043 *value2 = (ssize_t)op2->__anon1.c;
2044 else if(op2->kind == 24 || op2->kind == 1)
2045 *value2 = (ssize_t)op2->__anon1.uc;
2046 else if(op2->kind == 6)
2047 *value2 = (ssize_t)op2->__anon1.f;
2048 else if(op2->kind == 7)
2049 *value2 = (ssize_t)op2->__anon1.d;
2050 else if(op2->kind == 13)
2051 *value2 = (ssize_t)op2->__anon1.ui64;
2057 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
2059 struct Operand op2 = GetOperand(exp);
2061 return GetOpIntSize(&op2, value2);
2064 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2066 if(op2->kind == 3 && op2->type->isSigned)
2067 *value2 = (size_t)op2->__anon1.i;
2068 else if(op2->kind == 3)
2069 *value2 = (size_t)op2->__anon1.ui;
2070 else if(op2->kind == 4 && op2->type->isSigned)
2071 *value2 = (size_t)op2->__anon1.i64;
2072 else if(op2->kind == 4)
2073 *value2 = (size_t)op2->__anon1.ui64;
2074 else if(op2->kind == 23 && op2->type->isSigned)
2075 *value2 = (size_t)op2->__anon1.i64;
2076 else if(op2->kind == 23)
2077 *value2 = (size_t)op2->__anon1.ui64;
2078 else if(op2->kind == 22 && op2->type->isSigned)
2079 *value2 = (size_t)op2->__anon1.i64;
2080 else if(op2->kind == 22)
2081 *value2 = (size_t)op2->__anon1.ui64;
2082 else if(op2->kind == 2 && op2->type->isSigned)
2083 *value2 = (size_t)op2->__anon1.s;
2084 else if(op2->kind == 2)
2085 *value2 = (size_t)op2->__anon1.us;
2086 else if(op2->kind == 1 && op2->type->isSigned)
2087 *value2 = (size_t)op2->__anon1.c;
2088 else if(op2->kind == 24 || op2->kind == 1)
2089 *value2 = (size_t)op2->__anon1.uc;
2090 else if(op2->kind == 6)
2091 *value2 = (size_t)op2->__anon1.f;
2092 else if(op2->kind == 7)
2093 *value2 = (size_t)op2->__anon1.d;
2094 else if(op2->kind == 13)
2095 *value2 = (size_t)op2->__anon1.ui64;
2101 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
2103 struct Operand op2 = GetOperand(exp);
2105 return GetOpUIntSize(&op2, value2);
2108 unsigned int GetOpShort(struct Operand * op2, short * value2)
2110 if(op2->kind == 3 && op2->type->isSigned)
2111 *value2 = (short)op2->__anon1.i;
2112 else if(op2->kind == 3)
2113 *value2 = (short)op2->__anon1.ui;
2114 else if(op2->kind == 4 && op2->type->isSigned)
2115 *value2 = (short)op2->__anon1.i64;
2116 else if(op2->kind == 4)
2117 *value2 = (short)op2->__anon1.ui64;
2118 else if(op2->kind == 23 && op2->type->isSigned)
2119 *value2 = (short)op2->__anon1.i64;
2120 else if(op2->kind == 23)
2121 *value2 = (short)op2->__anon1.ui64;
2122 else if(op2->kind == 22 && op2->type->isSigned)
2123 *value2 = (short)op2->__anon1.i64;
2124 else if(op2->kind == 22)
2125 *value2 = (short)op2->__anon1.ui64;
2126 else if(op2->kind == 2 && op2->type->isSigned)
2127 *value2 = op2->__anon1.s;
2128 else if(op2->kind == 2)
2129 *value2 = (short)op2->__anon1.us;
2130 else if(op2->kind == 1 && op2->type->isSigned)
2131 *value2 = (short)op2->__anon1.c;
2132 else if(op2->kind == 24 || op2->kind == 1)
2133 *value2 = (short)op2->__anon1.uc;
2134 else if(op2->kind == 6)
2135 *value2 = (short)op2->__anon1.f;
2136 else if(op2->kind == 7)
2137 *value2 = (short)op2->__anon1.d;
2138 else if(op2->kind == 13)
2139 *value2 = (short)op2->__anon1.ui64;
2145 unsigned int GetShort(struct Expression * exp, short * value2)
2147 struct Operand op2 = GetOperand(exp);
2149 return GetOpShort(&op2, value2);
2152 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2154 if(op2->kind == 3 && op2->type->isSigned)
2155 *value2 = (unsigned short)op2->__anon1.i;
2156 else if(op2->kind == 3)
2157 *value2 = (unsigned short)op2->__anon1.ui;
2158 else if(op2->kind == 4 && op2->type->isSigned)
2159 *value2 = (unsigned short)op2->__anon1.i64;
2160 else if(op2->kind == 4)
2161 *value2 = (unsigned short)op2->__anon1.ui64;
2162 else if(op2->kind == 23 && op2->type->isSigned)
2163 *value2 = (unsigned short)op2->__anon1.i64;
2164 else if(op2->kind == 23)
2165 *value2 = (unsigned short)op2->__anon1.ui64;
2166 else if(op2->kind == 22 && op2->type->isSigned)
2167 *value2 = (unsigned short)op2->__anon1.i64;
2168 else if(op2->kind == 22)
2169 *value2 = (unsigned short)op2->__anon1.ui64;
2170 else if(op2->kind == 2 && op2->type->isSigned)
2171 *value2 = (unsigned short)op2->__anon1.s;
2172 else if(op2->kind == 2)
2173 *value2 = op2->__anon1.us;
2174 else if(op2->kind == 1 && op2->type->isSigned)
2175 *value2 = (unsigned short)op2->__anon1.c;
2176 else if(op2->kind == 24 || op2->kind == 1)
2177 *value2 = (unsigned short)op2->__anon1.uc;
2178 else if(op2->kind == 6)
2179 *value2 = (unsigned short)op2->__anon1.f;
2180 else if(op2->kind == 7)
2181 *value2 = (unsigned short)op2->__anon1.d;
2182 else if(op2->kind == 13)
2183 *value2 = (unsigned short)op2->__anon1.ui64;
2189 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
2191 struct Operand op2 = GetOperand(exp);
2193 return GetOpUShort(&op2, value2);
2196 unsigned int GetOpChar(struct Operand * op2, char * value2)
2198 if(op2->kind == 3 && op2->type->isSigned)
2199 *value2 = (char)op2->__anon1.i;
2200 else if(op2->kind == 3)
2201 *value2 = (char)op2->__anon1.ui;
2202 else if(op2->kind == 4 && op2->type->isSigned)
2203 *value2 = (char)op2->__anon1.i64;
2204 else if(op2->kind == 4)
2205 *value2 = (char)op2->__anon1.ui64;
2206 else if(op2->kind == 23 && op2->type->isSigned)
2207 *value2 = (char)op2->__anon1.i64;
2208 else if(op2->kind == 23)
2209 *value2 = (char)op2->__anon1.ui64;
2210 else if(op2->kind == 22 && op2->type->isSigned)
2211 *value2 = (char)op2->__anon1.i64;
2212 else if(op2->kind == 22)
2213 *value2 = (char)op2->__anon1.ui64;
2214 else if(op2->kind == 2 && op2->type->isSigned)
2215 *value2 = (char)op2->__anon1.s;
2216 else if(op2->kind == 2)
2217 *value2 = (char)op2->__anon1.us;
2218 else if(op2->kind == 1 && op2->type->isSigned)
2219 *value2 = op2->__anon1.c;
2220 else if(op2->kind == 24 || op2->kind == 1)
2221 *value2 = (char)op2->__anon1.uc;
2222 else if(op2->kind == 6)
2223 *value2 = (char)op2->__anon1.f;
2224 else if(op2->kind == 7)
2225 *value2 = (char)op2->__anon1.d;
2226 else if(op2->kind == 13)
2227 *value2 = (char)op2->__anon1.ui64;
2233 unsigned int GetChar(struct Expression * exp, char * value2)
2235 struct Operand op2 = GetOperand(exp);
2237 return GetOpChar(&op2, value2);
2240 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2242 if(op2->kind == 3 && op2->type->isSigned)
2243 *value2 = (unsigned char)op2->__anon1.i;
2244 else if(op2->kind == 3)
2245 *value2 = (unsigned char)op2->__anon1.ui;
2246 else if(op2->kind == 4 && op2->type->isSigned)
2247 *value2 = (unsigned char)op2->__anon1.i64;
2248 else if(op2->kind == 4)
2249 *value2 = (unsigned char)op2->__anon1.ui64;
2250 else if(op2->kind == 23 && op2->type->isSigned)
2251 *value2 = (unsigned char)op2->__anon1.i64;
2252 else if(op2->kind == 23)
2253 *value2 = (unsigned char)op2->__anon1.ui64;
2254 else if(op2->kind == 22 && op2->type->isSigned)
2255 *value2 = (unsigned char)op2->__anon1.i64;
2256 else if(op2->kind == 22)
2257 *value2 = (unsigned char)op2->__anon1.ui64;
2258 else if(op2->kind == 2 && op2->type->isSigned)
2259 *value2 = (unsigned char)op2->__anon1.s;
2260 else if(op2->kind == 2)
2261 *value2 = (unsigned char)op2->__anon1.us;
2262 else if(op2->kind == 1 && op2->type->isSigned)
2263 *value2 = (unsigned char)op2->__anon1.c;
2264 else if(op2->kind == 24 || op2->kind == 1)
2265 *value2 = op2->__anon1.uc;
2266 else if(op2->kind == 6)
2267 *value2 = (unsigned char)op2->__anon1.f;
2268 else if(op2->kind == 7)
2269 *value2 = (unsigned char)op2->__anon1.d;
2270 else if(op2->kind == 13)
2271 *value2 = (unsigned char)op2->__anon1.ui64;
2277 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
2279 struct Operand op2 = GetOperand(exp);
2281 return GetOpUChar(&op2, value2);
2284 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2286 if(op2->kind == 3 && op2->type->isSigned)
2287 *value2 = (float)(float)op2->__anon1.i;
2288 else if(op2->kind == 3)
2289 *value2 = (float)(float)op2->__anon1.ui;
2290 else if(op2->kind == 4 && op2->type->isSigned)
2291 *value2 = (float)(float)op2->__anon1.i64;
2292 else if(op2->kind == 4)
2293 *value2 = (float)(float)op2->__anon1.ui64;
2294 else if(op2->kind == 23 && op2->type->isSigned)
2295 *value2 = (float)(float)op2->__anon1.i64;
2296 else if(op2->kind == 23)
2297 *value2 = (float)(float)op2->__anon1.ui64;
2298 else if(op2->kind == 22 && op2->type->isSigned)
2299 *value2 = (float)(float)op2->__anon1.i64;
2300 else if(op2->kind == 22)
2301 *value2 = (float)(float)op2->__anon1.ui64;
2302 else if(op2->kind == 2 && op2->type->isSigned)
2303 *value2 = (float)(float)op2->__anon1.s;
2304 else if(op2->kind == 2)
2305 *value2 = (float)(float)op2->__anon1.us;
2306 else if(op2->kind == 1 && op2->type->isSigned)
2307 *value2 = (float)(float)op2->__anon1.c;
2308 else if(op2->kind == 24 || op2->kind == 1)
2309 *value2 = (float)(float)op2->__anon1.uc;
2310 else if(op2->kind == 6)
2311 *value2 = (float)op2->__anon1.f;
2312 else if(op2->kind == 7)
2313 *value2 = (float)op2->__anon1.d;
2314 else if(op2->kind == 13)
2315 *value2 = (float)(float)op2->__anon1.ui64;
2321 unsigned int GetFloat(struct Expression * exp, float * value2)
2323 struct Operand op2 = GetOperand(exp);
2325 return GetOpFloat(&op2, value2);
2328 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2330 if(op2->kind == 3 && op2->type->isSigned)
2331 *value2 = (double)(double)op2->__anon1.i;
2332 else if(op2->kind == 3)
2333 *value2 = (double)(double)op2->__anon1.ui;
2334 else if(op2->kind == 4 && op2->type->isSigned)
2335 *value2 = (double)(double)op2->__anon1.i64;
2336 else if(op2->kind == 4)
2337 *value2 = (double)(double)op2->__anon1.ui64;
2338 else if(op2->kind == 23 && op2->type->isSigned)
2339 *value2 = (double)(double)op2->__anon1.i64;
2340 else if(op2->kind == 23)
2341 *value2 = (double)(double)op2->__anon1.ui64;
2342 else if(op2->kind == 22 && op2->type->isSigned)
2343 *value2 = (double)(double)op2->__anon1.i64;
2344 else if(op2->kind == 22)
2345 *value2 = (double)(double)op2->__anon1.ui64;
2346 else if(op2->kind == 2 && op2->type->isSigned)
2347 *value2 = (double)(double)op2->__anon1.s;
2348 else if(op2->kind == 2)
2349 *value2 = (double)(double)op2->__anon1.us;
2350 else if(op2->kind == 1 && op2->type->isSigned)
2351 *value2 = (double)(double)op2->__anon1.c;
2352 else if(op2->kind == 24 || op2->kind == 1)
2353 *value2 = (double)(double)op2->__anon1.uc;
2354 else if(op2->kind == 6)
2355 *value2 = (double)op2->__anon1.f;
2356 else if(op2->kind == 7)
2357 *value2 = (double)op2->__anon1.d;
2358 else if(op2->kind == 13)
2359 *value2 = (double)(double)op2->__anon1.ui64;
2365 unsigned int GetDouble(struct Expression * exp, double * value2)
2367 struct Operand op2 = GetOperand(exp);
2369 return GetOpDouble(&op2, value2);
2372 void ComputeExpression(struct Expression * exp);
2374 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class);
2376 extern int targetBits;
2378 int ComputeTypeSize(struct Type * type);
2380 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
2382 struct __ecereNameSpace__ecere__com__BitMember
2384 struct __ecereNameSpace__ecere__com__BitMember * prev;
2385 struct __ecereNameSpace__ecere__com__BitMember * next;
2387 unsigned int isProperty;
2390 struct __ecereNameSpace__ecere__com__Class * _class;
2391 const char * dataTypeString;
2392 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
2393 struct Type * dataType;
2398 } __attribute__ ((gcc_struct));
2400 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldLink;
2402 struct __ecereNameSpace__ecere__sys__OldLink
2404 struct __ecereNameSpace__ecere__sys__OldLink * prev;
2405 struct __ecereNameSpace__ecere__sys__OldLink * next;
2407 } __attribute__ ((gcc_struct));
2409 void FinishTemplatesContext(struct Context * context);
2411 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
2413 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2414 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2416 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))
2418 int unionMemberOffset = 0;
2423 member->memberOffset = 0;
2424 if(targetBits < sizeof(void *) * 8)
2425 member->structAlignment = 0;
2427 else if(targetBits < sizeof(void *) * 8)
2428 _class->structAlignment = 0;
2429 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
2430 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
2431 if(!member && _class->destructionWatchOffset)
2432 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2434 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2436 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2438 if(!dataMember->isProperty)
2440 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
2442 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
2448 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2450 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2452 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
2454 if(!isMember && _class->type == 2 && dataMember->dataType)
2456 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
2460 ComputeTypeSize(dataMember->dataType);
2461 if(bitMember->pos == -1)
2462 bitMember->pos = _class->memberOffset;
2463 if(!bitMember->size)
2464 bitMember->size = dataMember->dataType->size * 8;
2465 _class->memberOffset = bitMember->pos + bitMember->size;
2466 for(d = 0; d < bitMember->size; d++)
2472 bitMember->mask = mask << bitMember->pos;
2474 else if(dataMember->type == 0 && dataMember->dataType)
2479 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)))
2480 ComputeTypeSize(dataMember->dataType);
2481 if(dataMember->dataType->bitFieldCount)
2483 bitFields += dataMember->dataType->bitFieldCount;
2490 int size = (bitFields + 7) / 8;
2494 int __simpleStruct0;
2498 int __simpleStruct0;
2500 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2501 if(member->memberOffset % alignment)
2502 member->memberOffset += alignment - (member->memberOffset % alignment);
2504 dataMember->offset = member->memberOffset;
2505 if(member->type == 1)
2506 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2509 member->memberOffset += size;
2516 int __simpleStruct0;
2518 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2519 if(_class->memberOffset % alignment)
2520 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2522 dataMember->offset = _class->memberOffset;
2523 _class->memberOffset += size;
2527 size = dataMember->dataType->size;
2528 alignment = dataMember->dataType->alignment;
2532 int __simpleStruct0;
2536 int __simpleStruct0;
2538 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2539 if(member->memberOffset % alignment)
2540 member->memberOffset += alignment - (member->memberOffset % alignment);
2542 dataMember->offset = member->memberOffset;
2543 if(member->type == 1)
2544 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2547 member->memberOffset += size;
2554 int __simpleStruct0;
2556 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2557 if(_class->memberOffset % alignment)
2558 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2560 dataMember->offset = _class->memberOffset;
2561 _class->memberOffset += size;
2568 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
2569 alignment = dataMember->structAlignment;
2572 int __simpleStruct0;
2576 int __simpleStruct0;
2578 if(member->memberOffset % alignment)
2579 member->memberOffset += alignment - (member->memberOffset % alignment);
2580 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2582 dataMember->offset = member->memberOffset;
2583 if(member->type == 1)
2584 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2586 member->memberOffset += dataMember->memberOffset;
2592 int __simpleStruct0;
2594 if(_class->memberOffset % alignment)
2595 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2596 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2598 dataMember->offset = _class->memberOffset;
2599 _class->memberOffset += dataMember->memberOffset;
2607 int size = (bitFields + 7) / 8;
2611 int __simpleStruct0;
2615 int __simpleStruct0;
2617 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2618 if(member->memberOffset % alignment)
2619 member->memberOffset += alignment - (member->memberOffset % alignment);
2621 if(member->type == 1)
2622 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2625 member->memberOffset += size;
2632 int __simpleStruct0;
2634 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2635 if(_class->memberOffset % alignment)
2636 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2638 _class->memberOffset += size;
2643 if(member && member->type == 1)
2645 member->memberOffset = unionMemberOffset;
2649 if(_class->type != 2)
2653 if(_class->structAlignment)
2655 if(_class->memberOffset % _class->structAlignment)
2656 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
2658 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
2661 struct __ecereNameSpace__ecere__com__Property * prop;
2663 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
2665 if(prop->isProperty && prop->isWatchable)
2667 prop->watcherOffset = _class->structSize;
2668 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2673 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
2675 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
2677 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
2679 if(deriv->computeSize)
2681 deriv->offset = _class->structSize;
2682 deriv->memberOffset = 0;
2683 deriv->structSize = deriv->offset;
2684 ComputeClassMembers(deriv, 0);
2692 FinishTemplatesContext(context);
2695 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
2697 struct __ecereNameSpace__ecere__com__NameSpace
2700 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
2701 struct __ecereNameSpace__ecere__com__NameSpace * left;
2702 struct __ecereNameSpace__ecere__com__NameSpace * right;
2704 struct __ecereNameSpace__ecere__com__NameSpace * parent;
2705 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
2706 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
2707 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
2708 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
2709 } __attribute__ ((gcc_struct));
2711 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2713 struct __ecereNameSpace__ecere__com__Module
2715 struct __ecereNameSpace__ecere__com__Instance * application;
2716 struct __ecereNameSpace__ecere__sys__OldList classes;
2717 struct __ecereNameSpace__ecere__sys__OldList defines;
2718 struct __ecereNameSpace__ecere__sys__OldList functions;
2719 struct __ecereNameSpace__ecere__sys__OldList modules;
2720 struct __ecereNameSpace__ecere__com__Instance * prev;
2721 struct __ecereNameSpace__ecere__com__Instance * next;
2727 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
2728 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
2729 } __attribute__ ((gcc_struct));
2731 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
2733 struct __ecereNameSpace__ecere__com__Class * _class;
2734 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
2736 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
2737 ComputeModuleClasses(subModule->data);
2738 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes.first; _class; _class = _class->next)
2739 ComputeClassMembers(_class, 0);
2742 extern unsigned int inCompiler;
2744 extern void Compiler_Error(const char * format, ...);
2746 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
2748 int ComputeTypeSize(struct Type * type)
2750 unsigned int size = type ? type->size : 0;
2752 if(!size && type && !type->computing)
2754 type->computing = 1;
2758 type->alignment = size = sizeof(char);
2761 type->alignment = size = sizeof(char);
2764 type->alignment = size = sizeof(int);
2767 type->alignment = size = sizeof(long long);
2770 type->alignment = size = targetBits / 8;
2773 type->alignment = size = targetBits / 8;
2776 type->alignment = size = sizeof(long);
2779 type->alignment = size = sizeof(short);
2782 type->alignment = size = sizeof(float);
2785 type->alignment = size = sizeof(double);
2789 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
2791 if(_class && _class->type == 1)
2793 ComputeClassMembers(_class, 0);
2794 type->alignment = _class->structAlignment;
2795 size = _class->structSize;
2796 if(type->alignment && size % type->alignment)
2797 size += type->alignment - (size % type->alignment);
2799 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
2801 if(!_class->dataType)
2802 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
2803 size = type->alignment = ComputeTypeSize(_class->dataType);
2806 size = type->alignment = targetBits / 8;
2811 size = type->alignment = targetBits / 8;
2814 if(type->__anon1.__anon4.arraySizeExp)
2816 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
2817 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
2818 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)))
2820 struct Location oldLoc = yylloc;
2821 char expression[10240];
2823 expression[0] = '\0';
2824 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
2825 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
2827 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
2828 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
2831 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
2833 else if(type->__anon1.__anon4.enumClass)
2835 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
2837 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
2840 type->__anon1.__anon4.arraySize = 0;
2844 type->__anon1.__anon4.arraySize = 0;
2846 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
2847 if(type->__anon1.type)
2848 type->alignment = type->__anon1.type->alignment;
2852 struct Type * member;
2854 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2856 int __simpleStruct0, __simpleStruct1;
2857 unsigned int addSize = ComputeTypeSize(member);
2859 member->offset = size;
2860 if(member->alignment && size % member->alignment)
2861 member->offset += member->alignment - (size % member->alignment);
2862 size = member->offset;
2863 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2866 if(type->alignment && size % type->alignment)
2867 size += type->alignment - (size % type->alignment);
2872 struct Type * member;
2874 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2876 int __simpleStruct0, __simpleStruct1;
2877 unsigned int addSize = ComputeTypeSize(member);
2879 member->offset = size;
2880 if(member->alignment && size % member->alignment)
2881 member->offset += member->alignment - (size % member->alignment);
2882 size = member->offset;
2883 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2884 size = ((size > addSize) ? size : addSize);
2886 if(type->alignment && size % type->alignment)
2887 size += type->alignment - (size % type->alignment);
2892 struct TemplateParameter * param = type->__anon1.templateParameter;
2893 struct Type * baseType = ProcessTemplateParameterType(param);
2897 size = ComputeTypeSize(baseType);
2898 type->alignment = baseType->alignment;
2901 type->alignment = size = sizeof(uint64);
2906 type->alignment = size = sizeof(enum
2914 type->alignment = size = targetBits / 8;
2919 type->computing = 0;
2924 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
2926 extern struct Identifier * MkIdentifier(const char * string);
2928 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
2930 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
2932 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
2934 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
2936 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class);
2938 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams);
2940 extern void FreeType(struct Type * type);
2942 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
2944 extern struct Specifier * MkSpecifier(int specifier);
2946 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
2948 extern struct Expression * MkExpConstant(const char * string);
2950 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)
2952 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2953 unsigned int totalSize = 0;
2954 unsigned int maxSize = 0;
2957 struct __ecereNameSpace__ecere__com__DataMember * member;
2959 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2963 if(!isMember && _class->base)
2965 maxSize = _class->structSize;
2967 if(_class->type == 1 || _class->type == 5)
2968 AddMembers(declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
2971 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
2973 if(maxSize > baseSize)
2974 maxSize -= baseSize;
2980 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
2982 if(!member->isProperty)
2984 switch(member->type)
2988 if(member->dataTypeString)
2990 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
2991 struct Declarator * decl;
2993 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
2994 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
2995 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
2996 if(!member->dataType)
2997 member->dataType = ProcessType(specs, decl);
2998 ReplaceThisClassSpecifiers(specs, topClass);
3000 struct Type * type = ProcessType(specs, decl);
3002 DeclareType(member->dataType, 0, 0);
3005 ComputeTypeSize(member->dataType);
3006 size = member->dataType->size;
3007 alignment = member->dataType->alignment;
3010 if(totalSize % alignment)
3011 totalSize += alignment - (totalSize % alignment);
3020 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
3023 sprintf(id, "__anon%d", anonID++);
3025 AddMembers(list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
3026 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
3027 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
3028 alignment = member->structAlignment;
3031 if(totalSize % alignment)
3032 totalSize += alignment - (totalSize % alignment);
3042 unsigned int __simpleStruct0;
3044 if(topMember && topMember->type == 1)
3045 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
3047 *retSize += totalSize;
3049 else if(totalSize < maxSize && _class->type != 1000)
3051 int autoPadding = 0;
3053 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
3054 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
3055 if(totalSize + autoPadding < maxSize)
3057 char sizeString[50];
3059 sprintf(sizeString, "%d", maxSize - totalSize);
3060 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
3066 FinishTemplatesContext(context);
3067 return topMember ? topMember->memberID : _class->memberID;
3070 static int DeclareMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
3072 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
3073 struct __ecereNameSpace__ecere__com__DataMember * member;
3074 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
3076 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
3077 DeclareMembers(_class->base, 0);
3078 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
3080 if(!member->isProperty)
3082 switch(member->type)
3086 if(!member->dataType && member->dataTypeString)
3087 member->dataType = ProcessTypeString(member->dataTypeString, 0);
3088 if(member->dataType)
3089 DeclareType(member->dataType, 0, 0);
3095 DeclareMembers((struct __ecereNameSpace__ecere__com__Class *)member, 1);
3102 FinishTemplatesContext(context);
3103 return topMember ? topMember->memberID : _class->memberID;
3106 extern struct Identifier * GetDeclId(struct Declarator * decl);
3108 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
3110 struct ClassDef * def;
3113 for(def = (*definitions).first; def; def = def->next)
3117 struct Declaration * decl = def->__anon1.decl;
3119 if(decl && decl->__anon1.__anon1.specifiers)
3121 struct Specifier * spec;
3122 unsigned int isStruct = 0;
3124 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3126 if(spec->type == 3 || spec->type == 4)
3128 if(spec->__anon1.__anon2.definitions)
3129 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3135 struct Declarator * d = (((void *)0));
3137 if(decl->__anon1.__anon1.declarators)
3139 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
3141 struct Identifier * idDecl = GetDeclId(d);
3151 sprintf(id, "__anon%d", anonID++);
3152 if(!decl->__anon1.__anon1.declarators)
3153 decl->__anon1.__anon1.declarators = MkList();
3154 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
3162 extern struct Symbol * FindClass(const char * name);
3164 extern char * strchr(const char * , int);
3166 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
3168 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
3170 extern void FreeClassDef(struct ClassDef * def);
3172 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
3174 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
3176 extern void DeclareClass(struct Symbol * classSym, const char * className);
3178 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move(struct __ecereNameSpace__ecere__sys__OldList * this, void * item, void * prevItem);
3180 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
3182 void DeclareStruct(const char * name, unsigned int skipNoHead)
3184 struct External * external = (((void *)0));
3185 struct Symbol * classSym = FindClass(name);
3187 if(!inCompiler || !classSym)
3189 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
3191 if(classSym->__anon1.registered && classSym->imported && !classSym->declaredStructSym)
3193 struct Declaration * decl;
3194 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3195 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
3196 char structName[1024];
3197 struct Specifier * spec = (((void *)0));
3199 external = (classSym->__anon1.registered && classSym->__anon1.registered->type == 1) ? classSym->__anon2.__anon1.pointerExternal : classSym->__anon2.__anon1.structExternal;
3200 classSym->declaring++;
3201 if(strchr(classSym->string, '<'))
3203 if(classSym->__anon1.registered->templateClass)
3205 DeclareStruct(classSym->__anon1.registered->templateClass->fullName, skipNoHead);
3206 classSym->declaring--;
3210 DeclareMembers(classSym->__anon1.registered, 0);
3211 structName[0] = (char)0;
3212 FullClassNameCat(structName, name, 0);
3213 if(external && external->__anon1.declaration && external->__anon1.declaration->__anon1.__anon1.specifiers)
3215 for(spec = (*external->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3217 if(spec->type == 3 || spec->type == 4)
3221 if(!skipNoHead && (!spec || !spec->__anon1.__anon2.definitions))
3223 unsigned int addedPadding = 0;
3225 classSym->declaredStructSym = 1;
3226 declarations = MkList();
3227 AddMembers(declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
3228 if(!(*declarations).count || ((*declarations).count == 1 && addedPadding))
3230 FreeList(declarations, FreeClassDef);
3231 declarations = (((void *)0));
3234 if(skipNoHead || declarations)
3239 spec->__anon1.__anon2.definitions = declarations;
3240 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3242 if(classSym->__anon2.__anon1.structExternal)
3243 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3244 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3245 classSym->id = curExternal->symbol->idCode;
3246 classSym->idCode = curExternal->symbol->idCode;
3252 external = MkExternalDeclaration((((void *)0)));
3253 specifiers = MkList();
3254 declarators = MkList();
3255 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
3256 external->__anon1.declaration = decl = MkDeclaration(specifiers, declarators);
3257 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
3258 decl->symbol->__anon2.__anon1.pointerExternal = external;
3259 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3261 char className[1024];
3263 strcpy(className, "__ecereClass_");
3264 FullClassNameCat(className, classSym->string, 1);
3265 DeclareClass(classSym, className);
3266 external->symbol = classSym;
3267 classSym->__anon2.__anon1.pointerExternal = external;
3268 classSym->id = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3269 classSym->idCode = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3273 char className[1024];
3275 strcpy(className, "__ecereClass_");
3276 FullClassNameCat(className, classSym->string, 1);
3277 classSym->__anon2.__anon1.structExternal = external;
3278 DeclareClass(classSym, className);
3279 external->symbol = classSym;
3281 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
3284 classSym->declaring--;
3288 if(classSym->__anon2.__anon1.structExternal && classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
3290 struct Specifier * spec;
3292 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3294 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3297 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3299 classSym->declaring++;
3301 if(classSym->__anon1.registered)
3302 DeclareMembers(classSym->__anon1.registered, 0);
3304 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 1 || classSym->__anon1.registered->type == 5))
3306 if(classSym->__anon2.__anon1.structExternal)
3307 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3308 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3309 classSym->id = curExternal->symbol->idCode;
3310 classSym->idCode = curExternal->symbol->idCode;
3312 classSym->declaring--;
3317 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
3319 extern struct ModuleImport * mainModule;
3321 extern struct Specifier * MkSpecifierName(const char * name);
3323 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
3325 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
3327 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
3329 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
3331 extern void FreeDeclarator(struct Declarator * decl);
3333 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
3335 struct PropertyImport
3337 struct PropertyImport * prev;
3338 struct PropertyImport * next;
3340 unsigned int isVirtual;
3341 unsigned int hasSet;
3342 unsigned int hasGet;
3343 } __attribute__ ((gcc_struct));
3345 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
3347 void DeclareProperty(struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
3349 struct Symbol * symbol = prop->symbol;
3351 strcpy(setName, "__ecereProp_");
3352 FullClassNameCat(setName, prop->_class->fullName, 0);
3353 strcat(setName, "_Set_");
3354 FullClassNameCat(setName, prop->name, 1);
3355 strcpy(getName, "__ecereProp_");
3356 FullClassNameCat(getName, prop->_class->fullName, 0);
3357 strcat(getName, "_Get_");
3358 FullClassNameCat(getName, prop->name, 1);
3359 if(prop->_class->type == 1)
3360 DeclareStruct(prop->_class->fullName, 0);
3361 if(!symbol || curExternal->symbol->idCode < symbol->id)
3363 unsigned int imported = 0;
3364 unsigned int dllImport = 0;
3366 if(!symbol || symbol->_import)
3370 struct Symbol * classSym;
3372 if(!prop->_class->symbol)
3373 prop->_class->symbol = FindClass(prop->_class->fullName);
3374 classSym = prop->_class->symbol;
3375 if(classSym && !classSym->_import)
3377 struct ModuleImport * module;
3379 if(prop->_class->module)
3380 module = FindModule(prop->_class->module);
3382 module = mainModule;
3383 classSym->_import = __extension__ ({
3384 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
3386 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
3388 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
3390 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
3391 symbol->_import = (struct ClassImport *)__extension__ ({
3392 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
3394 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
3397 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
3400 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)
3405 struct Context * context = SetupTemplatesContext(prop->_class);
3407 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
3408 FinishTemplatesContext(context);
3412 if(!symbol->__anon2.__anon2.externalGet || symbol->__anon2.__anon2.externalGet->type == 0)
3414 struct Declaration * decl;
3415 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3416 struct Declarator * d;
3417 struct __ecereNameSpace__ecere__sys__OldList * params;
3418 struct Specifier * spec;
3419 struct External * external;
3420 struct Declarator * typeDecl;
3421 unsigned int simple = 0;
3423 specifiers = MkList();
3424 declarators = MkList();
3426 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3427 d = MkDeclaratorIdentifier(MkIdentifier(getName));
3429 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3431 struct Context * context = SetupTemplatesContext(prop->_class);
3433 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
3434 FinishTemplatesContext(context);
3436 for(spec = (*specifiers).first; spec; spec = spec->next)
3440 if((!typeDecl || typeDecl->type == 1))
3442 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3444 symbol->_class = classSym->__anon1.registered;
3445 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3447 DeclareStruct(spec->__anon1.__anon1.name, 0);
3454 d = PlugDeclarator(typeDecl, d);
3457 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
3458 specifiers = MkList();
3460 d = MkDeclaratorFunction(d, params);
3462 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3463 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3464 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3466 ListAdd(specifiers, MkSpecifier(VOID));
3467 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3468 decl = MkDeclaration(specifiers, declarators);
3469 external = MkExternalDeclaration(decl);
3470 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3471 external->symbol = symbol;
3472 symbol->__anon2.__anon2.externalGet = external;
3473 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3475 FreeDeclarator(typeDecl);
3479 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalGet, curExternal->prev);
3484 if(!symbol->__anon2.__anon2.externalSet || symbol->__anon2.__anon2.externalSet->type == 0)
3486 struct Declaration * decl;
3487 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3488 struct Declarator * d;
3489 struct __ecereNameSpace__ecere__sys__OldList * params;
3490 struct Specifier * spec;
3491 struct External * external;
3492 struct Declarator * typeDecl;
3494 declarators = MkList();
3496 if(!prop->conversion || prop->_class->type == 1)
3498 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3500 specifiers = MkList();
3502 struct Context * context = SetupTemplatesContext(prop->_class);
3504 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
3505 FinishTemplatesContext(context);
3507 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
3508 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
3509 ListAdd(params, MkTypeName(specifiers, d));
3510 d = MkDeclaratorIdentifier(MkIdentifier(setName));
3512 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3513 d = MkDeclaratorFunction(d, params);
3514 for(spec = (*specifiers).first; spec; spec = spec->next)
3518 if((!typeDecl || typeDecl->type == 1))
3520 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3522 symbol->_class = classSym->__anon1.registered;
3523 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3524 DeclareStruct(spec->__anon1.__anon1.name, 0);
3528 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3529 specifiers = MkList();
3531 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3532 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3533 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3534 if(!prop->conversion || prop->_class->type == 1)
3535 ListAdd(specifiers, MkSpecifier(VOID));
3537 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
3538 decl = MkDeclaration(specifiers, declarators);
3539 external = MkExternalDeclaration(decl);
3540 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3541 external->symbol = symbol;
3542 symbol->__anon2.__anon2.externalSet = external;
3543 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3547 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalSet, curExternal->prev);
3550 if(!symbol->__anon2.__anon2.externalPtr)
3552 struct Declaration * decl;
3553 struct External * external;
3554 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
3555 char propName[1024];
3558 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3560 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3561 ListAdd(specifiers, MkSpecifierName("Property"));
3562 strcpy(propName, "__ecereProp_");
3563 FullClassNameCat(propName, prop->_class->fullName, 0);
3564 strcat(propName, "_");
3565 FullClassNameCat(propName, prop->name, 1);
3567 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
3569 ListAdd(list, MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(propName))), (((void *)0))));
3572 strcpy(propName, "__ecerePropM_");
3573 FullClassNameCat(propName, prop->_class->fullName, 0);
3574 strcat(propName, "_");
3575 FullClassNameCat(propName, prop->name, 1);
3576 ListAdd(list, MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(propName))), (((void *)0))));
3578 decl = MkDeclaration(specifiers, list);
3580 external = MkExternalDeclaration(decl);
3581 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3582 external->symbol = symbol;
3583 symbol->__anon2.__anon2.externalPtr = external;
3587 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalPtr, curExternal->prev);
3589 symbol->id = curExternal->symbol->idCode;
3593 struct Type * Dereference(struct Type * source)
3595 struct Type * type = (((void *)0));
3599 if(source->kind == 13 || source->kind == 12)
3601 type = source->__anon1.type;
3602 source->__anon1.type->refCount++;
3604 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
3606 type = __extension__ ({
3607 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
3609 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
3612 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
3618 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
3623 static struct Type * Reference(struct Type * source)
3625 struct Type * type = (((void *)0));
3629 type = __extension__ ({
3630 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
3632 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
3639 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);
3641 extern void * memcpy(void * , const void * , size_t size);
3643 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method);
3645 extern void FreeExpression(struct Expression * exp);
3647 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
3649 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);
3651 static void ProcessInitializer(struct Initializer * init, struct Type * type);
3653 extern struct Type * MkClassType(const char * name);
3655 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);
3657 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)
3659 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
3660 unsigned int found = 0;
3661 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
3662 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
3663 unsigned int freeType = 0;
3665 yylloc = member->loc;
3670 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
3674 dataMember = *curMember;
3680 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
3681 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
3682 int _subMemberStackPos = 0;
3685 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
3688 dataMember = thisMember;
3689 if(curMember && thisMember->memberAccess == 1)
3691 *curMember = thisMember;
3692 *curClass = thisMember->_class;
3693 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
3694 *subMemberStackPos = _subMemberStackPos;
3700 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
3701 if(method && method->type == 1)
3704 method = (((void *)0));
3709 struct Type * type = (((void *)0));
3713 if(!dataMember->dataType && dataMember->dataTypeString)
3715 struct Context * context = SetupTemplatesContext(_class);
3717 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
3718 FinishTemplatesContext(context);
3720 type = dataMember->dataType;
3724 if(!method->dataType)
3725 ProcessMethodType(method);
3726 type = method->dataType;
3728 if(ident && ident->next)
3730 for(ident = ident->next; ident && type; ident = ident->next)
3734 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
3736 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
3738 type = dataMember->dataType;
3740 else if(type->kind == 9 || type->kind == 10)
3742 struct Type * memberType;
3744 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
3746 if(!strcmp(memberType->name, ident->string))
3755 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
3758 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
3759 struct __ecereNameSpace__ecere__com__Class * sClass;
3761 for(sClass = _class; sClass; sClass = sClass->base)
3764 if(sClass->templateClass)
3765 sClass = sClass->templateClass;
3766 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
3768 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
3770 for(sClass = sClass->base; sClass; sClass = sClass->base)
3772 if(sClass->templateClass)
3773 sClass = sClass->templateClass;
3774 id += sClass->templateParams.count;
3785 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
3787 if(arg.__anon1.__anon1.dataTypeString)
3789 unsigned int constant = type->constant;
3791 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
3792 if(type->kind == 8 && constant)
3794 else if(type->kind == 13)
3796 struct Type * t = type->__anon1.type;
3798 while(t->kind == 13)
3799 t = t->__anon1.type;
3801 t->constant = constant;
3804 if(type && _class->templateClass)
3805 type->passAsTemplate = 1;
3812 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
3814 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
3815 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
3818 char templateString[1024];
3819 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
3821 sprintf(templateString, "%s<", expClass->templateClass->fullName);
3822 for(cClass = expClass; cClass; cClass = cClass->base)
3826 if(cClass->templateClass)
3827 cClass = cClass->templateClass;
3828 for(param = cClass->templateParams.first; param; param = param->next)
3831 struct __ecereNameSpace__ecere__com__Class * sClass;
3832 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
3834 for(sClass = cClass->base; sClass; sClass = sClass->base)
3836 if(sClass->templateClass)
3837 sClass = sClass->templateClass;
3838 id += sClass->templateParams.count;
3840 arg = expClass->templateArgs[id];
3841 for(sClass = _class; sClass; sClass = sClass->base)
3843 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
3845 struct __ecereNameSpace__ecere__com__Class * nextClass;
3847 if(sClass->templateClass)
3848 sClass = sClass->templateClass;
3849 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
3851 if(nextClass->templateClass)
3852 nextClass = nextClass->templateClass;
3853 p += nextClass->templateParams.count;
3855 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
3857 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
3859 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3861 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
3862 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
3876 char expString[1024];
3877 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
3878 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
3879 struct Expression * exp;
3880 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
3882 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
3883 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3884 ProcessExpressionType(exp);
3885 ComputeExpression(exp);
3886 expString[0] = '\0';
3887 PrintExpression(exp, expString);
3888 strcat(argument, expString);
3889 FreeExpression(exp);
3894 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
3899 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3900 strcat(argument, arg.__anon1.__anon1.dataTypeString);
3907 strcat(templateString, ", ");
3908 if(lastParam != p - 1)
3910 strcat(templateString, param->name);
3911 strcat(templateString, " = ");
3913 strcat(templateString, argument);
3922 int len = strlen(templateString);
3924 if(templateString[len - 1] == '<')
3928 if(templateString[len - 1] == '>')
3929 templateString[len++] = ' ';
3930 templateString[len++] = '>';
3932 templateString[len++] = '\0';
3935 struct Context * context = SetupTemplatesContext(_class);
3939 type = ProcessTypeString(templateString, 0);
3941 FinishTemplatesContext(context);
3944 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
3946 ProcessExpressionType(member->initializer->__anon1.exp);
3947 if(!member->initializer->__anon1.exp->expType)
3951 char expString[10240];
3953 expString[0] = '\0';
3954 PrintExpression(member->initializer->__anon1.exp, expString);
3955 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
3956 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
3959 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
3961 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
3964 else if(member->initializer)
3966 ProcessInitializer(member->initializer, type);
3973 if(_class && _class->type == 3)
3975 if(member->initializer)
3977 struct Type * type = MkClassType(_class->fullName);
3979 ProcessInitializer(member->initializer, type);
3985 if(member->initializer)
3987 ProcessInitializer(member->initializer, (((void *)0)));
3993 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
3997 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
3999 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
4003 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
4008 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);
4010 extern void FreeSpecifier(struct Specifier * spec);
4012 static void ProcessFunction(struct FunctionDefinition * function);
4014 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
4016 extern struct Specifier * CopySpecifier(struct Specifier * spec);
4018 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
4020 extern void FreeClassFunction(struct ClassFunction * func);
4022 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
4024 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
4026 void ProcessInstantiationType(struct Instantiation * inst)
4031 struct MembersInit * members;
4032 struct Symbol * classSym;
4033 struct __ecereNameSpace__ecere__com__Class * _class;
4035 classSym = inst->_class->__anon1.__anon1.symbol;
4036 _class = classSym ? classSym->__anon1.registered : (((void *)0));
4037 if(!_class || _class->type != 5)
4038 DeclareStruct(inst->_class->__anon1.__anon1.name, 0);
4039 afterExternal = afterExternal ? afterExternal : curExternal;
4041 ProcessExpressionType(inst->exp);
4042 inst->isConstant = 1;
4045 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
4046 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
4047 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
4048 int subMemberStackPos = 0;
4050 for(members = (*inst->members).first; members; members = members->next)
4052 switch(members->type)
4057 static unsigned int instMethodID = 0;
4058 struct External * external = curExternal;
4059 struct Context * context = curContext;
4060 struct Declarator * declarator = members->__anon1.function->declarator;
4061 struct Identifier * nameID = GetDeclId(declarator);
4062 char * unmangled = nameID ? nameID->string : (((void *)0));
4063 struct Expression * exp;
4064 struct External * createdExternal = (((void *)0));
4070 strcpy(name, "__ecereInstMeth_");
4071 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
4073 strcat(name, nameID->string);
4075 sprintf(number, "_%08d", instMethodID++);
4076 strcat(name, number);
4077 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
4081 struct Symbol * symbol = declarator->symbol;
4082 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
4084 if(method && method->type == 1)
4086 symbol->__anon1.method = method;
4087 ProcessMethodType(method);
4088 if(!symbol->type->__anon1.__anon2.thisClass)
4090 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
4092 if(!currentClass->symbol)
4093 currentClass->symbol = FindClass(currentClass->fullName);
4094 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
4099 _class->symbol = FindClass(_class->fullName);
4100 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
4103 DeclareType(symbol->type, 1, 1);
4107 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
4110 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
4113 FreeSpecifier(nameID->_class);
4114 nameID->_class = (((void *)0));
4118 struct External * oldExternal = curExternal;
4120 declarator->symbol->id = declarator->symbol->idCode = curExternal->symbol->idCode;
4122 struct External * externalDecl;
4124 externalDecl = MkExternalDeclaration((((void *)0)));
4125 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), oldExternal->prev, externalDecl);
4126 if(createdExternal->__anon1.function)
4128 ProcessFunction(createdExternal->__anon1.function);
4130 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(declarator), (((void *)0)))));
4132 externalDecl->__anon1.declaration = decl;
4133 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
4134 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4135 declarator->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4142 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
4143 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
4145 curExternal = external;
4146 curContext = context;
4149 FreeClassFunction(members->__anon1.function);
4150 exp = QMkExpId(name);
4152 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
4153 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
4159 if(members->__anon1.dataMembers && classSym)
4161 struct MemberInit * member;
4162 struct Location oldyyloc = yylloc;
4164 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
4166 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
4167 if(member->initializer && !member->initializer->isConstant)
4168 inst->isConstant = 0;
4180 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams)
4184 if(type->kind == 11)
4186 struct Type * param;
4190 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
4191 DeclareType(param, declarePointers, 1);
4193 DeclareType(type->__anon1.__anon2.returnType, declarePointers, 1);
4195 else if(type->kind == 13 && declarePointers)
4196 DeclareType(type->__anon1.type, declarePointers, 0);
4197 else if(type->kind == 8)
4199 if(type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 1 || type->__anon1._class->__anon1.registered->type == 5) && !type->__anon1._class->declaring)
4200 DeclareStruct(type->__anon1._class->__anon1.registered->fullName, type->__anon1._class->__anon1.registered->type == 5);
4202 else if(type->kind == 9 || type->kind == 10)
4204 struct Type * member;
4206 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
4207 DeclareType(member, 0, 0);
4209 else if(type->kind == 12)
4210 DeclareType(type->__anon1.__anon4.arrayType, declarePointers, 0);
4214 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
4216 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
4218 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
4220 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
4221 struct __ecereNameSpace__ecere__com__Class * sClass;
4223 for(sClass = _class; sClass; sClass = sClass->base)
4226 if(sClass->templateClass)
4227 sClass = sClass->templateClass;
4228 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
4230 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
4232 for(sClass = sClass->base; sClass; sClass = sClass->base)
4234 if(sClass->templateClass)
4235 sClass = sClass->templateClass;
4236 id += sClass->templateParams.count;
4247 arg = &_class->templateArgs[id];
4248 if(arg && param->type == 0)
4249 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
4254 extern struct Context * PushContext(void);
4256 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
4258 struct TemplatedType
4261 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4262 struct __ecereNameSpace__ecere__sys__BTNode * left;
4263 struct __ecereNameSpace__ecere__sys__BTNode * right;
4265 struct TemplateParameter * param;
4266 } __attribute__ ((gcc_struct));
4268 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
4270 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
4272 struct Context * context = PushContext();
4274 context->templateTypesOnly = 1;
4275 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
4277 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
4279 for(; param; param = param->next)
4281 if(param->type == 0 && param->identifier)
4283 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
4285 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4291 struct __ecereNameSpace__ecere__com__Class * sClass;
4293 for(sClass = _class; sClass; sClass = sClass->base)
4295 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
4297 for(p = sClass->templateParams.first; p; p = p->next)
4301 struct TemplateParameter * param = p->param;
4302 struct TemplatedType * type;
4306 p->param = param = __extension__ ({
4307 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
4309 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
4312 type = __extension__ ({
4313 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
4315 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
4317 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4325 extern void PopContext(struct Context * ctx);
4327 extern void FreeContext(struct Context * context);
4329 void FinishTemplatesContext(struct Context * context)
4331 PopContext(context);
4332 FreeContext(context);
4333 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
4336 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
4338 if(!method->dataType)
4340 struct Context * context = SetupTemplatesContext(method->_class);
4342 method->dataType = ProcessTypeString(method->dataTypeString, 0);
4343 FinishTemplatesContext(context);
4344 if(method->type != 1 && method->dataType)
4346 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
4348 if(!method->_class->symbol)
4349 method->_class->symbol = FindClass(method->_class->fullName);
4350 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
4356 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
4360 struct Context * context = SetupTemplatesContext(prop->_class);
4362 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
4363 FinishTemplatesContext(context);
4367 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
4369 extern void FreeTypeName(struct TypeName * typeName);
4371 static void ProcessDeclarator(struct Declarator * decl);
4373 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
4375 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
4379 struct MethodImport * prev;
4380 struct MethodImport * next;
4382 unsigned int isVirtual;
4383 } __attribute__ ((gcc_struct));
4385 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
4387 void DeclareMethod(struct __ecereNameSpace__ecere__com__Method * method, const char * name)
4389 struct Symbol * symbol = method->symbol;
4391 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && method->type == 1) || symbol->id > (curExternal ? curExternal->symbol->idCode : -1))
4393 unsigned int dllImport = 0;
4395 if(!method->dataType)
4396 method->dataType = ProcessTypeString(method->dataTypeString, 0);
4397 if(!symbol || symbol->_import || method->type == 1)
4399 if(!symbol || method->type == 1)
4401 struct Symbol * classSym;
4403 if(!method->_class->symbol)
4404 method->_class->symbol = FindClass(method->_class->fullName);
4405 classSym = method->_class->symbol;
4406 if(!classSym->_import)
4408 struct ModuleImport * module;
4410 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + structSize_Instance)))->name)
4411 module = FindModule(method->_class->module);
4413 module = mainModule;
4414 classSym->_import = __extension__ ({
4415 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
4417 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
4419 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
4423 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4425 if(!symbol->_import)
4427 symbol->_import = (struct ClassImport *)__extension__ ({
4428 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
4430 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
4432 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
4436 symbol->type = method->dataType;
4438 symbol->type->refCount++;
4441 if(!method->dataType->dllExport)
4443 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)
4447 if(method->type != 1 && method->dataType)
4448 DeclareType(method->dataType, 1, 1);
4449 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4451 struct Declaration * decl;
4452 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4453 struct Declarator * d;
4454 struct Declarator * funcDecl;
4455 struct External * external;
4457 specifiers = MkList();
4458 declarators = MkList();
4460 ListAdd(specifiers, MkSpecifier(EXTERN));
4461 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
4462 ListAdd(specifiers, MkSpecifier(STATIC));
4463 if(method->type == 1)
4465 ListAdd(specifiers, MkSpecifier(INT));
4466 d = MkDeclaratorIdentifier(MkIdentifier(name));
4470 d = MkDeclaratorIdentifier(MkIdentifier(name));
4472 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4474 struct Context * context = SetupTemplatesContext(method->_class);
4476 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
4477 FinishTemplatesContext(context);
4479 funcDecl = GetFuncDecl(d);
4482 struct Specifier * spec, * next;
4484 for(spec = (*specifiers).first; spec; spec = next)
4489 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4490 FreeSpecifier(spec);
4494 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
4496 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
4498 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
4499 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")));
4500 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
4501 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
4503 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
4505 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
4507 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
4508 FreeTypeName(param);
4510 if(!funcDecl->__anon1.function.parameters)
4511 funcDecl->__anon1.function.parameters = MkList();
4512 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
4516 ProcessDeclarator(d);
4517 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4518 decl = MkDeclaration(specifiers, declarators);
4519 ReplaceThisClassSpecifiers(specifiers, method->_class);
4520 if(symbol->__anon2.__anon1.pointerExternal)
4522 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4525 *functionSymbol = *symbol;
4526 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4527 if(functionSymbol->type)
4528 functionSymbol->type->refCount++;
4530 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4531 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4533 external = MkExternalDeclaration(decl);
4535 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
4536 external->symbol = symbol;
4537 symbol->__anon2.__anon1.pointerExternal = external;
4541 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4543 symbol->id = curExternal ? curExternal->symbol->idCode : (((int)0x7fffffff));
4547 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
4549 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4551 unsigned int first = 1;
4553 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4555 char className[1024];
4557 strcpy(className, _class->fullName);
4558 for(param = _class->templateParams.first; param; param = param->next)
4562 strcat(className, "<");
4564 strcat(className, ", ");
4565 if(lastParam + 1 != p)
4567 strcat(className, param->name);
4568 strcat(className, " = ");
4570 strcat(className, param->name);
4578 int len = strlen(className);
4580 if(className[len - 1] == '>')
4581 className[len++] = ' ';
4582 className[len++] = '>';
4583 className[len++] = '\0';
4585 return __ecereNameSpace__ecere__sys__CopyString(className);
4588 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
4591 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
4595 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4597 unsigned int first = 1;
4599 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4601 char className[1024];
4603 strcpy(className, _class->fullName);
4604 for(param = _class->templateParams.first; param; param = param->next)
4608 strcat(className, "<");
4610 strcat(className, ", ");
4611 if(lastParam + 1 != p)
4613 strcat(className, param->name);
4614 strcat(className, " = ");
4616 strcat(className, param->name);
4624 int len = strlen(className);
4626 if(className[len - 1] == '>')
4627 className[len++] = ' ';
4628 className[len++] = '>';
4629 className[len++] = '\0';
4631 type = MkClassType(className);
4635 type = MkClassType(_class->fullName);
4640 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
4642 if(specs != (((void *)0)) && _class)
4644 struct Specifier * spec;
4646 for(spec = specs->first; spec; spec = spec->next)
4648 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
4651 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
4652 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
4658 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
4660 struct __ecereNameSpace__ecere__com__GlobalFunction
4662 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
4663 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
4666 struct __ecereNameSpace__ecere__com__Instance * module;
4667 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
4668 const char * dataTypeString;
4669 struct Type * dataType;
4671 } __attribute__ ((gcc_struct));
4673 extern struct Context * globalContext;
4675 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
4677 struct FunctionImport
4679 struct FunctionImport * prev;
4680 struct FunctionImport * next;
4682 } __attribute__ ((gcc_struct));
4684 unsigned int DeclareFunction(struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
4686 struct Symbol * symbol = function->symbol;
4688 if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
4690 unsigned int imported = 0;
4691 unsigned int dllImport = 0;
4693 if(!function->dataType)
4695 function->dataType = ProcessTypeString(function->dataTypeString, 0);
4696 if(!function->dataType->__anon1.__anon2.thisClass)
4697 function->dataType->__anon1.__anon2.staticMethod = 1;
4703 struct ModuleImport * module = FindModule(function->module);
4705 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4708 if(!function->dataType->dllExport)
4710 symbol->_import = (struct ClassImport *)__extension__ ({
4711 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
4713 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
4715 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
4719 symbol->type = ProcessTypeString(function->dataTypeString, 0);
4720 if(!symbol->type->__anon1.__anon2.thisClass)
4721 symbol->type->__anon1.__anon2.staticMethod = 1;
4724 imported = symbol->_import ? 1 : 0;
4725 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1)
4728 DeclareType(function->dataType, 1, 1);
4731 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4733 struct Declaration * decl;
4734 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4735 struct Declarator * d;
4736 struct Declarator * funcDecl;
4737 struct External * external;
4739 specifiers = MkList();
4740 declarators = MkList();
4741 ListAdd(specifiers, MkSpecifier(EXTERN));
4742 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
4744 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4745 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
4746 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType == 1)
4748 struct Specifier * spec;
4750 for(spec = (*specifiers).first; spec; spec = spec->next)
4751 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
4753 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4754 FreeSpecifier(spec);
4758 funcDecl = GetFuncDecl(d);
4759 if(funcDecl && !funcDecl->__anon1.function.parameters)
4761 funcDecl->__anon1.function.parameters = MkList();
4762 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
4764 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4766 struct Context * oldCtx = curContext;
4768 curContext = globalContext;
4769 decl = MkDeclaration(specifiers, declarators);
4770 curContext = oldCtx;
4772 if(symbol->__anon2.__anon1.pointerExternal)
4774 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4777 *functionSymbol = *symbol;
4778 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4779 if(functionSymbol->type)
4780 functionSymbol->type->refCount++;
4782 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4783 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4785 external = MkExternalDeclaration(decl);
4787 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
4788 external->symbol = symbol;
4789 symbol->__anon2.__anon1.pointerExternal = external;
4793 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4796 symbol->id = curExternal->symbol->idCode;
4799 return (symbol && symbol->_import && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1) ? 1 : 0;
4802 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_GlobalData;
4807 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4808 struct __ecereNameSpace__ecere__sys__BTNode * left;
4809 struct __ecereNameSpace__ecere__sys__BTNode * right;
4811 struct __ecereNameSpace__ecere__com__Instance * module;
4812 char * dataTypeString;
4813 struct Type * dataType;
4816 } __attribute__ ((gcc_struct));
4818 void DeclareGlobalData(struct GlobalData * data)
4820 struct Symbol * symbol = data->symbol;
4822 if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
4827 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4830 data->dataType = ProcessTypeString(data->dataTypeString, 0);
4831 DeclareType(data->dataType, 1, 1);
4834 if(!symbol->__anon2.__anon1.pointerExternal)
4836 struct Declaration * decl;
4837 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4838 struct Declarator * d;
4839 struct External * external;
4841 specifiers = MkList();
4842 declarators = MkList();
4843 ListAdd(specifiers, MkSpecifier(EXTERN));
4844 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
4845 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
4846 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4847 decl = MkDeclaration(specifiers, declarators);
4848 external = MkExternalDeclaration(decl);
4850 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
4851 external->symbol = symbol;
4852 symbol->__anon2.__anon1.pointerExternal = external;
4856 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4859 symbol->id = curExternal->symbol->idCode;
4866 struct Conversion * prev, * next;
4867 struct __ecereNameSpace__ecere__com__Property * convert;
4869 struct Type * resultType;
4870 } __attribute__ ((gcc_struct));
4872 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
4874 extern void Compiler_Warning(const char * format, ...);
4876 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
4878 unsigned int status = 1;
4880 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))
4882 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
4883 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
4885 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
4887 struct Type * sourceType = source, * destType = dest;
4889 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
4890 sourceType = sourceType->__anon1.type;
4891 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
4892 destType = destType->__anon1.type;
4893 if(!destType->constant && sourceType->constant)
4897 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
4904 extern void CopyTypeInto(struct Type * type, struct Type * src);
4906 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
4908 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)
4913 CheckConstCompatibility(source, dest, 1);
4914 if(source->kind == 20 && dest->kind != 20)
4916 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
4921 if(dest->kind == 20 && source->kind != 20)
4923 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
4928 if(dest->classObjectType == 2 && dest->kind != 11)
4930 if(source->classObjectType != 3)
4934 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
4942 if(source->kind != 11 && source->classObjectType == 3)
4944 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
4947 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
4949 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))
4952 if(dest->kind == 14 && source->kind != 0)
4954 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))
4956 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))
4958 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
4960 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
4962 if(conversions != (((void *)0)))
4964 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
4969 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
4971 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
4973 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
4975 if(sourceBase == destBase)
4979 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))
4983 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))
4985 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
4992 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
4996 if(source->kind == 8)
4998 struct __ecereNameSpace__ecere__com__Class * _class;
5000 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5002 struct __ecereNameSpace__ecere__com__Property * convert;
5004 for(convert = _class->conversions.first; convert; convert = convert->next)
5006 if(convert->memberAccess == 1 || _class->module == privateModule)
5008 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5010 if(!convert->dataType)
5011 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
5012 if((!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), (convert->dataType->kind == 8 && !strcmp(convert->dataTypeString, "String")) ? 1 : 0, convert->dataType->kind == 8, 0, 1, warnConst))
5014 if(!conversions && !convert->Get)
5016 else if(conversions != (((void *)0)))
5018 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))
5022 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
5024 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5035 struct __ecereNameSpace__ecere__com__Class * _class;
5037 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5039 struct __ecereNameSpace__ecere__com__Property * convert;
5041 for(convert = _class->conversions.first; convert; convert = convert->next)
5043 if(convert->memberAccess == 1 || _class->module == privateModule)
5045 struct Type * constType = (((void *)0));
5046 unsigned int success = 0;
5048 if(!convert->dataType)
5049 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
5050 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
5052 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5054 constType = __extension__ ({
5055 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5057 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
5059 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
5060 ptrType->constant = 1;
5062 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
5064 if(!conversions && !convert->Set)
5066 else if(conversions != (((void *)0)))
5068 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))
5072 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
5074 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
5080 FreeType(constType);
5086 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5088 if(!dest->__anon1._class->__anon1.registered->dataType)
5089 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
5090 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
5092 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, dest->__anon1._class->__anon1.registered->dataType->kind == 8, 0, 0, warnConst))
5099 if(source->kind == 8)
5101 struct __ecereNameSpace__ecere__com__Class * _class;
5103 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5105 struct __ecereNameSpace__ecere__com__Property * convert;
5107 for(convert = _class->conversions.first; convert; convert = convert->next)
5109 if(convert->memberAccess == 1 || _class->module == privateModule)
5111 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5113 if(!convert->dataType)
5114 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
5115 if(convert->dataType != source && (!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), convert->dataType->kind == 8, convert->dataType->kind == 8, 0, 1, warnConst))
5117 if(!conversions && !convert->Get)
5119 else if(conversions != (((void *)0)))
5121 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))
5125 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
5127 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5135 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
5137 if(!source->__anon1._class->__anon1.registered->dataType)
5138 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
5139 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
5141 if(MatchTypes(source->__anon1._class->__anon1.registered->dataType, dest, conversions, (((void *)0)), (((void *)0)), source->__anon1._class->__anon1.registered->dataType->kind == 8, source->__anon1._class->__anon1.registered->dataType->kind == 8, 0, 0, warnConst))
5143 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
5149 if(source->kind == 8 || source->kind == 19)
5151 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
5153 else if(dest->kind == 7 && source->kind == 6)
5155 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
5157 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
5159 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
5161 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
5163 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
5165 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))
5167 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))
5169 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)))
5171 struct Type * paramSource, * paramDest;
5173 if(dest->kind == 16)
5174 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
5175 if(source->kind == 16)
5176 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
5177 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
5178 dest = dest->__anon1.type;
5179 if(source->kind == 13 && source->__anon1.type->kind == 11)
5180 source = source->__anon1.type;
5181 if(dest->kind == 16)
5182 dest = dest->__anon1.__anon3.method->dataType;
5183 if(source->kind == 16)
5184 source = source->__anon1.__anon3.method->dataType;
5185 paramSource = source->__anon1.__anon2.params.first;
5186 if(paramSource && paramSource->kind == 0)
5187 paramSource = (((void *)0));
5188 paramDest = dest->__anon1.__anon2.params.first;
5189 if(paramDest && paramDest->kind == 0)
5190 paramDest = (((void *)0));
5191 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5193 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))))
5195 if(paramDest && paramDest->kind == 8)
5196 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
5198 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
5201 paramDest = paramDest->next;
5203 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
5205 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5207 if(dest->__anon1.__anon2.thisClass)
5209 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
5211 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5217 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
5220 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
5222 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
5226 paramSource = paramSource->next;
5230 if(dest->__anon1.__anon2.thisClass)
5232 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
5234 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5240 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
5242 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
5248 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5250 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
5254 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
5255 for(; paramDest; paramDest = paramDest->next)
5259 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
5263 struct Type * paramDestType = paramDest;
5264 struct Type * paramSourceType = paramSource;
5265 struct Type * type = paramDestType;
5267 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
5270 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
5271 struct __ecereNameSpace__ecere__com__Class * sClass;
5273 for(sClass = owningClassSource; sClass; sClass = sClass->base)
5276 if(sClass->templateClass)
5277 sClass = sClass->templateClass;
5278 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
5280 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
5282 for(sClass = sClass->base; sClass; sClass = sClass->base)
5284 if(sClass->templateClass)
5285 sClass = sClass->templateClass;
5286 id += sClass->templateParams.count;
5297 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
5299 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
5302 if(!MatchTypes(paramDestType, paramSourceType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst) && (!acceptReversedParams || !MatchTypes(paramSourceType, paramDestType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst)))
5307 PrintType(paramDest, type, 0, 1);
5308 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
5309 if(paramDestType != paramDest)
5310 FreeType(paramDestType);
5313 if(paramDestType != paramDest)
5314 FreeType(paramDestType);
5316 paramSource = paramSource->next;
5320 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
5325 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
5329 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
5331 if(MatchTypes(source->__anon1.type, dest->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5338 static void FreeConvert(struct Conversion * convert)
5340 if(convert->resultType)
5341 FreeType(convert->resultType);
5344 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BTNamedLink;
5346 struct __ecereNameSpace__ecere__com__BTNamedLink
5349 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
5350 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
5351 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
5354 } __attribute__ ((gcc_struct));
5356 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__EnumClassData;
5358 struct __ecereNameSpace__ecere__com__EnumClassData
5360 struct __ecereNameSpace__ecere__sys__OldList values;
5362 } __attribute__ ((gcc_struct));
5364 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
5366 struct __ecereNameSpace__ecere__sys__NamedLink64
5368 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
5369 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
5372 } __attribute__ ((gcc_struct));
5374 extern void FreeExpContents(struct Expression * exp);
5376 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
5378 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
5380 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
5382 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
5384 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
5386 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5388 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
5390 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)))
5392 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
5394 if(_class->type == 4)
5396 struct __ecereNameSpace__ecere__sys__OldList converts =
5400 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5404 _class->symbol = FindClass(_class->fullName);
5405 type->__anon1._class = _class->symbol;
5406 if(MatchTypes(type, dest, &converts, (((void *)0)), (((void *)0)), 1, 0, 0, 0, 0))
5408 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
5409 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5413 struct __ecereNameSpace__ecere__com__Class * baseClass;
5415 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
5417 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
5419 for(value = e->values.first; value; value = value->next)
5421 if(!strcmp(value->name, string))
5426 FreeExpContents(sourceExp);
5427 FreeType(sourceExp->expType);
5428 sourceExp->isConstant = 1;
5429 sourceExp->expType = MkClassType(baseClass->fullName);
5433 sourceExp->type = 2;
5434 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
5435 sprintf(constant, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64d" : "%lld"), value->data);
5437 sprintf(constant, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
5438 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5440 while(converts.first)
5442 struct Conversion * convert = converts.first;
5444 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
5445 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
5447 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5454 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
5455 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5458 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)))
5459 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
5464 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SubModule;
5466 struct __ecereNameSpace__ecere__com__SubModule
5468 struct __ecereNameSpace__ecere__com__SubModule * prev;
5469 struct __ecereNameSpace__ecere__com__SubModule * next;
5470 struct __ecereNameSpace__ecere__com__Instance * module;
5472 } __attribute__ ((gcc_struct));
5474 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
5476 struct __ecereNameSpace__ecere__com__SubModule * subModule;
5478 if(searchFor == searchIn)
5480 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
5482 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->application)
5484 if(ModuleVisibility(subModule->module, searchFor))
5491 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
5493 struct __ecereNameSpace__ecere__com__Application
5496 const char * * argv;
5498 unsigned int isGUIApp;
5499 struct __ecereNameSpace__ecere__sys__OldList allModules;
5500 char * parsedCommand;
5501 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
5502 } __attribute__ ((gcc_struct));
5504 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5506 struct __ecereNameSpace__ecere__com__Instance * module;
5508 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))
5510 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))
5512 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))
5514 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)
5516 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
5522 extern struct Expression * CopyExpression(struct Expression * exp);
5524 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
5526 void ReadString(char * output, char * string);
5528 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
5530 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
5532 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
5534 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
5536 struct Type * source;
5537 struct Type * realDest = dest;
5538 struct Type * backupSourceExpType = (((void *)0));
5539 struct Expression * computedExp = sourceExp;
5542 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)
5544 computedExp = CopyExpression(sourceExp);
5545 ComputeExpression(computedExp);
5547 source = sourceExp->expType;
5548 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
5550 if(computedExp != sourceExp)
5552 FreeExpression(computedExp);
5553 computedExp = sourceExp;
5558 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
5560 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
5562 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
5564 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
5566 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
5568 if(sourceBase == destBase)
5570 if(computedExp != sourceExp)
5572 FreeExpression(computedExp);
5573 computedExp = sourceExp;
5582 struct __ecereNameSpace__ecere__sys__OldList * specs;
5583 unsigned int flag = 0;
5584 long long value = (((int)0x7fffffff));
5587 if(computedExp->type == 2)
5589 if(source->isSigned)
5590 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5592 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5594 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
5596 if(source->isSigned)
5597 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5599 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5601 if(computedExp != sourceExp)
5603 FreeExpression(computedExp);
5604 computedExp = sourceExp;
5606 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"))
5609 source = __extension__ ({
5610 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5612 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
5617 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5619 if(_class && _class->type == 3)
5621 if(source->kind != 8)
5623 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5624 struct Type * tempDest, * tempSource;
5626 for(; _class->base->type != 1000; _class = _class->base)
5629 tempDest = tempType;
5632 _class->symbol = FindClass(_class->fullName);
5633 tempType->__anon1._class = _class->symbol;
5634 tempType->truth = dest->truth;
5635 if(tempType->__anon1._class)
5636 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
5637 backupSourceExpType = sourceExp->expType;
5638 sourceExp->expType = dest;
5641 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5644 if(_class && _class->type == 2 && source->kind != 8)
5646 if(!dest->__anon1._class->__anon1.registered->dataType)
5647 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
5648 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5651 FreeType(sourceExp->expType);
5652 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
5656 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
5658 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
5659 struct Declarator * decl;
5662 ReadString(string, sourceExp->__anon1.__anon2.string);
5663 decl = SpecDeclFromString(string, specs, (((void *)0)));
5664 FreeExpContents(sourceExp);
5665 FreeType(sourceExp->expType);
5666 sourceExp->type = 24;
5667 sourceExp->__anon1._classExp.specifiers = specs;
5668 sourceExp->__anon1._classExp.decl = decl;
5669 sourceExp->expType = dest;
5673 if(backupSourceExpType)
5674 FreeType(backupSourceExpType);
5678 else if(source->kind == 8)
5680 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
5682 if(_class && (_class->type == 3 || _class->type == 2))
5686 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5687 struct Type * tempDest, * tempSource;
5689 if(!source->__anon1._class->__anon1.registered->dataType)
5690 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
5691 for(; _class->base->type != 1000; _class = _class->base)
5694 tempSource = tempType;
5696 tempType->__anon1._class = FindClass(_class->fullName);
5697 tempType->truth = source->truth;
5698 tempType->classObjectType = source->classObjectType;
5699 if(tempType->__anon1._class)
5700 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
5701 if(conversions->last)
5703 ((struct Conversion *)conversions->last)->resultType = dest;
5706 FreeType(sourceExp->expType);
5707 sourceExp->expType = MkClassType(_class->fullName);
5708 sourceExp->expType->truth = source->truth;
5709 sourceExp->expType->classObjectType = source->classObjectType;
5710 if(!sourceExp->destType)
5712 FreeType(sourceExp->destType);
5713 sourceExp->destType = sourceExp->expType;
5714 if(sourceExp->expType)
5715 sourceExp->expType->refCount++;
5717 if(!_class->dataType)
5718 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
5720 dest = MkClassType(source->__anon1._class->string);
5721 dest->truth = source->truth;
5722 dest->classObjectType = source->classObjectType;
5724 source = _class->dataType;
5726 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5732 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5741 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5742 unsigned int fittingValue = 0;
5744 if(_class && _class->type == 4)
5746 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5747 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5749 if(c && value >= 0 && value <= c->largest)
5752 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
5754 if(_class->type == 0 || _class->type == 5)
5756 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5758 *newExp = *sourceExp;
5759 if(sourceExp->destType)
5760 sourceExp->destType->refCount++;
5761 if(sourceExp->expType)
5762 sourceExp->expType->refCount++;
5763 sourceExp->type = 11;
5764 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
5765 sourceExp->__anon1.cast.exp = newExp;
5766 FreeType(sourceExp->expType);
5767 sourceExp->expType = (((void *)0));
5768 ProcessExpressionType(sourceExp);
5771 FreeType(sourceExp->expType);
5772 sourceExp->expType = dest;
5777 if(backupSourceExpType)
5778 FreeType(backupSourceExpType);
5781 if(!_class->dataType)
5782 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
5784 dest = _class->dataType;
5787 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))
5789 specs = MkListOne(MkSpecifier(DOUBLE));
5791 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))
5793 specs = MkListOne(MkSpecifier(FLOAT));
5795 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))
5799 ListAdd(specs, MkSpecifier(UNSIGNED));
5800 ListAdd(specs, MkSpecifier(INT64));
5802 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
5806 ListAdd(specs, MkSpecifier(UNSIGNED));
5807 ListAdd(specs, MkSpecifier(INT));
5809 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5813 ListAdd(specs, MkSpecifier(UNSIGNED));
5814 ListAdd(specs, MkSpecifier(SHORT));
5816 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5820 ListAdd(specs, MkSpecifier(UNSIGNED));
5821 ListAdd(specs, MkSpecifier(CHAR));
5827 if(backupSourceExpType)
5829 if(sourceExp->expType)
5830 FreeType(sourceExp->expType);
5831 sourceExp->expType = backupSourceExpType;
5836 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))
5838 specs = MkListOne(MkSpecifier(DOUBLE));
5840 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))
5842 specs = MkListOne(MkSpecifier(FLOAT));
5844 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
5847 ListAdd(specs, MkSpecifier(BOOL));
5849 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)))
5853 ListAdd(specs, MkSpecifier(UNSIGNED));
5854 ListAdd(specs, MkSpecifier(CHAR));
5856 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)))))
5860 ListAdd(specs, MkSpecifier(UNSIGNED));
5861 ListAdd(specs, MkSpecifier(SHORT));
5863 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
5867 ListAdd(specs, MkSpecifier(UNSIGNED));
5868 ListAdd(specs, MkSpecifier(INT));
5870 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
5874 ListAdd(specs, MkSpecifier(UNSIGNED));
5875 ListAdd(specs, MkSpecifier(INT64));
5877 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5879 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
5885 if(backupSourceExpType)
5887 if(sourceExp->expType)
5888 FreeType(sourceExp->expType);
5889 sourceExp->expType = backupSourceExpType;
5893 if(!flag && !sourceExp->opDestType)
5895 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5897 *newExp = *sourceExp;
5898 newExp->prev = (((void *)0));
5899 newExp->next = (((void *)0));
5900 if(sourceExp->destType)
5901 sourceExp->destType->refCount++;
5902 if(sourceExp->expType)
5903 sourceExp->expType->refCount++;
5904 sourceExp->type = 11;
5905 if(realDest->kind == 8)
5907 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
5908 FreeList(specs, FreeSpecifier);
5911 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
5912 if(newExp->type == 4)
5914 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
5917 sourceExp->__anon1.cast.exp = newExp;
5918 FreeType(sourceExp->expType);
5919 sourceExp->expType = (((void *)0));
5920 ProcessExpressionType(sourceExp);
5923 FreeList(specs, FreeSpecifier);
5926 if(backupSourceExpType)
5927 FreeType(backupSourceExpType);
5932 if(computedExp != sourceExp)
5934 FreeExpression(computedExp);
5935 computedExp = sourceExp;
5937 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
5938 sourceExp = (*sourceExp->__anon1.list).last;
5939 if(sourceExp->type == 0)
5941 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
5945 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5947 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
5948 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5952 for(; _class && _class->type == 4; _class = _class->base)
5954 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
5955 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5957 for(value = e->values.first; value; value = value->next)
5959 if(!strcmp(value->name, id->string))
5964 FreeExpContents(sourceExp);
5965 FreeType(sourceExp->expType);
5966 sourceExp->isConstant = 1;
5967 sourceExp->expType = MkClassType(_class->fullName);
5969 sourceExp->type = 2;
5970 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
5971 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
5973 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
5982 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
5993 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5995 int value2 = op2->__anon1.i;
5998 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
6001 exp->expType = op1->type;
6003 op1->type->refCount++;
6008 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6010 unsigned int value2 = op2->__anon1.ui;
6013 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
6016 exp->expType = op1->type;
6018 op1->type->refCount++;
6023 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6025 long long value2 = op2->__anon1.i64;
6028 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
6031 exp->expType = op1->type;
6033 op1->type->refCount++;
6038 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6040 uint64 value2 = op2->__anon1.ui64;
6043 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
6046 exp->expType = op1->type;
6048 op1->type->refCount++;
6053 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6055 short value2 = op2->__anon1.s;
6058 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
6061 exp->expType = op1->type;
6063 op1->type->refCount++;
6068 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6070 unsigned short value2 = op2->__anon1.us;
6073 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
6076 exp->expType = op1->type;
6078 op1->type->refCount++;
6083 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6085 char value2 = op2->__anon1.c;
6088 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
6091 exp->expType = op1->type;
6093 op1->type->refCount++;
6098 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6100 unsigned char value2 = op2->__anon1.uc;
6103 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
6106 exp->expType = op1->type;
6108 op1->type->refCount++;
6113 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6115 float value2 = op2->__anon1.f;
6118 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
6121 exp->expType = op1->type;
6123 op1->type->refCount++;
6128 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6130 double value2 = op2->__anon1.d;
6133 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
6136 exp->expType = op1->type;
6138 op1->type->refCount++;
6143 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6145 int value2 = op2->__anon1.i;
6148 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
6151 exp->expType = op1->type;
6153 op1->type->refCount++;
6158 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6160 unsigned int value2 = op2->__anon1.ui;
6163 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
6166 exp->expType = op1->type;
6168 op1->type->refCount++;
6173 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6175 long long value2 = op2->__anon1.i64;
6178 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
6181 exp->expType = op1->type;
6183 op1->type->refCount++;
6188 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6190 uint64 value2 = op2->__anon1.ui64;
6193 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
6196 exp->expType = op1->type;
6198 op1->type->refCount++;
6203 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6205 short value2 = op2->__anon1.s;
6208 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
6211 exp->expType = op1->type;
6213 op1->type->refCount++;
6218 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6220 unsigned short value2 = op2->__anon1.us;
6223 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
6226 exp->expType = op1->type;
6228 op1->type->refCount++;
6233 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6235 char value2 = op2->__anon1.c;
6238 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
6241 exp->expType = op1->type;
6243 op1->type->refCount++;
6248 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6250 unsigned char value2 = op2->__anon1.uc;
6253 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
6256 exp->expType = op1->type;
6258 op1->type->refCount++;
6263 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6265 float value2 = op2->__anon1.f;
6268 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
6271 exp->expType = op1->type;
6273 op1->type->refCount++;
6278 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6280 double value2 = op2->__anon1.d;
6283 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
6286 exp->expType = op1->type;
6288 op1->type->refCount++;
6293 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6295 int value2 = op2->__anon1.i;
6298 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
6301 exp->expType = op1->type;
6303 op1->type->refCount++;
6308 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6310 unsigned int value2 = op2->__anon1.ui;
6313 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
6316 exp->expType = op1->type;
6318 op1->type->refCount++;
6323 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6325 long long value2 = op2->__anon1.i64;
6328 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
6331 exp->expType = op1->type;
6333 op1->type->refCount++;
6338 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6340 uint64 value2 = op2->__anon1.ui64;
6343 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
6346 exp->expType = op1->type;
6348 op1->type->refCount++;
6353 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6355 short value2 = op2->__anon1.s;
6358 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
6361 exp->expType = op1->type;
6363 op1->type->refCount++;
6368 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6370 unsigned short value2 = op2->__anon1.us;
6373 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
6376 exp->expType = op1->type;
6378 op1->type->refCount++;
6383 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6385 char value2 = op2->__anon1.c;
6388 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
6391 exp->expType = op1->type;
6393 op1->type->refCount++;
6398 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6400 unsigned char value2 = op2->__anon1.uc;
6403 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
6406 exp->expType = op1->type;
6408 op1->type->refCount++;
6413 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6415 float value2 = op2->__anon1.f;
6418 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
6421 exp->expType = op1->type;
6423 op1->type->refCount++;
6428 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6430 double value2 = op2->__anon1.d;
6433 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
6436 exp->expType = op1->type;
6438 op1->type->refCount++;
6443 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6445 int value2 = op2->__anon1.i;
6448 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
6451 exp->expType = op1->type;
6453 op1->type->refCount++;
6458 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6460 unsigned int value2 = op2->__anon1.ui;
6463 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
6466 exp->expType = op1->type;
6468 op1->type->refCount++;
6473 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6475 long long value2 = op2->__anon1.i64;
6478 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
6481 exp->expType = op1->type;
6483 op1->type->refCount++;
6488 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6490 uint64 value2 = op2->__anon1.ui64;
6493 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
6496 exp->expType = op1->type;
6498 op1->type->refCount++;
6503 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6505 short value2 = op2->__anon1.s;
6508 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
6511 exp->expType = op1->type;
6513 op1->type->refCount++;
6518 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6520 unsigned short value2 = op2->__anon1.us;
6523 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
6526 exp->expType = op1->type;
6528 op1->type->refCount++;
6533 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6535 char value2 = op2->__anon1.c;
6538 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
6541 exp->expType = op1->type;
6543 op1->type->refCount++;
6548 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6550 unsigned char value2 = op2->__anon1.uc;
6553 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
6556 exp->expType = op1->type;
6558 op1->type->refCount++;
6563 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6565 float value2 = op2->__anon1.f;
6568 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
6571 exp->expType = op1->type;
6573 op1->type->refCount++;
6578 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6580 double value2 = op2->__anon1.d;
6583 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
6586 exp->expType = op1->type;
6588 op1->type->refCount++;
6593 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6595 int value2 = op2->__anon1.i;
6598 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
6601 exp->expType = op1->type;
6603 op1->type->refCount++;
6608 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6610 unsigned int value2 = op2->__anon1.ui;
6613 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
6616 exp->expType = op1->type;
6618 op1->type->refCount++;
6623 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6625 long long value2 = op2->__anon1.i64;
6628 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
6631 exp->expType = op1->type;
6633 op1->type->refCount++;
6638 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6640 uint64 value2 = op2->__anon1.ui64;
6643 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
6646 exp->expType = op1->type;
6648 op1->type->refCount++;
6653 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6655 short value2 = op2->__anon1.s;
6658 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
6661 exp->expType = op1->type;
6663 op1->type->refCount++;
6668 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6670 unsigned short value2 = op2->__anon1.us;
6673 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
6676 exp->expType = op1->type;
6678 op1->type->refCount++;
6683 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6685 char value2 = op2->__anon1.c;
6688 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
6691 exp->expType = op1->type;
6693 op1->type->refCount++;
6698 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6700 unsigned char value2 = op2->__anon1.uc;
6703 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
6706 exp->expType = op1->type;
6708 op1->type->refCount++;
6713 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
6716 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
6719 exp->expType = op1->type;
6721 op1->type->refCount++;
6726 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
6729 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
6732 exp->expType = op1->type;
6734 op1->type->refCount++;
6739 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
6742 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
6745 exp->expType = op1->type;
6747 op1->type->refCount++;
6752 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
6755 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
6758 exp->expType = op1->type;
6760 op1->type->refCount++;
6765 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
6768 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
6771 exp->expType = op1->type;
6773 op1->type->refCount++;
6778 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
6781 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
6784 exp->expType = op1->type;
6786 op1->type->refCount++;
6791 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
6794 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
6797 exp->expType = op1->type;
6799 op1->type->refCount++;
6804 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
6807 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
6810 exp->expType = op1->type;
6812 op1->type->refCount++;
6817 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
6820 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
6823 exp->expType = op1->type;
6825 op1->type->refCount++;
6830 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
6833 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
6836 exp->expType = op1->type;
6838 op1->type->refCount++;
6843 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
6846 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
6849 exp->expType = op1->type;
6851 op1->type->refCount++;
6856 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
6859 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
6862 exp->expType = op1->type;
6864 op1->type->refCount++;
6869 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
6872 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
6875 exp->expType = op1->type;
6877 op1->type->refCount++;
6882 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
6885 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
6888 exp->expType = op1->type;
6890 op1->type->refCount++;
6895 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
6898 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
6901 exp->expType = op1->type;
6903 op1->type->refCount++;
6908 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
6911 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
6914 exp->expType = op1->type;
6916 op1->type->refCount++;
6921 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
6924 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
6927 exp->expType = op1->type;
6929 op1->type->refCount++;
6934 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
6937 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
6940 exp->expType = op1->type;
6942 op1->type->refCount++;
6947 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
6950 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
6953 exp->expType = op1->type;
6955 op1->type->refCount++;
6960 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
6963 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
6966 exp->expType = op1->type;
6968 op1->type->refCount++;
6973 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
6976 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
6979 exp->expType = op1->type;
6981 op1->type->refCount++;
6986 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
6989 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
6992 exp->expType = op1->type;
6994 op1->type->refCount++;
6999 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
7002 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
7005 exp->expType = op1->type;
7007 op1->type->refCount++;
7012 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
7015 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
7018 exp->expType = op1->type;
7020 op1->type->refCount++;
7025 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
7028 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
7031 exp->expType = op1->type;
7033 op1->type->refCount++;
7038 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
7041 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
7044 exp->expType = op1->type;
7046 op1->type->refCount++;
7051 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
7054 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
7057 exp->expType = op1->type;
7059 op1->type->refCount++;
7064 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
7067 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
7070 exp->expType = op1->type;
7072 op1->type->refCount++;
7077 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
7080 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
7083 exp->expType = op1->type;
7085 op1->type->refCount++;
7090 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
7093 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
7096 exp->expType = op1->type;
7098 op1->type->refCount++;
7103 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7105 int value2 = op2->__anon1.i;
7108 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
7111 exp->expType = op1->type;
7113 op1->type->refCount++;
7118 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7120 unsigned int value2 = op2->__anon1.ui;
7123 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
7126 exp->expType = op1->type;
7128 op1->type->refCount++;
7133 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7135 long long value2 = op2->__anon1.i64;
7138 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
7141 exp->expType = op1->type;
7143 op1->type->refCount++;
7148 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7150 uint64 value2 = op2->__anon1.ui64;
7153 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
7156 exp->expType = op1->type;
7158 op1->type->refCount++;
7163 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7165 short value2 = op2->__anon1.s;
7168 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
7171 exp->expType = op1->type;
7173 op1->type->refCount++;
7178 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7180 unsigned short value2 = op2->__anon1.us;
7183 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
7186 exp->expType = op1->type;
7188 op1->type->refCount++;
7193 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7195 char value2 = op2->__anon1.c;
7198 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
7201 exp->expType = op1->type;
7203 op1->type->refCount++;
7208 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7210 unsigned char value2 = op2->__anon1.uc;
7213 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
7216 exp->expType = op1->type;
7218 op1->type->refCount++;
7223 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7225 float value2 = op2->__anon1.f;
7228 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
7231 exp->expType = op1->type;
7233 op1->type->refCount++;
7238 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7240 double value2 = op2->__anon1.d;
7243 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
7246 exp->expType = op1->type;
7248 op1->type->refCount++;
7253 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7255 int value2 = op2->__anon1.i;
7258 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
7261 exp->expType = op1->type;
7263 op1->type->refCount++;
7268 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7270 unsigned int value2 = op2->__anon1.ui;
7273 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
7276 exp->expType = op1->type;
7278 op1->type->refCount++;
7283 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7285 long long value2 = op2->__anon1.i64;
7288 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
7291 exp->expType = op1->type;
7293 op1->type->refCount++;
7298 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7300 uint64 value2 = op2->__anon1.ui64;
7303 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
7306 exp->expType = op1->type;
7308 op1->type->refCount++;
7313 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7315 short value2 = op2->__anon1.s;
7318 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
7321 exp->expType = op1->type;
7323 op1->type->refCount++;
7328 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7330 unsigned short value2 = op2->__anon1.us;
7333 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
7336 exp->expType = op1->type;
7338 op1->type->refCount++;
7343 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7345 char value2 = op2->__anon1.c;
7348 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
7351 exp->expType = op1->type;
7353 op1->type->refCount++;
7358 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7360 unsigned char value2 = op2->__anon1.uc;
7363 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
7366 exp->expType = op1->type;
7368 op1->type->refCount++;
7373 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7375 float value2 = op2->__anon1.f;
7378 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
7381 exp->expType = op1->type;
7383 op1->type->refCount++;
7388 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7390 double value2 = op2->__anon1.d;
7393 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
7396 exp->expType = op1->type;
7398 op1->type->refCount++;
7403 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7405 int value2 = op2->__anon1.i;
7408 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
7411 exp->expType = op1->type;
7413 op1->type->refCount++;
7418 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7420 unsigned int value2 = op2->__anon1.ui;
7423 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
7426 exp->expType = op1->type;
7428 op1->type->refCount++;
7433 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7435 long long value2 = op2->__anon1.i64;
7438 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
7441 exp->expType = op1->type;
7443 op1->type->refCount++;
7448 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7450 uint64 value2 = op2->__anon1.ui64;
7453 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
7456 exp->expType = op1->type;
7458 op1->type->refCount++;
7463 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7465 short value2 = op2->__anon1.s;
7468 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
7471 exp->expType = op1->type;
7473 op1->type->refCount++;
7478 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7480 unsigned short value2 = op2->__anon1.us;
7483 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
7486 exp->expType = op1->type;
7488 op1->type->refCount++;
7493 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7495 char value2 = op2->__anon1.c;
7498 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
7501 exp->expType = op1->type;
7503 op1->type->refCount++;
7508 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7510 unsigned char value2 = op2->__anon1.uc;
7513 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
7516 exp->expType = op1->type;
7518 op1->type->refCount++;
7523 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7525 float value2 = op2->__anon1.f;
7528 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
7531 exp->expType = op1->type;
7533 op1->type->refCount++;
7538 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7540 double value2 = op2->__anon1.d;
7543 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
7546 exp->expType = op1->type;
7548 op1->type->refCount++;
7553 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7555 int value2 = op2->__anon1.i;
7558 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
7561 exp->expType = op1->type;
7563 op1->type->refCount++;
7568 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7570 unsigned int value2 = op2->__anon1.ui;
7573 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
7576 exp->expType = op1->type;
7578 op1->type->refCount++;
7583 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7585 long long value2 = op2->__anon1.i64;
7588 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
7591 exp->expType = op1->type;
7593 op1->type->refCount++;
7598 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7600 uint64 value2 = op2->__anon1.ui64;
7603 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
7606 exp->expType = op1->type;
7608 op1->type->refCount++;
7613 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7615 short value2 = op2->__anon1.s;
7618 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
7621 exp->expType = op1->type;
7623 op1->type->refCount++;
7628 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7630 unsigned short value2 = op2->__anon1.us;
7633 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
7636 exp->expType = op1->type;
7638 op1->type->refCount++;
7643 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7645 char value2 = op2->__anon1.c;
7648 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
7651 exp->expType = op1->type;
7653 op1->type->refCount++;
7658 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7660 unsigned char value2 = op2->__anon1.uc;
7663 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
7666 exp->expType = op1->type;
7668 op1->type->refCount++;
7673 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7675 float value2 = op2->__anon1.f;
7678 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
7681 exp->expType = op1->type;
7683 op1->type->refCount++;
7688 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7690 double value2 = op2->__anon1.d;
7693 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
7696 exp->expType = op1->type;
7698 op1->type->refCount++;
7703 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7705 int value2 = op2->__anon1.i;
7708 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
7711 exp->expType = op1->type;
7713 op1->type->refCount++;
7718 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7720 unsigned int value2 = op2->__anon1.ui;
7723 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
7726 exp->expType = op1->type;
7728 op1->type->refCount++;
7733 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7735 long long value2 = op2->__anon1.i64;
7738 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
7741 exp->expType = op1->type;
7743 op1->type->refCount++;
7748 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7750 uint64 value2 = op2->__anon1.ui64;
7753 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
7756 exp->expType = op1->type;
7758 op1->type->refCount++;
7763 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7765 short value2 = op2->__anon1.s;
7768 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
7771 exp->expType = op1->type;
7773 op1->type->refCount++;
7778 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7780 unsigned short value2 = op2->__anon1.us;
7783 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
7786 exp->expType = op1->type;
7788 op1->type->refCount++;
7793 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7795 char value2 = op2->__anon1.c;
7798 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
7801 exp->expType = op1->type;
7803 op1->type->refCount++;
7808 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7810 unsigned char value2 = op2->__anon1.uc;
7813 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
7816 exp->expType = op1->type;
7818 op1->type->refCount++;
7823 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7825 float value2 = op2->__anon1.f;
7828 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
7831 exp->expType = op1->type;
7833 op1->type->refCount++;
7838 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7840 double value2 = op2->__anon1.d;
7843 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
7846 exp->expType = op1->type;
7848 op1->type->refCount++;
7853 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7855 int value2 = op2->__anon1.i;
7858 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
7861 exp->expType = op1->type;
7863 op1->type->refCount++;
7868 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7870 unsigned int value2 = op2->__anon1.ui;
7873 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
7876 exp->expType = op1->type;
7878 op1->type->refCount++;
7883 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7885 long long value2 = op2->__anon1.i64;
7888 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
7891 exp->expType = op1->type;
7893 op1->type->refCount++;
7898 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7900 uint64 value2 = op2->__anon1.ui64;
7903 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
7906 exp->expType = op1->type;
7908 op1->type->refCount++;
7913 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7915 short value2 = op2->__anon1.s;
7918 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
7921 exp->expType = op1->type;
7923 op1->type->refCount++;
7928 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7930 unsigned short value2 = op2->__anon1.us;
7933 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
7936 exp->expType = op1->type;
7938 op1->type->refCount++;
7943 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7945 char value2 = op2->__anon1.c;
7948 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
7951 exp->expType = op1->type;
7953 op1->type->refCount++;
7958 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7960 unsigned char value2 = op2->__anon1.uc;
7963 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
7966 exp->expType = op1->type;
7968 op1->type->refCount++;
7973 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7975 int value2 = op2->__anon1.i;
7978 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
7981 exp->expType = op1->type;
7983 op1->type->refCount++;
7988 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7990 unsigned int value2 = op2->__anon1.ui;
7993 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
7996 exp->expType = op1->type;
7998 op1->type->refCount++;
8003 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8005 long long value2 = op2->__anon1.i64;
8008 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
8011 exp->expType = op1->type;
8013 op1->type->refCount++;
8018 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8020 uint64 value2 = op2->__anon1.ui64;
8023 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
8026 exp->expType = op1->type;
8028 op1->type->refCount++;
8033 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8035 short value2 = op2->__anon1.s;
8038 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
8041 exp->expType = op1->type;
8043 op1->type->refCount++;
8048 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8050 unsigned short value2 = op2->__anon1.us;
8053 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
8056 exp->expType = op1->type;
8058 op1->type->refCount++;
8063 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8065 char value2 = op2->__anon1.c;
8068 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
8071 exp->expType = op1->type;
8073 op1->type->refCount++;
8078 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8080 unsigned char value2 = op2->__anon1.uc;
8083 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
8086 exp->expType = op1->type;
8088 op1->type->refCount++;
8093 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8095 int value2 = op2->__anon1.i;
8098 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
8101 exp->expType = op1->type;
8103 op1->type->refCount++;
8108 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8110 unsigned int value2 = op2->__anon1.ui;
8113 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
8116 exp->expType = op1->type;
8118 op1->type->refCount++;
8123 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8125 long long value2 = op2->__anon1.i64;
8128 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
8131 exp->expType = op1->type;
8133 op1->type->refCount++;
8138 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8140 uint64 value2 = op2->__anon1.ui64;
8143 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
8146 exp->expType = op1->type;
8148 op1->type->refCount++;
8153 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8155 short value2 = op2->__anon1.s;
8158 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
8161 exp->expType = op1->type;
8163 op1->type->refCount++;
8168 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8170 unsigned short value2 = op2->__anon1.us;
8173 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
8176 exp->expType = op1->type;
8178 op1->type->refCount++;
8183 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8185 char value2 = op2->__anon1.c;
8188 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
8191 exp->expType = op1->type;
8193 op1->type->refCount++;
8198 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8200 unsigned char value2 = op2->__anon1.uc;
8203 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
8206 exp->expType = op1->type;
8208 op1->type->refCount++;
8213 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8215 int value2 = op2->__anon1.i;
8218 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
8221 exp->expType = op1->type;
8223 op1->type->refCount++;
8228 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8230 unsigned int value2 = op2->__anon1.ui;
8233 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
8236 exp->expType = op1->type;
8238 op1->type->refCount++;
8243 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8245 long long value2 = op2->__anon1.i64;
8248 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
8251 exp->expType = op1->type;
8253 op1->type->refCount++;
8258 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8260 uint64 value2 = op2->__anon1.ui64;
8263 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
8266 exp->expType = op1->type;
8268 op1->type->refCount++;
8273 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8275 short value2 = op2->__anon1.s;
8278 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
8281 exp->expType = op1->type;
8283 op1->type->refCount++;
8288 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8290 unsigned short value2 = op2->__anon1.us;
8293 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
8296 exp->expType = op1->type;
8298 op1->type->refCount++;
8303 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8305 char value2 = op2->__anon1.c;
8308 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
8311 exp->expType = op1->type;
8313 op1->type->refCount++;
8318 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8320 unsigned char value2 = op2->__anon1.uc;
8323 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
8326 exp->expType = op1->type;
8328 op1->type->refCount++;
8333 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8335 int value2 = op2->__anon1.i;
8338 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
8341 exp->expType = op1->type;
8343 op1->type->refCount++;
8348 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8350 unsigned int value2 = op2->__anon1.ui;
8353 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
8356 exp->expType = op1->type;
8358 op1->type->refCount++;
8363 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8365 long long value2 = op2->__anon1.i64;
8368 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
8371 exp->expType = op1->type;
8373 op1->type->refCount++;
8378 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8380 uint64 value2 = op2->__anon1.ui64;
8383 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
8386 exp->expType = op1->type;
8388 op1->type->refCount++;
8393 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8395 short value2 = op2->__anon1.s;
8398 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
8401 exp->expType = op1->type;
8403 op1->type->refCount++;
8408 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8410 unsigned short value2 = op2->__anon1.us;
8413 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
8416 exp->expType = op1->type;
8418 op1->type->refCount++;
8423 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8425 char value2 = op2->__anon1.c;
8428 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
8431 exp->expType = op1->type;
8433 op1->type->refCount++;
8438 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8440 unsigned char value2 = op2->__anon1.uc;
8443 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
8446 exp->expType = op1->type;
8448 op1->type->refCount++;
8453 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8455 int value2 = op2->__anon1.i;
8458 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
8461 exp->expType = op1->type;
8463 op1->type->refCount++;
8468 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8470 unsigned int value2 = op2->__anon1.ui;
8473 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
8476 exp->expType = op1->type;
8478 op1->type->refCount++;
8483 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8485 long long value2 = op2->__anon1.i64;
8488 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
8491 exp->expType = op1->type;
8493 op1->type->refCount++;
8498 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8500 uint64 value2 = op2->__anon1.ui64;
8503 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
8506 exp->expType = op1->type;
8508 op1->type->refCount++;
8513 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8515 short value2 = op2->__anon1.s;
8518 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
8521 exp->expType = op1->type;
8523 op1->type->refCount++;
8528 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8530 unsigned short value2 = op2->__anon1.us;
8533 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
8536 exp->expType = op1->type;
8538 op1->type->refCount++;
8543 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8545 char value2 = op2->__anon1.c;
8548 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
8551 exp->expType = op1->type;
8553 op1->type->refCount++;
8558 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8560 unsigned char value2 = op2->__anon1.uc;
8563 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
8566 exp->expType = op1->type;
8568 op1->type->refCount++;
8573 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
8576 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
8579 exp->expType = op1->type;
8581 op1->type->refCount++;
8586 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
8589 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
8592 exp->expType = op1->type;
8594 op1->type->refCount++;
8599 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
8602 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
8605 exp->expType = op1->type;
8607 op1->type->refCount++;
8612 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
8615 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
8618 exp->expType = op1->type;
8620 op1->type->refCount++;
8625 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
8628 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
8631 exp->expType = op1->type;
8633 op1->type->refCount++;
8638 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
8641 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
8644 exp->expType = op1->type;
8646 op1->type->refCount++;
8651 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
8654 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
8657 exp->expType = op1->type;
8659 op1->type->refCount++;
8664 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
8667 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
8670 exp->expType = op1->type;
8672 op1->type->refCount++;
8677 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8679 int value2 = op2->__anon1.i;
8682 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
8685 exp->expType = op1->type;
8687 op1->type->refCount++;
8692 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8694 unsigned int value2 = op2->__anon1.ui;
8697 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
8700 exp->expType = op1->type;
8702 op1->type->refCount++;
8707 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8709 long long value2 = op2->__anon1.i64;
8712 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
8715 exp->expType = op1->type;
8717 op1->type->refCount++;
8722 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8724 uint64 value2 = op2->__anon1.ui64;
8727 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
8730 exp->expType = op1->type;
8732 op1->type->refCount++;
8737 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8739 short value2 = op2->__anon1.s;
8742 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
8745 exp->expType = op1->type;
8747 op1->type->refCount++;
8752 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8754 unsigned short value2 = op2->__anon1.us;
8757 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
8760 exp->expType = op1->type;
8762 op1->type->refCount++;
8767 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8769 char value2 = op2->__anon1.c;
8772 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
8775 exp->expType = op1->type;
8777 op1->type->refCount++;
8782 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8784 unsigned char value2 = op2->__anon1.uc;
8787 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
8790 exp->expType = op1->type;
8792 op1->type->refCount++;
8797 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8799 int value2 = op2->__anon1.i;
8802 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
8805 exp->expType = op1->type;
8807 op1->type->refCount++;
8812 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8814 unsigned int value2 = op2->__anon1.ui;
8817 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
8820 exp->expType = op1->type;
8822 op1->type->refCount++;
8827 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8829 long long value2 = op2->__anon1.i64;
8832 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
8835 exp->expType = op1->type;
8837 op1->type->refCount++;
8842 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8844 uint64 value2 = op2->__anon1.ui64;
8847 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
8850 exp->expType = op1->type;
8852 op1->type->refCount++;
8857 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8859 short value2 = op2->__anon1.s;
8862 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
8865 exp->expType = op1->type;
8867 op1->type->refCount++;
8872 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8874 unsigned short value2 = op2->__anon1.us;
8877 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
8880 exp->expType = op1->type;
8882 op1->type->refCount++;
8887 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8889 char value2 = op2->__anon1.c;
8892 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
8895 exp->expType = op1->type;
8897 op1->type->refCount++;
8902 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8904 unsigned char value2 = op2->__anon1.uc;
8907 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
8910 exp->expType = op1->type;
8912 op1->type->refCount++;
8917 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8919 int value2 = op2->__anon1.i;
8922 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
8925 exp->expType = op1->type;
8927 op1->type->refCount++;
8932 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8934 unsigned int value2 = op2->__anon1.ui;
8937 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
8940 exp->expType = op1->type;
8942 op1->type->refCount++;
8947 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8949 long long value2 = op2->__anon1.i64;
8952 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
8955 exp->expType = op1->type;
8957 op1->type->refCount++;
8962 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8964 uint64 value2 = op2->__anon1.ui64;
8967 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
8970 exp->expType = op1->type;
8972 op1->type->refCount++;
8977 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8979 short value2 = op2->__anon1.s;
8982 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
8985 exp->expType = op1->type;
8987 op1->type->refCount++;
8992 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8994 unsigned short value2 = op2->__anon1.us;
8997 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
9000 exp->expType = op1->type;
9002 op1->type->refCount++;
9007 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9009 char value2 = op2->__anon1.c;
9012 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
9015 exp->expType = op1->type;
9017 op1->type->refCount++;
9022 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9024 unsigned char value2 = op2->__anon1.uc;
9027 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
9030 exp->expType = op1->type;
9032 op1->type->refCount++;
9037 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9039 int value2 = op2->__anon1.i;
9042 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
9045 exp->expType = op1->type;
9047 op1->type->refCount++;
9052 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9054 unsigned int value2 = op2->__anon1.ui;
9057 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
9060 exp->expType = op1->type;
9062 op1->type->refCount++;
9067 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9069 long long value2 = op2->__anon1.i64;
9072 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
9075 exp->expType = op1->type;
9077 op1->type->refCount++;
9082 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9084 uint64 value2 = op2->__anon1.ui64;
9087 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
9090 exp->expType = op1->type;
9092 op1->type->refCount++;
9097 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9099 short value2 = op2->__anon1.s;
9102 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
9105 exp->expType = op1->type;
9107 op1->type->refCount++;
9112 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9114 unsigned short value2 = op2->__anon1.us;
9117 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
9120 exp->expType = op1->type;
9122 op1->type->refCount++;
9127 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9129 char value2 = op2->__anon1.c;
9132 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
9135 exp->expType = op1->type;
9137 op1->type->refCount++;
9142 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9144 unsigned char value2 = op2->__anon1.uc;
9147 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
9150 exp->expType = op1->type;
9152 op1->type->refCount++;
9157 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9159 int value2 = op2->__anon1.i;
9162 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
9165 exp->expType = op1->type;
9167 op1->type->refCount++;
9172 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9174 unsigned int value2 = op2->__anon1.ui;
9177 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
9180 exp->expType = op1->type;
9182 op1->type->refCount++;
9187 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9189 long long value2 = op2->__anon1.i64;
9192 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
9195 exp->expType = op1->type;
9197 op1->type->refCount++;
9202 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9204 uint64 value2 = op2->__anon1.ui64;
9207 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
9210 exp->expType = op1->type;
9212 op1->type->refCount++;
9217 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9219 short value2 = op2->__anon1.s;
9222 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
9225 exp->expType = op1->type;
9227 op1->type->refCount++;
9232 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9234 unsigned short value2 = op2->__anon1.us;
9237 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
9240 exp->expType = op1->type;
9242 op1->type->refCount++;
9247 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9249 char value2 = op2->__anon1.c;
9252 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
9255 exp->expType = op1->type;
9257 op1->type->refCount++;
9262 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9264 unsigned char value2 = op2->__anon1.uc;
9267 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
9270 exp->expType = op1->type;
9272 op1->type->refCount++;
9277 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
9280 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
9283 exp->expType = op1->type;
9285 op1->type->refCount++;
9290 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
9293 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
9296 exp->expType = op1->type;
9298 op1->type->refCount++;
9303 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
9306 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
9309 exp->expType = op1->type;
9311 op1->type->refCount++;
9316 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
9319 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
9322 exp->expType = op1->type;
9324 op1->type->refCount++;
9329 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
9332 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
9335 exp->expType = op1->type;
9337 op1->type->refCount++;
9342 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
9345 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
9348 exp->expType = op1->type;
9350 op1->type->refCount++;
9355 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
9358 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
9361 exp->expType = op1->type;
9363 op1->type->refCount++;
9368 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
9371 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
9374 exp->expType = op1->type;
9376 op1->type->refCount++;
9381 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9383 int value2 = op2->__anon1.i;
9386 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
9389 exp->expType = op1->type;
9391 op1->type->refCount++;
9396 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9398 unsigned int value2 = op2->__anon1.ui;
9401 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
9404 exp->expType = op1->type;
9406 op1->type->refCount++;
9411 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9413 long long value2 = op2->__anon1.i64;
9416 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
9419 exp->expType = op1->type;
9421 op1->type->refCount++;
9426 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9428 uint64 value2 = op2->__anon1.ui64;
9431 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
9434 exp->expType = op1->type;
9436 op1->type->refCount++;
9441 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9443 short value2 = op2->__anon1.s;
9446 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
9449 exp->expType = op1->type;
9451 op1->type->refCount++;
9456 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9458 unsigned short value2 = op2->__anon1.us;
9461 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
9464 exp->expType = op1->type;
9466 op1->type->refCount++;
9471 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9473 char value2 = op2->__anon1.c;
9476 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
9479 exp->expType = op1->type;
9481 op1->type->refCount++;
9486 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9488 unsigned char value2 = op2->__anon1.uc;
9491 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
9494 exp->expType = op1->type;
9496 op1->type->refCount++;
9501 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9503 float value2 = op2->__anon1.f;
9506 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
9509 exp->expType = op1->type;
9511 op1->type->refCount++;
9516 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9518 double value2 = op2->__anon1.d;
9521 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
9524 exp->expType = op1->type;
9526 op1->type->refCount++;
9531 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9533 int value2 = op2->__anon1.i;
9536 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
9539 exp->expType = op1->type;
9541 op1->type->refCount++;
9546 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9548 unsigned int value2 = op2->__anon1.ui;
9551 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
9554 exp->expType = op1->type;
9556 op1->type->refCount++;
9561 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9563 long long value2 = op2->__anon1.i64;
9566 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
9569 exp->expType = op1->type;
9571 op1->type->refCount++;
9576 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9578 uint64 value2 = op2->__anon1.ui64;
9581 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
9584 exp->expType = op1->type;
9586 op1->type->refCount++;
9591 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9593 short value2 = op2->__anon1.s;
9596 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
9599 exp->expType = op1->type;
9601 op1->type->refCount++;
9606 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9608 unsigned short value2 = op2->__anon1.us;
9611 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
9614 exp->expType = op1->type;
9616 op1->type->refCount++;
9621 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9623 char value2 = op2->__anon1.c;
9626 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
9629 exp->expType = op1->type;
9631 op1->type->refCount++;
9636 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9638 unsigned char value2 = op2->__anon1.uc;
9641 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
9644 exp->expType = op1->type;
9646 op1->type->refCount++;
9651 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9653 float value2 = op2->__anon1.f;
9656 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
9659 exp->expType = op1->type;
9661 op1->type->refCount++;
9666 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9668 double value2 = op2->__anon1.d;
9671 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
9674 exp->expType = op1->type;
9676 op1->type->refCount++;
9681 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9683 int value2 = op2->__anon1.i;
9686 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
9689 exp->expType = op1->type;
9691 op1->type->refCount++;
9696 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9698 unsigned int value2 = op2->__anon1.ui;
9701 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
9704 exp->expType = op1->type;
9706 op1->type->refCount++;
9711 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9713 long long value2 = op2->__anon1.i64;
9716 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
9719 exp->expType = op1->type;
9721 op1->type->refCount++;
9726 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9728 uint64 value2 = op2->__anon1.ui64;
9731 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
9734 exp->expType = op1->type;
9736 op1->type->refCount++;
9741 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9743 short value2 = op2->__anon1.s;
9746 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
9749 exp->expType = op1->type;
9751 op1->type->refCount++;
9756 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9758 unsigned short value2 = op2->__anon1.us;
9761 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
9764 exp->expType = op1->type;
9766 op1->type->refCount++;
9771 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9773 char value2 = op2->__anon1.c;
9776 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
9779 exp->expType = op1->type;
9781 op1->type->refCount++;
9786 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9788 unsigned char value2 = op2->__anon1.uc;
9791 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
9794 exp->expType = op1->type;
9796 op1->type->refCount++;
9801 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9803 float value2 = op2->__anon1.f;
9806 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
9809 exp->expType = op1->type;
9811 op1->type->refCount++;
9816 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9818 double value2 = op2->__anon1.d;
9821 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
9824 exp->expType = op1->type;
9826 op1->type->refCount++;
9831 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9833 int value2 = op2->__anon1.i;
9836 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
9839 exp->expType = op1->type;
9841 op1->type->refCount++;
9846 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9848 unsigned int value2 = op2->__anon1.ui;
9851 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
9854 exp->expType = op1->type;
9856 op1->type->refCount++;
9861 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9863 long long value2 = op2->__anon1.i64;
9866 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
9869 exp->expType = op1->type;
9871 op1->type->refCount++;
9876 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9878 uint64 value2 = op2->__anon1.ui64;
9881 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
9884 exp->expType = op1->type;
9886 op1->type->refCount++;
9891 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9893 short value2 = op2->__anon1.s;
9896 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
9899 exp->expType = op1->type;
9901 op1->type->refCount++;
9906 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9908 unsigned short value2 = op2->__anon1.us;
9911 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
9914 exp->expType = op1->type;
9916 op1->type->refCount++;
9921 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9923 char value2 = op2->__anon1.c;
9926 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
9929 exp->expType = op1->type;
9931 op1->type->refCount++;
9936 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9938 unsigned char value2 = op2->__anon1.uc;
9941 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
9944 exp->expType = op1->type;
9946 op1->type->refCount++;
9951 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9953 float value2 = op2->__anon1.f;
9956 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
9959 exp->expType = op1->type;
9961 op1->type->refCount++;
9966 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9968 double value2 = op2->__anon1.d;
9971 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
9974 exp->expType = op1->type;
9976 op1->type->refCount++;
9981 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9983 int value2 = op2->__anon1.i;
9986 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
9989 exp->expType = op1->type;
9991 op1->type->refCount++;
9996 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9998 unsigned int value2 = op2->__anon1.ui;
10001 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
10004 exp->expType = op1->type;
10006 op1->type->refCount++;
10011 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10013 long long value2 = op2->__anon1.i64;
10016 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
10019 exp->expType = op1->type;
10021 op1->type->refCount++;
10026 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10028 uint64 value2 = op2->__anon1.ui64;
10031 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
10034 exp->expType = op1->type;
10036 op1->type->refCount++;
10041 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10043 short value2 = op2->__anon1.s;
10046 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
10049 exp->expType = op1->type;
10051 op1->type->refCount++;
10056 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10058 unsigned short value2 = op2->__anon1.us;
10061 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
10064 exp->expType = op1->type;
10066 op1->type->refCount++;
10071 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10073 char value2 = op2->__anon1.c;
10076 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
10079 exp->expType = op1->type;
10081 op1->type->refCount++;
10086 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10088 unsigned char value2 = op2->__anon1.uc;
10091 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
10094 exp->expType = op1->type;
10096 op1->type->refCount++;
10101 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10103 float value2 = op2->__anon1.f;
10106 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
10109 exp->expType = op1->type;
10111 op1->type->refCount++;
10116 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10118 double value2 = op2->__anon1.d;
10121 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
10124 exp->expType = op1->type;
10126 op1->type->refCount++;
10131 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10133 int value2 = op2->__anon1.i;
10136 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
10139 exp->expType = op1->type;
10141 op1->type->refCount++;
10146 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10148 unsigned int value2 = op2->__anon1.ui;
10151 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
10154 exp->expType = op1->type;
10156 op1->type->refCount++;
10161 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10163 long long value2 = op2->__anon1.i64;
10166 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
10169 exp->expType = op1->type;
10171 op1->type->refCount++;
10176 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10178 uint64 value2 = op2->__anon1.ui64;
10181 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
10184 exp->expType = op1->type;
10186 op1->type->refCount++;
10191 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10193 short value2 = op2->__anon1.s;
10196 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
10199 exp->expType = op1->type;
10201 op1->type->refCount++;
10206 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10208 unsigned short value2 = op2->__anon1.us;
10211 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
10214 exp->expType = op1->type;
10216 op1->type->refCount++;
10221 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10223 char value2 = op2->__anon1.c;
10226 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
10229 exp->expType = op1->type;
10231 op1->type->refCount++;
10236 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10238 unsigned char value2 = op2->__anon1.uc;
10241 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
10244 exp->expType = op1->type;
10246 op1->type->refCount++;
10251 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10253 float value2 = op2->__anon1.f;
10256 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
10259 exp->expType = op1->type;
10261 op1->type->refCount++;
10266 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10268 double value2 = op2->__anon1.d;
10271 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
10274 exp->expType = op1->type;
10276 op1->type->refCount++;
10281 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10283 int value2 = op2->__anon1.i;
10286 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
10289 exp->expType = op1->type;
10291 op1->type->refCount++;
10296 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10298 unsigned int value2 = op2->__anon1.ui;
10301 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
10304 exp->expType = op1->type;
10306 op1->type->refCount++;
10311 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10313 long long value2 = op2->__anon1.i64;
10316 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
10319 exp->expType = op1->type;
10321 op1->type->refCount++;
10326 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10328 uint64 value2 = op2->__anon1.ui64;
10331 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
10334 exp->expType = op1->type;
10336 op1->type->refCount++;
10341 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10343 short value2 = op2->__anon1.s;
10346 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
10349 exp->expType = op1->type;
10351 op1->type->refCount++;
10356 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10358 unsigned short value2 = op2->__anon1.us;
10361 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
10364 exp->expType = op1->type;
10366 op1->type->refCount++;
10371 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10373 char value2 = op2->__anon1.c;
10376 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
10379 exp->expType = op1->type;
10381 op1->type->refCount++;
10386 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10388 unsigned char value2 = op2->__anon1.uc;
10391 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
10394 exp->expType = op1->type;
10396 op1->type->refCount++;
10401 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10403 float value2 = op2->__anon1.f;
10406 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
10409 exp->expType = op1->type;
10411 op1->type->refCount++;
10416 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10418 double value2 = op2->__anon1.d;
10421 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
10424 exp->expType = op1->type;
10426 op1->type->refCount++;
10431 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10433 int value2 = op2->__anon1.i;
10436 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
10439 exp->expType = op1->type;
10441 op1->type->refCount++;
10446 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10448 unsigned int value2 = op2->__anon1.ui;
10451 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
10454 exp->expType = op1->type;
10456 op1->type->refCount++;
10461 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10463 long long value2 = op2->__anon1.i64;
10466 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
10469 exp->expType = op1->type;
10471 op1->type->refCount++;
10476 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10478 uint64 value2 = op2->__anon1.ui64;
10481 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
10484 exp->expType = op1->type;
10486 op1->type->refCount++;
10491 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10493 short value2 = op2->__anon1.s;
10496 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
10499 exp->expType = op1->type;
10501 op1->type->refCount++;
10506 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10508 unsigned short value2 = op2->__anon1.us;
10511 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
10514 exp->expType = op1->type;
10516 op1->type->refCount++;
10521 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10523 char value2 = op2->__anon1.c;
10526 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
10529 exp->expType = op1->type;
10531 op1->type->refCount++;
10536 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10538 unsigned char value2 = op2->__anon1.uc;
10541 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
10544 exp->expType = op1->type;
10546 op1->type->refCount++;
10551 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10553 float value2 = op2->__anon1.f;
10556 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
10559 exp->expType = op1->type;
10561 op1->type->refCount++;
10566 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10568 double value2 = op2->__anon1.d;
10571 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
10574 exp->expType = op1->type;
10576 op1->type->refCount++;
10581 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10584 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
10587 exp->expType = op1->type;
10589 op1->type->refCount++;
10594 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10597 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
10600 exp->expType = op1->type;
10602 op1->type->refCount++;
10607 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10610 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
10613 exp->expType = op1->type;
10615 op1->type->refCount++;
10620 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10623 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
10626 exp->expType = op1->type;
10628 op1->type->refCount++;
10633 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10636 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
10639 exp->expType = op1->type;
10641 op1->type->refCount++;
10646 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10649 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
10652 exp->expType = op1->type;
10654 op1->type->refCount++;
10659 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10662 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
10665 exp->expType = op1->type;
10667 op1->type->refCount++;
10672 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10675 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
10678 exp->expType = op1->type;
10680 op1->type->refCount++;
10685 struct OpTable intOps =
10687 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
10690 struct OpTable uintOps =
10692 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
10695 struct OpTable int64Ops =
10697 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
10700 struct OpTable uint64Ops =
10702 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
10705 struct OpTable shortOps =
10707 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
10710 struct OpTable ushortOps =
10712 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
10715 struct OpTable floatOps =
10717 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
10720 struct OpTable doubleOps =
10722 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
10725 struct OpTable charOps =
10727 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
10730 struct OpTable ucharOps =
10732 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
10735 void ReadString(char * output, char * string)
10737 int len = strlen(string);
10739 unsigned int quoted = 0, escaped = 0;
10741 for(c = 0; c < len; c++)
10743 char ch = string[c];
10801 int UnescapeString(char * d, char * s, int len)
10806 while(j < len && (ch = s[j]))
10811 switch((ch = s[++j]))
10857 char * OffsetEscapedString(char * s, int len, int offset)
10862 while(j < len && k < offset && (ch = s[j]))
10868 return (k == offset) ? s + j : (((void *)0));
10871 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
10873 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
10875 extern double strtod(const char * , char * * );
10877 extern float (* __ecereMethod_float_inf)(void);
10879 extern float (* __ecereMethod_float_nan)(void);
10881 extern double (* __ecereMethod_double_inf)(void);
10883 extern double (* __ecereMethod_double_nan)(void);
10885 struct Operand GetOperand(struct Expression * exp)
10887 struct Operand op =
10894 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
10897 struct Type * type = exp->expType;
10901 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))
10903 if(!type->__anon1._class->__anon1.registered->dataType)
10904 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
10905 type = type->__anon1._class->__anon1.registered->dataType;
10907 if(exp->type == 3 && op.kind == 13)
10909 op.__anon1.ui64 = (uint64)exp->__anon1.__anon2.string;
10911 op.ops = uint64Ops;
10913 else if(exp->isConstant && exp->type == 2)
10915 op.kind = type->kind;
10922 if(exp->__anon1.__anon1.constant[0] == '\'')
10924 op.__anon1.c = exp->__anon1.__anon1.constant[1];
10927 else if(type->isSigned)
10929 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10934 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10942 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10947 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10948 op.ops = ushortOps;
10955 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10960 op.__anon1.ui = strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10968 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10973 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10974 op.ops = uint64Ops;
10981 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10986 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10987 op.ops = uint64Ops;
10994 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10999 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11000 op.ops = uint64Ops;
11005 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11006 op.__anon1.f = __ecereMethod_float_inf();
11007 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11008 op.__anon1.f = -__ecereMethod_float_inf();
11009 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11010 op.__anon1.f = __ecereMethod_float_nan();
11011 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11012 op.__anon1.f = -__ecereMethod_float_nan();
11014 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11018 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11019 op.__anon1.d = __ecereMethod_double_inf();
11020 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11021 op.__anon1.d = -__ecereMethod_double_inf();
11022 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11023 op.__anon1.d = __ecereMethod_double_nan();
11024 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11025 op.__anon1.d = -__ecereMethod_double_nan();
11027 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11028 op.ops = doubleOps;
11033 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11035 op.ops = uint64Ops;
11043 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
11047 switch(_class->typeSize)
11050 if(!strcmp(_class->dataTypeString, "uint64"))
11051 v = (long long)*(uint64 *)ptr;
11053 v = *(long long *)ptr;
11056 if(!strcmp(_class->dataTypeString, "uint"))
11057 v = (long long)*(unsigned int *)ptr;
11059 v = (long long)*(int *)ptr;
11062 if(!strcmp(_class->dataTypeString, "uint16"))
11063 v = (long long)*(unsigned short *)ptr;
11065 v = (long long)*(short *)ptr;
11068 if(!strcmp(_class->dataTypeString, "byte"))
11069 v = (long long)*(unsigned char *)ptr;
11071 v = (long long)*(char *)ptr;
11077 int __ecereVMethodID_class_OnGetString;
11079 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
11081 static __attribute__((unused)) void UnusedFunction()
11085 ((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);
11088 extern int __ecereVMethodID_class_OnGetString;
11090 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
11092 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11094 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
11096 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11097 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
11100 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11101 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11102 struct Type * type;
11103 void * ptr = inst->data + dataMember->offset + offset;
11104 char * result = (((void *)0));
11106 exp->loc = member->loc = inst->loc;
11107 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11108 if(!dataMember->dataType)
11109 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11110 type = dataMember->dataType;
11111 if(type->kind == 8)
11113 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11115 if(_class->type == 4)
11117 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11121 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11122 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
11124 for(item = e->values.first; item; item = item->next)
11126 if(item->data == GetEnumValue(_class, ptr))
11128 result = item->name;
11134 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11136 exp->destType = MkClassType(_class->fullName);
11137 ProcessExpressionType(exp);
11141 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11143 if(!_class->dataType)
11144 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11145 type = _class->dataType;
11154 FreeExpContents(exp);
11155 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11161 FreeExpContents(exp);
11162 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11168 FreeExpContents(exp);
11169 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11175 FreeExpContents(exp);
11176 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11182 FreeExpContents(exp);
11183 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11189 FreeExpContents(exp);
11190 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11195 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11198 ListAdd(memberList, member);
11200 if(parentDataMember->type == 1)
11205 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
11207 void PopulateInstance(struct Instantiation * inst)
11209 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
11210 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
11211 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11212 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
11215 inst->members = MkListOne(MkMembersInitList(memberList));
11217 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
11218 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
11220 if(!dataMember->isProperty)
11222 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11223 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
11226 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11227 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11228 struct Type * type;
11229 void * ptr = inst->data + dataMember->offset;
11230 char * result = (((void *)0));
11232 exp->loc = member->loc = inst->loc;
11233 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11234 if(!dataMember->dataType)
11235 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11236 type = dataMember->dataType;
11237 if(type->kind == 8)
11239 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11241 if(_class->type == 4)
11243 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11247 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11248 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
11250 for(item = e->values.first; item; item = item->next)
11252 if(item->data == GetEnumValue(_class, ptr))
11254 result = item->name;
11261 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11263 exp->destType = MkClassType(_class->fullName);
11264 ProcessExpressionType(exp);
11267 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11269 if(!_class->dataType)
11270 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11271 type = _class->dataType;
11280 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11286 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11292 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11298 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11304 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11309 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11312 ListAdd(memberList, member);
11318 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);
11320 extern void FreeInstance(struct Instantiation * inst);
11322 void ComputeInstantiation(struct Expression * exp)
11324 struct Instantiation * inst = exp->__anon1.instance;
11325 struct MembersInit * members;
11326 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11327 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11328 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11329 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11330 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11331 int subMemberStackPos = 0;
11334 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11338 if(_class->type == 0 || _class->type == 5)
11340 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11341 if(_class->type == 0)
11342 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11345 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11349 for(members = (*inst->members).first; members; members = members->next)
11351 switch(members->type)
11355 if(members->__anon1.dataMembers)
11357 struct MemberInit * member;
11359 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11361 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11362 unsigned int found = 0;
11363 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11364 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11365 unsigned int dataMemberOffset;
11369 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11372 if(curMember->isProperty)
11373 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11376 dataMember = curMember;
11377 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11378 if(_class->type == 0)
11379 dataMemberOffset += _class->base->structSize;
11386 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11390 if(prop->memberAccess == 1)
11392 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11393 curClass = prop->_class;
11398 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11399 int _subMemberStackPos = 0;
11401 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11405 if(dataMember->memberAccess == 1)
11407 curMember = dataMember;
11408 curClass = dataMember->_class;
11409 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11410 subMemberStackPos = _subMemberStackPos;
11415 if(found && member->initializer && member->initializer->type == 0)
11417 struct Expression * value = member->initializer->__anon1.exp;
11418 struct Type * type = (((void *)0));
11419 unsigned int deepMember = 0;
11423 type = prop->dataType;
11425 else if(dataMember)
11427 if(!dataMember->dataType)
11428 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11429 type = dataMember->dataType;
11431 if(ident && ident->next)
11434 for(ident = ident->next; ident && type; ident = ident->next)
11436 if(type->kind == 8)
11438 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11440 type = prop->dataType;
11443 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11445 type = dataMember->dataType;
11448 else if(type->kind == 9 || type->kind == 10)
11450 struct Type * memberType;
11452 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11454 if(!strcmp(memberType->name, ident->string))
11465 FreeType(value->destType);
11466 value->destType = type;
11469 ComputeExpression(value);
11471 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11473 if(type->kind == 8)
11475 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11477 if(_class->type == 2 || _class->type == 3 || _class->type == 4)
11479 if(!_class->dataType)
11480 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11481 type = _class->dataType;
11486 void * ptr = inst->data + dataMemberOffset;
11488 if(value->type == 2)
11494 GetInt(value, (int *)ptr);
11499 GetInt64(value, (long long *)ptr);
11504 GetIntPtr(value, (intptr_t *)ptr);
11509 GetIntSize(value, (ssize_t *)ptr);
11514 GetFloat(value, (float *)ptr);
11519 GetDouble(value, (double *)ptr);
11524 else if(value->type == 1)
11526 if(type->kind == 8)
11528 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11530 if(_class->type == 1)
11532 ComputeTypeSize(type);
11533 if(value->__anon1.instance->data)
11534 memcpy(ptr, value->__anon1.instance->data, type->size);
11541 if(value->type == 1 && value->__anon1.instance->data)
11543 if(type->kind == 8)
11545 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11547 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)))
11549 void (* Set)(void *, void *) = (void *)prop->Set;
11551 Set(inst->data, value->__anon1.instance->data);
11552 PopulateInstance(inst);
11556 else if(value->type == 2)
11562 void (* Set)(void *, double) = (void *)prop->Set;
11564 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11569 void (* Set)(void *, float) = (void *)prop->Set;
11571 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11576 void (* Set)(void *, int) = (void *)prop->Set;
11578 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11583 void (* Set)(void *, long long) = (void *)prop->Set;
11585 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11590 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11592 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11597 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11599 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11604 else if(value->type == 3)
11608 ReadString(temp, value->__anon1.__anon2.string);
11609 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11613 else if(!deepMember && type && _class->type == 3)
11617 if(value->type == 2)
11619 if(type->kind == 8)
11621 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11623 if(_class->type == 3)
11625 if(!_class->dataType)
11626 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11627 type = _class->dataType;
11635 float (* Set)(float) = (void *)prop->Set;
11637 GetFloat(member->initializer->__anon1.exp, &fValue);
11638 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11645 double (* Set)(double) = (void *)prop->Set;
11647 GetDouble(member->initializer->__anon1.exp, &dValue);
11648 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11656 else if(!deepMember && type && _class->type == 2)
11660 if(value->type == 1 && value->__anon1.instance->data)
11662 unsigned int (* Set)(void *) = (void *)prop->Set;
11664 bits = Set(value->__anon1.instance->data);
11666 else if(value->type == 2)
11670 else if(dataMember)
11672 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11673 struct Type * type;
11676 bits = (bits & ~bitMember->mask);
11677 if(!bitMember->dataType)
11678 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11679 type = bitMember->dataType;
11680 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11682 if(!type->__anon1._class->__anon1.registered->dataType)
11683 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11684 type = type->__anon1._class->__anon1.registered->dataType;
11693 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11701 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11710 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11718 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11726 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11734 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11739 bits |= part << bitMember->pos;
11745 if(_class && _class->type == 3)
11747 ComputeExpression(member->initializer->__anon1.exp);
11748 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11750 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11760 if(_class && _class->type == 2)
11762 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11767 FreeInstance(inst);
11771 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
11773 unsigned int result = 0;
11778 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
11779 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
11783 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
11784 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11787 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)
11788 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11791 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)
11792 result = GetOpFloat(op, &op->__anon1.f);
11795 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)
11796 result = GetOpDouble(op, &op->__anon1.d);
11799 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)
11800 result = GetOpUInt64(op, &op->__anon1.ui64);
11803 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)
11804 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11807 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11808 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11811 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11812 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11818 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11820 if(exp->__anon1.op.op == SIZEOF)
11822 FreeExpContents(exp);
11824 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11828 if(!exp->__anon1.op.exp1)
11830 switch(exp->__anon1.op.op)
11834 struct Expression * exp2 = exp->__anon1.op.exp2;
11836 exp->__anon1.op.exp2 = (((void *)0));
11837 FreeExpContents(exp);
11838 FreeType(exp->expType);
11839 FreeType(exp->destType);
11841 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11847 FreeExpContents(exp);
11848 op1->ops.Neg(exp, op1);
11852 if(op1->ops.BitNot)
11854 FreeExpContents(exp);
11855 op1->ops.BitNot(exp, op1);
11861 FreeExpContents(exp);
11862 op1->ops.Not(exp, op1);
11869 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11871 if(Promote(op2, op1->kind, op1->type->isSigned))
11872 op2->kind = op1->kind, op2->ops = op1->ops;
11873 else if(Promote(op1, op2->kind, op2->type->isSigned))
11874 op1->kind = op2->kind, op1->ops = op2->ops;
11876 switch(exp->__anon1.op.op)
11881 FreeExpContents(exp);
11882 op1->ops.Add(exp, op1, op2);
11888 FreeExpContents(exp);
11889 op1->ops.Sub(exp, op1, op2);
11895 FreeExpContents(exp);
11896 op1->ops.Mul(exp, op1, op2);
11902 FreeExpContents(exp);
11903 op1->ops.Div(exp, op1, op2);
11909 FreeExpContents(exp);
11910 op1->ops.Mod(exp, op1, op2);
11914 if(exp->__anon1.op.exp2)
11916 if(op1->ops.BitAnd)
11918 FreeExpContents(exp);
11919 op1->ops.BitAnd(exp, op1, op2);
11926 FreeExpContents(exp);
11927 op1->ops.BitOr(exp, op1, op2);
11931 if(op1->ops.BitXor)
11933 FreeExpContents(exp);
11934 op1->ops.BitXor(exp, op1, op2);
11938 if(op1->ops.LShift)
11940 FreeExpContents(exp);
11941 op1->ops.LShift(exp, op1, op2);
11945 if(op1->ops.RShift)
11947 FreeExpContents(exp);
11948 op1->ops.RShift(exp, op1, op2);
11954 FreeExpContents(exp);
11955 op1->ops.Equ(exp, op1, op2);
11961 FreeExpContents(exp);
11962 op1->ops.Nqu(exp, op1, op2);
11968 FreeExpContents(exp);
11969 op1->ops.And(exp, op1, op2);
11975 FreeExpContents(exp);
11976 op1->ops.Or(exp, op1, op2);
11982 FreeExpContents(exp);
11983 op1->ops.Grt(exp, op1, op2);
11989 FreeExpContents(exp);
11990 op1->ops.Sma(exp, op1, op2);
11994 if(op1->ops.GrtEqu)
11996 FreeExpContents(exp);
11997 op1->ops.GrtEqu(exp, op1, op2);
12001 if(op1->ops.SmaEqu)
12003 FreeExpContents(exp);
12004 op1->ops.SmaEqu(exp, op1, op2);
12012 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
12014 extern struct Expression * MkExpIdentifier(struct Identifier * id);
12016 void ComputeExpression(struct Expression * exp)
12022 ComputeInstantiation(exp);
12027 struct Expression * exp1, * exp2 = (((void *)0));
12028 struct Operand op1 =
12035 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12038 struct Operand op2 =
12045 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12049 if(exp->__anon1.op.exp2)
12051 struct Expression * e = exp->__anon1.op.exp2;
12053 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
12055 if(e->type == 5 || e->type == 32 || e->type == 23)
12058 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12060 e = (*e->__anon1.list).last;
12063 if(exp->__anon1.op.op == 261 && e && e->expType)
12065 if(e->type == 3 && e->__anon1.__anon2.string)
12067 char * string = e->__anon1.__anon2.string;
12068 int len = strlen(string);
12069 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
12071 len = UnescapeString(tmp, string + 1, len - 2);
12072 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
12073 FreeExpContents(exp);
12075 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
12079 struct Type * type = e->expType;
12082 FreeExpContents(exp);
12084 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12090 ComputeExpression(exp->__anon1.op.exp2);
12092 if(exp->__anon1.op.exp1)
12094 ComputeExpression(exp->__anon1.op.exp1);
12095 exp1 = exp->__anon1.op.exp1;
12096 exp2 = exp->__anon1.op.exp2;
12097 op1 = GetOperand(exp1);
12099 op1.type->refCount++;
12102 op2 = GetOperand(exp2);
12104 op2.type->refCount++;
12109 exp1 = exp->__anon1.op.exp2;
12110 op1 = GetOperand(exp1);
12112 op1.type->refCount++;
12114 CallOperator(exp, exp1, exp2, &op1, &op2);
12116 FreeType(op1.type);
12118 FreeType(op2.type);
12124 struct Expression * e, * n;
12126 for(e = (*exp->__anon1.list).first; e; e = n)
12131 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
12132 struct Expression * prev = exp->prev;
12133 struct Expression * next = exp->next;
12135 ComputeExpression(e);
12136 FreeType(exp->expType);
12137 FreeType(exp->destType);
12141 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
12142 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
12153 struct Expression * memberExp = exp->__anon1.member.exp;
12154 struct Identifier * memberID = exp->__anon1.member.member;
12155 struct Type * type;
12157 ComputeExpression(exp->__anon1.member.exp);
12158 type = exp->__anon1.member.exp->expType;
12161 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)));
12162 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
12163 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
12164 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
12166 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
12167 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
12171 struct Symbol * classSym;
12174 PrintTypeNoConst(type, string, 0, 1);
12175 classSym = FindClass(string);
12176 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12178 if(exp->__anon1.member.member)
12180 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
12182 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
12184 if(!prop && !member && _class && exp->__anon1.member.member)
12186 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
12188 convertTo = _class;
12189 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12190 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
12196 struct Type * type = prop->dataType;
12198 if(_class->type == 3)
12200 if(type->kind == 8)
12202 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12204 if(_class->type == 3)
12206 if(!_class->dataType)
12207 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12208 type = _class->dataType;
12216 float (* Get)(float) = (void *)prop->Get;
12218 GetFloat(exp->__anon1.member.exp, &value);
12219 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
12226 double (* Get)(double);
12228 GetDouble(exp->__anon1.member.exp, &value);
12230 Get = (void *)prop->Set;
12232 Get = (void *)prop->Get;
12233 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
12243 struct Expression * value = exp->__anon1.member.exp;
12244 struct Type * type;
12246 if(!prop->dataType)
12247 ProcessPropertyType(prop);
12248 type = prop->dataType;
12252 else if(_class->type == 1)
12258 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12260 if(propertyClass->type == 1 && value->type == 1)
12262 void (* Set)(void *, void *) = (void *)prop->Set;
12264 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12265 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12266 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12267 exp->__anon1.instance->loc = exp->loc;
12269 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
12270 PopulateInstance(exp->__anon1.instance);
12277 void (* Set)(void *, int) = (void *)prop->Set;
12279 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12280 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12281 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12282 exp->__anon1.instance->loc = exp->loc;
12284 GetInt(value, &intValue);
12285 Set(exp->__anon1.instance->data, intValue);
12286 PopulateInstance(exp->__anon1.instance);
12291 long long intValue;
12292 void (* Set)(void *, long long) = (void *)prop->Set;
12294 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12295 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12296 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12297 exp->__anon1.instance->loc = exp->loc;
12299 GetInt64(value, &intValue);
12300 Set(exp->__anon1.instance->data, intValue);
12301 PopulateInstance(exp->__anon1.instance);
12307 void (* Set)(void *, intptr_t) = (void *)prop->Set;
12309 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12310 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12311 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12312 exp->__anon1.instance->loc = exp->loc;
12314 GetIntPtr(value, &intValue);
12315 Set(exp->__anon1.instance->data, intValue);
12316 PopulateInstance(exp->__anon1.instance);
12322 void (* Set)(void *, ssize_t) = (void *)prop->Set;
12324 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12325 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12326 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12327 exp->__anon1.instance->loc = exp->loc;
12329 GetIntSize(value, &intValue);
12330 Set(exp->__anon1.instance->data, intValue);
12331 PopulateInstance(exp->__anon1.instance);
12337 void (* Set)(void *, float) = (void *)prop->Set;
12339 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12340 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12341 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12342 exp->__anon1.instance->loc = exp->loc;
12344 GetFloat(value, &floatValue);
12345 Set(exp->__anon1.instance->data, floatValue);
12346 PopulateInstance(exp->__anon1.instance);
12351 double doubleValue;
12352 void (* Set)(void *, double) = (void *)prop->Set;
12354 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12355 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12356 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12357 exp->__anon1.instance->loc = exp->loc;
12359 GetDouble(value, &doubleValue);
12360 Set(exp->__anon1.instance->data, doubleValue);
12361 PopulateInstance(exp->__anon1.instance);
12366 else if(_class->type == 2)
12372 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12374 if(propertyClass->type == 1 && value->__anon1.instance->data)
12376 unsigned int (* Set)(void *) = (void *)prop->Set;
12377 unsigned int bits = Set(value->__anon1.instance->data);
12379 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12383 else if(_class->type == 2)
12385 unsigned int value;
12386 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
12389 GetUInt(exp->__anon1.member.exp, &value);
12391 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12400 if(_class->type == 2)
12402 unsigned int value;
12404 GetUInt(exp->__anon1.member.exp, &value);
12409 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12411 if(_class->type == 1)
12413 void (* Get)(unsigned int, void *) = (void *)prop->Get;
12415 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12416 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12417 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12418 exp->__anon1.instance->loc = exp->loc;
12420 Get(value, exp->__anon1.instance->data);
12421 PopulateInstance(exp->__anon1.instance);
12423 else if(_class->type == 2)
12425 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
12426 uint64 bits = Get(value);
12428 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
12435 else if(_class->type == 1)
12437 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
12443 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12445 if(_class->type == 1 && value)
12447 void (* Get)(void *, void *) = (void *)prop->Get;
12449 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12450 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12451 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12452 exp->__anon1.instance->loc = exp->loc;
12454 Get(value, exp->__anon1.instance->data);
12455 PopulateInstance(exp->__anon1.instance);
12466 exp->isConstant = 0;
12475 FreeExpression(memberExp);
12476 FreeIdentifier(memberID);
12482 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
12484 FreeExpContents(exp);
12485 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12492 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
12494 if(classSym && classSym->__anon1.registered)
12496 if(classSym->__anon1.registered->fixed)
12498 FreeSpecifier(exp->__anon1._class);
12499 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
12504 char className[1024];
12506 strcpy(className, "__ecereClass_");
12507 FullClassNameCat(className, classSym->string, 1);
12508 DeclareClass(classSym, className);
12509 FreeExpContents(exp);
12511 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
12512 exp->__anon1.member.member = MkIdentifier("structSize");
12519 struct Type * type;
12520 struct Expression * e = exp;
12522 if(exp->type == 11)
12524 if(exp->__anon1.cast.exp)
12525 ComputeExpression(exp->__anon1.cast.exp);
12526 e = exp->__anon1.cast.exp;
12528 if(e && exp->expType)
12530 type = exp->expType;
12531 if(type->kind == 8)
12533 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12535 if(_class && (_class->type == 3 || _class->type == 2))
12537 if(!_class->dataType)
12538 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12539 type = _class->dataType;
12548 char value = (char)0;
12550 if(GetChar(e, &value))
12552 FreeExpContents(exp);
12553 exp->__anon1.__anon1.constant = PrintChar(value);
12559 unsigned char value = (unsigned char)0;
12561 if(GetUChar(e, &value))
12563 FreeExpContents(exp);
12564 exp->__anon1.__anon1.constant = PrintUChar(value);
12572 short value = (short)0;
12574 if(GetShort(e, &value))
12576 FreeExpContents(exp);
12577 exp->__anon1.__anon1.constant = PrintShort(value);
12583 unsigned short value = (unsigned short)0;
12585 if(GetUShort(e, &value))
12587 FreeExpContents(exp);
12588 exp->__anon1.__anon1.constant = PrintUShort(value);
12598 if(GetInt(e, &value))
12600 FreeExpContents(exp);
12601 exp->__anon1.__anon1.constant = PrintInt(value);
12607 unsigned int value = 0;
12609 if(GetUInt(e, &value))
12611 FreeExpContents(exp);
12612 exp->__anon1.__anon1.constant = PrintUInt(value);
12620 long long value = 0;
12622 if(GetInt64(e, &value))
12624 FreeExpContents(exp);
12625 exp->__anon1.__anon1.constant = PrintInt64(value);
12633 if(GetUInt64(e, &value))
12635 FreeExpContents(exp);
12636 exp->__anon1.__anon1.constant = PrintUInt64(value);
12644 intptr_t value = 0;
12646 if(GetIntPtr(e, &value))
12648 FreeExpContents(exp);
12649 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12655 uintptr_t value = 0;
12657 if(GetUIntPtr(e, &value))
12659 FreeExpContents(exp);
12660 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12670 if(GetIntSize(e, &value))
12672 FreeExpContents(exp);
12673 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12681 if(GetUIntSize(e, &value))
12683 FreeExpContents(exp);
12684 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12693 if(GetFloat(e, &value))
12695 FreeExpContents(exp);
12696 exp->__anon1.__anon1.constant = PrintFloat(value);
12705 if(GetDouble(e, &value))
12707 FreeExpContents(exp);
12708 exp->__anon1.__anon1.constant = PrintDouble(value);
12719 struct Operand op1 =
12726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12729 struct Operand op2 =
12736 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12739 struct Operand op3 =
12746 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12750 if(exp->__anon1.cond.exp)
12751 ComputeExpression((*exp->__anon1.cond.exp).last);
12752 if(exp->__anon1.cond.elseExp)
12753 ComputeExpression(exp->__anon1.cond.elseExp);
12754 if(exp->__anon1.cond.cond)
12755 ComputeExpression(exp->__anon1.cond.cond);
12756 op1 = GetOperand(exp->__anon1.cond.cond);
12758 op1.type->refCount++;
12759 op2 = GetOperand((*exp->__anon1.cond.exp).last);
12761 op2.type->refCount++;
12762 op3 = GetOperand(exp->__anon1.cond.elseExp);
12764 op3.type->refCount++;
12767 FreeExpContents(exp);
12768 op1.ops.Cond(exp, &op1, &op2, &op3);
12771 FreeType(op1.type);
12773 FreeType(op2.type);
12775 FreeType(op3.type);
12781 void ApplyAnyObjectLogic(struct Expression * e);
12783 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
12785 unsigned int result = 1;
12789 struct __ecereNameSpace__ecere__sys__OldList converts =
12793 struct Conversion * convert;
12795 if(destType->kind == 0)
12797 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
12801 for(convert = converts.first; convert; convert = convert->next)
12803 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
12807 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12808 int objectType = exp->expType ? exp->expType->classObjectType : 0;
12811 newExp->prev = (((void *)0));
12812 newExp->next = (((void *)0));
12813 newExp->destType = (((void *)0));
12817 exp->addedThis = 1;
12818 exp->__anon1.member.exp = newExp;
12819 FreeType(exp->__anon1.member.exp->expType);
12820 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
12821 exp->__anon1.member.exp->expType->classObjectType = objectType;
12822 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
12823 exp->__anon1.member.memberType = 1;
12824 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12827 exp->expType->refCount++;
12828 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12834 exp->addedThis = 1;
12835 exp->__anon1.member.exp = newExp;
12836 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)
12838 newExp->byReference = 1;
12840 FreeType(exp->__anon1.member.exp->expType);
12841 exp->__anon1.member.exp->expType = (((void *)0));
12842 if(convert->convert->dataType)
12844 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12845 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
12846 exp->__anon1.member.exp->expType->refCount = 1;
12847 exp->__anon1.member.exp->expType->classObjectType = objectType;
12848 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12850 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
12851 exp->__anon1.member.memberType = 4;
12852 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12854 if(convert->resultType)
12855 convert->resultType->refCount++;
12861 FreeType(exp->expType);
12864 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12865 if(exp->destType->casted)
12868 exp->expType->refCount++;
12872 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12873 if(exp->destType->casted)
12875 if(convert->resultType)
12876 convert->resultType->refCount++;
12880 if(exp->isConstant && inCompiler)
12881 ComputeExpression(exp);
12882 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
12884 if(!result && exp->expType && converts.count)
12886 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
12888 if(!result && exp->expType && exp->destType)
12890 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))
12897 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
12899 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
12901 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
12903 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
12905 void CheckTemplateTypes(struct Expression * exp)
12907 struct Expression * nbExp = GetNonBracketsExp(exp);
12909 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
12911 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12912 struct Context * context;
12916 exp->destType->refCount++;
12918 exp->expType->refCount++;
12919 newExp->prev = (((void *)0));
12920 newExp->next = (((void *)0));
12921 switch(exp->expType->kind)
12924 if(exp->destType->classObjectType)
12927 exp->destType->refCount--;
12929 exp->expType->refCount--;
12930 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12934 struct __ecereNameSpace__ecere__sys__OldList * specs;
12935 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12936 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12938 context = PushContext();
12939 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12940 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12941 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12943 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12944 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
12945 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
12946 exp->__anon1.compound->__anon1.compound.context = context;
12947 PopContext(context);
12952 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
12953 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12958 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
12960 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12961 struct Context * context;
12965 exp->destType->refCount++;
12967 exp->expType->refCount++;
12968 newExp->prev = (((void *)0));
12969 newExp->next = (((void *)0));
12970 switch(exp->expType->kind)
12973 if(exp->destType->classObjectType)
12976 exp->destType->refCount--;
12978 exp->expType->refCount--;
12979 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12983 struct __ecereNameSpace__ecere__sys__OldList * specs;
12984 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12985 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12987 context = PushContext();
12988 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12989 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12990 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12992 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12993 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
12994 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
12995 exp->__anon1.compound->__anon1.compound.context = context;
12996 PopContext(context);
13001 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
13004 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)));
13005 ProcessExpressionType((*exp->__anon1.list).first);
13011 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
13012 exp->needTemplateCast = 2;
13013 newExp->needCast = 1;
13014 newExp->needTemplateCast = 2;
13015 ProcessExpressionType((*exp->__anon1.list).first);
13021 if(exp->expType->kind == 20)
13023 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
13027 FreeType(exp->destType);
13028 FreeType(exp->expType);
13029 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13033 if(newExp->type == 8 && newExp->__anon1.member.memberType == 3)
13036 exp->__anon1.op.op = '*';
13037 exp->__anon1.op.exp1 = (((void *)0));
13038 exp->__anon1.op.exp2 = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uint64")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '&', newExp))));
13042 char typeString[1024];
13043 struct Declarator * decl;
13044 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13046 typeString[0] = '\0';
13047 PrintType(exp->expType, typeString, 0, 0);
13048 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13050 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
13051 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
13052 exp->__anon1.cast.exp->needCast = 1;
13060 extern int strncmp(const char * , const char * , size_t n);
13062 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
13064 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
13066 int nsLen = strlen(nameSpace);
13067 struct Symbol * symbol;
13069 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)))
13071 char * s = symbol->string;
13073 if(!strncmp(s, nameSpace, nsLen))
13078 for(c = strlen(s) - 1; c >= 0; c--)
13081 namePart = s + c + 1;
13082 if(!strcmp(namePart, name))
13090 return (((void *)0));
13093 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
13096 char nameSpace[1024];
13097 const char * namePart;
13098 unsigned int gotColon = 0;
13100 nameSpace[0] = '\0';
13101 for(c = strlen(name) - 1; c >= 0; c--)
13107 namePart = name + c + 1;
13108 while(c >= 0 && name[c] == ':')
13112 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
13116 memcpy(nameSpace, name, c + 1);
13117 nameSpace[c + 1] = (char)0;
13118 return ScanWithNameSpace(tree, nameSpace, namePart);
13122 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13128 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13132 return ScanWithNameSpace(tree, "", namePart);
13134 return (((void *)0));
13137 static void ProcessDeclaration(struct Declaration * decl);
13139 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
13141 struct Context * ctx;
13142 struct Symbol * symbol = (((void *)0));
13144 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
13146 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
13148 symbol = (((void *)0));
13151 char curName[1024];
13153 strcpy(curName, thisNameSpace);
13154 strcat(curName, "::");
13155 strcat(curName, name);
13156 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
13159 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
13162 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
13163 if(symbol || ctx == endContext)
13166 if(inCompiler && curExternal && symbol && ctx == globalContext && curExternal->symbol && symbol->id > curExternal->symbol->idCode && symbol->__anon2.__anon1.pointerExternal)
13168 if(symbol->__anon2.__anon1.pointerExternal->type == 0)
13170 struct FunctionDefinition * function = symbol->__anon2.__anon1.pointerExternal->__anon1.function;
13171 struct Context * tmpContext = curContext;
13173 curContext = (((void *)0));
13174 symbol->__anon2.__anon1.pointerExternal = MkExternalDeclaration(MkDeclaration(CopyList(function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(function->declarator), (((void *)0))))));
13175 curContext = tmpContext;
13176 symbol->__anon2.__anon1.pointerExternal->symbol = symbol;
13177 DeclareType(symbol->type, 1, 1);
13178 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, symbol->__anon2.__anon1.pointerExternal);
13179 symbol->id = curExternal->symbol->idCode;
13181 else if(symbol->__anon2.__anon1.pointerExternal->type == 1 && curExternal->symbol->idCode < symbol->__anon2.__anon1.pointerExternal->symbol->id)
13183 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
13184 symbol->id = curExternal->symbol->idCode;
13190 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
13192 if(!type->isSigned && type->kind != 22 && type->kind != 23)
13193 ListAdd(specs, MkSpecifier(UNSIGNED));
13198 if(type->__anon1._class->__anon1.registered)
13200 if(!type->__anon1._class->__anon1.registered->dataType)
13201 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
13202 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
13207 ListAdd(specs, MkSpecifier(DOUBLE));
13210 ListAdd(specs, MkSpecifier(FLOAT));
13213 ListAdd(specs, MkSpecifier(CHAR));
13216 ListAdd(specs, MkSpecifier(_BOOL));
13219 ListAdd(specs, MkSpecifier(SHORT));
13222 ListAdd(specs, MkSpecifier(INT64));
13225 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
13228 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
13232 ListAdd(specs, MkSpecifier(INT));
13237 static void PrintArraySize(struct Type * arrayType, char * string)
13243 if(arrayType->__anon1.__anon4.enumClass)
13244 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
13245 else if(arrayType->__anon1.__anon4.arraySizeExp)
13246 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
13248 strcat(string, size);
13251 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
13255 if(printConst && type->constant)
13256 strcat(string, "const ");
13261 struct Symbol * c = type->__anon1._class;
13263 if(type->classObjectType == 2)
13264 strcat(string, "typed_object");
13265 else if(type->classObjectType == 3)
13266 strcat(string, "any_object");
13270 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
13272 if(type->byReference)
13273 strcat(string, " &");
13277 strcat(string, "void");
13280 strcat(string, type->isSigned ? "int" : "uint");
13283 strcat(string, type->isSigned ? "int64" : "uint64");
13286 strcat(string, type->isSigned ? "intptr" : "uintptr");
13289 strcat(string, type->isSigned ? "intsize" : "uintsize");
13292 strcat(string, type->isSigned ? "char" : "byte");
13295 strcat(string, "_Bool");
13298 strcat(string, type->isSigned ? "short" : "uint16");
13301 strcat(string, "float");
13304 strcat(string, "double");
13307 if(type->__anon1.__anon1.enumName)
13309 strcat(string, "struct ");
13310 strcat(string, type->__anon1.__anon1.enumName);
13312 else if(type->typeName)
13313 strcat(string, type->typeName);
13316 struct Type * member;
13318 strcat(string, "struct { ");
13319 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
13321 PrintType(member, string, 1, fullName);
13322 strcat(string, "; ");
13324 strcat(string, "}");
13328 if(type->__anon1.__anon1.enumName)
13330 strcat(string, "union ");
13331 strcat(string, type->__anon1.__anon1.enumName);
13333 else if(type->typeName)
13334 strcat(string, type->typeName);
13337 strcat(string, "union ");
13338 strcat(string, "(unnamed)");
13342 if(type->__anon1.__anon1.enumName)
13344 strcat(string, "enum ");
13345 strcat(string, type->__anon1.__anon1.enumName);
13347 else if(type->typeName)
13348 strcat(string, type->typeName);
13350 strcat(string, "int");
13353 strcat(string, "...");
13356 strcat(string, "subclass(");
13357 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
13358 strcat(string, ")");
13361 strcat(string, type->__anon1.templateParameter->identifier->string);
13364 strcat(string, "thisclass");
13367 strcat(string, "__builtin_va_list");
13373 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
13375 static void PrintName(struct Type * type, char * string, unsigned int fullName)
13377 if(type->name && type->name[0])
13380 strcat(string, type->name);
13383 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
13389 strcat(string, name);
13394 static void PrintAttribs(struct Type * type, char * string)
13398 if(type->dllExport)
13399 strcat(string, "dllexport ");
13400 if(type->attrStdcall)
13401 strcat(string, "stdcall ");
13405 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
13407 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13409 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
13410 PrintAttribs(type, string);
13411 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
13412 strcat(string, " const");
13413 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
13414 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13415 strcat(string, " (");
13416 if(type->kind == 13)
13418 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
13419 PrintAttribs(type->__anon1.type, string);
13421 if(type->kind == 13)
13423 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
13424 strcat(string, "*");
13426 strcat(string, " *");
13428 if(printConst && type->constant && type->kind == 13)
13429 strcat(string, " const");
13432 PrintTypeSpecs(type, string, fullName, printConst);
13435 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
13437 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13438 strcat(string, ")");
13439 if(type->kind == 12)
13440 PrintArraySize(type, string);
13441 else if(type->kind == 11)
13443 struct Type * param;
13445 strcat(string, "(");
13446 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
13448 PrintType(param, string, 1, fullName);
13450 strcat(string, ", ");
13452 strcat(string, ")");
13454 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13455 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
13458 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
13460 PrePrintType(type, string, fullName, (((void *)0)), printConst);
13461 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
13462 strcat(string, " ");
13463 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
13465 struct Symbol * _class = type->__anon1.__anon2.thisClass;
13467 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
13469 if(type->classObjectType == 1)
13470 strcat(string, "class");
13472 strcat(string, type->byReference ? "typed_object&" : "typed_object");
13474 else if(_class && _class->string)
13476 char * s = _class->string;
13482 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
13488 strcat(string, name);
13491 strcat(string, "::");
13493 if(printName && type->name)
13494 PrintName(type, string, fullName);
13495 PostPrintType(type, string, fullName);
13496 if(type->bitFieldCount)
13500 sprintf(count, ":%d", type->bitFieldCount);
13501 strcat(string, count);
13505 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13507 _PrintType(type, string, printName, fullName, 1);
13510 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13512 _PrintType(type, string, printName, fullName, 0);
13515 static struct Type * FindMember(struct Type * type, char * string)
13517 struct Type * memberType;
13519 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13521 if(!memberType->name)
13523 struct Type * subType = FindMember(memberType, string);
13528 else if(!strcmp(memberType->name, string))
13531 return (((void *)0));
13534 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
13536 struct Type * memberType;
13538 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13540 if(!memberType->name)
13542 struct Type * subType = FindMember(memberType, string);
13546 *offset += memberType->offset;
13550 else if(!strcmp(memberType->name, string))
13552 *offset += memberType->offset;
13556 return (((void *)0));
13559 extern unsigned int parseError;
13561 unsigned int GetParseError()
13566 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
13568 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
13570 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
13572 struct Expression * ParseExpressionString(char * expression)
13575 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
13576 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
13577 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13579 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13580 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
13581 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
13582 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13584 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13585 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
13587 parsedExpression = (((void *)0));
13589 expression_yyparse();
13590 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
13591 return parsedExpression;
13594 extern char * QMkString(const char * source);
13596 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
13598 struct Identifier * id = exp->__anon1.__anon1.identifier;
13599 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
13600 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13601 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13602 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
13604 if(_class && _class->type == 4)
13606 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
13607 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13611 struct __ecereNameSpace__ecere__com__Class * baseClass;
13613 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
13615 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
13617 for(value = e->values.first; value; value = value->next)
13619 if(!strcmp(value->name, id->string))
13624 char constant[256];
13626 FreeExpContents(exp);
13628 exp->isConstant = 1;
13629 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
13630 sprintf(constant, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64d" : "%lld"), value->data);
13632 sprintf(constant, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), value->data);
13633 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13634 exp->expType = MkClassType(baseClass->fullName);
13642 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
13644 ProcessMethodType(method);
13645 exp->expType = __extension__ ({
13646 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13648 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
13652 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
13654 if(!prop->dataType)
13655 ProcessPropertyType(prop);
13656 exp->expType = prop->dataType;
13658 prop->dataType->refCount++;
13661 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
13663 if(!member->dataType)
13664 member->dataType = ProcessTypeString(member->dataTypeString, 0);
13665 exp->expType = member->dataType;
13666 if(member->dataType)
13667 member->dataType->refCount++;
13670 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
13672 if(!classProp->dataType)
13673 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
13674 if(classProp->constant)
13676 FreeExpContents(exp);
13677 exp->isConstant = 1;
13678 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
13681 exp->__anon1.__anon1.constant = QMkString((char *)classProp->Get(_class));
13685 char constant[256];
13688 sprintf(constant, "%d", (int)classProp->Get(_class));
13689 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13695 exp->expType = classProp->dataType;
13696 if(classProp->dataType)
13697 classProp->dataType->refCount++;
13703 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
13705 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
13706 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
13707 struct __ecereNameSpace__ecere__com__NameSpace * child;
13711 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)))
13713 data = ScanGlobalData(child, name);
13721 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
13723 extern char * strncpy(char * , const char * , size_t n);
13725 static struct GlobalData * FindGlobalData(char * name)
13728 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
13730 nameSpace = globalData;
13731 for(c = 0; name[c]; c++)
13733 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
13735 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
13736 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
13738 strncpy(spaceName, name + start, c - start);
13739 spaceName[c - start] = '\0';
13740 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
13741 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
13743 return (((void *)0));
13744 nameSpace = newSpace;
13752 return ScanGlobalData(nameSpace, name + start);
13754 return (((void *)0));
13757 static int definedExpStackPos;
13759 static void * definedExpStack[512];
13761 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
13763 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
13765 FreeExpContents(checkedExp);
13766 FreeType(checkedExp->expType);
13767 FreeType(checkedExp->destType);
13768 *checkedExp = *newExp;
13769 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13770 checkedExp->prev = prev;
13771 checkedExp->next = next;
13774 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
13776 extern int printf(const char * , ...);
13778 void __ecereMethod_Expression_Clear();
13780 void ApplyAnyObjectLogic(struct Expression * e)
13782 struct Type * destType = e->destType;
13784 if(destType && (destType->classObjectType == 3))
13786 if(e && e->expType)
13788 struct Type * type = e->expType;
13789 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
13791 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
13793 _class = type->__anon1._class->__anon1.registered;
13795 else if(type->kind == 19)
13797 _class = FindClass("ecere::com::Class")->__anon1.registered;
13801 char string[1024] = "";
13802 struct Symbol * classSym;
13804 PrintTypeNoConst(type, string, 0, 1);
13805 classSym = FindClass(string);
13807 _class = classSym->__anon1.registered;
13809 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)))
13811 if(!_class || strcmp(_class->fullName, "char *"))
13813 struct Expression * checkedExp = e, * newExp;
13815 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13817 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13819 if(checkedExp->type == 23)
13821 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13824 checkedExp = (*checkedExp->__anon1.list).last;
13826 else if(checkedExp->type == 11)
13827 checkedExp = checkedExp->__anon1.cast.exp;
13829 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
13831 newExp = checkedExp->__anon1.op.exp2;
13832 checkedExp->__anon1.op.exp2 = (((void *)0));
13833 FreeExpContents(checkedExp);
13834 if(e->expType && e->expType->passAsTemplate)
13838 ComputeTypeSize(e->expType);
13839 sprintf(size, "%d", e->expType->size);
13840 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))))));
13842 ReplaceExpContents(checkedExp, newExp);
13843 e->byReference = 1;
13845 else if(!e->byReference || (_class && _class->type == 5))
13847 struct Expression * checkedExp;
13850 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;
13852 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
13854 struct Context * context = PushContext();
13855 struct Declarator * decl;
13856 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13857 char typeString[1024];
13858 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13860 typeString[0] = '\0';
13862 newExp->prev = (((void *)0));
13863 newExp->next = (((void *)0));
13864 newExp->expType = (((void *)0));
13865 PrintTypeNoConst(e->expType, typeString, 0, 1);
13866 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13867 newExp->destType = ProcessType(specs, decl);
13868 curContext = context;
13872 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
13875 sprintf(name, "__internalValue%03X", internalValueCounter++);
13876 if(!curCompound->__anon1.compound.declarations)
13877 curCompound->__anon1.compound.declarations = MkList();
13878 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
13879 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
13880 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
13881 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
13884 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
13886 struct Type * type = e->destType;
13888 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13889 CopyTypeInto(e->destType, type);
13890 e->destType->refCount = 1;
13891 e->destType->classObjectType = 0;
13894 e->__anon1.compound->__anon1.compound.context = context;
13895 PopContext(context);
13896 curContext = context->parent;
13900 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13902 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13904 if(checkedExp->type == 23)
13906 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13909 checkedExp = (*checkedExp->__anon1.list).last;
13911 else if(checkedExp->type == 11)
13912 checkedExp = checkedExp->__anon1.cast.exp;
13915 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13917 *operand = *checkedExp;
13918 __ecereMethod_Expression_Clear(checkedExp);
13919 checkedExp->destType = ProcessTypeString("void *", 0);
13920 checkedExp->expType = checkedExp->destType;
13921 checkedExp->destType->refCount++;
13922 checkedExp->type = 4;
13923 checkedExp->__anon1.op.op = '&';
13924 checkedExp->__anon1.op.exp1 = (((void *)0));
13925 checkedExp->__anon1.op.exp2 = operand;
13934 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))))
13936 if(e->expType->classObjectType && destType && destType->classObjectType)
13942 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13945 thisExp->prev = (((void *)0));
13946 thisExp->next = (((void *)0));
13947 __ecereMethod_Expression_Clear(e);
13949 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
13950 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
13951 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
13953 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13954 CopyTypeInto(e->expType, thisExp->expType);
13955 e->expType->byReference = 0;
13956 e->expType->refCount = 1;
13957 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))
13959 e->expType->classObjectType = 0;
13964 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
13966 if(destType->kind == 14)
13968 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
13970 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))
13972 unsigned int byReference = e->expType->byReference;
13973 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13974 struct Declarator * decl;
13975 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13976 char typeString[1024];
13977 struct Type * type;
13978 int backupClassObjectType;
13979 unsigned int backupByReference;
13981 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
13985 backupClassObjectType = type->classObjectType;
13986 backupByReference = type->byReference;
13987 type->classObjectType = 0;
13988 type->byReference = 0;
13989 typeString[0] = '\0';
13990 PrintType(type, typeString, 0, 1);
13991 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13992 type->classObjectType = backupClassObjectType;
13993 type->byReference = backupByReference;
13995 thisExp->prev = (((void *)0));
13996 thisExp->next = (((void *)0));
13997 __ecereMethod_Expression_Clear(e);
13998 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)))
14001 e->__anon1.op.op = '*';
14002 e->__anon1.op.exp1 = (((void *)0));
14003 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
14004 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14005 CopyTypeInto(e->expType, type);
14006 e->expType->byReference = 0;
14007 e->expType->refCount = 1;
14012 e->__anon1.cast.typeName = MkTypeName(specs, decl);
14013 e->__anon1.cast.exp = thisExp;
14014 e->byReference = 1;
14018 e->destType = destType;
14019 destType->refCount++;
14024 void ApplyLocation(struct Expression * exp, struct Location * loc)
14030 if(exp->__anon1.op.exp1)
14031 ApplyLocation(exp->__anon1.op.exp1, loc);
14032 if(exp->__anon1.op.exp2)
14033 ApplyLocation(exp->__anon1.op.exp2, loc);
14036 if(exp->__anon1.list)
14038 struct Expression * e;
14040 for(e = (*exp->__anon1.list).first; e; e = e->next)
14041 ApplyLocation(e, loc);
14045 if(exp->__anon1.index.index)
14047 struct Expression * e;
14049 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
14050 ApplyLocation(e, loc);
14052 if(exp->__anon1.index.exp)
14053 ApplyLocation(exp->__anon1.index.exp, loc);
14056 if(exp->__anon1.call.arguments)
14058 struct Expression * arg;
14060 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
14061 ApplyLocation(arg, loc);
14063 if(exp->__anon1.call.exp)
14064 ApplyLocation(exp->__anon1.call.exp, loc);
14068 if(exp->__anon1.member.exp)
14069 ApplyLocation(exp->__anon1.member.exp, loc);
14072 if(exp->__anon1.cast.exp)
14073 ApplyLocation(exp->__anon1.cast.exp, loc);
14076 if(exp->__anon1.cond.exp)
14078 struct Expression * e;
14080 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
14081 ApplyLocation(e, loc);
14083 if(exp->__anon1.cond.cond)
14084 ApplyLocation(exp->__anon1.cond.cond, loc);
14085 if(exp->__anon1.cond.elseExp)
14086 ApplyLocation(exp->__anon1.cond.elseExp, loc);
14089 if(exp->__anon1.vaArg.exp)
14090 ApplyLocation(exp->__anon1.vaArg.exp, loc);
14097 extern char * strstr(const char * , const char * );
14099 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DefinedExpression;
14101 struct __ecereNameSpace__ecere__com__DefinedExpression
14103 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
14104 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
14106 const char * value;
14107 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
14108 } __attribute__ ((gcc_struct));
14110 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14112 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14114 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
14116 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
14118 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
14120 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
14122 static void ProcessStatement(struct Statement * stmt);
14124 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
14126 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
14128 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
14130 extern const char * sourceFile;
14132 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
14134 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_Type_specConst;
14136 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
14138 void ProcessExpressionType(struct Expression * exp)
14140 unsigned int unresolved = 0;
14141 struct Location oldyylloc = yylloc;
14142 unsigned int notByReference = 0;
14144 if(!exp || exp->expType)
14151 struct Identifier * id = exp->__anon1.__anon1.identifier;
14153 if(!id || !topContext)
14155 if(id->_class && id->_class->__anon1.__anon1.name)
14157 id->classSym = id->_class->__anon1.__anon1.symbol;
14159 if(strstr(id->string, "__ecereClass") == id->string)
14161 exp->expType = ProcessTypeString("ecere::com::Class", 1);
14164 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
14166 ReplaceClassMembers(exp, thisClass);
14169 ProcessExpressionType(exp);
14172 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
14177 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14181 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
14187 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
14190 ProcessExpressionType(exp);
14194 else if(currentClass && !id->_class)
14196 if(ResolveIdWithClass(exp, currentClass, 1))
14199 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14204 struct Type * type = symbol->type;
14205 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
14207 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
14209 struct Context * context = SetupTemplatesContext(_class);
14211 type = ReplaceThisClassType(_class);
14212 FinishTemplatesContext(context);
14214 type->refCount = 0;
14216 FreeSpecifier(id->_class);
14217 id->_class = (((void *)0));
14218 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14219 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
14220 id->classSym = (((void *)0));
14221 exp->expType = type;
14224 if(type && (type->kind == 15))
14225 exp->isConstant = 1;
14226 if(symbol->isParam || !strcmp(id->string, "this"))
14228 if(_class && _class->type == 1 && !type->declaredWithStruct)
14229 exp->byReference = 1;
14231 if(symbol->isIterator)
14233 if(symbol->isIterator == 3)
14236 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
14237 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
14238 exp->expType = (((void *)0));
14239 ProcessExpressionType(exp);
14241 else if(symbol->isIterator != 4)
14244 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
14245 exp->__anon1.member.exp->expType = exp->expType;
14246 exp->__anon1.member.member = MkIdentifier("data");
14247 exp->expType = (((void *)0));
14248 ProcessExpressionType(exp);
14255 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
14257 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14261 strcpy(name, thisNameSpace);
14262 strcat(name, "::");
14263 strcat(name, id->string);
14264 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
14267 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
14272 for(c = 0; c < definedExpStackPos; c++)
14273 if(definedExpStack[c] == definedExp)
14275 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
14277 struct Location backupYylloc = yylloc;
14278 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
14280 definedExpStack[definedExpStackPos++] = definedExp;
14281 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
14282 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
14283 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14285 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14286 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
14287 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
14288 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14290 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14291 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
14293 parsedExpression = (((void *)0));
14295 expression_yyparse();
14296 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
14298 fileInput = backInput;
14299 yylloc = backupYylloc;
14300 if(parsedExpression)
14302 FreeIdentifier(id);
14304 exp->__anon1.list = MkListOne(parsedExpression);
14305 ApplyLocation(parsedExpression, &yylloc);
14306 ProcessExpressionType(exp);
14307 definedExpStackPos--;
14310 definedExpStackPos--;
14316 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
14322 struct GlobalData * data = (((void *)0));
14324 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14328 strcpy(name, thisNameSpace);
14329 strcat(name, "::");
14330 strcat(name, id->string);
14331 data = FindGlobalData(name);
14334 data = FindGlobalData(id->string);
14337 DeclareGlobalData(data);
14338 exp->expType = data->dataType;
14340 data->dataType->refCount++;
14341 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14342 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
14343 FreeSpecifier(id->_class);
14344 id->_class = (((void *)0));
14349 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
14351 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14355 strcpy(name, thisNameSpace);
14356 strcat(name, "::");
14357 strcat(name, id->string);
14358 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
14361 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
14366 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14367 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
14369 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
14370 strcpy(name, "__ecereFunction_");
14371 FullClassNameCat(name, id->string, 0);
14372 if(DeclareFunction(function, name))
14374 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14375 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
14377 exp->expType = function->dataType;
14378 if(function->dataType)
14379 function->dataType->refCount++;
14380 FreeSpecifier(id->_class);
14381 id->_class = (((void *)0));
14393 if(!exp->__anon1.instance->_class)
14395 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
14397 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
14400 ProcessInstantiationType(exp->__anon1.instance);
14401 exp->isConstant = exp->__anon1.instance->isConstant;
14402 if(exp->__anon1.instance->_class)
14404 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
14412 char * constant = exp->__anon1.__anon1.constant;
14413 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
14415 exp->expType = type;
14416 if(constant[0] == '\'')
14418 if((int)((unsigned char *)constant)[1] > 127)
14421 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
14425 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
14426 exp->__anon1.__anon1.constant = PrintUInt(ch);
14428 type->__anon1._class = FindClass("unichar");
14429 type->isSigned = 0;
14434 type->isSigned = 1;
14439 char * dot = strchr(constant, '.');
14440 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
14445 exponent = strchr(constant, 'p');
14447 exponent = strchr(constant, 'P');
14451 exponent = strchr(constant, 'e');
14453 exponent = strchr(constant, 'E');
14455 if(dot || exponent)
14457 if(strchr(constant, 'f') || strchr(constant, 'F'))
14461 type->isSigned = 1;
14465 unsigned int isSigned = constant[0] == '-';
14466 char * endP = (((void *)0));
14467 long long i64 = strtoll(constant, &endP, 0);
14468 uint64 ui64 = strtoull(constant, &endP, 0);
14469 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll"));
14473 if(i64 < (((int)0x80000000)))
14478 if(ui64 > (((int)0x7fffffff)))
14480 if(ui64 > (0xffffffff))
14483 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
14487 else if(constant[0] != '0' || !constant[1])
14490 type->kind = is64Bit ? 4 : 3;
14491 type->isSigned = isSigned;
14494 exp->isConstant = 1;
14495 if(exp->destType && exp->destType->kind == 7)
14497 else if(exp->destType && exp->destType->kind == 6)
14499 else if(exp->destType && exp->destType->kind == 4)
14506 exp->isConstant = 1;
14507 exp->expType = __extension__ ({
14508 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14510 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
14511 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14513 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = 1, __ecereInstance1;
14514 }), __ecereInstance2;
14520 ProcessExpressionType(exp->__anon1._new.size);
14521 exp->expType = __extension__ ({
14522 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14524 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
14526 DeclareType(exp->expType->__anon1.type, 0, 0);
14530 ProcessExpressionType(exp->__anon1._renew.size);
14531 ProcessExpressionType(exp->__anon1._renew.exp);
14532 exp->expType = __extension__ ({
14533 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14535 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
14537 DeclareType(exp->expType->__anon1.type, 0, 0);
14541 unsigned int assign = 0, boolResult = 0, boolOps = 0;
14542 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
14543 unsigned int useDestType = 0, useSideType = 0;
14544 struct Location oldyylloc = yylloc;
14545 unsigned int useSideUnit = 0;
14546 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
14547 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
14549 switch(exp->__anon1.op.op)
14603 if(exp->__anon1.op.exp1)
14610 if(exp->__anon1.op.op == '&')
14612 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
14614 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
14615 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14617 if(symbol && symbol->isIterator == 2)
14620 exp->__anon1.member.exp = exp->__anon1.op.exp2;
14621 exp->__anon1.member.member = MkIdentifier("key");
14622 exp->expType = (((void *)0));
14623 exp->__anon1.op.exp2->expType = symbol->type;
14624 symbol->type->refCount++;
14625 ProcessExpressionType(exp);
14631 if(exp->__anon1.op.exp1)
14633 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
14635 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
14637 if(exp->__anon1.op.exp1->destType)
14638 FreeType(exp->__anon1.op.exp1->destType);
14639 exp->__anon1.op.exp1->destType = exp->destType;
14640 exp->__anon1.op.exp1->opDestType = 1;
14642 exp->destType->refCount++;
14646 if(exp->__anon1.op.exp1->destType)
14647 FreeType(exp->__anon1.op.exp1->destType);
14648 exp->__anon1.op.exp1->destType = dummy;
14651 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14652 exp->__anon1.op.exp1->destType->count++;
14653 ProcessExpressionType(exp->__anon1.op.exp1);
14654 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14655 exp->__anon1.op.exp1->destType->count--;
14656 exp->__anon1.op.exp1->opDestType = 0;
14657 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)
14659 exp->__anon1.op.exp2 = MkExpConstant("1");
14660 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
14663 if(exp->__anon1.op.exp1->destType == dummy)
14666 exp->__anon1.op.exp1->destType = (((void *)0));
14668 type1 = exp->__anon1.op.exp1->expType;
14670 if(exp->__anon1.op.exp2)
14672 char expString[10240];
14674 expString[0] = '\0';
14675 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
14677 if(exp->__anon1.op.exp1)
14679 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
14680 if(exp->__anon1.op.exp1->expType)
14681 exp->__anon1.op.exp1->expType->refCount++;
14685 exp->__anon1.op.exp2->destType = exp->destType;
14686 if(!exp->__anon1.op.exp1 || exp->__anon1.op.op != '&')
14687 exp->__anon1.op.exp2->opDestType = 1;
14689 exp->destType->refCount++;
14693 exp->expType = type1;
14698 PrintExpression(exp->__anon1.op.exp2, expString);
14699 if(type1 && type1->kind == 13)
14701 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)
14702 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
14703 else if(exp->__anon1.op.op == '=')
14705 if(exp->__anon1.op.exp2->destType)
14706 FreeType(exp->__anon1.op.exp2->destType);
14707 exp->__anon1.op.exp2->destType = type1;
14714 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)
14718 if(exp->__anon1.op.exp2->destType)
14719 FreeType(exp->__anon1.op.exp2->destType);
14720 exp->__anon1.op.exp2->destType = type1;
14727 exp->expType = type1;
14729 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
14731 if(exp->__anon1.op.exp2->destType)
14732 FreeType(exp->__anon1.op.exp2->destType);
14733 exp->__anon1.op.exp2->destType = exp->destType;
14734 if(exp->__anon1.op.op != '&')
14735 exp->__anon1.op.exp2->opDestType = 1;
14737 exp->destType->refCount++;
14741 if(exp->__anon1.op.exp2->destType)
14742 FreeType(exp->__anon1.op.exp2->destType);
14743 exp->__anon1.op.exp2->destType = dummy;
14746 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))
14748 FreeType(exp->__anon1.op.exp2->destType);
14749 exp->__anon1.op.exp2->destType = type1;
14752 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14753 exp->__anon1.op.exp2->destType->count++;
14754 if(exp->__anon1.op.op == SIZEOF)
14756 struct Expression * e = exp->__anon1.op.exp2;
14758 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
14760 if(e->type == 5 || e->type == 32 || e->type == 23)
14763 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
14765 e = (*e->__anon1.list).last;
14768 if(e->type == 11 && e->__anon1.cast.exp)
14769 e->__anon1.cast.exp->needCast = 1;
14771 ProcessExpressionType(exp->__anon1.op.exp2);
14772 exp->__anon1.op.exp2->opDestType = 0;
14773 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14774 exp->__anon1.op.exp2->destType->count--;
14775 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
14777 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)
14779 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
14780 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14782 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)))
14784 if(exp->__anon1.op.op == ADD_ASSIGN)
14785 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14787 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))
14789 if(exp->__anon1.op.op == ADD_ASSIGN)
14790 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14792 else if(inCompiler)
14794 char type1String[1024];
14795 char type2String[1024];
14797 type1String[0] = '\0';
14798 type2String[0] = '\0';
14799 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
14800 PrintType(type1, type2String, 0, 1);
14801 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
14802 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
14805 if(exp->__anon1.op.exp2->destType == dummy)
14808 exp->__anon1.op.exp2->destType = (((void *)0));
14810 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
14812 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14813 type2->refCount = 1;
14814 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
14815 type2->isSigned = 1;
14817 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))
14819 type2 = __extension__ ({
14820 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14822 __ecereInstance1->kind = 3, __ecereInstance1;
14824 type2->refCount = 1;
14825 type2->isSigned = 1;
14829 type2 = exp->__anon1.op.exp2->expType;
14835 if(exp->__anon1.op.op == SIZEOF)
14837 exp->expType = __extension__ ({
14838 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14840 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
14842 exp->isConstant = 1;
14844 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
14846 exp->expType = Dereference(type2);
14847 if(type2 && type2->kind == 8)
14848 notByReference = 1;
14850 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
14851 exp->expType = Reference(type2);
14856 if(exp->__anon1.op.exp1)
14858 if(exp->__anon1.op.exp1->destType)
14859 FreeType(exp->__anon1.op.exp1->destType);
14860 exp->__anon1.op.exp1->destType = MkClassType("bool");
14861 exp->__anon1.op.exp1->destType->truth = 1;
14862 if(!exp->__anon1.op.exp1->expType)
14863 ProcessExpressionType(exp->__anon1.op.exp1);
14865 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
14866 FreeType(exp->__anon1.op.exp1->expType);
14867 exp->__anon1.op.exp1->expType = MkClassType("bool");
14868 exp->__anon1.op.exp1->expType->truth = 1;
14870 if(exp->__anon1.op.exp2)
14872 if(exp->__anon1.op.exp2->destType)
14873 FreeType(exp->__anon1.op.exp2->destType);
14874 exp->__anon1.op.exp2->destType = MkClassType("bool");
14875 exp->__anon1.op.exp2->destType->truth = 1;
14876 if(!exp->__anon1.op.exp2->expType)
14877 ProcessExpressionType(exp->__anon1.op.exp2);
14879 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
14880 FreeType(exp->__anon1.op.exp2->expType);
14881 exp->__anon1.op.exp2->expType = MkClassType("bool");
14882 exp->__anon1.op.exp2->expType->truth = 1;
14885 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")))))
14887 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"))))
14889 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)))
14891 struct Type * intType;
14893 if(!type1->__anon1._class->__anon1.registered->dataType)
14894 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
14895 if(!type2->__anon1._class->__anon1.registered->dataType)
14896 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
14897 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
14898 if(exp->__anon1.op.exp1->destType)
14899 FreeType(exp->__anon1.op.exp1->destType);
14900 if(exp->__anon1.op.exp2->destType)
14901 FreeType(exp->__anon1.op.exp2->destType);
14902 exp->__anon1.op.exp1->destType = intType;
14903 exp->__anon1.op.exp2->destType = intType;
14904 intType->refCount++;
14908 if(exp->__anon1.op.exp2->destType)
14909 FreeType(exp->__anon1.op.exp2->destType);
14910 exp->__anon1.op.exp2->destType = type1;
14912 if(exp->__anon1.op.exp1->destType)
14913 FreeType(exp->__anon1.op.exp1->destType);
14914 exp->__anon1.op.exp1->destType = type2;
14917 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)
14918 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);
14919 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
14921 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
14925 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14927 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
14928 ProcessExpressionType(exp->__anon1.op.exp1);
14929 if(type2->kind != 13)
14931 ProcessExpressionType(classExp);
14932 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
14933 if(!exp->__anon1.op.exp2->expType)
14937 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
14940 ProcessExpressionType(exp->__anon1.op.exp2);
14944 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)))
14946 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
14947 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14948 exp->expType = type1;
14952 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)))
14954 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
14955 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14956 exp->expType = type2;
14960 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))
14962 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
14966 unsigned int success = 0;
14968 if(type1->kind == 13 && type2->kind == 13)
14970 if(exp->__anon1.op.op == '+')
14971 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14972 else if(exp->__anon1.op.op == '-')
14974 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
14976 exp->expType = __extension__ ({
14977 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14979 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
14982 if(type1->__anon1.type->kind == 20)
14984 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
14988 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14990 ProcessExpressionType(classExp);
14992 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"))));
14993 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
15001 if(!success && exp->__anon1.op.exp1->type == 2)
15003 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15006 FreeType(exp->expType);
15007 exp->expType = exp->__anon1.op.exp1->destType;
15008 if(exp->__anon1.op.exp1->destType)
15009 exp->__anon1.op.exp1->destType->refCount++;
15012 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
15015 FreeType(exp->expType);
15016 exp->expType = exp->__anon1.op.exp2->destType;
15017 if(exp->__anon1.op.exp2->destType)
15018 exp->__anon1.op.exp2->destType->refCount++;
15024 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
15027 FreeType(exp->expType);
15028 exp->expType = exp->__anon1.op.exp2->destType;
15029 if(exp->__anon1.op.exp2->destType)
15030 exp->__anon1.op.exp2->destType->refCount++;
15033 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15036 FreeType(exp->expType);
15037 exp->expType = exp->__anon1.op.exp1->destType;
15038 if(exp->__anon1.op.exp1->destType)
15039 exp->__anon1.op.exp1->destType->refCount++;
15045 char expString1[10240];
15046 char expString2[10240];
15050 expString1[0] = '\0';
15051 expString2[0] = '\0';
15056 PrintExpression(exp->__anon1.op.exp1, expString1);
15057 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15058 PrintExpression(exp->__anon1.op.exp2, expString2);
15059 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15060 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
15061 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
15063 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
15067 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)
15069 if(exp->__anon1.op.exp1->destType)
15070 FreeType(exp->__anon1.op.exp1->destType);
15071 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15072 if(type2->__anon1._class->__anon1.registered->dataType)
15073 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15074 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
15075 exp->expType = type2;
15079 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)
15081 if(exp->__anon1.op.exp2->destType)
15082 FreeType(exp->__anon1.op.exp2->destType);
15083 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15084 if(type1->__anon1._class->__anon1.registered->dataType)
15085 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15086 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
15087 exp->expType = type1;
15093 unsigned int valid = 0;
15095 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
15097 if(exp->__anon1.op.exp2->destType)
15098 FreeType(exp->__anon1.op.exp2->destType);
15099 if(!type1->__anon1._class->__anon1.registered->dataType)
15100 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
15101 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15102 exp->__anon1.op.exp2->destType->refCount++;
15103 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
15106 type2 = exp->__anon1.op.exp2->destType;
15109 exp->expType = type2;
15112 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
15114 if(exp->__anon1.op.exp1->destType)
15115 FreeType(exp->__anon1.op.exp1->destType);
15116 if(!type2->__anon1._class->__anon1.registered->dataType)
15117 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
15118 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15119 exp->__anon1.op.exp1->destType->refCount++;
15120 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
15121 type1 = exp->__anon1.op.exp1->destType;
15122 exp->expType = type1;
15125 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
15127 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
15128 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
15130 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
15132 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15134 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
15137 FreeType(exp->expType);
15138 exp->expType = exp->__anon1.op.exp2->expType;
15139 if(exp->__anon1.op.exp2->expType)
15140 exp->__anon1.op.exp2->expType->refCount++;
15144 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15146 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
15149 FreeType(exp->expType);
15150 exp->expType = exp->__anon1.op.exp1->expType;
15151 if(exp->__anon1.op.exp1->expType)
15152 exp->__anon1.op.exp1->expType->refCount++;
15159 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15161 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
15164 FreeType(exp->expType);
15165 exp->expType = exp->__anon1.op.exp1->expType;
15166 if(exp->__anon1.op.exp1->expType)
15167 exp->__anon1.op.exp1->expType->refCount++;
15171 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15173 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
15176 FreeType(exp->expType);
15177 exp->expType = exp->__anon1.op.exp2->expType;
15178 if(exp->__anon1.op.exp2->expType)
15179 exp->__anon1.op.exp2->expType->refCount++;
15187 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))
15189 if(exp->__anon1.op.exp1->destType)
15190 FreeType(exp->__anon1.op.exp1->destType);
15191 exp->__anon1.op.exp1->destType = type2;
15193 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15196 FreeType(exp->expType);
15197 exp->expType = exp->__anon1.op.exp1->destType;
15198 if(exp->__anon1.op.exp1->destType)
15199 exp->__anon1.op.exp1->destType->refCount++;
15204 if(exp->__anon1.op.exp2->destType)
15205 FreeType(exp->__anon1.op.exp2->destType);
15206 exp->__anon1.op.exp2->destType = type1;
15208 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
15211 FreeType(exp->expType);
15212 exp->expType = exp->__anon1.op.exp2->destType;
15213 if(exp->__anon1.op.exp2->destType)
15214 exp->__anon1.op.exp2->destType->refCount++;
15216 else if(type1 && type2)
15218 char expString1[10240];
15219 char expString2[10240];
15220 char type1String[1024];
15221 char type2String[1024];
15223 expString1[0] = '\0';
15224 expString2[0] = '\0';
15225 type1String[0] = '\0';
15226 type2String[0] = '\0';
15229 PrintExpression(exp->__anon1.op.exp1, expString1);
15230 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15231 PrintExpression(exp->__anon1.op.exp2, expString2);
15232 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15233 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
15234 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
15236 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
15237 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
15239 exp->expType = exp->__anon1.op.exp1->expType;
15240 if(exp->__anon1.op.exp1->expType)
15241 exp->__anon1.op.exp1->expType->refCount++;
15243 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15245 exp->expType = exp->__anon1.op.exp2->expType;
15246 if(exp->__anon1.op.exp2->expType)
15247 exp->__anon1.op.exp2->expType->refCount++;
15255 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15257 struct Type * oldType = exp->__anon1.op.exp1->expType;
15259 exp->__anon1.op.exp1->expType = (((void *)0));
15260 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15263 exp->__anon1.op.exp1->expType = oldType;
15265 if(exp->__anon1.op.exp1->destType)
15266 FreeType(exp->__anon1.op.exp1->destType);
15267 exp->__anon1.op.exp1->destType = type2;
15269 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15272 FreeType(exp->expType);
15273 exp->expType = exp->__anon1.op.exp1->destType;
15274 if(exp->__anon1.op.exp1->destType)
15275 exp->__anon1.op.exp1->destType->refCount++;
15279 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
15281 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
15283 if(exp->__anon1.op.exp1->destType)
15284 FreeType(exp->__anon1.op.exp1->destType);
15285 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15286 if(type2->__anon1._class->__anon1.registered->dataType)
15287 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15288 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
15290 if(exp->__anon1.op.op == '!')
15292 exp->expType = MkClassType("bool");
15293 exp->expType->truth = 1;
15297 exp->expType = type2;
15302 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
15304 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
15306 if(exp->__anon1.op.exp2->destType)
15307 FreeType(exp->__anon1.op.exp2->destType);
15308 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15309 if(type1->__anon1._class->__anon1.registered->dataType)
15310 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15311 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
15313 exp->expType = type1;
15319 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
15321 char expString[10000];
15323 expString[0] = '\0';
15326 PrintExpression(exp->__anon1.op.exp1, expString);
15327 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15330 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15332 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
15334 char expString[10240];
15336 expString[0] = '\0';
15339 PrintExpression(exp->__anon1.op.exp2, expString);
15340 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15343 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15347 FreeType(exp->expType);
15348 exp->expType = MkClassType("bool");
15349 exp->expType->truth = 1;
15351 if(exp->__anon1.op.op != SIZEOF)
15352 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
15353 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
15355 DeclareType(exp->__anon1.op.exp2->expType, 0, 0);
15357 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
15358 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
15359 yylloc = oldyylloc;
15368 struct Expression * e;
15370 exp->isConstant = 1;
15371 for(e = (*exp->__anon1.list).first; e; e = e->next)
15373 unsigned int inced = 0;
15377 FreeType(e->destType);
15378 e->opDestType = exp->opDestType;
15379 e->destType = exp->destType;
15382 exp->destType->refCount++;
15383 e->destType->count++;
15387 ProcessExpressionType(e);
15389 exp->destType->count--;
15390 if(!exp->expType && !e->next)
15392 exp->expType = e->expType;
15394 e->expType->refCount++;
15397 exp->isConstant = 0;
15399 e = (*exp->__anon1.list).first;
15400 if(!e->next && e->type == 8)
15402 struct Expression * next = exp->next, * prev = exp->prev;
15404 FreeType(exp->expType);
15405 FreeType(exp->destType);
15406 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
15410 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
15411 ProcessExpressionType(exp);
15417 struct Expression * e;
15419 exp->isConstant = 1;
15420 ProcessExpressionType(exp->__anon1.index.exp);
15421 if(!exp->__anon1.index.exp->isConstant)
15422 exp->isConstant = 0;
15423 if(exp->__anon1.index.exp->expType)
15425 struct Type * source = exp->__anon1.index.exp->expType;
15427 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
15429 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
15430 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
15432 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
15434 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
15435 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
15437 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
15439 if(type->kind == 8)
15440 type->constant = 1;
15441 else if(type->kind == 13)
15443 struct Type * t = type;
15445 while(t->kind == 13)
15446 t = t->__anon1.type;
15449 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
15454 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
15456 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
15459 FreeType(e->destType);
15460 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
15462 ProcessExpressionType(e);
15467 exp->isConstant = 0;
15470 exp->expType = Dereference(exp->__anon1.index.exp->expType);
15472 DeclareType(exp->expType, 0, 0);
15477 struct Expression * e;
15478 struct Type * functionType;
15479 struct Type * methodType = (((void *)0));
15485 PrintExpression(exp->__anon1.call.exp, name);
15486 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
15488 PrintExpression(exp->__anon1.call.exp, name);
15491 if(exp->__anon1.call.exp->type == 0)
15493 struct Expression * idExp = exp->__anon1.call.exp;
15494 struct Identifier * id = idExp->__anon1.__anon1.identifier;
15496 if(!strcmp(id->string, "__builtin_frame_address"))
15498 exp->expType = ProcessTypeString("void *", 1);
15499 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15500 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15503 else if(!strcmp(id->string, "__ENDIAN_PAD"))
15505 exp->expType = ProcessTypeString("int", 1);
15506 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15507 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15510 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
15512 struct Expression * a = (((void *)0));
15513 struct Expression * b = (((void *)0));
15514 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
15516 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
15518 a = (*exp->__anon1.call.arguments).first;
15519 b = (*exp->__anon1.call.arguments).last;
15523 else if((*exp->__anon1.call.arguments).count == 1)
15525 a = (*exp->__anon1.call.arguments).first;
15530 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
15531 idExp->__anon1.__anon1.identifier = (((void *)0));
15532 FreeExpContents(exp);
15533 ProcessExpressionType(a);
15535 ProcessExpressionType(b);
15537 exp->__anon1.list = MkList();
15538 if(a->expType && (!b || b->expType))
15540 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
15544 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15545 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
15546 struct Declaration * decl;
15547 char temp1[1024], temp2[1024];
15549 GetTypeSpecs(a->expType, specs);
15550 if(a && !a->isConstant && a->type != 0)
15552 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
15553 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
15554 tempExp1 = QMkExpId(temp1);
15555 tempExp1->expType = a->expType;
15557 a->expType->refCount++;
15558 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
15560 if(b && !b->isConstant && b->type != 0)
15562 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
15563 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
15564 tempExp2 = QMkExpId(temp2);
15565 tempExp2->expType = b->expType;
15567 b->expType->refCount++;
15568 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
15570 decl = MkDeclaration(specs, decls);
15571 if(!curCompound->__anon1.compound.declarations)
15572 curCompound->__anon1.compound.declarations = MkList();
15573 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
15577 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
15579 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
15581 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
15582 exp->expType = a->expType;
15584 a->expType->refCount++;
15586 else if(!strcmp(id->string, "Abs"))
15588 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
15589 exp->expType = a->expType;
15591 a->expType->refCount++;
15593 else if(!strcmp(id->string, "Sgn"))
15595 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"))))));
15596 exp->expType = ProcessTypeString("int", 0);
15598 FreeExpression(tempExp1);
15600 FreeExpression(tempExp2);
15601 FreeIdentifier(id);
15607 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
15609 if(!exp->__anon1.call.exp->destType)
15611 exp->__anon1.call.exp->destType = dummy;
15614 ProcessExpressionType(exp->__anon1.call.exp);
15615 if(exp->__anon1.call.exp->destType == dummy)
15618 exp->__anon1.call.exp->destType = (((void *)0));
15622 functionType = exp->__anon1.call.exp->expType;
15623 if(functionType && functionType->kind == 16)
15625 methodType = functionType;
15626 functionType = methodType->__anon1.__anon3.method->dataType;
15627 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
15629 char typeString[1024];
15631 typeString[0] = '\0';
15633 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
15635 functionType->__anon1.__anon2.thisClass = (((void *)0));
15636 PrintType(functionType, typeString, 1, 1);
15637 functionType->__anon1.__anon2.thisClass = back;
15639 if(strstr(typeString, "thisclass"))
15641 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15642 struct Declarator * decl;
15645 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15647 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
15648 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))
15649 thisClassParams = 0;
15650 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15652 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
15654 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
15655 ProcessDeclarator(decl);
15656 thisClass = backupThisClass;
15658 thisClassParams = 1;
15659 functionType = ProcessType(specs, decl);
15660 functionType->refCount = 0;
15661 FinishTemplatesContext(context);
15663 FreeList(specs, FreeSpecifier);
15664 FreeDeclarator(decl);
15668 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
15670 struct Type * type = functionType->__anon1.type;
15672 if(!functionType->refCount)
15674 functionType->__anon1.type = (((void *)0));
15675 FreeType(functionType);
15677 functionType = type;
15679 if(functionType && functionType->kind != 11)
15681 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
15683 else if(functionType)
15685 unsigned int emptyParams = 0, noParams = 0;
15686 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
15687 struct Type * type = functionType->__anon1.__anon2.params.first;
15688 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
15690 struct Location oldyylloc = yylloc;
15694 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
15696 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
15699 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
15701 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)
15703 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
15706 e->destType = type;
15708 type = functionType->__anon1.__anon2.params.first;
15711 type->refCount = 0;
15713 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
15715 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
15716 type->byReference = functionType->byReference;
15717 type->typedByReference = functionType->typedByReference;
15720 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
15722 e->destType = type;
15724 type = functionType->__anon1.__anon2.params.first;
15727 type->refCount = 0;
15730 if(type && type->kind == 0)
15733 if(!type->refCount)
15735 type = (((void *)0));
15737 for(; e; e = e->next)
15739 if(!type && !emptyParams)
15742 if(methodType && methodType->__anon1.__anon3.methodClass)
15743 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);
15745 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);
15748 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
15750 struct Type * templatedType = (((void *)0));
15751 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
15752 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
15755 if(_class && _class->templateArgs)
15757 struct __ecereNameSpace__ecere__com__Class * sClass;
15759 for(sClass = _class; sClass; sClass = sClass->base)
15761 if(sClass->templateClass)
15762 sClass = sClass->templateClass;
15764 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
15766 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
15768 struct __ecereNameSpace__ecere__com__Class * nextClass;
15770 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
15772 if(nextClass->templateClass)
15773 nextClass = nextClass->templateClass;
15774 id += nextClass->templateParams.count;
15784 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
15786 unsigned int constant = type->constant;
15787 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
15790 struct Context * context = SetupTemplatesContext(_class);
15792 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
15793 FinishTemplatesContext(context);
15795 if(templatedType->kind == 8 && constant)
15796 templatedType->constant = 1;
15797 else if(templatedType->kind == 13)
15799 struct Type * t = templatedType->__anon1.type;
15801 while(t->kind == 13)
15802 t = t->__anon1.type;
15804 t->constant = constant;
15806 e->destType = templatedType;
15809 templatedType->passAsTemplate = 1;
15814 e->destType = type;
15821 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
15823 e->destType = type->prev;
15824 e->destType->refCount++;
15828 e->destType = type;
15833 if(type && type->kind != 14)
15835 struct Type * next = type->next;
15837 if(!type->refCount)
15842 if(type && type->kind != 14)
15844 if(methodType && methodType->__anon1.__anon3.methodClass)
15845 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);
15847 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);
15849 yylloc = oldyylloc;
15850 if(type && !type->refCount)
15855 functionType = __extension__ ({
15856 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15858 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
15860 if(exp->__anon1.call.exp->type == 0)
15862 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
15866 struct Symbol * symbol;
15867 struct Location oldyylloc = yylloc;
15869 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
15870 if(strstr(string, "__builtin_") == string)
15874 functionType->__anon1.__anon2.returnType = exp->destType;
15875 exp->destType->refCount++;
15879 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
15880 symbol = __extension__ ({
15881 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
15883 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
15885 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
15886 if(strstr(symbol->string, "::"))
15887 globalContext->hasNameSpace = 1;
15888 yylloc = oldyylloc;
15891 else if(exp->__anon1.call.exp->type == 8)
15895 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
15896 if(!functionType->__anon1.__anon2.returnType)
15898 functionType->__anon1.__anon2.returnType = __extension__ ({
15899 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15901 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
15905 if(functionType && functionType->kind == 11)
15907 exp->expType = functionType->__anon1.__anon2.returnType;
15908 if(functionType->__anon1.__anon2.returnType)
15909 functionType->__anon1.__anon2.returnType->refCount++;
15910 if(!functionType->refCount)
15911 FreeType(functionType);
15913 if(exp->__anon1.call.arguments)
15915 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
15916 ProcessExpressionType(e);
15922 struct Type * type;
15923 struct Location oldyylloc = yylloc;
15924 unsigned int thisPtr;
15925 struct Expression * checkExp = exp->__anon1.member.exp;
15929 if(checkExp->type == 11)
15930 checkExp = checkExp->__anon1.cast.exp;
15931 else if(checkExp->type == 5)
15932 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
15936 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
15937 exp->thisPtr = thisPtr;
15938 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
15940 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
15942 ProcessExpressionType(exp->__anon1.member.exp);
15943 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)
15945 exp->isConstant = 0;
15948 exp->isConstant = exp->__anon1.member.exp->isConstant;
15949 type = exp->__anon1.member.exp->expType;
15951 if(type && (type->kind == 20))
15953 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
15954 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
15958 for(param = _class->templateParams.first; param; param = param->next)
15960 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
15964 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
15966 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
15970 struct Expression * expMember = exp->__anon1.member.exp;
15971 struct Declarator * decl;
15972 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15973 char thisClassTypeString[1024];
15975 FreeIdentifier(exp->__anon1.member.member);
15976 ProcessExpressionType(argExp);
15978 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
15982 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
15983 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
15986 strcpy(thisClassTypeString, _class->fullName);
15988 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
15989 exp->expType = ProcessType(specs, decl);
15990 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
15992 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
15993 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
15994 int paramCount = 0;
15995 int lastParam = -1;
15996 char templateString[1024];
15997 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
15999 sprintf(templateString, "%s<", expClass->templateClass->fullName);
16000 for(cClass = expClass; cClass; cClass = cClass->base)
16004 for(param = cClass->templateParams.first; param; param = param->next)
16007 struct __ecereNameSpace__ecere__com__Class * sClass;
16008 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
16010 for(sClass = cClass->base; sClass; sClass = sClass->base)
16011 id += sClass->templateParams.count;
16012 arg = expClass->templateArgs[id];
16013 for(sClass = _class; sClass; sClass = sClass->base)
16015 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
16017 struct __ecereNameSpace__ecere__com__Class * nextClass;
16019 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
16020 p += nextClass->templateParams.count;
16021 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
16023 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
16025 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16027 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
16028 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
16035 char argument[256];
16037 argument[0] = '\0';
16038 switch(param->type)
16042 char expString[1024];
16043 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16044 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16045 struct Expression * exp;
16046 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16048 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16049 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16050 ProcessExpressionType(exp);
16051 ComputeExpression(exp);
16052 expString[0] = '\0';
16053 PrintExpression(exp, expString);
16054 strcat(argument, expString);
16055 FreeExpression(exp);
16060 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16065 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16067 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
16068 strcat(argument, thisClassTypeString);
16070 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16078 strcat(templateString, ", ");
16079 if(lastParam != p - 1)
16081 strcat(templateString, param->name);
16082 strcat(templateString, " = ");
16084 strcat(templateString, argument);
16093 int len = strlen(templateString);
16095 if(templateString[len - 1] == '>')
16096 templateString[len++] = ' ';
16097 templateString[len++] = '>';
16098 templateString[len++] = '\0';
16101 struct Context * context = SetupTemplatesContext(_class);
16103 FreeType(exp->expType);
16104 exp->expType = ProcessTypeString(templateString, 0);
16105 FinishTemplatesContext(context);
16109 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")))))))));
16112 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
16114 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
16117 if(type && (type->kind == 20))
16119 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)))
16121 struct Identifier * id = exp->__anon1.member.member;
16122 int typeKind = type->kind;
16123 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));
16125 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
16127 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
16132 if(typeKind == 3 || typeKind == 15)
16133 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
16136 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
16138 _class = type->__anon1._class->__anon1.registered;
16140 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
16142 _class = FindClass("char *")->__anon1.registered;
16144 else if(type->kind == 13)
16146 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
16147 FreeType(exp->expType);
16148 exp->expType = ProcessTypeString("uintptr", 0);
16149 exp->byReference = 1;
16153 char string[1024] = "";
16154 struct Symbol * classSym;
16156 PrintTypeNoConst(type, string, 0, 1);
16157 classSym = FindClass(string);
16159 _class = classSym->__anon1.registered;
16165 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
16166 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
16167 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
16168 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
16169 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
16171 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
16172 exp->__anon1.member.memberType = 1;
16173 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
16174 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
16177 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
16179 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16180 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
16182 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16184 member = (((void *)0));
16186 if(!member && !prop)
16187 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16188 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
16189 exp->__anon1.member.thisPtr = 1;
16193 unsigned int useMemberForNonConst = 0;
16197 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
16198 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);
16199 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16200 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
16202 if((!prop || useMemberForNonConst) && !member)
16204 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
16207 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16208 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);
16209 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16210 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16215 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
16216 prop = (((void *)0));
16218 member = (((void *)0));
16222 if(!prop && !member && !method)
16223 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
16224 if(!prop && !member && !method)
16228 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
16231 exp->__anon1.member.memberType = 5;
16232 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
16236 char structName[1024];
16237 struct Identifier * id = exp->__anon1.member.member;
16238 struct Expression * classExp = exp->__anon1.member.exp;
16241 FreeType(classExp->expType);
16242 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
16243 strcpy(structName, "__ecereClassData_");
16244 FullClassNameCat(structName, type->__anon1._class->string, 0);
16246 exp->__anon1.member.member = id;
16247 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"))))))));
16249 ProcessExpressionType(exp);
16255 struct Symbol * classSym = FindClass(id->string);
16259 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
16262 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
16266 if(!exp->__anon1.member.exp->destType)
16268 if(method && !method->_class->symbol)
16269 method->_class->symbol = FindClass(method->_class->fullName);
16270 if(prop && !prop->_class->symbol)
16271 prop->_class->symbol = FindClass(prop->_class->fullName);
16272 exp->__anon1.member.exp->destType = __extension__ ({
16273 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16275 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 8, __ecereInstance1->__anon1._class = prop ? prop->_class->symbol : method ? method->_class->symbol : _class->symbol, __ecereInstance1;
16280 exp->__anon1.member.memberType = 1;
16281 if(!prop->dataType)
16282 ProcessPropertyType(prop);
16283 exp->expType = prop->dataType;
16284 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
16286 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16288 CopyTypeInto(type, exp->expType);
16289 type->refCount = 1;
16290 type->constant = 1;
16291 exp->expType = type;
16293 else if(prop->dataType)
16294 prop->dataType->refCount++;
16298 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16300 FreeExpContents(exp);
16302 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16303 ProcessExpressionType(exp);
16306 exp->__anon1.member.memberType = 3;
16307 DeclareStruct(_class->fullName, 0);
16308 if(!member->dataType)
16310 struct Context * context = SetupTemplatesContext(_class);
16312 member->dataType = ProcessTypeString(member->dataTypeString, 0);
16313 FinishTemplatesContext(context);
16315 exp->expType = member->dataType;
16316 if(member->dataType)
16317 member->dataType->refCount++;
16319 else if(revConvert)
16321 exp->__anon1.member.memberType = 4;
16322 exp->expType = MkClassType(revConvert->_class->fullName);
16327 exp->__anon1.member.memberType = 2;
16329 if(!method->dataType)
16330 ProcessMethodType(method);
16331 exp->expType = __extension__ ({
16332 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16334 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
16336 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
16337 exp->expType->__anon1.__anon3.usedClass = _class;
16339 else if(!classProp)
16341 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16343 FreeExpContents(exp);
16345 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16346 FreeType(exp->expType);
16347 exp->expType = MkClassType("ecere::com::Class");
16350 yylloc = exp->__anon1.member.member->loc;
16351 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
16353 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
16355 if(_class && exp->expType)
16357 struct __ecereNameSpace__ecere__com__Class * tClass;
16359 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
16360 while(tClass && !tClass->templateClass)
16361 tClass = tClass->base;
16362 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
16365 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16366 struct __ecereNameSpace__ecere__com__Class * sClass;
16368 for(sClass = tClass; sClass; sClass = sClass->base)
16371 if(sClass->templateClass)
16372 sClass = sClass->templateClass;
16373 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16375 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
16377 for(sClass = sClass->base; sClass; sClass = sClass->base)
16378 id += sClass->templateParams.count;
16386 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
16388 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16389 struct Context * context = SetupTemplatesContext(tClass);
16390 unsigned int constant = exp->expType->constant;
16392 FreeType(exp->expType);
16393 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16394 if(exp->expType->kind == 8 && constant)
16395 exp->expType->constant = 1;
16396 else if(exp->expType->kind == 13)
16398 struct Type * t = exp->expType->__anon1.type;
16400 while(t->kind == 13)
16401 t = t->__anon1.type;
16403 t->constant = constant;
16407 if(exp->expType->kind == 21)
16409 FreeType(exp->expType);
16410 exp->expType = ReplaceThisClassType(_class);
16412 if(tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType))))
16413 exp->expType->passAsTemplate = 1;
16416 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16417 if(exp->destType->kind == 8 && constant)
16418 exp->destType->constant = 1;
16419 else if(exp->destType->kind == 13)
16421 struct Type * t = exp->destType->__anon1.type;
16423 while(t->kind == 13)
16424 t = t->__anon1.type;
16426 t->constant = constant;
16428 if(exp->destType->kind == 21)
16430 FreeType(exp->destType);
16431 exp->destType = ReplaceThisClassType(_class);
16435 FinishTemplatesContext(context);
16438 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)
16441 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16442 struct __ecereNameSpace__ecere__com__Class * sClass;
16444 for(sClass = tClass; sClass; sClass = sClass->base)
16447 if(sClass->templateClass)
16448 sClass = sClass->templateClass;
16449 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16451 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
16453 for(sClass = sClass->base; sClass; sClass = sClass->base)
16454 id += sClass->templateParams.count;
16464 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16465 struct Context * context = SetupTemplatesContext(tClass);
16466 struct Type * basicType;
16468 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16471 if(basicType->kind == 21)
16473 FreeType(basicType);
16474 basicType = ReplaceThisClassType(_class);
16476 FreeType(exp->expType);
16477 exp->expType = __extension__ ({
16478 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16480 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
16484 exp->destType = exp->expType;
16485 exp->destType->refCount++;
16488 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16489 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16490 struct Declarator * decl;
16492 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
16495 exp->destType->refCount++;
16497 exp->expType->refCount++;
16499 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
16500 exp->__anon1.cast.exp = newExp;
16503 FinishTemplatesContext(context);
16506 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
16508 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
16512 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
16514 int paramCount = 0;
16515 int lastParam = -1;
16516 char templateString[1024];
16517 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
16519 sprintf(templateString, "%s<", expClass->templateClass->fullName);
16520 while(cClass != expClass)
16522 struct __ecereNameSpace__ecere__com__Class * sClass;
16524 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
16527 for(param = cClass->templateParams.first; param; param = param->next)
16529 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
16531 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
16532 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
16534 while(cClassCur != tClass && !paramCur)
16536 struct __ecereNameSpace__ecere__com__Class * sClassCur;
16538 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
16540 cClassCur = sClassCur;
16541 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
16543 if(!strcmp(paramCur->name, param->name))
16550 if(paramCur && paramCur->type == 0)
16551 arg = tClass->templateArgs[cp];
16553 arg = expClass->templateArgs[p];
16555 char argument[256];
16557 argument[0] = '\0';
16558 switch(param->type)
16562 char expString[1024];
16563 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16564 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16565 struct Expression * exp;
16566 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16568 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16569 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16570 ProcessExpressionType(exp);
16571 ComputeExpression(exp);
16572 expString[0] = '\0';
16573 PrintExpression(exp, expString);
16574 strcat(argument, expString);
16575 FreeExpression(exp);
16580 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16585 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16586 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16593 strcat(templateString, ", ");
16594 if(lastParam != p - 1)
16596 strcat(templateString, param->name);
16597 strcat(templateString, " = ");
16599 strcat(templateString, argument);
16608 int len = strlen(templateString);
16610 if(templateString[len - 1] == '>')
16611 templateString[len++] = ' ';
16612 templateString[len++] = '>';
16613 templateString[len++] = '\0';
16615 FreeType(exp->expType);
16617 struct Context * context = SetupTemplatesContext(tClass);
16619 exp->expType = ProcessTypeString(templateString, 0);
16620 FinishTemplatesContext(context);
16627 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)");
16629 else if(type && (type->kind == 9 || type->kind == 10))
16631 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
16635 exp->expType = memberType;
16637 memberType->refCount++;
16642 char expString[10240];
16644 expString[0] = '\0';
16647 PrintExpression(exp, expString);
16648 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16650 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
16652 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
16654 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
16656 struct Identifier * id = exp->__anon1.member.member;
16657 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));
16661 FreeType(exp->expType);
16662 exp->expType = ReplaceThisClassType(_class);
16666 yylloc = oldyylloc;
16671 struct Type * destType = exp->destType;
16673 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
16675 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
16677 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
16681 ProcessExpressionType(exp);
16688 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
16690 if(classSym && classSym->__anon1.registered)
16692 if(classSym->__anon1.registered->type == 5)
16697 DeclareStruct(classSym->string, 0);
16698 FreeSpecifier(exp->__anon1._class);
16700 FullClassNameCat(name, classSym->string, 0);
16701 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
16705 if(classSym->__anon1.registered->fixed)
16707 FreeSpecifier(exp->__anon1._class);
16708 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
16713 char className[1024];
16715 strcpy(className, "__ecereClass_");
16716 FullClassNameCat(className, classSym->string, 1);
16717 DeclareClass(classSym, className);
16718 FreeExpContents(exp);
16720 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
16721 exp->__anon1.member.member = MkIdentifier("structSize");
16725 exp->expType = __extension__ ({
16726 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16728 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16734 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
16736 exp->expType = __extension__ ({
16737 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16739 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16741 exp->isConstant = 1;
16742 DeclareType(type, 0, 0);
16748 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
16751 FreeType(exp->__anon1.cast.exp->destType);
16752 exp->__anon1.cast.exp->destType = type;
16755 ProcessExpressionType(exp->__anon1.cast.exp);
16758 exp->expType = type;
16759 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
16761 void * prev = exp->prev, * next = exp->next;
16762 struct Type * expType = exp->__anon1.cast.exp->destType;
16763 struct Expression * castExp = exp->__anon1.cast.exp;
16764 struct Type * destType = exp->destType;
16767 expType->refCount++;
16768 FreeType(exp->expType);
16769 FreeTypeName(exp->__anon1.cast.typeName);
16771 FreeType(exp->expType);
16772 FreeType(exp->destType);
16773 exp->expType = expType;
16774 exp->destType = destType;
16775 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
16781 exp->isConstant = exp->__anon1.cast.exp->isConstant;
16787 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
16789 exp->expType = type;
16794 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
16796 ProcessExpressionType(exp->__anon1.vaArg.exp);
16797 exp->expType = type;
16802 struct Expression * e;
16804 exp->isConstant = 1;
16805 FreeType(exp->__anon1.cond.cond->destType);
16806 exp->__anon1.cond.cond->destType = MkClassType("bool");
16807 exp->__anon1.cond.cond->destType->truth = 1;
16808 ProcessExpressionType(exp->__anon1.cond.cond);
16809 if(!exp->__anon1.cond.cond->isConstant)
16810 exp->isConstant = 0;
16811 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
16815 FreeType(e->destType);
16816 e->destType = exp->destType;
16818 e->destType->refCount++;
16820 ProcessExpressionType(e);
16823 exp->expType = e->expType;
16825 e->expType->refCount++;
16828 exp->isConstant = 0;
16830 FreeType(exp->__anon1.cond.elseExp->destType);
16831 exp->__anon1.cond.elseExp->destType = exp->destType ? exp->destType : exp->expType;
16832 if(exp->__anon1.cond.elseExp->destType)
16833 exp->__anon1.cond.elseExp->destType->refCount++;
16834 ProcessExpressionType(exp->__anon1.cond.elseExp);
16835 if(!exp->__anon1.cond.elseExp->isConstant)
16836 exp->isConstant = 0;
16841 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
16843 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
16845 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
16847 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
16849 exp->destType->refCount++;
16851 ProcessStatement(exp->__anon1.compound);
16852 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
16854 exp->expType->refCount++;
16860 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
16862 if(spec && spec->type == 1)
16864 exp->expType = MkClassType(spec->__anon1.__anon1.name);
16865 exp->expType->kind = 19;
16866 exp->byReference = 1;
16870 exp->expType = MkClassType("ecere::com::Class");
16871 exp->byReference = 1;
16877 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
16881 struct Identifier * id = exp->__anon1.classData.id;
16882 char structName[1024];
16883 struct Expression * classExp;
16885 strcpy(structName, "__ecereClassData_");
16886 FullClassNameCat(structName, _class->fullName, 0);
16888 exp->__anon1.member.member = id;
16889 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
16890 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
16892 classExp = MkExpIdentifier(MkIdentifier("class"));
16893 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"))))))));
16894 ProcessExpressionType(exp);
16901 struct Type * type = (((void *)0));
16902 const char * typeString = (((void *)0));
16903 char typeStringBuf[1024];
16905 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))
16907 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
16909 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
16911 else if(exp->__anon1.list)
16913 struct Expression * e;
16915 for(e = (*exp->__anon1.list).first; e; e = e->next)
16917 ProcessExpressionType(e);
16927 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
16931 e->expType = (((void *)0));
16932 e = (*exp->__anon1.list).first;
16933 ProcessExpressionType(e);
16936 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
16938 FreeType(e->expType);
16939 e->expType = (((void *)0));
16941 type = (((void *)0));
16949 FreeType(e->expType);
16950 e->expType = (((void *)0));
16956 typeStringBuf[0] = '\0';
16957 PrintTypeNoConst(type, typeStringBuf, 0, 1);
16958 typeString = typeStringBuf;
16960 type = (((void *)0));
16965 char templateString[1024];
16966 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
16967 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
16968 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16969 struct Expression * expExt;
16970 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
16972 sprintf(templateString, "Container<%s>", typeString);
16973 if(exp->__anon1.list)
16975 struct Expression * e;
16977 type = ProcessTypeString(typeString, 0);
16978 while((e = (*exp->__anon1.list).first))
16980 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
16981 e->destType = type;
16983 ProcessExpressionType(e);
16984 ListAdd(initializers, MkInitializerAssignment(e));
16987 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16989 DeclareStruct("ecere::com::BuiltInContainer", 0);
16990 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
16991 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16992 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
16993 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16994 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
16995 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16996 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
16997 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16998 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
16999 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
17001 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, &(*initializers).count, (void *)0), __ecereInstance1;
17003 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17004 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, CopySpecifier), CopyDeclarator(decl))));
17005 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17006 exp->expType = ProcessTypeString(templateString, 0);
17008 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
17009 ProcessExpressionType(expExt);
17013 exp->expType = ProcessTypeString("Container", 0);
17014 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
17019 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
17021 FreeType(exp->expType);
17022 exp->expType = ReplaceThisClassType(thisClass);
17024 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)
17026 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
17030 if(exp->expType->kind != 15)
17032 struct Type * member;
17033 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
17035 FreeType(exp->expType);
17036 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17037 exp->expType->kind = symbol->type->kind;
17038 exp->expType->refCount++;
17039 exp->expType->__anon1.__anon1.enumName = enumName;
17040 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
17041 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17042 member->refCount++;
17046 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
17048 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17050 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink64), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
17052 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
17058 if(exp->destType && (exp->destType->kind == 18))
17060 else if(exp->destType && !exp->destType->keepCast)
17062 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
17063 exp->needTemplateCast = 1;
17064 if(exp->destType->kind == 0)
17066 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
17068 if(!exp->destType->count || unresolved)
17073 if(exp->destType->kind != 14)
17080 char expString[10240];
17082 expString[0] = '\0';
17083 PrintType(exp->destType, type2, 0, 1);
17086 PrintExpression(exp, expString);
17087 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17090 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
17091 else if(exp->type != 16)
17092 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
17097 char expString[10240];
17099 expString[0] = '\0';
17102 PrintExpression(exp, expString);
17103 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17106 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
17107 else if(exp->type != 16)
17108 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17120 PrintType(exp->expType, type1, 0, 1);
17121 PrintType(exp->destType, type2, 0, 1);
17123 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)))
17127 char expString[10240];
17129 expString[0] = '\0';
17132 PrintExpression(exp, expString);
17133 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17135 if(!sourceFile || (strcmp(sourceFile, "src\\lexer.ec") && strcmp(sourceFile, "src/lexer.ec") && strcmp(sourceFile, "src\\grammar.ec") && strcmp(sourceFile, "src/grammar.ec")))
17136 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
17137 FreeType(exp->expType);
17138 exp->destType->refCount++;
17139 exp->expType = exp->destType;
17145 else if(unresolved)
17147 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
17148 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);
17149 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
17150 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
17152 else if(!exp->expType && exp->type != 16)
17154 char expString[10240];
17156 expString[0] = '\0';
17159 PrintExpression(exp, expString);
17160 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17162 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17165 ApplyAnyObjectLogic(exp);
17166 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)))
17168 exp->byReference = 1;
17170 yylloc = oldyylloc;
17173 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)
17177 *curMember = (*curMember)->next;
17178 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
17180 *curMember = subMemberStack[--(*subMemberStackPos)];
17181 *curMember = (*curMember)->next;
17183 while((*curMember) && (*curMember)->isProperty)
17184 *curMember = (*curMember)->next;
17185 if(subMemberStackPos)
17187 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17189 subMemberStack[(*subMemberStackPos)++] = *curMember;
17190 *curMember = (*curMember)->members.first;
17191 while(*curMember && (*curMember)->isProperty)
17192 *curMember = (*curMember)->next;
17200 if(subMemberStackPos && *subMemberStackPos)
17202 *curMember = subMemberStack[--(*subMemberStackPos)];
17203 *curMember = (*curMember)->next;
17207 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
17209 if(*curClass == _class)
17211 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
17213 *curMember = (*curClass)->membersAndProperties.first;
17215 while((*curMember) && (*curMember)->isProperty)
17216 *curMember = (*curMember)->next;
17217 if(subMemberStackPos)
17219 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17221 subMemberStack[(*subMemberStackPos)++] = *curMember;
17222 *curMember = (*curMember)->members.first;
17223 while(*curMember && (*curMember)->isProperty)
17224 *curMember = (*curMember)->next;
17231 static void ProcessInitializer(struct Initializer * init, struct Type * type)
17236 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
17238 if(init->__anon1.exp && !init->__anon1.exp->destType)
17240 FreeType(init->__anon1.exp->destType);
17241 init->__anon1.exp->destType = type;
17245 if(init->__anon1.exp)
17247 ProcessExpressionType(init->__anon1.exp);
17248 init->isConstant = init->__anon1.exp->isConstant;
17254 struct Expression * exp = init->__anon1.exp;
17255 struct Instantiation * inst = exp->__anon1.instance;
17256 struct MembersInit * members;
17259 init->__anon1.list = MkList();
17262 for(members = (*inst->members).first; members; members = members->next)
17264 if(members->type == 0)
17266 struct MemberInit * member;
17268 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
17270 ListAdd(init->__anon1.list, member->initializer);
17271 member->initializer = (((void *)0));
17276 FreeExpression(exp);
17280 struct Initializer * i;
17281 struct Type * initializerType = (((void *)0));
17282 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
17283 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
17284 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
17285 int subMemberStackPos = 0;
17287 if(type && type->kind == 12)
17288 initializerType = Dereference(type);
17289 else if(type && (type->kind == 9 || type->kind == 10))
17290 initializerType = type->__anon1.__anon1.members.first;
17291 for(i = (*init->__anon1.list).first; i; i = i->next)
17293 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17295 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
17298 if(!curMember->dataType)
17299 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
17300 initializerType = curMember->dataType;
17303 ProcessInitializer(i, initializerType);
17304 if(initializerType && type && (type->kind == 9 || type->kind == 10))
17305 initializerType = initializerType->next;
17307 init->isConstant = 0;
17309 if(type && type->kind == 12)
17310 FreeType(initializerType);
17311 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))
17313 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
17320 extern struct Symbol * FindType(struct Context * ctx, const char * name);
17322 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
17324 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct)
17330 if(spec->__anon1.specifier == THISCLASS)
17335 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17336 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17337 ProcessSpecifier(spec, declareStruct);
17344 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
17347 DeclareType(symbol->type, 1, 1);
17348 else if((symbol = spec->__anon1.__anon1.symbol) && symbol->__anon1.registered && symbol->__anon1.registered->type == 1 && declareStruct)
17349 DeclareStruct(spec->__anon1.__anon1.name, 0);
17354 struct Enumerator * e;
17356 if(spec->__anon1.__anon2.list)
17358 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
17361 ProcessExpressionType(e->exp);
17369 if(spec->__anon1.__anon2.definitions)
17371 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
17373 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
17380 static void ProcessDeclarator(struct Declarator * decl)
17385 if(decl->__anon1.identifier->classSym)
17387 FreeSpecifier(decl->__anon1.identifier->_class);
17388 decl->__anon1.identifier->_class = (((void *)0));
17392 if(decl->__anon1.array.exp)
17393 ProcessExpressionType(decl->__anon1.array.exp);
17400 if(decl->declarator)
17401 ProcessDeclarator(decl->declarator);
17402 if(decl->type == 4)
17404 struct Identifier * id = GetDeclId(decl);
17406 if(id && id->_class)
17408 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(id->_class), param->declarator = (((void *)0)), param);
17410 if(!decl->__anon1.function.parameters)
17411 decl->__anon1.function.parameters = MkList();
17412 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
17413 id->_class = (((void *)0));
17415 if(decl->__anon1.function.parameters)
17417 struct TypeName * param;
17419 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
17421 if(param->qualifiers && (*param->qualifiers).first)
17423 struct Specifier * spec = (*param->qualifiers).first;
17425 if(spec && spec->__anon1.specifier == TYPED_OBJECT)
17427 struct Declarator * d = param->declarator;
17428 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);
17431 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
17432 FreeList(param->qualifiers, FreeSpecifier);
17433 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
17434 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
17435 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
17438 else if(spec && spec->__anon1.specifier == ANY_OBJECT)
17440 struct Declarator * d = param->declarator;
17442 FreeList(param->qualifiers, FreeSpecifier);
17443 param->qualifiers = MkListOne(MkSpecifier(VOID));
17445 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
17446 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
17448 else if(spec->__anon1.specifier == THISCLASS)
17453 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17454 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17455 ProcessSpecifier(spec, 0);
17459 if(param->declarator)
17460 ProcessDeclarator(param->declarator);
17468 extern struct Identifier * CopyIdentifier(struct Identifier * id);
17470 extern void FreeInitDeclarator(struct InitDeclarator * decl);
17472 static void ProcessDeclaration(struct Declaration * decl)
17474 yylloc = decl->loc;
17479 unsigned int declareStruct = 0;
17481 if(decl->__anon1.__anon1.declarators)
17483 struct InitDeclarator * d;
17485 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17487 struct Type * type, * subType;
17489 ProcessDeclarator(d->declarator);
17490 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17493 ProcessInitializer(d->initializer, type);
17494 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
17496 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
17498 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
17500 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
17501 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
17502 if(decl->__anon1.__anon1.specifiers)
17503 FreeList(decl->__anon1.__anon1.specifiers, FreeSpecifier);
17504 FreeList(decl->__anon1.__anon1.declarators, FreeInitDeclarator);
17507 decl->__anon1.inst = inst;
17511 for(subType = type; subType; )
17513 if(subType->kind == 8)
17518 else if(subType->kind == 13)
17520 else if(subType->kind == 12)
17521 subType = subType->__anon1.__anon4.arrayType;
17530 if(decl->__anon1.__anon1.specifiers)
17532 struct Specifier * s;
17534 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
17536 ProcessSpecifier(s, declareStruct);
17543 ProcessInstantiationType(decl->__anon1.inst);
17548 struct Specifier * spec;
17549 struct Declarator * d;
17550 unsigned int declareStruct = 0;
17552 if(decl->__anon1.__anon1.declarators)
17554 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17556 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17557 struct Type * subType;
17559 ProcessDeclarator(d);
17560 for(subType = type; subType; )
17562 if(subType->kind == 8)
17567 else if(subType->kind == 13)
17569 else if(subType->kind == 12)
17570 subType = subType->__anon1.__anon4.arrayType;
17577 if(decl->__anon1.__anon1.specifiers)
17579 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
17580 ProcessSpecifier(spec, declareStruct);
17587 static struct FunctionDefinition * curFunction;
17589 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
17591 char propName[1024], propNameM[1024];
17592 char getName[1024], setName[1024];
17593 struct __ecereNameSpace__ecere__sys__OldList * args;
17595 DeclareProperty(prop, setName, getName);
17596 strcpy(propName, "__ecereProp_");
17597 FullClassNameCat(propName, prop->_class->fullName, 0);
17598 strcat(propName, "_");
17599 FullClassNameCat(propName, prop->name, 1);
17600 strcpy(propNameM, "__ecerePropM_");
17601 FullClassNameCat(propNameM, prop->_class->fullName, 0);
17602 strcat(propNameM, "_");
17603 FullClassNameCat(propNameM, prop->name, 1);
17604 if(prop->isWatchable)
17607 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17608 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17609 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17611 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17612 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17613 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17617 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17618 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17619 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17621 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17622 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17623 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17625 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
17626 curFunction->propSet->fireWatchersDone = 1;
17629 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
17631 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
17633 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
17635 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
17637 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
17639 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
17641 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
17643 extern void FreePropertyWatch(struct PropertyWatch * watcher);
17645 static void ProcessStatement(struct Statement * stmt)
17647 yylloc = stmt->loc;
17651 ProcessStatement(stmt->__anon1.labeled.stmt);
17654 if(stmt->__anon1.caseStmt.exp)
17656 FreeType(stmt->__anon1.caseStmt.exp->destType);
17657 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
17659 curSwitchType->refCount++;
17660 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
17661 ComputeExpression(stmt->__anon1.caseStmt.exp);
17663 if(stmt->__anon1.caseStmt.stmt)
17664 ProcessStatement(stmt->__anon1.caseStmt.stmt);
17668 if(stmt->__anon1.compound.context)
17670 struct Declaration * decl;
17671 struct Statement * s;
17672 struct Statement * prevCompound = curCompound;
17673 struct Context * prevContext = curContext;
17675 if(!stmt->__anon1.compound.isSwitch)
17676 curCompound = stmt;
17677 curContext = stmt->__anon1.compound.context;
17678 if(stmt->__anon1.compound.declarations)
17680 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
17681 ProcessDeclaration(decl);
17683 if(stmt->__anon1.compound.statements)
17685 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
17686 ProcessStatement(s);
17688 curContext = prevContext;
17689 curCompound = prevCompound;
17695 struct Expression * exp;
17697 if(stmt->__anon1.expressions)
17699 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
17700 ProcessExpressionType(exp);
17706 struct Expression * exp;
17708 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
17709 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
17710 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
17711 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
17713 ProcessExpressionType(exp);
17715 if(stmt->__anon1.ifStmt.stmt)
17716 ProcessStatement(stmt->__anon1.ifStmt.stmt);
17717 if(stmt->__anon1.ifStmt.elseStmt)
17718 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
17723 struct Type * oldSwitchType = curSwitchType;
17725 if(stmt->__anon1.switchStmt.exp)
17727 struct Expression * exp;
17729 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
17733 ProcessExpressionType(exp);
17736 curSwitchType = exp->expType;
17739 ProcessStatement(stmt->__anon1.switchStmt.stmt);
17740 curSwitchType = oldSwitchType;
17745 if(stmt->__anon1.whileStmt.exp)
17747 struct Expression * exp;
17749 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
17750 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
17751 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
17752 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
17754 ProcessExpressionType(exp);
17757 if(stmt->__anon1.whileStmt.stmt)
17758 ProcessStatement(stmt->__anon1.whileStmt.stmt);
17763 if(stmt->__anon1.doWhile.exp)
17765 struct Expression * exp;
17767 if((*stmt->__anon1.doWhile.exp).last)
17769 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
17770 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
17771 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
17773 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
17775 ProcessExpressionType(exp);
17778 if(stmt->__anon1.doWhile.stmt)
17779 ProcessStatement(stmt->__anon1.doWhile.stmt);
17784 struct Expression * exp;
17786 if(stmt->__anon1.forStmt.init)
17787 ProcessStatement(stmt->__anon1.forStmt.init);
17788 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
17790 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
17791 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
17792 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
17794 if(stmt->__anon1.forStmt.check)
17795 ProcessStatement(stmt->__anon1.forStmt.check);
17796 if(stmt->__anon1.forStmt.increment)
17798 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
17799 ProcessExpressionType(exp);
17801 if(stmt->__anon1.forStmt.stmt)
17802 ProcessStatement(stmt->__anon1.forStmt.stmt);
17807 struct Identifier * id = stmt->__anon1.forEachStmt.id;
17808 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
17809 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
17810 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
17811 char iteratorType[1024];
17812 struct Type * source;
17813 struct Expression * e;
17814 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));
17815 struct Expression * arrayExp;
17816 const char * typeString = (((void *)0));
17817 int builtinCount = 0;
17819 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
17823 FreeType(e->destType);
17824 e->destType = ProcessTypeString("Container", 0);
17826 if(!isBuiltin || e->next)
17827 ProcessExpressionType(e);
17829 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
17830 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)))
17832 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
17833 struct Symbol * symbol;
17834 struct Expression * expIt = (((void *)0));
17835 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
17836 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
17837 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
17838 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
17841 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
17842 stmt->__anon1.compound.context->parent = curContext;
17843 curContext = stmt->__anon1.compound.context;
17844 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
17846 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
17848 isCustomAVLTree = 1;
17849 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
17852 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
17854 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
17856 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
17859 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
17863 struct Declarator * decl;
17864 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17866 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
17867 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17868 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
17872 struct Type * type = (((void *)0));
17873 char typeStringBuf[1024];
17875 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
17876 if(((struct Expression *)(*exp).last)->type == 11)
17878 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
17881 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
17883 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)
17885 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
17887 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
17889 else if(arrayExp->__anon1.list)
17891 struct Expression * e;
17893 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
17895 ProcessExpressionType(e);
17905 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
17909 e->expType = (((void *)0));
17910 e = (*arrayExp->__anon1.list).first;
17911 ProcessExpressionType(e);
17914 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
17916 FreeType(e->expType);
17917 e->expType = (((void *)0));
17919 type = (((void *)0));
17927 FreeType(e->expType);
17928 e->expType = (((void *)0));
17934 typeStringBuf[0] = '\0';
17935 PrintType(type, typeStringBuf, 0, 1);
17936 typeString = typeStringBuf;
17942 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
17943 struct Declarator * decl;
17944 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17946 if(arrayExp->__anon1.list)
17948 struct Expression * e;
17950 builtinCount = (*arrayExp->__anon1.list).count;
17951 type = ProcessTypeString(typeString, 0);
17952 while((e = (*arrayExp->__anon1.list).first))
17954 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
17955 e->destType = type;
17957 ProcessExpressionType(e);
17958 ListAdd(initializers, MkInitializerAssignment(e));
17961 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
17963 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
17964 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, CopySpecifier), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
17965 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
17966 FreeList(exp, FreeExpression);
17970 arrayExp->expType = ProcessTypeString("Container", 0);
17971 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
17974 else if(isLinkList && !isList)
17976 struct Declarator * decl;
17977 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17979 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
17980 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17981 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
17983 else if(_class->templateArgs)
17986 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
17988 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
17989 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)))))))));
17991 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
17994 switch(block->type)
17997 if(block->__anon1.compound.context)
17998 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18001 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
18002 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18003 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
18004 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18007 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
18008 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18011 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
18012 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18015 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
18016 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18019 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
18020 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18023 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
18024 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18030 block = MkIfStmt(filter, block, (((void *)0)));
18034 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));
18035 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18036 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18037 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18043 sprintf(count, "%d", builtinCount);
18044 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));
18045 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18046 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18047 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18049 else if(isLinkList && !isList)
18051 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
18052 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
18054 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
18056 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));
18060 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18061 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18063 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));
18065 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18066 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18067 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18071 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
18073 ProcessExpressionType(expIt);
18074 if((*stmt->__anon1.compound.declarations).first)
18075 ProcessDeclaration((*stmt->__anon1.compound.declarations).first);
18077 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
18078 ProcessStatement(stmt);
18079 curContext = stmt->__anon1.compound.context->parent;
18084 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
18096 struct Expression * exp;
18098 if(stmt->__anon1.expressions)
18100 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
18104 if(curFunction && !curFunction->type)
18105 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
18106 FreeType(exp->destType);
18107 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
18109 exp->destType->refCount++;
18111 ProcessExpressionType(exp);
18118 ProcessDeclaration(stmt->__anon1.decl);
18123 struct AsmField * field;
18125 if(stmt->__anon1.asmStmt.inputFields)
18127 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
18128 if(field->expression)
18129 ProcessExpressionType(field->expression);
18131 if(stmt->__anon1.asmStmt.outputFields)
18133 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
18134 if(field->expression)
18135 ProcessExpressionType(field->expression);
18137 if(stmt->__anon1.asmStmt.clobberedFields)
18139 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
18141 if(field->expression)
18142 ProcessExpressionType(field->expression);
18149 struct PropertyWatch * propWatch;
18150 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18151 struct Expression * object = stmt->__anon1._watch.object;
18152 struct Expression * watcher = stmt->__anon1._watch.watcher;
18155 ProcessExpressionType(watcher);
18157 ProcessExpressionType(object);
18160 if(watcher || thisClass)
18162 struct External * external = curExternal;
18163 struct Context * context = curContext;
18166 stmt->__anon1.expressions = MkList();
18167 curExternal = external->prev;
18168 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18170 struct ClassFunction * func;
18171 char watcherName[1024];
18172 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;
18173 struct External * createdExternal;
18174 struct External * externalDecl = MkExternalDeclaration((((void *)0)));
18176 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, externalDecl);
18177 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
18178 if(propWatch->deleteWatch)
18179 strcat(watcherName, "_delete");
18182 struct Identifier * propID;
18184 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18186 strcat(watcherName, "_");
18187 strcat(watcherName, propID->string);
18190 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
18192 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)));
18193 ProcessClassFunctionBody(func, propWatch->compound);
18194 propWatch->compound = (((void *)0));
18195 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
18196 createdExternal->symbol->idCode = external->symbol->idCode;
18197 curExternal = createdExternal;
18198 ProcessFunction(createdExternal->__anon1.function);
18200 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(createdExternal->__anon1.function->declarator), (((void *)0)))));
18202 externalDecl->__anon1.declaration = decl;
18203 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
18204 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
18206 if(propWatch->deleteWatch)
18208 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18210 ListAdd(args, CopyExpression(object));
18211 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18212 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18213 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
18217 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
18218 struct Identifier * propID;
18220 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18222 char propName[1024];
18223 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18227 char getName[1024], setName[1024];
18228 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18230 DeclareProperty(prop, setName, getName);
18231 strcpy(propName, "__ecereProp_");
18232 FullClassNameCat(propName, prop->_class->fullName, 0);
18233 strcat(propName, "_");
18234 FullClassNameCat(propName, prop->name, 1);
18235 ListAdd(args, CopyExpression(object));
18236 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18237 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18238 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18239 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
18242 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18247 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
18249 curExternal = external;
18250 curContext = context;
18252 FreeExpression(watcher);
18254 FreeExpression(object);
18255 FreeList(watches, FreePropertyWatch);
18258 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a _class\n", (((void *)0))));
18262 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18264 ProcessStatement(propWatch->compound);
18271 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18272 struct Expression * object = stmt->__anon1._watch.object;
18273 struct __ecereNameSpace__ecere__com__Class * _class;
18276 ProcessExpressionType(object);
18279 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
18282 struct Identifier * propID;
18285 stmt->__anon1.expressions = MkList();
18286 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
18288 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
18295 for(propID = (*watches).first; propID; propID = propID->next)
18297 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18301 CreateFireWatcher(prop, object, stmt);
18304 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18309 struct __ecereNameSpace__ecere__com__Property * prop;
18310 struct __ecereNameSpace__ecere__com__Class * base;
18312 for(base = _class; base; base = base->base)
18314 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
18316 if(prop->isProperty && prop->isWatchable)
18318 CreateFireWatcher(prop, object, stmt);
18324 FreeExpression(object);
18325 FreeList(watches, FreeIdentifier);
18328 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18334 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18335 struct Expression * object = stmt->__anon1._watch.object;
18336 struct Expression * watcher = stmt->__anon1._watch.watcher;
18337 struct __ecereNameSpace__ecere__com__Class * _class;
18340 ProcessExpressionType(object);
18342 ProcessExpressionType(watcher);
18345 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
18346 if(watcher || thisClass)
18350 struct Identifier * propID;
18353 stmt->__anon1.expressions = MkList();
18356 struct __ecereNameSpace__ecere__sys__OldList * args;
18359 ListAdd(args, CopyExpression(object));
18360 ListAdd(args, MkExpConstant("0"));
18361 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18362 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18366 for(propID = (*watches).first; propID; propID = propID->next)
18368 char propName[1024];
18369 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18373 char getName[1024], setName[1024];
18374 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18376 DeclareProperty(prop, setName, getName);
18377 strcpy(propName, "__ecereProp_");
18378 FullClassNameCat(propName, prop->_class->fullName, 0);
18379 strcat(propName, "_");
18380 FullClassNameCat(propName, prop->name, 1);
18381 ListAdd(args, CopyExpression(object));
18382 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18383 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18384 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18387 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18391 FreeExpression(object);
18393 FreeExpression(watcher);
18394 FreeList(watches, FreeIdentifier);
18397 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18400 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
18407 extern struct Expression * QBrackets(struct Expression * exp);
18409 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
18411 extern struct Declarator * QMkPtrDecl(const char * id);
18413 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
18415 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
18417 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
18419 static void ProcessFunction(struct FunctionDefinition * function)
18421 struct Identifier * id = GetDeclId(function->declarator);
18422 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18423 struct Type * type = symbol ? symbol->type : (((void *)0));
18424 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18425 struct Context * oldTopContext = topContext;
18427 yylloc = function->loc;
18428 if(type && type->__anon1.__anon2.thisClass)
18430 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18431 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18432 char className[1024];
18433 char structName[1024];
18434 struct Declarator * funcDecl;
18435 struct Symbol * thisSymbol;
18436 unsigned int typedObject = 0;
18438 if(_class && !_class->base)
18440 _class = currentClass;
18441 if(_class && !_class->symbol)
18442 _class->symbol = FindClass(_class->fullName);
18443 classSym = _class ? _class->symbol : (((void *)0));
18446 thisClass = _class;
18447 if(inCompiler && _class)
18449 if(type->kind == 11)
18451 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18453 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18455 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18458 if(type->classObjectType != 1)
18460 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18461 symbol->type->__anon1.__anon2.staticMethod = 1;
18462 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18463 symbol->type->extraParam = 0;
18466 strcpy(className, "__ecereClass_");
18467 FullClassNameCat(className, _class->fullName, 1);
18468 structName[0] = (char)0;
18469 FullClassNameCat(structName, _class->fullName, 0);
18470 funcDecl = GetFuncDecl(function->declarator);
18473 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18475 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18477 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18479 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18480 FreeTypeName(param);
18483 if(!function->propertyNoThis)
18485 struct TypeName * thisParam = (((void *)0));
18487 if(type->classObjectType != 1)
18489 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18490 if(!funcDecl->__anon1.function.parameters)
18491 funcDecl->__anon1.function.parameters = MkList();
18492 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18496 if(type->classObjectType != 1)
18498 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18499 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18501 thisParam = __extension__ ({
18502 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18504 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18506 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18510 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18512 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18514 funcDecl = GetFuncDecl(initDecl->declarator);
18517 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18519 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18521 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18523 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18524 FreeTypeName(param);
18527 if(type->classObjectType != 1)
18529 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18531 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18533 if(!funcDecl->__anon1.function.parameters)
18534 funcDecl->__anon1.function.parameters = MkList();
18535 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18543 if(type->classObjectType != 1)
18545 thisSymbol = __extension__ ({
18546 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18548 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18550 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18551 if(typedObject && thisSymbol->type)
18553 thisSymbol->type->classObjectType = 2;
18554 thisSymbol->type->byReference = type->byReference;
18555 thisSymbol->type->typedByReference = type->byReference;
18559 if(inCompiler && _class && (_class->type == 0) && type->classObjectType != 1)
18561 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18564 struct __ecereNameSpace__ecere__com__Class * base;
18566 for(base = _class; base && base->type != 1000; base = base->next)
18568 for(member = base->membersAndProperties.first; member; member = member->next)
18569 if(!member->isProperty)
18575 for(member = _class->membersAndProperties.first; member; member = member->next)
18576 if(!member->isProperty)
18580 char pointerName[1024];
18581 struct Declaration * decl;
18582 struct Initializer * initializer;
18583 struct Expression * exp, * bytePtr;
18585 strcpy(pointerName, "__ecerePointer_");
18586 FullClassNameCat(pointerName, _class->fullName, 0);
18588 char className[1024];
18590 strcpy(className, "__ecereClass_");
18591 FullClassNameCat(className, classSym->string, 1);
18592 DeclareClass(classSym, className);
18594 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18599 sprintf(string, "%d", _class->offset);
18600 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpConstant(string)));
18604 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
18606 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
18607 exp->expType = __extension__ ({
18608 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18610 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
18611 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18613 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
18614 }), __ecereInstance2;
18618 yylloc = function->body->loc;
18619 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
18621 struct Context * prevContext = curContext;
18623 curContext = function->body->__anon1.compound.context;
18624 decl = MkDeclaration(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
18625 curContext = prevContext;
18627 decl->symbol = (((void *)0));
18628 if(!function->body->__anon1.compound.declarations)
18629 function->body->__anon1.compound.declarations = MkList();
18630 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
18636 thisClass = (((void *)0));
18639 FreeSpecifier(id->_class);
18640 id->_class = (((void *)0));
18641 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18643 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18645 id = GetDeclId(initDecl->declarator);
18646 FreeSpecifier(id->_class);
18647 id->_class = (((void *)0));
18651 topContext = function->body->__anon1.compound.context;
18653 struct FunctionDefinition * oldFunction = curFunction;
18655 curFunction = function;
18657 ProcessStatement(function->body);
18658 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
18660 struct Statement * prevCompound = curCompound;
18661 struct Context * prevContext = curContext;
18662 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
18664 if(!function->body->__anon1.compound.statements)
18665 function->body->__anon1.compound.statements = MkList();
18666 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
18667 curCompound = function->body;
18668 curContext = function->body->__anon1.compound.context;
18669 ProcessStatement(fireWatchers);
18670 curContext = prevContext;
18671 curCompound = prevCompound;
18673 curFunction = oldFunction;
18675 if(function->declarator)
18677 ProcessDeclarator(function->declarator);
18679 topContext = oldTopContext;
18680 thisClass = oldThisClass;
18683 extern void FreeSymbol(struct Symbol * symbol);
18685 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
18687 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
18689 struct ClassDef * def;
18690 struct External * external = curExternal;
18691 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
18693 for(def = definitions->first; def; def = def->next)
18697 if(def->__anon1.function->declarator)
18698 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
18700 curExternal = external;
18701 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
18703 else if(def->type == 2)
18705 if(def->__anon1.decl->type == 2)
18707 thisClass = regClass;
18708 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
18709 thisClass = (((void *)0));
18713 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
18716 thisClass = regClass;
18717 ProcessDeclaration(def->__anon1.decl);
18718 thisClass = backThisClass;
18721 else if(def->type == 1 && def->__anon1.defProperties)
18723 struct MemberInit * defProperty;
18724 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);
18726 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18727 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
18729 thisClass = regClass;
18730 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
18731 thisClass = (((void *)0));
18733 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18734 FreeSymbol(thisSymbol);
18736 else if(def->type == 3 && def->__anon1.propertyDef)
18738 struct PropertyDef * prop = def->__anon1.propertyDef;
18740 thisClass = regClass;
18745 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18747 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18749 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
18750 ProcessStatement(prop->setStmt);
18756 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18758 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18760 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
18761 ProcessStatement(prop->getStmt);
18763 if(prop->issetStmt)
18767 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18769 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18771 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
18772 ProcessStatement(prop->issetStmt);
18774 thisClass = (((void *)0));
18776 else if(def->type == 4 && def->__anon1.propertyWatch)
18778 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
18780 thisClass = regClass;
18781 if(propertyWatch->compound)
18783 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);
18785 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18786 curExternal = (((void *)0));
18787 ProcessStatement(propertyWatch->compound);
18789 thisClass = (((void *)0));
18794 void DeclareFunctionUtil(const char * s)
18796 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
18803 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
18804 strcpy(name, "__ecereFunction_");
18805 FullClassNameCat(name, s, 0);
18806 DeclareFunction(function, name);
18810 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
18812 void ComputeDataTypes()
18814 struct External * external;
18815 struct External * temp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_External);
18816 struct External * after = (((void *)0));
18818 currentClass = (((void *)0));
18819 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
18820 for(external = (*ast).first; external; external = external->next)
18822 if(external->type == 1)
18824 struct Declaration * decl = external->__anon1.declaration;
18828 struct __ecereNameSpace__ecere__sys__OldList * decls = decl->__anon1.__anon1.declarators;
18832 struct InitDeclarator * initDecl = (*decls).first;
18836 struct Declarator * declarator = initDecl->declarator;
18838 if(declarator && declarator->type == 1)
18840 struct Identifier * id = declarator->__anon1.identifier;
18842 if(id && id->string)
18844 if(!strcmp(id->string, "uintptr_t") || !strcmp(id->string, "intptr_t") || !strcmp(id->string, "size_t") || !strcmp(id->string, "ssize_t"))
18846 external->symbol->id = -1001, external->symbol->idCode = -1001;
18857 struct External * e = MkExternalDeclaration(MkDeclaration(MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Instance"), (((void *)0)))), (((void *)0))));
18859 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, e);
18862 temp->symbol = __extension__ ({
18863 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18865 __ecereInstance1->id = -1000, __ecereInstance1->idCode = -1000, __ecereInstance1;
18867 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, temp);
18868 curExternal = temp;
18869 DeclareFunctionUtil("eSystem_New");
18870 DeclareFunctionUtil("eSystem_New0");
18871 DeclareFunctionUtil("eSystem_Renew");
18872 DeclareFunctionUtil("eSystem_Renew0");
18873 DeclareFunctionUtil("eSystem_Delete");
18874 DeclareFunctionUtil("eClass_GetProperty");
18875 DeclareFunctionUtil("eClass_SetProperty");
18876 DeclareFunctionUtil("eInstance_FireSelfWatchers");
18877 DeclareFunctionUtil("eInstance_SetMethod");
18878 DeclareFunctionUtil("eInstance_IncRef");
18879 DeclareFunctionUtil("eInstance_StopWatching");
18880 DeclareFunctionUtil("eInstance_Watch");
18881 DeclareFunctionUtil("eInstance_FireWatchers");
18882 DeclareStruct("ecere::com::Class", 0);
18883 DeclareStruct("ecere::com::Instance", 0);
18884 DeclareStruct("ecere::com::Property", 0);
18885 DeclareStruct("ecere::com::DataMember", 0);
18886 DeclareStruct("ecere::com::Method", 0);
18887 DeclareStruct("ecere::com::SerialBuffer", 0);
18888 DeclareStruct("ecere::com::ClassTemplateArgument", 0);
18889 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), temp);
18890 for(external = (*ast).first; external; external = external->next)
18892 afterExternal = curExternal = external;
18893 if(external->type == 0)
18895 currentClass = external->__anon1.function->_class;
18896 ProcessFunction(external->__anon1.function);
18898 else if(external->type == 1)
18900 currentClass = (((void *)0));
18901 if(external->__anon1.declaration)
18902 ProcessDeclaration(external->__anon1.declaration);
18904 else if(external->type == 2)
18906 struct ClassDefinition * _class = external->__anon1._class;
18908 currentClass = external->symbol->__anon1.registered;
18909 if(_class->definitions)
18911 ProcessClass(_class->definitions, _class->symbol);
18915 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
18916 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
18919 else if(external->type == 4)
18921 thisNameSpace = external->__anon1.id->string;
18924 currentClass = (((void *)0));
18925 thisNameSpace = (((void *)0));
18926 curExternal = (((void *)0));
18927 ((temp->symbol ? (__ecereClass_Symbol->Destructor ? __ecereClass_Symbol->Destructor((void *)temp->symbol) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp->symbol)) : 0), temp->symbol = 0);
18928 ((temp ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)temp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp)) : 0), temp = 0);
18931 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);
18933 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);
18935 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
18937 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
18939 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
18941 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
18942 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
18943 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
18944 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
18945 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
18946 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
18947 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
18948 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
18949 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
18950 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
18951 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
18952 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
18953 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
18954 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
18955 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
18956 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
18957 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
18958 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
18959 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
18960 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
18961 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
18962 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
18963 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
18964 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
18965 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
18966 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
18967 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
18968 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
18969 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
18970 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
18971 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
18972 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
18973 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
18974 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
18975 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
18976 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
18977 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
18978 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
18979 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
18980 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
18981 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
18982 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
18983 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
18984 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
18985 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
18986 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
18987 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
18988 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
18989 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
18990 __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);
18991 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "void DeclareStruct(const char * name, bool skipNoHead)", DeclareStruct, module, 2);
18992 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
18993 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
18994 __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);
18995 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
18996 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
18997 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
18998 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
18999 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19000 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19001 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19002 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19003 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19004 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19005 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19006 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(GlobalData data)", DeclareGlobalData, module, 2);
19007 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, 0, 0, module, 2, 1);
19008 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
19009 __ecereClass_Conversion = class;
19010 __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);
19011 __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);
19012 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19013 __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);
19014 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19015 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19016 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19017 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19018 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19019 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19020 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19021 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19022 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19023 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19024 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19025 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19026 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19027 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19028 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19029 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19030 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19031 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19032 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19033 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19034 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(const String s)", DeclareFunctionUtil, module, 1);
19035 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);
19038 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)