1 /* Code generated from eC source file: pass15.ec */
3 typedef long long int64;
4 typedef unsigned long long uint64;
8 #elif defined(__TINYC__)
10 #define __builtin_va_list va_list
11 #define __builtin_va_start va_start
12 #define __builtin_va_end va_end
14 #define strcasecmp stricmp
15 #define strncasecmp strnicmp
16 #define __declspec(x) __attribute__((x))
20 typedef long long int64;
21 typedef unsigned long long uint64;
23 typedef __int64 int64;
24 typedef unsigned __int64 uint64;
27 #define __ENDIAN_PAD(x) (8 - (x))
29 #define __ENDIAN_PAD(x) 0
32 #include <sys/types.h>
34 #if /*defined(_W64) || */(defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
40 #define arch_PointerSize sizeof(void *)
41 #define structSize_Instance (_64BIT ? 24 : 12)
42 #define structSize_Module (_64BIT ? 560 : 300)
43 #define structSize_NamedLink (_64BIT ? 32 : 16)
45 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
47 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
49 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
51 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
53 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
55 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
57 struct __ecereNameSpace__ecere__sys__BTNode;
59 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
61 struct __ecereNameSpace__ecere__sys__BinaryTree
63 struct __ecereNameSpace__ecere__sys__BTNode * root;
65 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
66 void (* FreeKey)(void * key);
67 } __attribute__ ((gcc_struct));
69 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
71 struct __ecereNameSpace__ecere__sys__OldList
78 } __attribute__ ((gcc_struct));
80 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
82 struct __ecereNameSpace__ecere__com__Method
85 struct __ecereNameSpace__ecere__com__Method * parent;
86 struct __ecereNameSpace__ecere__com__Method * left;
87 struct __ecereNameSpace__ecere__com__Method * right;
92 struct __ecereNameSpace__ecere__com__Class * _class;
94 const char * dataTypeString;
95 struct Type * dataType;
97 } __attribute__ ((gcc_struct));
99 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
101 struct __ecereNameSpace__ecere__com__Property
103 struct __ecereNameSpace__ecere__com__Property * prev;
104 struct __ecereNameSpace__ecere__com__Property * next;
106 unsigned int isProperty;
109 struct __ecereNameSpace__ecere__com__Class * _class;
110 const char * dataTypeString;
111 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
112 struct Type * dataType;
113 void (* Set)(void * , int);
114 int (* Get)(void * );
115 unsigned int (* IsSet)(void * );
119 unsigned int conversion;
120 unsigned int watcherOffset;
121 const char * category;
122 unsigned int compiled;
123 unsigned int selfWatchable;
124 unsigned int isWatchable;
125 } __attribute__ ((gcc_struct));
127 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
135 } __attribute__ ((gcc_struct));
137 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
141 struct CodePosition start;
142 struct CodePosition end;
143 } __attribute__ ((gcc_struct));
145 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
149 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
158 struct Attrib * attr;
159 } __attribute__ ((gcc_struct)) __anon1;
160 } __attribute__ ((gcc_struct));
162 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
164 struct ClassDefinition
166 struct ClassDefinition * prev;
167 struct ClassDefinition * next;
169 struct Specifier * _class;
170 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
171 struct __ecereNameSpace__ecere__sys__OldList * definitions;
172 struct Symbol * symbol;
173 struct Location blockStart;
174 struct Location nameLoc;
177 unsigned int deleteWatchable;
178 } __attribute__ ((gcc_struct));
180 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
184 struct Context * parent;
185 struct __ecereNameSpace__ecere__sys__BinaryTree types;
186 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
187 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
188 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
191 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
192 struct ClassDefinition * classDef;
193 unsigned int templateTypesOnly;
194 unsigned int hasNameSpace;
195 } __attribute__ ((gcc_struct));
197 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
201 struct Instantiation * prev;
202 struct Instantiation * next;
204 struct Specifier * _class;
205 struct Expression * exp;
206 struct __ecereNameSpace__ecere__sys__OldList * members;
207 struct Symbol * symbol;
208 unsigned int fullSet;
209 unsigned int isConstant;
210 unsigned char * data;
211 struct Location nameLoc;
212 struct Location insideLoc;
214 } __attribute__ ((gcc_struct));
216 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
220 struct Declaration * prev;
221 struct Declaration * next;
228 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
229 struct __ecereNameSpace__ecere__sys__OldList * declarators;
230 } __attribute__ ((gcc_struct)) __anon1;
231 struct Instantiation * inst;
234 struct Identifier * id;
235 struct Expression * exp;
236 } __attribute__ ((gcc_struct)) __anon2;
237 } __attribute__ ((gcc_struct)) __anon1;
238 struct Specifier * extStorage;
239 struct Symbol * symbol;
241 } __attribute__ ((gcc_struct));
243 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
247 struct Statement * prev;
248 struct Statement * next;
253 struct __ecereNameSpace__ecere__sys__OldList * expressions;
256 struct Identifier * id;
257 struct Statement * stmt;
258 } __attribute__ ((gcc_struct)) labeled;
261 struct Expression * exp;
262 struct Statement * stmt;
263 } __attribute__ ((gcc_struct)) caseStmt;
266 struct __ecereNameSpace__ecere__sys__OldList * declarations;
267 struct __ecereNameSpace__ecere__sys__OldList * statements;
268 struct Context * context;
269 unsigned int isSwitch;
270 } __attribute__ ((gcc_struct)) compound;
273 struct __ecereNameSpace__ecere__sys__OldList * exp;
274 struct Statement * stmt;
275 struct Statement * elseStmt;
276 } __attribute__ ((gcc_struct)) ifStmt;
279 struct __ecereNameSpace__ecere__sys__OldList * exp;
280 struct Statement * stmt;
281 } __attribute__ ((gcc_struct)) switchStmt;
284 struct __ecereNameSpace__ecere__sys__OldList * exp;
285 struct Statement * stmt;
286 } __attribute__ ((gcc_struct)) whileStmt;
289 struct __ecereNameSpace__ecere__sys__OldList * exp;
290 struct Statement * stmt;
291 } __attribute__ ((gcc_struct)) doWhile;
294 struct Statement * init;
295 struct Statement * check;
296 struct __ecereNameSpace__ecere__sys__OldList * increment;
297 struct Statement * stmt;
298 } __attribute__ ((gcc_struct)) forStmt;
301 struct Identifier * id;
302 } __attribute__ ((gcc_struct)) gotoStmt;
305 struct Specifier * spec;
307 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
308 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
309 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
310 } __attribute__ ((gcc_struct)) asmStmt;
313 struct Expression * watcher;
314 struct Expression * object;
315 struct __ecereNameSpace__ecere__sys__OldList * watches;
316 } __attribute__ ((gcc_struct)) _watch;
319 struct Identifier * id;
320 struct __ecereNameSpace__ecere__sys__OldList * exp;
321 struct __ecereNameSpace__ecere__sys__OldList * filter;
322 struct Statement * stmt;
323 } __attribute__ ((gcc_struct)) forEachStmt;
324 struct Declaration * decl;
325 } __attribute__ ((gcc_struct)) __anon1;
326 } __attribute__ ((gcc_struct));
328 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
332 struct TypeName * prev;
333 struct TypeName * next;
335 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
336 struct Declarator * declarator;
338 struct Expression * bitCount;
339 } __attribute__ ((gcc_struct));
341 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
345 struct Initializer * prev;
346 struct Initializer * next;
351 struct Expression * exp;
352 struct __ecereNameSpace__ecere__sys__OldList * list;
353 } __attribute__ ((gcc_struct)) __anon1;
354 unsigned int isConstant;
355 struct Identifier * id;
356 } __attribute__ ((gcc_struct));
358 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
360 struct __ecereNameSpace__ecere__com__DataValue
375 } __attribute__ ((gcc_struct)) __anon1;
376 } __attribute__ ((gcc_struct));
378 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
382 struct Expression * prev;
383 struct Expression * next;
391 struct Identifier * identifier;
392 } __attribute__ ((gcc_struct)) __anon1;
393 struct Statement * compound;
394 struct Instantiation * instance;
398 unsigned int intlString;
399 } __attribute__ ((gcc_struct)) __anon2;
400 struct __ecereNameSpace__ecere__sys__OldList * list;
403 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
404 struct Declarator * decl;
405 } __attribute__ ((gcc_struct)) _classExp;
408 struct Identifier * id;
409 } __attribute__ ((gcc_struct)) classData;
412 struct Expression * exp;
413 struct __ecereNameSpace__ecere__sys__OldList * arguments;
414 struct Location argLoc;
415 } __attribute__ ((gcc_struct)) call;
418 struct Expression * exp;
419 struct __ecereNameSpace__ecere__sys__OldList * index;
420 } __attribute__ ((gcc_struct)) index;
423 struct Expression * exp;
424 struct Identifier * member;
426 unsigned int thisPtr;
427 } __attribute__ ((gcc_struct)) member;
431 struct Expression * exp1;
432 struct Expression * exp2;
433 } __attribute__ ((gcc_struct)) op;
434 struct TypeName * typeName;
435 struct Specifier * _class;
438 struct TypeName * typeName;
439 struct Expression * exp;
440 } __attribute__ ((gcc_struct)) cast;
443 struct Expression * cond;
444 struct __ecereNameSpace__ecere__sys__OldList * exp;
445 struct Expression * elseExp;
446 } __attribute__ ((gcc_struct)) cond;
449 struct TypeName * typeName;
450 struct Expression * size;
451 } __attribute__ ((gcc_struct)) _new;
454 struct TypeName * typeName;
455 struct Expression * size;
456 struct Expression * exp;
457 } __attribute__ ((gcc_struct)) _renew;
461 struct Identifier * id;
462 } __attribute__ ((gcc_struct)) db;
465 struct Expression * ds;
466 struct Expression * name;
467 } __attribute__ ((gcc_struct)) dbopen;
470 struct TypeName * typeName;
471 struct Initializer * initializer;
472 } __attribute__ ((gcc_struct)) initializer;
475 struct Expression * exp;
476 struct TypeName * typeName;
477 } __attribute__ ((gcc_struct)) vaArg;
478 } __attribute__ ((gcc_struct)) __anon1;
479 unsigned int debugValue;
480 struct __ecereNameSpace__ecere__com__DataValue val;
482 unsigned int hasAddress;
483 struct Type * expType;
484 struct Type * destType;
487 unsigned int byReference;
488 unsigned int isConstant;
489 unsigned int addedThis;
490 unsigned int needCast;
491 unsigned int thisPtr;
492 unsigned int opDestType;
493 } __attribute__ ((gcc_struct));
495 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
497 struct TemplateDatatype
499 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
500 struct Declarator * decl;
501 } __attribute__ ((gcc_struct));
503 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
505 struct TemplateArgument;
507 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
509 struct TemplateParameter
511 struct TemplateParameter * prev;
512 struct TemplateParameter * next;
515 struct Identifier * identifier;
518 struct TemplateDatatype * dataType;
520 } __attribute__ ((gcc_struct)) __anon1;
521 struct TemplateArgument * defaultArgument;
522 const char * dataTypeString;
523 struct Type * baseType;
524 } __attribute__ ((gcc_struct));
526 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
530 struct Specifier * prev;
531 struct Specifier * next;
539 struct ExtDecl * extDecl;
541 struct Symbol * symbol;
542 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
543 } __attribute__ ((gcc_struct)) __anon1;
546 struct Identifier * id;
547 struct __ecereNameSpace__ecere__sys__OldList * list;
548 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
549 struct __ecereNameSpace__ecere__sys__OldList * definitions;
550 unsigned int addNameSpace;
551 struct Context * ctx;
552 struct ExtDecl * extDeclStruct;
553 } __attribute__ ((gcc_struct)) __anon2;
554 struct Expression * expression;
555 struct Specifier * _class;
556 struct TemplateParameter * templateParameter;
557 } __attribute__ ((gcc_struct)) __anon1;
558 } __attribute__ ((gcc_struct));
560 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
564 struct Identifier * prev;
565 struct Identifier * next;
567 struct Symbol * classSym;
568 struct Specifier * _class;
570 struct Identifier * badID;
571 } __attribute__ ((gcc_struct));
573 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
577 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
581 struct Declarator * prev;
582 struct Declarator * next;
585 struct Symbol * symbol;
586 struct Declarator * declarator;
589 struct Identifier * identifier;
592 struct Expression * exp;
593 struct Expression * posExp;
594 struct Attrib * attrib;
595 } __attribute__ ((gcc_struct)) structDecl;
598 struct Expression * exp;
599 struct Specifier * enumClass;
600 } __attribute__ ((gcc_struct)) array;
603 struct __ecereNameSpace__ecere__sys__OldList * parameters;
604 } __attribute__ ((gcc_struct)) function;
607 struct Pointer * pointer;
608 } __attribute__ ((gcc_struct)) pointer;
611 struct ExtDecl * extended;
612 } __attribute__ ((gcc_struct)) extended;
613 } __attribute__ ((gcc_struct)) __anon1;
614 } __attribute__ ((gcc_struct));
616 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
618 struct FunctionDefinition
620 struct FunctionDefinition * prev;
621 struct FunctionDefinition * next;
623 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
624 struct Declarator * declarator;
625 struct __ecereNameSpace__ecere__sys__OldList * declarations;
626 struct Statement * body;
627 struct __ecereNameSpace__ecere__com__Class * _class;
628 struct __ecereNameSpace__ecere__sys__OldList attached;
631 struct Symbol * propSet;
633 unsigned int propertyNoThis;
634 } __attribute__ ((gcc_struct));
636 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
640 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
644 struct External * prev;
645 struct External * next;
648 struct Symbol * symbol;
651 struct FunctionDefinition * function;
652 struct ClassDefinition * _class;
653 struct Declaration * declaration;
655 struct Identifier * id;
656 struct DBTableDef * table;
657 } __attribute__ ((gcc_struct)) __anon1;
659 } __attribute__ ((gcc_struct));
661 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
665 struct ModuleImport * prev;
666 struct ModuleImport * next;
668 struct __ecereNameSpace__ecere__sys__OldList classes;
669 struct __ecereNameSpace__ecere__sys__OldList functions;
672 } __attribute__ ((gcc_struct));
674 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
678 struct ClassImport * prev;
679 struct ClassImport * next;
681 struct __ecereNameSpace__ecere__sys__OldList methods;
682 struct __ecereNameSpace__ecere__sys__OldList properties;
685 } __attribute__ ((gcc_struct));
687 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
692 struct Symbol * parent;
693 struct Symbol * left;
694 struct Symbol * right;
699 struct __ecereNameSpace__ecere__com__Method * method;
700 struct __ecereNameSpace__ecere__com__Property * _property;
701 struct __ecereNameSpace__ecere__com__Class * registered;
702 } __attribute__ ((gcc_struct)) __anon1;
709 struct External * pointerExternal;
710 struct External * structExternal;
711 } __attribute__ ((gcc_struct)) __anon1;
714 struct External * externalGet;
715 struct External * externalSet;
716 struct External * externalPtr;
717 struct External * externalIsSet;
718 } __attribute__ ((gcc_struct)) __anon2;
721 struct External * methodExternal;
722 struct External * methodCodeExternal;
723 } __attribute__ ((gcc_struct)) __anon3;
724 } __attribute__ ((gcc_struct)) __anon2;
725 unsigned int imported;
726 unsigned int declaredStructSym;
727 struct __ecereNameSpace__ecere__com__Class * _class;
728 unsigned int declaredStruct;
729 unsigned int needConstructor;
730 unsigned int needDestructor;
731 char * constructorName;
734 char * destructorName;
735 struct ModuleImport * module;
736 struct ClassImport * _import;
737 struct Location nameLoc;
738 unsigned int isParam;
739 unsigned int isRemote;
740 unsigned int isStruct;
741 unsigned int fireWatchersDone;
743 unsigned int classData;
744 unsigned int isStatic;
746 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
747 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
748 struct Context * ctx;
750 struct Expression * propCategory;
751 } __attribute__ ((gcc_struct));
753 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
762 struct Symbol * _class;
765 struct __ecereNameSpace__ecere__sys__OldList members;
767 } __attribute__ ((gcc_struct)) __anon1;
770 struct Type * returnType;
771 struct __ecereNameSpace__ecere__sys__OldList params;
772 struct Symbol * thisClass;
773 unsigned int staticMethod;
774 struct TemplateParameter * thisClassTemplate;
775 } __attribute__ ((gcc_struct)) __anon2;
778 struct __ecereNameSpace__ecere__com__Method * method;
779 struct __ecereNameSpace__ecere__com__Class * methodClass;
780 struct __ecereNameSpace__ecere__com__Class * usedClass;
781 } __attribute__ ((gcc_struct)) __anon3;
784 struct Type * arrayType;
786 struct Expression * arraySizeExp;
787 unsigned int freeExp;
788 struct Symbol * enumClass;
789 } __attribute__ ((gcc_struct)) __anon4;
791 struct TemplateParameter * templateParameter;
792 } __attribute__ ((gcc_struct)) __anon1;
802 unsigned int isSigned : 1;
803 unsigned int constant : 1;
804 unsigned int truth : 1;
805 unsigned int byReference : 1;
806 unsigned int extraParam : 1;
807 unsigned int directClassAccess : 1;
808 unsigned int computing : 1;
809 unsigned int keepCast : 1;
810 unsigned int passAsTemplate : 1;
811 unsigned int dllExport : 1;
812 unsigned int attrStdcall : 1;
813 unsigned int declaredWithStruct : 1;
814 unsigned int typedByReference : 1;
815 unsigned int casted : 1;
816 } __attribute__ ((gcc_struct));
818 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
820 struct __ecereNameSpace__ecere__com__Class
822 struct __ecereNameSpace__ecere__com__Class * prev;
823 struct __ecereNameSpace__ecere__com__Class * next;
829 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
830 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
833 struct __ecereNameSpace__ecere__com__Class * base;
834 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
835 struct __ecereNameSpace__ecere__sys__BinaryTree members;
836 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
837 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
838 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
839 struct __ecereNameSpace__ecere__sys__OldList derivatives;
843 struct __ecereNameSpace__ecere__com__Instance * module;
844 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
845 const char * dataTypeString;
846 struct Type * dataType;
848 int defaultAlignment;
849 void (* Initialize)();
851 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
852 const char * designerClass;
853 unsigned int noExpansion;
854 const char * defaultProperty;
855 unsigned int comRedefinition;
858 unsigned int internalDecl;
860 unsigned int computeSize;
862 int destructionWatchOffset;
864 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
865 int inheritanceAccess;
866 const char * fullName;
868 struct __ecereNameSpace__ecere__sys__OldList conversions;
869 struct __ecereNameSpace__ecere__sys__OldList templateParams;
870 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
871 struct __ecereNameSpace__ecere__com__Class * templateClass;
872 struct __ecereNameSpace__ecere__sys__OldList templatized;
874 unsigned int isInstanceClass;
875 unsigned int byValueSystemClass;
876 } __attribute__ ((gcc_struct));
878 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
880 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
882 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
884 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
886 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
888 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);
890 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
892 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
894 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
896 struct __ecereNameSpace__ecere__com__Instance
899 struct __ecereNameSpace__ecere__com__Class * _class;
901 } __attribute__ ((gcc_struct));
903 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
905 struct __ecereNameSpace__ecere__com__DataMember
907 struct __ecereNameSpace__ecere__com__DataMember * prev;
908 struct __ecereNameSpace__ecere__com__DataMember * next;
910 unsigned int isProperty;
913 struct __ecereNameSpace__ecere__com__Class * _class;
914 const char * dataTypeString;
915 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
916 struct Type * dataType;
920 struct __ecereNameSpace__ecere__sys__OldList members;
921 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
924 } __attribute__ ((gcc_struct));
926 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
928 struct __ecereNameSpace__ecere__com__SerialBuffer
930 unsigned char * _buffer;
934 } __attribute__ ((gcc_struct));
936 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
938 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
944 const char * dataTypeString;
945 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
946 } __attribute__ ((gcc_struct)) __anon1;
947 struct __ecereNameSpace__ecere__com__DataValue expression;
950 const char * memberString;
953 struct __ecereNameSpace__ecere__com__DataMember * member;
954 struct __ecereNameSpace__ecere__com__Property * prop;
955 struct __ecereNameSpace__ecere__com__Method * method;
956 } __attribute__ ((gcc_struct)) __anon1;
957 } __attribute__ ((gcc_struct)) __anon2;
958 } __attribute__ ((gcc_struct)) __anon1;
959 } __attribute__ ((gcc_struct));
961 void exit(int status);
963 void * calloc(size_t nmemb, size_t size);
965 void free(void * ptr);
967 void * malloc(size_t size);
969 void * realloc(void * ptr, size_t size);
971 long int strtol(const char * nptr, char ** endptr, int base);
973 long long int strtoll(const char * nptr, char ** endptr, int base);
975 unsigned long long int strtoull(const char * nptr, char ** endptr, int base);
979 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
982 typedef union YYSTYPE
987 struct Identifier * id;
988 struct Expression * exp;
989 struct Specifier * specifier;
990 struct __ecereNameSpace__ecere__sys__OldList * list;
991 struct Enumerator * enumerator;
992 struct Declarator * declarator;
993 struct Pointer * pointer;
994 struct Initializer * initializer;
995 struct InitDeclarator * initDeclarator;
996 struct TypeName * typeName;
997 struct Declaration * declaration;
998 struct Statement * stmt;
999 struct FunctionDefinition * function;
1000 struct External * external;
1001 struct Context * context;
1002 struct AsmField * asmField;
1003 struct Attrib * attrib;
1004 struct ExtDecl * extDecl;
1005 struct Attribute * attribute;
1006 struct Instantiation * instance;
1007 struct MembersInit * membersInit;
1008 struct MemberInit * memberInit;
1009 struct ClassFunction * classFunction;
1010 struct ClassDefinition * _class;
1011 struct ClassDef * classDef;
1012 struct PropertyDef * prop;
1014 struct Symbol * symbol;
1015 struct PropertyWatch * propertyWatch;
1016 struct TemplateParameter * templateParameter;
1017 struct TemplateArgument * templateArgument;
1018 struct TemplateDatatype * templateDatatype;
1019 struct DBTableEntry * dbtableEntry;
1020 struct DBIndexItem * dbindexItem;
1021 struct DBTableDef * dbtableDef;
1022 } __attribute__ ((gcc_struct)) YYSTYPE;
1024 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
1028 struct Enumerator * prev;
1029 struct Enumerator * next;
1030 struct Location loc;
1031 struct Identifier * id;
1032 struct Expression * exp;
1033 } __attribute__ ((gcc_struct));
1035 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
1037 struct InitDeclarator
1039 struct InitDeclarator * prev;
1040 struct InitDeclarator * next;
1041 struct Location loc;
1042 struct Declarator * declarator;
1043 struct Initializer * initializer;
1044 } __attribute__ ((gcc_struct));
1046 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
1050 struct AsmField * prev;
1051 struct AsmField * next;
1052 struct Location loc;
1054 struct Expression * expression;
1055 struct Identifier * symbolic;
1056 } __attribute__ ((gcc_struct));
1058 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
1062 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
1064 struct ClassFunction
1066 struct ClassFunction * prev;
1067 struct ClassFunction * next;
1068 struct Location loc;
1069 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1070 struct Declarator * declarator;
1071 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1072 struct Statement * body;
1073 struct __ecereNameSpace__ecere__com__Class * _class;
1074 struct __ecereNameSpace__ecere__sys__OldList attached;
1077 struct Symbol * propSet;
1078 unsigned int isVirtual;
1079 unsigned int isConstructor;
1080 unsigned int isDestructor;
1081 unsigned int dontMangle;
1084 } __attribute__ ((gcc_struct));
1086 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1090 struct MembersInit * prev;
1091 struct MembersInit * next;
1092 struct Location loc;
1096 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1097 struct ClassFunction * function;
1098 } __attribute__ ((gcc_struct)) __anon1;
1099 } __attribute__ ((gcc_struct));
1101 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1105 struct MemberInit * prev;
1106 struct MemberInit * next;
1107 struct Location loc;
1108 struct Location realLoc;
1109 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1110 struct Initializer * initializer;
1112 unsigned int variable;
1113 unsigned int takeOutExp;
1114 } __attribute__ ((gcc_struct));
1116 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1120 struct PropertyDef * prev;
1121 struct PropertyDef * next;
1122 struct Location loc;
1123 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1124 struct Declarator * declarator;
1125 struct Identifier * id;
1126 struct Statement * getStmt;
1127 struct Statement * setStmt;
1128 struct Statement * issetStmt;
1129 struct Symbol * symbol;
1130 struct Expression * category;
1133 unsigned int conversion : 1;
1134 unsigned int isWatchable : 1;
1135 unsigned int isDBProp : 1;
1136 } __attribute__ ((gcc_struct)) __anon1;
1137 } __attribute__ ((gcc_struct));
1139 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1141 struct PropertyWatch
1143 struct PropertyWatch * prev;
1144 struct PropertyWatch * next;
1145 struct Location loc;
1146 struct Statement * compound;
1147 struct __ecereNameSpace__ecere__sys__OldList * properties;
1148 unsigned int deleteWatch;
1149 } __attribute__ ((gcc_struct));
1151 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1155 struct ClassDef * prev;
1156 struct ClassDef * next;
1157 struct Location loc;
1161 struct Declaration * decl;
1162 struct ClassFunction * function;
1163 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1164 struct PropertyDef * propertyDef;
1165 struct PropertyWatch * propertyWatch;
1167 struct Identifier * defaultProperty;
1170 struct Identifier * id;
1171 struct Initializer * initializer;
1172 } __attribute__ ((gcc_struct)) __anon1;
1173 } __attribute__ ((gcc_struct)) __anon1;
1176 } __attribute__ ((gcc_struct));
1178 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1180 struct DBTableEntry;
1182 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1186 extern YYSTYPE yylval;
1188 extern struct Location yylloc;
1190 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
1192 extern int returnCode;
1194 extern struct Expression * parsedExpression;
1196 extern unsigned int yydebug;
1198 void SetYydebug(unsigned int b)
1203 extern unsigned int echoOn;
1205 void resetScanner();
1209 int expression_yyparse();
1211 static struct Statement * curCompound;
1213 struct External * curExternal, * afterExternal;
1215 static struct Type * curSwitchType;
1217 static struct __ecereNameSpace__ecere__com__Class * currentClass;
1219 struct __ecereNameSpace__ecere__com__Class * thisClass;
1221 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
1226 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
1231 static char * thisNameSpace;
1233 struct __ecereNameSpace__ecere__com__Class * containerClass;
1235 unsigned int thisClassParams = 0x1;
1237 unsigned int internalValueCounter;
1239 extern unsigned int outputLineNumbers;
1241 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
1243 extern size_t strlen(const char * );
1245 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
1247 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
1249 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
1251 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
1253 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
1255 void PrintExpression(struct Expression * exp, char * string)
1258 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
1260 unsigned int backOutputLineNumbers = outputLineNumbers;
1262 outputLineNumbers = 0x0;
1264 OutputExpression(exp, f);
1265 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
1266 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1268 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1269 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
1270 count = strlen(string);
1271 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
1272 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1274 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1275 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
1276 string[count] = '\0';
1277 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
1278 outputLineNumbers = backOutputLineNumbers;
1282 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
1284 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1286 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1288 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1290 if(!param->baseType)
1292 if(param->dataTypeString)
1293 param->baseType = ProcessTypeString(param->dataTypeString, 0x0);
1295 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1297 return param->baseType;
1299 return (((void *)0));
1302 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1304 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1306 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0x0)
1310 if(type1->kind == type2->kind)
1321 if(type1->passAsTemplate && !type2->passAsTemplate)
1323 return type1->isSigned != type2->isSigned;
1325 return type1->__anon1._class != type2->__anon1._class;
1327 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1335 extern int strcmp(const char * , const char * );
1337 extern struct Context * curContext;
1339 extern struct Context * topContext;
1341 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
1343 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);
1345 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
1347 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);
1349 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);
1351 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassProperty;
1353 struct __ecereNameSpace__ecere__com__ClassProperty
1356 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1357 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1358 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1360 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1361 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1362 const char * dataTypeString;
1363 struct Type * dataType;
1364 unsigned int constant;
1365 } __attribute__ ((gcc_struct));
1367 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1369 extern struct Expression * QMkExpId(const char * id);
1371 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateParameter;
1373 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
1375 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
1376 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
1381 const char * dataTypeString;
1383 } __attribute__ ((gcc_struct)) __anon1;
1384 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
1386 } __attribute__ ((gcc_struct));
1388 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
1390 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1392 extern void FreeIdentifier(struct Identifier * id);
1394 void ProcessExpressionType(struct Expression * exp);
1396 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1398 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
1400 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
1402 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1404 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1406 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
1408 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
1410 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
1412 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
1414 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
1416 struct Identifier * id = exp->__anon1.__anon1.identifier;
1417 struct Context * ctx;
1418 struct Symbol * symbol = (((void *)0));
1420 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
1422 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
1424 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
1429 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))))
1431 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
1432 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
1433 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
1434 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
1438 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
1440 if(!prop && !method)
1441 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
1442 if(!prop && !method && !member)
1444 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
1446 if(prop || method || member || classProp)
1449 exp->__anon1.member.member = id;
1450 exp->__anon1.member.memberType = 0;
1451 exp->__anon1.member.exp = QMkExpId("this");
1452 exp->addedThis = 0x1;
1454 else if(_class && _class->templateParams.first)
1456 struct __ecereNameSpace__ecere__com__Class * sClass;
1458 for(sClass = _class; sClass; sClass = sClass->base)
1460 if(sClass->templateParams.first)
1462 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
1464 for(param = sClass->templateParams.first; param; param = param->next)
1466 if(param->type == 2 && !strcmp(param->name, id->string))
1468 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
1472 struct Declarator * decl;
1473 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1475 FreeIdentifier(exp->__anon1.member.member);
1476 ProcessExpressionType(argExp);
1477 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
1478 exp->expType = ProcessType(specs, decl);
1480 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
1491 extern int sprintf(char * , const char * , ...);
1493 extern int __ecereNameSpace__ecere__com__GetRuntimePlatform(void);
1495 extern char * strcat(char * , const char * );
1497 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
1499 char * PrintInt(long long result)
1503 if(result > (((int)0x7fffffff)))
1504 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1506 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64d" : "%lld"), result);
1507 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
1509 return __ecereNameSpace__ecere__sys__CopyString(temp);
1512 char * PrintUInt(uint64 result)
1516 if(result > (0xffffffff))
1517 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1518 else if(result > (((int)0x7fffffff)))
1519 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1521 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64d" : "%lld"), result);
1522 return __ecereNameSpace__ecere__sys__CopyString(temp);
1525 char * PrintInt64(long long result)
1529 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64dLL" : "%lldLL"), result);
1530 return __ecereNameSpace__ecere__sys__CopyString(temp);
1533 char * PrintUInt64(uint64 result)
1537 if(result > (((long long)0x7fffffffffffffffLL)))
1538 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1540 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64dLL" : "%lldLL"), result);
1541 return __ecereNameSpace__ecere__sys__CopyString(temp);
1544 char * PrintHexUInt(uint64 result)
1548 if(result > (0xffffffff))
1549 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1551 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1552 if(result > (0xffffffff))
1554 return __ecereNameSpace__ecere__sys__CopyString(temp);
1557 char * PrintHexUInt64(uint64 result)
1561 if(result > (0xffffffff))
1562 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1564 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1565 return __ecereNameSpace__ecere__sys__CopyString(temp);
1568 char * PrintShort(short result)
1572 sprintf(temp, "%d", (unsigned short)result);
1573 return __ecereNameSpace__ecere__sys__CopyString(temp);
1576 char * PrintUShort(unsigned short result)
1580 if(result > (unsigned short)32767)
1581 sprintf(temp, "0x%X", (int)result);
1583 sprintf(temp, "%d", (int)result);
1584 return __ecereNameSpace__ecere__sys__CopyString(temp);
1587 extern int isprint(int c);
1589 char * PrintChar(char result)
1593 if(result > (char)0 && isprint(result))
1594 sprintf(temp, "'%c'", result);
1595 else if(result < (char)0)
1596 sprintf(temp, "%d", (int)result);
1598 sprintf(temp, "0x%X", (unsigned char)result);
1599 return __ecereNameSpace__ecere__sys__CopyString(temp);
1602 char * PrintUChar(unsigned char result)
1606 sprintf(temp, "0x%X", result);
1607 return __ecereNameSpace__ecere__sys__CopyString(temp);
1610 extern char * strcpy(char * , const char * );
1612 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
1614 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_isInf;
1616 extern int (* __ecereProp_float_Get_signBit)(float this);
1618 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_signBit;
1620 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
1622 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_isNan;
1624 char * PrintFloat(float result)
1628 if(__ecereProp_float_Get_isInf(result))
1630 if(__ecereProp_float_Get_signBit(result))
1631 strcpy(temp, "-inf");
1633 strcpy(temp, "inf");
1635 else if(__ecereProp_float_Get_isNan(result))
1637 if(__ecereProp_float_Get_signBit(result))
1638 strcpy(temp, "-nan");
1640 strcpy(temp, "nan");
1643 sprintf(temp, "%.16ff", result);
1644 return __ecereNameSpace__ecere__sys__CopyString(temp);
1647 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
1649 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_isInf;
1651 extern int (* __ecereProp_double_Get_signBit)(double this);
1653 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_signBit;
1655 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
1657 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_isNan;
1659 char * PrintDouble(double result)
1663 if(__ecereProp_double_Get_isInf(result))
1665 if(__ecereProp_double_Get_signBit(result))
1666 strcpy(temp, "-inf");
1668 strcpy(temp, "inf");
1670 else if(__ecereProp_double_Get_isNan(result))
1672 if(__ecereProp_double_Get_signBit(result))
1673 strcpy(temp, "-nan");
1675 strcpy(temp, "nan");
1678 sprintf(temp, "%.16f", result);
1679 return __ecereNameSpace__ecere__sys__CopyString(temp);
1682 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_OpTable;
1686 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1687 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1688 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1689 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1690 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1691 unsigned int (* Neg)(struct Expression *, struct Operand *);
1692 unsigned int (* Inc)(struct Expression *, struct Operand *);
1693 unsigned int (* Dec)(struct Expression *, struct Operand *);
1694 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1695 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1696 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1697 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1698 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1699 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1700 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1701 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1702 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1703 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1704 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1705 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1706 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1707 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1708 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1709 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1710 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1711 unsigned int (* Not)(struct Expression *, struct Operand *);
1712 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1713 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1714 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1715 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1716 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1717 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1718 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1719 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1720 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1721 } __attribute__ ((gcc_struct));
1723 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Operand;
1729 unsigned int ptrSize;
1742 } __attribute__ ((gcc_struct)) __anon1;
1744 } __attribute__ ((gcc_struct));
1746 unsigned int GetOpInt(struct Operand * op2, int * value2)
1748 if(op2->kind == 3 && op2->type->isSigned)
1749 *value2 = op2->__anon1.i;
1750 else if(op2->kind == 3)
1751 *value2 = (int)op2->__anon1.ui;
1752 else if(op2->kind == 4 && op2->type->isSigned)
1753 *value2 = (int)op2->__anon1.i64;
1754 else if(op2->kind == 4)
1755 *value2 = (int)op2->__anon1.ui64;
1756 else if(op2->kind == 23 && op2->type->isSigned)
1757 *value2 = (int)op2->__anon1.i64;
1758 else if(op2->kind == 23)
1759 *value2 = (int)op2->__anon1.ui64;
1760 else if(op2->kind == 22 && op2->type->isSigned)
1761 *value2 = (int)op2->__anon1.i64;
1762 else if(op2->kind == 22)
1763 *value2 = (int)op2->__anon1.ui64;
1764 else if(op2->kind == 2 && op2->type->isSigned)
1765 *value2 = (int)op2->__anon1.s;
1766 else if(op2->kind == 2)
1767 *value2 = (int)op2->__anon1.us;
1768 else if(op2->kind == 1 && op2->type->isSigned)
1769 *value2 = (int)op2->__anon1.c;
1770 else if(op2->kind == 24 || op2->kind == 1)
1771 *value2 = (int)op2->__anon1.uc;
1772 else if(op2->kind == 6)
1773 *value2 = (int)op2->__anon1.f;
1774 else if(op2->kind == 7)
1775 *value2 = (int)op2->__anon1.d;
1776 else if(op2->kind == 13)
1777 *value2 = (int)op2->__anon1.ui64;
1783 struct Operand GetOperand(struct Expression * exp);
1785 unsigned int GetInt(struct Expression * exp, int * value2)
1787 struct Operand op2 = GetOperand(exp);
1789 return GetOpInt(&op2, value2);
1792 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1794 if(op2->kind == 3 && op2->type->isSigned)
1795 *value2 = (unsigned int)op2->__anon1.i;
1796 else if(op2->kind == 3)
1797 *value2 = op2->__anon1.ui;
1798 else if(op2->kind == 4 && op2->type->isSigned)
1799 *value2 = (unsigned int)op2->__anon1.i64;
1800 else if(op2->kind == 4)
1801 *value2 = (unsigned int)op2->__anon1.ui64;
1802 else if(op2->kind == 23 && op2->type->isSigned)
1803 *value2 = (unsigned int)op2->__anon1.i64;
1804 else if(op2->kind == 23)
1805 *value2 = (unsigned int)op2->__anon1.ui64;
1806 else if(op2->kind == 22 && op2->type->isSigned)
1807 *value2 = (unsigned int)op2->__anon1.i64;
1808 else if(op2->kind == 22)
1809 *value2 = (unsigned int)op2->__anon1.ui64;
1810 else if(op2->kind == 2 && op2->type->isSigned)
1811 *value2 = (unsigned int)op2->__anon1.s;
1812 else if(op2->kind == 2)
1813 *value2 = (unsigned int)op2->__anon1.us;
1814 else if(op2->kind == 1 && op2->type->isSigned)
1815 *value2 = (unsigned int)op2->__anon1.c;
1816 else if(op2->kind == 24 || op2->kind == 1)
1817 *value2 = (unsigned int)op2->__anon1.uc;
1818 else if(op2->kind == 6)
1819 *value2 = (unsigned int)op2->__anon1.f;
1820 else if(op2->kind == 7)
1821 *value2 = (unsigned int)op2->__anon1.d;
1822 else if(op2->kind == 13)
1823 *value2 = (unsigned int)op2->__anon1.ui64;
1829 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
1831 struct Operand op2 = GetOperand(exp);
1833 return GetOpUInt(&op2, value2);
1836 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
1838 if(op2->kind == 3 && op2->type->isSigned)
1839 *value2 = (long long)op2->__anon1.i;
1840 else if(op2->kind == 3)
1841 *value2 = (long long)op2->__anon1.ui;
1842 else if(op2->kind == 4 && op2->type->isSigned)
1843 *value2 = op2->__anon1.i64;
1844 else if(op2->kind == 4)
1845 *value2 = (long long)op2->__anon1.ui64;
1846 else if(op2->kind == 23 && op2->type->isSigned)
1847 *value2 = op2->__anon1.i64;
1848 else if(op2->kind == 23)
1849 *value2 = (long long)op2->__anon1.ui64;
1850 else if(op2->kind == 22 && op2->type->isSigned)
1851 *value2 = op2->__anon1.i64;
1852 else if(op2->kind == 22)
1853 *value2 = (long long)op2->__anon1.ui64;
1854 else if(op2->kind == 2 && op2->type->isSigned)
1855 *value2 = (long long)op2->__anon1.s;
1856 else if(op2->kind == 2)
1857 *value2 = (long long)op2->__anon1.us;
1858 else if(op2->kind == 1 && op2->type->isSigned)
1859 *value2 = (long long)op2->__anon1.c;
1860 else if(op2->kind == 24 || op2->kind == 1)
1861 *value2 = (long long)op2->__anon1.uc;
1862 else if(op2->kind == 6)
1863 *value2 = (long long)op2->__anon1.f;
1864 else if(op2->kind == 7)
1865 *value2 = (long long)op2->__anon1.d;
1866 else if(op2->kind == 13)
1867 *value2 = (long long)op2->__anon1.ui64;
1873 unsigned int GetInt64(struct Expression * exp, long long * value2)
1875 struct Operand op2 = GetOperand(exp);
1877 return GetOpInt64(&op2, value2);
1880 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
1882 if(op2->kind == 3 && op2->type->isSigned)
1883 *value2 = (uint64)op2->__anon1.i;
1884 else if(op2->kind == 3)
1885 *value2 = (uint64)op2->__anon1.ui;
1886 else if(op2->kind == 4 && op2->type->isSigned)
1887 *value2 = (uint64)op2->__anon1.i64;
1888 else if(op2->kind == 4)
1889 *value2 = op2->__anon1.ui64;
1890 else if(op2->kind == 23 && op2->type->isSigned)
1891 *value2 = (uint64)op2->__anon1.i64;
1892 else if(op2->kind == 23)
1893 *value2 = op2->__anon1.ui64;
1894 else if(op2->kind == 22 && op2->type->isSigned)
1895 *value2 = (uint64)op2->__anon1.i64;
1896 else if(op2->kind == 22)
1897 *value2 = op2->__anon1.ui64;
1898 else if(op2->kind == 2 && op2->type->isSigned)
1899 *value2 = (uint64)op2->__anon1.s;
1900 else if(op2->kind == 2)
1901 *value2 = (uint64)op2->__anon1.us;
1902 else if(op2->kind == 1 && op2->type->isSigned)
1903 *value2 = (uint64)op2->__anon1.c;
1904 else if(op2->kind == 24 || op2->kind == 1)
1905 *value2 = (uint64)op2->__anon1.uc;
1906 else if(op2->kind == 6)
1907 *value2 = (uint64)op2->__anon1.f;
1908 else if(op2->kind == 7)
1909 *value2 = (uint64)op2->__anon1.d;
1910 else if(op2->kind == 13)
1911 *value2 = op2->__anon1.ui64;
1917 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
1919 struct Operand op2 = GetOperand(exp);
1921 return GetOpUInt64(&op2, value2);
1924 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
1926 if(op2->kind == 3 && op2->type->isSigned)
1927 *value2 = (intptr_t)op2->__anon1.i;
1928 else if(op2->kind == 3)
1929 *value2 = (intptr_t)op2->__anon1.ui;
1930 else if(op2->kind == 4 && op2->type->isSigned)
1931 *value2 = (intptr_t)op2->__anon1.i64;
1932 else if(op2->kind == 4)
1933 *value2 = (intptr_t)op2->__anon1.ui64;
1934 else if(op2->kind == 23 && op2->type->isSigned)
1935 *value2 = (intptr_t)op2->__anon1.i64;
1936 else if(op2->kind == 23)
1937 *value2 = (intptr_t)op2->__anon1.ui64;
1938 else if(op2->kind == 22 && op2->type->isSigned)
1939 *value2 = (intptr_t)op2->__anon1.i64;
1940 else if(op2->kind == 22)
1941 *value2 = (intptr_t)op2->__anon1.ui64;
1942 else if(op2->kind == 2 && op2->type->isSigned)
1943 *value2 = (intptr_t)op2->__anon1.s;
1944 else if(op2->kind == 2)
1945 *value2 = (intptr_t)op2->__anon1.us;
1946 else if(op2->kind == 1 && op2->type->isSigned)
1947 *value2 = (intptr_t)op2->__anon1.c;
1948 else if(op2->kind == 24 || op2->kind == 1)
1949 *value2 = (intptr_t)op2->__anon1.uc;
1950 else if(op2->kind == 6)
1951 *value2 = (intptr_t)op2->__anon1.f;
1952 else if(op2->kind == 7)
1953 *value2 = (intptr_t)op2->__anon1.d;
1954 else if(op2->kind == 13)
1955 *value2 = (intptr_t)op2->__anon1.ui64;
1961 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
1963 struct Operand op2 = GetOperand(exp);
1965 return GetOpIntPtr(&op2, value2);
1968 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
1970 if(op2->kind == 3 && op2->type->isSigned)
1971 *value2 = (uintptr_t)op2->__anon1.i;
1972 else if(op2->kind == 3)
1973 *value2 = (uintptr_t)op2->__anon1.ui;
1974 else if(op2->kind == 4 && op2->type->isSigned)
1975 *value2 = (uintptr_t)op2->__anon1.i64;
1976 else if(op2->kind == 4)
1977 *value2 = (uintptr_t)op2->__anon1.ui64;
1978 else if(op2->kind == 23 && op2->type->isSigned)
1979 *value2 = (uintptr_t)op2->__anon1.i64;
1980 else if(op2->kind == 23)
1981 *value2 = (uintptr_t)op2->__anon1.ui64;
1982 else if(op2->kind == 22 && op2->type->isSigned)
1983 *value2 = (uintptr_t)op2->__anon1.i64;
1984 else if(op2->kind == 22)
1985 *value2 = (uintptr_t)op2->__anon1.ui64;
1986 else if(op2->kind == 2 && op2->type->isSigned)
1987 *value2 = (uintptr_t)op2->__anon1.s;
1988 else if(op2->kind == 2)
1989 *value2 = (uintptr_t)op2->__anon1.us;
1990 else if(op2->kind == 1 && op2->type->isSigned)
1991 *value2 = (uintptr_t)op2->__anon1.c;
1992 else if(op2->kind == 24 || op2->kind == 1)
1993 *value2 = (uintptr_t)op2->__anon1.uc;
1994 else if(op2->kind == 6)
1995 *value2 = (uintptr_t)op2->__anon1.f;
1996 else if(op2->kind == 7)
1997 *value2 = (uintptr_t)op2->__anon1.d;
1998 else if(op2->kind == 13)
1999 *value2 = (uintptr_t)op2->__anon1.ui64;
2005 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
2007 struct Operand op2 = GetOperand(exp);
2009 return GetOpUIntPtr(&op2, value2);
2012 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2014 if(op2->kind == 3 && op2->type->isSigned)
2015 *value2 = (ssize_t)op2->__anon1.i;
2016 else if(op2->kind == 3)
2017 *value2 = (ssize_t)op2->__anon1.ui;
2018 else if(op2->kind == 4 && op2->type->isSigned)
2019 *value2 = (ssize_t)op2->__anon1.i64;
2020 else if(op2->kind == 4)
2021 *value2 = (ssize_t)op2->__anon1.ui64;
2022 else if(op2->kind == 23 && op2->type->isSigned)
2023 *value2 = (ssize_t)op2->__anon1.i64;
2024 else if(op2->kind == 23)
2025 *value2 = (ssize_t)op2->__anon1.ui64;
2026 else if(op2->kind == 22 && op2->type->isSigned)
2027 *value2 = (ssize_t)op2->__anon1.i64;
2028 else if(op2->kind == 22)
2029 *value2 = (ssize_t)op2->__anon1.ui64;
2030 else if(op2->kind == 2 && op2->type->isSigned)
2031 *value2 = (ssize_t)op2->__anon1.s;
2032 else if(op2->kind == 2)
2033 *value2 = (ssize_t)op2->__anon1.us;
2034 else if(op2->kind == 1 && op2->type->isSigned)
2035 *value2 = (ssize_t)op2->__anon1.c;
2036 else if(op2->kind == 24 || op2->kind == 1)
2037 *value2 = (ssize_t)op2->__anon1.uc;
2038 else if(op2->kind == 6)
2039 *value2 = (ssize_t)op2->__anon1.f;
2040 else if(op2->kind == 7)
2041 *value2 = (ssize_t)op2->__anon1.d;
2042 else if(op2->kind == 13)
2043 *value2 = (ssize_t)op2->__anon1.ui64;
2049 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
2051 struct Operand op2 = GetOperand(exp);
2053 return GetOpIntSize(&op2, value2);
2056 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2058 if(op2->kind == 3 && op2->type->isSigned)
2059 *value2 = (size_t)op2->__anon1.i;
2060 else if(op2->kind == 3)
2061 *value2 = (size_t)op2->__anon1.ui;
2062 else if(op2->kind == 4 && op2->type->isSigned)
2063 *value2 = (size_t)op2->__anon1.i64;
2064 else if(op2->kind == 4)
2065 *value2 = (size_t)op2->__anon1.ui64;
2066 else if(op2->kind == 23 && op2->type->isSigned)
2067 *value2 = (size_t)op2->__anon1.i64;
2068 else if(op2->kind == 23)
2069 *value2 = (size_t)op2->__anon1.ui64;
2070 else if(op2->kind == 22 && op2->type->isSigned)
2071 *value2 = (size_t)op2->__anon1.i64;
2072 else if(op2->kind == 22)
2073 *value2 = (size_t)op2->__anon1.ui64;
2074 else if(op2->kind == 2 && op2->type->isSigned)
2075 *value2 = (size_t)op2->__anon1.s;
2076 else if(op2->kind == 2)
2077 *value2 = (size_t)op2->__anon1.us;
2078 else if(op2->kind == 1 && op2->type->isSigned)
2079 *value2 = (size_t)op2->__anon1.c;
2080 else if(op2->kind == 24 || op2->kind == 1)
2081 *value2 = (size_t)op2->__anon1.uc;
2082 else if(op2->kind == 6)
2083 *value2 = (size_t)op2->__anon1.f;
2084 else if(op2->kind == 7)
2085 *value2 = (size_t)op2->__anon1.d;
2086 else if(op2->kind == 13)
2087 *value2 = (size_t)op2->__anon1.ui64;
2093 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
2095 struct Operand op2 = GetOperand(exp);
2097 return GetOpUIntSize(&op2, value2);
2100 unsigned int GetOpShort(struct Operand * op2, short * value2)
2102 if(op2->kind == 3 && op2->type->isSigned)
2103 *value2 = (short)op2->__anon1.i;
2104 else if(op2->kind == 3)
2105 *value2 = (short)op2->__anon1.ui;
2106 else if(op2->kind == 4 && op2->type->isSigned)
2107 *value2 = (short)op2->__anon1.i64;
2108 else if(op2->kind == 4)
2109 *value2 = (short)op2->__anon1.ui64;
2110 else if(op2->kind == 23 && op2->type->isSigned)
2111 *value2 = (short)op2->__anon1.i64;
2112 else if(op2->kind == 23)
2113 *value2 = (short)op2->__anon1.ui64;
2114 else if(op2->kind == 22 && op2->type->isSigned)
2115 *value2 = (short)op2->__anon1.i64;
2116 else if(op2->kind == 22)
2117 *value2 = (short)op2->__anon1.ui64;
2118 else if(op2->kind == 2 && op2->type->isSigned)
2119 *value2 = op2->__anon1.s;
2120 else if(op2->kind == 2)
2121 *value2 = (short)op2->__anon1.us;
2122 else if(op2->kind == 1 && op2->type->isSigned)
2123 *value2 = (short)op2->__anon1.c;
2124 else if(op2->kind == 24 || op2->kind == 1)
2125 *value2 = (short)op2->__anon1.uc;
2126 else if(op2->kind == 6)
2127 *value2 = (short)op2->__anon1.f;
2128 else if(op2->kind == 7)
2129 *value2 = (short)op2->__anon1.d;
2130 else if(op2->kind == 13)
2131 *value2 = (short)op2->__anon1.ui64;
2137 unsigned int GetShort(struct Expression * exp, short * value2)
2139 struct Operand op2 = GetOperand(exp);
2141 return GetOpShort(&op2, value2);
2144 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2146 if(op2->kind == 3 && op2->type->isSigned)
2147 *value2 = (unsigned short)op2->__anon1.i;
2148 else if(op2->kind == 3)
2149 *value2 = (unsigned short)op2->__anon1.ui;
2150 else if(op2->kind == 4 && op2->type->isSigned)
2151 *value2 = (unsigned short)op2->__anon1.i64;
2152 else if(op2->kind == 4)
2153 *value2 = (unsigned short)op2->__anon1.ui64;
2154 else if(op2->kind == 23 && op2->type->isSigned)
2155 *value2 = (unsigned short)op2->__anon1.i64;
2156 else if(op2->kind == 23)
2157 *value2 = (unsigned short)op2->__anon1.ui64;
2158 else if(op2->kind == 22 && op2->type->isSigned)
2159 *value2 = (unsigned short)op2->__anon1.i64;
2160 else if(op2->kind == 22)
2161 *value2 = (unsigned short)op2->__anon1.ui64;
2162 else if(op2->kind == 2 && op2->type->isSigned)
2163 *value2 = (unsigned short)op2->__anon1.s;
2164 else if(op2->kind == 2)
2165 *value2 = op2->__anon1.us;
2166 else if(op2->kind == 1 && op2->type->isSigned)
2167 *value2 = (unsigned short)op2->__anon1.c;
2168 else if(op2->kind == 24 || op2->kind == 1)
2169 *value2 = (unsigned short)op2->__anon1.uc;
2170 else if(op2->kind == 6)
2171 *value2 = (unsigned short)op2->__anon1.f;
2172 else if(op2->kind == 7)
2173 *value2 = (unsigned short)op2->__anon1.d;
2174 else if(op2->kind == 13)
2175 *value2 = (unsigned short)op2->__anon1.ui64;
2181 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
2183 struct Operand op2 = GetOperand(exp);
2185 return GetOpUShort(&op2, value2);
2188 unsigned int GetOpChar(struct Operand * op2, char * value2)
2190 if(op2->kind == 3 && op2->type->isSigned)
2191 *value2 = (char)op2->__anon1.i;
2192 else if(op2->kind == 3)
2193 *value2 = (char)op2->__anon1.ui;
2194 else if(op2->kind == 4 && op2->type->isSigned)
2195 *value2 = (char)op2->__anon1.i64;
2196 else if(op2->kind == 4)
2197 *value2 = (char)op2->__anon1.ui64;
2198 else if(op2->kind == 23 && op2->type->isSigned)
2199 *value2 = (char)op2->__anon1.i64;
2200 else if(op2->kind == 23)
2201 *value2 = (char)op2->__anon1.ui64;
2202 else if(op2->kind == 22 && op2->type->isSigned)
2203 *value2 = (char)op2->__anon1.i64;
2204 else if(op2->kind == 22)
2205 *value2 = (char)op2->__anon1.ui64;
2206 else if(op2->kind == 2 && op2->type->isSigned)
2207 *value2 = (char)op2->__anon1.s;
2208 else if(op2->kind == 2)
2209 *value2 = (char)op2->__anon1.us;
2210 else if(op2->kind == 1 && op2->type->isSigned)
2211 *value2 = op2->__anon1.c;
2212 else if(op2->kind == 24 || op2->kind == 1)
2213 *value2 = (char)op2->__anon1.uc;
2214 else if(op2->kind == 6)
2215 *value2 = (char)op2->__anon1.f;
2216 else if(op2->kind == 7)
2217 *value2 = (char)op2->__anon1.d;
2218 else if(op2->kind == 13)
2219 *value2 = (char)op2->__anon1.ui64;
2225 unsigned int GetChar(struct Expression * exp, char * value2)
2227 struct Operand op2 = GetOperand(exp);
2229 return GetOpChar(&op2, value2);
2232 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2234 if(op2->kind == 3 && op2->type->isSigned)
2235 *value2 = (unsigned char)op2->__anon1.i;
2236 else if(op2->kind == 3)
2237 *value2 = (unsigned char)op2->__anon1.ui;
2238 else if(op2->kind == 4 && op2->type->isSigned)
2239 *value2 = (unsigned char)op2->__anon1.i64;
2240 else if(op2->kind == 4)
2241 *value2 = (unsigned char)op2->__anon1.ui64;
2242 else if(op2->kind == 23 && op2->type->isSigned)
2243 *value2 = (unsigned char)op2->__anon1.i64;
2244 else if(op2->kind == 23)
2245 *value2 = (unsigned char)op2->__anon1.ui64;
2246 else if(op2->kind == 22 && op2->type->isSigned)
2247 *value2 = (unsigned char)op2->__anon1.i64;
2248 else if(op2->kind == 22)
2249 *value2 = (unsigned char)op2->__anon1.ui64;
2250 else if(op2->kind == 2 && op2->type->isSigned)
2251 *value2 = (unsigned char)op2->__anon1.s;
2252 else if(op2->kind == 2)
2253 *value2 = (unsigned char)op2->__anon1.us;
2254 else if(op2->kind == 1 && op2->type->isSigned)
2255 *value2 = (unsigned char)op2->__anon1.c;
2256 else if(op2->kind == 24 || op2->kind == 1)
2257 *value2 = op2->__anon1.uc;
2258 else if(op2->kind == 6)
2259 *value2 = (unsigned char)op2->__anon1.f;
2260 else if(op2->kind == 7)
2261 *value2 = (unsigned char)op2->__anon1.d;
2262 else if(op2->kind == 13)
2263 *value2 = (unsigned char)op2->__anon1.ui64;
2269 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
2271 struct Operand op2 = GetOperand(exp);
2273 return GetOpUChar(&op2, value2);
2276 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2278 if(op2->kind == 3 && op2->type->isSigned)
2279 *value2 = (float)(float)op2->__anon1.i;
2280 else if(op2->kind == 3)
2281 *value2 = (float)(float)op2->__anon1.ui;
2282 else if(op2->kind == 4 && op2->type->isSigned)
2283 *value2 = (float)(float)op2->__anon1.i64;
2284 else if(op2->kind == 4)
2285 *value2 = (float)(float)op2->__anon1.ui64;
2286 else if(op2->kind == 23 && op2->type->isSigned)
2287 *value2 = (float)(float)op2->__anon1.i64;
2288 else if(op2->kind == 23)
2289 *value2 = (float)(float)op2->__anon1.ui64;
2290 else if(op2->kind == 22 && op2->type->isSigned)
2291 *value2 = (float)(float)op2->__anon1.i64;
2292 else if(op2->kind == 22)
2293 *value2 = (float)(float)op2->__anon1.ui64;
2294 else if(op2->kind == 2 && op2->type->isSigned)
2295 *value2 = (float)(float)op2->__anon1.s;
2296 else if(op2->kind == 2)
2297 *value2 = (float)(float)op2->__anon1.us;
2298 else if(op2->kind == 1 && op2->type->isSigned)
2299 *value2 = (float)(float)op2->__anon1.c;
2300 else if(op2->kind == 24 || op2->kind == 1)
2301 *value2 = (float)(float)op2->__anon1.uc;
2302 else if(op2->kind == 6)
2303 *value2 = (float)op2->__anon1.f;
2304 else if(op2->kind == 7)
2305 *value2 = (float)op2->__anon1.d;
2306 else if(op2->kind == 13)
2307 *value2 = (float)(float)op2->__anon1.ui64;
2313 unsigned int GetFloat(struct Expression * exp, float * value2)
2315 struct Operand op2 = GetOperand(exp);
2317 return GetOpFloat(&op2, value2);
2320 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2322 if(op2->kind == 3 && op2->type->isSigned)
2323 *value2 = (double)(double)op2->__anon1.i;
2324 else if(op2->kind == 3)
2325 *value2 = (double)(double)op2->__anon1.ui;
2326 else if(op2->kind == 4 && op2->type->isSigned)
2327 *value2 = (double)(double)op2->__anon1.i64;
2328 else if(op2->kind == 4)
2329 *value2 = (double)(double)op2->__anon1.ui64;
2330 else if(op2->kind == 23 && op2->type->isSigned)
2331 *value2 = (double)(double)op2->__anon1.i64;
2332 else if(op2->kind == 23)
2333 *value2 = (double)(double)op2->__anon1.ui64;
2334 else if(op2->kind == 22 && op2->type->isSigned)
2335 *value2 = (double)(double)op2->__anon1.i64;
2336 else if(op2->kind == 22)
2337 *value2 = (double)(double)op2->__anon1.ui64;
2338 else if(op2->kind == 2 && op2->type->isSigned)
2339 *value2 = (double)(double)op2->__anon1.s;
2340 else if(op2->kind == 2)
2341 *value2 = (double)(double)op2->__anon1.us;
2342 else if(op2->kind == 1 && op2->type->isSigned)
2343 *value2 = (double)(double)op2->__anon1.c;
2344 else if(op2->kind == 24 || op2->kind == 1)
2345 *value2 = (double)(double)op2->__anon1.uc;
2346 else if(op2->kind == 6)
2347 *value2 = (double)op2->__anon1.f;
2348 else if(op2->kind == 7)
2349 *value2 = (double)op2->__anon1.d;
2350 else if(op2->kind == 13)
2351 *value2 = (double)(double)op2->__anon1.ui64;
2357 unsigned int GetDouble(struct Expression * exp, double * value2)
2359 struct Operand op2 = GetOperand(exp);
2361 return GetOpDouble(&op2, value2);
2364 void ComputeExpression(struct Expression * exp);
2366 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class);
2368 extern int targetBits;
2370 int ComputeTypeSize(struct Type * type);
2372 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
2374 struct __ecereNameSpace__ecere__com__BitMember
2376 struct __ecereNameSpace__ecere__com__BitMember * prev;
2377 struct __ecereNameSpace__ecere__com__BitMember * next;
2379 unsigned int isProperty;
2382 struct __ecereNameSpace__ecere__com__Class * _class;
2383 const char * dataTypeString;
2384 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
2385 struct Type * dataType;
2390 } __attribute__ ((gcc_struct));
2392 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldLink;
2394 struct __ecereNameSpace__ecere__sys__OldLink
2396 struct __ecereNameSpace__ecere__sys__OldLink * prev;
2397 struct __ecereNameSpace__ecere__sys__OldLink * next;
2399 } __attribute__ ((gcc_struct));
2401 void FinishTemplatesContext(struct Context * context);
2403 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
2405 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2406 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2408 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))
2410 int unionMemberOffset = 0;
2415 member->memberOffset = 0;
2416 if(targetBits < sizeof(void *) * 8)
2417 member->structAlignment = 0;
2419 else if(targetBits < sizeof(void *) * 8)
2420 _class->structAlignment = 0;
2421 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
2422 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
2423 if(!member && _class->destructionWatchOffset)
2424 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2426 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2428 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2430 if(!dataMember->isProperty)
2432 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
2434 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
2440 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2442 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2444 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
2446 if(!isMember && _class->type == 2 && dataMember->dataType)
2448 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
2452 ComputeTypeSize(dataMember->dataType);
2453 if(bitMember->pos == -1)
2454 bitMember->pos = _class->memberOffset;
2455 if(!bitMember->size)
2456 bitMember->size = dataMember->dataType->size * 8;
2457 _class->memberOffset = bitMember->pos + bitMember->size;
2458 for(d = 0; d < bitMember->size; d++)
2464 bitMember->mask = mask << bitMember->pos;
2466 else if(dataMember->type == 0 && dataMember->dataType)
2471 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)))
2472 ComputeTypeSize(dataMember->dataType);
2473 if(dataMember->dataType->bitFieldCount)
2475 bitFields += dataMember->dataType->bitFieldCount;
2482 int size = (bitFields + 7) / 8;
2486 int __simpleStruct0;
2490 int __simpleStruct0;
2492 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2493 if(member->memberOffset % alignment)
2494 member->memberOffset += alignment - (member->memberOffset % alignment);
2496 dataMember->offset = member->memberOffset;
2497 if(member->type == 1)
2498 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2501 member->memberOffset += size;
2508 int __simpleStruct0;
2510 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2511 if(_class->memberOffset % alignment)
2512 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2514 dataMember->offset = _class->memberOffset;
2515 _class->memberOffset += size;
2519 size = dataMember->dataType->size;
2520 alignment = dataMember->dataType->alignment;
2524 int __simpleStruct0;
2528 int __simpleStruct0;
2530 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2531 if(member->memberOffset % alignment)
2532 member->memberOffset += alignment - (member->memberOffset % alignment);
2534 dataMember->offset = member->memberOffset;
2535 if(member->type == 1)
2536 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2539 member->memberOffset += size;
2546 int __simpleStruct0;
2548 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2549 if(_class->memberOffset % alignment)
2550 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2552 dataMember->offset = _class->memberOffset;
2553 _class->memberOffset += size;
2560 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 0x1);
2561 alignment = dataMember->structAlignment;
2564 int __simpleStruct0;
2568 int __simpleStruct0;
2570 if(member->memberOffset % alignment)
2571 member->memberOffset += alignment - (member->memberOffset % alignment);
2572 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2574 dataMember->offset = member->memberOffset;
2575 if(member->type == 1)
2576 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2578 member->memberOffset += dataMember->memberOffset;
2584 int __simpleStruct0;
2586 if(_class->memberOffset % alignment)
2587 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2588 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2590 dataMember->offset = _class->memberOffset;
2591 _class->memberOffset += dataMember->memberOffset;
2599 int size = (bitFields + 7) / 8;
2603 int __simpleStruct0;
2607 int __simpleStruct0;
2609 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2610 if(member->memberOffset % alignment)
2611 member->memberOffset += alignment - (member->memberOffset % alignment);
2613 if(member->type == 1)
2614 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2617 member->memberOffset += size;
2624 int __simpleStruct0;
2626 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2627 if(_class->memberOffset % alignment)
2628 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2630 _class->memberOffset += size;
2635 if(member && member->type == 1)
2637 member->memberOffset = unionMemberOffset;
2641 if(_class->type != 2)
2645 if(_class->structAlignment)
2647 if(_class->memberOffset % _class->structAlignment)
2648 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
2650 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
2653 struct __ecereNameSpace__ecere__com__Property * prop;
2655 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
2657 if(prop->isProperty && prop->isWatchable)
2659 prop->watcherOffset = _class->structSize;
2660 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2665 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
2667 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
2669 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
2671 if(deriv->computeSize)
2673 deriv->offset = _class->structSize;
2674 deriv->memberOffset = 0;
2675 deriv->structSize = deriv->offset;
2676 ComputeClassMembers(deriv, 0x0);
2684 FinishTemplatesContext(context);
2687 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
2689 struct __ecereNameSpace__ecere__com__NameSpace
2692 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
2693 struct __ecereNameSpace__ecere__com__NameSpace * left;
2694 struct __ecereNameSpace__ecere__com__NameSpace * right;
2696 struct __ecereNameSpace__ecere__com__NameSpace * parent;
2697 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
2698 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
2699 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
2700 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
2701 } __attribute__ ((gcc_struct));
2703 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2705 struct __ecereNameSpace__ecere__com__Module
2707 struct __ecereNameSpace__ecere__com__Instance * application;
2708 struct __ecereNameSpace__ecere__sys__OldList classes;
2709 struct __ecereNameSpace__ecere__sys__OldList defines;
2710 struct __ecereNameSpace__ecere__sys__OldList functions;
2711 struct __ecereNameSpace__ecere__sys__OldList modules;
2712 struct __ecereNameSpace__ecere__com__Instance * prev;
2713 struct __ecereNameSpace__ecere__com__Instance * next;
2719 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
2720 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
2721 } __attribute__ ((gcc_struct));
2723 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
2725 struct __ecereNameSpace__ecere__com__Class * _class;
2726 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
2728 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
2729 ComputeModuleClasses(subModule->data);
2730 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes.first; _class; _class = _class->next)
2731 ComputeClassMembers(_class, 0x0);
2734 extern unsigned int inCompiler;
2736 extern void Compiler_Error(const char * format, ...);
2738 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
2740 int ComputeTypeSize(struct Type * type)
2742 unsigned int size = type ? type->size : 0;
2744 if(!size && type && !type->computing)
2746 type->computing = 0x1;
2750 type->alignment = size = sizeof(char);
2753 type->alignment = size = sizeof(char);
2756 type->alignment = size = sizeof(int);
2759 type->alignment = size = sizeof(long long);
2762 type->alignment = size = targetBits / 8;
2765 type->alignment = size = targetBits / 8;
2768 type->alignment = size = sizeof(long);
2771 type->alignment = size = sizeof(short);
2774 type->alignment = size = sizeof(float);
2777 type->alignment = size = sizeof(double);
2781 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
2783 if(_class && _class->type == 1)
2785 ComputeClassMembers(_class, 0x0);
2786 type->alignment = _class->structAlignment;
2787 size = _class->structSize;
2788 if(type->alignment && size % type->alignment)
2789 size += type->alignment - (size % type->alignment);
2791 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
2793 if(!_class->dataType)
2794 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
2795 size = type->alignment = ComputeTypeSize(_class->dataType);
2798 size = type->alignment = targetBits / 8;
2803 size = type->alignment = targetBits / 8;
2806 if(type->__anon1.__anon4.arraySizeExp)
2808 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
2809 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
2810 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)))
2812 struct Location oldLoc = yylloc;
2813 char expression[10240];
2815 expression[0] = '\0';
2816 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
2817 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
2819 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
2820 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
2823 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
2825 else if(type->__anon1.__anon4.enumClass)
2827 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
2829 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
2832 type->__anon1.__anon4.arraySize = 0;
2836 type->__anon1.__anon4.arraySize = 0;
2838 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
2839 if(type->__anon1.type)
2840 type->alignment = type->__anon1.type->alignment;
2844 struct Type * member;
2846 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2848 int __simpleStruct0, __simpleStruct1;
2849 unsigned int addSize = ComputeTypeSize(member);
2851 member->offset = size;
2852 if(member->alignment && size % member->alignment)
2853 member->offset += member->alignment - (size % member->alignment);
2854 size = member->offset;
2855 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2858 if(type->alignment && size % type->alignment)
2859 size += type->alignment - (size % type->alignment);
2864 struct Type * member;
2866 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2868 int __simpleStruct0, __simpleStruct1;
2869 unsigned int addSize = ComputeTypeSize(member);
2871 member->offset = size;
2872 if(member->alignment && size % member->alignment)
2873 member->offset += member->alignment - (size % member->alignment);
2874 size = member->offset;
2875 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2876 size = ((size > addSize) ? size : addSize);
2878 if(type->alignment && size % type->alignment)
2879 size += type->alignment - (size % type->alignment);
2884 struct TemplateParameter * param = type->__anon1.templateParameter;
2885 struct Type * baseType = ProcessTemplateParameterType(param);
2889 size = ComputeTypeSize(baseType);
2890 type->alignment = baseType->alignment;
2893 type->alignment = size = sizeof(uint64);
2898 type->alignment = size = sizeof(enum
2906 type->alignment = size = targetBits / 8;
2911 type->computing = 0x0;
2916 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
2918 extern struct Identifier * MkIdentifier(const char * string);
2920 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
2922 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
2924 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
2926 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
2928 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class);
2930 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams);
2932 extern void FreeType(struct Type * type);
2934 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
2936 extern struct Specifier * MkSpecifier(int specifier);
2938 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
2940 extern struct Expression * MkExpConstant(const char * string);
2942 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)
2944 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2945 unsigned int totalSize = 0;
2946 unsigned int maxSize = 0;
2949 struct __ecereNameSpace__ecere__com__DataMember * member;
2951 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2954 *addedPadding = 0x0;
2955 if(!isMember && _class->base)
2957 maxSize = _class->structSize;
2959 if(_class->type == 1 || _class->type == 5)
2960 AddMembers(declarations, _class->base, 0x0, &totalSize, topClass, (((void *)0)));
2963 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
2965 if(maxSize > baseSize)
2966 maxSize -= baseSize;
2972 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
2974 if(!member->isProperty)
2976 switch(member->type)
2980 if(member->dataTypeString)
2982 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
2983 struct Declarator * decl;
2985 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
2986 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
2987 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
2988 if(!member->dataType)
2989 member->dataType = ProcessType(specs, decl);
2990 ReplaceThisClassSpecifiers(specs, topClass);
2992 struct Type * type = ProcessType(specs, decl);
2994 DeclareType(member->dataType, 0x0, 0x0);
2997 ComputeTypeSize(member->dataType);
2998 size = member->dataType->size;
2999 alignment = member->dataType->alignment;
3002 if(totalSize % alignment)
3003 totalSize += alignment - (totalSize % alignment);
3012 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
3015 sprintf(id, "__anon%d", anonID++);
3017 AddMembers(list, (struct __ecereNameSpace__ecere__com__Class *)member, 0x1, &size, topClass, (((void *)0)));
3018 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
3019 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
3020 alignment = member->structAlignment;
3023 if(totalSize % alignment)
3024 totalSize += alignment - (totalSize % alignment);
3034 unsigned int __simpleStruct0;
3036 if(topMember && topMember->type == 1)
3037 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
3039 *retSize += totalSize;
3041 else if(totalSize < maxSize && _class->type != 1000)
3043 int autoPadding = 0;
3045 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
3046 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
3047 if(totalSize + autoPadding < maxSize)
3049 char sizeString[50];
3051 sprintf(sizeString, "%d", maxSize - totalSize);
3052 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
3054 *addedPadding = 0x1;
3058 FinishTemplatesContext(context);
3059 return topMember ? topMember->memberID : _class->memberID;
3062 static int DeclareMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
3064 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
3065 struct __ecereNameSpace__ecere__com__DataMember * member;
3066 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
3068 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
3069 DeclareMembers(_class->base, 0x0);
3070 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
3072 if(!member->isProperty)
3074 switch(member->type)
3078 if(!member->dataType && member->dataTypeString)
3079 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
3080 if(member->dataType)
3081 DeclareType(member->dataType, 0x0, 0x0);
3087 DeclareMembers((struct __ecereNameSpace__ecere__com__Class *)member, 0x1);
3094 FinishTemplatesContext(context);
3095 return topMember ? topMember->memberID : _class->memberID;
3098 extern struct Identifier * GetDeclId(struct Declarator * decl);
3100 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
3102 struct ClassDef * def;
3105 for(def = (*definitions).first; def; def = def->next)
3109 struct Declaration * decl = def->__anon1.decl;
3111 if(decl && decl->__anon1.__anon1.specifiers)
3113 struct Specifier * spec;
3114 unsigned int isStruct = 0x0;
3116 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3118 if(spec->type == 3 || spec->type == 4)
3120 if(spec->__anon1.__anon2.definitions)
3121 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3127 struct Declarator * d = (((void *)0));
3129 if(decl->__anon1.__anon1.declarators)
3131 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
3133 struct Identifier * idDecl = GetDeclId(d);
3143 sprintf(id, "__anon%d", anonID++);
3144 if(!decl->__anon1.__anon1.declarators)
3145 decl->__anon1.__anon1.declarators = MkList();
3146 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
3154 extern struct Symbol * FindClass(const char * name);
3156 extern char * strchr(const char * , int);
3158 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
3160 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
3162 extern void FreeClassDef(struct ClassDef * def);
3164 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
3166 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
3168 extern void MangleClassName(char * className);
3170 extern void DeclareClass(struct Symbol * classSym, const char * className);
3172 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move(struct __ecereNameSpace__ecere__sys__OldList * this, void * item, void * prevItem);
3174 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
3176 void DeclareStruct(const char * name, unsigned int skipNoHead)
3178 struct External * external = (((void *)0));
3179 struct Symbol * classSym = FindClass(name);
3181 if(!inCompiler || !classSym)
3183 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
3185 if(classSym->__anon1.registered && classSym->imported && !classSym->declaredStructSym)
3187 struct Declaration * decl;
3188 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3189 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
3190 char structName[1024];
3191 struct Specifier * spec = (((void *)0));
3193 external = (classSym->__anon1.registered && classSym->__anon1.registered->type == 1) ? classSym->__anon2.__anon1.pointerExternal : classSym->__anon2.__anon1.structExternal;
3194 classSym->declaring++;
3195 if(strchr(classSym->string, '<'))
3197 if(classSym->__anon1.registered->templateClass)
3199 DeclareStruct(classSym->__anon1.registered->templateClass->fullName, skipNoHead);
3200 classSym->declaring--;
3204 DeclareMembers(classSym->__anon1.registered, 0x0);
3205 structName[0] = (char)0;
3206 FullClassNameCat(structName, name, 0x0);
3207 if(external && external->__anon1.declaration && external->__anon1.declaration->__anon1.__anon1.specifiers)
3209 for(spec = (*external->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3211 if(spec->type == 3 || spec->type == 4)
3215 if(!skipNoHead && (!spec || !spec->__anon1.__anon2.definitions))
3217 unsigned int addedPadding = 0x0;
3219 classSym->declaredStructSym = 0x1;
3220 declarations = MkList();
3221 AddMembers(declarations, classSym->__anon1.registered, 0x0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
3222 if(!(*declarations).count || ((*declarations).count == 1 && addedPadding))
3224 FreeList(declarations, FreeClassDef);
3225 declarations = (((void *)0));
3228 if(skipNoHead || declarations)
3233 spec->__anon1.__anon2.definitions = declarations;
3234 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3236 if(classSym->__anon2.__anon1.structExternal)
3237 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3238 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3239 classSym->id = curExternal->symbol->idCode;
3240 classSym->idCode = curExternal->symbol->idCode;
3246 external = MkExternalDeclaration((((void *)0)));
3247 specifiers = MkList();
3248 declarators = MkList();
3249 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
3250 external->__anon1.declaration = decl = MkDeclaration(specifiers, declarators);
3251 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
3252 decl->symbol->__anon2.__anon1.pointerExternal = external;
3253 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3255 char className[1024];
3257 strcpy(className, "__ecereClass_");
3258 FullClassNameCat(className, classSym->string, 0x1);
3259 MangleClassName(className);
3260 DeclareClass(classSym, className);
3261 external->symbol = classSym;
3262 classSym->__anon2.__anon1.pointerExternal = external;
3263 classSym->id = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3264 classSym->idCode = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3268 char className[1024];
3270 strcpy(className, "__ecereClass_");
3271 FullClassNameCat(className, classSym->string, 0x1);
3272 MangleClassName(className);
3273 classSym->__anon2.__anon1.structExternal = external;
3274 DeclareClass(classSym, className);
3275 external->symbol = classSym;
3277 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
3280 classSym->declaring--;
3284 if(classSym->__anon2.__anon1.structExternal && classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
3286 struct Specifier * spec;
3288 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3290 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3293 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3295 classSym->declaring++;
3297 if(classSym->__anon1.registered)
3298 DeclareMembers(classSym->__anon1.registered, 0x0);
3300 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 1 || classSym->__anon1.registered->type == 5))
3302 if(classSym->__anon2.__anon1.structExternal)
3303 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3304 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3305 classSym->id = curExternal->symbol->idCode;
3306 classSym->idCode = curExternal->symbol->idCode;
3308 classSym->declaring--;
3313 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
3315 extern struct ModuleImport * mainModule;
3317 extern struct Specifier * MkSpecifierName(const char * name);
3319 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
3321 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
3323 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
3325 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
3327 extern void FreeDeclarator(struct Declarator * decl);
3329 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
3331 struct PropertyImport
3333 struct PropertyImport * prev;
3334 struct PropertyImport * next;
3336 unsigned int isVirtual;
3337 unsigned int hasSet;
3338 unsigned int hasGet;
3339 } __attribute__ ((gcc_struct));
3341 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
3343 void DeclareProperty(struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
3345 struct Symbol * symbol = prop->symbol;
3347 strcpy(setName, "__ecereProp_");
3348 FullClassNameCat(setName, prop->_class->fullName, 0x0);
3349 strcat(setName, "_Set_");
3350 FullClassNameCat(setName, prop->name, 0x1);
3351 MangleClassName(setName);
3352 strcpy(getName, "__ecereProp_");
3353 FullClassNameCat(getName, prop->_class->fullName, 0x0);
3354 strcat(getName, "_Get_");
3355 FullClassNameCat(getName, prop->name, 0x1);
3356 MangleClassName(getName);
3357 if(prop->_class->type == 1)
3358 DeclareStruct(prop->_class->fullName, 0x0);
3359 if(!symbol || curExternal->symbol->idCode < symbol->id)
3361 unsigned int imported = 0x0;
3362 unsigned int dllImport = 0x0;
3364 if(!symbol || symbol->_import)
3368 struct Symbol * classSym;
3370 if(!prop->_class->symbol)
3371 prop->_class->symbol = FindClass(prop->_class->fullName);
3372 classSym = prop->_class->symbol;
3373 if(classSym && !classSym->_import)
3375 struct ModuleImport * module;
3377 if(prop->_class->module)
3378 module = FindModule(prop->_class->module);
3380 module = mainModule;
3381 classSym->_import = __extension__ ({
3382 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
3384 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
3386 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
3388 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
3389 symbol->_import = (struct ClassImport *)__extension__ ({
3390 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
3392 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0x0, __ecereInstance1->hasSet = prop->Set ? 0x1 : 0x0, __ecereInstance1->hasGet = prop->Get ? 0x1 : 0x0, __ecereInstance1;
3395 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
3398 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)
3403 struct Context * context = SetupTemplatesContext(prop->_class);
3405 symbol->type = ProcessTypeString(prop->dataTypeString, 0x0);
3406 FinishTemplatesContext(context);
3410 if(!symbol->__anon2.__anon2.externalGet || symbol->__anon2.__anon2.externalGet->type == 0)
3412 struct Declaration * decl;
3413 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3414 struct Declarator * d;
3415 struct __ecereNameSpace__ecere__sys__OldList * params;
3416 struct Specifier * spec;
3417 struct External * external;
3418 struct Declarator * typeDecl;
3419 unsigned int simple = 0x0;
3421 specifiers = MkList();
3422 declarators = MkList();
3424 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3425 d = MkDeclaratorIdentifier(MkIdentifier(getName));
3427 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3429 struct Context * context = SetupTemplatesContext(prop->_class);
3431 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
3432 FinishTemplatesContext(context);
3434 for(spec = (*specifiers).first; spec; spec = spec->next)
3438 if((!typeDecl || typeDecl->type == 1))
3440 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3442 symbol->_class = classSym->__anon1.registered;
3443 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3445 DeclareStruct(spec->__anon1.__anon1.name, 0x0);
3452 d = PlugDeclarator(typeDecl, d);
3455 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
3456 specifiers = MkList();
3458 d = MkDeclaratorFunction(d, params);
3460 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3461 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3462 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3464 ListAdd(specifiers, MkSpecifier(VOID));
3465 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3466 decl = MkDeclaration(specifiers, declarators);
3467 external = MkExternalDeclaration(decl);
3468 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3469 external->symbol = symbol;
3470 symbol->__anon2.__anon2.externalGet = external;
3471 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3473 FreeDeclarator(typeDecl);
3477 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalGet, curExternal->prev);
3482 if(!symbol->__anon2.__anon2.externalSet || symbol->__anon2.__anon2.externalSet->type == 0)
3484 struct Declaration * decl;
3485 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3486 struct Declarator * d;
3487 struct __ecereNameSpace__ecere__sys__OldList * params;
3488 struct Specifier * spec;
3489 struct External * external;
3490 struct Declarator * typeDecl;
3492 declarators = MkList();
3494 if(!prop->conversion || prop->_class->type == 1)
3496 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3498 specifiers = MkList();
3500 struct Context * context = SetupTemplatesContext(prop->_class);
3502 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
3503 FinishTemplatesContext(context);
3505 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
3506 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
3507 ListAdd(params, MkTypeName(specifiers, d));
3508 d = MkDeclaratorIdentifier(MkIdentifier(setName));
3510 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3511 d = MkDeclaratorFunction(d, params);
3512 for(spec = (*specifiers).first; spec; spec = spec->next)
3516 if((!typeDecl || typeDecl->type == 1))
3518 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3520 symbol->_class = classSym->__anon1.registered;
3521 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3522 DeclareStruct(spec->__anon1.__anon1.name, 0x0);
3526 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3527 specifiers = MkList();
3529 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3530 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3531 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3532 if(!prop->conversion || prop->_class->type == 1)
3533 ListAdd(specifiers, MkSpecifier(VOID));
3535 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
3536 decl = MkDeclaration(specifiers, declarators);
3537 external = MkExternalDeclaration(decl);
3538 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3539 external->symbol = symbol;
3540 symbol->__anon2.__anon2.externalSet = external;
3541 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3545 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalSet, curExternal->prev);
3548 if(!symbol->__anon2.__anon2.externalPtr)
3550 struct Declaration * decl;
3551 struct External * external;
3552 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
3553 char propName[1024];
3556 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3558 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3559 ListAdd(specifiers, MkSpecifierName("Property"));
3560 strcpy(propName, "__ecereProp_");
3561 FullClassNameCat(propName, prop->_class->fullName, 0x0);
3562 strcat(propName, "_");
3563 FullClassNameCat(propName, prop->name, 0x1);
3564 MangleClassName(propName);
3566 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
3568 ListAdd(list, MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(propName))), (((void *)0))));
3571 strcpy(propName, "__ecerePropM_");
3572 FullClassNameCat(propName, prop->_class->fullName, 0x0);
3573 strcat(propName, "_");
3574 FullClassNameCat(propName, prop->name, 0x1);
3575 MangleClassName(propName);
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 = 0x0;
3661 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
3662 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
3663 unsigned int freeType = 0x0;
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, 0x0);
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, 0x0);
3792 if(type->kind == 8 && constant)
3793 type->constant = 0x1;
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 = 0x1;
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));
3819 char templateString[1024];
3820 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
3822 sprintf(templateString, "%s<", expClass->templateClass->fullName);
3823 for(cClass = expClass; cClass; cClass = cClass->base)
3827 if(cClass->templateClass)
3828 cClass = cClass->templateClass;
3829 for(param = cClass->templateParams.first; param; param = param->next)
3832 struct __ecereNameSpace__ecere__com__Class * sClass;
3833 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
3835 for(sClass = cClass->base; sClass; sClass = sClass->base)
3837 if(sClass->templateClass)
3838 sClass = sClass->templateClass;
3839 id += sClass->templateParams.count;
3841 arg = expClass->templateArgs[id];
3842 for(sClass = _class; sClass; sClass = sClass->base)
3844 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
3846 struct __ecereNameSpace__ecere__com__Class * nextClass;
3848 if(sClass->templateClass)
3849 sClass = sClass->templateClass;
3850 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
3852 if(nextClass->templateClass)
3853 nextClass = nextClass->templateClass;
3854 p += nextClass->templateParams.count;
3856 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
3858 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
3860 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3862 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
3863 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
3877 char expString[1024];
3878 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
3879 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
3880 struct Expression * exp;
3881 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
3883 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
3884 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3885 ProcessExpressionType(exp);
3886 ComputeExpression(exp);
3887 expString[0] = '\0';
3888 PrintExpression(exp, expString);
3889 strcat(argument, expString);
3890 FreeExpression(exp);
3895 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
3900 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3901 strcat(argument, arg.__anon1.__anon1.dataTypeString);
3908 strcat(templateString, ", ");
3909 if(lastParam != p - 1)
3911 strcat(templateString, param->name);
3912 strcat(templateString, " = ");
3914 strcat(templateString, argument);
3923 int len = strlen(templateString);
3925 if(templateString[len - 1] == '<')
3929 if(templateString[len - 1] == '>')
3930 templateString[len++] = ' ';
3931 templateString[len++] = '>';
3933 templateString[len++] = '\0';
3936 struct Context * context = SetupTemplatesContext(_class);
3940 type = ProcessTypeString(templateString, 0x0);
3942 FinishTemplatesContext(context);
3945 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
3947 ProcessExpressionType(member->initializer->__anon1.exp);
3948 if(!member->initializer->__anon1.exp->expType)
3952 char expString[10240];
3954 expString[0] = '\0';
3955 PrintExpression(member->initializer->__anon1.exp, expString);
3956 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
3957 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
3960 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 0x1, 0x1, 0x0, 0x0, 0x1))
3962 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
3965 else if(member->initializer)
3967 ProcessInitializer(member->initializer, type);
3974 if(_class && _class->type == 3)
3976 if(member->initializer)
3978 struct Type * type = MkClassType(_class->fullName);
3980 ProcessInitializer(member->initializer, type);
3986 if(member->initializer)
3988 ProcessInitializer(member->initializer, (((void *)0)));
3994 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
3998 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
4000 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
4004 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
4009 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);
4011 extern void FreeSpecifier(struct Specifier * spec);
4013 static void ProcessFunction(struct FunctionDefinition * function);
4015 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
4017 extern struct Specifier * CopySpecifier(struct Specifier * spec);
4019 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
4021 extern void FreeClassFunction(struct ClassFunction * func);
4023 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
4025 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
4027 void ProcessInstantiationType(struct Instantiation * inst)
4032 struct MembersInit * members;
4033 struct Symbol * classSym;
4034 struct __ecereNameSpace__ecere__com__Class * _class;
4036 classSym = inst->_class->__anon1.__anon1.symbol;
4037 _class = classSym ? classSym->__anon1.registered : (((void *)0));
4038 if(!_class || _class->type != 5)
4039 DeclareStruct(inst->_class->__anon1.__anon1.name, 0x0);
4040 afterExternal = afterExternal ? afterExternal : curExternal;
4042 ProcessExpressionType(inst->exp);
4043 inst->isConstant = 0x1;
4046 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
4047 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
4048 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
4049 int subMemberStackPos = 0;
4051 for(members = (*inst->members).first; members; members = members->next)
4053 switch(members->type)
4058 static unsigned int instMethodID = 0;
4059 struct External * external = curExternal;
4060 struct Context * context = curContext;
4061 struct Declarator * declarator = members->__anon1.function->declarator;
4062 struct Identifier * nameID = GetDeclId(declarator);
4063 char * unmangled = nameID ? nameID->string : (((void *)0));
4064 struct Expression * exp;
4065 struct External * createdExternal = (((void *)0));
4071 strcpy(name, "__ecereInstMeth_");
4072 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0x0);
4074 strcat(name, nameID->string);
4076 sprintf(number, "_%08d", instMethodID++);
4077 strcat(name, number);
4078 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
4082 struct Symbol * symbol = declarator->symbol;
4083 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
4085 if(method && method->type == 1)
4087 symbol->__anon1.method = method;
4088 ProcessMethodType(method);
4089 if(!symbol->type->__anon1.__anon2.thisClass)
4091 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
4093 if(!currentClass->symbol)
4094 currentClass->symbol = FindClass(currentClass->fullName);
4095 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
4100 _class->symbol = FindClass(_class->fullName);
4101 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
4104 DeclareType(symbol->type, 0x1, 0x1);
4108 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
4111 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 0x1);
4114 FreeSpecifier(nameID->_class);
4115 nameID->_class = (((void *)0));
4119 struct External * oldExternal = curExternal;
4121 declarator->symbol->id = declarator->symbol->idCode = curExternal->symbol->idCode;
4123 struct External * externalDecl;
4125 externalDecl = MkExternalDeclaration((((void *)0)));
4126 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), oldExternal->prev, externalDecl);
4127 if(createdExternal->__anon1.function)
4129 ProcessFunction(createdExternal->__anon1.function);
4131 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(declarator), (((void *)0)))));
4133 externalDecl->__anon1.declaration = decl;
4134 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
4135 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4136 declarator->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4143 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
4144 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
4146 curExternal = external;
4147 curContext = context;
4150 FreeClassFunction(members->__anon1.function);
4151 exp = QMkExpId(name);
4153 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
4154 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
4160 if(members->__anon1.dataMembers && classSym)
4162 struct MemberInit * member;
4163 struct Location oldyyloc = yylloc;
4165 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
4167 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
4168 if(member->initializer && !member->initializer->isConstant)
4169 inst->isConstant = 0x0;
4181 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams)
4185 if(type->kind == 11)
4187 struct Type * param;
4191 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
4192 DeclareType(param, declarePointers, 0x1);
4194 DeclareType(type->__anon1.__anon2.returnType, declarePointers, 0x1);
4196 else if(type->kind == 13 && declarePointers)
4197 DeclareType(type->__anon1.type, declarePointers, 0x0);
4198 else if(type->kind == 8)
4200 if(type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 1 || type->__anon1._class->__anon1.registered->type == 5) && !type->__anon1._class->declaring)
4201 DeclareStruct(type->__anon1._class->__anon1.registered->fullName, type->__anon1._class->__anon1.registered->type == 5);
4203 else if(type->kind == 9 || type->kind == 10)
4205 struct Type * member;
4207 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
4208 DeclareType(member, 0x0, 0x0);
4210 else if(type->kind == 12)
4211 DeclareType(type->__anon1.__anon4.arrayType, declarePointers, 0x0);
4215 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
4217 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
4219 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
4221 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
4222 struct __ecereNameSpace__ecere__com__Class * sClass;
4224 for(sClass = _class; sClass; sClass = sClass->base)
4227 if(sClass->templateClass)
4228 sClass = sClass->templateClass;
4229 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
4231 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
4233 for(sClass = sClass->base; sClass; sClass = sClass->base)
4235 if(sClass->templateClass)
4236 sClass = sClass->templateClass;
4237 id += sClass->templateParams.count;
4248 arg = &_class->templateArgs[id];
4249 if(arg && param->type == 0)
4250 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
4255 extern struct Context * PushContext(void);
4257 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
4259 struct TemplatedType
4262 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4263 struct __ecereNameSpace__ecere__sys__BTNode * left;
4264 struct __ecereNameSpace__ecere__sys__BTNode * right;
4266 struct TemplateParameter * param;
4267 } __attribute__ ((gcc_struct));
4269 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
4271 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
4273 struct Context * context = PushContext();
4275 context->templateTypesOnly = 0x1;
4276 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
4278 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
4280 for(; param; param = param->next)
4282 if(param->type == 0 && param->identifier)
4284 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
4286 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4292 struct __ecereNameSpace__ecere__com__Class * sClass;
4294 for(sClass = _class; sClass; sClass = sClass->base)
4296 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
4298 for(p = sClass->templateParams.first; p; p = p->next)
4302 struct TemplateParameter * param = p->param;
4303 struct TemplatedType * type;
4307 p->param = param = __extension__ ({
4308 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
4310 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
4313 type = __extension__ ({
4314 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
4316 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
4318 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4326 extern void PopContext(struct Context * ctx);
4328 extern void FreeContext(struct Context * context);
4330 void FinishTemplatesContext(struct Context * context)
4332 PopContext(context);
4333 FreeContext(context);
4334 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
4337 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
4339 if(!method->dataType)
4341 struct Context * context = SetupTemplatesContext(method->_class);
4343 method->dataType = ProcessTypeString(method->dataTypeString, 0x0);
4344 FinishTemplatesContext(context);
4345 if(method->type != 1 && method->dataType)
4347 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
4349 if(!method->_class->symbol)
4350 method->_class->symbol = FindClass(method->_class->fullName);
4351 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
4357 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
4361 struct Context * context = SetupTemplatesContext(prop->_class);
4363 prop->dataType = ProcessTypeString(prop->dataTypeString, 0x0);
4364 FinishTemplatesContext(context);
4368 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
4370 extern void FreeTypeName(struct TypeName * typeName);
4372 static void ProcessDeclarator(struct Declarator * decl);
4374 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
4376 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
4380 struct MethodImport * prev;
4381 struct MethodImport * next;
4383 unsigned int isVirtual;
4384 } __attribute__ ((gcc_struct));
4386 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
4388 void DeclareMethod(struct __ecereNameSpace__ecere__com__Method * method, const char * name)
4390 struct Symbol * symbol = method->symbol;
4392 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && method->type == 1) || symbol->id > (curExternal ? curExternal->symbol->idCode : -1))
4394 unsigned int imported = 0x0;
4395 unsigned int dllImport = 0x0;
4397 if(!method->dataType)
4398 method->dataType = ProcessTypeString(method->dataTypeString, 0x0);
4399 if(!symbol || symbol->_import || method->type == 1)
4401 if(!symbol || method->type == 1)
4403 struct Symbol * classSym;
4405 if(!method->_class->symbol)
4406 method->_class->symbol = FindClass(method->_class->fullName);
4407 classSym = method->_class->symbol;
4408 if(!classSym->_import)
4410 struct ModuleImport * module;
4412 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + structSize_Instance)))->name)
4413 module = FindModule(method->_class->module);
4415 module = mainModule;
4416 classSym->_import = __extension__ ({
4417 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
4419 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
4421 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
4425 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4427 if(!symbol->_import)
4429 symbol->_import = (struct ClassImport *)__extension__ ({
4430 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
4432 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
4434 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
4438 symbol->type = method->dataType;
4440 symbol->type->refCount++;
4443 if(!method->dataType->dllExport)
4446 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)
4450 if(method->type != 1 && method->dataType)
4451 DeclareType(method->dataType, 0x1, 0x1);
4452 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4454 struct Declaration * decl;
4455 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4456 struct Declarator * d;
4457 struct Declarator * funcDecl;
4458 struct External * external;
4460 specifiers = MkList();
4461 declarators = MkList();
4463 ListAdd(specifiers, MkSpecifier(EXTERN));
4464 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
4465 ListAdd(specifiers, MkSpecifier(STATIC));
4466 if(method->type == 1)
4468 ListAdd(specifiers, MkSpecifier(INT));
4469 d = MkDeclaratorIdentifier(MkIdentifier(name));
4473 d = MkDeclaratorIdentifier(MkIdentifier(name));
4475 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4477 struct Context * context = SetupTemplatesContext(method->_class);
4479 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
4480 FinishTemplatesContext(context);
4482 funcDecl = GetFuncDecl(d);
4485 struct Specifier * spec, * next;
4487 for(spec = (*specifiers).first; spec; spec = next)
4492 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4493 FreeSpecifier(spec);
4497 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
4499 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
4501 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
4502 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")));
4503 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
4504 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
4506 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
4508 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
4510 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
4511 FreeTypeName(param);
4513 if(!funcDecl->__anon1.function.parameters)
4514 funcDecl->__anon1.function.parameters = MkList();
4515 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
4519 ProcessDeclarator(d);
4520 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4521 decl = MkDeclaration(specifiers, declarators);
4522 ReplaceThisClassSpecifiers(specifiers, method->_class);
4523 if(symbol->__anon2.__anon1.pointerExternal)
4525 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4528 *functionSymbol = *symbol;
4529 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4530 if(functionSymbol->type)
4531 functionSymbol->type->refCount++;
4533 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4534 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4536 external = MkExternalDeclaration(decl);
4538 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
4539 external->symbol = symbol;
4540 symbol->__anon2.__anon1.pointerExternal = external;
4544 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4546 symbol->id = curExternal ? curExternal->symbol->idCode : (((int)0x7fffffff));
4550 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
4552 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4554 unsigned int first = 0x1;
4556 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4558 char className[1024];
4560 strcpy(className, _class->fullName);
4561 for(param = _class->templateParams.first; param; param = param->next)
4565 strcat(className, "<");
4567 strcat(className, ", ");
4568 if(lastParam + 1 != p)
4570 strcat(className, param->name);
4571 strcat(className, " = ");
4573 strcat(className, param->name);
4581 int len = strlen(className);
4583 if(className[len - 1] == '>')
4584 className[len++] = ' ';
4585 className[len++] = '>';
4586 className[len++] = '\0';
4588 return __ecereNameSpace__ecere__sys__CopyString(className);
4591 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
4594 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
4596 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4598 unsigned int first = 0x1;
4600 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4602 char className[1024];
4604 strcpy(className, _class->fullName);
4605 for(param = _class->templateParams.first; param; param = param->next)
4609 strcat(className, "<");
4611 strcat(className, ", ");
4612 if(lastParam + 1 != p)
4614 strcat(className, param->name);
4615 strcat(className, " = ");
4617 strcat(className, param->name);
4625 int len = strlen(className);
4627 if(className[len - 1] == '>')
4628 className[len++] = ' ';
4629 className[len++] = '>';
4630 className[len++] = '\0';
4632 return MkClassType(className);
4636 return 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 = 0x0;
4691 unsigned int dllImport = 0x0;
4693 if(!function->dataType)
4695 function->dataType = ProcessTypeString(function->dataTypeString, 0x0);
4696 if(!function->dataType->__anon1.__anon2.thisClass)
4697 function->dataType->__anon1.__anon2.staticMethod = 0x1;
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, 0x0);
4720 if(!symbol->type->__anon1.__anon2.thisClass)
4721 symbol->type->__anon1.__anon2.staticMethod = 0x1;
4724 imported = symbol->_import ? 0x1 : 0x0;
4725 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1)
4728 DeclareType(function->dataType, 0x1, 0x1);
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) ? 0x1 : 0x0;
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, 0x0);
4831 DeclareType(data->dataType, 0x1, 0x1);
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 = 0x1;
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, 0x1);
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, 0x0);
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")) ? 0x1 : 0x0, convert->dataType->kind == 8, 0x0, 0x1, 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 = 0x1, 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 = 0x0;
5048 if(!convert->dataType)
5049 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
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->refCount++;
5061 ptrType->constant = 0x1;
5063 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, 0x0, 0x0, 0x1, warnConst))
5065 if(!conversions && !convert->Set)
5067 else if(conversions != (((void *)0)))
5069 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))
5073 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
5075 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
5083 FreeType(constType);
5087 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5089 if(!dest->__anon1._class->__anon1.registered->dataType)
5090 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5091 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
5093 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, dest->__anon1._class->__anon1.registered->dataType->kind == 8, 0x0, 0x0, warnConst))
5100 if(source->kind == 8)
5102 struct __ecereNameSpace__ecere__com__Class * _class;
5104 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5106 struct __ecereNameSpace__ecere__com__Property * convert;
5108 for(convert = _class->conversions.first; convert; convert = convert->next)
5110 if(convert->memberAccess == 1 || _class->module == privateModule)
5112 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5114 if(!convert->dataType)
5115 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
5116 if(convert->dataType != source && (!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), convert->dataType->kind == 8, convert->dataType->kind == 8, 0x0, 0x1, warnConst))
5118 if(!conversions && !convert->Get)
5120 else if(conversions != (((void *)0)))
5122 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))
5126 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 0x1, conv);
5128 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5136 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
5138 if(!source->__anon1._class->__anon1.registered->dataType)
5139 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5140 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
5142 if(MatchTypes(source->__anon1._class->__anon1.registered->dataType, dest, conversions, (((void *)0)), (((void *)0)), source->__anon1._class->__anon1.registered->dataType->kind == 8, source->__anon1._class->__anon1.registered->dataType->kind == 8, 0x0, 0x0, warnConst))
5144 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0, warnConst))
5150 if(source->kind == 8 || source->kind == 19)
5152 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
5154 else if(dest->kind == 7 && source->kind == 6)
5156 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
5158 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
5160 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
5162 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
5164 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
5166 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))
5168 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))
5170 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)))
5172 struct Type * paramSource, * paramDest;
5174 if(dest->kind == 16)
5175 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
5176 if(source->kind == 16)
5177 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
5178 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
5179 dest = dest->__anon1.type;
5180 if(source->kind == 13 && source->__anon1.type->kind == 11)
5181 source = source->__anon1.type;
5182 if(dest->kind == 16)
5183 dest = dest->__anon1.__anon3.method->dataType;
5184 if(source->kind == 16)
5185 source = source->__anon1.__anon3.method->dataType;
5186 paramSource = source->__anon1.__anon2.params.first;
5187 if(paramSource && paramSource->kind == 0)
5188 paramSource = (((void *)0));
5189 paramDest = dest->__anon1.__anon2.params.first;
5190 if(paramDest && paramDest->kind == 0)
5191 paramDest = (((void *)0));
5192 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5194 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))))
5196 if(paramDest && paramDest->kind == 8)
5197 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
5199 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
5202 paramDest = paramDest->next;
5204 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
5206 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5208 if(dest->__anon1.__anon2.thisClass)
5210 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
5212 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5218 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
5221 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
5223 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
5227 paramSource = paramSource->next;
5231 if(dest->__anon1.__anon2.thisClass)
5233 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
5235 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5241 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
5243 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
5249 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5251 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
5255 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 0x1);
5256 for(; paramDest; paramDest = paramDest->next)
5260 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
5264 struct Type * paramDestType = paramDest;
5265 struct Type * paramSourceType = paramSource;
5266 struct Type * type = paramDestType;
5268 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
5271 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
5272 struct __ecereNameSpace__ecere__com__Class * sClass;
5274 for(sClass = owningClassSource; sClass; sClass = sClass->base)
5277 if(sClass->templateClass)
5278 sClass = sClass->templateClass;
5279 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
5281 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
5283 for(sClass = sClass->base; sClass; sClass = sClass->base)
5285 if(sClass->templateClass)
5286 sClass = sClass->templateClass;
5287 id += sClass->templateParams.count;
5298 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
5300 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
5303 if(!MatchTypes(paramDestType, paramSourceType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst) && (!acceptReversedParams || !MatchTypes(paramSourceType, paramDestType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst)))
5308 PrintType(paramDest, type, 0x0, 0x1);
5309 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
5310 if(paramDestType != paramDest)
5311 FreeType(paramDestType);
5314 if(paramDestType != paramDest)
5315 FreeType(paramDestType);
5317 paramSource = paramSource->next;
5321 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
5326 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
5330 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
5332 if(MatchTypes(source->__anon1.type, dest->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5339 static void FreeConvert(struct Conversion * convert)
5341 if(convert->resultType)
5342 FreeType(convert->resultType);
5345 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BTNamedLink;
5347 struct __ecereNameSpace__ecere__com__BTNamedLink
5350 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
5351 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
5352 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
5355 } __attribute__ ((gcc_struct));
5357 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__EnumClassData;
5359 struct __ecereNameSpace__ecere__com__EnumClassData
5361 struct __ecereNameSpace__ecere__sys__OldList values;
5363 } __attribute__ ((gcc_struct));
5365 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink;
5367 struct __ecereNameSpace__ecere__sys__NamedLink
5369 struct __ecereNameSpace__ecere__sys__NamedLink * prev;
5370 struct __ecereNameSpace__ecere__sys__NamedLink * next;
5373 } __attribute__ ((gcc_struct));
5375 extern void FreeExpContents(struct Expression * exp);
5377 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
5379 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
5381 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
5383 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
5385 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
5387 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5389 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
5391 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)))
5393 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
5395 if(_class->type == 4)
5397 struct __ecereNameSpace__ecere__sys__OldList converts =
5401 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5405 _class->symbol = FindClass(_class->fullName);
5406 type->__anon1._class = _class->symbol;
5407 if(MatchTypes(type, dest, &converts, (((void *)0)), (((void *)0)), 0x1, 0x0, 0x0, 0x0, 0x0))
5409 struct __ecereNameSpace__ecere__sys__NamedLink * value;
5410 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5414 struct __ecereNameSpace__ecere__com__Class * baseClass;
5416 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
5418 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
5420 for(value = e->values.first; value; value = value->next)
5422 if(!strcmp(value->name, string))
5427 FreeExpContents(sourceExp);
5428 FreeType(sourceExp->expType);
5429 sourceExp->isConstant = 0x1;
5430 sourceExp->expType = MkClassType(baseClass->fullName);
5434 sourceExp->type = 2;
5435 if(!strcmp(baseClass->dataTypeString, "int"))
5436 sprintf(constant, "%d", (int)value->data);
5438 sprintf(constant, "0x%X", (int)value->data);
5439 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5441 while(converts.first)
5443 struct Conversion * convert = converts.first;
5445 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
5446 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
5448 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5455 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
5456 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5459 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)))
5460 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
5465 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SubModule;
5467 struct __ecereNameSpace__ecere__com__SubModule
5469 struct __ecereNameSpace__ecere__com__SubModule * prev;
5470 struct __ecereNameSpace__ecere__com__SubModule * next;
5471 struct __ecereNameSpace__ecere__com__Instance * module;
5473 } __attribute__ ((gcc_struct));
5475 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
5477 struct __ecereNameSpace__ecere__com__SubModule * subModule;
5479 if(searchFor == searchIn)
5481 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
5483 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->application)
5485 if(ModuleVisibility(subModule->module, searchFor))
5492 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
5494 struct __ecereNameSpace__ecere__com__Application
5497 const char * * argv;
5499 unsigned int isGUIApp;
5500 struct __ecereNameSpace__ecere__sys__OldList allModules;
5501 char * parsedCommand;
5502 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
5503 } __attribute__ ((gcc_struct));
5505 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5507 struct __ecereNameSpace__ecere__com__Instance * module;
5509 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))
5511 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))
5513 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))
5515 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)
5517 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
5523 extern struct Expression * CopyExpression(struct Expression * exp);
5525 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
5527 void ReadString(char * output, char * string);
5529 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
5531 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
5533 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
5535 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
5537 struct Type * source;
5538 struct Type * realDest = dest;
5539 struct Type * backupSourceExpType = (((void *)0));
5540 struct Expression * computedExp = sourceExp;
5543 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)
5545 computedExp = CopyExpression(sourceExp);
5546 ComputeExpression(computedExp);
5548 source = sourceExp->expType;
5549 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
5551 if(computedExp != sourceExp)
5553 FreeExpression(computedExp);
5554 computedExp = sourceExp;
5559 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
5561 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
5563 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
5565 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
5567 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
5569 if(sourceBase == destBase)
5571 if(computedExp != sourceExp)
5573 FreeExpression(computedExp);
5574 computedExp = sourceExp;
5583 struct __ecereNameSpace__ecere__sys__OldList * specs;
5584 unsigned int flag = 0x0;
5585 long long value = (((int)0x7fffffff));
5588 if(computedExp->type == 2)
5590 if(source->isSigned)
5591 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5593 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5595 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
5597 if(source->isSigned)
5598 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5600 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5602 if(computedExp != sourceExp)
5604 FreeExpression(computedExp);
5605 computedExp = sourceExp;
5607 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"))
5610 source = __extension__ ({
5611 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5613 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0x0, __ecereInstance1->refCount = 1, __ecereInstance1;
5618 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5620 if(_class && _class->type == 3)
5622 if(source->kind != 8)
5624 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5625 struct Type * tempDest, * tempSource;
5627 for(; _class->base->type != 1000; _class = _class->base)
5630 tempDest = tempType;
5633 _class->symbol = FindClass(_class->fullName);
5634 tempType->__anon1._class = _class->symbol;
5635 tempType->truth = dest->truth;
5636 if(tempType->__anon1._class)
5637 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
5638 backupSourceExpType = sourceExp->expType;
5639 sourceExp->expType = dest;
5642 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5645 if(_class && _class->type == 2 && source->kind != 8)
5647 if(!dest->__anon1._class->__anon1.registered->dataType)
5648 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5649 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5652 FreeType(sourceExp->expType);
5653 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
5657 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
5659 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
5660 struct Declarator * decl;
5663 ReadString(string, sourceExp->__anon1.__anon2.string);
5664 decl = SpecDeclFromString(string, specs, (((void *)0)));
5665 FreeExpContents(sourceExp);
5666 FreeType(sourceExp->expType);
5667 sourceExp->type = 24;
5668 sourceExp->__anon1._classExp.specifiers = specs;
5669 sourceExp->__anon1._classExp.decl = decl;
5670 sourceExp->expType = dest;
5674 if(backupSourceExpType)
5675 FreeType(backupSourceExpType);
5679 else if(source->kind == 8)
5681 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
5683 if(_class && (_class->type == 3 || _class->type == 2))
5687 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5688 struct Type * tempDest, * tempSource;
5690 if(!source->__anon1._class->__anon1.registered->dataType)
5691 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5692 for(; _class->base->type != 1000; _class = _class->base)
5695 tempSource = tempType;
5697 tempType->__anon1._class = FindClass(_class->fullName);
5698 tempType->truth = source->truth;
5699 tempType->classObjectType = source->classObjectType;
5700 if(tempType->__anon1._class)
5701 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
5702 if(conversions->last)
5704 ((struct Conversion *)conversions->last)->resultType = dest;
5707 FreeType(sourceExp->expType);
5708 sourceExp->expType = MkClassType(_class->fullName);
5709 sourceExp->expType->truth = source->truth;
5710 sourceExp->expType->classObjectType = source->classObjectType;
5711 if(!sourceExp->destType)
5713 FreeType(sourceExp->destType);
5714 sourceExp->destType = sourceExp->expType;
5715 if(sourceExp->expType)
5716 sourceExp->expType->refCount++;
5718 if(!_class->dataType)
5719 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
5721 dest = MkClassType(source->__anon1._class->string);
5722 dest->truth = source->truth;
5723 dest->classObjectType = source->classObjectType;
5725 source = _class->dataType;
5727 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5733 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5742 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5743 unsigned int fittingValue = 0x0;
5745 if(_class && _class->type == 4)
5747 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5748 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5750 if(c && value >= 0 && value <= c->largest)
5753 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
5755 if(_class->type == 0 || _class->type == 5)
5757 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5759 *newExp = *sourceExp;
5760 if(sourceExp->destType)
5761 sourceExp->destType->refCount++;
5762 if(sourceExp->expType)
5763 sourceExp->expType->refCount++;
5764 sourceExp->type = 11;
5765 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
5766 sourceExp->__anon1.cast.exp = newExp;
5767 FreeType(sourceExp->expType);
5768 sourceExp->expType = (((void *)0));
5769 ProcessExpressionType(sourceExp);
5772 FreeType(sourceExp->expType);
5773 sourceExp->expType = dest;
5778 if(backupSourceExpType)
5779 FreeType(backupSourceExpType);
5782 if(!_class->dataType)
5783 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
5785 dest = _class->dataType;
5788 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))
5790 specs = MkListOne(MkSpecifier(DOUBLE));
5792 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))
5794 specs = MkListOne(MkSpecifier(FLOAT));
5796 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))
5800 ListAdd(specs, MkSpecifier(UNSIGNED));
5801 ListAdd(specs, MkSpecifier(INT64));
5803 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
5807 ListAdd(specs, MkSpecifier(UNSIGNED));
5808 ListAdd(specs, MkSpecifier(INT));
5810 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5814 ListAdd(specs, MkSpecifier(UNSIGNED));
5815 ListAdd(specs, MkSpecifier(SHORT));
5817 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5821 ListAdd(specs, MkSpecifier(UNSIGNED));
5822 ListAdd(specs, MkSpecifier(CHAR));
5828 if(backupSourceExpType)
5830 if(sourceExp->expType)
5831 FreeType(sourceExp->expType);
5832 sourceExp->expType = backupSourceExpType;
5837 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))
5839 specs = MkListOne(MkSpecifier(DOUBLE));
5841 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))
5843 specs = MkListOne(MkSpecifier(FLOAT));
5845 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
5848 ListAdd(specs, MkSpecifier(BOOL));
5850 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)))
5854 ListAdd(specs, MkSpecifier(UNSIGNED));
5855 ListAdd(specs, MkSpecifier(CHAR));
5857 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)))))
5861 ListAdd(specs, MkSpecifier(UNSIGNED));
5862 ListAdd(specs, MkSpecifier(SHORT));
5864 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
5868 ListAdd(specs, MkSpecifier(UNSIGNED));
5869 ListAdd(specs, MkSpecifier(INT));
5871 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
5875 ListAdd(specs, MkSpecifier(UNSIGNED));
5876 ListAdd(specs, MkSpecifier(INT64));
5878 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5880 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
5886 if(backupSourceExpType)
5888 if(sourceExp->expType)
5889 FreeType(sourceExp->expType);
5890 sourceExp->expType = backupSourceExpType;
5894 if(!flag && !sourceExp->opDestType)
5896 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5898 *newExp = *sourceExp;
5899 newExp->prev = (((void *)0));
5900 newExp->next = (((void *)0));
5901 if(sourceExp->destType)
5902 sourceExp->destType->refCount++;
5903 if(sourceExp->expType)
5904 sourceExp->expType->refCount++;
5905 sourceExp->type = 11;
5906 if(realDest->kind == 8)
5908 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
5909 FreeList(specs, FreeSpecifier);
5912 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
5913 if(newExp->type == 4)
5915 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
5918 sourceExp->__anon1.cast.exp = newExp;
5919 FreeType(sourceExp->expType);
5920 sourceExp->expType = (((void *)0));
5921 ProcessExpressionType(sourceExp);
5924 FreeList(specs, FreeSpecifier);
5927 if(backupSourceExpType)
5928 FreeType(backupSourceExpType);
5933 if(computedExp != sourceExp)
5935 FreeExpression(computedExp);
5936 computedExp = sourceExp;
5938 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
5939 sourceExp = (*sourceExp->__anon1.list).last;
5940 if(sourceExp->type == 0)
5942 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
5946 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5948 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
5949 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5953 for(; _class && _class->type == 4; _class = _class->base)
5955 struct __ecereNameSpace__ecere__sys__NamedLink * value;
5956 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5958 for(value = e->values.first; value; value = value->next)
5960 if(!strcmp(value->name, id->string))
5965 FreeExpContents(sourceExp);
5966 FreeType(sourceExp->expType);
5967 sourceExp->isConstant = 0x1;
5968 sourceExp->expType = MkClassType(_class->fullName);
5972 sourceExp->type = 2;
5973 if(_class->dataTypeString && !strcmp(_class->dataTypeString, "int"))
5974 sprintf(constant, "%d", (int)value->data);
5976 sprintf(constant, "0x%X", (int)value->data);
5977 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5986 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
5997 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5999 int value2 = op2->__anon1.i;
6002 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
6005 exp->expType = op1->type;
6007 op1->type->refCount++;
6012 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6014 unsigned int value2 = op2->__anon1.ui;
6017 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
6020 exp->expType = op1->type;
6022 op1->type->refCount++;
6027 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6029 long long value2 = op2->__anon1.i64;
6032 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
6035 exp->expType = op1->type;
6037 op1->type->refCount++;
6042 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6044 uint64 value2 = op2->__anon1.ui64;
6047 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
6050 exp->expType = op1->type;
6052 op1->type->refCount++;
6057 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6059 short value2 = op2->__anon1.s;
6062 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
6065 exp->expType = op1->type;
6067 op1->type->refCount++;
6072 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6074 unsigned short value2 = op2->__anon1.us;
6077 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
6080 exp->expType = op1->type;
6082 op1->type->refCount++;
6087 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6089 char value2 = op2->__anon1.c;
6092 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
6095 exp->expType = op1->type;
6097 op1->type->refCount++;
6102 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6104 unsigned char value2 = op2->__anon1.uc;
6107 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
6110 exp->expType = op1->type;
6112 op1->type->refCount++;
6117 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6119 float value2 = op2->__anon1.f;
6122 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
6125 exp->expType = op1->type;
6127 op1->type->refCount++;
6132 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6134 double value2 = op2->__anon1.d;
6137 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
6140 exp->expType = op1->type;
6142 op1->type->refCount++;
6147 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6149 int value2 = op2->__anon1.i;
6152 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
6155 exp->expType = op1->type;
6157 op1->type->refCount++;
6162 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6164 unsigned int value2 = op2->__anon1.ui;
6167 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
6170 exp->expType = op1->type;
6172 op1->type->refCount++;
6177 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6179 long long value2 = op2->__anon1.i64;
6182 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
6185 exp->expType = op1->type;
6187 op1->type->refCount++;
6192 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6194 uint64 value2 = op2->__anon1.ui64;
6197 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
6200 exp->expType = op1->type;
6202 op1->type->refCount++;
6207 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6209 short value2 = op2->__anon1.s;
6212 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
6215 exp->expType = op1->type;
6217 op1->type->refCount++;
6222 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6224 unsigned short value2 = op2->__anon1.us;
6227 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
6230 exp->expType = op1->type;
6232 op1->type->refCount++;
6237 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6239 char value2 = op2->__anon1.c;
6242 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
6245 exp->expType = op1->type;
6247 op1->type->refCount++;
6252 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6254 unsigned char value2 = op2->__anon1.uc;
6257 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
6260 exp->expType = op1->type;
6262 op1->type->refCount++;
6267 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6269 float value2 = op2->__anon1.f;
6272 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
6275 exp->expType = op1->type;
6277 op1->type->refCount++;
6282 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6284 double value2 = op2->__anon1.d;
6287 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
6290 exp->expType = op1->type;
6292 op1->type->refCount++;
6297 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6299 int value2 = op2->__anon1.i;
6302 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
6305 exp->expType = op1->type;
6307 op1->type->refCount++;
6312 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6314 unsigned int value2 = op2->__anon1.ui;
6317 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
6320 exp->expType = op1->type;
6322 op1->type->refCount++;
6327 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6329 long long value2 = op2->__anon1.i64;
6332 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
6335 exp->expType = op1->type;
6337 op1->type->refCount++;
6342 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6344 uint64 value2 = op2->__anon1.ui64;
6347 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
6350 exp->expType = op1->type;
6352 op1->type->refCount++;
6357 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6359 short value2 = op2->__anon1.s;
6362 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
6365 exp->expType = op1->type;
6367 op1->type->refCount++;
6372 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6374 unsigned short value2 = op2->__anon1.us;
6377 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
6380 exp->expType = op1->type;
6382 op1->type->refCount++;
6387 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6389 char value2 = op2->__anon1.c;
6392 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
6395 exp->expType = op1->type;
6397 op1->type->refCount++;
6402 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6404 unsigned char value2 = op2->__anon1.uc;
6407 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
6410 exp->expType = op1->type;
6412 op1->type->refCount++;
6417 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6419 float value2 = op2->__anon1.f;
6422 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
6425 exp->expType = op1->type;
6427 op1->type->refCount++;
6432 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6434 double value2 = op2->__anon1.d;
6437 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
6440 exp->expType = op1->type;
6442 op1->type->refCount++;
6447 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6449 int value2 = op2->__anon1.i;
6452 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
6455 exp->expType = op1->type;
6457 op1->type->refCount++;
6462 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6464 unsigned int value2 = op2->__anon1.ui;
6467 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
6470 exp->expType = op1->type;
6472 op1->type->refCount++;
6477 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6479 long long value2 = op2->__anon1.i64;
6482 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
6485 exp->expType = op1->type;
6487 op1->type->refCount++;
6492 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6494 uint64 value2 = op2->__anon1.ui64;
6497 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
6500 exp->expType = op1->type;
6502 op1->type->refCount++;
6507 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6509 short value2 = op2->__anon1.s;
6512 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
6515 exp->expType = op1->type;
6517 op1->type->refCount++;
6522 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6524 unsigned short value2 = op2->__anon1.us;
6527 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
6530 exp->expType = op1->type;
6532 op1->type->refCount++;
6537 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6539 char value2 = op2->__anon1.c;
6542 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
6545 exp->expType = op1->type;
6547 op1->type->refCount++;
6552 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6554 unsigned char value2 = op2->__anon1.uc;
6557 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
6560 exp->expType = op1->type;
6562 op1->type->refCount++;
6567 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6569 float value2 = op2->__anon1.f;
6572 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
6575 exp->expType = op1->type;
6577 op1->type->refCount++;
6582 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6584 double value2 = op2->__anon1.d;
6587 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
6590 exp->expType = op1->type;
6592 op1->type->refCount++;
6597 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6599 int value2 = op2->__anon1.i;
6602 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
6605 exp->expType = op1->type;
6607 op1->type->refCount++;
6612 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6614 unsigned int value2 = op2->__anon1.ui;
6617 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
6620 exp->expType = op1->type;
6622 op1->type->refCount++;
6627 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6629 long long value2 = op2->__anon1.i64;
6632 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
6635 exp->expType = op1->type;
6637 op1->type->refCount++;
6642 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6644 uint64 value2 = op2->__anon1.ui64;
6647 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
6650 exp->expType = op1->type;
6652 op1->type->refCount++;
6657 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6659 short value2 = op2->__anon1.s;
6662 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
6665 exp->expType = op1->type;
6667 op1->type->refCount++;
6672 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6674 unsigned short value2 = op2->__anon1.us;
6677 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
6680 exp->expType = op1->type;
6682 op1->type->refCount++;
6687 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6689 char value2 = op2->__anon1.c;
6692 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
6695 exp->expType = op1->type;
6697 op1->type->refCount++;
6702 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6704 unsigned char value2 = op2->__anon1.uc;
6707 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
6710 exp->expType = op1->type;
6712 op1->type->refCount++;
6717 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
6720 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
6723 exp->expType = op1->type;
6725 op1->type->refCount++;
6730 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
6733 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
6736 exp->expType = op1->type;
6738 op1->type->refCount++;
6743 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
6746 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
6749 exp->expType = op1->type;
6751 op1->type->refCount++;
6756 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
6759 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
6762 exp->expType = op1->type;
6764 op1->type->refCount++;
6769 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
6772 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
6775 exp->expType = op1->type;
6777 op1->type->refCount++;
6782 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
6785 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
6788 exp->expType = op1->type;
6790 op1->type->refCount++;
6795 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
6798 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
6801 exp->expType = op1->type;
6803 op1->type->refCount++;
6808 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
6811 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
6814 exp->expType = op1->type;
6816 op1->type->refCount++;
6821 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
6824 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
6827 exp->expType = op1->type;
6829 op1->type->refCount++;
6834 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
6837 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
6840 exp->expType = op1->type;
6842 op1->type->refCount++;
6847 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
6850 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
6853 exp->expType = op1->type;
6855 op1->type->refCount++;
6860 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
6863 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
6866 exp->expType = op1->type;
6868 op1->type->refCount++;
6873 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
6876 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
6879 exp->expType = op1->type;
6881 op1->type->refCount++;
6886 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
6889 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
6892 exp->expType = op1->type;
6894 op1->type->refCount++;
6899 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
6902 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
6905 exp->expType = op1->type;
6907 op1->type->refCount++;
6912 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
6915 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
6918 exp->expType = op1->type;
6920 op1->type->refCount++;
6925 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
6928 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
6931 exp->expType = op1->type;
6933 op1->type->refCount++;
6938 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
6941 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
6944 exp->expType = op1->type;
6946 op1->type->refCount++;
6951 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
6954 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
6957 exp->expType = op1->type;
6959 op1->type->refCount++;
6964 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
6967 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
6970 exp->expType = op1->type;
6972 op1->type->refCount++;
6977 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
6980 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
6983 exp->expType = op1->type;
6985 op1->type->refCount++;
6990 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
6993 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
6996 exp->expType = op1->type;
6998 op1->type->refCount++;
7003 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
7006 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
7009 exp->expType = op1->type;
7011 op1->type->refCount++;
7016 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
7019 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
7022 exp->expType = op1->type;
7024 op1->type->refCount++;
7029 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
7032 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
7035 exp->expType = op1->type;
7037 op1->type->refCount++;
7042 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
7045 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
7048 exp->expType = op1->type;
7050 op1->type->refCount++;
7055 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
7058 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
7061 exp->expType = op1->type;
7063 op1->type->refCount++;
7068 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
7071 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
7074 exp->expType = op1->type;
7076 op1->type->refCount++;
7081 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
7084 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
7087 exp->expType = op1->type;
7089 op1->type->refCount++;
7094 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
7097 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
7100 exp->expType = op1->type;
7102 op1->type->refCount++;
7107 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7109 int value2 = op2->__anon1.i;
7112 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
7115 exp->expType = op1->type;
7117 op1->type->refCount++;
7122 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7124 unsigned int value2 = op2->__anon1.ui;
7127 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
7130 exp->expType = op1->type;
7132 op1->type->refCount++;
7137 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7139 long long value2 = op2->__anon1.i64;
7142 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
7145 exp->expType = op1->type;
7147 op1->type->refCount++;
7152 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7154 uint64 value2 = op2->__anon1.ui64;
7157 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
7160 exp->expType = op1->type;
7162 op1->type->refCount++;
7167 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7169 short value2 = op2->__anon1.s;
7172 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
7175 exp->expType = op1->type;
7177 op1->type->refCount++;
7182 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7184 unsigned short value2 = op2->__anon1.us;
7187 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
7190 exp->expType = op1->type;
7192 op1->type->refCount++;
7197 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7199 char value2 = op2->__anon1.c;
7202 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
7205 exp->expType = op1->type;
7207 op1->type->refCount++;
7212 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7214 unsigned char value2 = op2->__anon1.uc;
7217 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
7220 exp->expType = op1->type;
7222 op1->type->refCount++;
7227 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7229 float value2 = op2->__anon1.f;
7232 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
7235 exp->expType = op1->type;
7237 op1->type->refCount++;
7242 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7244 double value2 = op2->__anon1.d;
7247 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
7250 exp->expType = op1->type;
7252 op1->type->refCount++;
7257 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7259 int value2 = op2->__anon1.i;
7262 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
7265 exp->expType = op1->type;
7267 op1->type->refCount++;
7272 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7274 unsigned int value2 = op2->__anon1.ui;
7277 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
7280 exp->expType = op1->type;
7282 op1->type->refCount++;
7287 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7289 long long value2 = op2->__anon1.i64;
7292 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
7295 exp->expType = op1->type;
7297 op1->type->refCount++;
7302 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7304 uint64 value2 = op2->__anon1.ui64;
7307 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
7310 exp->expType = op1->type;
7312 op1->type->refCount++;
7317 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7319 short value2 = op2->__anon1.s;
7322 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
7325 exp->expType = op1->type;
7327 op1->type->refCount++;
7332 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7334 unsigned short value2 = op2->__anon1.us;
7337 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
7340 exp->expType = op1->type;
7342 op1->type->refCount++;
7347 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7349 char value2 = op2->__anon1.c;
7352 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
7355 exp->expType = op1->type;
7357 op1->type->refCount++;
7362 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7364 unsigned char value2 = op2->__anon1.uc;
7367 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
7370 exp->expType = op1->type;
7372 op1->type->refCount++;
7377 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7379 float value2 = op2->__anon1.f;
7382 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
7385 exp->expType = op1->type;
7387 op1->type->refCount++;
7392 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7394 double value2 = op2->__anon1.d;
7397 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
7400 exp->expType = op1->type;
7402 op1->type->refCount++;
7407 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7409 int value2 = op2->__anon1.i;
7412 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
7415 exp->expType = op1->type;
7417 op1->type->refCount++;
7422 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7424 unsigned int value2 = op2->__anon1.ui;
7427 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
7430 exp->expType = op1->type;
7432 op1->type->refCount++;
7437 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7439 long long value2 = op2->__anon1.i64;
7442 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
7445 exp->expType = op1->type;
7447 op1->type->refCount++;
7452 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7454 uint64 value2 = op2->__anon1.ui64;
7457 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
7460 exp->expType = op1->type;
7462 op1->type->refCount++;
7467 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7469 short value2 = op2->__anon1.s;
7472 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
7475 exp->expType = op1->type;
7477 op1->type->refCount++;
7482 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7484 unsigned short value2 = op2->__anon1.us;
7487 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
7490 exp->expType = op1->type;
7492 op1->type->refCount++;
7497 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7499 char value2 = op2->__anon1.c;
7502 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
7505 exp->expType = op1->type;
7507 op1->type->refCount++;
7512 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7514 unsigned char value2 = op2->__anon1.uc;
7517 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
7520 exp->expType = op1->type;
7522 op1->type->refCount++;
7527 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7529 float value2 = op2->__anon1.f;
7532 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
7535 exp->expType = op1->type;
7537 op1->type->refCount++;
7542 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7544 double value2 = op2->__anon1.d;
7547 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
7550 exp->expType = op1->type;
7552 op1->type->refCount++;
7557 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7559 int value2 = op2->__anon1.i;
7562 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
7565 exp->expType = op1->type;
7567 op1->type->refCount++;
7572 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7574 unsigned int value2 = op2->__anon1.ui;
7577 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
7580 exp->expType = op1->type;
7582 op1->type->refCount++;
7587 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7589 long long value2 = op2->__anon1.i64;
7592 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
7595 exp->expType = op1->type;
7597 op1->type->refCount++;
7602 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7604 uint64 value2 = op2->__anon1.ui64;
7607 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
7610 exp->expType = op1->type;
7612 op1->type->refCount++;
7617 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7619 short value2 = op2->__anon1.s;
7622 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
7625 exp->expType = op1->type;
7627 op1->type->refCount++;
7632 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7634 unsigned short value2 = op2->__anon1.us;
7637 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
7640 exp->expType = op1->type;
7642 op1->type->refCount++;
7647 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7649 char value2 = op2->__anon1.c;
7652 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
7655 exp->expType = op1->type;
7657 op1->type->refCount++;
7662 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7664 unsigned char value2 = op2->__anon1.uc;
7667 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
7670 exp->expType = op1->type;
7672 op1->type->refCount++;
7677 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7679 float value2 = op2->__anon1.f;
7682 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
7685 exp->expType = op1->type;
7687 op1->type->refCount++;
7692 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7694 double value2 = op2->__anon1.d;
7697 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
7700 exp->expType = op1->type;
7702 op1->type->refCount++;
7707 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7709 int value2 = op2->__anon1.i;
7712 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
7715 exp->expType = op1->type;
7717 op1->type->refCount++;
7722 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7724 unsigned int value2 = op2->__anon1.ui;
7727 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
7730 exp->expType = op1->type;
7732 op1->type->refCount++;
7737 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7739 long long value2 = op2->__anon1.i64;
7742 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
7745 exp->expType = op1->type;
7747 op1->type->refCount++;
7752 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7754 uint64 value2 = op2->__anon1.ui64;
7757 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
7760 exp->expType = op1->type;
7762 op1->type->refCount++;
7767 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7769 short value2 = op2->__anon1.s;
7772 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
7775 exp->expType = op1->type;
7777 op1->type->refCount++;
7782 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7784 unsigned short value2 = op2->__anon1.us;
7787 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
7790 exp->expType = op1->type;
7792 op1->type->refCount++;
7797 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7799 char value2 = op2->__anon1.c;
7802 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
7805 exp->expType = op1->type;
7807 op1->type->refCount++;
7812 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7814 unsigned char value2 = op2->__anon1.uc;
7817 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
7820 exp->expType = op1->type;
7822 op1->type->refCount++;
7827 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7829 float value2 = op2->__anon1.f;
7832 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
7835 exp->expType = op1->type;
7837 op1->type->refCount++;
7842 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7844 double value2 = op2->__anon1.d;
7847 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
7850 exp->expType = op1->type;
7852 op1->type->refCount++;
7857 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7859 int value2 = op2->__anon1.i;
7862 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
7865 exp->expType = op1->type;
7867 op1->type->refCount++;
7872 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7874 unsigned int value2 = op2->__anon1.ui;
7877 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
7880 exp->expType = op1->type;
7882 op1->type->refCount++;
7887 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7889 long long value2 = op2->__anon1.i64;
7892 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
7895 exp->expType = op1->type;
7897 op1->type->refCount++;
7902 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7904 uint64 value2 = op2->__anon1.ui64;
7907 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
7910 exp->expType = op1->type;
7912 op1->type->refCount++;
7917 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7919 short value2 = op2->__anon1.s;
7922 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
7925 exp->expType = op1->type;
7927 op1->type->refCount++;
7932 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7934 unsigned short value2 = op2->__anon1.us;
7937 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
7940 exp->expType = op1->type;
7942 op1->type->refCount++;
7947 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7949 char value2 = op2->__anon1.c;
7952 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
7955 exp->expType = op1->type;
7957 op1->type->refCount++;
7962 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7964 unsigned char value2 = op2->__anon1.uc;
7967 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
7970 exp->expType = op1->type;
7972 op1->type->refCount++;
7977 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7979 int value2 = op2->__anon1.i;
7982 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
7985 exp->expType = op1->type;
7987 op1->type->refCount++;
7992 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7994 unsigned int value2 = op2->__anon1.ui;
7997 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
8000 exp->expType = op1->type;
8002 op1->type->refCount++;
8007 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8009 long long value2 = op2->__anon1.i64;
8012 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
8015 exp->expType = op1->type;
8017 op1->type->refCount++;
8022 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8024 uint64 value2 = op2->__anon1.ui64;
8027 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
8030 exp->expType = op1->type;
8032 op1->type->refCount++;
8037 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8039 short value2 = op2->__anon1.s;
8042 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
8045 exp->expType = op1->type;
8047 op1->type->refCount++;
8052 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8054 unsigned short value2 = op2->__anon1.us;
8057 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
8060 exp->expType = op1->type;
8062 op1->type->refCount++;
8067 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8069 char value2 = op2->__anon1.c;
8072 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
8075 exp->expType = op1->type;
8077 op1->type->refCount++;
8082 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8084 unsigned char value2 = op2->__anon1.uc;
8087 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
8090 exp->expType = op1->type;
8092 op1->type->refCount++;
8097 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8099 int value2 = op2->__anon1.i;
8102 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
8105 exp->expType = op1->type;
8107 op1->type->refCount++;
8112 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8114 unsigned int value2 = op2->__anon1.ui;
8117 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
8120 exp->expType = op1->type;
8122 op1->type->refCount++;
8127 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8129 long long value2 = op2->__anon1.i64;
8132 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
8135 exp->expType = op1->type;
8137 op1->type->refCount++;
8142 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8144 uint64 value2 = op2->__anon1.ui64;
8147 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
8150 exp->expType = op1->type;
8152 op1->type->refCount++;
8157 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8159 short value2 = op2->__anon1.s;
8162 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
8165 exp->expType = op1->type;
8167 op1->type->refCount++;
8172 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8174 unsigned short value2 = op2->__anon1.us;
8177 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
8180 exp->expType = op1->type;
8182 op1->type->refCount++;
8187 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8189 char value2 = op2->__anon1.c;
8192 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
8195 exp->expType = op1->type;
8197 op1->type->refCount++;
8202 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8204 unsigned char value2 = op2->__anon1.uc;
8207 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
8210 exp->expType = op1->type;
8212 op1->type->refCount++;
8217 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8219 int value2 = op2->__anon1.i;
8222 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
8225 exp->expType = op1->type;
8227 op1->type->refCount++;
8232 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8234 unsigned int value2 = op2->__anon1.ui;
8237 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
8240 exp->expType = op1->type;
8242 op1->type->refCount++;
8247 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8249 long long value2 = op2->__anon1.i64;
8252 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
8255 exp->expType = op1->type;
8257 op1->type->refCount++;
8262 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8264 uint64 value2 = op2->__anon1.ui64;
8267 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
8270 exp->expType = op1->type;
8272 op1->type->refCount++;
8277 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8279 short value2 = op2->__anon1.s;
8282 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
8285 exp->expType = op1->type;
8287 op1->type->refCount++;
8292 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8294 unsigned short value2 = op2->__anon1.us;
8297 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
8300 exp->expType = op1->type;
8302 op1->type->refCount++;
8307 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8309 char value2 = op2->__anon1.c;
8312 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
8315 exp->expType = op1->type;
8317 op1->type->refCount++;
8322 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8324 unsigned char value2 = op2->__anon1.uc;
8327 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
8330 exp->expType = op1->type;
8332 op1->type->refCount++;
8337 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8339 int value2 = op2->__anon1.i;
8342 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
8345 exp->expType = op1->type;
8347 op1->type->refCount++;
8352 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8354 unsigned int value2 = op2->__anon1.ui;
8357 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
8360 exp->expType = op1->type;
8362 op1->type->refCount++;
8367 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8369 long long value2 = op2->__anon1.i64;
8372 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
8375 exp->expType = op1->type;
8377 op1->type->refCount++;
8382 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8384 uint64 value2 = op2->__anon1.ui64;
8387 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
8390 exp->expType = op1->type;
8392 op1->type->refCount++;
8397 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8399 short value2 = op2->__anon1.s;
8402 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
8405 exp->expType = op1->type;
8407 op1->type->refCount++;
8412 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8414 unsigned short value2 = op2->__anon1.us;
8417 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
8420 exp->expType = op1->type;
8422 op1->type->refCount++;
8427 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8429 char value2 = op2->__anon1.c;
8432 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
8435 exp->expType = op1->type;
8437 op1->type->refCount++;
8442 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8444 unsigned char value2 = op2->__anon1.uc;
8447 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
8450 exp->expType = op1->type;
8452 op1->type->refCount++;
8457 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8459 int value2 = op2->__anon1.i;
8462 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
8465 exp->expType = op1->type;
8467 op1->type->refCount++;
8472 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8474 unsigned int value2 = op2->__anon1.ui;
8477 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
8480 exp->expType = op1->type;
8482 op1->type->refCount++;
8487 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8489 long long value2 = op2->__anon1.i64;
8492 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
8495 exp->expType = op1->type;
8497 op1->type->refCount++;
8502 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8504 uint64 value2 = op2->__anon1.ui64;
8507 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
8510 exp->expType = op1->type;
8512 op1->type->refCount++;
8517 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8519 short value2 = op2->__anon1.s;
8522 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
8525 exp->expType = op1->type;
8527 op1->type->refCount++;
8532 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8534 unsigned short value2 = op2->__anon1.us;
8537 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
8540 exp->expType = op1->type;
8542 op1->type->refCount++;
8547 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8549 char value2 = op2->__anon1.c;
8552 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
8555 exp->expType = op1->type;
8557 op1->type->refCount++;
8562 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8564 unsigned char value2 = op2->__anon1.uc;
8567 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
8570 exp->expType = op1->type;
8572 op1->type->refCount++;
8577 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
8580 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
8583 exp->expType = op1->type;
8585 op1->type->refCount++;
8590 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
8593 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
8596 exp->expType = op1->type;
8598 op1->type->refCount++;
8603 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
8606 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
8609 exp->expType = op1->type;
8611 op1->type->refCount++;
8616 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
8619 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
8622 exp->expType = op1->type;
8624 op1->type->refCount++;
8629 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
8632 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
8635 exp->expType = op1->type;
8637 op1->type->refCount++;
8642 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
8645 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
8648 exp->expType = op1->type;
8650 op1->type->refCount++;
8655 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
8658 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
8661 exp->expType = op1->type;
8663 op1->type->refCount++;
8668 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
8671 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
8674 exp->expType = op1->type;
8676 op1->type->refCount++;
8681 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8683 int value2 = op2->__anon1.i;
8686 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
8689 exp->expType = op1->type;
8691 op1->type->refCount++;
8696 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8698 unsigned int value2 = op2->__anon1.ui;
8701 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
8704 exp->expType = op1->type;
8706 op1->type->refCount++;
8711 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8713 long long value2 = op2->__anon1.i64;
8716 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
8719 exp->expType = op1->type;
8721 op1->type->refCount++;
8726 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8728 uint64 value2 = op2->__anon1.ui64;
8731 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
8734 exp->expType = op1->type;
8736 op1->type->refCount++;
8741 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8743 short value2 = op2->__anon1.s;
8746 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
8749 exp->expType = op1->type;
8751 op1->type->refCount++;
8756 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8758 unsigned short value2 = op2->__anon1.us;
8761 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
8764 exp->expType = op1->type;
8766 op1->type->refCount++;
8771 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8773 char value2 = op2->__anon1.c;
8776 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
8779 exp->expType = op1->type;
8781 op1->type->refCount++;
8786 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8788 unsigned char value2 = op2->__anon1.uc;
8791 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
8794 exp->expType = op1->type;
8796 op1->type->refCount++;
8801 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8803 int value2 = op2->__anon1.i;
8806 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
8809 exp->expType = op1->type;
8811 op1->type->refCount++;
8816 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8818 unsigned int value2 = op2->__anon1.ui;
8821 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
8824 exp->expType = op1->type;
8826 op1->type->refCount++;
8831 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8833 long long value2 = op2->__anon1.i64;
8836 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
8839 exp->expType = op1->type;
8841 op1->type->refCount++;
8846 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8848 uint64 value2 = op2->__anon1.ui64;
8851 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
8854 exp->expType = op1->type;
8856 op1->type->refCount++;
8861 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8863 short value2 = op2->__anon1.s;
8866 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
8869 exp->expType = op1->type;
8871 op1->type->refCount++;
8876 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8878 unsigned short value2 = op2->__anon1.us;
8881 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
8884 exp->expType = op1->type;
8886 op1->type->refCount++;
8891 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8893 char value2 = op2->__anon1.c;
8896 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
8899 exp->expType = op1->type;
8901 op1->type->refCount++;
8906 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8908 unsigned char value2 = op2->__anon1.uc;
8911 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
8914 exp->expType = op1->type;
8916 op1->type->refCount++;
8921 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8923 int value2 = op2->__anon1.i;
8926 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
8929 exp->expType = op1->type;
8931 op1->type->refCount++;
8936 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8938 unsigned int value2 = op2->__anon1.ui;
8941 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
8944 exp->expType = op1->type;
8946 op1->type->refCount++;
8951 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8953 long long value2 = op2->__anon1.i64;
8956 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
8959 exp->expType = op1->type;
8961 op1->type->refCount++;
8966 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8968 uint64 value2 = op2->__anon1.ui64;
8971 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
8974 exp->expType = op1->type;
8976 op1->type->refCount++;
8981 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8983 short value2 = op2->__anon1.s;
8986 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
8989 exp->expType = op1->type;
8991 op1->type->refCount++;
8996 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8998 unsigned short value2 = op2->__anon1.us;
9001 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
9004 exp->expType = op1->type;
9006 op1->type->refCount++;
9011 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9013 char value2 = op2->__anon1.c;
9016 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
9019 exp->expType = op1->type;
9021 op1->type->refCount++;
9026 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9028 unsigned char value2 = op2->__anon1.uc;
9031 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
9034 exp->expType = op1->type;
9036 op1->type->refCount++;
9041 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9043 int value2 = op2->__anon1.i;
9046 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
9049 exp->expType = op1->type;
9051 op1->type->refCount++;
9056 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9058 unsigned int value2 = op2->__anon1.ui;
9061 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
9064 exp->expType = op1->type;
9066 op1->type->refCount++;
9071 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9073 long long value2 = op2->__anon1.i64;
9076 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
9079 exp->expType = op1->type;
9081 op1->type->refCount++;
9086 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9088 uint64 value2 = op2->__anon1.ui64;
9091 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
9094 exp->expType = op1->type;
9096 op1->type->refCount++;
9101 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9103 short value2 = op2->__anon1.s;
9106 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
9109 exp->expType = op1->type;
9111 op1->type->refCount++;
9116 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9118 unsigned short value2 = op2->__anon1.us;
9121 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
9124 exp->expType = op1->type;
9126 op1->type->refCount++;
9131 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9133 char value2 = op2->__anon1.c;
9136 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
9139 exp->expType = op1->type;
9141 op1->type->refCount++;
9146 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9148 unsigned char value2 = op2->__anon1.uc;
9151 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
9154 exp->expType = op1->type;
9156 op1->type->refCount++;
9161 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9163 int value2 = op2->__anon1.i;
9166 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
9169 exp->expType = op1->type;
9171 op1->type->refCount++;
9176 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9178 unsigned int value2 = op2->__anon1.ui;
9181 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
9184 exp->expType = op1->type;
9186 op1->type->refCount++;
9191 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9193 long long value2 = op2->__anon1.i64;
9196 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
9199 exp->expType = op1->type;
9201 op1->type->refCount++;
9206 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9208 uint64 value2 = op2->__anon1.ui64;
9211 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
9214 exp->expType = op1->type;
9216 op1->type->refCount++;
9221 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9223 short value2 = op2->__anon1.s;
9226 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
9229 exp->expType = op1->type;
9231 op1->type->refCount++;
9236 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9238 unsigned short value2 = op2->__anon1.us;
9241 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
9244 exp->expType = op1->type;
9246 op1->type->refCount++;
9251 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9253 char value2 = op2->__anon1.c;
9256 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
9259 exp->expType = op1->type;
9261 op1->type->refCount++;
9266 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9268 unsigned char value2 = op2->__anon1.uc;
9271 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
9274 exp->expType = op1->type;
9276 op1->type->refCount++;
9281 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
9284 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
9287 exp->expType = op1->type;
9289 op1->type->refCount++;
9294 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
9297 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
9300 exp->expType = op1->type;
9302 op1->type->refCount++;
9307 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
9310 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
9313 exp->expType = op1->type;
9315 op1->type->refCount++;
9320 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
9323 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
9326 exp->expType = op1->type;
9328 op1->type->refCount++;
9333 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
9336 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
9339 exp->expType = op1->type;
9341 op1->type->refCount++;
9346 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
9349 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
9352 exp->expType = op1->type;
9354 op1->type->refCount++;
9359 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
9362 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
9365 exp->expType = op1->type;
9367 op1->type->refCount++;
9372 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
9375 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
9378 exp->expType = op1->type;
9380 op1->type->refCount++;
9385 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9387 int value2 = op2->__anon1.i;
9390 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
9393 exp->expType = op1->type;
9395 op1->type->refCount++;
9400 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9402 unsigned int value2 = op2->__anon1.ui;
9405 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
9408 exp->expType = op1->type;
9410 op1->type->refCount++;
9415 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9417 long long value2 = op2->__anon1.i64;
9420 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
9423 exp->expType = op1->type;
9425 op1->type->refCount++;
9430 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9432 uint64 value2 = op2->__anon1.ui64;
9435 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
9438 exp->expType = op1->type;
9440 op1->type->refCount++;
9445 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9447 short value2 = op2->__anon1.s;
9450 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
9453 exp->expType = op1->type;
9455 op1->type->refCount++;
9460 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9462 unsigned short value2 = op2->__anon1.us;
9465 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
9468 exp->expType = op1->type;
9470 op1->type->refCount++;
9475 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9477 char value2 = op2->__anon1.c;
9480 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
9483 exp->expType = op1->type;
9485 op1->type->refCount++;
9490 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9492 unsigned char value2 = op2->__anon1.uc;
9495 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
9498 exp->expType = op1->type;
9500 op1->type->refCount++;
9505 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9507 float value2 = op2->__anon1.f;
9510 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
9513 exp->expType = op1->type;
9515 op1->type->refCount++;
9520 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9522 double value2 = op2->__anon1.d;
9525 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
9528 exp->expType = op1->type;
9530 op1->type->refCount++;
9535 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9537 int value2 = op2->__anon1.i;
9540 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
9543 exp->expType = op1->type;
9545 op1->type->refCount++;
9550 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9552 unsigned int value2 = op2->__anon1.ui;
9555 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
9558 exp->expType = op1->type;
9560 op1->type->refCount++;
9565 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9567 long long value2 = op2->__anon1.i64;
9570 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
9573 exp->expType = op1->type;
9575 op1->type->refCount++;
9580 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9582 uint64 value2 = op2->__anon1.ui64;
9585 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
9588 exp->expType = op1->type;
9590 op1->type->refCount++;
9595 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9597 short value2 = op2->__anon1.s;
9600 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
9603 exp->expType = op1->type;
9605 op1->type->refCount++;
9610 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9612 unsigned short value2 = op2->__anon1.us;
9615 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
9618 exp->expType = op1->type;
9620 op1->type->refCount++;
9625 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9627 char value2 = op2->__anon1.c;
9630 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
9633 exp->expType = op1->type;
9635 op1->type->refCount++;
9640 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9642 unsigned char value2 = op2->__anon1.uc;
9645 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
9648 exp->expType = op1->type;
9650 op1->type->refCount++;
9655 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9657 float value2 = op2->__anon1.f;
9660 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
9663 exp->expType = op1->type;
9665 op1->type->refCount++;
9670 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9672 double value2 = op2->__anon1.d;
9675 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
9678 exp->expType = op1->type;
9680 op1->type->refCount++;
9685 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9687 int value2 = op2->__anon1.i;
9690 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
9693 exp->expType = op1->type;
9695 op1->type->refCount++;
9700 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9702 unsigned int value2 = op2->__anon1.ui;
9705 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
9708 exp->expType = op1->type;
9710 op1->type->refCount++;
9715 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9717 long long value2 = op2->__anon1.i64;
9720 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
9723 exp->expType = op1->type;
9725 op1->type->refCount++;
9730 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9732 uint64 value2 = op2->__anon1.ui64;
9735 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
9738 exp->expType = op1->type;
9740 op1->type->refCount++;
9745 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9747 short value2 = op2->__anon1.s;
9750 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
9753 exp->expType = op1->type;
9755 op1->type->refCount++;
9760 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9762 unsigned short value2 = op2->__anon1.us;
9765 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
9768 exp->expType = op1->type;
9770 op1->type->refCount++;
9775 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9777 char value2 = op2->__anon1.c;
9780 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
9783 exp->expType = op1->type;
9785 op1->type->refCount++;
9790 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9792 unsigned char value2 = op2->__anon1.uc;
9795 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
9798 exp->expType = op1->type;
9800 op1->type->refCount++;
9805 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9807 float value2 = op2->__anon1.f;
9810 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
9813 exp->expType = op1->type;
9815 op1->type->refCount++;
9820 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9822 double value2 = op2->__anon1.d;
9825 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
9828 exp->expType = op1->type;
9830 op1->type->refCount++;
9835 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9837 int value2 = op2->__anon1.i;
9840 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
9843 exp->expType = op1->type;
9845 op1->type->refCount++;
9850 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9852 unsigned int value2 = op2->__anon1.ui;
9855 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
9858 exp->expType = op1->type;
9860 op1->type->refCount++;
9865 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9867 long long value2 = op2->__anon1.i64;
9870 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
9873 exp->expType = op1->type;
9875 op1->type->refCount++;
9880 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9882 uint64 value2 = op2->__anon1.ui64;
9885 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
9888 exp->expType = op1->type;
9890 op1->type->refCount++;
9895 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9897 short value2 = op2->__anon1.s;
9900 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
9903 exp->expType = op1->type;
9905 op1->type->refCount++;
9910 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9912 unsigned short value2 = op2->__anon1.us;
9915 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
9918 exp->expType = op1->type;
9920 op1->type->refCount++;
9925 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9927 char value2 = op2->__anon1.c;
9930 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
9933 exp->expType = op1->type;
9935 op1->type->refCount++;
9940 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9942 unsigned char value2 = op2->__anon1.uc;
9945 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
9948 exp->expType = op1->type;
9950 op1->type->refCount++;
9955 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9957 float value2 = op2->__anon1.f;
9960 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
9963 exp->expType = op1->type;
9965 op1->type->refCount++;
9970 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9972 double value2 = op2->__anon1.d;
9975 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
9978 exp->expType = op1->type;
9980 op1->type->refCount++;
9985 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9987 int value2 = op2->__anon1.i;
9990 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
9993 exp->expType = op1->type;
9995 op1->type->refCount++;
10000 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10002 unsigned int value2 = op2->__anon1.ui;
10005 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
10008 exp->expType = op1->type;
10010 op1->type->refCount++;
10015 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10017 long long value2 = op2->__anon1.i64;
10020 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
10023 exp->expType = op1->type;
10025 op1->type->refCount++;
10030 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10032 uint64 value2 = op2->__anon1.ui64;
10035 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
10038 exp->expType = op1->type;
10040 op1->type->refCount++;
10045 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10047 short value2 = op2->__anon1.s;
10050 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
10053 exp->expType = op1->type;
10055 op1->type->refCount++;
10060 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10062 unsigned short value2 = op2->__anon1.us;
10065 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
10068 exp->expType = op1->type;
10070 op1->type->refCount++;
10075 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10077 char value2 = op2->__anon1.c;
10080 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
10083 exp->expType = op1->type;
10085 op1->type->refCount++;
10090 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10092 unsigned char value2 = op2->__anon1.uc;
10095 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
10098 exp->expType = op1->type;
10100 op1->type->refCount++;
10105 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10107 float value2 = op2->__anon1.f;
10110 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
10113 exp->expType = op1->type;
10115 op1->type->refCount++;
10120 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10122 double value2 = op2->__anon1.d;
10125 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
10128 exp->expType = op1->type;
10130 op1->type->refCount++;
10135 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10137 int value2 = op2->__anon1.i;
10140 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
10143 exp->expType = op1->type;
10145 op1->type->refCount++;
10150 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10152 unsigned int value2 = op2->__anon1.ui;
10155 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
10158 exp->expType = op1->type;
10160 op1->type->refCount++;
10165 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10167 long long value2 = op2->__anon1.i64;
10170 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
10173 exp->expType = op1->type;
10175 op1->type->refCount++;
10180 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10182 uint64 value2 = op2->__anon1.ui64;
10185 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
10188 exp->expType = op1->type;
10190 op1->type->refCount++;
10195 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10197 short value2 = op2->__anon1.s;
10200 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
10203 exp->expType = op1->type;
10205 op1->type->refCount++;
10210 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10212 unsigned short value2 = op2->__anon1.us;
10215 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
10218 exp->expType = op1->type;
10220 op1->type->refCount++;
10225 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10227 char value2 = op2->__anon1.c;
10230 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
10233 exp->expType = op1->type;
10235 op1->type->refCount++;
10240 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10242 unsigned char value2 = op2->__anon1.uc;
10245 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
10248 exp->expType = op1->type;
10250 op1->type->refCount++;
10255 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10257 float value2 = op2->__anon1.f;
10260 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
10263 exp->expType = op1->type;
10265 op1->type->refCount++;
10270 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10272 double value2 = op2->__anon1.d;
10275 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
10278 exp->expType = op1->type;
10280 op1->type->refCount++;
10285 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10287 int value2 = op2->__anon1.i;
10290 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
10293 exp->expType = op1->type;
10295 op1->type->refCount++;
10300 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10302 unsigned int value2 = op2->__anon1.ui;
10305 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
10308 exp->expType = op1->type;
10310 op1->type->refCount++;
10315 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10317 long long value2 = op2->__anon1.i64;
10320 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
10323 exp->expType = op1->type;
10325 op1->type->refCount++;
10330 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10332 uint64 value2 = op2->__anon1.ui64;
10335 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
10338 exp->expType = op1->type;
10340 op1->type->refCount++;
10345 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10347 short value2 = op2->__anon1.s;
10350 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
10353 exp->expType = op1->type;
10355 op1->type->refCount++;
10360 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10362 unsigned short value2 = op2->__anon1.us;
10365 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
10368 exp->expType = op1->type;
10370 op1->type->refCount++;
10375 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10377 char value2 = op2->__anon1.c;
10380 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
10383 exp->expType = op1->type;
10385 op1->type->refCount++;
10390 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10392 unsigned char value2 = op2->__anon1.uc;
10395 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
10398 exp->expType = op1->type;
10400 op1->type->refCount++;
10405 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10407 float value2 = op2->__anon1.f;
10410 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
10413 exp->expType = op1->type;
10415 op1->type->refCount++;
10420 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10422 double value2 = op2->__anon1.d;
10425 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
10428 exp->expType = op1->type;
10430 op1->type->refCount++;
10435 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10437 int value2 = op2->__anon1.i;
10440 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
10443 exp->expType = op1->type;
10445 op1->type->refCount++;
10450 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10452 unsigned int value2 = op2->__anon1.ui;
10455 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
10458 exp->expType = op1->type;
10460 op1->type->refCount++;
10465 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10467 long long value2 = op2->__anon1.i64;
10470 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
10473 exp->expType = op1->type;
10475 op1->type->refCount++;
10480 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10482 uint64 value2 = op2->__anon1.ui64;
10485 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
10488 exp->expType = op1->type;
10490 op1->type->refCount++;
10495 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10497 short value2 = op2->__anon1.s;
10500 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
10503 exp->expType = op1->type;
10505 op1->type->refCount++;
10510 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10512 unsigned short value2 = op2->__anon1.us;
10515 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
10518 exp->expType = op1->type;
10520 op1->type->refCount++;
10525 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10527 char value2 = op2->__anon1.c;
10530 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
10533 exp->expType = op1->type;
10535 op1->type->refCount++;
10540 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10542 unsigned char value2 = op2->__anon1.uc;
10545 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
10548 exp->expType = op1->type;
10550 op1->type->refCount++;
10555 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10557 float value2 = op2->__anon1.f;
10560 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
10563 exp->expType = op1->type;
10565 op1->type->refCount++;
10570 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10572 double value2 = op2->__anon1.d;
10575 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
10578 exp->expType = op1->type;
10580 op1->type->refCount++;
10585 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10588 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
10591 exp->expType = op1->type;
10593 op1->type->refCount++;
10598 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10601 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
10604 exp->expType = op1->type;
10606 op1->type->refCount++;
10611 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10614 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
10617 exp->expType = op1->type;
10619 op1->type->refCount++;
10624 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10627 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
10630 exp->expType = op1->type;
10632 op1->type->refCount++;
10637 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10640 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
10643 exp->expType = op1->type;
10645 op1->type->refCount++;
10650 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10653 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
10656 exp->expType = op1->type;
10658 op1->type->refCount++;
10663 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10666 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
10669 exp->expType = op1->type;
10671 op1->type->refCount++;
10676 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10679 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
10682 exp->expType = op1->type;
10684 op1->type->refCount++;
10689 struct OpTable intOps =
10691 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
10694 struct OpTable uintOps =
10696 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
10699 struct OpTable int64Ops =
10701 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
10704 struct OpTable uint64Ops =
10706 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
10709 struct OpTable shortOps =
10711 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
10714 struct OpTable ushortOps =
10716 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
10719 struct OpTable floatOps =
10721 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
10724 struct OpTable doubleOps =
10726 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
10729 struct OpTable charOps =
10731 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
10734 struct OpTable ucharOps =
10736 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
10739 void ReadString(char * output, char * string)
10741 int len = strlen(string);
10743 unsigned int quoted = 0x0, escaped = 0x0;
10745 for(c = 0; c < len; c++)
10747 char ch = string[c];
10805 int UnescapeString(char * d, char * s, int len)
10810 while(j < len && (ch = s[j]))
10815 switch((ch = s[++j]))
10861 char * OffsetEscapedString(char * s, int len, int offset)
10866 while(j < len && k < offset && (ch = s[j]))
10872 return (k == offset) ? s + j : (((void *)0));
10875 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
10877 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
10879 extern double strtod(const char * , char * * );
10881 extern float (* __ecereMethod_float_inf)(void);
10883 extern float (* __ecereMethod_float_nan)(void);
10885 extern double (* __ecereMethod_double_inf)(void);
10887 extern double (* __ecereMethod_double_nan)(void);
10889 struct Operand GetOperand(struct Expression * exp)
10891 struct Operand op =
10898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
10901 struct Type * type = exp->expType;
10905 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))
10907 if(!type->__anon1._class->__anon1.registered->dataType)
10908 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
10909 type = type->__anon1._class->__anon1.registered->dataType;
10911 if(exp->type == 3 && op.kind == 13)
10913 op.__anon1.ui64 = (uint64)exp->__anon1.__anon2.string;
10915 op.ops = uint64Ops;
10917 else if(exp->isConstant && exp->type == 2)
10919 op.kind = type->kind;
10920 op.type = exp->expType;
10926 if(exp->__anon1.__anon1.constant[0] == '\'')
10928 op.__anon1.c = exp->__anon1.__anon1.constant[1];
10931 else if(type->isSigned)
10933 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10938 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10946 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10951 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10952 op.ops = ushortOps;
10959 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10964 op.__anon1.ui = strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10972 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10977 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10978 op.ops = uint64Ops;
10985 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10990 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10991 op.ops = uint64Ops;
10998 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11003 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11004 op.ops = uint64Ops;
11009 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11010 op.__anon1.f = __ecereMethod_float_inf();
11011 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11012 op.__anon1.f = -__ecereMethod_float_inf();
11013 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11014 op.__anon1.f = __ecereMethod_float_nan();
11015 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11016 op.__anon1.f = -__ecereMethod_float_nan();
11018 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11022 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11023 op.__anon1.d = __ecereMethod_double_inf();
11024 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11025 op.__anon1.d = -__ecereMethod_double_inf();
11026 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11027 op.__anon1.d = __ecereMethod_double_nan();
11028 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11029 op.__anon1.d = -__ecereMethod_double_nan();
11031 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11032 op.ops = doubleOps;
11037 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11039 op.ops = uint64Ops;
11047 int __ecereVMethodID_class_OnGetString;
11049 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
11051 static __attribute__((unused)) void UnusedFunction()
11055 ((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);
11058 extern int __ecereVMethodID_class_OnGetString;
11060 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
11062 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11064 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
11066 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11067 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
11070 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11071 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11072 struct Type * type;
11073 void * ptr = inst->data + dataMember->offset + offset;
11074 char * result = (((void *)0));
11076 exp->loc = member->loc = inst->loc;
11077 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11078 if(!dataMember->dataType)
11079 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11080 type = dataMember->dataType;
11081 if(type->kind == 8)
11083 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11085 if(_class->type == 4)
11087 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11091 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11092 struct __ecereNameSpace__ecere__sys__NamedLink * item;
11094 for(item = e->values.first; item; item = item->next)
11096 if((int)item->data == *(int *)ptr)
11098 result = item->name;
11104 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11106 exp->destType = MkClassType(_class->fullName);
11107 ProcessExpressionType(exp);
11111 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11113 if(!_class->dataType)
11114 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11115 type = _class->dataType;
11124 FreeExpContents(exp);
11125 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11131 FreeExpContents(exp);
11132 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11138 FreeExpContents(exp);
11139 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11145 FreeExpContents(exp);
11146 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11152 FreeExpContents(exp);
11153 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11159 FreeExpContents(exp);
11160 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11165 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11168 ListAdd(memberList, member);
11170 if(parentDataMember->type == 1)
11175 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
11177 void PopulateInstance(struct Instantiation * inst)
11179 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
11180 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
11181 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11182 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
11185 inst->members = MkListOne(MkMembersInitList(memberList));
11187 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
11188 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
11190 if(!dataMember->isProperty)
11192 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11193 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
11196 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11197 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11198 struct Type * type;
11199 void * ptr = inst->data + dataMember->offset;
11200 char * result = (((void *)0));
11202 exp->loc = member->loc = inst->loc;
11203 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11204 if(!dataMember->dataType)
11205 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11206 type = dataMember->dataType;
11207 if(type->kind == 8)
11209 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11211 if(_class->type == 4)
11213 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11217 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11218 struct __ecereNameSpace__ecere__sys__NamedLink * item;
11220 for(item = e->values.first; item; item = item->next)
11222 if((int)item->data == *(int *)ptr)
11224 result = item->name;
11231 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11233 exp->destType = MkClassType(_class->fullName);
11234 ProcessExpressionType(exp);
11237 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11239 if(!_class->dataType)
11240 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11241 type = _class->dataType;
11250 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11256 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11262 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11268 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11274 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11279 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11282 ListAdd(memberList, member);
11288 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);
11290 extern void FreeInstance(struct Instantiation * inst);
11292 void ComputeInstantiation(struct Expression * exp)
11294 struct Instantiation * inst = exp->__anon1.instance;
11295 struct MembersInit * members;
11296 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11297 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11298 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11299 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11300 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11301 int subMemberStackPos = 0;
11304 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11308 if(_class->type == 0 || _class->type == 5)
11310 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11311 if(_class->type == 0)
11312 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11315 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11319 for(members = (*inst->members).first; members; members = members->next)
11321 switch(members->type)
11325 if(members->__anon1.dataMembers)
11327 struct MemberInit * member;
11329 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11331 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11332 unsigned int found = 0x0;
11333 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11334 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11335 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
11336 unsigned int dataMemberOffset;
11340 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11343 if(curMember->isProperty)
11344 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11347 dataMember = curMember;
11348 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11349 if(_class->type == 0)
11350 dataMemberOffset += _class->base->structSize;
11357 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11361 if(prop->memberAccess == 1)
11363 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11364 curClass = prop->_class;
11369 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11370 int _subMemberStackPos = 0;
11372 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11376 if(dataMember->memberAccess == 1)
11378 curMember = dataMember;
11379 curClass = dataMember->_class;
11380 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11381 subMemberStackPos = _subMemberStackPos;
11386 if(found && member->initializer && member->initializer->type == 0)
11388 struct Expression * value = member->initializer->__anon1.exp;
11389 struct Type * type = (((void *)0));
11390 unsigned int deepMember = 0x0;
11394 type = prop->dataType;
11396 else if(dataMember)
11398 if(!dataMember->dataType)
11399 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11400 type = dataMember->dataType;
11402 if(ident && ident->next)
11405 for(ident = ident->next; ident && type; ident = ident->next)
11407 if(type->kind == 8)
11409 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11411 type = prop->dataType;
11414 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11416 type = dataMember->dataType;
11419 else if(type->kind == 9 || type->kind == 10)
11421 struct Type * memberType;
11423 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11425 if(!strcmp(memberType->name, ident->string))
11436 FreeType(value->destType);
11437 value->destType = type;
11440 ComputeExpression(value);
11442 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11444 if(type->kind == 8)
11446 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11448 if(_class->type == 2 || _class->type == 3 || _class->type == 4)
11450 if(!_class->dataType)
11451 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11452 type = _class->dataType;
11457 void * ptr = inst->data + dataMemberOffset;
11459 if(value->type == 2)
11465 GetInt(value, (int *)ptr);
11470 GetInt64(value, (long long *)ptr);
11475 GetIntPtr(value, (intptr_t *)ptr);
11480 GetIntSize(value, (ssize_t *)ptr);
11485 GetFloat(value, (float *)ptr);
11490 GetDouble(value, (double *)ptr);
11495 else if(value->type == 1)
11497 if(type->kind == 8)
11499 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11501 if(_class->type == 1)
11503 ComputeTypeSize(type);
11504 if(value->__anon1.instance->data)
11505 memcpy(ptr, value->__anon1.instance->data, type->size);
11512 if(value->type == 1 && value->__anon1.instance->data)
11514 if(type->kind == 8)
11516 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11518 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)))
11520 void (* Set)(void *, void *) = (void *)prop->Set;
11522 Set(inst->data, value->__anon1.instance->data);
11523 PopulateInstance(inst);
11527 else if(value->type == 2)
11533 void (* Set)(void *, double) = (void *)prop->Set;
11535 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11540 void (* Set)(void *, float) = (void *)prop->Set;
11542 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11547 void (* Set)(void *, int) = (void *)prop->Set;
11549 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11554 void (* Set)(void *, long long) = (void *)prop->Set;
11556 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11561 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11563 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11568 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11570 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11575 else if(value->type == 3)
11579 ReadString(temp, value->__anon1.__anon2.string);
11580 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11584 else if(!deepMember && type && _class->type == 3)
11588 if(value->type == 2)
11590 if(type->kind == 8)
11592 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11594 if(_class->type == 3)
11596 if(!_class->dataType)
11597 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11598 type = _class->dataType;
11606 float (* Set)(float) = (void *)prop->Set;
11608 GetFloat(member->initializer->__anon1.exp, &fValue);
11609 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11616 double (* Set)(double) = (void *)prop->Set;
11618 GetDouble(member->initializer->__anon1.exp, &dValue);
11619 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11627 else if(!deepMember && type && _class->type == 2)
11631 if(value->type == 1 && value->__anon1.instance->data)
11633 unsigned int (* Set)(void *) = (void *)prop->Set;
11635 bits = Set(value->__anon1.instance->data);
11637 else if(value->type == 2)
11641 else if(dataMember)
11643 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11644 struct Type * type;
11647 bits = (bits & ~bitMember->mask);
11648 if(!bitMember->dataType)
11649 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0x0);
11650 type = bitMember->dataType;
11651 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11653 if(!type->__anon1._class->__anon1.registered->dataType)
11654 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
11655 type = type->__anon1._class->__anon1.registered->dataType;
11664 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11672 type->isSigned ? GetShort(value, &v) : GetUShort(value, &v);
11681 type->isSigned ? GetInt(value, &v) : GetUInt(value, &v);
11689 type->isSigned ? GetInt64(value, &v) : GetUInt64(value, &v);
11697 type->isSigned ? GetIntPtr(value, &v) : GetUIntPtr(value, &v);
11705 type->isSigned ? GetIntSize(value, &v) : GetUIntSize(value, &v);
11710 bits |= part << bitMember->pos;
11716 if(_class && _class->type == 3)
11718 ComputeExpression(member->initializer->__anon1.exp);
11719 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11721 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11731 if(_class && _class->type == 2)
11733 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11738 FreeInstance(inst);
11742 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
11744 unsigned int result = 0x0;
11749 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
11750 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
11754 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
11755 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11758 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)
11759 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11762 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)
11763 result = GetOpFloat(op, &op->__anon1.f);
11766 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)
11767 result = GetOpDouble(op, &op->__anon1.d);
11770 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)
11771 result = GetOpUIntPtr(op, &op->__anon1.ui64);
11774 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)
11775 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11778 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11779 result = isSigned ? GetOpIntPtr(op, &op->__anon1.i64) : GetOpUIntPtr(op, &op->__anon1.i64);
11782 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11783 result = isSigned ? GetOpIntSize(op, &op->__anon1.ui64) : GetOpUIntSize(op, &op->__anon1.ui64);
11789 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11791 if(exp->__anon1.op.op == SIZEOF)
11793 FreeExpContents(exp);
11795 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11799 if(!exp->__anon1.op.exp1)
11801 switch(exp->__anon1.op.op)
11805 struct Expression * exp2 = exp->__anon1.op.exp2;
11807 exp->__anon1.op.exp2 = (((void *)0));
11808 FreeExpContents(exp);
11809 FreeType(exp->expType);
11810 FreeType(exp->destType);
11812 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11818 FreeExpContents(exp);
11819 op1->ops.Neg(exp, op1);
11823 if(op1->ops.BitNot)
11825 FreeExpContents(exp);
11826 op1->ops.BitNot(exp, op1);
11832 FreeExpContents(exp);
11833 op1->ops.Not(exp, op1);
11840 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11842 if(Promote(op2, op1->kind, op1->type->isSigned))
11843 op2->kind = op1->kind, op2->ops = op1->ops;
11844 else if(Promote(op1, op2->kind, op2->type->isSigned))
11845 op1->kind = op2->kind, op1->ops = op2->ops;
11847 switch(exp->__anon1.op.op)
11852 FreeExpContents(exp);
11853 op1->ops.Add(exp, op1, op2);
11859 FreeExpContents(exp);
11860 op1->ops.Sub(exp, op1, op2);
11866 FreeExpContents(exp);
11867 op1->ops.Mul(exp, op1, op2);
11873 FreeExpContents(exp);
11874 op1->ops.Div(exp, op1, op2);
11880 FreeExpContents(exp);
11881 op1->ops.Mod(exp, op1, op2);
11885 if(exp->__anon1.op.exp2)
11887 if(op1->ops.BitAnd)
11889 FreeExpContents(exp);
11890 op1->ops.BitAnd(exp, op1, op2);
11897 FreeExpContents(exp);
11898 op1->ops.BitOr(exp, op1, op2);
11902 if(op1->ops.BitXor)
11904 FreeExpContents(exp);
11905 op1->ops.BitXor(exp, op1, op2);
11909 if(op1->ops.LShift)
11911 FreeExpContents(exp);
11912 op1->ops.LShift(exp, op1, op2);
11916 if(op1->ops.RShift)
11918 FreeExpContents(exp);
11919 op1->ops.RShift(exp, op1, op2);
11925 FreeExpContents(exp);
11926 op1->ops.Equ(exp, op1, op2);
11932 FreeExpContents(exp);
11933 op1->ops.Nqu(exp, op1, op2);
11939 FreeExpContents(exp);
11940 op1->ops.And(exp, op1, op2);
11946 FreeExpContents(exp);
11947 op1->ops.Or(exp, op1, op2);
11953 FreeExpContents(exp);
11954 op1->ops.Grt(exp, op1, op2);
11960 FreeExpContents(exp);
11961 op1->ops.Sma(exp, op1, op2);
11965 if(op1->ops.GrtEqu)
11967 FreeExpContents(exp);
11968 op1->ops.GrtEqu(exp, op1, op2);
11972 if(op1->ops.SmaEqu)
11974 FreeExpContents(exp);
11975 op1->ops.SmaEqu(exp, op1, op2);
11983 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
11985 extern struct Expression * MkExpIdentifier(struct Identifier * id);
11987 void ComputeExpression(struct Expression * exp)
11989 char expString[10240];
11991 expString[0] = '\0';
11996 ComputeInstantiation(exp);
12001 struct Expression * exp1, * exp2 = (((void *)0));
12002 struct Operand op1 =
12009 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12012 struct Operand op2 =
12019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12023 if(exp->__anon1.op.exp2)
12025 struct Expression * e = exp->__anon1.op.exp2;
12027 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
12029 if(e->type == 5 || e->type == 32 || e->type == 23)
12032 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12034 e = (*e->__anon1.list).last;
12037 if(exp->__anon1.op.op == 261 && e && e->expType)
12039 if(e->type == 3 && e->__anon1.__anon2.string)
12041 char * string = e->__anon1.__anon2.string;
12042 int len = strlen(string);
12043 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
12045 len = UnescapeString(tmp, string + 1, len - 2);
12046 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
12047 FreeExpContents(exp);
12049 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
12053 struct Type * type = e->expType;
12056 FreeExpContents(exp);
12058 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12064 ComputeExpression(exp->__anon1.op.exp2);
12066 if(exp->__anon1.op.exp1)
12068 ComputeExpression(exp->__anon1.op.exp1);
12069 exp1 = exp->__anon1.op.exp1;
12070 exp2 = exp->__anon1.op.exp2;
12071 op1 = GetOperand(exp1);
12073 op1.type->refCount++;
12076 op2 = GetOperand(exp2);
12078 op2.type->refCount++;
12083 exp1 = exp->__anon1.op.exp2;
12084 op1 = GetOperand(exp1);
12086 op1.type->refCount++;
12088 CallOperator(exp, exp1, exp2, &op1, &op2);
12090 FreeType(op1.type);
12092 FreeType(op2.type);
12098 struct Expression * e, * n;
12100 for(e = (*exp->__anon1.list).first; e; e = n)
12105 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
12106 struct Expression * prev = exp->prev;
12107 struct Expression * next = exp->next;
12109 ComputeExpression(e);
12110 FreeType(exp->expType);
12111 FreeType(exp->destType);
12115 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
12116 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
12127 struct Expression * memberExp = exp->__anon1.member.exp;
12128 struct Identifier * memberID = exp->__anon1.member.member;
12129 struct Type * type;
12131 ComputeExpression(exp->__anon1.member.exp);
12132 type = exp->__anon1.member.exp->expType;
12135 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)));
12136 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
12137 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
12138 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
12140 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
12141 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
12145 struct Symbol * classSym;
12148 PrintTypeNoConst(type, string, 0x0, 0x1);
12149 classSym = FindClass(string);
12150 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12152 if(exp->__anon1.member.member)
12154 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
12156 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
12158 if(!prop && !member && _class && exp->__anon1.member.member)
12160 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
12162 convertTo = _class;
12163 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12164 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
12170 struct Type * type = prop->dataType;
12172 if(_class->type == 3)
12174 if(type->kind == 8)
12176 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12178 if(_class->type == 3)
12180 if(!_class->dataType)
12181 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
12182 type = _class->dataType;
12190 float (* Get)(float) = (void *)prop->Get;
12192 GetFloat(exp->__anon1.member.exp, &value);
12193 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
12200 double (* Get)(double);
12202 GetDouble(exp->__anon1.member.exp, &value);
12204 Get = (void *)prop->Set;
12206 Get = (void *)prop->Get;
12207 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
12217 struct Expression * value = exp->__anon1.member.exp;
12218 struct Type * type;
12220 if(!prop->dataType)
12221 ProcessPropertyType(prop);
12222 type = prop->dataType;
12226 else if(_class->type == 1)
12232 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12234 if(propertyClass->type == 1 && value->type == 1)
12236 void (* Set)(void *, void *) = (void *)prop->Set;
12238 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12239 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12240 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12241 exp->__anon1.instance->loc = exp->loc;
12243 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
12244 PopulateInstance(exp->__anon1.instance);
12251 void (* Set)(void *, int) = (void *)prop->Set;
12253 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12254 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12255 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12256 exp->__anon1.instance->loc = exp->loc;
12258 GetInt(value, &intValue);
12259 Set(exp->__anon1.instance->data, intValue);
12260 PopulateInstance(exp->__anon1.instance);
12265 long long intValue;
12266 void (* Set)(void *, long long) = (void *)prop->Set;
12268 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12269 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12270 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12271 exp->__anon1.instance->loc = exp->loc;
12273 GetInt64(value, &intValue);
12274 Set(exp->__anon1.instance->data, intValue);
12275 PopulateInstance(exp->__anon1.instance);
12281 void (* Set)(void *, intptr_t) = (void *)prop->Set;
12283 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12284 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12285 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12286 exp->__anon1.instance->loc = exp->loc;
12288 GetIntPtr(value, &intValue);
12289 Set(exp->__anon1.instance->data, intValue);
12290 PopulateInstance(exp->__anon1.instance);
12296 void (* Set)(void *, ssize_t) = (void *)prop->Set;
12298 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12299 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12300 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12301 exp->__anon1.instance->loc = exp->loc;
12303 GetIntSize(value, &intValue);
12304 Set(exp->__anon1.instance->data, intValue);
12305 PopulateInstance(exp->__anon1.instance);
12311 void (* Set)(void *, float) = (void *)prop->Set;
12313 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12314 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12315 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12316 exp->__anon1.instance->loc = exp->loc;
12318 GetFloat(value, &floatValue);
12319 Set(exp->__anon1.instance->data, floatValue);
12320 PopulateInstance(exp->__anon1.instance);
12325 double doubleValue;
12326 void (* Set)(void *, double) = (void *)prop->Set;
12328 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12329 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12330 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12331 exp->__anon1.instance->loc = exp->loc;
12333 GetDouble(value, &doubleValue);
12334 Set(exp->__anon1.instance->data, doubleValue);
12335 PopulateInstance(exp->__anon1.instance);
12340 else if(_class->type == 2)
12346 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12348 if(propertyClass->type == 1 && value->__anon1.instance->data)
12350 unsigned int (* Set)(void *) = (void *)prop->Set;
12351 unsigned int bits = Set(value->__anon1.instance->data);
12353 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12357 else if(_class->type == 2)
12359 unsigned int value;
12360 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
12363 GetUInt(exp->__anon1.member.exp, &value);
12365 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12374 if(_class->type == 2)
12376 unsigned int value;
12378 GetUInt(exp->__anon1.member.exp, &value);
12383 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12385 if(_class->type == 1)
12387 void (* Get)(unsigned int, void *) = (void *)prop->Get;
12389 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12390 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12391 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12392 exp->__anon1.instance->loc = exp->loc;
12394 Get(value, exp->__anon1.instance->data);
12395 PopulateInstance(exp->__anon1.instance);
12397 else if(_class->type == 2)
12399 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
12400 uint64 bits = Get(value);
12402 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
12409 else if(_class->type == 1)
12411 char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
12417 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12419 if(_class->type == 1 && value)
12421 void (* Get)(void *, void *) = (void *)prop->Get;
12423 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12424 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12425 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12426 exp->__anon1.instance->loc = exp->loc;
12428 Get(value, exp->__anon1.instance->data);
12429 PopulateInstance(exp->__anon1.instance);
12440 exp->isConstant = 0x0;
12449 FreeExpression(memberExp);
12450 FreeIdentifier(memberID);
12456 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
12458 FreeExpContents(exp);
12459 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12466 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
12468 if(classSym && classSym->__anon1.registered)
12470 if(classSym->__anon1.registered->fixed)
12472 FreeSpecifier(exp->__anon1._class);
12473 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
12478 char className[1024];
12480 strcpy(className, "__ecereClass_");
12481 FullClassNameCat(className, classSym->string, 0x1);
12482 MangleClassName(className);
12483 DeclareClass(classSym, className);
12484 FreeExpContents(exp);
12486 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
12487 exp->__anon1.member.member = MkIdentifier("structSize");
12494 struct Type * type;
12495 struct Expression * e = exp;
12497 if(exp->type == 11)
12499 if(exp->__anon1.cast.exp)
12500 ComputeExpression(exp->__anon1.cast.exp);
12501 e = exp->__anon1.cast.exp;
12503 if(e && exp->expType)
12505 type = exp->expType;
12506 if(type->kind == 8)
12508 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12510 if(_class && (_class->type == 3 || _class->type == 2))
12512 if(!_class->dataType)
12513 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
12514 type = _class->dataType;
12523 char value = (char)0;
12525 if(GetChar(e, &value))
12527 FreeExpContents(exp);
12528 exp->__anon1.__anon1.constant = PrintChar(value);
12534 unsigned char value = (unsigned char)0;
12536 if(GetUChar(e, &value))
12538 FreeExpContents(exp);
12539 exp->__anon1.__anon1.constant = PrintUChar(value);
12547 short value = (short)0;
12549 if(GetShort(e, &value))
12551 FreeExpContents(exp);
12552 exp->__anon1.__anon1.constant = PrintShort(value);
12558 unsigned short value = (unsigned short)0;
12560 if(GetUShort(e, &value))
12562 FreeExpContents(exp);
12563 exp->__anon1.__anon1.constant = PrintUShort(value);
12573 if(GetInt(e, &value))
12575 FreeExpContents(exp);
12576 exp->__anon1.__anon1.constant = PrintInt(value);
12582 unsigned int value = 0;
12584 if(GetUInt(e, &value))
12586 FreeExpContents(exp);
12587 exp->__anon1.__anon1.constant = PrintUInt(value);
12595 long long value = 0;
12597 if(GetInt64(e, &value))
12599 FreeExpContents(exp);
12600 exp->__anon1.__anon1.constant = PrintInt64(value);
12608 if(GetUInt64(e, &value))
12610 FreeExpContents(exp);
12611 exp->__anon1.__anon1.constant = PrintUInt64(value);
12619 intptr_t value = 0;
12621 if(GetIntPtr(e, &value))
12623 FreeExpContents(exp);
12624 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12630 uintptr_t value = 0;
12632 if(GetUIntPtr(e, &value))
12634 FreeExpContents(exp);
12635 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12645 if(GetIntSize(e, &value))
12647 FreeExpContents(exp);
12648 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12656 if(GetUIntSize(e, &value))
12658 FreeExpContents(exp);
12659 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12668 if(GetFloat(e, &value))
12670 FreeExpContents(exp);
12671 exp->__anon1.__anon1.constant = PrintFloat(value);
12680 if(GetDouble(e, &value))
12682 FreeExpContents(exp);
12683 exp->__anon1.__anon1.constant = PrintDouble(value);
12694 struct Operand op1 =
12701 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12704 struct Operand op2 =
12711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12714 struct Operand op3 =
12721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12725 if(exp->__anon1.cond.exp)
12726 ComputeExpression((*exp->__anon1.cond.exp).last);
12727 if(exp->__anon1.cond.elseExp)
12728 ComputeExpression(exp->__anon1.cond.elseExp);
12729 if(exp->__anon1.cond.cond)
12730 ComputeExpression(exp->__anon1.cond.cond);
12731 op1 = GetOperand(exp->__anon1.cond.cond);
12733 op1.type->refCount++;
12734 op2 = GetOperand((*exp->__anon1.cond.exp).last);
12736 op2.type->refCount++;
12737 op3 = GetOperand(exp->__anon1.cond.elseExp);
12739 op3.type->refCount++;
12742 FreeExpContents(exp);
12743 op1.ops.Cond(exp, &op1, &op2, &op3);
12746 FreeType(op1.type);
12748 FreeType(op2.type);
12750 FreeType(op3.type);
12756 void ApplyAnyObjectLogic(struct Expression * e);
12758 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
12760 unsigned int result = 0x1;
12764 struct __ecereNameSpace__ecere__sys__OldList converts =
12768 struct Conversion * convert;
12770 if(destType->kind == 0)
12772 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
12776 for(convert = converts.first; convert; convert = convert->next)
12778 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
12782 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12783 int objectType = exp->expType ? exp->expType->classObjectType : 0;
12786 newExp->prev = (((void *)0));
12787 newExp->next = (((void *)0));
12788 newExp->destType = (((void *)0));
12792 exp->addedThis = 0x1;
12793 exp->__anon1.member.exp = newExp;
12794 FreeType(exp->__anon1.member.exp->expType);
12795 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
12796 exp->__anon1.member.exp->expType->classObjectType = objectType;
12797 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
12798 exp->__anon1.member.memberType = 1;
12799 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12800 exp->needCast = 0x1;
12802 exp->expType->refCount++;
12803 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12809 exp->addedThis = 0x1;
12810 exp->__anon1.member.exp = newExp;
12811 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)
12813 newExp->byReference = 0x1;
12815 FreeType(exp->__anon1.member.exp->expType);
12816 exp->__anon1.member.exp->expType = (((void *)0));
12817 if(convert->convert->dataType)
12819 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12820 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
12821 exp->__anon1.member.exp->expType->refCount = 1;
12822 exp->__anon1.member.exp->expType->classObjectType = objectType;
12823 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12825 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
12826 exp->__anon1.member.memberType = 4;
12827 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12828 exp->needCast = 0x1;
12829 if(convert->resultType)
12830 convert->resultType->refCount++;
12836 FreeType(exp->expType);
12839 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12840 exp->needCast = 0x1;
12842 exp->expType->refCount++;
12846 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12847 exp->needCast = 0x1;
12848 if(convert->resultType)
12849 convert->resultType->refCount++;
12853 if(exp->isConstant && inCompiler)
12854 ComputeExpression(exp);
12855 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
12857 if(!result && exp->expType && converts.count)
12859 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
12861 if(!result && exp->expType && exp->destType)
12863 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))
12870 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
12872 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
12874 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
12876 void CheckTemplateTypes(struct Expression * exp)
12878 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate)
12880 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12881 struct Context * context;
12885 exp->destType->refCount++;
12887 exp->expType->refCount++;
12888 newExp->prev = (((void *)0));
12889 newExp->next = (((void *)0));
12890 switch(exp->expType->kind)
12893 if(exp->destType->classObjectType)
12896 exp->destType->refCount--;
12898 exp->expType->refCount--;
12899 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12903 struct __ecereNameSpace__ecere__sys__OldList * specs;
12904 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12905 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12907 context = PushContext();
12908 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12909 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12910 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12912 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12913 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
12914 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
12915 exp->__anon1.compound->__anon1.compound.context = context;
12916 PopContext(context);
12921 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
12922 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12926 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
12928 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12929 struct Statement * compound;
12930 struct Context * context;
12934 exp->destType->refCount++;
12936 exp->expType->refCount++;
12937 newExp->prev = (((void *)0));
12938 newExp->next = (((void *)0));
12939 switch(exp->expType->kind)
12942 if(exp->destType->classObjectType)
12945 exp->destType->refCount--;
12947 exp->expType->refCount--;
12948 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12952 struct __ecereNameSpace__ecere__sys__OldList * specs;
12953 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12954 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12956 context = PushContext();
12957 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12958 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12959 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12961 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12962 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
12963 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
12964 exp->__anon1.compound->__anon1.compound.context = context;
12965 PopContext(context);
12970 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
12973 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)));
12974 ProcessExpressionType((*exp->__anon1.list).first);
12980 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
12981 newExp->needCast = 0x1;
12982 ProcessExpressionType((*exp->__anon1.list).first);
12988 if(exp->expType->kind == 20)
12990 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
12994 FreeType(exp->destType);
12995 FreeType(exp->expType);
12996 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13000 if(newExp->type == 8 && newExp->__anon1.member.memberType == 3)
13003 exp->__anon1.op.op = '*';
13004 exp->__anon1.op.exp1 = (((void *)0));
13005 exp->__anon1.op.exp2 = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uint64")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '&', newExp))));
13009 char typeString[1024];
13010 struct Declarator * decl;
13011 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13013 typeString[0] = '\0';
13014 PrintType(exp->expType, typeString, 0x0, 0x0);
13015 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13017 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
13018 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
13019 exp->__anon1.cast.exp->needCast = 0x1;
13027 extern int strncmp(const char * , const char * , size_t n);
13029 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
13031 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
13033 int nsLen = strlen(nameSpace);
13034 struct Symbol * symbol;
13036 for(symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(tree, nameSpace); symbol; symbol = (struct Symbol *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)symbol)))
13038 char * s = symbol->string;
13040 if(!strncmp(s, nameSpace, nsLen))
13045 for(c = strlen(s) - 1; c >= 0; c--)
13048 namePart = s + c + 1;
13049 if(!strcmp(namePart, name))
13057 return (((void *)0));
13060 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
13063 char nameSpace[1024];
13064 const char * namePart;
13065 unsigned int gotColon = 0x0;
13067 nameSpace[0] = '\0';
13068 for(c = strlen(name) - 1; c >= 0; c--)
13074 namePart = name + c + 1;
13075 while(c >= 0 && name[c] == ':')
13079 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
13083 memcpy(nameSpace, name, c + 1);
13084 nameSpace[c + 1] = (char)0;
13085 return ScanWithNameSpace(tree, nameSpace, namePart);
13089 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13095 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13099 return ScanWithNameSpace(tree, "", namePart);
13101 return (((void *)0));
13104 static void ProcessDeclaration(struct Declaration * decl);
13106 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
13108 struct Context * ctx;
13109 struct Symbol * symbol = (((void *)0));
13111 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
13113 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
13115 symbol = (((void *)0));
13118 char curName[1024];
13120 strcpy(curName, thisNameSpace);
13121 strcat(curName, "::");
13122 strcat(curName, name);
13123 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
13126 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
13129 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
13130 if(symbol || ctx == endContext)
13133 if(inCompiler && curExternal && symbol && ctx == globalContext && curExternal->symbol && symbol->id > curExternal->symbol->idCode && symbol->__anon2.__anon1.pointerExternal)
13135 if(symbol->__anon2.__anon1.pointerExternal->type == 0)
13137 struct FunctionDefinition * function = symbol->__anon2.__anon1.pointerExternal->__anon1.function;
13138 struct Context * tmpContext = curContext;
13140 curContext = (((void *)0));
13141 symbol->__anon2.__anon1.pointerExternal = MkExternalDeclaration(MkDeclaration(CopyList(function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(function->declarator), (((void *)0))))));
13142 curContext = tmpContext;
13143 symbol->__anon2.__anon1.pointerExternal->symbol = symbol;
13144 DeclareType(symbol->type, 0x1, 0x1);
13145 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, symbol->__anon2.__anon1.pointerExternal);
13146 symbol->id = curExternal->symbol->idCode;
13148 else if(symbol->__anon2.__anon1.pointerExternal->type == 1 && curExternal->symbol->idCode < symbol->__anon2.__anon1.pointerExternal->symbol->id)
13150 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
13151 symbol->id = curExternal->symbol->idCode;
13157 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
13159 if(!type->isSigned && type->kind != 22 && type->kind != 23)
13160 ListAdd(specs, MkSpecifier(UNSIGNED));
13165 if(type->__anon1._class->__anon1.registered)
13167 if(!type->__anon1._class->__anon1.registered->dataType)
13168 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
13169 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
13174 ListAdd(specs, MkSpecifier(DOUBLE));
13177 ListAdd(specs, MkSpecifier(FLOAT));
13180 ListAdd(specs, MkSpecifier(CHAR));
13183 ListAdd(specs, MkSpecifier(_BOOL));
13186 ListAdd(specs, MkSpecifier(SHORT));
13189 ListAdd(specs, MkSpecifier(INT64));
13192 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
13195 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
13199 ListAdd(specs, MkSpecifier(INT));
13204 static void PrintArraySize(struct Type * arrayType, char * string)
13210 if(arrayType->__anon1.__anon4.enumClass)
13211 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
13212 else if(arrayType->__anon1.__anon4.arraySizeExp)
13213 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
13215 strcat(string, size);
13218 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
13222 if(printConst && type->constant)
13223 strcat(string, "const ");
13228 struct Symbol * c = type->__anon1._class;
13230 if(type->classObjectType == 2)
13231 strcat(string, "typed_object");
13232 else if(type->classObjectType == 3)
13233 strcat(string, "any_object");
13237 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
13239 if(type->byReference)
13240 strcat(string, " &");
13244 strcat(string, "void");
13247 strcat(string, type->isSigned ? "int" : "uint");
13250 strcat(string, type->isSigned ? "int64" : "uint64");
13253 strcat(string, type->isSigned ? "intptr" : "uintptr");
13256 strcat(string, type->isSigned ? "intsize" : "uintsize");
13259 strcat(string, type->isSigned ? "char" : "byte");
13262 strcat(string, "_Bool");
13265 strcat(string, type->isSigned ? "short" : "uint16");
13268 strcat(string, "float");
13271 strcat(string, "double");
13274 if(type->__anon1.__anon1.enumName)
13276 strcat(string, "struct ");
13277 strcat(string, type->__anon1.__anon1.enumName);
13279 else if(type->typeName)
13280 strcat(string, type->typeName);
13283 struct Type * member;
13285 strcat(string, "struct { ");
13286 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
13288 PrintType(member, string, 0x1, fullName);
13289 strcat(string, "; ");
13291 strcat(string, "}");
13295 if(type->__anon1.__anon1.enumName)
13297 strcat(string, "union ");
13298 strcat(string, type->__anon1.__anon1.enumName);
13300 else if(type->typeName)
13301 strcat(string, type->typeName);
13304 strcat(string, "union ");
13305 strcat(string, "(unnamed)");
13309 if(type->__anon1.__anon1.enumName)
13311 strcat(string, "enum ");
13312 strcat(string, type->__anon1.__anon1.enumName);
13314 else if(type->typeName)
13315 strcat(string, type->typeName);
13317 strcat(string, "int");
13320 strcat(string, "...");
13323 strcat(string, "subclass(");
13324 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
13325 strcat(string, ")");
13328 strcat(string, type->__anon1.templateParameter->identifier->string);
13331 strcat(string, "thisclass");
13334 strcat(string, "__builtin_va_list");
13340 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
13342 static void PrintName(struct Type * type, char * string, unsigned int fullName)
13344 if(type->name && type->name[0])
13347 strcat(string, type->name);
13350 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 0x1, 0x0);
13356 strcat(string, name);
13361 static void PrintAttribs(struct Type * type, char * string)
13365 if(type->dllExport)
13366 strcat(string, "dllexport ");
13367 if(type->attrStdcall)
13368 strcat(string, "stdcall ");
13372 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
13374 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13376 struct Type * attrType = (((void *)0));
13378 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
13379 PrintAttribs(type, string);
13380 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
13381 strcat(string, " const");
13382 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
13383 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13384 strcat(string, " (");
13385 if(type->kind == 13)
13387 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
13388 PrintAttribs(type->__anon1.type, string);
13390 if(type->kind == 13)
13392 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
13393 strcat(string, "*");
13395 strcat(string, " *");
13397 if(printConst && type->constant && type->kind == 13)
13398 strcat(string, " const");
13401 PrintTypeSpecs(type, string, fullName, printConst);
13404 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
13406 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13407 strcat(string, ")");
13408 if(type->kind == 12)
13409 PrintArraySize(type, string);
13410 else if(type->kind == 11)
13412 struct Type * param;
13414 strcat(string, "(");
13415 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
13417 PrintType(param, string, 0x1, fullName);
13419 strcat(string, ", ");
13421 strcat(string, ")");
13423 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13424 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
13427 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
13429 PrePrintType(type, string, fullName, (((void *)0)), printConst);
13430 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
13431 strcat(string, " ");
13432 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
13434 struct Symbol * _class = type->__anon1.__anon2.thisClass;
13436 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
13438 if(type->classObjectType == 1)
13439 strcat(string, "class");
13441 strcat(string, type->byReference ? "typed_object&" : "typed_object");
13443 else if(_class && _class->string)
13445 char * s = _class->string;
13451 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 0x1, 0x0);
13457 strcat(string, name);
13460 strcat(string, "::");
13462 if(printName && type->name)
13463 PrintName(type, string, fullName);
13464 PostPrintType(type, string, fullName);
13465 if(type->bitFieldCount)
13469 sprintf(count, ":%d", type->bitFieldCount);
13470 strcat(string, count);
13474 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13476 _PrintType(type, string, printName, fullName, 0x1);
13479 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13481 _PrintType(type, string, printName, fullName, 0x0);
13484 static struct Type * FindMember(struct Type * type, char * string)
13486 struct Type * memberType;
13488 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13490 if(!memberType->name)
13492 struct Type * subType = FindMember(memberType, string);
13497 else if(!strcmp(memberType->name, string))
13500 return (((void *)0));
13503 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
13505 struct Type * memberType;
13507 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13509 if(!memberType->name)
13511 struct Type * subType = FindMember(memberType, string);
13515 *offset += memberType->offset;
13519 else if(!strcmp(memberType->name, string))
13521 *offset += memberType->offset;
13525 return (((void *)0));
13528 extern unsigned int parseError;
13530 unsigned int GetParseError()
13535 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
13537 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
13539 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
13541 struct Expression * ParseExpressionString(char * expression)
13544 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
13545 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
13546 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13548 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13549 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
13550 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
13551 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13553 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13554 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
13556 parsedExpression = (((void *)0));
13558 expression_yyparse();
13559 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
13560 return parsedExpression;
13563 extern char * QMkString(const char * source);
13565 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
13567 struct Identifier * id = exp->__anon1.__anon1.identifier;
13568 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
13569 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13570 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13571 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
13573 if(_class && _class->type == 4)
13575 struct __ecereNameSpace__ecere__sys__NamedLink * value = (((void *)0));
13576 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13580 struct __ecereNameSpace__ecere__com__Class * baseClass;
13582 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
13584 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
13586 for(value = e->values.first; value; value = value->next)
13588 if(!strcmp(value->name, id->string))
13593 char constant[256];
13595 FreeExpContents(exp);
13597 exp->isConstant = 0x1;
13598 if(!strcmp(baseClass->dataTypeString, "int"))
13599 sprintf(constant, "%d", (int)value->data);
13601 sprintf(constant, "0x%X", (int)value->data);
13602 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13603 exp->expType = MkClassType(baseClass->fullName);
13611 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
13613 ProcessMethodType(method);
13614 exp->expType = __extension__ ({
13615 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13617 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
13621 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
13623 if(!prop->dataType)
13624 ProcessPropertyType(prop);
13625 exp->expType = prop->dataType;
13627 prop->dataType->refCount++;
13630 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
13632 if(!member->dataType)
13633 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
13634 exp->expType = member->dataType;
13635 if(member->dataType)
13636 member->dataType->refCount++;
13639 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
13641 if(!classProp->dataType)
13642 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0x0);
13643 if(classProp->constant)
13645 FreeExpContents(exp);
13646 exp->isConstant = 0x1;
13647 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
13650 exp->__anon1.__anon1.constant = QMkString((char *)classProp->Get(_class));
13654 char constant[256];
13657 sprintf(constant, "%d", (int)classProp->Get(_class));
13658 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13664 exp->expType = classProp->dataType;
13665 if(classProp->dataType)
13666 classProp->dataType->refCount++;
13672 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
13674 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
13675 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
13676 struct __ecereNameSpace__ecere__com__NameSpace * child;
13680 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)))
13682 data = ScanGlobalData(child, name);
13690 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
13692 extern char * strncpy(char * , const char * , size_t n);
13694 static struct GlobalData * FindGlobalData(char * name)
13697 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
13699 nameSpace = globalData;
13700 for(c = 0; name[c]; c++)
13702 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
13704 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
13705 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
13707 strncpy(spaceName, name + start, c - start);
13708 spaceName[c - start] = '\0';
13709 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
13710 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
13712 return (((void *)0));
13713 nameSpace = newSpace;
13721 return ScanGlobalData(nameSpace, name + start);
13723 return (((void *)0));
13726 static int definedExpStackPos;
13728 static void * definedExpStack[512];
13730 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
13732 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
13734 FreeExpContents(checkedExp);
13735 FreeType(checkedExp->expType);
13736 FreeType(checkedExp->destType);
13737 *checkedExp = *newExp;
13738 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13739 checkedExp->prev = prev;
13740 checkedExp->next = next;
13743 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
13745 extern int printf(const char * , ...);
13747 void __ecereMethod_Expression_Clear();
13749 void ApplyAnyObjectLogic(struct Expression * e)
13751 struct Type * destType = e->destType;
13753 if(destType && (destType->classObjectType == 3))
13755 if(e && e->expType)
13757 struct Type * type = e->expType;
13758 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
13760 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
13762 _class = type->__anon1._class->__anon1.registered;
13764 else if(type->kind == 19)
13766 _class = FindClass("ecere::com::Class")->__anon1.registered;
13770 char string[1024] = "";
13771 struct Symbol * classSym;
13773 PrintTypeNoConst(type, string, 0x0, 0x1);
13774 classSym = FindClass(string);
13776 _class = classSym->__anon1.registered;
13778 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)))
13780 if(!_class || strcmp(_class->fullName, "char *"))
13782 struct Expression * checkedExp = e, * newExp;
13784 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13786 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13788 if(checkedExp->type == 23)
13790 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13793 checkedExp = (*checkedExp->__anon1.list).last;
13795 else if(checkedExp->type == 11)
13796 checkedExp = checkedExp->__anon1.cast.exp;
13798 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
13800 newExp = checkedExp->__anon1.op.exp2;
13801 checkedExp->__anon1.op.exp2 = (((void *)0));
13802 FreeExpContents(checkedExp);
13803 if(e->expType && e->expType->passAsTemplate)
13807 ComputeTypeSize(e->expType);
13808 sprintf(size, "%d", e->expType->size);
13809 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))))));
13811 ReplaceExpContents(checkedExp, newExp);
13812 e->byReference = 0x1;
13814 else if(!e->byReference || (_class && _class->type == 5))
13816 struct Expression * checkedExp;
13819 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;
13821 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
13823 struct Context * context = PushContext();
13824 struct Declarator * decl;
13825 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13826 char typeString[1024];
13827 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13829 typeString[0] = '\0';
13831 newExp->prev = (((void *)0));
13832 newExp->next = (((void *)0));
13833 newExp->expType = (((void *)0));
13834 PrintTypeNoConst(e->expType, typeString, 0x0, 0x1);
13835 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13836 newExp->destType = ProcessType(specs, decl);
13837 curContext = context;
13841 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
13844 sprintf(name, "__internalValue%03X", internalValueCounter++);
13845 if(!curCompound->__anon1.compound.declarations)
13846 curCompound->__anon1.compound.declarations = MkList();
13847 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
13848 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
13849 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
13850 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
13853 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
13855 struct Type * type = e->destType;
13857 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13858 CopyTypeInto(e->destType, type);
13859 e->destType->refCount = 1;
13860 e->destType->classObjectType = 0;
13863 e->__anon1.compound->__anon1.compound.context = context;
13864 PopContext(context);
13865 curContext = context->parent;
13869 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13871 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13873 if(checkedExp->type == 23)
13875 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13878 checkedExp = (*checkedExp->__anon1.list).last;
13880 else if(checkedExp->type == 11)
13881 checkedExp = checkedExp->__anon1.cast.exp;
13884 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13886 *operand = *checkedExp;
13887 checkedExp->destType = (((void *)0));
13888 checkedExp->expType = (((void *)0));
13889 __ecereMethod_Expression_Clear(checkedExp);
13890 checkedExp->type = 4;
13891 checkedExp->__anon1.op.op = '&';
13892 checkedExp->__anon1.op.exp1 = (((void *)0));
13893 checkedExp->__anon1.op.exp2 = operand;
13902 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))))
13904 if(e->expType->classObjectType && destType && destType->classObjectType)
13910 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13913 thisExp->prev = (((void *)0));
13914 thisExp->next = (((void *)0));
13915 __ecereMethod_Expression_Clear(e);
13917 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
13918 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
13919 ((struct Expression *)(*e->__anon1.list).first)->byReference = 0x1;
13921 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13922 CopyTypeInto(e->expType, thisExp->expType);
13923 e->expType->byReference = 0x0;
13924 e->expType->refCount = 1;
13925 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))
13927 e->expType->classObjectType = 0;
13932 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
13934 if(destType->kind == 14)
13936 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
13938 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))
13940 unsigned int byReference = e->expType->byReference;
13941 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13942 struct Declarator * decl;
13943 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13944 char typeString[1024];
13945 struct Type * type;
13946 int backupClassObjectType;
13947 unsigned int backupByReference;
13949 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
13953 backupClassObjectType = type->classObjectType;
13954 backupByReference = type->byReference;
13955 type->classObjectType = 0;
13956 type->byReference = 0x0;
13957 typeString[0] = '\0';
13958 PrintType(type, typeString, 0x0, 0x1);
13959 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13960 type->classObjectType = backupClassObjectType;
13961 type->byReference = backupByReference;
13963 thisExp->prev = (((void *)0));
13964 thisExp->next = (((void *)0));
13965 __ecereMethod_Expression_Clear(e);
13966 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)))
13969 e->__anon1.op.op = '*';
13970 e->__anon1.op.exp1 = (((void *)0));
13971 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
13972 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13973 CopyTypeInto(e->expType, type);
13974 e->expType->byReference = 0x0;
13975 e->expType->refCount = 1;
13980 e->__anon1.cast.typeName = MkTypeName(specs, decl);
13981 e->__anon1.cast.exp = thisExp;
13982 e->byReference = 0x1;
13986 e->destType = destType;
13987 destType->refCount++;
13992 void ApplyLocation(struct Expression * exp, struct Location * loc)
13998 if(exp->__anon1.op.exp1)
13999 ApplyLocation(exp->__anon1.op.exp1, loc);
14000 if(exp->__anon1.op.exp2)
14001 ApplyLocation(exp->__anon1.op.exp2, loc);
14004 if(exp->__anon1.list)
14006 struct Expression * e;
14008 for(e = (*exp->__anon1.list).first; e; e = e->next)
14009 ApplyLocation(e, loc);
14013 if(exp->__anon1.index.index)
14015 struct Expression * e;
14017 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
14018 ApplyLocation(e, loc);
14020 if(exp->__anon1.index.exp)
14021 ApplyLocation(exp->__anon1.index.exp, loc);
14024 if(exp->__anon1.call.arguments)
14026 struct Expression * arg;
14028 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
14029 ApplyLocation(arg, loc);
14031 if(exp->__anon1.call.exp)
14032 ApplyLocation(exp->__anon1.call.exp, loc);
14036 if(exp->__anon1.member.exp)
14037 ApplyLocation(exp->__anon1.member.exp, loc);
14040 if(exp->__anon1.cast.exp)
14041 ApplyLocation(exp->__anon1.cast.exp, loc);
14044 if(exp->__anon1.cond.exp)
14046 struct Expression * e;
14048 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
14049 ApplyLocation(e, loc);
14051 if(exp->__anon1.cond.cond)
14052 ApplyLocation(exp->__anon1.cond.cond, loc);
14053 if(exp->__anon1.cond.elseExp)
14054 ApplyLocation(exp->__anon1.cond.elseExp, loc);
14057 if(exp->__anon1.vaArg.exp)
14058 ApplyLocation(exp->__anon1.vaArg.exp, loc);
14065 extern char * strstr(const char * , const char * );
14067 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DefinedExpression;
14069 struct __ecereNameSpace__ecere__com__DefinedExpression
14071 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
14072 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
14074 const char * value;
14075 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
14076 } __attribute__ ((gcc_struct));
14078 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14080 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14082 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
14084 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
14086 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
14088 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
14090 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
14092 static void ProcessStatement(struct Statement * stmt);
14094 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
14096 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
14098 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
14100 extern const char * sourceFile;
14102 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
14104 void ProcessExpressionType(struct Expression * exp)
14106 unsigned int unresolved = 0x0;
14107 struct Location oldyylloc = yylloc;
14108 unsigned int notByReference = 0x0;
14110 if(!exp || exp->expType)
14117 struct Identifier * id = exp->__anon1.__anon1.identifier;
14119 if(!id || !topContext)
14121 if(id->_class && id->_class->__anon1.__anon1.name)
14123 id->classSym = id->_class->__anon1.__anon1.symbol;
14125 if(strstr(id->string, "__ecereClass") == id->string)
14127 exp->expType = ProcessTypeString("ecere::com::Class", 0x1);
14130 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
14132 ReplaceClassMembers(exp, thisClass);
14135 ProcessExpressionType(exp);
14138 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0x0))
14143 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14147 if(exp->destType && CheckExpressionType(exp, exp->destType, 0x0, 0x0))
14153 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
14156 ProcessExpressionType(exp);
14160 else if(currentClass && !id->_class)
14162 if(ResolveIdWithClass(exp, currentClass, 0x1))
14165 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14170 struct Type * type = symbol->type;
14171 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
14173 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
14175 struct Context * context = SetupTemplatesContext(_class);
14177 type = ReplaceThisClassType(_class);
14178 FinishTemplatesContext(context);
14180 type->refCount = 0;
14182 FreeSpecifier(id->_class);
14183 id->_class = (((void *)0));
14184 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14185 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
14186 id->classSym = (((void *)0));
14187 exp->expType = type;
14190 if(type && (type->kind == 15))
14191 exp->isConstant = 0x1;
14192 if(symbol->isParam || !strcmp(id->string, "this"))
14194 if(_class && _class->type == 1 && !type->declaredWithStruct)
14195 exp->byReference = 0x1;
14197 if(symbol->isIterator)
14199 if(symbol->isIterator == 3)
14202 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
14203 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
14204 exp->expType = (((void *)0));
14205 ProcessExpressionType(exp);
14207 else if(symbol->isIterator != 4)
14210 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
14211 exp->__anon1.member.exp->expType = exp->expType;
14212 exp->__anon1.member.member = MkIdentifier("data");
14213 exp->expType = (((void *)0));
14214 ProcessExpressionType(exp);
14221 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
14223 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14227 strcpy(name, thisNameSpace);
14228 strcat(name, "::");
14229 strcat(name, id->string);
14230 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
14233 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
14238 for(c = 0; c < definedExpStackPos; c++)
14239 if(definedExpStack[c] == definedExp)
14241 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
14243 struct Location backupYylloc = yylloc;
14244 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
14246 definedExpStack[definedExpStackPos++] = definedExp;
14247 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
14248 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
14249 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14251 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14252 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
14253 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
14254 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14256 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14257 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
14259 parsedExpression = (((void *)0));
14261 expression_yyparse();
14262 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
14264 fileInput = backInput;
14265 yylloc = backupYylloc;
14266 if(parsedExpression)
14268 FreeIdentifier(id);
14270 exp->__anon1.list = MkListOne(parsedExpression);
14271 ApplyLocation(parsedExpression, &yylloc);
14272 ProcessExpressionType(exp);
14273 definedExpStackPos--;
14276 definedExpStackPos--;
14282 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
14288 struct GlobalData * data = (((void *)0));
14290 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14294 strcpy(name, thisNameSpace);
14295 strcat(name, "::");
14296 strcat(name, id->string);
14297 data = FindGlobalData(name);
14300 data = FindGlobalData(id->string);
14303 DeclareGlobalData(data);
14304 exp->expType = data->dataType;
14306 data->dataType->refCount++;
14307 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14308 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
14309 FreeSpecifier(id->_class);
14310 id->_class = (((void *)0));
14315 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
14317 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14321 strcpy(name, thisNameSpace);
14322 strcat(name, "::");
14323 strcat(name, id->string);
14324 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
14327 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
14332 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14333 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
14335 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
14336 strcpy(name, "__ecereFunction_");
14337 FullClassNameCat(name, id->string, 0x0);
14338 if(DeclareFunction(function, name))
14340 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14341 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
14343 exp->expType = function->dataType;
14344 if(function->dataType)
14345 function->dataType->refCount++;
14346 FreeSpecifier(id->_class);
14347 id->_class = (((void *)0));
14359 struct __ecereNameSpace__ecere__com__Class * _class;
14361 if(!exp->__anon1.instance->_class)
14363 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
14365 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
14368 ProcessInstantiationType(exp->__anon1.instance);
14369 exp->isConstant = exp->__anon1.instance->isConstant;
14370 if(exp->__anon1.instance->_class)
14372 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
14380 char * constant = exp->__anon1.__anon1.constant;
14381 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 0x1, type);
14383 exp->expType = type;
14384 if(constant[0] == '\'')
14386 if((int)((unsigned char *)constant)[1] > 127)
14389 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
14393 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
14394 exp->__anon1.__anon1.constant = PrintUInt(ch);
14396 type->__anon1._class = FindClass("unichar");
14397 type->isSigned = 0x0;
14402 type->isSigned = 0x1;
14407 char * dot = strchr(constant, '.');
14408 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
14413 exponent = strchr(constant, 'p');
14415 exponent = strchr(constant, 'P');
14419 exponent = strchr(constant, 'e');
14421 exponent = strchr(constant, 'E');
14423 if(dot || exponent)
14425 if(strchr(constant, 'f') || strchr(constant, 'F'))
14429 type->isSigned = 0x1;
14433 unsigned int isSigned = constant[0] == '-';
14434 char * endP = (((void *)0));
14435 long long i64 = strtoll(constant, &endP, 0);
14436 uint64 ui64 = strtoull(constant, &endP, 0);
14437 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll"));
14441 if(i64 < (((int)0x80000000)))
14446 if(ui64 > (((int)0x7fffffff)))
14448 if(ui64 > (0xffffffff))
14451 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
14455 else if(constant[0] != '0' || !constant[1])
14458 type->kind = is64Bit ? 4 : 3;
14459 type->isSigned = isSigned;
14462 exp->isConstant = 0x1;
14463 if(exp->destType && exp->destType->kind == 7)
14465 else if(exp->destType && exp->destType->kind == 6)
14467 else if(exp->destType && exp->destType->kind == 4)
14474 exp->isConstant = 0x1;
14475 exp->expType = __extension__ ({
14476 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14478 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
14479 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14481 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 1, __ecereInstance1->constant = 0x1, __ecereInstance1->isSigned = 0x1, __ecereInstance1;
14482 }), __ecereInstance2;
14488 ProcessExpressionType(exp->__anon1._new.size);
14489 exp->expType = __extension__ ({
14490 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14492 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
14494 DeclareType(exp->expType->__anon1.type, 0x0, 0x0);
14498 ProcessExpressionType(exp->__anon1._renew.size);
14499 ProcessExpressionType(exp->__anon1._renew.exp);
14500 exp->expType = __extension__ ({
14501 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14503 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
14505 DeclareType(exp->expType->__anon1.type, 0x0, 0x0);
14509 unsigned int assign = 0x0, boolResult = 0x0, boolOps = 0x0;
14510 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
14511 unsigned int useDestType = 0x0, useSideType = 0x0;
14512 struct Location oldyylloc = yylloc;
14513 unsigned int useSideUnit = 0x0;
14514 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
14515 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
14517 switch(exp->__anon1.op.op)
14571 if(exp->__anon1.op.exp1)
14578 if(exp->__anon1.op.op == '&')
14580 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
14582 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
14583 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14585 if(symbol && symbol->isIterator == 2)
14588 exp->__anon1.member.exp = exp->__anon1.op.exp2;
14589 exp->__anon1.member.member = MkIdentifier("key");
14590 exp->expType = (((void *)0));
14591 exp->__anon1.op.exp2->expType = symbol->type;
14592 symbol->type->refCount++;
14593 ProcessExpressionType(exp);
14599 if(exp->__anon1.op.exp1)
14601 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
14603 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
14605 if(exp->__anon1.op.exp1->destType)
14606 FreeType(exp->__anon1.op.exp1->destType);
14607 exp->__anon1.op.exp1->destType = exp->destType;
14608 exp->__anon1.op.exp1->opDestType = 0x1;
14610 exp->destType->refCount++;
14614 if(exp->__anon1.op.exp1->destType)
14615 FreeType(exp->__anon1.op.exp1->destType);
14616 exp->__anon1.op.exp1->destType = dummy;
14619 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14620 exp->__anon1.op.exp1->destType->count++;
14621 ProcessExpressionType(exp->__anon1.op.exp1);
14622 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14623 exp->__anon1.op.exp1->destType->count--;
14624 exp->__anon1.op.exp1->opDestType = 0x0;
14625 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)
14627 exp->__anon1.op.exp2 = MkExpConstant("1");
14628 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
14631 if(exp->__anon1.op.exp1->destType == dummy)
14634 exp->__anon1.op.exp1->destType = (((void *)0));
14636 type1 = exp->__anon1.op.exp1->expType;
14638 if(exp->__anon1.op.exp2)
14640 char expString[10240];
14642 expString[0] = '\0';
14643 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
14645 if(exp->__anon1.op.exp1)
14647 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
14648 if(exp->__anon1.op.exp1->expType)
14649 exp->__anon1.op.exp1->expType->refCount++;
14653 exp->__anon1.op.exp2->destType = exp->destType;
14654 if(!exp->__anon1.op.exp1 || exp->__anon1.op.op != '&')
14655 exp->__anon1.op.exp2->opDestType = 0x1;
14657 exp->destType->refCount++;
14661 exp->expType = type1;
14666 PrintExpression(exp->__anon1.op.exp2, expString);
14667 if(type1 && type1->kind == 13)
14669 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)
14670 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
14671 else if(exp->__anon1.op.op == '=')
14673 if(exp->__anon1.op.exp2->destType)
14674 FreeType(exp->__anon1.op.exp2->destType);
14675 exp->__anon1.op.exp2->destType = type1;
14682 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)
14686 if(exp->__anon1.op.exp2->destType)
14687 FreeType(exp->__anon1.op.exp2->destType);
14688 exp->__anon1.op.exp2->destType = type1;
14695 exp->expType = type1;
14697 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
14699 if(exp->__anon1.op.exp2->destType)
14700 FreeType(exp->__anon1.op.exp2->destType);
14701 exp->__anon1.op.exp2->destType = exp->destType;
14702 if(exp->__anon1.op.op != '&')
14703 exp->__anon1.op.exp2->opDestType = 0x1;
14705 exp->destType->refCount++;
14709 if(exp->__anon1.op.exp2->destType)
14710 FreeType(exp->__anon1.op.exp2->destType);
14711 exp->__anon1.op.exp2->destType = dummy;
14714 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))
14716 FreeType(exp->__anon1.op.exp2->destType);
14717 exp->__anon1.op.exp2->destType = type1;
14720 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14721 exp->__anon1.op.exp2->destType->count++;
14722 if(exp->__anon1.op.op == SIZEOF)
14724 struct Expression * e = exp->__anon1.op.exp2;
14726 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
14728 if(e->type == 5 || e->type == 32 || e->type == 23)
14731 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
14733 e = (*e->__anon1.list).last;
14736 if(e->type == 11 && e->__anon1.cast.exp)
14737 e->__anon1.cast.exp->needCast = 0x1;
14739 ProcessExpressionType(exp->__anon1.op.exp2);
14740 exp->__anon1.op.exp2->opDestType = 0x0;
14741 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14742 exp->__anon1.op.exp2->destType->count--;
14743 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
14745 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)
14747 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
14748 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14750 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)))
14752 if(exp->__anon1.op.op == ADD_ASSIGN)
14753 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14755 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))
14757 if(exp->__anon1.op.op == ADD_ASSIGN)
14758 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14760 else if(inCompiler)
14762 char type1String[1024];
14763 char type2String[1024];
14765 type1String[0] = '\0';
14766 type2String[0] = '\0';
14767 PrintType(exp->__anon1.op.exp2->expType, type1String, 0x0, 0x1);
14768 PrintType(type1, type2String, 0x0, 0x1);
14769 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
14770 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
14773 if(exp->__anon1.op.exp2->destType == dummy)
14776 exp->__anon1.op.exp2->destType = (((void *)0));
14778 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
14780 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14781 type2->refCount = 1;
14782 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
14783 type2->isSigned = 0x1;
14785 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))
14787 type2 = __extension__ ({
14788 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14790 __ecereInstance1->kind = 3, __ecereInstance1;
14792 type2->refCount = 1;
14793 type2->isSigned = 0x1;
14797 type2 = exp->__anon1.op.exp2->expType;
14803 if(exp->__anon1.op.op == SIZEOF)
14805 exp->expType = __extension__ ({
14806 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14808 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
14810 exp->isConstant = 0x1;
14812 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
14814 exp->expType = Dereference(type2);
14815 if(type2 && type2->kind == 8)
14816 notByReference = 0x1;
14818 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
14819 exp->expType = Reference(type2);
14824 if(exp->__anon1.op.exp1)
14826 if(exp->__anon1.op.exp1->destType)
14827 FreeType(exp->__anon1.op.exp1->destType);
14828 exp->__anon1.op.exp1->destType = MkClassType("bool");
14829 exp->__anon1.op.exp1->destType->truth = 0x1;
14830 if(!exp->__anon1.op.exp1->expType)
14831 ProcessExpressionType(exp->__anon1.op.exp1);
14833 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
14834 FreeType(exp->__anon1.op.exp1->expType);
14835 exp->__anon1.op.exp1->expType = MkClassType("bool");
14836 exp->__anon1.op.exp1->expType->truth = 0x1;
14838 if(exp->__anon1.op.exp2)
14840 if(exp->__anon1.op.exp2->destType)
14841 FreeType(exp->__anon1.op.exp2->destType);
14842 exp->__anon1.op.exp2->destType = MkClassType("bool");
14843 exp->__anon1.op.exp2->destType->truth = 0x1;
14844 if(!exp->__anon1.op.exp2->expType)
14845 ProcessExpressionType(exp->__anon1.op.exp2);
14847 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
14848 FreeType(exp->__anon1.op.exp2->expType);
14849 exp->__anon1.op.exp2->expType = MkClassType("bool");
14850 exp->__anon1.op.exp2->expType->truth = 0x1;
14853 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")))))
14855 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"))))
14857 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)))
14859 struct Type * intType;
14861 if(!type1->__anon1._class->__anon1.registered->dataType)
14862 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0x0);
14863 if(!type2->__anon1._class->__anon1.registered->dataType)
14864 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0x0);
14865 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0x0);
14866 if(exp->__anon1.op.exp1->destType)
14867 FreeType(exp->__anon1.op.exp1->destType);
14868 if(exp->__anon1.op.exp2->destType)
14869 FreeType(exp->__anon1.op.exp2->destType);
14870 exp->__anon1.op.exp1->destType = intType;
14871 exp->__anon1.op.exp2->destType = intType;
14872 intType->refCount++;
14876 if(exp->__anon1.op.exp2->destType)
14877 FreeType(exp->__anon1.op.exp2->destType);
14878 exp->__anon1.op.exp2->destType = type1;
14880 if(exp->__anon1.op.exp1->destType)
14881 FreeType(exp->__anon1.op.exp1->destType);
14882 exp->__anon1.op.exp1->destType = type2;
14885 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)
14886 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);
14887 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
14889 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 0x1);
14893 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14895 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
14896 ProcessExpressionType(exp->__anon1.op.exp1);
14897 if(type2->kind != 13)
14899 ProcessExpressionType(classExp);
14900 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpBrackets(MkListOne(MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(MkExpOp(MkExpMember(CopyExpression(classExp), MkIdentifier("type")), EQ_OP, MkExpConstant("5")), OR_OP, MkExpOp(MkExpMember(CopyExpression(classExp), MkIdentifier("type")), EQ_OP, MkExpConstant("0"))))), MkListOne(MkExpTypeSize(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))))), MkExpMember(classExp, MkIdentifier("typeSize"))))))));
14901 if(!exp->__anon1.op.exp2->expType)
14905 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0x0);
14908 ProcessExpressionType(exp->__anon1.op.exp2);
14912 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)))
14914 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
14915 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14916 exp->expType = type1;
14920 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)))
14922 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
14923 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14924 exp->expType = type2;
14928 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))
14930 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
14934 unsigned int success = 0x0;
14936 if(type1->kind == 13 && type2->kind == 13)
14938 if(exp->__anon1.op.op == '+')
14939 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14940 else if(exp->__anon1.op.op == '-')
14942 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0, 0x0))
14944 exp->expType = __extension__ ({
14945 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14947 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
14950 if(type1->__anon1.type->kind == 20)
14952 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 0x1);
14956 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14958 ProcessExpressionType(classExp);
14960 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)))))), '/', MkExpBrackets(MkListOne(MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(MkExpOp(MkExpMember(CopyExpression(classExp), MkIdentifier("type")), EQ_OP, MkExpIdentifier(MkIdentifier("noHeadClass"))), OR_OP, MkExpOp(MkExpMember(CopyExpression(classExp), MkIdentifier("type")), EQ_OP, MkExpIdentifier(MkIdentifier("normalClass")))))), MkListOne(MkExpTypeSize(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))))), MkExpMember(classExp, MkIdentifier("typeSize")))))));
14961 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
14969 if(!success && exp->__anon1.op.exp1->type == 2)
14971 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
14974 FreeType(exp->expType);
14975 exp->expType = exp->__anon1.op.exp1->destType;
14976 if(exp->__anon1.op.exp1->destType)
14977 exp->__anon1.op.exp1->destType->refCount++;
14980 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
14983 FreeType(exp->expType);
14984 exp->expType = exp->__anon1.op.exp2->destType;
14985 if(exp->__anon1.op.exp2->destType)
14986 exp->__anon1.op.exp2->destType->refCount++;
14992 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
14995 FreeType(exp->expType);
14996 exp->expType = exp->__anon1.op.exp2->destType;
14997 if(exp->__anon1.op.exp2->destType)
14998 exp->__anon1.op.exp2->destType->refCount++;
15001 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15004 FreeType(exp->expType);
15005 exp->expType = exp->__anon1.op.exp1->destType;
15006 if(exp->__anon1.op.exp1->destType)
15007 exp->__anon1.op.exp1->destType->refCount++;
15013 char expString1[10240];
15014 char expString2[10240];
15018 expString1[0] = '\0';
15019 expString2[0] = '\0';
15024 PrintExpression(exp->__anon1.op.exp1, expString1);
15025 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15026 PrintExpression(exp->__anon1.op.exp2, expString2);
15027 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15028 PrintType(exp->__anon1.op.exp1->expType, type1, 0x0, 0x1);
15029 PrintType(exp->__anon1.op.exp2->expType, type2, 0x0, 0x1);
15031 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
15035 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)
15037 if(exp->__anon1.op.exp1->destType)
15038 FreeType(exp->__anon1.op.exp1->destType);
15039 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15040 if(type2->__anon1._class->__anon1.registered->dataType)
15041 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15042 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15043 exp->expType = type2;
15047 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)
15049 if(exp->__anon1.op.exp2->destType)
15050 FreeType(exp->__anon1.op.exp2->destType);
15051 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15052 if(type1->__anon1._class->__anon1.registered->dataType)
15053 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15054 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15055 exp->expType = type1;
15061 unsigned int valid = 0x0;
15063 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
15065 if(exp->__anon1.op.exp2->destType)
15066 FreeType(exp->__anon1.op.exp2->destType);
15067 if(!type1->__anon1._class->__anon1.registered->dataType)
15068 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0x0);
15069 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15070 exp->__anon1.op.exp2->destType->refCount++;
15071 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15074 type2 = exp->__anon1.op.exp2->destType;
15077 exp->expType = type2;
15080 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
15082 if(exp->__anon1.op.exp1->destType)
15083 FreeType(exp->__anon1.op.exp1->destType);
15084 if(!type2->__anon1._class->__anon1.registered->dataType)
15085 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0x0);
15086 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15087 exp->__anon1.op.exp1->destType->refCount++;
15088 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15089 type1 = exp->__anon1.op.exp1->destType;
15090 exp->expType = type1;
15093 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
15095 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
15096 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
15098 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
15100 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15102 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0x0, 0x0))
15105 FreeType(exp->expType);
15106 exp->expType = exp->__anon1.op.exp2->expType;
15107 if(exp->__anon1.op.exp2->expType)
15108 exp->__anon1.op.exp2->expType->refCount++;
15112 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15114 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0x0, 0x0))
15117 FreeType(exp->expType);
15118 exp->expType = exp->__anon1.op.exp1->expType;
15119 if(exp->__anon1.op.exp1->expType)
15120 exp->__anon1.op.exp1->expType->refCount++;
15127 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15129 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0x0, 0x0))
15132 FreeType(exp->expType);
15133 exp->expType = exp->__anon1.op.exp1->expType;
15134 if(exp->__anon1.op.exp1->expType)
15135 exp->__anon1.op.exp1->expType->refCount++;
15139 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15141 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0x0, 0x0))
15144 FreeType(exp->expType);
15145 exp->expType = exp->__anon1.op.exp2->expType;
15146 if(exp->__anon1.op.exp2->expType)
15147 exp->__anon1.op.exp2->expType->refCount++;
15155 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))
15157 if(exp->__anon1.op.exp1->destType)
15158 FreeType(exp->__anon1.op.exp1->destType);
15159 exp->__anon1.op.exp1->destType = type2;
15161 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15164 FreeType(exp->expType);
15165 exp->expType = exp->__anon1.op.exp1->destType;
15166 if(exp->__anon1.op.exp1->destType)
15167 exp->__anon1.op.exp1->destType->refCount++;
15172 if(exp->__anon1.op.exp2->destType)
15173 FreeType(exp->__anon1.op.exp2->destType);
15174 exp->__anon1.op.exp2->destType = type1;
15176 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
15179 FreeType(exp->expType);
15180 exp->expType = exp->__anon1.op.exp2->destType;
15181 if(exp->__anon1.op.exp2->destType)
15182 exp->__anon1.op.exp2->destType->refCount++;
15184 else if(type1 && type2)
15186 char expString1[10240];
15187 char expString2[10240];
15188 char type1String[1024];
15189 char type2String[1024];
15191 expString1[0] = '\0';
15192 expString2[0] = '\0';
15193 type1String[0] = '\0';
15194 type2String[0] = '\0';
15197 PrintExpression(exp->__anon1.op.exp1, expString1);
15198 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15199 PrintExpression(exp->__anon1.op.exp2, expString2);
15200 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15201 PrintType(exp->__anon1.op.exp1->expType, type1String, 0x0, 0x1);
15202 PrintType(exp->__anon1.op.exp2->expType, type2String, 0x0, 0x1);
15204 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
15205 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
15207 exp->expType = exp->__anon1.op.exp1->expType;
15208 if(exp->__anon1.op.exp1->expType)
15209 exp->__anon1.op.exp1->expType->refCount++;
15211 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15213 exp->expType = exp->__anon1.op.exp2->expType;
15214 if(exp->__anon1.op.exp2->expType)
15215 exp->__anon1.op.exp2->expType->refCount++;
15223 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15225 struct Type * oldType = exp->__anon1.op.exp1->expType;
15227 exp->__anon1.op.exp1->expType = (((void *)0));
15228 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15231 exp->__anon1.op.exp1->expType = oldType;
15233 if(exp->__anon1.op.exp1->destType)
15234 FreeType(exp->__anon1.op.exp1->destType);
15235 exp->__anon1.op.exp1->destType = type2;
15237 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15240 FreeType(exp->expType);
15241 exp->expType = exp->__anon1.op.exp1->destType;
15242 if(exp->__anon1.op.exp1->destType)
15243 exp->__anon1.op.exp1->destType->refCount++;
15247 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
15249 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
15251 if(exp->__anon1.op.exp1->destType)
15252 FreeType(exp->__anon1.op.exp1->destType);
15253 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15254 if(type2->__anon1._class->__anon1.registered->dataType)
15255 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15256 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15258 if(exp->__anon1.op.op == '!')
15260 exp->expType = MkClassType("bool");
15261 exp->expType->truth = 0x1;
15265 exp->expType = type2;
15270 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
15272 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
15274 if(exp->__anon1.op.exp2->destType)
15275 FreeType(exp->__anon1.op.exp2->destType);
15276 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15277 if(type1->__anon1._class->__anon1.registered->dataType)
15278 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15279 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15281 exp->expType = type1;
15287 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
15289 char expString[10000];
15291 expString[0] = '\0';
15294 PrintExpression(exp->__anon1.op.exp1, expString);
15295 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15298 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15300 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
15302 char expString[10240];
15304 expString[0] = '\0';
15307 PrintExpression(exp->__anon1.op.exp2, expString);
15308 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15311 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15315 FreeType(exp->expType);
15316 exp->expType = MkClassType("bool");
15317 exp->expType->truth = 0x1;
15319 if(exp->__anon1.op.op != SIZEOF)
15320 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
15321 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
15323 DeclareType(exp->__anon1.op.exp2->expType, 0x0, 0x0);
15325 yylloc = oldyylloc;
15334 struct Expression * e;
15336 exp->isConstant = 0x1;
15337 for(e = (*exp->__anon1.list).first; e; e = e->next)
15339 unsigned int inced = 0x0;
15343 FreeType(e->destType);
15344 e->opDestType = exp->opDestType;
15345 e->destType = exp->destType;
15348 exp->destType->refCount++;
15349 e->destType->count++;
15353 ProcessExpressionType(e);
15355 exp->destType->count--;
15356 if(!exp->expType && !e->next)
15358 exp->expType = e->expType;
15360 e->expType->refCount++;
15363 exp->isConstant = 0x0;
15365 e = (*exp->__anon1.list).first;
15366 if(!e->next && e->type == 8)
15368 struct Expression * next = exp->next, * prev = exp->prev;
15370 FreeType(exp->expType);
15371 FreeType(exp->destType);
15372 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
15376 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
15377 ProcessExpressionType(exp);
15383 struct Expression * e;
15385 exp->isConstant = 0x1;
15386 ProcessExpressionType(exp->__anon1.index.exp);
15387 if(!exp->__anon1.index.exp->isConstant)
15388 exp->isConstant = 0x0;
15389 if(exp->__anon1.index.exp->expType)
15391 struct Type * source = exp->__anon1.index.exp->expType;
15393 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
15395 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
15396 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
15398 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
15400 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0x0);
15401 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
15403 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0x0);
15405 if(type->kind == 8)
15406 type->constant = 0x1;
15407 else if(type->kind == 13)
15409 struct Type * t = type;
15411 while(t->kind == 13)
15412 t = t->__anon1.type;
15415 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
15420 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
15422 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
15425 FreeType(e->destType);
15426 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
15428 ProcessExpressionType(e);
15433 exp->isConstant = 0x0;
15436 exp->expType = Dereference(exp->__anon1.index.exp->expType);
15438 DeclareType(exp->expType, 0x0, 0x0);
15443 struct Expression * e;
15444 struct Type * functionType;
15445 struct Type * methodType = (((void *)0));
15451 PrintExpression(exp->__anon1.call.exp, name);
15452 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
15454 PrintExpression(exp->__anon1.call.exp, name);
15457 if(exp->__anon1.call.exp->type == 0)
15459 struct Expression * idExp = exp->__anon1.call.exp;
15460 struct Identifier * id = idExp->__anon1.__anon1.identifier;
15462 if(!strcmp(id->string, "__builtin_frame_address"))
15464 exp->expType = ProcessTypeString("void *", 0x1);
15465 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15466 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15469 else if(!strcmp(id->string, "__ENDIAN_PAD"))
15471 exp->expType = ProcessTypeString("int", 0x1);
15472 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15473 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15476 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
15478 struct Expression * a = (((void *)0));
15479 struct Expression * b = (((void *)0));
15480 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
15482 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
15484 a = (*exp->__anon1.call.arguments).first;
15485 b = (*exp->__anon1.call.arguments).last;
15489 else if((*exp->__anon1.call.arguments).count == 1)
15491 a = (*exp->__anon1.call.arguments).first;
15496 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
15497 idExp->__anon1.__anon1.identifier = (((void *)0));
15498 FreeExpContents(exp);
15499 ProcessExpressionType(a);
15501 ProcessExpressionType(b);
15503 exp->__anon1.list = MkList();
15504 if(a->expType && (!b || b->expType))
15506 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
15510 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15511 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
15512 struct Declaration * decl;
15513 char temp1[1024], temp2[1024];
15515 GetTypeSpecs(a->expType, specs);
15516 if(a && !a->isConstant && a->type != 0)
15518 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
15519 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
15520 tempExp1 = QMkExpId(temp1);
15521 tempExp1->expType = a->expType;
15523 a->expType->refCount++;
15524 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
15526 if(b && !b->isConstant && b->type != 0)
15528 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
15529 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
15530 tempExp2 = QMkExpId(temp2);
15531 tempExp2->expType = b->expType;
15533 b->expType->refCount++;
15534 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
15536 decl = MkDeclaration(specs, decls);
15537 if(!curCompound->__anon1.compound.declarations)
15538 curCompound->__anon1.compound.declarations = MkList();
15539 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
15543 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
15545 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
15547 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
15548 exp->expType = a->expType;
15550 a->expType->refCount++;
15552 else if(!strcmp(id->string, "Abs"))
15554 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
15555 exp->expType = a->expType;
15557 a->expType->refCount++;
15559 else if(!strcmp(id->string, "Sgn"))
15561 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '!', CopyExpression(tempExp1)))), MkListOne(MkExpConstant("0")), MkExpBrackets(MkListOne(MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpConstant("-1")), MkExpConstant("1"))))));
15562 exp->expType = ProcessTypeString("int", 0x0);
15564 FreeExpression(tempExp1);
15566 FreeExpression(tempExp2);
15567 FreeIdentifier(id);
15573 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
15575 if(!exp->__anon1.call.exp->destType)
15577 exp->__anon1.call.exp->destType = dummy;
15580 ProcessExpressionType(exp->__anon1.call.exp);
15581 if(exp->__anon1.call.exp->destType == dummy)
15584 exp->__anon1.call.exp->destType = (((void *)0));
15588 functionType = exp->__anon1.call.exp->expType;
15589 if(functionType && functionType->kind == 16)
15591 methodType = functionType;
15592 functionType = methodType->__anon1.__anon3.method->dataType;
15593 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
15595 char typeString[1024];
15597 typeString[0] = '\0';
15599 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
15601 functionType->__anon1.__anon2.thisClass = (((void *)0));
15602 PrintType(functionType, typeString, 0x1, 0x1);
15603 functionType->__anon1.__anon2.thisClass = back;
15605 if(strstr(typeString, "thisclass"))
15607 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15608 struct Declarator * decl;
15611 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15613 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
15614 if(thisClass != (exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass->templateClass ? exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass->templateClass : exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass))
15615 thisClassParams = 0x0;
15616 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15618 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
15620 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
15621 ProcessDeclarator(decl);
15622 thisClass = backupThisClass;
15624 thisClassParams = 0x1;
15625 functionType = ProcessType(specs, decl);
15626 functionType->refCount = 0;
15627 FinishTemplatesContext(context);
15629 FreeList(specs, FreeSpecifier);
15630 FreeDeclarator(decl);
15634 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
15636 struct Type * type = functionType->__anon1.type;
15638 if(!functionType->refCount)
15640 functionType->__anon1.type = (((void *)0));
15641 FreeType(functionType);
15643 functionType = type;
15645 if(functionType && functionType->kind != 11)
15647 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
15649 else if(functionType)
15651 unsigned int emptyParams = 0x0, noParams = 0x0;
15652 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
15653 struct Type * type = functionType->__anon1.__anon2.params.first;
15654 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
15656 struct Location oldyylloc = yylloc;
15660 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
15662 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
15665 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
15667 if(memberExp && memberExp->__anon1.member.exp && memberExp->__anon1.member.exp->expType && memberExp->__anon1.member.exp->expType->kind == 19 && memberExp->__anon1.member.exp->expType->__anon1._class)
15669 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
15672 e->destType = type;
15674 type = functionType->__anon1.__anon2.params.first;
15677 type->refCount = 0;
15679 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
15681 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
15682 type->byReference = functionType->byReference;
15683 type->typedByReference = functionType->typedByReference;
15686 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
15688 e->destType = type;
15690 type = functionType->__anon1.__anon2.params.first;
15693 type->refCount = 0;
15696 if(type && type->kind == 0)
15699 if(!type->refCount)
15701 type = (((void *)0));
15703 for(; e; e = e->next)
15705 if(!type && !emptyParams)
15708 if(methodType && methodType->__anon1.__anon3.methodClass)
15709 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many arguments for method %s::%s (%d given, expected %d)\n", (((void *)0))), methodType->__anon1.__anon3.methodClass->fullName, methodType->__anon1.__anon3.method->name, (*exp->__anon1.call.arguments).count, noParams ? 0 : functionType->__anon1.__anon2.params.count);
15711 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many arguments for function %s (%d given, expected %d)\n", (((void *)0))), name, (*exp->__anon1.call.arguments).count, noParams ? 0 : functionType->__anon1.__anon2.params.count);
15714 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
15716 struct Type * templatedType = (((void *)0));
15717 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
15718 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
15721 if(_class && _class->templateArgs)
15723 struct __ecereNameSpace__ecere__com__Class * sClass;
15725 for(sClass = _class; sClass; sClass = sClass->base)
15727 if(sClass->templateClass)
15728 sClass = sClass->templateClass;
15730 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
15732 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
15734 struct __ecereNameSpace__ecere__com__Class * nextClass;
15736 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
15738 if(nextClass->templateClass)
15739 nextClass = nextClass->templateClass;
15740 id += nextClass->templateParams.count;
15750 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
15752 unsigned int constant = type->constant;
15753 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
15756 struct Context * context = SetupTemplatesContext(_class);
15758 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
15759 FinishTemplatesContext(context);
15761 if(templatedType->kind == 8 && constant)
15762 templatedType->constant = 0x1;
15763 else if(templatedType->kind == 13)
15765 struct Type * t = templatedType->__anon1.type;
15767 while(t->kind == 13)
15768 t = t->__anon1.type;
15770 t->constant = constant;
15772 e->destType = templatedType;
15775 templatedType->passAsTemplate = 0x1;
15780 e->destType = type;
15787 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
15789 e->destType = type->prev;
15790 e->destType->refCount++;
15794 e->destType = type;
15799 if(type && type->kind != 14)
15801 struct Type * next = type->next;
15803 if(!type->refCount)
15808 if(type && type->kind != 14)
15810 if(methodType && methodType->__anon1.__anon3.methodClass)
15811 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough arguments for method %s::%s (%d given, expected %d)\n", (((void *)0))), methodType->__anon1.__anon3.methodClass->fullName, methodType->__anon1.__anon3.method->name, exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).count : 0, functionType->__anon1.__anon2.params.count + extra);
15813 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough arguments for function %s (%d given, expected %d)\n", (((void *)0))), name, exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).count : 0, functionType->__anon1.__anon2.params.count + extra);
15815 yylloc = oldyylloc;
15816 if(type && !type->refCount)
15821 functionType = __extension__ ({
15822 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15824 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
15826 if(exp->__anon1.call.exp->type == 0)
15828 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
15832 struct Symbol * symbol;
15833 struct Location oldyylloc = yylloc;
15835 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
15836 if(strstr(string, "__builtin_") == string)
15840 functionType->__anon1.__anon2.returnType = exp->destType;
15841 exp->destType->refCount++;
15845 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
15846 symbol = __extension__ ({
15847 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
15849 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 0x1), __ecereInstance1;
15851 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
15852 if(strstr(symbol->string, "::"))
15853 globalContext->hasNameSpace = 0x1;
15854 yylloc = oldyylloc;
15857 else if(exp->__anon1.call.exp->type == 8)
15861 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
15862 if(!functionType->__anon1.__anon2.returnType)
15864 functionType->__anon1.__anon2.returnType = __extension__ ({
15865 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15867 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
15871 if(functionType && functionType->kind == 11)
15873 exp->expType = functionType->__anon1.__anon2.returnType;
15874 if(functionType->__anon1.__anon2.returnType)
15875 functionType->__anon1.__anon2.returnType->refCount++;
15876 if(!functionType->refCount)
15877 FreeType(functionType);
15879 if(exp->__anon1.call.arguments)
15881 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
15883 struct Type * destType = e->destType;
15885 ProcessExpressionType(e);
15892 struct Type * type;
15893 struct Location oldyylloc = yylloc;
15894 unsigned int thisPtr;
15895 struct Expression * checkExp = exp->__anon1.member.exp;
15899 if(checkExp->type == 11)
15900 checkExp = checkExp->__anon1.cast.exp;
15901 else if(checkExp->type == 5)
15902 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
15906 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
15907 exp->thisPtr = thisPtr;
15908 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
15910 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
15912 ProcessExpressionType(exp->__anon1.member.exp);
15913 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)
15915 exp->isConstant = 0x0;
15918 exp->isConstant = exp->__anon1.member.exp->isConstant;
15919 type = exp->__anon1.member.exp->expType;
15921 if(type && (type->kind == 20))
15923 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
15924 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
15928 for(param = _class->templateParams.first; param; param = param->next)
15930 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
15934 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
15936 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
15940 struct Expression * expMember = exp->__anon1.member.exp;
15941 struct Declarator * decl;
15942 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15943 char thisClassTypeString[1024];
15945 FreeIdentifier(exp->__anon1.member.member);
15946 ProcessExpressionType(argExp);
15948 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
15952 char className[1024];
15953 struct __ecereNameSpace__ecere__com__Class * sClass;
15955 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
15956 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
15959 strcpy(thisClassTypeString, _class->fullName);
15961 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
15962 exp->expType = ProcessType(specs, decl);
15963 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
15965 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
15966 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
15968 int paramCount = 0;
15969 int lastParam = -1;
15970 char templateString[1024];
15971 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
15973 sprintf(templateString, "%s<", expClass->templateClass->fullName);
15974 for(cClass = expClass; cClass; cClass = cClass->base)
15978 for(param = cClass->templateParams.first; param; param = param->next)
15981 struct __ecereNameSpace__ecere__com__Class * sClass;
15982 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
15984 for(sClass = cClass->base; sClass; sClass = sClass->base)
15985 id += sClass->templateParams.count;
15986 arg = expClass->templateArgs[id];
15987 for(sClass = _class; sClass; sClass = sClass->base)
15989 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
15991 struct __ecereNameSpace__ecere__com__Class * nextClass;
15993 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
15994 p += nextClass->templateParams.count;
15995 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
15997 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
15999 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16001 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
16002 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
16009 char argument[256];
16011 argument[0] = '\0';
16012 switch(param->type)
16016 char expString[1024];
16017 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16018 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16019 struct Expression * exp;
16020 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16022 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16023 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16024 ProcessExpressionType(exp);
16025 ComputeExpression(exp);
16026 expString[0] = '\0';
16027 PrintExpression(exp, expString);
16028 strcat(argument, expString);
16029 FreeExpression(exp);
16034 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16039 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16041 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
16042 strcat(argument, thisClassTypeString);
16044 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16052 strcat(templateString, ", ");
16053 if(lastParam != p - 1)
16055 strcat(templateString, param->name);
16056 strcat(templateString, " = ");
16058 strcat(templateString, argument);
16067 int len = strlen(templateString);
16069 if(templateString[len - 1] == '>')
16070 templateString[len++] = ' ';
16071 templateString[len++] = '>';
16072 templateString[len++] = '\0';
16075 struct Context * context = SetupTemplatesContext(_class);
16077 FreeType(exp->expType);
16078 exp->expType = ProcessTypeString(templateString, 0x0);
16079 FinishTemplatesContext(context);
16083 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")))))))));
16086 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
16088 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
16091 if(type && (type->kind == 20))
16093 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)))
16095 struct Identifier * id = exp->__anon1.member.member;
16096 int typeKind = type->kind;
16097 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));
16099 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
16101 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
16106 if(typeKind == 3 || typeKind == 15)
16107 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
16110 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
16112 _class = type->__anon1._class->__anon1.registered;
16114 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
16116 _class = FindClass("char *")->__anon1.registered;
16118 else if(type->kind == 13)
16120 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
16121 FreeType(exp->expType);
16122 exp->expType = ProcessTypeString("uintptr", 0x0);
16123 exp->byReference = 0x1;
16127 char string[1024] = "";
16128 struct Symbol * classSym;
16130 PrintTypeNoConst(type, string, 0x0, 0x1);
16131 classSym = FindClass(string);
16133 _class = classSym->__anon1.registered;
16139 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
16140 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
16141 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
16142 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
16143 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
16145 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
16146 exp->__anon1.member.memberType = 1;
16147 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
16148 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
16151 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
16153 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16154 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
16156 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16158 member = (((void *)0));
16160 if(!member && !prop)
16161 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16162 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
16163 exp->__anon1.member.thisPtr = 0x1;
16167 unsigned int useMemberForNonConst = 0x0;
16171 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
16172 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);
16173 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16174 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
16176 if((!prop || useMemberForNonConst) && !member)
16178 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
16181 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16182 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);
16183 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16184 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16189 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
16190 prop = (((void *)0));
16192 member = (((void *)0));
16196 if(!prop && !member && !method)
16197 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
16198 if(!prop && !member && !method)
16202 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
16205 exp->__anon1.member.memberType = 5;
16206 exp->expType = ProcessTypeString(classProp->dataTypeString, 0x0);
16210 char structName[1024];
16211 struct Identifier * id = exp->__anon1.member.member;
16212 struct Expression * classExp = exp->__anon1.member.exp;
16215 FreeType(classExp->expType);
16216 classExp->expType = ProcessTypeString("ecere::com::Class", 0x0);
16217 strcpy(structName, "__ecereClassData_");
16218 FullClassNameCat(structName, type->__anon1._class->string, 0x0);
16220 exp->__anon1.member.member = id;
16221 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"))))))));
16223 ProcessExpressionType(exp);
16229 struct Symbol * classSym = FindClass(id->string);
16233 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
16236 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
16242 exp->__anon1.member.memberType = 1;
16243 if(!prop->dataType)
16244 ProcessPropertyType(prop);
16245 exp->expType = prop->dataType;
16246 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
16248 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16250 CopyTypeInto(type, exp->expType);
16251 type->refCount = 1;
16252 type->constant = 0x1;
16253 exp->expType = type;
16255 else if(prop->dataType)
16256 prop->dataType->refCount++;
16260 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16262 FreeExpContents(exp);
16264 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16265 ProcessExpressionType(exp);
16268 exp->__anon1.member.memberType = 3;
16269 DeclareStruct(_class->fullName, 0x0);
16270 if(!member->dataType)
16272 struct Context * context = SetupTemplatesContext(_class);
16274 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
16275 FinishTemplatesContext(context);
16277 exp->expType = member->dataType;
16278 if(member->dataType)
16279 member->dataType->refCount++;
16281 else if(revConvert)
16283 exp->__anon1.member.memberType = 4;
16284 exp->expType = MkClassType(revConvert->_class->fullName);
16289 exp->__anon1.member.memberType = 2;
16291 if(!method->dataType)
16292 ProcessMethodType(method);
16293 exp->expType = __extension__ ({
16294 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16296 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
16298 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
16299 exp->expType->__anon1.__anon3.usedClass = _class;
16301 else if(!classProp)
16303 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16305 FreeExpContents(exp);
16307 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16308 FreeType(exp->expType);
16309 exp->expType = MkClassType("ecere::com::Class");
16312 yylloc = exp->__anon1.member.member->loc;
16313 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
16315 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
16317 if(_class && exp->expType)
16319 struct __ecereNameSpace__ecere__com__Class * tClass;
16322 while(tClass && !tClass->templateClass)
16323 tClass = tClass->base;
16324 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
16327 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16328 struct __ecereNameSpace__ecere__com__Class * sClass;
16330 for(sClass = tClass; sClass; sClass = sClass->base)
16333 if(sClass->templateClass)
16334 sClass = sClass->templateClass;
16335 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16337 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
16339 for(sClass = sClass->base; sClass; sClass = sClass->base)
16340 id += sClass->templateParams.count;
16348 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
16350 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16351 struct Context * context = SetupTemplatesContext(tClass);
16352 unsigned int constant = exp->expType->constant;
16354 FreeType(exp->expType);
16355 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16356 if(exp->expType->kind == 8 && constant)
16357 exp->expType->constant = 0x1;
16358 else if(exp->expType->kind == 13)
16360 struct Type * t = exp->expType->__anon1.type;
16362 while(t->kind == 13)
16363 t = t->__anon1.type;
16365 t->constant = constant;
16369 if(exp->expType->kind == 21)
16371 FreeType(exp->expType);
16372 exp->expType = ReplaceThisClassType(_class);
16374 if(tClass->templateClass)
16375 exp->expType->passAsTemplate = 0x1;
16378 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16379 if(exp->destType->kind == 8 && constant)
16380 exp->destType->constant = 0x1;
16381 else if(exp->destType->kind == 13)
16383 struct Type * t = exp->destType->__anon1.type;
16385 while(t->kind == 13)
16386 t = t->__anon1.type;
16388 t->constant = constant;
16390 if(exp->destType->kind == 21)
16392 FreeType(exp->destType);
16393 exp->destType = ReplaceThisClassType(_class);
16397 FinishTemplatesContext(context);
16400 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)
16403 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16404 struct __ecereNameSpace__ecere__com__Class * sClass;
16406 for(sClass = tClass; sClass; sClass = sClass->base)
16409 if(sClass->templateClass)
16410 sClass = sClass->templateClass;
16411 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16413 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
16415 for(sClass = sClass->base; sClass; sClass = sClass->base)
16416 id += sClass->templateParams.count;
16426 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16427 struct Context * context = SetupTemplatesContext(tClass);
16428 struct Type * basicType;
16430 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16433 if(basicType->kind == 21)
16435 FreeType(basicType);
16436 basicType = ReplaceThisClassType(_class);
16438 FreeType(exp->expType);
16439 exp->expType = __extension__ ({
16440 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16442 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
16446 exp->destType = exp->expType;
16447 exp->destType->refCount++;
16450 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16451 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16452 struct Declarator * decl;
16454 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
16457 exp->destType->refCount++;
16459 exp->expType->refCount++;
16461 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
16462 exp->__anon1.cast.exp = newExp;
16465 FinishTemplatesContext(context);
16468 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
16470 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
16474 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
16477 int paramCount = 0;
16478 int lastParam = -1;
16479 char templateString[1024];
16480 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
16482 sprintf(templateString, "%s<", expClass->templateClass->fullName);
16483 while(cClass != expClass)
16485 struct __ecereNameSpace__ecere__com__Class * sClass;
16487 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
16490 for(param = cClass->templateParams.first; param; param = param->next)
16492 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
16495 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
16496 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
16498 while(cClassCur != tClass && !paramCur)
16500 struct __ecereNameSpace__ecere__com__Class * sClassCur;
16502 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
16504 cClassCur = sClassCur;
16505 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
16507 if(!strcmp(paramCur->name, param->name))
16514 if(paramCur && paramCur->type == 0)
16515 arg = tClass->templateArgs[cp];
16517 arg = expClass->templateArgs[p];
16519 char argument[256];
16521 argument[0] = '\0';
16522 switch(param->type)
16526 char expString[1024];
16527 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16528 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16529 struct Expression * exp;
16530 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16532 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16533 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16534 ProcessExpressionType(exp);
16535 ComputeExpression(exp);
16536 expString[0] = '\0';
16537 PrintExpression(exp, expString);
16538 strcat(argument, expString);
16539 FreeExpression(exp);
16544 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16549 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16550 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16557 strcat(templateString, ", ");
16558 if(lastParam != p - 1)
16560 strcat(templateString, param->name);
16561 strcat(templateString, " = ");
16563 strcat(templateString, argument);
16572 int len = strlen(templateString);
16574 if(templateString[len - 1] == '>')
16575 templateString[len++] = ' ';
16576 templateString[len++] = '>';
16577 templateString[len++] = '\0';
16579 FreeType(exp->expType);
16581 struct Context * context = SetupTemplatesContext(tClass);
16583 exp->expType = ProcessTypeString(templateString, 0x0);
16584 FinishTemplatesContext(context);
16591 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "undefined class %s\n", (((void *)0))), (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->string : (type->__anon1._class ? type->__anon1._class->string : (((void *)0)))) : "(null)");
16593 else if(type && (type->kind == 9 || type->kind == 10))
16595 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
16599 exp->expType = memberType;
16601 memberType->refCount++;
16606 char expString[10240];
16608 expString[0] = '\0';
16611 PrintExpression(exp, expString);
16612 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16614 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
16616 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
16618 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
16620 struct Identifier * id = exp->__anon1.member.member;
16621 struct __ecereNameSpace__ecere__com__Class * _class = (id && (!id->_class || id->_class->__anon1.__anon1.name)) ? (id->classSym ? id->classSym->__anon1.registered : (type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0)))) : (((void *)0));
16625 FreeType(exp->expType);
16626 exp->expType = ReplaceThisClassType(_class);
16630 yylloc = oldyylloc;
16635 struct Type * destType = exp->destType;
16637 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
16639 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
16641 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
16645 ProcessExpressionType(exp);
16652 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
16654 if(classSym && classSym->__anon1.registered)
16656 if(classSym->__anon1.registered->type == 5)
16661 DeclareStruct(classSym->string, 0x0);
16662 FreeSpecifier(exp->__anon1._class);
16664 FullClassNameCat(name, classSym->string, 0x0);
16665 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
16669 if(classSym->__anon1.registered->fixed)
16671 FreeSpecifier(exp->__anon1._class);
16672 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
16677 char className[1024];
16679 strcpy(className, "__ecereClass_");
16680 FullClassNameCat(className, classSym->string, 0x1);
16681 MangleClassName(className);
16682 DeclareClass(classSym, className);
16683 FreeExpContents(exp);
16685 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
16686 exp->__anon1.member.member = MkIdentifier("structSize");
16690 exp->expType = __extension__ ({
16691 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16693 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16699 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
16701 exp->expType = __extension__ ({
16702 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16704 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16706 exp->isConstant = 0x1;
16707 DeclareType(type, 0x0, 0x0);
16713 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
16716 FreeType(exp->__anon1.cast.exp->destType);
16717 exp->__anon1.cast.exp->destType = type;
16719 type->casted = 0x1;
16720 ProcessExpressionType(exp->__anon1.cast.exp);
16721 type->casted = 0x0;
16723 exp->expType = type;
16724 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
16726 void * prev = exp->prev, * next = exp->next;
16727 struct Type * expType = exp->__anon1.cast.exp->destType;
16728 struct Expression * castExp = exp->__anon1.cast.exp;
16729 struct Type * destType = exp->destType;
16732 expType->refCount++;
16733 FreeType(exp->expType);
16734 FreeTypeName(exp->__anon1.cast.typeName);
16736 FreeType(exp->expType);
16737 FreeType(exp->destType);
16738 exp->expType = expType;
16739 exp->destType = destType;
16740 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
16746 exp->isConstant = exp->__anon1.cast.exp->isConstant;
16752 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
16754 exp->expType = type;
16759 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
16761 ProcessExpressionType(exp->__anon1.vaArg.exp);
16762 exp->expType = type;
16767 struct Expression * e;
16769 exp->isConstant = 0x1;
16770 FreeType(exp->__anon1.cond.cond->destType);
16771 exp->__anon1.cond.cond->destType = MkClassType("bool");
16772 exp->__anon1.cond.cond->destType->truth = 0x1;
16773 ProcessExpressionType(exp->__anon1.cond.cond);
16774 if(!exp->__anon1.cond.cond->isConstant)
16775 exp->isConstant = 0x0;
16776 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
16780 FreeType(e->destType);
16781 e->destType = exp->destType;
16783 e->destType->refCount++;
16785 ProcessExpressionType(e);
16788 exp->expType = e->expType;
16790 e->expType->refCount++;
16793 exp->isConstant = 0x0;
16795 FreeType(exp->__anon1.cond.elseExp->destType);
16796 exp->__anon1.cond.elseExp->destType = exp->destType ? exp->destType : exp->expType;
16797 if(exp->__anon1.cond.elseExp->destType)
16798 exp->__anon1.cond.elseExp->destType->refCount++;
16799 ProcessExpressionType(exp->__anon1.cond.elseExp);
16800 if(!exp->__anon1.cond.elseExp->isConstant)
16801 exp->isConstant = 0x0;
16806 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
16808 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
16810 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
16812 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
16814 exp->destType->refCount++;
16816 ProcessStatement(exp->__anon1.compound);
16817 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
16819 exp->expType->refCount++;
16825 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
16827 if(spec && spec->type == 1)
16829 exp->expType = MkClassType(spec->__anon1.__anon1.name);
16830 exp->expType->kind = 19;
16831 exp->byReference = 0x1;
16835 exp->expType = MkClassType("ecere::com::Class");
16836 exp->byReference = 0x1;
16842 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
16846 struct Identifier * id = exp->__anon1.classData.id;
16847 char structName[1024];
16848 struct Expression * classExp;
16850 strcpy(structName, "__ecereClassData_");
16851 FullClassNameCat(structName, _class->fullName, 0x0);
16853 exp->__anon1.member.member = id;
16854 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0x0, 0x0))
16855 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
16857 classExp = MkExpIdentifier(MkIdentifier("class"));
16858 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"))))))));
16859 ProcessExpressionType(exp);
16866 struct Type * type = (((void *)0));
16867 const char * typeString = (((void *)0));
16868 char typeStringBuf[1024];
16870 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))
16872 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
16874 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
16876 else if(exp->__anon1.list)
16878 struct Expression * e;
16880 for(e = (*exp->__anon1.list).first; e; e = e->next)
16882 ProcessExpressionType(e);
16892 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
16896 e->expType = (((void *)0));
16897 e = (*exp->__anon1.list).first;
16898 ProcessExpressionType(e);
16901 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
16903 FreeType(e->expType);
16904 e->expType = (((void *)0));
16906 type = (((void *)0));
16914 FreeType(e->expType);
16915 e->expType = (((void *)0));
16921 typeStringBuf[0] = '\0';
16922 PrintTypeNoConst(type, typeStringBuf, 0x0, 0x1);
16923 typeString = typeStringBuf;
16925 type = (((void *)0));
16930 char templateString[1024];
16931 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
16932 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
16933 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16934 struct Expression * expExt;
16935 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
16937 sprintf(templateString, "Container<%s>", typeString);
16938 if(exp->__anon1.list)
16940 struct Expression * e;
16942 type = ProcessTypeString(typeString, 0x0);
16943 while(e = (*exp->__anon1.list).first)
16945 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
16946 e->destType = type;
16948 ProcessExpressionType(e);
16949 ListAdd(initializers, MkInitializerAssignment(e));
16952 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16954 DeclareStruct("ecere::com::BuiltInContainer", 0x0);
16955 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
16956 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16957 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
16958 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16959 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
16960 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16961 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
16962 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16963 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
16964 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16966 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, &(*initializers).count, (void *)0), __ecereInstance1;
16968 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16969 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, CopySpecifier), CopyDeclarator(decl))));
16970 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16971 exp->expType = ProcessTypeString(templateString, 0x0);
16973 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
16974 ProcessExpressionType(expExt);
16978 exp->expType = ProcessTypeString("Container", 0x0);
16979 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
16984 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
16986 FreeType(exp->expType);
16987 exp->expType = ReplaceThisClassType(thisClass);
16989 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)
16991 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 0x1, 0x0);
16995 if(exp->expType->kind != 15)
16997 struct Type * member;
16998 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
17000 FreeType(exp->expType);
17001 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17002 exp->expType->kind = symbol->type->kind;
17003 exp->expType->refCount++;
17004 exp->expType->__anon1.__anon1.enumName = enumName;
17005 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
17006 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17007 member->refCount++;
17011 struct __ecereNameSpace__ecere__sys__NamedLink * member;
17013 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17015 struct __ecereNameSpace__ecere__sys__NamedLink * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
17017 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
17023 if(exp->destType && (exp->destType->kind == 0 || exp->destType->kind == 18))
17025 else if(exp->destType && !exp->destType->keepCast)
17027 if(!CheckExpressionType(exp, exp->destType, 0x0, !exp->destType->casted))
17029 if(!exp->destType->count || unresolved)
17034 if(exp->destType->kind != 14)
17041 char expString[10240];
17043 expString[0] = '\0';
17044 PrintType(exp->destType, type2, 0x0, 0x1);
17047 PrintExpression(exp, expString);
17048 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17051 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
17052 else if(exp->type != 16)
17053 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
17058 char expString[10240];
17060 expString[0] = '\0';
17063 PrintExpression(exp, expString);
17064 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17067 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
17068 else if(exp->type != 16)
17069 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17081 PrintType(exp->expType, type1, 0x0, 0x1);
17082 PrintType(exp->destType, type2, 0x0, 0x1);
17084 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)))
17088 char expString[10240];
17090 expString[0] = '\0';
17093 PrintExpression(exp, expString);
17094 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17096 if(!sourceFile || (strcmp(sourceFile, "src\\lexer.ec") && strcmp(sourceFile, "src/lexer.ec") && strcmp(sourceFile, "src\\grammar.ec") && strcmp(sourceFile, "src/grammar.ec")))
17097 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
17098 FreeType(exp->expType);
17099 exp->destType->refCount++;
17100 exp->expType = exp->destType;
17105 else if(exp->destType && exp->destType->kind == 14 && exp->expType && exp->expType->passAsTemplate)
17107 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
17108 char typeString[1024];
17109 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17110 struct Declarator * decl;
17112 typeString[0] = '\0';
17115 exp->expType->refCount++;
17117 exp->expType->refCount++;
17119 newExp->destType = exp->expType;
17120 PrintType(exp->expType, typeString, 0x0, 0x0);
17121 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17122 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
17123 exp->__anon1.cast.exp = newExp;
17126 else if(unresolved)
17128 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
17129 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);
17130 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
17131 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
17133 else if(!exp->expType && exp->type != 16)
17135 char expString[10240];
17137 expString[0] = '\0';
17140 PrintExpression(exp, expString);
17141 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17143 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17146 ApplyAnyObjectLogic(exp);
17147 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)))
17149 exp->byReference = 0x1;
17151 yylloc = oldyylloc;
17154 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)
17158 *curMember = (*curMember)->next;
17159 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
17161 *curMember = subMemberStack[--(*subMemberStackPos)];
17162 *curMember = (*curMember)->next;
17164 while((*curMember) && (*curMember)->isProperty)
17165 *curMember = (*curMember)->next;
17166 if(subMemberStackPos)
17168 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17170 subMemberStack[(*subMemberStackPos)++] = *curMember;
17171 *curMember = (*curMember)->members.first;
17172 while(*curMember && (*curMember)->isProperty)
17173 *curMember = (*curMember)->next;
17181 if(subMemberStackPos && *subMemberStackPos)
17183 *curMember = subMemberStack[--(*subMemberStackPos)];
17184 *curMember = (*curMember)->next;
17188 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
17190 if(*curClass == _class)
17192 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
17194 *curMember = (*curClass)->membersAndProperties.first;
17196 while((*curMember) && (*curMember)->isProperty)
17197 *curMember = (*curMember)->next;
17198 if(subMemberStackPos)
17200 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17202 subMemberStack[(*subMemberStackPos)++] = *curMember;
17203 *curMember = (*curMember)->members.first;
17204 while(*curMember && (*curMember)->isProperty)
17205 *curMember = (*curMember)->next;
17212 static void ProcessInitializer(struct Initializer * init, struct Type * type)
17217 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
17219 if(init->__anon1.exp && !init->__anon1.exp->destType)
17221 FreeType(init->__anon1.exp->destType);
17222 init->__anon1.exp->destType = type;
17226 if(init->__anon1.exp)
17228 ProcessExpressionType(init->__anon1.exp);
17229 init->isConstant = init->__anon1.exp->isConstant;
17235 struct Expression * exp = init->__anon1.exp;
17236 struct Instantiation * inst = exp->__anon1.instance;
17237 struct MembersInit * members;
17240 init->__anon1.list = MkList();
17243 for(members = (*inst->members).first; members; members = members->next)
17245 if(members->type == 0)
17247 struct MemberInit * member;
17249 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
17251 ListAdd(init->__anon1.list, member->initializer);
17252 member->initializer = (((void *)0));
17257 FreeExpression(exp);
17261 struct Initializer * i;
17262 struct Type * initializerType = (((void *)0));
17263 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
17264 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
17265 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
17266 int subMemberStackPos = 0;
17268 if(type && type->kind == 12)
17269 initializerType = Dereference(type);
17270 else if(type && (type->kind == 9 || type->kind == 10))
17271 initializerType = type->__anon1.__anon1.members.first;
17272 for(i = (*init->__anon1.list).first; i; i = i->next)
17274 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17276 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
17279 if(!curMember->dataType)
17280 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0x0);
17281 initializerType = curMember->dataType;
17284 ProcessInitializer(i, initializerType);
17285 if(initializerType && type && (type->kind == 9 || type->kind == 10))
17286 initializerType = initializerType->next;
17288 init->isConstant = 0x0;
17290 if(type && type->kind == 12)
17291 FreeType(initializerType);
17292 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))
17294 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
17301 extern struct Symbol * FindType(struct Context * ctx, const char * name);
17303 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
17305 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct)
17311 if(spec->__anon1.specifier == THISCLASS)
17316 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17317 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17318 ProcessSpecifier(spec, declareStruct);
17325 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
17328 DeclareType(symbol->type, 0x1, 0x1);
17329 else if((symbol = spec->__anon1.__anon1.symbol) && symbol->__anon1.registered && symbol->__anon1.registered->type == 1 && declareStruct)
17330 DeclareStruct(spec->__anon1.__anon1.name, 0x0);
17335 struct Enumerator * e;
17337 if(spec->__anon1.__anon2.list)
17339 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
17342 ProcessExpressionType(e->exp);
17350 if(spec->__anon1.__anon2.definitions)
17352 struct ClassDef * def;
17353 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
17355 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
17362 static void ProcessDeclarator(struct Declarator * decl)
17367 if(decl->__anon1.identifier->classSym)
17369 FreeSpecifier(decl->__anon1.identifier->_class);
17370 decl->__anon1.identifier->_class = (((void *)0));
17374 if(decl->__anon1.array.exp)
17375 ProcessExpressionType(decl->__anon1.array.exp);
17382 if(decl->declarator)
17383 ProcessDeclarator(decl->declarator);
17384 if(decl->type == 4)
17386 struct Identifier * id = GetDeclId(decl);
17388 if(id && id->_class)
17390 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(id->_class), param->declarator = (((void *)0)), param);
17392 if(!decl->__anon1.function.parameters)
17393 decl->__anon1.function.parameters = MkList();
17394 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
17395 id->_class = (((void *)0));
17397 if(decl->__anon1.function.parameters)
17399 struct TypeName * param;
17401 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
17403 if(param->qualifiers && (*param->qualifiers).first)
17405 struct Specifier * spec = (*param->qualifiers).first;
17407 if(spec && spec->__anon1.specifier == TYPED_OBJECT)
17409 struct Declarator * d = param->declarator;
17410 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);
17413 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
17414 FreeList(param->qualifiers, FreeSpecifier);
17415 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
17416 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
17417 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
17420 else if(spec && spec->__anon1.specifier == ANY_OBJECT)
17422 struct Declarator * d = param->declarator;
17424 FreeList(param->qualifiers, FreeSpecifier);
17425 param->qualifiers = MkListOne(MkSpecifier(VOID));
17427 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
17428 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
17430 else if(spec->__anon1.specifier == THISCLASS)
17435 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17436 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17437 ProcessSpecifier(spec, 0x0);
17441 if(param->declarator)
17442 ProcessDeclarator(param->declarator);
17450 extern struct Identifier * CopyIdentifier(struct Identifier * id);
17452 extern void FreeInitDeclarator(struct InitDeclarator * decl);
17454 static void ProcessDeclaration(struct Declaration * decl)
17456 yylloc = decl->loc;
17461 unsigned int declareStruct = 0x0;
17463 if(decl->__anon1.__anon1.declarators)
17465 struct InitDeclarator * d;
17467 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17469 struct Type * type, * subType;
17471 ProcessDeclarator(d->declarator);
17472 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17475 ProcessInitializer(d->initializer, type);
17476 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
17478 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
17480 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
17482 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
17483 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
17484 if(decl->__anon1.__anon1.specifiers)
17485 FreeList(decl->__anon1.__anon1.specifiers, FreeSpecifier);
17486 FreeList(decl->__anon1.__anon1.declarators, FreeInitDeclarator);
17489 decl->__anon1.inst = inst;
17493 for(subType = type; subType; )
17495 if(subType->kind == 8)
17497 declareStruct = 0x1;
17500 else if(subType->kind == 13)
17502 else if(subType->kind == 12)
17503 subType = subType->__anon1.__anon4.arrayType;
17512 if(decl->__anon1.__anon1.specifiers)
17514 struct Specifier * s;
17516 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
17518 ProcessSpecifier(s, declareStruct);
17525 ProcessInstantiationType(decl->__anon1.inst);
17530 struct Specifier * spec;
17531 struct Declarator * d;
17532 unsigned int declareStruct = 0x0;
17534 if(decl->__anon1.__anon1.declarators)
17536 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17538 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17539 struct Type * subType;
17541 ProcessDeclarator(d);
17542 for(subType = type; subType; )
17544 if(subType->kind == 8)
17546 declareStruct = 0x1;
17549 else if(subType->kind == 13)
17551 else if(subType->kind == 12)
17552 subType = subType->__anon1.__anon4.arrayType;
17559 if(decl->__anon1.__anon1.specifiers)
17561 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
17562 ProcessSpecifier(spec, declareStruct);
17569 static struct FunctionDefinition * curFunction;
17571 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
17573 char propName[1024], propNameM[1024];
17574 char getName[1024], setName[1024];
17575 struct __ecereNameSpace__ecere__sys__OldList * args;
17577 DeclareProperty(prop, setName, getName);
17578 strcpy(propName, "__ecereProp_");
17579 FullClassNameCat(propName, prop->_class->fullName, 0x0);
17580 strcat(propName, "_");
17581 FullClassNameCat(propName, prop->name, 0x1);
17582 MangleClassName(propName);
17583 strcpy(propNameM, "__ecerePropM_");
17584 FullClassNameCat(propNameM, prop->_class->fullName, 0x0);
17585 strcat(propNameM, "_");
17586 FullClassNameCat(propNameM, prop->name, 0x1);
17587 MangleClassName(propNameM);
17588 if(prop->isWatchable)
17591 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17592 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17593 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17595 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17596 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17597 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17601 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17602 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17603 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17605 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17606 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17607 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17609 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
17610 curFunction->propSet->fireWatchersDone = 0x1;
17613 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
17615 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
17617 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
17619 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
17621 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
17623 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
17625 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
17627 extern void FreePropertyWatch(struct PropertyWatch * watcher);
17629 static void ProcessStatement(struct Statement * stmt)
17631 yylloc = stmt->loc;
17635 ProcessStatement(stmt->__anon1.labeled.stmt);
17638 if(stmt->__anon1.caseStmt.exp)
17640 FreeType(stmt->__anon1.caseStmt.exp->destType);
17641 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
17643 curSwitchType->refCount++;
17644 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
17645 ComputeExpression(stmt->__anon1.caseStmt.exp);
17647 if(stmt->__anon1.caseStmt.stmt)
17648 ProcessStatement(stmt->__anon1.caseStmt.stmt);
17652 if(stmt->__anon1.compound.context)
17654 struct Declaration * decl;
17655 struct Statement * s;
17656 struct Statement * prevCompound = curCompound;
17657 struct Context * prevContext = curContext;
17659 if(!stmt->__anon1.compound.isSwitch)
17660 curCompound = stmt;
17661 curContext = stmt->__anon1.compound.context;
17662 if(stmt->__anon1.compound.declarations)
17664 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
17665 ProcessDeclaration(decl);
17667 if(stmt->__anon1.compound.statements)
17669 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
17670 ProcessStatement(s);
17672 curContext = prevContext;
17673 curCompound = prevCompound;
17679 struct Expression * exp;
17681 if(stmt->__anon1.expressions)
17683 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
17684 ProcessExpressionType(exp);
17690 struct Expression * exp;
17692 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
17693 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
17694 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 0x1;
17695 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
17697 ProcessExpressionType(exp);
17699 if(stmt->__anon1.ifStmt.stmt)
17700 ProcessStatement(stmt->__anon1.ifStmt.stmt);
17701 if(stmt->__anon1.ifStmt.elseStmt)
17702 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
17707 struct Type * oldSwitchType = curSwitchType;
17709 if(stmt->__anon1.switchStmt.exp)
17711 struct Expression * exp;
17713 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
17717 ProcessExpressionType(exp);
17720 curSwitchType = exp->expType;
17723 ProcessStatement(stmt->__anon1.switchStmt.stmt);
17724 curSwitchType = oldSwitchType;
17729 if(stmt->__anon1.whileStmt.exp)
17731 struct Expression * exp;
17733 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
17734 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
17735 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 0x1;
17736 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
17738 ProcessExpressionType(exp);
17741 if(stmt->__anon1.whileStmt.stmt)
17742 ProcessStatement(stmt->__anon1.whileStmt.stmt);
17747 if(stmt->__anon1.doWhile.exp)
17749 struct Expression * exp;
17751 if((*stmt->__anon1.doWhile.exp).last)
17753 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
17754 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
17755 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 0x1;
17757 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
17759 ProcessExpressionType(exp);
17762 if(stmt->__anon1.doWhile.stmt)
17763 ProcessStatement(stmt->__anon1.doWhile.stmt);
17768 struct Expression * exp;
17770 if(stmt->__anon1.forStmt.init)
17771 ProcessStatement(stmt->__anon1.forStmt.init);
17772 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
17774 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
17775 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
17776 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 0x1;
17778 if(stmt->__anon1.forStmt.check)
17779 ProcessStatement(stmt->__anon1.forStmt.check);
17780 if(stmt->__anon1.forStmt.increment)
17782 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
17783 ProcessExpressionType(exp);
17785 if(stmt->__anon1.forStmt.stmt)
17786 ProcessStatement(stmt->__anon1.forStmt.stmt);
17791 struct Identifier * id = stmt->__anon1.forEachStmt.id;
17792 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
17793 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
17794 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
17795 char iteratorType[1024];
17796 struct Type * source;
17797 struct Expression * e;
17798 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));
17799 struct Expression * arrayExp;
17800 const char * typeString = (((void *)0));
17801 int builtinCount = 0;
17803 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
17807 FreeType(e->destType);
17808 e->destType = ProcessTypeString("Container", 0x0);
17810 if(!isBuiltin || e->next)
17811 ProcessExpressionType(e);
17813 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
17814 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)))
17816 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
17817 struct Symbol * symbol;
17818 struct Expression * expIt = (((void *)0));
17819 unsigned int isMap = 0x0, isArray = 0x0, isLinkList = 0x0, isList = 0x0, isCustomAVLTree = 0x0;
17820 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
17821 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
17822 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
17825 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
17826 stmt->__anon1.compound.context->parent = curContext;
17827 curContext = stmt->__anon1.compound.context;
17828 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
17830 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
17832 isCustomAVLTree = 0x1;
17833 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
17836 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
17838 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
17840 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
17843 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
17847 struct Declarator * decl;
17848 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17850 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
17851 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17852 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
17856 struct Type * type = (((void *)0));
17857 char typeStringBuf[1024];
17859 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
17860 if(((struct Expression *)(*exp).last)->type == 11)
17862 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
17865 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
17867 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)
17869 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
17871 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
17873 else if(arrayExp->__anon1.list)
17875 struct Expression * e;
17877 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
17879 ProcessExpressionType(e);
17889 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
17893 e->expType = (((void *)0));
17894 e = (*arrayExp->__anon1.list).first;
17895 ProcessExpressionType(e);
17898 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
17900 FreeType(e->expType);
17901 e->expType = (((void *)0));
17903 type = (((void *)0));
17911 FreeType(e->expType);
17912 e->expType = (((void *)0));
17918 typeStringBuf[0] = '\0';
17919 PrintType(type, typeStringBuf, 0x0, 0x1);
17920 typeString = typeStringBuf;
17926 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
17927 struct Declarator * decl;
17928 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17930 if(arrayExp->__anon1.list)
17932 struct Expression * e;
17934 builtinCount = (*arrayExp->__anon1.list).count;
17935 type = ProcessTypeString(typeString, 0x0);
17936 while(e = (*arrayExp->__anon1.list).first)
17938 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
17939 e->destType = type;
17941 ProcessExpressionType(e);
17942 ListAdd(initializers, MkInitializerAssignment(e));
17945 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
17947 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
17948 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, CopySpecifier), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
17949 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
17950 FreeList(exp, FreeExpression);
17954 arrayExp->expType = ProcessTypeString("Container", 0x0);
17955 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
17958 else if(isLinkList && !isList)
17960 struct Declarator * decl;
17961 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17963 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
17964 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17965 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
17967 else if(_class->templateArgs)
17970 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
17972 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
17973 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)))))))));
17975 symbol = FindSymbol(id->string, curContext, curContext, 0x0, 0x0);
17978 switch(block->type)
17981 if(block->__anon1.compound.context)
17982 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17985 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
17986 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17987 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
17988 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17991 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
17992 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17995 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
17996 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17999 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
18000 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18003 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
18004 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18007 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
18008 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18014 block = MkIfStmt(filter, block, (((void *)0)));
18018 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));
18019 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18020 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18021 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18027 sprintf(count, "%d", builtinCount);
18028 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));
18029 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18030 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18031 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18033 else if(isLinkList && !isList)
18035 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
18036 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
18038 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
18040 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));
18044 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18045 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18047 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));
18049 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18050 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18051 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18055 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
18057 ProcessExpressionType(expIt);
18058 if((*stmt->__anon1.compound.declarations).first)
18059 ProcessDeclaration((*stmt->__anon1.compound.declarations).first);
18061 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
18062 ProcessStatement(stmt);
18063 curContext = stmt->__anon1.compound.context->parent;
18068 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
18080 struct Expression * exp;
18082 if(stmt->__anon1.expressions)
18084 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
18088 if(curFunction && !curFunction->type)
18089 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
18090 FreeType(exp->destType);
18091 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
18093 exp->destType->refCount++;
18095 ProcessExpressionType(exp);
18102 ProcessDeclaration(stmt->__anon1.decl);
18107 struct AsmField * field;
18109 if(stmt->__anon1.asmStmt.inputFields)
18111 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
18112 if(field->expression)
18113 ProcessExpressionType(field->expression);
18115 if(stmt->__anon1.asmStmt.outputFields)
18117 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
18118 if(field->expression)
18119 ProcessExpressionType(field->expression);
18121 if(stmt->__anon1.asmStmt.clobberedFields)
18123 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
18125 if(field->expression)
18126 ProcessExpressionType(field->expression);
18133 struct PropertyWatch * propWatch;
18134 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18135 struct Expression * object = stmt->__anon1._watch.object;
18136 struct Expression * watcher = stmt->__anon1._watch.watcher;
18139 ProcessExpressionType(watcher);
18141 ProcessExpressionType(object);
18144 if(watcher || thisClass)
18146 struct External * external = curExternal;
18147 struct Context * context = curContext;
18150 stmt->__anon1.expressions = MkList();
18151 curExternal = external->prev;
18152 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18154 struct ClassFunction * func;
18155 char watcherName[1024];
18156 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;
18157 struct External * createdExternal;
18158 struct External * externalDecl = MkExternalDeclaration((((void *)0)));
18160 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, externalDecl);
18161 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
18162 if(propWatch->deleteWatch)
18163 strcat(watcherName, "_delete");
18166 struct Identifier * propID;
18168 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18170 strcat(watcherName, "_");
18171 strcat(watcherName, propID->string);
18174 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
18176 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)));
18177 ProcessClassFunctionBody(func, propWatch->compound);
18178 propWatch->compound = (((void *)0));
18179 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 0x1);
18180 createdExternal->symbol->idCode = external->symbol->idCode;
18181 curExternal = createdExternal;
18182 ProcessFunction(createdExternal->__anon1.function);
18184 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(createdExternal->__anon1.function->declarator), (((void *)0)))));
18186 externalDecl->__anon1.declaration = decl;
18187 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
18188 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
18190 if(propWatch->deleteWatch)
18192 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18194 ListAdd(args, CopyExpression(object));
18195 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18196 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18197 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
18201 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
18202 struct Identifier * propID;
18204 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18206 char propName[1024];
18207 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18211 char getName[1024], setName[1024];
18212 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18214 DeclareProperty(prop, setName, getName);
18215 strcpy(propName, "__ecereProp_");
18216 FullClassNameCat(propName, prop->_class->fullName, 0x0);
18217 strcat(propName, "_");
18218 FullClassNameCat(propName, prop->name, 0x1);
18219 ListAdd(args, CopyExpression(object));
18220 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18221 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18222 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18223 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
18226 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18231 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
18233 curExternal = external;
18234 curContext = context;
18236 FreeExpression(watcher);
18238 FreeExpression(object);
18239 FreeList(watches, FreePropertyWatch);
18242 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a _class\n", (((void *)0))));
18246 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18248 ProcessStatement(propWatch->compound);
18255 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18256 struct Expression * object = stmt->__anon1._watch.object;
18257 struct __ecereNameSpace__ecere__com__Class * _class;
18260 ProcessExpressionType(object);
18263 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
18266 struct Identifier * propID;
18269 stmt->__anon1.expressions = MkList();
18270 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
18272 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
18279 for(propID = (*watches).first; propID; propID = propID->next)
18281 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18285 CreateFireWatcher(prop, object, stmt);
18288 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18293 struct __ecereNameSpace__ecere__com__Property * prop;
18294 struct __ecereNameSpace__ecere__com__Class * base;
18296 for(base = _class; base; base = base->base)
18298 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
18300 if(prop->isProperty && prop->isWatchable)
18302 CreateFireWatcher(prop, object, stmt);
18308 FreeExpression(object);
18309 FreeList(watches, FreeIdentifier);
18312 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18318 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18319 struct Expression * object = stmt->__anon1._watch.object;
18320 struct Expression * watcher = stmt->__anon1._watch.watcher;
18321 struct __ecereNameSpace__ecere__com__Class * _class;
18324 ProcessExpressionType(object);
18326 ProcessExpressionType(watcher);
18329 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
18330 if(watcher || thisClass)
18334 struct Identifier * propID;
18337 stmt->__anon1.expressions = MkList();
18340 struct __ecereNameSpace__ecere__sys__OldList * args;
18343 ListAdd(args, CopyExpression(object));
18344 ListAdd(args, MkExpConstant("0"));
18345 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18346 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18350 for(propID = (*watches).first; propID; propID = propID->next)
18352 char propName[1024];
18353 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18357 char getName[1024], setName[1024];
18358 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18360 DeclareProperty(prop, setName, getName);
18361 strcpy(propName, "__ecereProp_");
18362 FullClassNameCat(propName, prop->_class->fullName, 0x0);
18363 strcat(propName, "_");
18364 FullClassNameCat(propName, prop->name, 0x1);
18365 MangleClassName(propName);
18366 ListAdd(args, CopyExpression(object));
18367 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18368 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18369 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18372 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18376 FreeExpression(object);
18378 FreeExpression(watcher);
18379 FreeList(watches, FreeIdentifier);
18382 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18385 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
18392 extern struct Expression * QBrackets(struct Expression * exp);
18394 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
18396 extern struct Declarator * QMkPtrDecl(const char * id);
18398 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
18400 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
18402 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
18404 static void ProcessFunction(struct FunctionDefinition * function)
18406 struct Identifier * id = GetDeclId(function->declarator);
18407 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18408 struct Type * type = symbol ? symbol->type : (((void *)0));
18409 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18410 struct Context * oldTopContext = topContext;
18412 yylloc = function->loc;
18413 if(type && type->__anon1.__anon2.thisClass)
18415 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18416 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18417 char className[1024];
18418 char structName[1024];
18419 struct Declarator * funcDecl;
18420 struct Symbol * thisSymbol;
18421 unsigned int typedObject = 0x0;
18423 if(_class && !_class->base)
18425 _class = currentClass;
18426 if(_class && !_class->symbol)
18427 _class->symbol = FindClass(_class->fullName);
18428 classSym = _class ? _class->symbol : (((void *)0));
18431 thisClass = _class;
18432 if(inCompiler && _class)
18434 if(type->kind == 11)
18436 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18438 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18440 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18443 if(type->classObjectType != 1)
18445 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18446 symbol->type->__anon1.__anon2.staticMethod = 0x1;
18447 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18448 symbol->type->extraParam = 0x0;
18451 strcpy(className, "__ecereClass_");
18452 FullClassNameCat(className, _class->fullName, 0x1);
18453 MangleClassName(className);
18454 structName[0] = (char)0;
18455 FullClassNameCat(structName, _class->fullName, 0x0);
18456 funcDecl = GetFuncDecl(function->declarator);
18459 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18461 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18463 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18465 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18466 FreeTypeName(param);
18469 if(!function->propertyNoThis)
18471 struct TypeName * thisParam;
18473 if(type->classObjectType != 1)
18475 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18476 if(!funcDecl->__anon1.function.parameters)
18477 funcDecl->__anon1.function.parameters = MkList();
18478 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18482 if(type->classObjectType != 1)
18484 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18485 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18487 thisParam = __extension__ ({
18488 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18490 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18492 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18496 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18498 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18500 funcDecl = GetFuncDecl(initDecl->declarator);
18503 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18505 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18507 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18509 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18510 FreeTypeName(param);
18513 if(type->classObjectType != 1)
18515 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18517 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18519 if(!funcDecl->__anon1.function.parameters)
18520 funcDecl->__anon1.function.parameters = MkList();
18521 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18529 if(type->classObjectType != 1)
18531 thisSymbol = __extension__ ({
18532 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18534 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18536 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18537 if(typedObject && thisSymbol->type)
18539 thisSymbol->type->classObjectType = 2;
18540 thisSymbol->type->byReference = type->byReference;
18541 thisSymbol->type->typedByReference = type->byReference;
18545 if(inCompiler && _class && (_class->type == 0) && type->classObjectType != 1)
18547 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18550 struct __ecereNameSpace__ecere__com__Class * base;
18552 for(base = _class; base && base->type != 1000; base = base->next)
18554 for(member = base->membersAndProperties.first; member; member = member->next)
18555 if(!member->isProperty)
18561 for(member = _class->membersAndProperties.first; member; member = member->next)
18562 if(!member->isProperty)
18566 char pointerName[1024];
18567 struct Declaration * decl;
18568 struct Initializer * initializer;
18569 struct Expression * exp, * bytePtr;
18571 strcpy(pointerName, "__ecerePointer_");
18572 FullClassNameCat(pointerName, _class->fullName, 0x0);
18574 char className[1024];
18576 strcpy(className, "__ecereClass_");
18577 FullClassNameCat(className, classSym->string, 0x1);
18578 MangleClassName(className);
18579 DeclareClass(classSym, className);
18581 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18586 sprintf(string, "%d", _class->offset);
18587 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpConstant(string)));
18591 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
18593 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
18594 exp->expType = __extension__ ({
18595 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18597 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
18598 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18600 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
18601 }), __ecereInstance2;
18605 yylloc = function->body->loc;
18606 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
18608 struct Context * prevContext = curContext;
18610 curContext = function->body->__anon1.compound.context;
18611 decl = MkDeclaration(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
18612 curContext = prevContext;
18614 decl->symbol = (((void *)0));
18615 if(!function->body->__anon1.compound.declarations)
18616 function->body->__anon1.compound.declarations = MkList();
18617 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
18623 thisClass = (((void *)0));
18626 FreeSpecifier(id->_class);
18627 id->_class = (((void *)0));
18628 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18630 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18632 id = GetDeclId(initDecl->declarator);
18633 FreeSpecifier(id->_class);
18634 id->_class = (((void *)0));
18638 topContext = function->body->__anon1.compound.context;
18640 struct FunctionDefinition * oldFunction = curFunction;
18642 curFunction = function;
18644 ProcessStatement(function->body);
18645 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
18647 struct Statement * prevCompound = curCompound;
18648 struct Context * prevContext = curContext;
18649 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
18651 if(!function->body->__anon1.compound.statements)
18652 function->body->__anon1.compound.statements = MkList();
18653 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
18654 curCompound = function->body;
18655 curContext = function->body->__anon1.compound.context;
18656 ProcessStatement(fireWatchers);
18657 curContext = prevContext;
18658 curCompound = prevCompound;
18660 curFunction = oldFunction;
18662 if(function->declarator)
18664 ProcessDeclarator(function->declarator);
18666 topContext = oldTopContext;
18667 thisClass = oldThisClass;
18670 extern void FreeSymbol(struct Symbol * symbol);
18672 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
18674 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
18676 struct ClassDef * def;
18677 struct External * external = curExternal;
18678 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
18680 for(def = definitions->first; def; def = def->next)
18684 if(def->__anon1.function->declarator)
18685 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
18687 curExternal = external;
18688 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
18690 else if(def->type == 2)
18692 if(def->__anon1.decl->type == 2)
18694 thisClass = regClass;
18695 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
18696 thisClass = (((void *)0));
18700 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
18703 thisClass = regClass;
18704 ProcessDeclaration(def->__anon1.decl);
18705 thisClass = backThisClass;
18708 else if(def->type == 1 && def->__anon1.defProperties)
18710 struct MemberInit * defProperty;
18711 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);
18713 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18714 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
18716 thisClass = regClass;
18717 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
18718 thisClass = (((void *)0));
18720 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18721 FreeSymbol(thisSymbol);
18723 else if(def->type == 3 && def->__anon1.propertyDef)
18725 struct PropertyDef * prop = def->__anon1.propertyDef;
18727 thisClass = regClass;
18732 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18734 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18736 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
18737 ProcessStatement(prop->setStmt);
18743 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18745 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18747 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
18748 ProcessStatement(prop->getStmt);
18750 if(prop->issetStmt)
18754 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18756 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18758 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
18759 ProcessStatement(prop->issetStmt);
18761 thisClass = (((void *)0));
18763 else if(def->type == 4 && def->__anon1.propertyWatch)
18765 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
18767 thisClass = regClass;
18768 if(propertyWatch->compound)
18770 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);
18772 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18773 curExternal = (((void *)0));
18774 ProcessStatement(propertyWatch->compound);
18776 thisClass = (((void *)0));
18781 void DeclareFunctionUtil(const char * s)
18783 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
18790 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
18791 strcpy(name, "__ecereFunction_");
18792 FullClassNameCat(name, s, 0x0);
18793 DeclareFunction(function, name);
18797 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
18799 void ComputeDataTypes()
18801 struct External * external;
18802 struct External * temp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_External);
18803 struct External * after = (((void *)0));
18805 currentClass = (((void *)0));
18806 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
18807 for(external = (*ast).first; external; external = external->next)
18809 if(external->type == 1)
18811 struct Declaration * decl = external->__anon1.declaration;
18815 struct __ecereNameSpace__ecere__sys__OldList * decls = decl->__anon1.__anon1.declarators;
18819 struct InitDeclarator * initDecl = (*decls).first;
18823 struct Declarator * declarator = initDecl->declarator;
18825 if(declarator && declarator->type == 1)
18827 struct Identifier * id = declarator->__anon1.identifier;
18829 if(id && id->string)
18831 if(!strcmp(id->string, "uintptr_t") || !strcmp(id->string, "intptr_t") || !strcmp(id->string, "size_t") || !strcmp(id->string, "ssize_t"))
18833 external->symbol->id = -1001, external->symbol->idCode = -1001;
18843 temp->symbol = __extension__ ({
18844 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18846 __ecereInstance1->id = -1000, __ecereInstance1->idCode = -1000, __ecereInstance1;
18848 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, temp);
18849 curExternal = temp;
18850 DeclareFunctionUtil("eSystem_New");
18851 DeclareFunctionUtil("eSystem_New0");
18852 DeclareFunctionUtil("eSystem_Renew");
18853 DeclareFunctionUtil("eSystem_Renew0");
18854 DeclareFunctionUtil("eSystem_Delete");
18855 DeclareFunctionUtil("eClass_GetProperty");
18856 DeclareFunctionUtil("eClass_SetProperty");
18857 DeclareFunctionUtil("eInstance_FireSelfWatchers");
18858 DeclareFunctionUtil("eInstance_SetMethod");
18859 DeclareFunctionUtil("eInstance_IncRef");
18860 DeclareFunctionUtil("eInstance_StopWatching");
18861 DeclareFunctionUtil("eInstance_Watch");
18862 DeclareFunctionUtil("eInstance_FireWatchers");
18863 DeclareStruct("ecere::com::Class", 0x0);
18864 DeclareStruct("ecere::com::Instance", 0x0);
18865 DeclareStruct("ecere::com::Property", 0x0);
18866 DeclareStruct("ecere::com::DataMember", 0x0);
18867 DeclareStruct("ecere::com::Method", 0x0);
18868 DeclareStruct("ecere::com::SerialBuffer", 0x0);
18869 DeclareStruct("ecere::com::ClassTemplateArgument", 0x0);
18870 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), temp);
18871 for(external = (*ast).first; external; external = external->next)
18873 afterExternal = curExternal = external;
18874 if(external->type == 0)
18876 currentClass = external->__anon1.function->_class;
18877 ProcessFunction(external->__anon1.function);
18879 else if(external->type == 1)
18881 currentClass = (((void *)0));
18882 if(external->__anon1.declaration)
18883 ProcessDeclaration(external->__anon1.declaration);
18885 else if(external->type == 2)
18887 struct ClassDefinition * _class = external->__anon1._class;
18889 currentClass = external->symbol->__anon1.registered;
18890 if(_class->definitions)
18892 ProcessClass(_class->definitions, _class->symbol);
18896 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
18897 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
18900 else if(external->type == 4)
18902 thisNameSpace = external->__anon1.id->string;
18905 currentClass = (((void *)0));
18906 thisNameSpace = (((void *)0));
18907 curExternal = (((void *)0));
18908 ((temp->symbol ? (__ecereClass_Symbol->Destructor ? __ecereClass_Symbol->Destructor((void *)temp->symbol) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp->symbol)) : 0), temp->symbol = 0);
18909 ((temp ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)temp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp)) : 0), temp = 0);
18912 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);
18914 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);
18916 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
18918 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
18920 struct __ecereNameSpace__ecere__com__Class * class;
18922 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
18923 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
18924 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
18925 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
18926 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
18927 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
18928 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
18929 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
18930 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
18931 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
18932 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
18933 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
18934 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
18935 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
18936 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
18937 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
18938 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
18939 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
18940 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
18941 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
18942 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
18943 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
18944 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
18945 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
18946 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
18947 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
18948 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
18949 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
18950 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
18951 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
18952 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
18953 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
18954 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
18955 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
18956 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
18957 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
18958 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
18959 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
18960 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
18961 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
18962 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
18963 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
18964 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
18965 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
18966 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
18967 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
18968 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
18969 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
18970 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
18971 __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);
18972 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "void DeclareStruct(const char * name, bool skipNoHead)", DeclareStruct, module, 2);
18973 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
18974 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
18975 __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);
18976 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
18977 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
18978 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
18979 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
18980 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
18981 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
18982 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
18983 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
18984 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
18985 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
18986 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
18987 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(GlobalData data)", DeclareGlobalData, module, 2);
18988 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, 0, 0, module, 2, 1);
18989 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
18990 __ecereClass_Conversion = class;
18991 __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);
18992 __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);
18993 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
18994 __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);
18995 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
18996 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
18997 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
18998 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
18999 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19000 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19001 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19002 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19003 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19004 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19005 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19006 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19007 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19008 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19009 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19010 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19011 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19012 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19013 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19014 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19015 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(const String s)", DeclareFunctionUtil, module, 1);
19016 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);
19019 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)