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->constant = 0x1;
5062 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, 0x0, 0x0, 0x1, warnConst))
5064 if(!conversions && !convert->Set)
5066 else if(conversions != (((void *)0)))
5068 if(_class->type == 3 && convert->dataType->kind == 8 && convert->dataType->__anon1._class && convert->dataType->__anon1._class->__anon1.registered && _class->base == convert->dataType->__anon1._class->__anon1.registered->base && (source->kind != 8 || source->__anon1._class->__anon1.registered != _class->base))
5072 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
5074 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
5080 FreeType(constType);
5086 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5088 if(!dest->__anon1._class->__anon1.registered->dataType)
5089 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5090 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
5092 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, dest->__anon1._class->__anon1.registered->dataType->kind == 8, 0x0, 0x0, warnConst))
5099 if(source->kind == 8)
5101 struct __ecereNameSpace__ecere__com__Class * _class;
5103 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5105 struct __ecereNameSpace__ecere__com__Property * convert;
5107 for(convert = _class->conversions.first; convert; convert = convert->next)
5109 if(convert->memberAccess == 1 || _class->module == privateModule)
5111 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5113 if(!convert->dataType)
5114 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
5115 if(convert->dataType != source && (!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), convert->dataType->kind == 8, convert->dataType->kind == 8, 0x0, 0x1, warnConst))
5117 if(!conversions && !convert->Get)
5119 else if(conversions != (((void *)0)))
5121 if(_class->type == 3 && convert->dataType->kind == 8 && convert->dataType->__anon1._class && convert->dataType->__anon1._class->__anon1.registered && _class->base == convert->dataType->__anon1._class->__anon1.registered->base && (dest->kind != 8 || dest->__anon1._class->__anon1.registered != _class->base))
5125 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 0x1, conv);
5127 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5135 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
5137 if(!source->__anon1._class->__anon1.registered->dataType)
5138 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5139 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
5141 if(MatchTypes(source->__anon1._class->__anon1.registered->dataType, dest, conversions, (((void *)0)), (((void *)0)), source->__anon1._class->__anon1.registered->dataType->kind == 8, source->__anon1._class->__anon1.registered->dataType->kind == 8, 0x0, 0x0, warnConst))
5143 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0, warnConst))
5149 if(source->kind == 8 || source->kind == 19)
5151 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
5153 else if(dest->kind == 7 && source->kind == 6)
5155 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
5157 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
5159 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
5161 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
5163 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
5165 else if(source->kind == 15 && (dest->kind == 3 || dest->kind == 2 || dest->kind == 1 || source->kind == 24 || dest->kind == 5 || dest->kind == 4 || dest->kind == 22 || dest->kind == 23))
5167 else if(dest->kind == 15 && !isConversionExploration && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 5 || source->kind == 4 || source->kind == 22 || source->kind == 23))
5169 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && ((source->kind == 11 || (source->kind == 13 && source->__anon1.type->kind == 11) || source->kind == 16)))
5171 struct Type * paramSource, * paramDest;
5173 if(dest->kind == 16)
5174 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
5175 if(source->kind == 16)
5176 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
5177 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
5178 dest = dest->__anon1.type;
5179 if(source->kind == 13 && source->__anon1.type->kind == 11)
5180 source = source->__anon1.type;
5181 if(dest->kind == 16)
5182 dest = dest->__anon1.__anon3.method->dataType;
5183 if(source->kind == 16)
5184 source = source->__anon1.__anon3.method->dataType;
5185 paramSource = source->__anon1.__anon2.params.first;
5186 if(paramSource && paramSource->kind == 0)
5187 paramSource = (((void *)0));
5188 paramDest = dest->__anon1.__anon2.params.first;
5189 if(paramDest && paramDest->kind == 0)
5190 paramDest = (((void *)0));
5191 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5193 if(!paramDest || (!(paramDest->kind == 13 && paramDest->__anon1.type && paramDest->__anon1.type->kind == 0) && (paramDest->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, paramDest->__anon1._class->__anon1.registered))))
5195 if(paramDest && paramDest->kind == 8)
5196 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
5198 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
5201 paramDest = paramDest->next;
5203 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
5205 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5207 if(dest->__anon1.__anon2.thisClass)
5209 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
5211 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5217 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
5220 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
5222 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
5226 paramSource = paramSource->next;
5230 if(dest->__anon1.__anon2.thisClass)
5232 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
5234 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5240 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
5242 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
5248 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5250 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
5254 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 0x1);
5255 for(; paramDest; paramDest = paramDest->next)
5259 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
5263 struct Type * paramDestType = paramDest;
5264 struct Type * paramSourceType = paramSource;
5265 struct Type * type = paramDestType;
5267 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
5270 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
5271 struct __ecereNameSpace__ecere__com__Class * sClass;
5273 for(sClass = owningClassSource; sClass; sClass = sClass->base)
5276 if(sClass->templateClass)
5277 sClass = sClass->templateClass;
5278 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
5280 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
5282 for(sClass = sClass->base; sClass; sClass = sClass->base)
5284 if(sClass->templateClass)
5285 sClass = sClass->templateClass;
5286 id += sClass->templateParams.count;
5297 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
5299 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
5302 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)))
5307 PrintType(paramDest, type, 0x0, 0x1);
5308 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
5309 if(paramDestType != paramDest)
5310 FreeType(paramDestType);
5313 if(paramDestType != paramDest)
5314 FreeType(paramDestType);
5316 paramSource = paramSource->next;
5320 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
5325 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
5329 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
5331 if(MatchTypes(source->__anon1.type, dest->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5338 static void FreeConvert(struct Conversion * convert)
5340 if(convert->resultType)
5341 FreeType(convert->resultType);
5344 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BTNamedLink;
5346 struct __ecereNameSpace__ecere__com__BTNamedLink
5349 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
5350 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
5351 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
5354 } __attribute__ ((gcc_struct));
5356 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__EnumClassData;
5358 struct __ecereNameSpace__ecere__com__EnumClassData
5360 struct __ecereNameSpace__ecere__sys__OldList values;
5362 } __attribute__ ((gcc_struct));
5364 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink;
5366 struct __ecereNameSpace__ecere__sys__NamedLink
5368 struct __ecereNameSpace__ecere__sys__NamedLink * prev;
5369 struct __ecereNameSpace__ecere__sys__NamedLink * next;
5372 } __attribute__ ((gcc_struct));
5374 extern void FreeExpContents(struct Expression * exp);
5376 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
5378 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
5380 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
5382 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
5384 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
5386 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5388 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
5390 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&nameSpace->classes); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
5392 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
5394 if(_class->type == 4)
5396 struct __ecereNameSpace__ecere__sys__OldList converts =
5400 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5404 _class->symbol = FindClass(_class->fullName);
5405 type->__anon1._class = _class->symbol;
5406 if(MatchTypes(type, dest, &converts, (((void *)0)), (((void *)0)), 0x1, 0x0, 0x0, 0x0, 0x0))
5408 struct __ecereNameSpace__ecere__sys__NamedLink * value;
5409 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5413 struct __ecereNameSpace__ecere__com__Class * baseClass;
5415 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
5417 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
5419 for(value = e->values.first; value; value = value->next)
5421 if(!strcmp(value->name, string))
5426 FreeExpContents(sourceExp);
5427 FreeType(sourceExp->expType);
5428 sourceExp->isConstant = 0x1;
5429 sourceExp->expType = MkClassType(baseClass->fullName);
5433 sourceExp->type = 2;
5434 if(!strcmp(baseClass->dataTypeString, "int"))
5435 sprintf(constant, "%d", (int)value->data);
5437 sprintf(constant, "0x%X", (int)value->data);
5438 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5440 while(converts.first)
5442 struct Conversion * convert = converts.first;
5444 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
5445 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
5447 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5454 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
5455 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5458 for(nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&nameSpace->nameSpaces); nameSpace != (((void *)0)); nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)nameSpace)))
5459 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
5464 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SubModule;
5466 struct __ecereNameSpace__ecere__com__SubModule
5468 struct __ecereNameSpace__ecere__com__SubModule * prev;
5469 struct __ecereNameSpace__ecere__com__SubModule * next;
5470 struct __ecereNameSpace__ecere__com__Instance * module;
5472 } __attribute__ ((gcc_struct));
5474 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
5476 struct __ecereNameSpace__ecere__com__SubModule * subModule;
5478 if(searchFor == searchIn)
5480 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
5482 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->application)
5484 if(ModuleVisibility(subModule->module, searchFor))
5491 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
5493 struct __ecereNameSpace__ecere__com__Application
5496 const char * * argv;
5498 unsigned int isGUIApp;
5499 struct __ecereNameSpace__ecere__sys__OldList allModules;
5500 char * parsedCommand;
5501 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
5502 } __attribute__ ((gcc_struct));
5504 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5506 struct __ecereNameSpace__ecere__com__Instance * module;
5508 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Module)))->systemNameSpace, sourceExp, dest, string, conversions))
5510 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Instance)))->privateNameSpace, sourceExp, dest, string, conversions))
5512 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
5514 for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
5516 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
5522 extern struct Expression * CopyExpression(struct Expression * exp);
5524 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
5526 void ReadString(char * output, char * string);
5528 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
5530 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
5532 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
5534 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
5536 struct Type * source;
5537 struct Type * realDest = dest;
5538 struct Type * backupSourceExpType = (((void *)0));
5539 struct Expression * computedExp = sourceExp;
5542 if(sourceExp->isConstant && sourceExp->type != 2 && sourceExp->type != 0 && sourceExp->type != 11 && dest->kind == 8 && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5544 computedExp = CopyExpression(sourceExp);
5545 ComputeExpression(computedExp);
5547 source = sourceExp->expType;
5548 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
5550 if(computedExp != sourceExp)
5552 FreeExpression(computedExp);
5553 computedExp = sourceExp;
5558 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
5560 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
5562 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
5564 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
5566 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
5568 if(sourceBase == destBase)
5570 if(computedExp != sourceExp)
5572 FreeExpression(computedExp);
5573 computedExp = sourceExp;
5582 struct __ecereNameSpace__ecere__sys__OldList * specs;
5583 unsigned int flag = 0x0;
5584 long long value = (((int)0x7fffffff));
5587 if(computedExp->type == 2)
5589 if(source->isSigned)
5590 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5592 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5594 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
5596 if(source->isSigned)
5597 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5599 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5601 if(computedExp != sourceExp)
5603 FreeExpression(computedExp);
5604 computedExp = sourceExp;
5606 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "ecere::com::unichar"))
5609 source = __extension__ ({
5610 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5612 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0x0, __ecereInstance1->refCount = 1, __ecereInstance1;
5617 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5619 if(_class && _class->type == 3)
5621 if(source->kind != 8)
5623 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5624 struct Type * tempDest, * tempSource;
5626 for(; _class->base->type != 1000; _class = _class->base)
5629 tempDest = tempType;
5632 _class->symbol = FindClass(_class->fullName);
5633 tempType->__anon1._class = _class->symbol;
5634 tempType->truth = dest->truth;
5635 if(tempType->__anon1._class)
5636 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
5637 backupSourceExpType = sourceExp->expType;
5638 sourceExp->expType = dest;
5641 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5644 if(_class && _class->type == 2 && source->kind != 8)
5646 if(!dest->__anon1._class->__anon1.registered->dataType)
5647 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5648 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5651 FreeType(sourceExp->expType);
5652 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
5656 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
5658 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
5659 struct Declarator * decl;
5662 ReadString(string, sourceExp->__anon1.__anon2.string);
5663 decl = SpecDeclFromString(string, specs, (((void *)0)));
5664 FreeExpContents(sourceExp);
5665 FreeType(sourceExp->expType);
5666 sourceExp->type = 24;
5667 sourceExp->__anon1._classExp.specifiers = specs;
5668 sourceExp->__anon1._classExp.decl = decl;
5669 sourceExp->expType = dest;
5673 if(backupSourceExpType)
5674 FreeType(backupSourceExpType);
5678 else if(source->kind == 8)
5680 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
5682 if(_class && (_class->type == 3 || _class->type == 2))
5686 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5687 struct Type * tempDest, * tempSource;
5689 if(!source->__anon1._class->__anon1.registered->dataType)
5690 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5691 for(; _class->base->type != 1000; _class = _class->base)
5694 tempSource = tempType;
5696 tempType->__anon1._class = FindClass(_class->fullName);
5697 tempType->truth = source->truth;
5698 tempType->classObjectType = source->classObjectType;
5699 if(tempType->__anon1._class)
5700 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
5701 if(conversions->last)
5703 ((struct Conversion *)conversions->last)->resultType = dest;
5706 FreeType(sourceExp->expType);
5707 sourceExp->expType = MkClassType(_class->fullName);
5708 sourceExp->expType->truth = source->truth;
5709 sourceExp->expType->classObjectType = source->classObjectType;
5710 if(!sourceExp->destType)
5712 FreeType(sourceExp->destType);
5713 sourceExp->destType = sourceExp->expType;
5714 if(sourceExp->expType)
5715 sourceExp->expType->refCount++;
5717 if(!_class->dataType)
5718 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
5720 dest = MkClassType(source->__anon1._class->string);
5721 dest->truth = source->truth;
5722 dest->classObjectType = source->classObjectType;
5724 source = _class->dataType;
5726 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5732 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5741 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5742 unsigned int fittingValue = 0x0;
5744 if(_class && _class->type == 4)
5746 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5747 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5749 if(c && value >= 0 && value <= c->largest)
5752 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
5754 if(_class->type == 0 || _class->type == 5)
5756 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5758 *newExp = *sourceExp;
5759 if(sourceExp->destType)
5760 sourceExp->destType->refCount++;
5761 if(sourceExp->expType)
5762 sourceExp->expType->refCount++;
5763 sourceExp->type = 11;
5764 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
5765 sourceExp->__anon1.cast.exp = newExp;
5766 FreeType(sourceExp->expType);
5767 sourceExp->expType = (((void *)0));
5768 ProcessExpressionType(sourceExp);
5771 FreeType(sourceExp->expType);
5772 sourceExp->expType = dest;
5777 if(backupSourceExpType)
5778 FreeType(backupSourceExpType);
5781 if(!_class->dataType)
5782 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
5784 dest = _class->dataType;
5787 if(dest->kind == 7 && (source->kind == 7 || source->kind == 6 || dest->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24))
5789 specs = MkListOne(MkSpecifier(DOUBLE));
5791 else if(dest->kind == 6 && (source->kind == 6 || dest->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 7))
5793 specs = MkListOne(MkSpecifier(FLOAT));
5795 else if(dest->kind == 4 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
5799 ListAdd(specs, MkSpecifier(UNSIGNED));
5800 ListAdd(specs, MkSpecifier(INT64));
5802 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
5806 ListAdd(specs, MkSpecifier(UNSIGNED));
5807 ListAdd(specs, MkSpecifier(INT));
5809 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5813 ListAdd(specs, MkSpecifier(UNSIGNED));
5814 ListAdd(specs, MkSpecifier(SHORT));
5816 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5820 ListAdd(specs, MkSpecifier(UNSIGNED));
5821 ListAdd(specs, MkSpecifier(CHAR));
5827 if(backupSourceExpType)
5829 if(sourceExp->expType)
5830 FreeType(sourceExp->expType);
5831 sourceExp->expType = backupSourceExpType;
5836 else if(dest->kind == 7 && (source->kind == 7 || source->kind == 6 || source->kind == 4 || source->kind == 3 || source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5838 specs = MkListOne(MkSpecifier(DOUBLE));
5840 else if(dest->kind == 6 && (source->kind == 6 || source->kind == 15 || source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5842 specs = MkListOne(MkSpecifier(FLOAT));
5844 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
5847 ListAdd(specs, MkSpecifier(BOOL));
5849 else if(dest->kind == 1 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (dest->isSigned ? (value >= -128 && value <= 127) : (value >= 0 && value <= 255)))
5853 ListAdd(specs, MkSpecifier(UNSIGNED));
5854 ListAdd(specs, MkSpecifier(CHAR));
5856 else if(dest->kind == 2 && (source->kind == 15 || source->kind == 24 || source->kind == 1 || source->kind == 2 || (source->kind == 3 && (dest->isSigned ? (value >= -32768 && value <= 32767) : (value >= 0 && value <= 65535)))))
5860 ListAdd(specs, MkSpecifier(UNSIGNED));
5861 ListAdd(specs, MkSpecifier(SHORT));
5863 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
5867 ListAdd(specs, MkSpecifier(UNSIGNED));
5868 ListAdd(specs, MkSpecifier(INT));
5870 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
5874 ListAdd(specs, MkSpecifier(UNSIGNED));
5875 ListAdd(specs, MkSpecifier(INT64));
5877 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5879 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
5885 if(backupSourceExpType)
5887 if(sourceExp->expType)
5888 FreeType(sourceExp->expType);
5889 sourceExp->expType = backupSourceExpType;
5893 if(!flag && !sourceExp->opDestType)
5895 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5897 *newExp = *sourceExp;
5898 newExp->prev = (((void *)0));
5899 newExp->next = (((void *)0));
5900 if(sourceExp->destType)
5901 sourceExp->destType->refCount++;
5902 if(sourceExp->expType)
5903 sourceExp->expType->refCount++;
5904 sourceExp->type = 11;
5905 if(realDest->kind == 8)
5907 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
5908 FreeList(specs, FreeSpecifier);
5911 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
5912 if(newExp->type == 4)
5914 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
5917 sourceExp->__anon1.cast.exp = newExp;
5918 FreeType(sourceExp->expType);
5919 sourceExp->expType = (((void *)0));
5920 ProcessExpressionType(sourceExp);
5923 FreeList(specs, FreeSpecifier);
5926 if(backupSourceExpType)
5927 FreeType(backupSourceExpType);
5932 if(computedExp != sourceExp)
5934 FreeExpression(computedExp);
5935 computedExp = sourceExp;
5937 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
5938 sourceExp = (*sourceExp->__anon1.list).last;
5939 if(sourceExp->type == 0)
5941 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
5945 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5947 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
5948 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5952 for(; _class && _class->type == 4; _class = _class->base)
5954 struct __ecereNameSpace__ecere__sys__NamedLink * value;
5955 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5957 for(value = e->values.first; value; value = value->next)
5959 if(!strcmp(value->name, id->string))
5964 FreeExpContents(sourceExp);
5965 FreeType(sourceExp->expType);
5966 sourceExp->isConstant = 0x1;
5967 sourceExp->expType = MkClassType(_class->fullName);
5971 sourceExp->type = 2;
5972 if(_class->dataTypeString && !strcmp(_class->dataTypeString, "int"))
5973 sprintf(constant, "%d", (int)value->data);
5975 sprintf(constant, "0x%X", (int)value->data);
5976 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5985 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
5996 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5998 int value2 = op2->__anon1.i;
6001 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
6004 exp->expType = op1->type;
6006 op1->type->refCount++;
6011 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6013 unsigned int value2 = op2->__anon1.ui;
6016 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
6019 exp->expType = op1->type;
6021 op1->type->refCount++;
6026 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6028 long long value2 = op2->__anon1.i64;
6031 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
6034 exp->expType = op1->type;
6036 op1->type->refCount++;
6041 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6043 uint64 value2 = op2->__anon1.ui64;
6046 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
6049 exp->expType = op1->type;
6051 op1->type->refCount++;
6056 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6058 short value2 = op2->__anon1.s;
6061 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
6064 exp->expType = op1->type;
6066 op1->type->refCount++;
6071 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6073 unsigned short value2 = op2->__anon1.us;
6076 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
6079 exp->expType = op1->type;
6081 op1->type->refCount++;
6086 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6088 char value2 = op2->__anon1.c;
6091 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
6094 exp->expType = op1->type;
6096 op1->type->refCount++;
6101 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6103 unsigned char value2 = op2->__anon1.uc;
6106 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
6109 exp->expType = op1->type;
6111 op1->type->refCount++;
6116 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6118 float value2 = op2->__anon1.f;
6121 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
6124 exp->expType = op1->type;
6126 op1->type->refCount++;
6131 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6133 double value2 = op2->__anon1.d;
6136 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
6139 exp->expType = op1->type;
6141 op1->type->refCount++;
6146 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6148 int value2 = op2->__anon1.i;
6151 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
6154 exp->expType = op1->type;
6156 op1->type->refCount++;
6161 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6163 unsigned int value2 = op2->__anon1.ui;
6166 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
6169 exp->expType = op1->type;
6171 op1->type->refCount++;
6176 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6178 long long value2 = op2->__anon1.i64;
6181 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
6184 exp->expType = op1->type;
6186 op1->type->refCount++;
6191 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6193 uint64 value2 = op2->__anon1.ui64;
6196 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
6199 exp->expType = op1->type;
6201 op1->type->refCount++;
6206 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6208 short value2 = op2->__anon1.s;
6211 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
6214 exp->expType = op1->type;
6216 op1->type->refCount++;
6221 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6223 unsigned short value2 = op2->__anon1.us;
6226 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
6229 exp->expType = op1->type;
6231 op1->type->refCount++;
6236 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6238 char value2 = op2->__anon1.c;
6241 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
6244 exp->expType = op1->type;
6246 op1->type->refCount++;
6251 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6253 unsigned char value2 = op2->__anon1.uc;
6256 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
6259 exp->expType = op1->type;
6261 op1->type->refCount++;
6266 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6268 float value2 = op2->__anon1.f;
6271 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
6274 exp->expType = op1->type;
6276 op1->type->refCount++;
6281 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6283 double value2 = op2->__anon1.d;
6286 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
6289 exp->expType = op1->type;
6291 op1->type->refCount++;
6296 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6298 int value2 = op2->__anon1.i;
6301 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
6304 exp->expType = op1->type;
6306 op1->type->refCount++;
6311 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6313 unsigned int value2 = op2->__anon1.ui;
6316 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
6319 exp->expType = op1->type;
6321 op1->type->refCount++;
6326 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6328 long long value2 = op2->__anon1.i64;
6331 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
6334 exp->expType = op1->type;
6336 op1->type->refCount++;
6341 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6343 uint64 value2 = op2->__anon1.ui64;
6346 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
6349 exp->expType = op1->type;
6351 op1->type->refCount++;
6356 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6358 short value2 = op2->__anon1.s;
6361 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
6364 exp->expType = op1->type;
6366 op1->type->refCount++;
6371 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6373 unsigned short value2 = op2->__anon1.us;
6376 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
6379 exp->expType = op1->type;
6381 op1->type->refCount++;
6386 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6388 char value2 = op2->__anon1.c;
6391 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
6394 exp->expType = op1->type;
6396 op1->type->refCount++;
6401 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6403 unsigned char value2 = op2->__anon1.uc;
6406 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
6409 exp->expType = op1->type;
6411 op1->type->refCount++;
6416 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6418 float value2 = op2->__anon1.f;
6421 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
6424 exp->expType = op1->type;
6426 op1->type->refCount++;
6431 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6433 double value2 = op2->__anon1.d;
6436 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
6439 exp->expType = op1->type;
6441 op1->type->refCount++;
6446 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6448 int value2 = op2->__anon1.i;
6451 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
6454 exp->expType = op1->type;
6456 op1->type->refCount++;
6461 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6463 unsigned int value2 = op2->__anon1.ui;
6466 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
6469 exp->expType = op1->type;
6471 op1->type->refCount++;
6476 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6478 long long value2 = op2->__anon1.i64;
6481 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
6484 exp->expType = op1->type;
6486 op1->type->refCount++;
6491 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6493 uint64 value2 = op2->__anon1.ui64;
6496 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
6499 exp->expType = op1->type;
6501 op1->type->refCount++;
6506 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6508 short value2 = op2->__anon1.s;
6511 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
6514 exp->expType = op1->type;
6516 op1->type->refCount++;
6521 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6523 unsigned short value2 = op2->__anon1.us;
6526 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
6529 exp->expType = op1->type;
6531 op1->type->refCount++;
6536 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6538 char value2 = op2->__anon1.c;
6541 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
6544 exp->expType = op1->type;
6546 op1->type->refCount++;
6551 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6553 unsigned char value2 = op2->__anon1.uc;
6556 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
6559 exp->expType = op1->type;
6561 op1->type->refCount++;
6566 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6568 float value2 = op2->__anon1.f;
6571 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
6574 exp->expType = op1->type;
6576 op1->type->refCount++;
6581 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6583 double value2 = op2->__anon1.d;
6586 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
6589 exp->expType = op1->type;
6591 op1->type->refCount++;
6596 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6598 int value2 = op2->__anon1.i;
6601 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
6604 exp->expType = op1->type;
6606 op1->type->refCount++;
6611 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6613 unsigned int value2 = op2->__anon1.ui;
6616 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
6619 exp->expType = op1->type;
6621 op1->type->refCount++;
6626 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6628 long long value2 = op2->__anon1.i64;
6631 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
6634 exp->expType = op1->type;
6636 op1->type->refCount++;
6641 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6643 uint64 value2 = op2->__anon1.ui64;
6646 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
6649 exp->expType = op1->type;
6651 op1->type->refCount++;
6656 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6658 short value2 = op2->__anon1.s;
6661 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
6664 exp->expType = op1->type;
6666 op1->type->refCount++;
6671 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6673 unsigned short value2 = op2->__anon1.us;
6676 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
6679 exp->expType = op1->type;
6681 op1->type->refCount++;
6686 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6688 char value2 = op2->__anon1.c;
6691 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
6694 exp->expType = op1->type;
6696 op1->type->refCount++;
6701 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6703 unsigned char value2 = op2->__anon1.uc;
6706 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
6709 exp->expType = op1->type;
6711 op1->type->refCount++;
6716 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
6719 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
6722 exp->expType = op1->type;
6724 op1->type->refCount++;
6729 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
6732 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
6735 exp->expType = op1->type;
6737 op1->type->refCount++;
6742 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
6745 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
6748 exp->expType = op1->type;
6750 op1->type->refCount++;
6755 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
6758 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
6761 exp->expType = op1->type;
6763 op1->type->refCount++;
6768 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
6771 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
6774 exp->expType = op1->type;
6776 op1->type->refCount++;
6781 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
6784 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
6787 exp->expType = op1->type;
6789 op1->type->refCount++;
6794 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
6797 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
6800 exp->expType = op1->type;
6802 op1->type->refCount++;
6807 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
6810 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
6813 exp->expType = op1->type;
6815 op1->type->refCount++;
6820 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
6823 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
6826 exp->expType = op1->type;
6828 op1->type->refCount++;
6833 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
6836 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
6839 exp->expType = op1->type;
6841 op1->type->refCount++;
6846 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
6849 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
6852 exp->expType = op1->type;
6854 op1->type->refCount++;
6859 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
6862 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
6865 exp->expType = op1->type;
6867 op1->type->refCount++;
6872 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
6875 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
6878 exp->expType = op1->type;
6880 op1->type->refCount++;
6885 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
6888 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
6891 exp->expType = op1->type;
6893 op1->type->refCount++;
6898 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
6901 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
6904 exp->expType = op1->type;
6906 op1->type->refCount++;
6911 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
6914 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
6917 exp->expType = op1->type;
6919 op1->type->refCount++;
6924 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
6927 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
6930 exp->expType = op1->type;
6932 op1->type->refCount++;
6937 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
6940 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
6943 exp->expType = op1->type;
6945 op1->type->refCount++;
6950 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
6953 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
6956 exp->expType = op1->type;
6958 op1->type->refCount++;
6963 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
6966 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
6969 exp->expType = op1->type;
6971 op1->type->refCount++;
6976 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
6979 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
6982 exp->expType = op1->type;
6984 op1->type->refCount++;
6989 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
6992 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
6995 exp->expType = op1->type;
6997 op1->type->refCount++;
7002 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
7005 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
7008 exp->expType = op1->type;
7010 op1->type->refCount++;
7015 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
7018 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
7021 exp->expType = op1->type;
7023 op1->type->refCount++;
7028 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
7031 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
7034 exp->expType = op1->type;
7036 op1->type->refCount++;
7041 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
7044 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
7047 exp->expType = op1->type;
7049 op1->type->refCount++;
7054 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
7057 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
7060 exp->expType = op1->type;
7062 op1->type->refCount++;
7067 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
7070 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
7073 exp->expType = op1->type;
7075 op1->type->refCount++;
7080 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
7083 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
7086 exp->expType = op1->type;
7088 op1->type->refCount++;
7093 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
7096 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
7099 exp->expType = op1->type;
7101 op1->type->refCount++;
7106 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7108 int value2 = op2->__anon1.i;
7111 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
7114 exp->expType = op1->type;
7116 op1->type->refCount++;
7121 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7123 unsigned int value2 = op2->__anon1.ui;
7126 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
7129 exp->expType = op1->type;
7131 op1->type->refCount++;
7136 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7138 long long value2 = op2->__anon1.i64;
7141 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
7144 exp->expType = op1->type;
7146 op1->type->refCount++;
7151 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7153 uint64 value2 = op2->__anon1.ui64;
7156 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
7159 exp->expType = op1->type;
7161 op1->type->refCount++;
7166 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7168 short value2 = op2->__anon1.s;
7171 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
7174 exp->expType = op1->type;
7176 op1->type->refCount++;
7181 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7183 unsigned short value2 = op2->__anon1.us;
7186 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
7189 exp->expType = op1->type;
7191 op1->type->refCount++;
7196 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7198 char value2 = op2->__anon1.c;
7201 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
7204 exp->expType = op1->type;
7206 op1->type->refCount++;
7211 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7213 unsigned char value2 = op2->__anon1.uc;
7216 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
7219 exp->expType = op1->type;
7221 op1->type->refCount++;
7226 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7228 float value2 = op2->__anon1.f;
7231 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
7234 exp->expType = op1->type;
7236 op1->type->refCount++;
7241 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7243 double value2 = op2->__anon1.d;
7246 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
7249 exp->expType = op1->type;
7251 op1->type->refCount++;
7256 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7258 int value2 = op2->__anon1.i;
7261 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
7264 exp->expType = op1->type;
7266 op1->type->refCount++;
7271 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7273 unsigned int value2 = op2->__anon1.ui;
7276 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
7279 exp->expType = op1->type;
7281 op1->type->refCount++;
7286 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7288 long long value2 = op2->__anon1.i64;
7291 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
7294 exp->expType = op1->type;
7296 op1->type->refCount++;
7301 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7303 uint64 value2 = op2->__anon1.ui64;
7306 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
7309 exp->expType = op1->type;
7311 op1->type->refCount++;
7316 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7318 short value2 = op2->__anon1.s;
7321 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
7324 exp->expType = op1->type;
7326 op1->type->refCount++;
7331 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7333 unsigned short value2 = op2->__anon1.us;
7336 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
7339 exp->expType = op1->type;
7341 op1->type->refCount++;
7346 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7348 char value2 = op2->__anon1.c;
7351 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
7354 exp->expType = op1->type;
7356 op1->type->refCount++;
7361 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7363 unsigned char value2 = op2->__anon1.uc;
7366 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
7369 exp->expType = op1->type;
7371 op1->type->refCount++;
7376 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7378 float value2 = op2->__anon1.f;
7381 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
7384 exp->expType = op1->type;
7386 op1->type->refCount++;
7391 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7393 double value2 = op2->__anon1.d;
7396 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
7399 exp->expType = op1->type;
7401 op1->type->refCount++;
7406 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7408 int value2 = op2->__anon1.i;
7411 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
7414 exp->expType = op1->type;
7416 op1->type->refCount++;
7421 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7423 unsigned int value2 = op2->__anon1.ui;
7426 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
7429 exp->expType = op1->type;
7431 op1->type->refCount++;
7436 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7438 long long value2 = op2->__anon1.i64;
7441 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
7444 exp->expType = op1->type;
7446 op1->type->refCount++;
7451 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7453 uint64 value2 = op2->__anon1.ui64;
7456 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
7459 exp->expType = op1->type;
7461 op1->type->refCount++;
7466 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7468 short value2 = op2->__anon1.s;
7471 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
7474 exp->expType = op1->type;
7476 op1->type->refCount++;
7481 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7483 unsigned short value2 = op2->__anon1.us;
7486 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
7489 exp->expType = op1->type;
7491 op1->type->refCount++;
7496 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7498 char value2 = op2->__anon1.c;
7501 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
7504 exp->expType = op1->type;
7506 op1->type->refCount++;
7511 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7513 unsigned char value2 = op2->__anon1.uc;
7516 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
7519 exp->expType = op1->type;
7521 op1->type->refCount++;
7526 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7528 float value2 = op2->__anon1.f;
7531 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
7534 exp->expType = op1->type;
7536 op1->type->refCount++;
7541 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7543 double value2 = op2->__anon1.d;
7546 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
7549 exp->expType = op1->type;
7551 op1->type->refCount++;
7556 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7558 int value2 = op2->__anon1.i;
7561 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
7564 exp->expType = op1->type;
7566 op1->type->refCount++;
7571 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7573 unsigned int value2 = op2->__anon1.ui;
7576 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
7579 exp->expType = op1->type;
7581 op1->type->refCount++;
7586 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7588 long long value2 = op2->__anon1.i64;
7591 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
7594 exp->expType = op1->type;
7596 op1->type->refCount++;
7601 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7603 uint64 value2 = op2->__anon1.ui64;
7606 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
7609 exp->expType = op1->type;
7611 op1->type->refCount++;
7616 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7618 short value2 = op2->__anon1.s;
7621 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
7624 exp->expType = op1->type;
7626 op1->type->refCount++;
7631 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7633 unsigned short value2 = op2->__anon1.us;
7636 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
7639 exp->expType = op1->type;
7641 op1->type->refCount++;
7646 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7648 char value2 = op2->__anon1.c;
7651 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
7654 exp->expType = op1->type;
7656 op1->type->refCount++;
7661 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7663 unsigned char value2 = op2->__anon1.uc;
7666 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
7669 exp->expType = op1->type;
7671 op1->type->refCount++;
7676 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7678 float value2 = op2->__anon1.f;
7681 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
7684 exp->expType = op1->type;
7686 op1->type->refCount++;
7691 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7693 double value2 = op2->__anon1.d;
7696 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
7699 exp->expType = op1->type;
7701 op1->type->refCount++;
7706 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7708 int value2 = op2->__anon1.i;
7711 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
7714 exp->expType = op1->type;
7716 op1->type->refCount++;
7721 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7723 unsigned int value2 = op2->__anon1.ui;
7726 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
7729 exp->expType = op1->type;
7731 op1->type->refCount++;
7736 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7738 long long value2 = op2->__anon1.i64;
7741 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
7744 exp->expType = op1->type;
7746 op1->type->refCount++;
7751 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7753 uint64 value2 = op2->__anon1.ui64;
7756 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
7759 exp->expType = op1->type;
7761 op1->type->refCount++;
7766 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7768 short value2 = op2->__anon1.s;
7771 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
7774 exp->expType = op1->type;
7776 op1->type->refCount++;
7781 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7783 unsigned short value2 = op2->__anon1.us;
7786 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
7789 exp->expType = op1->type;
7791 op1->type->refCount++;
7796 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7798 char value2 = op2->__anon1.c;
7801 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
7804 exp->expType = op1->type;
7806 op1->type->refCount++;
7811 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7813 unsigned char value2 = op2->__anon1.uc;
7816 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
7819 exp->expType = op1->type;
7821 op1->type->refCount++;
7826 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7828 float value2 = op2->__anon1.f;
7831 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
7834 exp->expType = op1->type;
7836 op1->type->refCount++;
7841 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7843 double value2 = op2->__anon1.d;
7846 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
7849 exp->expType = op1->type;
7851 op1->type->refCount++;
7856 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7858 int value2 = op2->__anon1.i;
7861 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
7864 exp->expType = op1->type;
7866 op1->type->refCount++;
7871 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7873 unsigned int value2 = op2->__anon1.ui;
7876 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
7879 exp->expType = op1->type;
7881 op1->type->refCount++;
7886 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7888 long long value2 = op2->__anon1.i64;
7891 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
7894 exp->expType = op1->type;
7896 op1->type->refCount++;
7901 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7903 uint64 value2 = op2->__anon1.ui64;
7906 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
7909 exp->expType = op1->type;
7911 op1->type->refCount++;
7916 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7918 short value2 = op2->__anon1.s;
7921 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
7924 exp->expType = op1->type;
7926 op1->type->refCount++;
7931 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7933 unsigned short value2 = op2->__anon1.us;
7936 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
7939 exp->expType = op1->type;
7941 op1->type->refCount++;
7946 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7948 char value2 = op2->__anon1.c;
7951 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
7954 exp->expType = op1->type;
7956 op1->type->refCount++;
7961 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7963 unsigned char value2 = op2->__anon1.uc;
7966 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
7969 exp->expType = op1->type;
7971 op1->type->refCount++;
7976 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7978 int value2 = op2->__anon1.i;
7981 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
7984 exp->expType = op1->type;
7986 op1->type->refCount++;
7991 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7993 unsigned int value2 = op2->__anon1.ui;
7996 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
7999 exp->expType = op1->type;
8001 op1->type->refCount++;
8006 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8008 long long value2 = op2->__anon1.i64;
8011 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
8014 exp->expType = op1->type;
8016 op1->type->refCount++;
8021 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8023 uint64 value2 = op2->__anon1.ui64;
8026 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
8029 exp->expType = op1->type;
8031 op1->type->refCount++;
8036 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8038 short value2 = op2->__anon1.s;
8041 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
8044 exp->expType = op1->type;
8046 op1->type->refCount++;
8051 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8053 unsigned short value2 = op2->__anon1.us;
8056 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
8059 exp->expType = op1->type;
8061 op1->type->refCount++;
8066 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8068 char value2 = op2->__anon1.c;
8071 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
8074 exp->expType = op1->type;
8076 op1->type->refCount++;
8081 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8083 unsigned char value2 = op2->__anon1.uc;
8086 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
8089 exp->expType = op1->type;
8091 op1->type->refCount++;
8096 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8098 int value2 = op2->__anon1.i;
8101 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
8104 exp->expType = op1->type;
8106 op1->type->refCount++;
8111 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8113 unsigned int value2 = op2->__anon1.ui;
8116 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
8119 exp->expType = op1->type;
8121 op1->type->refCount++;
8126 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8128 long long value2 = op2->__anon1.i64;
8131 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
8134 exp->expType = op1->type;
8136 op1->type->refCount++;
8141 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8143 uint64 value2 = op2->__anon1.ui64;
8146 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
8149 exp->expType = op1->type;
8151 op1->type->refCount++;
8156 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8158 short value2 = op2->__anon1.s;
8161 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
8164 exp->expType = op1->type;
8166 op1->type->refCount++;
8171 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8173 unsigned short value2 = op2->__anon1.us;
8176 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
8179 exp->expType = op1->type;
8181 op1->type->refCount++;
8186 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8188 char value2 = op2->__anon1.c;
8191 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
8194 exp->expType = op1->type;
8196 op1->type->refCount++;
8201 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8203 unsigned char value2 = op2->__anon1.uc;
8206 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
8209 exp->expType = op1->type;
8211 op1->type->refCount++;
8216 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8218 int value2 = op2->__anon1.i;
8221 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
8224 exp->expType = op1->type;
8226 op1->type->refCount++;
8231 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8233 unsigned int value2 = op2->__anon1.ui;
8236 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
8239 exp->expType = op1->type;
8241 op1->type->refCount++;
8246 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8248 long long value2 = op2->__anon1.i64;
8251 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
8254 exp->expType = op1->type;
8256 op1->type->refCount++;
8261 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8263 uint64 value2 = op2->__anon1.ui64;
8266 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
8269 exp->expType = op1->type;
8271 op1->type->refCount++;
8276 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8278 short value2 = op2->__anon1.s;
8281 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
8284 exp->expType = op1->type;
8286 op1->type->refCount++;
8291 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8293 unsigned short value2 = op2->__anon1.us;
8296 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
8299 exp->expType = op1->type;
8301 op1->type->refCount++;
8306 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8308 char value2 = op2->__anon1.c;
8311 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
8314 exp->expType = op1->type;
8316 op1->type->refCount++;
8321 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8323 unsigned char value2 = op2->__anon1.uc;
8326 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
8329 exp->expType = op1->type;
8331 op1->type->refCount++;
8336 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8338 int value2 = op2->__anon1.i;
8341 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
8344 exp->expType = op1->type;
8346 op1->type->refCount++;
8351 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8353 unsigned int value2 = op2->__anon1.ui;
8356 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
8359 exp->expType = op1->type;
8361 op1->type->refCount++;
8366 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8368 long long value2 = op2->__anon1.i64;
8371 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
8374 exp->expType = op1->type;
8376 op1->type->refCount++;
8381 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8383 uint64 value2 = op2->__anon1.ui64;
8386 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
8389 exp->expType = op1->type;
8391 op1->type->refCount++;
8396 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8398 short value2 = op2->__anon1.s;
8401 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
8404 exp->expType = op1->type;
8406 op1->type->refCount++;
8411 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8413 unsigned short value2 = op2->__anon1.us;
8416 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
8419 exp->expType = op1->type;
8421 op1->type->refCount++;
8426 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8428 char value2 = op2->__anon1.c;
8431 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
8434 exp->expType = op1->type;
8436 op1->type->refCount++;
8441 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8443 unsigned char value2 = op2->__anon1.uc;
8446 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
8449 exp->expType = op1->type;
8451 op1->type->refCount++;
8456 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8458 int value2 = op2->__anon1.i;
8461 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
8464 exp->expType = op1->type;
8466 op1->type->refCount++;
8471 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8473 unsigned int value2 = op2->__anon1.ui;
8476 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
8479 exp->expType = op1->type;
8481 op1->type->refCount++;
8486 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8488 long long value2 = op2->__anon1.i64;
8491 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
8494 exp->expType = op1->type;
8496 op1->type->refCount++;
8501 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8503 uint64 value2 = op2->__anon1.ui64;
8506 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
8509 exp->expType = op1->type;
8511 op1->type->refCount++;
8516 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8518 short value2 = op2->__anon1.s;
8521 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
8524 exp->expType = op1->type;
8526 op1->type->refCount++;
8531 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8533 unsigned short value2 = op2->__anon1.us;
8536 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
8539 exp->expType = op1->type;
8541 op1->type->refCount++;
8546 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8548 char value2 = op2->__anon1.c;
8551 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
8554 exp->expType = op1->type;
8556 op1->type->refCount++;
8561 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8563 unsigned char value2 = op2->__anon1.uc;
8566 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
8569 exp->expType = op1->type;
8571 op1->type->refCount++;
8576 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
8579 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
8582 exp->expType = op1->type;
8584 op1->type->refCount++;
8589 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
8592 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
8595 exp->expType = op1->type;
8597 op1->type->refCount++;
8602 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
8605 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
8608 exp->expType = op1->type;
8610 op1->type->refCount++;
8615 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
8618 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
8621 exp->expType = op1->type;
8623 op1->type->refCount++;
8628 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
8631 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
8634 exp->expType = op1->type;
8636 op1->type->refCount++;
8641 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
8644 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
8647 exp->expType = op1->type;
8649 op1->type->refCount++;
8654 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
8657 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
8660 exp->expType = op1->type;
8662 op1->type->refCount++;
8667 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
8670 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
8673 exp->expType = op1->type;
8675 op1->type->refCount++;
8680 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8682 int value2 = op2->__anon1.i;
8685 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
8688 exp->expType = op1->type;
8690 op1->type->refCount++;
8695 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8697 unsigned int value2 = op2->__anon1.ui;
8700 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
8703 exp->expType = op1->type;
8705 op1->type->refCount++;
8710 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8712 long long value2 = op2->__anon1.i64;
8715 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
8718 exp->expType = op1->type;
8720 op1->type->refCount++;
8725 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8727 uint64 value2 = op2->__anon1.ui64;
8730 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
8733 exp->expType = op1->type;
8735 op1->type->refCount++;
8740 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8742 short value2 = op2->__anon1.s;
8745 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
8748 exp->expType = op1->type;
8750 op1->type->refCount++;
8755 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8757 unsigned short value2 = op2->__anon1.us;
8760 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
8763 exp->expType = op1->type;
8765 op1->type->refCount++;
8770 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8772 char value2 = op2->__anon1.c;
8775 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
8778 exp->expType = op1->type;
8780 op1->type->refCount++;
8785 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8787 unsigned char value2 = op2->__anon1.uc;
8790 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
8793 exp->expType = op1->type;
8795 op1->type->refCount++;
8800 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8802 int value2 = op2->__anon1.i;
8805 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
8808 exp->expType = op1->type;
8810 op1->type->refCount++;
8815 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8817 unsigned int value2 = op2->__anon1.ui;
8820 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
8823 exp->expType = op1->type;
8825 op1->type->refCount++;
8830 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8832 long long value2 = op2->__anon1.i64;
8835 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
8838 exp->expType = op1->type;
8840 op1->type->refCount++;
8845 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8847 uint64 value2 = op2->__anon1.ui64;
8850 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
8853 exp->expType = op1->type;
8855 op1->type->refCount++;
8860 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8862 short value2 = op2->__anon1.s;
8865 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
8868 exp->expType = op1->type;
8870 op1->type->refCount++;
8875 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8877 unsigned short value2 = op2->__anon1.us;
8880 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
8883 exp->expType = op1->type;
8885 op1->type->refCount++;
8890 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8892 char value2 = op2->__anon1.c;
8895 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
8898 exp->expType = op1->type;
8900 op1->type->refCount++;
8905 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8907 unsigned char value2 = op2->__anon1.uc;
8910 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
8913 exp->expType = op1->type;
8915 op1->type->refCount++;
8920 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8922 int value2 = op2->__anon1.i;
8925 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
8928 exp->expType = op1->type;
8930 op1->type->refCount++;
8935 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8937 unsigned int value2 = op2->__anon1.ui;
8940 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
8943 exp->expType = op1->type;
8945 op1->type->refCount++;
8950 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8952 long long value2 = op2->__anon1.i64;
8955 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
8958 exp->expType = op1->type;
8960 op1->type->refCount++;
8965 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8967 uint64 value2 = op2->__anon1.ui64;
8970 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
8973 exp->expType = op1->type;
8975 op1->type->refCount++;
8980 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8982 short value2 = op2->__anon1.s;
8985 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
8988 exp->expType = op1->type;
8990 op1->type->refCount++;
8995 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8997 unsigned short value2 = op2->__anon1.us;
9000 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
9003 exp->expType = op1->type;
9005 op1->type->refCount++;
9010 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9012 char value2 = op2->__anon1.c;
9015 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
9018 exp->expType = op1->type;
9020 op1->type->refCount++;
9025 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9027 unsigned char value2 = op2->__anon1.uc;
9030 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
9033 exp->expType = op1->type;
9035 op1->type->refCount++;
9040 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9042 int value2 = op2->__anon1.i;
9045 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
9048 exp->expType = op1->type;
9050 op1->type->refCount++;
9055 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9057 unsigned int value2 = op2->__anon1.ui;
9060 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
9063 exp->expType = op1->type;
9065 op1->type->refCount++;
9070 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9072 long long value2 = op2->__anon1.i64;
9075 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
9078 exp->expType = op1->type;
9080 op1->type->refCount++;
9085 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9087 uint64 value2 = op2->__anon1.ui64;
9090 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
9093 exp->expType = op1->type;
9095 op1->type->refCount++;
9100 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9102 short value2 = op2->__anon1.s;
9105 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
9108 exp->expType = op1->type;
9110 op1->type->refCount++;
9115 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9117 unsigned short value2 = op2->__anon1.us;
9120 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
9123 exp->expType = op1->type;
9125 op1->type->refCount++;
9130 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9132 char value2 = op2->__anon1.c;
9135 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
9138 exp->expType = op1->type;
9140 op1->type->refCount++;
9145 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9147 unsigned char value2 = op2->__anon1.uc;
9150 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
9153 exp->expType = op1->type;
9155 op1->type->refCount++;
9160 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9162 int value2 = op2->__anon1.i;
9165 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
9168 exp->expType = op1->type;
9170 op1->type->refCount++;
9175 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9177 unsigned int value2 = op2->__anon1.ui;
9180 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
9183 exp->expType = op1->type;
9185 op1->type->refCount++;
9190 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9192 long long value2 = op2->__anon1.i64;
9195 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
9198 exp->expType = op1->type;
9200 op1->type->refCount++;
9205 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9207 uint64 value2 = op2->__anon1.ui64;
9210 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
9213 exp->expType = op1->type;
9215 op1->type->refCount++;
9220 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9222 short value2 = op2->__anon1.s;
9225 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
9228 exp->expType = op1->type;
9230 op1->type->refCount++;
9235 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9237 unsigned short value2 = op2->__anon1.us;
9240 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
9243 exp->expType = op1->type;
9245 op1->type->refCount++;
9250 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9252 char value2 = op2->__anon1.c;
9255 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
9258 exp->expType = op1->type;
9260 op1->type->refCount++;
9265 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9267 unsigned char value2 = op2->__anon1.uc;
9270 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
9273 exp->expType = op1->type;
9275 op1->type->refCount++;
9280 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
9283 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
9286 exp->expType = op1->type;
9288 op1->type->refCount++;
9293 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
9296 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
9299 exp->expType = op1->type;
9301 op1->type->refCount++;
9306 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
9309 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
9312 exp->expType = op1->type;
9314 op1->type->refCount++;
9319 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
9322 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
9325 exp->expType = op1->type;
9327 op1->type->refCount++;
9332 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
9335 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
9338 exp->expType = op1->type;
9340 op1->type->refCount++;
9345 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
9348 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
9351 exp->expType = op1->type;
9353 op1->type->refCount++;
9358 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
9361 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
9364 exp->expType = op1->type;
9366 op1->type->refCount++;
9371 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
9374 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
9377 exp->expType = op1->type;
9379 op1->type->refCount++;
9384 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9386 int value2 = op2->__anon1.i;
9389 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
9392 exp->expType = op1->type;
9394 op1->type->refCount++;
9399 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9401 unsigned int value2 = op2->__anon1.ui;
9404 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
9407 exp->expType = op1->type;
9409 op1->type->refCount++;
9414 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9416 long long value2 = op2->__anon1.i64;
9419 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
9422 exp->expType = op1->type;
9424 op1->type->refCount++;
9429 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9431 uint64 value2 = op2->__anon1.ui64;
9434 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
9437 exp->expType = op1->type;
9439 op1->type->refCount++;
9444 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9446 short value2 = op2->__anon1.s;
9449 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
9452 exp->expType = op1->type;
9454 op1->type->refCount++;
9459 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9461 unsigned short value2 = op2->__anon1.us;
9464 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
9467 exp->expType = op1->type;
9469 op1->type->refCount++;
9474 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9476 char value2 = op2->__anon1.c;
9479 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
9482 exp->expType = op1->type;
9484 op1->type->refCount++;
9489 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9491 unsigned char value2 = op2->__anon1.uc;
9494 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
9497 exp->expType = op1->type;
9499 op1->type->refCount++;
9504 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9506 float value2 = op2->__anon1.f;
9509 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
9512 exp->expType = op1->type;
9514 op1->type->refCount++;
9519 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9521 double value2 = op2->__anon1.d;
9524 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
9527 exp->expType = op1->type;
9529 op1->type->refCount++;
9534 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9536 int value2 = op2->__anon1.i;
9539 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
9542 exp->expType = op1->type;
9544 op1->type->refCount++;
9549 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9551 unsigned int value2 = op2->__anon1.ui;
9554 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
9557 exp->expType = op1->type;
9559 op1->type->refCount++;
9564 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9566 long long value2 = op2->__anon1.i64;
9569 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
9572 exp->expType = op1->type;
9574 op1->type->refCount++;
9579 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9581 uint64 value2 = op2->__anon1.ui64;
9584 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
9587 exp->expType = op1->type;
9589 op1->type->refCount++;
9594 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9596 short value2 = op2->__anon1.s;
9599 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
9602 exp->expType = op1->type;
9604 op1->type->refCount++;
9609 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9611 unsigned short value2 = op2->__anon1.us;
9614 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
9617 exp->expType = op1->type;
9619 op1->type->refCount++;
9624 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9626 char value2 = op2->__anon1.c;
9629 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
9632 exp->expType = op1->type;
9634 op1->type->refCount++;
9639 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9641 unsigned char value2 = op2->__anon1.uc;
9644 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
9647 exp->expType = op1->type;
9649 op1->type->refCount++;
9654 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9656 float value2 = op2->__anon1.f;
9659 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
9662 exp->expType = op1->type;
9664 op1->type->refCount++;
9669 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9671 double value2 = op2->__anon1.d;
9674 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
9677 exp->expType = op1->type;
9679 op1->type->refCount++;
9684 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9686 int value2 = op2->__anon1.i;
9689 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
9692 exp->expType = op1->type;
9694 op1->type->refCount++;
9699 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9701 unsigned int value2 = op2->__anon1.ui;
9704 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
9707 exp->expType = op1->type;
9709 op1->type->refCount++;
9714 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9716 long long value2 = op2->__anon1.i64;
9719 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
9722 exp->expType = op1->type;
9724 op1->type->refCount++;
9729 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9731 uint64 value2 = op2->__anon1.ui64;
9734 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
9737 exp->expType = op1->type;
9739 op1->type->refCount++;
9744 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9746 short value2 = op2->__anon1.s;
9749 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
9752 exp->expType = op1->type;
9754 op1->type->refCount++;
9759 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9761 unsigned short value2 = op2->__anon1.us;
9764 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
9767 exp->expType = op1->type;
9769 op1->type->refCount++;
9774 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9776 char value2 = op2->__anon1.c;
9779 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
9782 exp->expType = op1->type;
9784 op1->type->refCount++;
9789 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9791 unsigned char value2 = op2->__anon1.uc;
9794 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
9797 exp->expType = op1->type;
9799 op1->type->refCount++;
9804 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9806 float value2 = op2->__anon1.f;
9809 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
9812 exp->expType = op1->type;
9814 op1->type->refCount++;
9819 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9821 double value2 = op2->__anon1.d;
9824 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
9827 exp->expType = op1->type;
9829 op1->type->refCount++;
9834 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9836 int value2 = op2->__anon1.i;
9839 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
9842 exp->expType = op1->type;
9844 op1->type->refCount++;
9849 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9851 unsigned int value2 = op2->__anon1.ui;
9854 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
9857 exp->expType = op1->type;
9859 op1->type->refCount++;
9864 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9866 long long value2 = op2->__anon1.i64;
9869 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
9872 exp->expType = op1->type;
9874 op1->type->refCount++;
9879 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9881 uint64 value2 = op2->__anon1.ui64;
9884 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
9887 exp->expType = op1->type;
9889 op1->type->refCount++;
9894 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9896 short value2 = op2->__anon1.s;
9899 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
9902 exp->expType = op1->type;
9904 op1->type->refCount++;
9909 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9911 unsigned short value2 = op2->__anon1.us;
9914 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
9917 exp->expType = op1->type;
9919 op1->type->refCount++;
9924 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9926 char value2 = op2->__anon1.c;
9929 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
9932 exp->expType = op1->type;
9934 op1->type->refCount++;
9939 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9941 unsigned char value2 = op2->__anon1.uc;
9944 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
9947 exp->expType = op1->type;
9949 op1->type->refCount++;
9954 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9956 float value2 = op2->__anon1.f;
9959 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
9962 exp->expType = op1->type;
9964 op1->type->refCount++;
9969 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9971 double value2 = op2->__anon1.d;
9974 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
9977 exp->expType = op1->type;
9979 op1->type->refCount++;
9984 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9986 int value2 = op2->__anon1.i;
9989 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
9992 exp->expType = op1->type;
9994 op1->type->refCount++;
9999 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10001 unsigned int value2 = op2->__anon1.ui;
10004 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
10007 exp->expType = op1->type;
10009 op1->type->refCount++;
10014 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10016 long long value2 = op2->__anon1.i64;
10019 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
10022 exp->expType = op1->type;
10024 op1->type->refCount++;
10029 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10031 uint64 value2 = op2->__anon1.ui64;
10034 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
10037 exp->expType = op1->type;
10039 op1->type->refCount++;
10044 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10046 short value2 = op2->__anon1.s;
10049 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
10052 exp->expType = op1->type;
10054 op1->type->refCount++;
10059 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10061 unsigned short value2 = op2->__anon1.us;
10064 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
10067 exp->expType = op1->type;
10069 op1->type->refCount++;
10074 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10076 char value2 = op2->__anon1.c;
10079 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
10082 exp->expType = op1->type;
10084 op1->type->refCount++;
10089 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10091 unsigned char value2 = op2->__anon1.uc;
10094 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
10097 exp->expType = op1->type;
10099 op1->type->refCount++;
10104 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10106 float value2 = op2->__anon1.f;
10109 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
10112 exp->expType = op1->type;
10114 op1->type->refCount++;
10119 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10121 double value2 = op2->__anon1.d;
10124 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
10127 exp->expType = op1->type;
10129 op1->type->refCount++;
10134 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10136 int value2 = op2->__anon1.i;
10139 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
10142 exp->expType = op1->type;
10144 op1->type->refCount++;
10149 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10151 unsigned int value2 = op2->__anon1.ui;
10154 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
10157 exp->expType = op1->type;
10159 op1->type->refCount++;
10164 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10166 long long value2 = op2->__anon1.i64;
10169 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
10172 exp->expType = op1->type;
10174 op1->type->refCount++;
10179 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10181 uint64 value2 = op2->__anon1.ui64;
10184 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
10187 exp->expType = op1->type;
10189 op1->type->refCount++;
10194 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10196 short value2 = op2->__anon1.s;
10199 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
10202 exp->expType = op1->type;
10204 op1->type->refCount++;
10209 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10211 unsigned short value2 = op2->__anon1.us;
10214 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
10217 exp->expType = op1->type;
10219 op1->type->refCount++;
10224 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10226 char value2 = op2->__anon1.c;
10229 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
10232 exp->expType = op1->type;
10234 op1->type->refCount++;
10239 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10241 unsigned char value2 = op2->__anon1.uc;
10244 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
10247 exp->expType = op1->type;
10249 op1->type->refCount++;
10254 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10256 float value2 = op2->__anon1.f;
10259 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
10262 exp->expType = op1->type;
10264 op1->type->refCount++;
10269 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10271 double value2 = op2->__anon1.d;
10274 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
10277 exp->expType = op1->type;
10279 op1->type->refCount++;
10284 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10286 int value2 = op2->__anon1.i;
10289 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
10292 exp->expType = op1->type;
10294 op1->type->refCount++;
10299 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10301 unsigned int value2 = op2->__anon1.ui;
10304 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
10307 exp->expType = op1->type;
10309 op1->type->refCount++;
10314 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10316 long long value2 = op2->__anon1.i64;
10319 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
10322 exp->expType = op1->type;
10324 op1->type->refCount++;
10329 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10331 uint64 value2 = op2->__anon1.ui64;
10334 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
10337 exp->expType = op1->type;
10339 op1->type->refCount++;
10344 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10346 short value2 = op2->__anon1.s;
10349 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
10352 exp->expType = op1->type;
10354 op1->type->refCount++;
10359 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10361 unsigned short value2 = op2->__anon1.us;
10364 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
10367 exp->expType = op1->type;
10369 op1->type->refCount++;
10374 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10376 char value2 = op2->__anon1.c;
10379 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
10382 exp->expType = op1->type;
10384 op1->type->refCount++;
10389 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10391 unsigned char value2 = op2->__anon1.uc;
10394 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
10397 exp->expType = op1->type;
10399 op1->type->refCount++;
10404 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10406 float value2 = op2->__anon1.f;
10409 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
10412 exp->expType = op1->type;
10414 op1->type->refCount++;
10419 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10421 double value2 = op2->__anon1.d;
10424 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
10427 exp->expType = op1->type;
10429 op1->type->refCount++;
10434 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10436 int value2 = op2->__anon1.i;
10439 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
10442 exp->expType = op1->type;
10444 op1->type->refCount++;
10449 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10451 unsigned int value2 = op2->__anon1.ui;
10454 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
10457 exp->expType = op1->type;
10459 op1->type->refCount++;
10464 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10466 long long value2 = op2->__anon1.i64;
10469 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
10472 exp->expType = op1->type;
10474 op1->type->refCount++;
10479 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10481 uint64 value2 = op2->__anon1.ui64;
10484 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
10487 exp->expType = op1->type;
10489 op1->type->refCount++;
10494 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10496 short value2 = op2->__anon1.s;
10499 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
10502 exp->expType = op1->type;
10504 op1->type->refCount++;
10509 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10511 unsigned short value2 = op2->__anon1.us;
10514 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
10517 exp->expType = op1->type;
10519 op1->type->refCount++;
10524 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10526 char value2 = op2->__anon1.c;
10529 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
10532 exp->expType = op1->type;
10534 op1->type->refCount++;
10539 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10541 unsigned char value2 = op2->__anon1.uc;
10544 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
10547 exp->expType = op1->type;
10549 op1->type->refCount++;
10554 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10556 float value2 = op2->__anon1.f;
10559 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
10562 exp->expType = op1->type;
10564 op1->type->refCount++;
10569 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10571 double value2 = op2->__anon1.d;
10574 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
10577 exp->expType = op1->type;
10579 op1->type->refCount++;
10584 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10587 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
10590 exp->expType = op1->type;
10592 op1->type->refCount++;
10597 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10600 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
10603 exp->expType = op1->type;
10605 op1->type->refCount++;
10610 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10613 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
10616 exp->expType = op1->type;
10618 op1->type->refCount++;
10623 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10626 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
10629 exp->expType = op1->type;
10631 op1->type->refCount++;
10636 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10639 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
10642 exp->expType = op1->type;
10644 op1->type->refCount++;
10649 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10652 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
10655 exp->expType = op1->type;
10657 op1->type->refCount++;
10662 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10665 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
10668 exp->expType = op1->type;
10670 op1->type->refCount++;
10675 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10678 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
10681 exp->expType = op1->type;
10683 op1->type->refCount++;
10688 struct OpTable intOps =
10690 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
10693 struct OpTable uintOps =
10695 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
10698 struct OpTable int64Ops =
10700 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
10703 struct OpTable uint64Ops =
10705 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
10708 struct OpTable shortOps =
10710 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
10713 struct OpTable ushortOps =
10715 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
10718 struct OpTable floatOps =
10720 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
10723 struct OpTable doubleOps =
10725 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
10728 struct OpTable charOps =
10730 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
10733 struct OpTable ucharOps =
10735 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
10738 void ReadString(char * output, char * string)
10740 int len = strlen(string);
10742 unsigned int quoted = 0x0, escaped = 0x0;
10744 for(c = 0; c < len; c++)
10746 char ch = string[c];
10804 int UnescapeString(char * d, char * s, int len)
10809 while(j < len && (ch = s[j]))
10814 switch((ch = s[++j]))
10860 char * OffsetEscapedString(char * s, int len, int offset)
10865 while(j < len && k < offset && (ch = s[j]))
10871 return (k == offset) ? s + j : (((void *)0));
10874 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
10876 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
10878 extern double strtod(const char * , char * * );
10880 extern float (* __ecereMethod_float_inf)(void);
10882 extern float (* __ecereMethod_float_nan)(void);
10884 extern double (* __ecereMethod_double_inf)(void);
10886 extern double (* __ecereMethod_double_nan)(void);
10888 struct Operand GetOperand(struct Expression * exp)
10890 struct Operand op =
10897 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
10900 struct Type * type = exp->expType;
10904 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))
10906 if(!type->__anon1._class->__anon1.registered->dataType)
10907 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
10908 type = type->__anon1._class->__anon1.registered->dataType;
10910 if(exp->type == 3 && op.kind == 13)
10912 op.__anon1.ui64 = (uint64)exp->__anon1.__anon2.string;
10914 op.ops = uint64Ops;
10916 else if(exp->isConstant && exp->type == 2)
10918 op.kind = type->kind;
10919 op.type = exp->expType;
10925 if(exp->__anon1.__anon1.constant[0] == '\'')
10927 op.__anon1.c = exp->__anon1.__anon1.constant[1];
10930 else if(type->isSigned)
10932 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10937 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10945 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10950 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10951 op.ops = ushortOps;
10958 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10963 op.__anon1.ui = strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10971 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10976 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10977 op.ops = uint64Ops;
10984 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10989 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10990 op.ops = uint64Ops;
10997 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11002 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11003 op.ops = uint64Ops;
11008 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11009 op.__anon1.f = __ecereMethod_float_inf();
11010 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11011 op.__anon1.f = -__ecereMethod_float_inf();
11012 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11013 op.__anon1.f = __ecereMethod_float_nan();
11014 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11015 op.__anon1.f = -__ecereMethod_float_nan();
11017 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11021 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11022 op.__anon1.d = __ecereMethod_double_inf();
11023 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11024 op.__anon1.d = -__ecereMethod_double_inf();
11025 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11026 op.__anon1.d = __ecereMethod_double_nan();
11027 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11028 op.__anon1.d = -__ecereMethod_double_nan();
11030 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11031 op.ops = doubleOps;
11036 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11038 op.ops = uint64Ops;
11046 int __ecereVMethodID_class_OnGetString;
11048 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
11050 static __attribute__((unused)) void UnusedFunction()
11054 ((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);
11057 extern int __ecereVMethodID_class_OnGetString;
11059 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
11061 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11063 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
11065 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11066 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
11069 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11070 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11071 struct Type * type;
11072 void * ptr = inst->data + dataMember->offset + offset;
11073 char * result = (((void *)0));
11075 exp->loc = member->loc = inst->loc;
11076 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11077 if(!dataMember->dataType)
11078 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11079 type = dataMember->dataType;
11080 if(type->kind == 8)
11082 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11084 if(_class->type == 4)
11086 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11090 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11091 struct __ecereNameSpace__ecere__sys__NamedLink * item;
11093 for(item = e->values.first; item; item = item->next)
11095 if((int)item->data == *(int *)ptr)
11097 result = item->name;
11103 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11105 exp->destType = MkClassType(_class->fullName);
11106 ProcessExpressionType(exp);
11110 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11112 if(!_class->dataType)
11113 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11114 type = _class->dataType;
11123 FreeExpContents(exp);
11124 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11130 FreeExpContents(exp);
11131 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11137 FreeExpContents(exp);
11138 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11144 FreeExpContents(exp);
11145 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11151 FreeExpContents(exp);
11152 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11158 FreeExpContents(exp);
11159 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11164 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11167 ListAdd(memberList, member);
11169 if(parentDataMember->type == 1)
11174 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
11176 void PopulateInstance(struct Instantiation * inst)
11178 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
11179 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
11180 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11181 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
11184 inst->members = MkListOne(MkMembersInitList(memberList));
11186 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
11187 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
11189 if(!dataMember->isProperty)
11191 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11192 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
11195 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11196 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11197 struct Type * type;
11198 void * ptr = inst->data + dataMember->offset;
11199 char * result = (((void *)0));
11201 exp->loc = member->loc = inst->loc;
11202 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11203 if(!dataMember->dataType)
11204 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11205 type = dataMember->dataType;
11206 if(type->kind == 8)
11208 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11210 if(_class->type == 4)
11212 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11216 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11217 struct __ecereNameSpace__ecere__sys__NamedLink * item;
11219 for(item = e->values.first; item; item = item->next)
11221 if((int)item->data == *(int *)ptr)
11223 result = item->name;
11230 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11232 exp->destType = MkClassType(_class->fullName);
11233 ProcessExpressionType(exp);
11236 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11238 if(!_class->dataType)
11239 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11240 type = _class->dataType;
11249 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11255 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11261 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11267 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11273 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11278 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11281 ListAdd(memberList, member);
11287 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);
11289 extern void FreeInstance(struct Instantiation * inst);
11291 void ComputeInstantiation(struct Expression * exp)
11293 struct Instantiation * inst = exp->__anon1.instance;
11294 struct MembersInit * members;
11295 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11296 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11297 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11298 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11299 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11300 int subMemberStackPos = 0;
11303 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11307 if(_class->type == 0 || _class->type == 5)
11309 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11310 if(_class->type == 0)
11311 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11314 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11318 for(members = (*inst->members).first; members; members = members->next)
11320 switch(members->type)
11324 if(members->__anon1.dataMembers)
11326 struct MemberInit * member;
11328 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11330 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11331 unsigned int found = 0x0;
11332 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11333 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11334 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
11335 unsigned int dataMemberOffset;
11339 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11342 if(curMember->isProperty)
11343 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11346 dataMember = curMember;
11347 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11348 if(_class->type == 0)
11349 dataMemberOffset += _class->base->structSize;
11356 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11360 if(prop->memberAccess == 1)
11362 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11363 curClass = prop->_class;
11368 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11369 int _subMemberStackPos = 0;
11371 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11375 if(dataMember->memberAccess == 1)
11377 curMember = dataMember;
11378 curClass = dataMember->_class;
11379 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11380 subMemberStackPos = _subMemberStackPos;
11385 if(found && member->initializer && member->initializer->type == 0)
11387 struct Expression * value = member->initializer->__anon1.exp;
11388 struct Type * type = (((void *)0));
11389 unsigned int deepMember = 0x0;
11393 type = prop->dataType;
11395 else if(dataMember)
11397 if(!dataMember->dataType)
11398 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11399 type = dataMember->dataType;
11401 if(ident && ident->next)
11404 for(ident = ident->next; ident && type; ident = ident->next)
11406 if(type->kind == 8)
11408 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11410 type = prop->dataType;
11413 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11415 type = dataMember->dataType;
11418 else if(type->kind == 9 || type->kind == 10)
11420 struct Type * memberType;
11422 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11424 if(!strcmp(memberType->name, ident->string))
11435 FreeType(value->destType);
11436 value->destType = type;
11439 ComputeExpression(value);
11441 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11443 if(type->kind == 8)
11445 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11447 if(_class->type == 2 || _class->type == 3 || _class->type == 4)
11449 if(!_class->dataType)
11450 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11451 type = _class->dataType;
11456 void * ptr = inst->data + dataMemberOffset;
11458 if(value->type == 2)
11464 GetInt(value, (int *)ptr);
11469 GetInt64(value, (long long *)ptr);
11474 GetIntPtr(value, (intptr_t *)ptr);
11479 GetIntSize(value, (ssize_t *)ptr);
11484 GetFloat(value, (float *)ptr);
11489 GetDouble(value, (double *)ptr);
11494 else if(value->type == 1)
11496 if(type->kind == 8)
11498 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11500 if(_class->type == 1)
11502 ComputeTypeSize(type);
11503 if(value->__anon1.instance->data)
11504 memcpy(ptr, value->__anon1.instance->data, type->size);
11511 if(value->type == 1 && value->__anon1.instance->data)
11513 if(type->kind == 8)
11515 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11517 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)))
11519 void (* Set)(void *, void *) = (void *)prop->Set;
11521 Set(inst->data, value->__anon1.instance->data);
11522 PopulateInstance(inst);
11526 else if(value->type == 2)
11532 void (* Set)(void *, double) = (void *)prop->Set;
11534 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11539 void (* Set)(void *, float) = (void *)prop->Set;
11541 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11546 void (* Set)(void *, int) = (void *)prop->Set;
11548 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11553 void (* Set)(void *, long long) = (void *)prop->Set;
11555 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11560 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11562 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11567 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11569 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11574 else if(value->type == 3)
11578 ReadString(temp, value->__anon1.__anon2.string);
11579 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11583 else if(!deepMember && type && _class->type == 3)
11587 if(value->type == 2)
11589 if(type->kind == 8)
11591 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11593 if(_class->type == 3)
11595 if(!_class->dataType)
11596 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11597 type = _class->dataType;
11605 float (* Set)(float) = (void *)prop->Set;
11607 GetFloat(member->initializer->__anon1.exp, &fValue);
11608 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11615 double (* Set)(double) = (void *)prop->Set;
11617 GetDouble(member->initializer->__anon1.exp, &dValue);
11618 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11626 else if(!deepMember && type && _class->type == 2)
11630 if(value->type == 1 && value->__anon1.instance->data)
11632 unsigned int (* Set)(void *) = (void *)prop->Set;
11634 bits = Set(value->__anon1.instance->data);
11636 else if(value->type == 2)
11640 else if(dataMember)
11642 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11643 struct Type * type;
11646 bits = (bits & ~bitMember->mask);
11647 if(!bitMember->dataType)
11648 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0x0);
11649 type = bitMember->dataType;
11650 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11652 if(!type->__anon1._class->__anon1.registered->dataType)
11653 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
11654 type = type->__anon1._class->__anon1.registered->dataType;
11663 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11671 type->isSigned ? GetShort(value, &v) : GetUShort(value, &v);
11680 type->isSigned ? GetInt(value, &v) : GetUInt(value, &v);
11688 type->isSigned ? GetInt64(value, &v) : GetUInt64(value, &v);
11696 type->isSigned ? GetIntPtr(value, &v) : GetUIntPtr(value, &v);
11704 type->isSigned ? GetIntSize(value, &v) : GetUIntSize(value, &v);
11709 bits |= part << bitMember->pos;
11715 if(_class && _class->type == 3)
11717 ComputeExpression(member->initializer->__anon1.exp);
11718 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11720 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11730 if(_class && _class->type == 2)
11732 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11737 FreeInstance(inst);
11741 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
11743 unsigned int result = 0x0;
11748 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
11749 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
11753 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
11754 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11757 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)
11758 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11761 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)
11762 result = GetOpFloat(op, &op->__anon1.f);
11765 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)
11766 result = GetOpDouble(op, &op->__anon1.d);
11769 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)
11770 result = GetOpUIntPtr(op, &op->__anon1.ui64);
11773 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)
11774 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11777 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11778 result = isSigned ? GetOpIntPtr(op, &op->__anon1.i64) : GetOpUIntPtr(op, &op->__anon1.i64);
11781 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11782 result = isSigned ? GetOpIntSize(op, &op->__anon1.ui64) : GetOpUIntSize(op, &op->__anon1.ui64);
11788 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11790 if(exp->__anon1.op.op == SIZEOF)
11792 FreeExpContents(exp);
11794 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11798 if(!exp->__anon1.op.exp1)
11800 switch(exp->__anon1.op.op)
11804 struct Expression * exp2 = exp->__anon1.op.exp2;
11806 exp->__anon1.op.exp2 = (((void *)0));
11807 FreeExpContents(exp);
11808 FreeType(exp->expType);
11809 FreeType(exp->destType);
11811 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11817 FreeExpContents(exp);
11818 op1->ops.Neg(exp, op1);
11822 if(op1->ops.BitNot)
11824 FreeExpContents(exp);
11825 op1->ops.BitNot(exp, op1);
11831 FreeExpContents(exp);
11832 op1->ops.Not(exp, op1);
11839 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11841 if(Promote(op2, op1->kind, op1->type->isSigned))
11842 op2->kind = op1->kind, op2->ops = op1->ops;
11843 else if(Promote(op1, op2->kind, op2->type->isSigned))
11844 op1->kind = op2->kind, op1->ops = op2->ops;
11846 switch(exp->__anon1.op.op)
11851 FreeExpContents(exp);
11852 op1->ops.Add(exp, op1, op2);
11858 FreeExpContents(exp);
11859 op1->ops.Sub(exp, op1, op2);
11865 FreeExpContents(exp);
11866 op1->ops.Mul(exp, op1, op2);
11872 FreeExpContents(exp);
11873 op1->ops.Div(exp, op1, op2);
11879 FreeExpContents(exp);
11880 op1->ops.Mod(exp, op1, op2);
11884 if(exp->__anon1.op.exp2)
11886 if(op1->ops.BitAnd)
11888 FreeExpContents(exp);
11889 op1->ops.BitAnd(exp, op1, op2);
11896 FreeExpContents(exp);
11897 op1->ops.BitOr(exp, op1, op2);
11901 if(op1->ops.BitXor)
11903 FreeExpContents(exp);
11904 op1->ops.BitXor(exp, op1, op2);
11908 if(op1->ops.LShift)
11910 FreeExpContents(exp);
11911 op1->ops.LShift(exp, op1, op2);
11915 if(op1->ops.RShift)
11917 FreeExpContents(exp);
11918 op1->ops.RShift(exp, op1, op2);
11924 FreeExpContents(exp);
11925 op1->ops.Equ(exp, op1, op2);
11931 FreeExpContents(exp);
11932 op1->ops.Nqu(exp, op1, op2);
11938 FreeExpContents(exp);
11939 op1->ops.And(exp, op1, op2);
11945 FreeExpContents(exp);
11946 op1->ops.Or(exp, op1, op2);
11952 FreeExpContents(exp);
11953 op1->ops.Grt(exp, op1, op2);
11959 FreeExpContents(exp);
11960 op1->ops.Sma(exp, op1, op2);
11964 if(op1->ops.GrtEqu)
11966 FreeExpContents(exp);
11967 op1->ops.GrtEqu(exp, op1, op2);
11971 if(op1->ops.SmaEqu)
11973 FreeExpContents(exp);
11974 op1->ops.SmaEqu(exp, op1, op2);
11982 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
11984 extern struct Expression * MkExpIdentifier(struct Identifier * id);
11986 void ComputeExpression(struct Expression * exp)
11988 char expString[10240];
11990 expString[0] = '\0';
11995 ComputeInstantiation(exp);
12000 struct Expression * exp1, * exp2 = (((void *)0));
12001 struct Operand op1 =
12008 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12011 struct Operand op2 =
12018 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12022 if(exp->__anon1.op.exp2)
12024 struct Expression * e = exp->__anon1.op.exp2;
12026 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
12028 if(e->type == 5 || e->type == 32 || e->type == 23)
12031 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12033 e = (*e->__anon1.list).last;
12036 if(exp->__anon1.op.op == 261 && e && e->expType)
12038 if(e->type == 3 && e->__anon1.__anon2.string)
12040 char * string = e->__anon1.__anon2.string;
12041 int len = strlen(string);
12042 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
12044 len = UnescapeString(tmp, string + 1, len - 2);
12045 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
12046 FreeExpContents(exp);
12048 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
12052 struct Type * type = e->expType;
12055 FreeExpContents(exp);
12057 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12063 ComputeExpression(exp->__anon1.op.exp2);
12065 if(exp->__anon1.op.exp1)
12067 ComputeExpression(exp->__anon1.op.exp1);
12068 exp1 = exp->__anon1.op.exp1;
12069 exp2 = exp->__anon1.op.exp2;
12070 op1 = GetOperand(exp1);
12072 op1.type->refCount++;
12075 op2 = GetOperand(exp2);
12077 op2.type->refCount++;
12082 exp1 = exp->__anon1.op.exp2;
12083 op1 = GetOperand(exp1);
12085 op1.type->refCount++;
12087 CallOperator(exp, exp1, exp2, &op1, &op2);
12089 FreeType(op1.type);
12091 FreeType(op2.type);
12097 struct Expression * e, * n;
12099 for(e = (*exp->__anon1.list).first; e; e = n)
12104 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
12105 struct Expression * prev = exp->prev;
12106 struct Expression * next = exp->next;
12108 ComputeExpression(e);
12109 FreeType(exp->expType);
12110 FreeType(exp->destType);
12114 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
12115 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
12126 struct Expression * memberExp = exp->__anon1.member.exp;
12127 struct Identifier * memberID = exp->__anon1.member.member;
12128 struct Type * type;
12130 ComputeExpression(exp->__anon1.member.exp);
12131 type = exp->__anon1.member.exp->expType;
12134 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)));
12135 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
12136 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
12137 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
12139 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
12140 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
12144 struct Symbol * classSym;
12147 PrintTypeNoConst(type, string, 0x0, 0x1);
12148 classSym = FindClass(string);
12149 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12151 if(exp->__anon1.member.member)
12153 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
12155 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
12157 if(!prop && !member && _class && exp->__anon1.member.member)
12159 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
12161 convertTo = _class;
12162 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12163 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
12169 struct Type * type = prop->dataType;
12171 if(_class->type == 3)
12173 if(type->kind == 8)
12175 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12177 if(_class->type == 3)
12179 if(!_class->dataType)
12180 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
12181 type = _class->dataType;
12189 float (* Get)(float) = (void *)prop->Get;
12191 GetFloat(exp->__anon1.member.exp, &value);
12192 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
12199 double (* Get)(double);
12201 GetDouble(exp->__anon1.member.exp, &value);
12203 Get = (void *)prop->Set;
12205 Get = (void *)prop->Get;
12206 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
12216 struct Expression * value = exp->__anon1.member.exp;
12217 struct Type * type;
12219 if(!prop->dataType)
12220 ProcessPropertyType(prop);
12221 type = prop->dataType;
12225 else if(_class->type == 1)
12231 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12233 if(propertyClass->type == 1 && value->type == 1)
12235 void (* Set)(void *, void *) = (void *)prop->Set;
12237 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12238 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12239 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12240 exp->__anon1.instance->loc = exp->loc;
12242 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
12243 PopulateInstance(exp->__anon1.instance);
12250 void (* Set)(void *, int) = (void *)prop->Set;
12252 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12253 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12254 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12255 exp->__anon1.instance->loc = exp->loc;
12257 GetInt(value, &intValue);
12258 Set(exp->__anon1.instance->data, intValue);
12259 PopulateInstance(exp->__anon1.instance);
12264 long long intValue;
12265 void (* Set)(void *, long long) = (void *)prop->Set;
12267 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12268 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12269 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12270 exp->__anon1.instance->loc = exp->loc;
12272 GetInt64(value, &intValue);
12273 Set(exp->__anon1.instance->data, intValue);
12274 PopulateInstance(exp->__anon1.instance);
12280 void (* Set)(void *, intptr_t) = (void *)prop->Set;
12282 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12283 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12284 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12285 exp->__anon1.instance->loc = exp->loc;
12287 GetIntPtr(value, &intValue);
12288 Set(exp->__anon1.instance->data, intValue);
12289 PopulateInstance(exp->__anon1.instance);
12295 void (* Set)(void *, ssize_t) = (void *)prop->Set;
12297 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12298 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12299 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12300 exp->__anon1.instance->loc = exp->loc;
12302 GetIntSize(value, &intValue);
12303 Set(exp->__anon1.instance->data, intValue);
12304 PopulateInstance(exp->__anon1.instance);
12310 void (* Set)(void *, float) = (void *)prop->Set;
12312 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12313 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12314 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12315 exp->__anon1.instance->loc = exp->loc;
12317 GetFloat(value, &floatValue);
12318 Set(exp->__anon1.instance->data, floatValue);
12319 PopulateInstance(exp->__anon1.instance);
12324 double doubleValue;
12325 void (* Set)(void *, double) = (void *)prop->Set;
12327 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12328 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12329 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12330 exp->__anon1.instance->loc = exp->loc;
12332 GetDouble(value, &doubleValue);
12333 Set(exp->__anon1.instance->data, doubleValue);
12334 PopulateInstance(exp->__anon1.instance);
12339 else if(_class->type == 2)
12345 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12347 if(propertyClass->type == 1 && value->__anon1.instance->data)
12349 unsigned int (* Set)(void *) = (void *)prop->Set;
12350 unsigned int bits = Set(value->__anon1.instance->data);
12352 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12356 else if(_class->type == 2)
12358 unsigned int value;
12359 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
12362 GetUInt(exp->__anon1.member.exp, &value);
12364 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12373 if(_class->type == 2)
12375 unsigned int value;
12377 GetUInt(exp->__anon1.member.exp, &value);
12382 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12384 if(_class->type == 1)
12386 void (* Get)(unsigned int, void *) = (void *)prop->Get;
12388 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12389 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12390 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12391 exp->__anon1.instance->loc = exp->loc;
12393 Get(value, exp->__anon1.instance->data);
12394 PopulateInstance(exp->__anon1.instance);
12396 else if(_class->type == 2)
12398 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
12399 uint64 bits = Get(value);
12401 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
12408 else if(_class->type == 1)
12410 char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
12416 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12418 if(_class->type == 1 && value)
12420 void (* Get)(void *, void *) = (void *)prop->Get;
12422 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12423 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12424 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12425 exp->__anon1.instance->loc = exp->loc;
12427 Get(value, exp->__anon1.instance->data);
12428 PopulateInstance(exp->__anon1.instance);
12439 exp->isConstant = 0x0;
12448 FreeExpression(memberExp);
12449 FreeIdentifier(memberID);
12455 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
12457 FreeExpContents(exp);
12458 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12465 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
12467 if(classSym && classSym->__anon1.registered)
12469 if(classSym->__anon1.registered->fixed)
12471 FreeSpecifier(exp->__anon1._class);
12472 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
12477 char className[1024];
12479 strcpy(className, "__ecereClass_");
12480 FullClassNameCat(className, classSym->string, 0x1);
12481 MangleClassName(className);
12482 DeclareClass(classSym, className);
12483 FreeExpContents(exp);
12485 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
12486 exp->__anon1.member.member = MkIdentifier("structSize");
12493 struct Type * type;
12494 struct Expression * e = exp;
12496 if(exp->type == 11)
12498 if(exp->__anon1.cast.exp)
12499 ComputeExpression(exp->__anon1.cast.exp);
12500 e = exp->__anon1.cast.exp;
12502 if(e && exp->expType)
12504 type = exp->expType;
12505 if(type->kind == 8)
12507 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12509 if(_class && (_class->type == 3 || _class->type == 2))
12511 if(!_class->dataType)
12512 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
12513 type = _class->dataType;
12522 char value = (char)0;
12524 if(GetChar(e, &value))
12526 FreeExpContents(exp);
12527 exp->__anon1.__anon1.constant = PrintChar(value);
12533 unsigned char value = (unsigned char)0;
12535 if(GetUChar(e, &value))
12537 FreeExpContents(exp);
12538 exp->__anon1.__anon1.constant = PrintUChar(value);
12546 short value = (short)0;
12548 if(GetShort(e, &value))
12550 FreeExpContents(exp);
12551 exp->__anon1.__anon1.constant = PrintShort(value);
12557 unsigned short value = (unsigned short)0;
12559 if(GetUShort(e, &value))
12561 FreeExpContents(exp);
12562 exp->__anon1.__anon1.constant = PrintUShort(value);
12572 if(GetInt(e, &value))
12574 FreeExpContents(exp);
12575 exp->__anon1.__anon1.constant = PrintInt(value);
12581 unsigned int value = 0;
12583 if(GetUInt(e, &value))
12585 FreeExpContents(exp);
12586 exp->__anon1.__anon1.constant = PrintUInt(value);
12594 long long value = 0;
12596 if(GetInt64(e, &value))
12598 FreeExpContents(exp);
12599 exp->__anon1.__anon1.constant = PrintInt64(value);
12607 if(GetUInt64(e, &value))
12609 FreeExpContents(exp);
12610 exp->__anon1.__anon1.constant = PrintUInt64(value);
12618 intptr_t value = 0;
12620 if(GetIntPtr(e, &value))
12622 FreeExpContents(exp);
12623 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12629 uintptr_t value = 0;
12631 if(GetUIntPtr(e, &value))
12633 FreeExpContents(exp);
12634 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12644 if(GetIntSize(e, &value))
12646 FreeExpContents(exp);
12647 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12655 if(GetUIntSize(e, &value))
12657 FreeExpContents(exp);
12658 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12667 if(GetFloat(e, &value))
12669 FreeExpContents(exp);
12670 exp->__anon1.__anon1.constant = PrintFloat(value);
12679 if(GetDouble(e, &value))
12681 FreeExpContents(exp);
12682 exp->__anon1.__anon1.constant = PrintDouble(value);
12693 struct Operand op1 =
12700 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12703 struct Operand op2 =
12710 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12713 struct Operand op3 =
12720 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12724 if(exp->__anon1.cond.exp)
12725 ComputeExpression((*exp->__anon1.cond.exp).last);
12726 if(exp->__anon1.cond.elseExp)
12727 ComputeExpression(exp->__anon1.cond.elseExp);
12728 if(exp->__anon1.cond.cond)
12729 ComputeExpression(exp->__anon1.cond.cond);
12730 op1 = GetOperand(exp->__anon1.cond.cond);
12732 op1.type->refCount++;
12733 op2 = GetOperand((*exp->__anon1.cond.exp).last);
12735 op2.type->refCount++;
12736 op3 = GetOperand(exp->__anon1.cond.elseExp);
12738 op3.type->refCount++;
12741 FreeExpContents(exp);
12742 op1.ops.Cond(exp, &op1, &op2, &op3);
12745 FreeType(op1.type);
12747 FreeType(op2.type);
12749 FreeType(op3.type);
12755 void ApplyAnyObjectLogic(struct Expression * e);
12757 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
12759 unsigned int result = 0x1;
12763 struct __ecereNameSpace__ecere__sys__OldList converts =
12767 struct Conversion * convert;
12769 if(destType->kind == 0)
12771 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
12775 for(convert = converts.first; convert; convert = convert->next)
12777 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
12781 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12782 int objectType = exp->expType ? exp->expType->classObjectType : 0;
12785 newExp->prev = (((void *)0));
12786 newExp->next = (((void *)0));
12787 newExp->destType = (((void *)0));
12791 exp->addedThis = 0x1;
12792 exp->__anon1.member.exp = newExp;
12793 FreeType(exp->__anon1.member.exp->expType);
12794 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
12795 exp->__anon1.member.exp->expType->classObjectType = objectType;
12796 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
12797 exp->__anon1.member.memberType = 1;
12798 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12799 exp->needCast = 0x1;
12801 exp->expType->refCount++;
12802 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12808 exp->addedThis = 0x1;
12809 exp->__anon1.member.exp = newExp;
12810 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)
12812 newExp->byReference = 0x1;
12814 FreeType(exp->__anon1.member.exp->expType);
12815 exp->__anon1.member.exp->expType = (((void *)0));
12816 if(convert->convert->dataType)
12818 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12819 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
12820 exp->__anon1.member.exp->expType->refCount = 1;
12821 exp->__anon1.member.exp->expType->classObjectType = objectType;
12822 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12824 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
12825 exp->__anon1.member.memberType = 4;
12826 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12827 exp->needCast = 0x1;
12828 if(convert->resultType)
12829 convert->resultType->refCount++;
12835 FreeType(exp->expType);
12838 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12839 exp->needCast = 0x1;
12841 exp->expType->refCount++;
12845 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12846 exp->needCast = 0x1;
12847 if(convert->resultType)
12848 convert->resultType->refCount++;
12852 if(exp->isConstant && inCompiler)
12853 ComputeExpression(exp);
12854 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
12856 if(!result && exp->expType && converts.count)
12858 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
12860 if(!result && exp->expType && exp->destType)
12862 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))
12869 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
12871 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
12873 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
12875 void CheckTemplateTypes(struct Expression * exp)
12877 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate)
12879 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12880 struct Context * context;
12884 exp->destType->refCount++;
12886 exp->expType->refCount++;
12887 newExp->prev = (((void *)0));
12888 newExp->next = (((void *)0));
12889 switch(exp->expType->kind)
12892 if(exp->destType->classObjectType)
12895 exp->destType->refCount--;
12897 exp->expType->refCount--;
12898 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12902 struct __ecereNameSpace__ecere__sys__OldList * specs;
12903 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12904 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12906 context = PushContext();
12907 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12908 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12909 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12911 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12912 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
12913 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
12914 exp->__anon1.compound->__anon1.compound.context = context;
12915 PopContext(context);
12920 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
12921 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12925 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
12927 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12928 struct Statement * compound;
12929 struct Context * context;
12933 exp->destType->refCount++;
12935 exp->expType->refCount++;
12936 newExp->prev = (((void *)0));
12937 newExp->next = (((void *)0));
12938 switch(exp->expType->kind)
12941 if(exp->destType->classObjectType)
12944 exp->destType->refCount--;
12946 exp->expType->refCount--;
12947 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12951 struct __ecereNameSpace__ecere__sys__OldList * specs;
12952 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12953 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12955 context = PushContext();
12956 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12957 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12958 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12960 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12961 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
12962 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
12963 exp->__anon1.compound->__anon1.compound.context = context;
12964 PopContext(context);
12969 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
12972 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)));
12973 ProcessExpressionType((*exp->__anon1.list).first);
12979 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
12980 newExp->needCast = 0x1;
12981 ProcessExpressionType((*exp->__anon1.list).first);
12987 if(exp->expType->kind == 20)
12989 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
12993 FreeType(exp->destType);
12994 FreeType(exp->expType);
12995 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12999 if(newExp->type == 8 && newExp->__anon1.member.memberType == 3)
13002 exp->__anon1.op.op = '*';
13003 exp->__anon1.op.exp1 = (((void *)0));
13004 exp->__anon1.op.exp2 = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uint64")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '&', newExp))));
13008 char typeString[1024];
13009 struct Declarator * decl;
13010 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13012 typeString[0] = '\0';
13013 PrintType(exp->expType, typeString, 0x0, 0x0);
13014 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13016 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
13017 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
13018 exp->__anon1.cast.exp->needCast = 0x1;
13026 extern int strncmp(const char * , const char * , size_t n);
13028 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
13030 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
13032 int nsLen = strlen(nameSpace);
13033 struct Symbol * symbol;
13035 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)))
13037 char * s = symbol->string;
13039 if(!strncmp(s, nameSpace, nsLen))
13044 for(c = strlen(s) - 1; c >= 0; c--)
13047 namePart = s + c + 1;
13048 if(!strcmp(namePart, name))
13056 return (((void *)0));
13059 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
13062 char nameSpace[1024];
13063 const char * namePart;
13064 unsigned int gotColon = 0x0;
13066 nameSpace[0] = '\0';
13067 for(c = strlen(name) - 1; c >= 0; c--)
13073 namePart = name + c + 1;
13074 while(c >= 0 && name[c] == ':')
13078 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
13082 memcpy(nameSpace, name, c + 1);
13083 nameSpace[c + 1] = (char)0;
13084 return ScanWithNameSpace(tree, nameSpace, namePart);
13088 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13094 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13098 return ScanWithNameSpace(tree, "", namePart);
13100 return (((void *)0));
13103 static void ProcessDeclaration(struct Declaration * decl);
13105 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
13107 struct Context * ctx;
13108 struct Symbol * symbol = (((void *)0));
13110 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
13112 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
13114 symbol = (((void *)0));
13117 char curName[1024];
13119 strcpy(curName, thisNameSpace);
13120 strcat(curName, "::");
13121 strcat(curName, name);
13122 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
13125 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
13128 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
13129 if(symbol || ctx == endContext)
13132 if(inCompiler && curExternal && symbol && ctx == globalContext && curExternal->symbol && symbol->id > curExternal->symbol->idCode && symbol->__anon2.__anon1.pointerExternal)
13134 if(symbol->__anon2.__anon1.pointerExternal->type == 0)
13136 struct FunctionDefinition * function = symbol->__anon2.__anon1.pointerExternal->__anon1.function;
13137 struct Context * tmpContext = curContext;
13139 curContext = (((void *)0));
13140 symbol->__anon2.__anon1.pointerExternal = MkExternalDeclaration(MkDeclaration(CopyList(function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(function->declarator), (((void *)0))))));
13141 curContext = tmpContext;
13142 symbol->__anon2.__anon1.pointerExternal->symbol = symbol;
13143 DeclareType(symbol->type, 0x1, 0x1);
13144 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, symbol->__anon2.__anon1.pointerExternal);
13145 symbol->id = curExternal->symbol->idCode;
13147 else if(symbol->__anon2.__anon1.pointerExternal->type == 1 && curExternal->symbol->idCode < symbol->__anon2.__anon1.pointerExternal->symbol->id)
13149 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
13150 symbol->id = curExternal->symbol->idCode;
13156 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
13158 if(!type->isSigned && type->kind != 22 && type->kind != 23)
13159 ListAdd(specs, MkSpecifier(UNSIGNED));
13164 if(type->__anon1._class->__anon1.registered)
13166 if(!type->__anon1._class->__anon1.registered->dataType)
13167 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
13168 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
13173 ListAdd(specs, MkSpecifier(DOUBLE));
13176 ListAdd(specs, MkSpecifier(FLOAT));
13179 ListAdd(specs, MkSpecifier(CHAR));
13182 ListAdd(specs, MkSpecifier(_BOOL));
13185 ListAdd(specs, MkSpecifier(SHORT));
13188 ListAdd(specs, MkSpecifier(INT64));
13191 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
13194 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
13198 ListAdd(specs, MkSpecifier(INT));
13203 static void PrintArraySize(struct Type * arrayType, char * string)
13209 if(arrayType->__anon1.__anon4.enumClass)
13210 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
13211 else if(arrayType->__anon1.__anon4.arraySizeExp)
13212 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
13214 strcat(string, size);
13217 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
13221 if(printConst && type->constant)
13222 strcat(string, "const ");
13227 struct Symbol * c = type->__anon1._class;
13229 if(type->classObjectType == 2)
13230 strcat(string, "typed_object");
13231 else if(type->classObjectType == 3)
13232 strcat(string, "any_object");
13236 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
13238 if(type->byReference)
13239 strcat(string, " &");
13243 strcat(string, "void");
13246 strcat(string, type->isSigned ? "int" : "uint");
13249 strcat(string, type->isSigned ? "int64" : "uint64");
13252 strcat(string, type->isSigned ? "intptr" : "uintptr");
13255 strcat(string, type->isSigned ? "intsize" : "uintsize");
13258 strcat(string, type->isSigned ? "char" : "byte");
13261 strcat(string, "_Bool");
13264 strcat(string, type->isSigned ? "short" : "uint16");
13267 strcat(string, "float");
13270 strcat(string, "double");
13273 if(type->__anon1.__anon1.enumName)
13275 strcat(string, "struct ");
13276 strcat(string, type->__anon1.__anon1.enumName);
13278 else if(type->typeName)
13279 strcat(string, type->typeName);
13282 struct Type * member;
13284 strcat(string, "struct { ");
13285 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
13287 PrintType(member, string, 0x1, fullName);
13288 strcat(string, "; ");
13290 strcat(string, "}");
13294 if(type->__anon1.__anon1.enumName)
13296 strcat(string, "union ");
13297 strcat(string, type->__anon1.__anon1.enumName);
13299 else if(type->typeName)
13300 strcat(string, type->typeName);
13303 strcat(string, "union ");
13304 strcat(string, "(unnamed)");
13308 if(type->__anon1.__anon1.enumName)
13310 strcat(string, "enum ");
13311 strcat(string, type->__anon1.__anon1.enumName);
13313 else if(type->typeName)
13314 strcat(string, type->typeName);
13316 strcat(string, "int");
13319 strcat(string, "...");
13322 strcat(string, "subclass(");
13323 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
13324 strcat(string, ")");
13327 strcat(string, type->__anon1.templateParameter->identifier->string);
13330 strcat(string, "thisclass");
13333 strcat(string, "__builtin_va_list");
13339 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
13341 static void PrintName(struct Type * type, char * string, unsigned int fullName)
13343 if(type->name && type->name[0])
13346 strcat(string, type->name);
13349 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 0x1, 0x0);
13355 strcat(string, name);
13360 static void PrintAttribs(struct Type * type, char * string)
13364 if(type->dllExport)
13365 strcat(string, "dllexport ");
13366 if(type->attrStdcall)
13367 strcat(string, "stdcall ");
13371 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
13373 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13375 struct Type * attrType = (((void *)0));
13377 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
13378 PrintAttribs(type, string);
13379 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
13380 strcat(string, " const");
13381 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
13382 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13383 strcat(string, " (");
13384 if(type->kind == 13)
13386 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
13387 PrintAttribs(type->__anon1.type, string);
13389 if(type->kind == 13)
13391 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
13392 strcat(string, "*");
13394 strcat(string, " *");
13396 if(printConst && type->constant && type->kind == 13)
13397 strcat(string, " const");
13400 PrintTypeSpecs(type, string, fullName, printConst);
13403 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
13405 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13406 strcat(string, ")");
13407 if(type->kind == 12)
13408 PrintArraySize(type, string);
13409 else if(type->kind == 11)
13411 struct Type * param;
13413 strcat(string, "(");
13414 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
13416 PrintType(param, string, 0x1, fullName);
13418 strcat(string, ", ");
13420 strcat(string, ")");
13422 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13423 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
13426 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
13428 PrePrintType(type, string, fullName, (((void *)0)), printConst);
13429 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
13430 strcat(string, " ");
13431 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
13433 struct Symbol * _class = type->__anon1.__anon2.thisClass;
13435 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
13437 if(type->classObjectType == 1)
13438 strcat(string, "class");
13440 strcat(string, type->byReference ? "typed_object&" : "typed_object");
13442 else if(_class && _class->string)
13444 char * s = _class->string;
13450 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 0x1, 0x0);
13456 strcat(string, name);
13459 strcat(string, "::");
13461 if(printName && type->name)
13462 PrintName(type, string, fullName);
13463 PostPrintType(type, string, fullName);
13464 if(type->bitFieldCount)
13468 sprintf(count, ":%d", type->bitFieldCount);
13469 strcat(string, count);
13473 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13475 _PrintType(type, string, printName, fullName, 0x1);
13478 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13480 _PrintType(type, string, printName, fullName, 0x0);
13483 static struct Type * FindMember(struct Type * type, char * string)
13485 struct Type * memberType;
13487 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13489 if(!memberType->name)
13491 struct Type * subType = FindMember(memberType, string);
13496 else if(!strcmp(memberType->name, string))
13499 return (((void *)0));
13502 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
13504 struct Type * memberType;
13506 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13508 if(!memberType->name)
13510 struct Type * subType = FindMember(memberType, string);
13514 *offset += memberType->offset;
13518 else if(!strcmp(memberType->name, string))
13520 *offset += memberType->offset;
13524 return (((void *)0));
13527 extern unsigned int parseError;
13529 unsigned int GetParseError()
13534 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
13536 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
13538 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
13540 struct Expression * ParseExpressionString(char * expression)
13543 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
13544 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
13545 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13547 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13548 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
13549 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
13550 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13552 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13553 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
13555 parsedExpression = (((void *)0));
13557 expression_yyparse();
13558 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
13559 return parsedExpression;
13562 extern char * QMkString(const char * source);
13564 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
13566 struct Identifier * id = exp->__anon1.__anon1.identifier;
13567 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
13568 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13569 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13570 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
13572 if(_class && _class->type == 4)
13574 struct __ecereNameSpace__ecere__sys__NamedLink * value = (((void *)0));
13575 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13579 struct __ecereNameSpace__ecere__com__Class * baseClass;
13581 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
13583 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
13585 for(value = e->values.first; value; value = value->next)
13587 if(!strcmp(value->name, id->string))
13592 char constant[256];
13594 FreeExpContents(exp);
13596 exp->isConstant = 0x1;
13597 if(!strcmp(baseClass->dataTypeString, "int"))
13598 sprintf(constant, "%d", (int)value->data);
13600 sprintf(constant, "0x%X", (int)value->data);
13601 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13602 exp->expType = MkClassType(baseClass->fullName);
13610 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
13612 ProcessMethodType(method);
13613 exp->expType = __extension__ ({
13614 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13616 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
13620 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
13622 if(!prop->dataType)
13623 ProcessPropertyType(prop);
13624 exp->expType = prop->dataType;
13626 prop->dataType->refCount++;
13629 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
13631 if(!member->dataType)
13632 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
13633 exp->expType = member->dataType;
13634 if(member->dataType)
13635 member->dataType->refCount++;
13638 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
13640 if(!classProp->dataType)
13641 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0x0);
13642 if(classProp->constant)
13644 FreeExpContents(exp);
13645 exp->isConstant = 0x1;
13646 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
13649 exp->__anon1.__anon1.constant = QMkString((char *)classProp->Get(_class));
13653 char constant[256];
13656 sprintf(constant, "%d", (int)classProp->Get(_class));
13657 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13663 exp->expType = classProp->dataType;
13664 if(classProp->dataType)
13665 classProp->dataType->refCount++;
13671 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
13673 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
13674 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
13675 struct __ecereNameSpace__ecere__com__NameSpace * child;
13679 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)))
13681 data = ScanGlobalData(child, name);
13689 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
13691 extern char * strncpy(char * , const char * , size_t n);
13693 static struct GlobalData * FindGlobalData(char * name)
13696 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
13698 nameSpace = globalData;
13699 for(c = 0; name[c]; c++)
13701 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
13703 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
13704 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
13706 strncpy(spaceName, name + start, c - start);
13707 spaceName[c - start] = '\0';
13708 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
13709 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
13711 return (((void *)0));
13712 nameSpace = newSpace;
13720 return ScanGlobalData(nameSpace, name + start);
13722 return (((void *)0));
13725 static int definedExpStackPos;
13727 static void * definedExpStack[512];
13729 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
13731 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
13733 FreeExpContents(checkedExp);
13734 FreeType(checkedExp->expType);
13735 FreeType(checkedExp->destType);
13736 *checkedExp = *newExp;
13737 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13738 checkedExp->prev = prev;
13739 checkedExp->next = next;
13742 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
13744 extern int printf(const char * , ...);
13746 void __ecereMethod_Expression_Clear();
13748 void ApplyAnyObjectLogic(struct Expression * e)
13750 struct Type * destType = e->destType;
13752 if(destType && (destType->classObjectType == 3))
13754 if(e && e->expType)
13756 struct Type * type = e->expType;
13757 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
13759 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
13761 _class = type->__anon1._class->__anon1.registered;
13763 else if(type->kind == 19)
13765 _class = FindClass("ecere::com::Class")->__anon1.registered;
13769 char string[1024] = "";
13770 struct Symbol * classSym;
13772 PrintTypeNoConst(type, string, 0x0, 0x1);
13773 classSym = FindClass(string);
13775 _class = classSym->__anon1.registered;
13777 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)))
13779 if(!_class || strcmp(_class->fullName, "char *"))
13781 struct Expression * checkedExp = e, * newExp;
13783 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13785 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13787 if(checkedExp->type == 23)
13789 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13792 checkedExp = (*checkedExp->__anon1.list).last;
13794 else if(checkedExp->type == 11)
13795 checkedExp = checkedExp->__anon1.cast.exp;
13797 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
13799 newExp = checkedExp->__anon1.op.exp2;
13800 checkedExp->__anon1.op.exp2 = (((void *)0));
13801 FreeExpContents(checkedExp);
13802 if(e->expType && e->expType->passAsTemplate)
13806 ComputeTypeSize(e->expType);
13807 sprintf(size, "%d", e->expType->size);
13808 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))))));
13810 ReplaceExpContents(checkedExp, newExp);
13811 e->byReference = 0x1;
13813 else if(!e->byReference || (_class && _class->type == 5))
13815 struct Expression * checkedExp;
13818 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;
13820 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
13822 struct Context * context = PushContext();
13823 struct Declarator * decl;
13824 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13825 char typeString[1024];
13826 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13828 typeString[0] = '\0';
13830 newExp->prev = (((void *)0));
13831 newExp->next = (((void *)0));
13832 newExp->expType = (((void *)0));
13833 PrintTypeNoConst(e->expType, typeString, 0x0, 0x1);
13834 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13835 newExp->destType = ProcessType(specs, decl);
13836 curContext = context;
13840 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
13843 sprintf(name, "__internalValue%03X", internalValueCounter++);
13844 if(!curCompound->__anon1.compound.declarations)
13845 curCompound->__anon1.compound.declarations = MkList();
13846 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
13847 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
13848 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
13849 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
13852 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
13854 struct Type * type = e->destType;
13856 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13857 CopyTypeInto(e->destType, type);
13858 e->destType->refCount = 1;
13859 e->destType->classObjectType = 0;
13862 e->__anon1.compound->__anon1.compound.context = context;
13863 PopContext(context);
13864 curContext = context->parent;
13868 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13870 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13872 if(checkedExp->type == 23)
13874 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13877 checkedExp = (*checkedExp->__anon1.list).last;
13879 else if(checkedExp->type == 11)
13880 checkedExp = checkedExp->__anon1.cast.exp;
13883 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13885 *operand = *checkedExp;
13886 checkedExp->destType = (((void *)0));
13887 checkedExp->expType = (((void *)0));
13888 __ecereMethod_Expression_Clear(checkedExp);
13889 checkedExp->type = 4;
13890 checkedExp->__anon1.op.op = '&';
13891 checkedExp->__anon1.op.exp1 = (((void *)0));
13892 checkedExp->__anon1.op.exp2 = operand;
13901 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))))
13903 if(e->expType->classObjectType && destType && destType->classObjectType)
13909 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13912 thisExp->prev = (((void *)0));
13913 thisExp->next = (((void *)0));
13914 __ecereMethod_Expression_Clear(e);
13916 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
13917 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
13918 ((struct Expression *)(*e->__anon1.list).first)->byReference = 0x1;
13920 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13921 CopyTypeInto(e->expType, thisExp->expType);
13922 e->expType->byReference = 0x0;
13923 e->expType->refCount = 1;
13924 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))
13926 e->expType->classObjectType = 0;
13931 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
13933 if(destType->kind == 14)
13935 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
13937 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))
13939 unsigned int byReference = e->expType->byReference;
13940 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13941 struct Declarator * decl;
13942 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13943 char typeString[1024];
13944 struct Type * type;
13945 int backupClassObjectType;
13946 unsigned int backupByReference;
13948 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
13952 backupClassObjectType = type->classObjectType;
13953 backupByReference = type->byReference;
13954 type->classObjectType = 0;
13955 type->byReference = 0x0;
13956 typeString[0] = '\0';
13957 PrintType(type, typeString, 0x0, 0x1);
13958 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13959 type->classObjectType = backupClassObjectType;
13960 type->byReference = backupByReference;
13962 thisExp->prev = (((void *)0));
13963 thisExp->next = (((void *)0));
13964 __ecereMethod_Expression_Clear(e);
13965 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)))
13968 e->__anon1.op.op = '*';
13969 e->__anon1.op.exp1 = (((void *)0));
13970 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
13971 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13972 CopyTypeInto(e->expType, type);
13973 e->expType->byReference = 0x0;
13974 e->expType->refCount = 1;
13979 e->__anon1.cast.typeName = MkTypeName(specs, decl);
13980 e->__anon1.cast.exp = thisExp;
13981 e->byReference = 0x1;
13985 e->destType = destType;
13986 destType->refCount++;
13991 void ApplyLocation(struct Expression * exp, struct Location * loc)
13997 if(exp->__anon1.op.exp1)
13998 ApplyLocation(exp->__anon1.op.exp1, loc);
13999 if(exp->__anon1.op.exp2)
14000 ApplyLocation(exp->__anon1.op.exp2, loc);
14003 if(exp->__anon1.list)
14005 struct Expression * e;
14007 for(e = (*exp->__anon1.list).first; e; e = e->next)
14008 ApplyLocation(e, loc);
14012 if(exp->__anon1.index.index)
14014 struct Expression * e;
14016 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
14017 ApplyLocation(e, loc);
14019 if(exp->__anon1.index.exp)
14020 ApplyLocation(exp->__anon1.index.exp, loc);
14023 if(exp->__anon1.call.arguments)
14025 struct Expression * arg;
14027 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
14028 ApplyLocation(arg, loc);
14030 if(exp->__anon1.call.exp)
14031 ApplyLocation(exp->__anon1.call.exp, loc);
14035 if(exp->__anon1.member.exp)
14036 ApplyLocation(exp->__anon1.member.exp, loc);
14039 if(exp->__anon1.cast.exp)
14040 ApplyLocation(exp->__anon1.cast.exp, loc);
14043 if(exp->__anon1.cond.exp)
14045 struct Expression * e;
14047 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
14048 ApplyLocation(e, loc);
14050 if(exp->__anon1.cond.cond)
14051 ApplyLocation(exp->__anon1.cond.cond, loc);
14052 if(exp->__anon1.cond.elseExp)
14053 ApplyLocation(exp->__anon1.cond.elseExp, loc);
14056 if(exp->__anon1.vaArg.exp)
14057 ApplyLocation(exp->__anon1.vaArg.exp, loc);
14064 extern char * strstr(const char * , const char * );
14066 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DefinedExpression;
14068 struct __ecereNameSpace__ecere__com__DefinedExpression
14070 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
14071 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
14073 const char * value;
14074 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
14075 } __attribute__ ((gcc_struct));
14077 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14079 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14081 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
14083 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
14085 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
14087 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
14089 static void ProcessStatement(struct Statement * stmt);
14091 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
14093 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
14095 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
14097 extern const char * sourceFile;
14099 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
14101 void ProcessExpressionType(struct Expression * exp)
14103 unsigned int unresolved = 0x0;
14104 struct Location oldyylloc = yylloc;
14105 unsigned int notByReference = 0x0;
14107 if(!exp || exp->expType)
14114 struct Identifier * id = exp->__anon1.__anon1.identifier;
14116 if(!id || !topContext)
14118 if(id->_class && id->_class->__anon1.__anon1.name)
14120 id->classSym = id->_class->__anon1.__anon1.symbol;
14122 if(strstr(id->string, "__ecereClass") == id->string)
14124 exp->expType = ProcessTypeString("ecere::com::Class", 0x1);
14127 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
14129 ReplaceClassMembers(exp, thisClass);
14132 ProcessExpressionType(exp);
14135 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0x0))
14140 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14144 if(exp->destType && CheckExpressionType(exp, exp->destType, 0x0, 0x0))
14150 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
14153 ProcessExpressionType(exp);
14157 else if(currentClass && !id->_class)
14159 if(ResolveIdWithClass(exp, currentClass, 0x1))
14162 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14167 struct Type * type = symbol->type;
14168 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
14170 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
14172 struct Context * context = SetupTemplatesContext(_class);
14174 type = ReplaceThisClassType(_class);
14175 FinishTemplatesContext(context);
14177 type->refCount = 0;
14179 FreeSpecifier(id->_class);
14180 id->_class = (((void *)0));
14181 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14182 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
14183 id->classSym = (((void *)0));
14184 exp->expType = type;
14187 if(type && (type->kind == 15))
14188 exp->isConstant = 0x1;
14189 if(symbol->isParam || !strcmp(id->string, "this"))
14191 if(_class && _class->type == 1 && !type->declaredWithStruct)
14192 exp->byReference = 0x1;
14194 if(symbol->isIterator)
14196 if(symbol->isIterator == 3)
14199 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
14200 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
14201 exp->expType = (((void *)0));
14202 ProcessExpressionType(exp);
14204 else if(symbol->isIterator != 4)
14207 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
14208 exp->__anon1.member.exp->expType = exp->expType;
14209 exp->__anon1.member.member = MkIdentifier("data");
14210 exp->expType = (((void *)0));
14211 ProcessExpressionType(exp);
14218 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
14220 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14224 strcpy(name, thisNameSpace);
14225 strcat(name, "::");
14226 strcat(name, id->string);
14227 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
14230 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
14235 for(c = 0; c < definedExpStackPos; c++)
14236 if(definedExpStack[c] == definedExp)
14238 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
14240 struct Location backupYylloc = yylloc;
14241 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
14243 definedExpStack[definedExpStackPos++] = definedExp;
14244 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
14245 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
14246 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14248 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14249 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
14250 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
14251 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14253 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14254 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
14256 parsedExpression = (((void *)0));
14258 expression_yyparse();
14259 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
14261 fileInput = backInput;
14262 yylloc = backupYylloc;
14263 if(parsedExpression)
14265 FreeIdentifier(id);
14267 exp->__anon1.list = MkListOne(parsedExpression);
14268 ApplyLocation(parsedExpression, &yylloc);
14269 ProcessExpressionType(exp);
14270 definedExpStackPos--;
14273 definedExpStackPos--;
14279 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
14285 struct GlobalData * data = (((void *)0));
14287 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14291 strcpy(name, thisNameSpace);
14292 strcat(name, "::");
14293 strcat(name, id->string);
14294 data = FindGlobalData(name);
14297 data = FindGlobalData(id->string);
14300 DeclareGlobalData(data);
14301 exp->expType = data->dataType;
14303 data->dataType->refCount++;
14304 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14305 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
14306 FreeSpecifier(id->_class);
14307 id->_class = (((void *)0));
14312 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
14314 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14318 strcpy(name, thisNameSpace);
14319 strcat(name, "::");
14320 strcat(name, id->string);
14321 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
14324 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
14329 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14330 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
14332 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
14333 strcpy(name, "__ecereFunction_");
14334 FullClassNameCat(name, id->string, 0x0);
14335 if(DeclareFunction(function, name))
14337 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14338 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
14340 exp->expType = function->dataType;
14341 if(function->dataType)
14342 function->dataType->refCount++;
14343 FreeSpecifier(id->_class);
14344 id->_class = (((void *)0));
14356 struct __ecereNameSpace__ecere__com__Class * _class;
14358 if(!exp->__anon1.instance->_class)
14360 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
14362 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
14365 ProcessInstantiationType(exp->__anon1.instance);
14366 exp->isConstant = exp->__anon1.instance->isConstant;
14367 if(exp->__anon1.instance->_class)
14369 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
14377 char * constant = exp->__anon1.__anon1.constant;
14378 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 0x1, type);
14380 exp->expType = type;
14381 if(constant[0] == '\'')
14383 if((int)((unsigned char *)constant)[1] > 127)
14386 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
14390 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
14391 exp->__anon1.__anon1.constant = PrintUInt(ch);
14393 type->__anon1._class = FindClass("unichar");
14394 type->isSigned = 0x0;
14399 type->isSigned = 0x1;
14404 char * dot = strchr(constant, '.');
14405 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
14410 exponent = strchr(constant, 'p');
14412 exponent = strchr(constant, 'P');
14416 exponent = strchr(constant, 'e');
14418 exponent = strchr(constant, 'E');
14420 if(dot || exponent)
14422 if(strchr(constant, 'f') || strchr(constant, 'F'))
14426 type->isSigned = 0x1;
14430 unsigned int isSigned = constant[0] == '-';
14431 char * endP = (((void *)0));
14432 long long i64 = strtoll(constant, &endP, 0);
14433 uint64 ui64 = strtoull(constant, &endP, 0);
14434 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll"));
14438 if(i64 < (((int)0x80000000)))
14443 if(ui64 > (((int)0x7fffffff)))
14445 if(ui64 > (0xffffffff))
14448 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
14452 else if(constant[0] != '0' || !constant[1])
14455 type->kind = is64Bit ? 4 : 3;
14456 type->isSigned = isSigned;
14459 exp->isConstant = 0x1;
14460 if(exp->destType && exp->destType->kind == 7)
14462 else if(exp->destType && exp->destType->kind == 6)
14464 else if(exp->destType && exp->destType->kind == 4)
14471 exp->isConstant = 0x1;
14472 exp->expType = __extension__ ({
14473 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14475 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
14476 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14478 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 1, __ecereInstance1->constant = 0x1, __ecereInstance1->isSigned = 0x1, __ecereInstance1;
14479 }), __ecereInstance2;
14485 ProcessExpressionType(exp->__anon1._new.size);
14486 exp->expType = __extension__ ({
14487 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14489 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
14491 DeclareType(exp->expType->__anon1.type, 0x0, 0x0);
14495 ProcessExpressionType(exp->__anon1._renew.size);
14496 ProcessExpressionType(exp->__anon1._renew.exp);
14497 exp->expType = __extension__ ({
14498 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14500 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
14502 DeclareType(exp->expType->__anon1.type, 0x0, 0x0);
14506 unsigned int assign = 0x0, boolResult = 0x0, boolOps = 0x0;
14507 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
14508 unsigned int useDestType = 0x0, useSideType = 0x0;
14509 struct Location oldyylloc = yylloc;
14510 unsigned int useSideUnit = 0x0;
14511 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
14512 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
14514 switch(exp->__anon1.op.op)
14568 if(exp->__anon1.op.exp1)
14575 if(exp->__anon1.op.op == '&')
14577 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
14579 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
14580 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14582 if(symbol && symbol->isIterator == 2)
14585 exp->__anon1.member.exp = exp->__anon1.op.exp2;
14586 exp->__anon1.member.member = MkIdentifier("key");
14587 exp->expType = (((void *)0));
14588 exp->__anon1.op.exp2->expType = symbol->type;
14589 symbol->type->refCount++;
14590 ProcessExpressionType(exp);
14596 if(exp->__anon1.op.exp1)
14598 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
14600 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
14602 if(exp->__anon1.op.exp1->destType)
14603 FreeType(exp->__anon1.op.exp1->destType);
14604 exp->__anon1.op.exp1->destType = exp->destType;
14605 exp->__anon1.op.exp1->opDestType = 0x1;
14607 exp->destType->refCount++;
14611 if(exp->__anon1.op.exp1->destType)
14612 FreeType(exp->__anon1.op.exp1->destType);
14613 exp->__anon1.op.exp1->destType = dummy;
14616 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14617 exp->__anon1.op.exp1->destType->count++;
14618 ProcessExpressionType(exp->__anon1.op.exp1);
14619 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14620 exp->__anon1.op.exp1->destType->count--;
14621 exp->__anon1.op.exp1->opDestType = 0x0;
14622 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)
14624 exp->__anon1.op.exp2 = MkExpConstant("1");
14625 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
14628 if(exp->__anon1.op.exp1->destType == dummy)
14631 exp->__anon1.op.exp1->destType = (((void *)0));
14633 type1 = exp->__anon1.op.exp1->expType;
14635 if(exp->__anon1.op.exp2)
14637 char expString[10240];
14639 expString[0] = '\0';
14640 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
14642 if(exp->__anon1.op.exp1)
14644 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
14645 if(exp->__anon1.op.exp1->expType)
14646 exp->__anon1.op.exp1->expType->refCount++;
14650 exp->__anon1.op.exp2->destType = exp->destType;
14651 if(!exp->__anon1.op.exp1 || exp->__anon1.op.op != '&')
14652 exp->__anon1.op.exp2->opDestType = 0x1;
14654 exp->destType->refCount++;
14658 exp->expType = type1;
14663 PrintExpression(exp->__anon1.op.exp2, expString);
14664 if(type1 && type1->kind == 13)
14666 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)
14667 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
14668 else if(exp->__anon1.op.op == '=')
14670 if(exp->__anon1.op.exp2->destType)
14671 FreeType(exp->__anon1.op.exp2->destType);
14672 exp->__anon1.op.exp2->destType = type1;
14679 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)
14683 if(exp->__anon1.op.exp2->destType)
14684 FreeType(exp->__anon1.op.exp2->destType);
14685 exp->__anon1.op.exp2->destType = type1;
14692 exp->expType = type1;
14694 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
14696 if(exp->__anon1.op.exp2->destType)
14697 FreeType(exp->__anon1.op.exp2->destType);
14698 exp->__anon1.op.exp2->destType = exp->destType;
14699 if(exp->__anon1.op.op != '&')
14700 exp->__anon1.op.exp2->opDestType = 0x1;
14702 exp->destType->refCount++;
14706 if(exp->__anon1.op.exp2->destType)
14707 FreeType(exp->__anon1.op.exp2->destType);
14708 exp->__anon1.op.exp2->destType = dummy;
14711 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))
14713 FreeType(exp->__anon1.op.exp2->destType);
14714 exp->__anon1.op.exp2->destType = type1;
14717 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14718 exp->__anon1.op.exp2->destType->count++;
14719 if(exp->__anon1.op.op == SIZEOF)
14721 struct Expression * e = exp->__anon1.op.exp2;
14723 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
14725 if(e->type == 5 || e->type == 32 || e->type == 23)
14728 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
14730 e = (*e->__anon1.list).last;
14733 if(e->type == 11 && e->__anon1.cast.exp)
14734 e->__anon1.cast.exp->needCast = 0x1;
14736 ProcessExpressionType(exp->__anon1.op.exp2);
14737 exp->__anon1.op.exp2->opDestType = 0x0;
14738 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14739 exp->__anon1.op.exp2->destType->count--;
14740 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
14742 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)
14744 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
14745 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14747 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)))
14749 if(exp->__anon1.op.op == ADD_ASSIGN)
14750 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14752 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))
14754 if(exp->__anon1.op.op == ADD_ASSIGN)
14755 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14757 else if(inCompiler)
14759 char type1String[1024];
14760 char type2String[1024];
14762 type1String[0] = '\0';
14763 type2String[0] = '\0';
14764 PrintType(exp->__anon1.op.exp2->expType, type1String, 0x0, 0x1);
14765 PrintType(type1, type2String, 0x0, 0x1);
14766 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
14767 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
14770 if(exp->__anon1.op.exp2->destType == dummy)
14773 exp->__anon1.op.exp2->destType = (((void *)0));
14775 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
14777 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14778 type2->refCount = 1;
14779 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
14780 type2->isSigned = 0x1;
14782 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))
14784 type2 = __extension__ ({
14785 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14787 __ecereInstance1->kind = 3, __ecereInstance1;
14789 type2->refCount = 1;
14790 type2->isSigned = 0x1;
14794 type2 = exp->__anon1.op.exp2->expType;
14800 if(exp->__anon1.op.op == SIZEOF)
14802 exp->expType = __extension__ ({
14803 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14805 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
14807 exp->isConstant = 0x1;
14809 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
14811 exp->expType = Dereference(type2);
14812 if(type2 && type2->kind == 8)
14813 notByReference = 0x1;
14815 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
14816 exp->expType = Reference(type2);
14821 if(exp->__anon1.op.exp1)
14823 if(exp->__anon1.op.exp1->destType)
14824 FreeType(exp->__anon1.op.exp1->destType);
14825 exp->__anon1.op.exp1->destType = MkClassType("bool");
14826 exp->__anon1.op.exp1->destType->truth = 0x1;
14827 if(!exp->__anon1.op.exp1->expType)
14828 ProcessExpressionType(exp->__anon1.op.exp1);
14830 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
14831 FreeType(exp->__anon1.op.exp1->expType);
14832 exp->__anon1.op.exp1->expType = MkClassType("bool");
14833 exp->__anon1.op.exp1->expType->truth = 0x1;
14835 if(exp->__anon1.op.exp2)
14837 if(exp->__anon1.op.exp2->destType)
14838 FreeType(exp->__anon1.op.exp2->destType);
14839 exp->__anon1.op.exp2->destType = MkClassType("bool");
14840 exp->__anon1.op.exp2->destType->truth = 0x1;
14841 if(!exp->__anon1.op.exp2->expType)
14842 ProcessExpressionType(exp->__anon1.op.exp2);
14844 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
14845 FreeType(exp->__anon1.op.exp2->expType);
14846 exp->__anon1.op.exp2->expType = MkClassType("bool");
14847 exp->__anon1.op.exp2->expType->truth = 0x1;
14850 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")))))
14852 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"))))
14854 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)))
14856 struct Type * intType;
14858 if(!type1->__anon1._class->__anon1.registered->dataType)
14859 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0x0);
14860 if(!type2->__anon1._class->__anon1.registered->dataType)
14861 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0x0);
14862 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0x0);
14863 if(exp->__anon1.op.exp1->destType)
14864 FreeType(exp->__anon1.op.exp1->destType);
14865 if(exp->__anon1.op.exp2->destType)
14866 FreeType(exp->__anon1.op.exp2->destType);
14867 exp->__anon1.op.exp1->destType = intType;
14868 exp->__anon1.op.exp2->destType = intType;
14869 intType->refCount++;
14873 if(exp->__anon1.op.exp2->destType)
14874 FreeType(exp->__anon1.op.exp2->destType);
14875 exp->__anon1.op.exp2->destType = type1;
14877 if(exp->__anon1.op.exp1->destType)
14878 FreeType(exp->__anon1.op.exp1->destType);
14879 exp->__anon1.op.exp1->destType = type2;
14882 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)
14883 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);
14884 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
14886 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 0x1);
14890 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14892 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
14893 ProcessExpressionType(exp->__anon1.op.exp1);
14894 if(type2->kind != 13)
14896 ProcessExpressionType(classExp);
14897 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
14898 if(!exp->__anon1.op.exp2->expType)
14902 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0x0);
14905 ProcessExpressionType(exp->__anon1.op.exp2);
14909 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)))
14911 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
14912 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14913 exp->expType = type1;
14917 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)))
14919 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
14920 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14921 exp->expType = type2;
14925 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))
14927 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
14931 unsigned int success = 0x0;
14933 if(type1->kind == 13 && type2->kind == 13)
14935 if(exp->__anon1.op.op == '+')
14936 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14937 else if(exp->__anon1.op.op == '-')
14939 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0, 0x0))
14941 exp->expType = __extension__ ({
14942 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14944 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
14947 if(type1->__anon1.type->kind == 20)
14949 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 0x1);
14953 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14955 ProcessExpressionType(classExp);
14957 exp->__anon1.list = MkListOne(MkExpOp(MkExpBrackets(MkListOne(MkExpOp(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(exp->__anon1.op.exp1))), exp->__anon1.op.op, MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(exp->__anon1.op.exp2)))))), '/', MkExpMember(classExp, MkIdentifier("typeSize"))));
14958 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
14966 if(!success && exp->__anon1.op.exp1->type == 2)
14968 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
14971 FreeType(exp->expType);
14972 exp->expType = exp->__anon1.op.exp1->destType;
14973 if(exp->__anon1.op.exp1->destType)
14974 exp->__anon1.op.exp1->destType->refCount++;
14977 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
14980 FreeType(exp->expType);
14981 exp->expType = exp->__anon1.op.exp2->destType;
14982 if(exp->__anon1.op.exp2->destType)
14983 exp->__anon1.op.exp2->destType->refCount++;
14989 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
14992 FreeType(exp->expType);
14993 exp->expType = exp->__anon1.op.exp2->destType;
14994 if(exp->__anon1.op.exp2->destType)
14995 exp->__anon1.op.exp2->destType->refCount++;
14998 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15001 FreeType(exp->expType);
15002 exp->expType = exp->__anon1.op.exp1->destType;
15003 if(exp->__anon1.op.exp1->destType)
15004 exp->__anon1.op.exp1->destType->refCount++;
15010 char expString1[10240];
15011 char expString2[10240];
15015 expString1[0] = '\0';
15016 expString2[0] = '\0';
15021 PrintExpression(exp->__anon1.op.exp1, expString1);
15022 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15023 PrintExpression(exp->__anon1.op.exp2, expString2);
15024 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15025 PrintType(exp->__anon1.op.exp1->expType, type1, 0x0, 0x1);
15026 PrintType(exp->__anon1.op.exp2->expType, type2, 0x0, 0x1);
15028 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
15032 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)
15034 if(exp->__anon1.op.exp1->destType)
15035 FreeType(exp->__anon1.op.exp1->destType);
15036 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15037 if(type2->__anon1._class->__anon1.registered->dataType)
15038 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15039 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15040 exp->expType = type2;
15044 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)
15046 if(exp->__anon1.op.exp2->destType)
15047 FreeType(exp->__anon1.op.exp2->destType);
15048 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15049 if(type1->__anon1._class->__anon1.registered->dataType)
15050 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15051 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15052 exp->expType = type1;
15058 unsigned int valid = 0x0;
15060 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
15062 if(exp->__anon1.op.exp2->destType)
15063 FreeType(exp->__anon1.op.exp2->destType);
15064 if(!type1->__anon1._class->__anon1.registered->dataType)
15065 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0x0);
15066 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15067 exp->__anon1.op.exp2->destType->refCount++;
15068 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15071 type2 = exp->__anon1.op.exp2->destType;
15074 exp->expType = type2;
15077 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
15079 if(exp->__anon1.op.exp1->destType)
15080 FreeType(exp->__anon1.op.exp1->destType);
15081 if(!type2->__anon1._class->__anon1.registered->dataType)
15082 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0x0);
15083 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15084 exp->__anon1.op.exp1->destType->refCount++;
15085 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15086 type1 = exp->__anon1.op.exp1->destType;
15087 exp->expType = type1;
15090 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
15092 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
15093 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
15095 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
15097 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15099 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0x0, 0x0))
15102 FreeType(exp->expType);
15103 exp->expType = exp->__anon1.op.exp2->expType;
15104 if(exp->__anon1.op.exp2->expType)
15105 exp->__anon1.op.exp2->expType->refCount++;
15109 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15111 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0x0, 0x0))
15114 FreeType(exp->expType);
15115 exp->expType = exp->__anon1.op.exp1->expType;
15116 if(exp->__anon1.op.exp1->expType)
15117 exp->__anon1.op.exp1->expType->refCount++;
15124 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15126 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0x0, 0x0))
15129 FreeType(exp->expType);
15130 exp->expType = exp->__anon1.op.exp1->expType;
15131 if(exp->__anon1.op.exp1->expType)
15132 exp->__anon1.op.exp1->expType->refCount++;
15136 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15138 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0x0, 0x0))
15141 FreeType(exp->expType);
15142 exp->expType = exp->__anon1.op.exp2->expType;
15143 if(exp->__anon1.op.exp2->expType)
15144 exp->__anon1.op.exp2->expType->refCount++;
15152 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))
15154 if(exp->__anon1.op.exp1->destType)
15155 FreeType(exp->__anon1.op.exp1->destType);
15156 exp->__anon1.op.exp1->destType = type2;
15158 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15161 FreeType(exp->expType);
15162 exp->expType = exp->__anon1.op.exp1->destType;
15163 if(exp->__anon1.op.exp1->destType)
15164 exp->__anon1.op.exp1->destType->refCount++;
15169 if(exp->__anon1.op.exp2->destType)
15170 FreeType(exp->__anon1.op.exp2->destType);
15171 exp->__anon1.op.exp2->destType = type1;
15173 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
15176 FreeType(exp->expType);
15177 exp->expType = exp->__anon1.op.exp2->destType;
15178 if(exp->__anon1.op.exp2->destType)
15179 exp->__anon1.op.exp2->destType->refCount++;
15181 else if(type1 && type2)
15183 char expString1[10240];
15184 char expString2[10240];
15185 char type1String[1024];
15186 char type2String[1024];
15188 expString1[0] = '\0';
15189 expString2[0] = '\0';
15190 type1String[0] = '\0';
15191 type2String[0] = '\0';
15194 PrintExpression(exp->__anon1.op.exp1, expString1);
15195 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15196 PrintExpression(exp->__anon1.op.exp2, expString2);
15197 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15198 PrintType(exp->__anon1.op.exp1->expType, type1String, 0x0, 0x1);
15199 PrintType(exp->__anon1.op.exp2->expType, type2String, 0x0, 0x1);
15201 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
15202 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
15204 exp->expType = exp->__anon1.op.exp1->expType;
15205 if(exp->__anon1.op.exp1->expType)
15206 exp->__anon1.op.exp1->expType->refCount++;
15208 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15210 exp->expType = exp->__anon1.op.exp2->expType;
15211 if(exp->__anon1.op.exp2->expType)
15212 exp->__anon1.op.exp2->expType->refCount++;
15220 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15222 struct Type * oldType = exp->__anon1.op.exp1->expType;
15224 exp->__anon1.op.exp1->expType = (((void *)0));
15225 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15228 exp->__anon1.op.exp1->expType = oldType;
15230 if(exp->__anon1.op.exp1->destType)
15231 FreeType(exp->__anon1.op.exp1->destType);
15232 exp->__anon1.op.exp1->destType = type2;
15234 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15237 FreeType(exp->expType);
15238 exp->expType = exp->__anon1.op.exp1->destType;
15239 if(exp->__anon1.op.exp1->destType)
15240 exp->__anon1.op.exp1->destType->refCount++;
15244 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
15246 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
15248 if(exp->__anon1.op.exp1->destType)
15249 FreeType(exp->__anon1.op.exp1->destType);
15250 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15251 if(type2->__anon1._class->__anon1.registered->dataType)
15252 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15253 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15255 if(exp->__anon1.op.op == '!')
15257 exp->expType = MkClassType("bool");
15258 exp->expType->truth = 0x1;
15262 exp->expType = type2;
15267 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
15269 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
15271 if(exp->__anon1.op.exp2->destType)
15272 FreeType(exp->__anon1.op.exp2->destType);
15273 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15274 if(type1->__anon1._class->__anon1.registered->dataType)
15275 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15276 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15278 exp->expType = type1;
15284 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
15286 char expString[10000];
15288 expString[0] = '\0';
15291 PrintExpression(exp->__anon1.op.exp1, expString);
15292 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15295 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15297 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
15299 char expString[10240];
15301 expString[0] = '\0';
15304 PrintExpression(exp->__anon1.op.exp2, expString);
15305 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15308 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15312 FreeType(exp->expType);
15313 exp->expType = MkClassType("bool");
15314 exp->expType->truth = 0x1;
15316 if(exp->__anon1.op.op != SIZEOF)
15317 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
15318 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
15320 DeclareType(exp->__anon1.op.exp2->expType, 0x0, 0x0);
15322 yylloc = oldyylloc;
15331 struct Expression * e;
15333 exp->isConstant = 0x1;
15334 for(e = (*exp->__anon1.list).first; e; e = e->next)
15336 unsigned int inced = 0x0;
15340 FreeType(e->destType);
15341 e->opDestType = exp->opDestType;
15342 e->destType = exp->destType;
15345 exp->destType->refCount++;
15346 e->destType->count++;
15350 ProcessExpressionType(e);
15352 exp->destType->count--;
15353 if(!exp->expType && !e->next)
15355 exp->expType = e->expType;
15357 e->expType->refCount++;
15360 exp->isConstant = 0x0;
15362 e = (*exp->__anon1.list).first;
15363 if(!e->next && e->type == 8)
15365 struct Expression * next = exp->next, * prev = exp->prev;
15367 FreeType(exp->expType);
15368 FreeType(exp->destType);
15369 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
15373 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
15374 ProcessExpressionType(exp);
15380 struct Expression * e;
15382 exp->isConstant = 0x1;
15383 ProcessExpressionType(exp->__anon1.index.exp);
15384 if(!exp->__anon1.index.exp->isConstant)
15385 exp->isConstant = 0x0;
15386 if(exp->__anon1.index.exp->expType)
15388 struct Type * source = exp->__anon1.index.exp->expType;
15390 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
15392 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
15393 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
15395 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
15397 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0x0);
15398 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
15400 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0x0);
15402 if(type->kind == 8)
15403 type->constant = 0x1;
15404 else if(type->kind == 13)
15406 struct Type * t = type;
15408 while(t->kind == 13)
15409 t = t->__anon1.type;
15412 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
15417 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
15419 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
15422 FreeType(e->destType);
15423 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
15425 ProcessExpressionType(e);
15430 exp->isConstant = 0x0;
15433 exp->expType = Dereference(exp->__anon1.index.exp->expType);
15435 DeclareType(exp->expType, 0x0, 0x0);
15440 struct Expression * e;
15441 struct Type * functionType;
15442 struct Type * methodType = (((void *)0));
15448 PrintExpression(exp->__anon1.call.exp, name);
15449 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
15451 PrintExpression(exp->__anon1.call.exp, name);
15454 if(exp->__anon1.call.exp->type == 0)
15456 struct Expression * idExp = exp->__anon1.call.exp;
15457 struct Identifier * id = idExp->__anon1.__anon1.identifier;
15459 if(!strcmp(id->string, "__builtin_frame_address"))
15461 exp->expType = ProcessTypeString("void *", 0x1);
15462 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15463 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15466 else if(!strcmp(id->string, "__ENDIAN_PAD"))
15468 exp->expType = ProcessTypeString("int", 0x1);
15469 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15470 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15473 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
15475 struct Expression * a = (((void *)0));
15476 struct Expression * b = (((void *)0));
15477 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
15479 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
15481 a = (*exp->__anon1.call.arguments).first;
15482 b = (*exp->__anon1.call.arguments).last;
15486 else if((*exp->__anon1.call.arguments).count == 1)
15488 a = (*exp->__anon1.call.arguments).first;
15493 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
15494 idExp->__anon1.__anon1.identifier = (((void *)0));
15495 FreeExpContents(exp);
15496 ProcessExpressionType(a);
15498 ProcessExpressionType(b);
15500 exp->__anon1.list = MkList();
15501 if(a->expType && (!b || b->expType))
15503 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
15507 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15508 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
15509 struct Declaration * decl;
15510 char temp1[1024], temp2[1024];
15512 GetTypeSpecs(a->expType, specs);
15513 if(a && !a->isConstant && a->type != 0)
15515 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
15516 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
15517 tempExp1 = QMkExpId(temp1);
15518 tempExp1->expType = a->expType;
15520 a->expType->refCount++;
15521 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
15523 if(b && !b->isConstant && b->type != 0)
15525 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
15526 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
15527 tempExp2 = QMkExpId(temp2);
15528 tempExp2->expType = b->expType;
15530 b->expType->refCount++;
15531 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
15533 decl = MkDeclaration(specs, decls);
15534 if(!curCompound->__anon1.compound.declarations)
15535 curCompound->__anon1.compound.declarations = MkList();
15536 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
15540 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
15542 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
15544 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
15545 exp->expType = a->expType;
15547 a->expType->refCount++;
15549 else if(!strcmp(id->string, "Abs"))
15551 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
15552 exp->expType = a->expType;
15554 a->expType->refCount++;
15556 else if(!strcmp(id->string, "Sgn"))
15558 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"))))));
15559 exp->expType = ProcessTypeString("int", 0x0);
15561 FreeExpression(tempExp1);
15563 FreeExpression(tempExp2);
15564 FreeIdentifier(id);
15570 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
15572 if(!exp->__anon1.call.exp->destType)
15574 exp->__anon1.call.exp->destType = dummy;
15577 ProcessExpressionType(exp->__anon1.call.exp);
15578 if(exp->__anon1.call.exp->destType == dummy)
15581 exp->__anon1.call.exp->destType = (((void *)0));
15585 functionType = exp->__anon1.call.exp->expType;
15586 if(functionType && functionType->kind == 16)
15588 methodType = functionType;
15589 functionType = methodType->__anon1.__anon3.method->dataType;
15590 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
15592 char typeString[1024];
15594 typeString[0] = '\0';
15596 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
15598 functionType->__anon1.__anon2.thisClass = (((void *)0));
15599 PrintType(functionType, typeString, 0x1, 0x1);
15600 functionType->__anon1.__anon2.thisClass = back;
15602 if(strstr(typeString, "thisclass"))
15604 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15605 struct Declarator * decl;
15608 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15610 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
15611 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))
15612 thisClassParams = 0x0;
15613 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15615 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
15617 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
15618 ProcessDeclarator(decl);
15619 thisClass = backupThisClass;
15621 thisClassParams = 0x1;
15622 functionType = ProcessType(specs, decl);
15623 functionType->refCount = 0;
15624 FinishTemplatesContext(context);
15626 FreeList(specs, FreeSpecifier);
15627 FreeDeclarator(decl);
15631 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
15633 struct Type * type = functionType->__anon1.type;
15635 if(!functionType->refCount)
15637 functionType->__anon1.type = (((void *)0));
15638 FreeType(functionType);
15640 functionType = type;
15642 if(functionType && functionType->kind != 11)
15644 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
15646 else if(functionType)
15648 unsigned int emptyParams = 0x0, noParams = 0x0;
15649 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
15650 struct Type * type = functionType->__anon1.__anon2.params.first;
15651 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
15653 struct Location oldyylloc = yylloc;
15657 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
15659 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
15662 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
15664 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)
15666 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
15669 e->destType = type;
15671 type = functionType->__anon1.__anon2.params.first;
15674 type->refCount = 0;
15676 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
15678 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
15679 type->byReference = functionType->byReference;
15680 type->typedByReference = functionType->typedByReference;
15683 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
15685 e->destType = type;
15687 type = functionType->__anon1.__anon2.params.first;
15690 type->refCount = 0;
15693 if(type && type->kind == 0)
15696 if(!type->refCount)
15698 type = (((void *)0));
15700 for(; e; e = e->next)
15702 if(!type && !emptyParams)
15705 if(methodType && methodType->__anon1.__anon3.methodClass)
15706 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);
15708 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);
15711 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
15713 struct Type * templatedType = (((void *)0));
15714 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
15715 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
15718 if(_class && _class->templateArgs)
15720 struct __ecereNameSpace__ecere__com__Class * sClass;
15722 for(sClass = _class; sClass; sClass = sClass->base)
15724 if(sClass->templateClass)
15725 sClass = sClass->templateClass;
15727 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
15729 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
15731 struct __ecereNameSpace__ecere__com__Class * nextClass;
15733 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
15735 if(nextClass->templateClass)
15736 nextClass = nextClass->templateClass;
15737 id += nextClass->templateParams.count;
15747 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
15749 unsigned int constant = type->constant;
15750 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
15753 struct Context * context = SetupTemplatesContext(_class);
15755 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
15756 FinishTemplatesContext(context);
15758 if(templatedType->kind == 8 && constant)
15759 templatedType->constant = 0x1;
15760 else if(templatedType->kind == 13)
15762 struct Type * t = templatedType->__anon1.type;
15764 while(t->kind == 13)
15765 t = t->__anon1.type;
15767 t->constant = constant;
15769 e->destType = templatedType;
15772 templatedType->passAsTemplate = 0x1;
15777 e->destType = type;
15784 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
15786 e->destType = type->prev;
15787 e->destType->refCount++;
15791 e->destType = type;
15796 if(type && type->kind != 14)
15798 struct Type * next = type->next;
15800 if(!type->refCount)
15805 if(type && type->kind != 14)
15807 if(methodType && methodType->__anon1.__anon3.methodClass)
15808 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);
15810 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);
15812 yylloc = oldyylloc;
15813 if(type && !type->refCount)
15818 functionType = __extension__ ({
15819 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15821 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
15823 if(exp->__anon1.call.exp->type == 0)
15825 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
15829 struct Symbol * symbol;
15830 struct Location oldyylloc = yylloc;
15832 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
15833 if(strstr(string, "__builtin_") == string)
15837 functionType->__anon1.__anon2.returnType = exp->destType;
15838 exp->destType->refCount++;
15842 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
15843 symbol = __extension__ ({
15844 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
15846 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 0x1), __ecereInstance1;
15848 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
15849 if(strstr(symbol->string, "::"))
15850 globalContext->hasNameSpace = 0x1;
15851 yylloc = oldyylloc;
15854 else if(exp->__anon1.call.exp->type == 8)
15858 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
15859 if(!functionType->__anon1.__anon2.returnType)
15861 functionType->__anon1.__anon2.returnType = __extension__ ({
15862 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15864 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
15868 if(functionType && functionType->kind == 11)
15870 exp->expType = functionType->__anon1.__anon2.returnType;
15871 if(functionType->__anon1.__anon2.returnType)
15872 functionType->__anon1.__anon2.returnType->refCount++;
15873 if(!functionType->refCount)
15874 FreeType(functionType);
15876 if(exp->__anon1.call.arguments)
15878 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
15880 struct Type * destType = e->destType;
15882 ProcessExpressionType(e);
15889 struct Type * type;
15890 struct Location oldyylloc = yylloc;
15891 unsigned int thisPtr;
15892 struct Expression * checkExp = exp->__anon1.member.exp;
15896 if(checkExp->type == 11)
15897 checkExp = checkExp->__anon1.cast.exp;
15898 else if(checkExp->type == 5)
15899 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
15903 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
15904 exp->thisPtr = thisPtr;
15905 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
15907 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
15909 ProcessExpressionType(exp->__anon1.member.exp);
15910 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)
15912 exp->isConstant = 0x0;
15915 exp->isConstant = exp->__anon1.member.exp->isConstant;
15916 type = exp->__anon1.member.exp->expType;
15918 if(type && (type->kind == 20))
15920 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
15921 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
15925 for(param = _class->templateParams.first; param; param = param->next)
15927 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
15931 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
15933 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
15937 struct Expression * expMember = exp->__anon1.member.exp;
15938 struct Declarator * decl;
15939 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15940 char thisClassTypeString[1024];
15942 FreeIdentifier(exp->__anon1.member.member);
15943 ProcessExpressionType(argExp);
15945 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
15949 char className[1024];
15950 struct __ecereNameSpace__ecere__com__Class * sClass;
15952 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
15953 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
15956 strcpy(thisClassTypeString, _class->fullName);
15958 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
15959 exp->expType = ProcessType(specs, decl);
15960 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
15962 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
15963 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
15965 int paramCount = 0;
15966 int lastParam = -1;
15967 char templateString[1024];
15968 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
15970 sprintf(templateString, "%s<", expClass->templateClass->fullName);
15971 for(cClass = expClass; cClass; cClass = cClass->base)
15975 for(param = cClass->templateParams.first; param; param = param->next)
15978 struct __ecereNameSpace__ecere__com__Class * sClass;
15979 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
15981 for(sClass = cClass->base; sClass; sClass = sClass->base)
15982 id += sClass->templateParams.count;
15983 arg = expClass->templateArgs[id];
15984 for(sClass = _class; sClass; sClass = sClass->base)
15986 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
15988 struct __ecereNameSpace__ecere__com__Class * nextClass;
15990 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
15991 p += nextClass->templateParams.count;
15992 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
15994 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
15996 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
15998 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
15999 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
16006 char argument[256];
16008 argument[0] = '\0';
16009 switch(param->type)
16013 char expString[1024];
16014 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16015 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16016 struct Expression * exp;
16017 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16019 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16020 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16021 ProcessExpressionType(exp);
16022 ComputeExpression(exp);
16023 expString[0] = '\0';
16024 PrintExpression(exp, expString);
16025 strcat(argument, expString);
16026 FreeExpression(exp);
16031 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16036 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16038 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
16039 strcat(argument, thisClassTypeString);
16041 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16049 strcat(templateString, ", ");
16050 if(lastParam != p - 1)
16052 strcat(templateString, param->name);
16053 strcat(templateString, " = ");
16055 strcat(templateString, argument);
16064 int len = strlen(templateString);
16066 if(templateString[len - 1] == '>')
16067 templateString[len++] = ' ';
16068 templateString[len++] = '>';
16069 templateString[len++] = '\0';
16072 struct Context * context = SetupTemplatesContext(_class);
16074 FreeType(exp->expType);
16075 exp->expType = ProcessTypeString(templateString, 0x0);
16076 FinishTemplatesContext(context);
16080 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")))))))));
16083 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
16085 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
16088 if(type && (type->kind == 20))
16090 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)))
16092 struct Identifier * id = exp->__anon1.member.member;
16093 int typeKind = type->kind;
16094 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));
16096 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
16098 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
16103 if(typeKind == 3 || typeKind == 15)
16104 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
16107 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
16109 _class = type->__anon1._class->__anon1.registered;
16111 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
16113 _class = FindClass("char *")->__anon1.registered;
16115 else if(type->kind == 13)
16117 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
16118 FreeType(exp->expType);
16119 exp->expType = ProcessTypeString("uintptr", 0x0);
16120 exp->byReference = 0x1;
16124 char string[1024] = "";
16125 struct Symbol * classSym;
16127 PrintTypeNoConst(type, string, 0x0, 0x1);
16128 classSym = FindClass(string);
16130 _class = classSym->__anon1.registered;
16136 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
16137 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
16138 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
16139 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
16140 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
16142 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
16143 exp->__anon1.member.memberType = 1;
16144 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
16145 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
16148 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
16150 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16151 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
16153 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16155 member = (((void *)0));
16157 if(!member && !prop)
16158 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16159 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
16160 exp->__anon1.member.thisPtr = 0x1;
16164 unsigned int useMemberForNonConst = 0x0;
16168 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
16169 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);
16170 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16171 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
16173 if((!prop || useMemberForNonConst) && !member)
16175 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
16178 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16179 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);
16180 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16181 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16186 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
16187 prop = (((void *)0));
16189 member = (((void *)0));
16193 if(!prop && !member && !method)
16194 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
16195 if(!prop && !member && !method)
16199 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
16202 exp->__anon1.member.memberType = 5;
16203 exp->expType = ProcessTypeString(classProp->dataTypeString, 0x0);
16207 char structName[1024];
16208 struct Identifier * id = exp->__anon1.member.member;
16209 struct Expression * classExp = exp->__anon1.member.exp;
16212 FreeType(classExp->expType);
16213 classExp->expType = ProcessTypeString("ecere::com::Class", 0x0);
16214 strcpy(structName, "__ecereClassData_");
16215 FullClassNameCat(structName, type->__anon1._class->string, 0x0);
16217 exp->__anon1.member.member = id;
16218 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"))))))));
16220 ProcessExpressionType(exp);
16226 struct Symbol * classSym = FindClass(id->string);
16230 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
16233 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
16239 exp->__anon1.member.memberType = 1;
16240 if(!prop->dataType)
16241 ProcessPropertyType(prop);
16242 exp->expType = prop->dataType;
16243 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
16245 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16247 CopyTypeInto(type, exp->expType);
16248 type->refCount = 1;
16249 type->constant = 0x1;
16250 exp->expType = type;
16252 else if(prop->dataType)
16253 prop->dataType->refCount++;
16257 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16259 FreeExpContents(exp);
16261 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16262 ProcessExpressionType(exp);
16265 exp->__anon1.member.memberType = 3;
16266 DeclareStruct(_class->fullName, 0x0);
16267 if(!member->dataType)
16269 struct Context * context = SetupTemplatesContext(_class);
16271 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
16272 FinishTemplatesContext(context);
16274 exp->expType = member->dataType;
16275 if(member->dataType)
16276 member->dataType->refCount++;
16278 else if(revConvert)
16280 exp->__anon1.member.memberType = 4;
16281 exp->expType = MkClassType(revConvert->_class->fullName);
16286 exp->__anon1.member.memberType = 2;
16288 if(!method->dataType)
16289 ProcessMethodType(method);
16290 exp->expType = __extension__ ({
16291 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16293 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
16295 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
16296 exp->expType->__anon1.__anon3.usedClass = _class;
16298 else if(!classProp)
16300 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16302 FreeExpContents(exp);
16304 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16305 FreeType(exp->expType);
16306 exp->expType = MkClassType("ecere::com::Class");
16309 yylloc = exp->__anon1.member.member->loc;
16310 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
16312 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
16314 if(_class && exp->expType)
16316 struct __ecereNameSpace__ecere__com__Class * tClass;
16319 while(tClass && !tClass->templateClass)
16320 tClass = tClass->base;
16321 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
16324 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16325 struct __ecereNameSpace__ecere__com__Class * sClass;
16327 for(sClass = tClass; sClass; sClass = sClass->base)
16330 if(sClass->templateClass)
16331 sClass = sClass->templateClass;
16332 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16334 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
16336 for(sClass = sClass->base; sClass; sClass = sClass->base)
16337 id += sClass->templateParams.count;
16345 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
16347 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16348 struct Context * context = SetupTemplatesContext(tClass);
16349 unsigned int constant = exp->expType->constant;
16351 FreeType(exp->expType);
16352 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16353 if(exp->expType->kind == 8 && constant)
16354 exp->expType->constant = 0x1;
16355 else if(exp->expType->kind == 13)
16357 struct Type * t = exp->expType->__anon1.type;
16359 while(t->kind == 13)
16360 t = t->__anon1.type;
16362 t->constant = constant;
16366 if(exp->expType->kind == 21)
16368 FreeType(exp->expType);
16369 exp->expType = ReplaceThisClassType(_class);
16371 if(tClass->templateClass)
16372 exp->expType->passAsTemplate = 0x1;
16375 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16376 if(exp->destType->kind == 8 && constant)
16377 exp->destType->constant = 0x1;
16378 else if(exp->destType->kind == 13)
16380 struct Type * t = exp->destType->__anon1.type;
16382 while(t->kind == 13)
16383 t = t->__anon1.type;
16385 t->constant = constant;
16387 if(exp->destType->kind == 21)
16389 FreeType(exp->destType);
16390 exp->destType = ReplaceThisClassType(_class);
16394 FinishTemplatesContext(context);
16397 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)
16400 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16401 struct __ecereNameSpace__ecere__com__Class * sClass;
16403 for(sClass = tClass; sClass; sClass = sClass->base)
16406 if(sClass->templateClass)
16407 sClass = sClass->templateClass;
16408 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16410 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
16412 for(sClass = sClass->base; sClass; sClass = sClass->base)
16413 id += sClass->templateParams.count;
16423 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16424 struct Context * context = SetupTemplatesContext(tClass);
16425 struct Type * basicType;
16427 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16430 if(basicType->kind == 21)
16432 FreeType(basicType);
16433 basicType = ReplaceThisClassType(_class);
16435 FreeType(exp->expType);
16436 exp->expType = __extension__ ({
16437 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16439 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
16443 exp->destType = exp->expType;
16444 exp->destType->refCount++;
16447 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16448 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16449 struct Declarator * decl;
16451 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
16454 exp->destType->refCount++;
16456 exp->expType->refCount++;
16458 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
16459 exp->__anon1.cast.exp = newExp;
16462 FinishTemplatesContext(context);
16465 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
16467 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
16471 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
16474 int paramCount = 0;
16475 int lastParam = -1;
16476 char templateString[1024];
16477 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
16479 sprintf(templateString, "%s<", expClass->templateClass->fullName);
16480 while(cClass != expClass)
16482 struct __ecereNameSpace__ecere__com__Class * sClass;
16484 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
16487 for(param = cClass->templateParams.first; param; param = param->next)
16489 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
16492 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
16493 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
16495 while(cClassCur != tClass && !paramCur)
16497 struct __ecereNameSpace__ecere__com__Class * sClassCur;
16499 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
16501 cClassCur = sClassCur;
16502 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
16504 if(!strcmp(paramCur->name, param->name))
16511 if(paramCur && paramCur->type == 0)
16512 arg = tClass->templateArgs[cp];
16514 arg = expClass->templateArgs[p];
16516 char argument[256];
16518 argument[0] = '\0';
16519 switch(param->type)
16523 char expString[1024];
16524 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16525 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16526 struct Expression * exp;
16527 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16529 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16530 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16531 ProcessExpressionType(exp);
16532 ComputeExpression(exp);
16533 expString[0] = '\0';
16534 PrintExpression(exp, expString);
16535 strcat(argument, expString);
16536 FreeExpression(exp);
16541 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16546 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16547 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16554 strcat(templateString, ", ");
16555 if(lastParam != p - 1)
16557 strcat(templateString, param->name);
16558 strcat(templateString, " = ");
16560 strcat(templateString, argument);
16569 int len = strlen(templateString);
16571 if(templateString[len - 1] == '>')
16572 templateString[len++] = ' ';
16573 templateString[len++] = '>';
16574 templateString[len++] = '\0';
16576 FreeType(exp->expType);
16578 struct Context * context = SetupTemplatesContext(tClass);
16580 exp->expType = ProcessTypeString(templateString, 0x0);
16581 FinishTemplatesContext(context);
16588 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)");
16590 else if(type && (type->kind == 9 || type->kind == 10))
16592 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
16596 exp->expType = memberType;
16598 memberType->refCount++;
16603 char expString[10240];
16605 expString[0] = '\0';
16608 PrintExpression(exp, expString);
16609 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16611 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
16613 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
16615 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
16617 struct Identifier * id = exp->__anon1.member.member;
16618 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));
16622 FreeType(exp->expType);
16623 exp->expType = ReplaceThisClassType(_class);
16627 yylloc = oldyylloc;
16632 struct Type * destType = exp->destType;
16634 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
16636 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
16638 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
16642 ProcessExpressionType(exp);
16649 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
16651 if(classSym && classSym->__anon1.registered)
16653 if(classSym->__anon1.registered->type == 5)
16658 DeclareStruct(classSym->string, 0x0);
16659 FreeSpecifier(exp->__anon1._class);
16661 FullClassNameCat(name, classSym->string, 0x0);
16662 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
16666 if(classSym->__anon1.registered->fixed)
16668 FreeSpecifier(exp->__anon1._class);
16669 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
16674 char className[1024];
16676 strcpy(className, "__ecereClass_");
16677 FullClassNameCat(className, classSym->string, 0x1);
16678 MangleClassName(className);
16679 DeclareClass(classSym, className);
16680 FreeExpContents(exp);
16682 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
16683 exp->__anon1.member.member = MkIdentifier("structSize");
16687 exp->expType = __extension__ ({
16688 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16690 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16696 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
16698 exp->expType = __extension__ ({
16699 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16701 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16703 exp->isConstant = 0x1;
16704 DeclareType(type, 0x0, 0x0);
16710 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
16713 FreeType(exp->__anon1.cast.exp->destType);
16714 exp->__anon1.cast.exp->destType = type;
16716 type->casted = 0x1;
16717 ProcessExpressionType(exp->__anon1.cast.exp);
16718 type->casted = 0x0;
16720 exp->expType = type;
16721 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
16723 void * prev = exp->prev, * next = exp->next;
16724 struct Type * expType = exp->__anon1.cast.exp->destType;
16725 struct Expression * castExp = exp->__anon1.cast.exp;
16726 struct Type * destType = exp->destType;
16729 expType->refCount++;
16730 FreeType(exp->expType);
16731 FreeTypeName(exp->__anon1.cast.typeName);
16733 FreeType(exp->expType);
16734 FreeType(exp->destType);
16735 exp->expType = expType;
16736 exp->destType = destType;
16737 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
16743 exp->isConstant = exp->__anon1.cast.exp->isConstant;
16749 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
16751 exp->expType = type;
16756 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
16758 ProcessExpressionType(exp->__anon1.vaArg.exp);
16759 exp->expType = type;
16764 struct Expression * e;
16766 exp->isConstant = 0x1;
16767 FreeType(exp->__anon1.cond.cond->destType);
16768 exp->__anon1.cond.cond->destType = MkClassType("bool");
16769 exp->__anon1.cond.cond->destType->truth = 0x1;
16770 ProcessExpressionType(exp->__anon1.cond.cond);
16771 if(!exp->__anon1.cond.cond->isConstant)
16772 exp->isConstant = 0x0;
16773 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
16777 FreeType(e->destType);
16778 e->destType = exp->destType;
16780 e->destType->refCount++;
16782 ProcessExpressionType(e);
16785 exp->expType = e->expType;
16787 e->expType->refCount++;
16790 exp->isConstant = 0x0;
16792 FreeType(exp->__anon1.cond.elseExp->destType);
16793 exp->__anon1.cond.elseExp->destType = exp->destType ? exp->destType : exp->expType;
16794 if(exp->__anon1.cond.elseExp->destType)
16795 exp->__anon1.cond.elseExp->destType->refCount++;
16796 ProcessExpressionType(exp->__anon1.cond.elseExp);
16797 if(!exp->__anon1.cond.elseExp->isConstant)
16798 exp->isConstant = 0x0;
16803 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
16805 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
16807 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
16809 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
16811 exp->destType->refCount++;
16813 ProcessStatement(exp->__anon1.compound);
16814 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
16816 exp->expType->refCount++;
16822 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
16824 if(spec && spec->type == 1)
16826 exp->expType = MkClassType(spec->__anon1.__anon1.name);
16827 exp->expType->kind = 19;
16828 exp->byReference = 0x1;
16832 exp->expType = MkClassType("ecere::com::Class");
16833 exp->byReference = 0x1;
16839 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
16843 struct Identifier * id = exp->__anon1.classData.id;
16844 char structName[1024];
16845 struct Expression * classExp;
16847 strcpy(structName, "__ecereClassData_");
16848 FullClassNameCat(structName, _class->fullName, 0x0);
16850 exp->__anon1.member.member = id;
16851 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0x0, 0x0))
16852 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
16854 classExp = MkExpIdentifier(MkIdentifier("class"));
16855 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"))))))));
16856 ProcessExpressionType(exp);
16863 struct Type * type = (((void *)0));
16864 const char * typeString = (((void *)0));
16865 char typeStringBuf[1024];
16867 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))
16869 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
16871 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
16873 else if(exp->__anon1.list)
16875 struct Expression * e;
16877 for(e = (*exp->__anon1.list).first; e; e = e->next)
16879 ProcessExpressionType(e);
16889 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
16893 e->expType = (((void *)0));
16894 e = (*exp->__anon1.list).first;
16895 ProcessExpressionType(e);
16898 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
16900 FreeType(e->expType);
16901 e->expType = (((void *)0));
16903 type = (((void *)0));
16911 FreeType(e->expType);
16912 e->expType = (((void *)0));
16918 typeStringBuf[0] = '\0';
16919 PrintTypeNoConst(type, typeStringBuf, 0x0, 0x1);
16920 typeString = typeStringBuf;
16922 type = (((void *)0));
16927 char templateString[1024];
16928 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
16929 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
16930 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16931 struct Expression * expExt;
16932 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
16934 sprintf(templateString, "Container<%s>", typeString);
16935 if(exp->__anon1.list)
16937 struct Expression * e;
16939 type = ProcessTypeString(typeString, 0x0);
16940 while(e = (*exp->__anon1.list).first)
16942 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
16943 e->destType = type;
16945 ProcessExpressionType(e);
16946 ListAdd(initializers, MkInitializerAssignment(e));
16949 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16951 DeclareStruct("ecere::com::BuiltInContainer", 0x0);
16952 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
16953 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16954 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
16955 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16956 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
16957 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16958 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
16959 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16960 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
16961 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16963 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, &(*initializers).count, (void *)0), __ecereInstance1;
16965 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16966 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, CopySpecifier), CopyDeclarator(decl))));
16967 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16968 exp->expType = ProcessTypeString(templateString, 0x0);
16970 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
16971 ProcessExpressionType(expExt);
16975 exp->expType = ProcessTypeString("Container", 0x0);
16976 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
16981 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
16983 FreeType(exp->expType);
16984 exp->expType = ReplaceThisClassType(thisClass);
16986 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)
16988 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 0x1, 0x0);
16992 if(exp->expType->kind != 15)
16994 struct Type * member;
16995 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
16997 FreeType(exp->expType);
16998 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16999 exp->expType->kind = symbol->type->kind;
17000 exp->expType->refCount++;
17001 exp->expType->__anon1.__anon1.enumName = enumName;
17002 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
17003 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17004 member->refCount++;
17008 struct __ecereNameSpace__ecere__sys__NamedLink * member;
17010 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17012 struct __ecereNameSpace__ecere__sys__NamedLink * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
17014 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
17020 if(exp->destType && (exp->destType->kind == 0 || exp->destType->kind == 18))
17022 else if(exp->destType && !exp->destType->keepCast)
17024 if(!CheckExpressionType(exp, exp->destType, 0x0, !exp->destType->casted))
17026 if(!exp->destType->count || unresolved)
17031 if(exp->destType->kind != 14)
17038 char expString[10240];
17040 expString[0] = '\0';
17041 PrintType(exp->destType, type2, 0x0, 0x1);
17044 PrintExpression(exp, expString);
17045 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17048 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
17049 else if(exp->type != 16)
17050 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
17055 char expString[10240];
17057 expString[0] = '\0';
17060 PrintExpression(exp, expString);
17061 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17064 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
17065 else if(exp->type != 16)
17066 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17078 PrintType(exp->expType, type1, 0x0, 0x1);
17079 PrintType(exp->destType, type2, 0x0, 0x1);
17081 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)))
17085 char expString[10240];
17087 expString[0] = '\0';
17090 PrintExpression(exp, expString);
17091 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17093 if(!sourceFile || (strcmp(sourceFile, "src\\lexer.ec") && strcmp(sourceFile, "src/lexer.ec") && strcmp(sourceFile, "src\\grammar.ec") && strcmp(sourceFile, "src/grammar.ec")))
17094 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
17095 FreeType(exp->expType);
17096 exp->destType->refCount++;
17097 exp->expType = exp->destType;
17102 else if(exp->destType && exp->destType->kind == 14 && exp->expType && exp->expType->passAsTemplate)
17104 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
17105 char typeString[1024];
17106 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17107 struct Declarator * decl;
17109 typeString[0] = '\0';
17112 exp->expType->refCount++;
17114 exp->expType->refCount++;
17116 newExp->destType = exp->expType;
17117 PrintType(exp->expType, typeString, 0x0, 0x0);
17118 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17119 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
17120 exp->__anon1.cast.exp = newExp;
17123 else if(unresolved)
17125 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
17126 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);
17127 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
17128 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
17130 else if(!exp->expType && exp->type != 16)
17132 char expString[10240];
17134 expString[0] = '\0';
17137 PrintExpression(exp, expString);
17138 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17140 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17143 ApplyAnyObjectLogic(exp);
17144 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)))
17146 exp->byReference = 0x1;
17148 yylloc = oldyylloc;
17151 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)
17155 *curMember = (*curMember)->next;
17156 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
17158 *curMember = subMemberStack[--(*subMemberStackPos)];
17159 *curMember = (*curMember)->next;
17161 while((*curMember) && (*curMember)->isProperty)
17162 *curMember = (*curMember)->next;
17163 if(subMemberStackPos)
17165 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17167 subMemberStack[(*subMemberStackPos)++] = *curMember;
17168 *curMember = (*curMember)->members.first;
17169 while(*curMember && (*curMember)->isProperty)
17170 *curMember = (*curMember)->next;
17178 if(subMemberStackPos && *subMemberStackPos)
17180 *curMember = subMemberStack[--(*subMemberStackPos)];
17181 *curMember = (*curMember)->next;
17185 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
17187 if(*curClass == _class)
17189 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
17191 *curMember = (*curClass)->membersAndProperties.first;
17193 while((*curMember) && (*curMember)->isProperty)
17194 *curMember = (*curMember)->next;
17195 if(subMemberStackPos)
17197 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17199 subMemberStack[(*subMemberStackPos)++] = *curMember;
17200 *curMember = (*curMember)->members.first;
17201 while(*curMember && (*curMember)->isProperty)
17202 *curMember = (*curMember)->next;
17209 static void ProcessInitializer(struct Initializer * init, struct Type * type)
17214 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
17216 if(init->__anon1.exp && !init->__anon1.exp->destType)
17218 FreeType(init->__anon1.exp->destType);
17219 init->__anon1.exp->destType = type;
17223 if(init->__anon1.exp)
17225 ProcessExpressionType(init->__anon1.exp);
17226 init->isConstant = init->__anon1.exp->isConstant;
17232 struct Expression * exp = init->__anon1.exp;
17233 struct Instantiation * inst = exp->__anon1.instance;
17234 struct MembersInit * members;
17237 init->__anon1.list = MkList();
17240 for(members = (*inst->members).first; members; members = members->next)
17242 if(members->type == 0)
17244 struct MemberInit * member;
17246 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
17248 ListAdd(init->__anon1.list, member->initializer);
17249 member->initializer = (((void *)0));
17254 FreeExpression(exp);
17258 struct Initializer * i;
17259 struct Type * initializerType = (((void *)0));
17260 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
17261 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
17262 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
17263 int subMemberStackPos = 0;
17265 if(type && type->kind == 12)
17266 initializerType = Dereference(type);
17267 else if(type && (type->kind == 9 || type->kind == 10))
17268 initializerType = type->__anon1.__anon1.members.first;
17269 for(i = (*init->__anon1.list).first; i; i = i->next)
17271 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17273 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
17276 if(!curMember->dataType)
17277 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0x0);
17278 initializerType = curMember->dataType;
17281 ProcessInitializer(i, initializerType);
17282 if(initializerType && type && (type->kind == 9 || type->kind == 10))
17283 initializerType = initializerType->next;
17285 init->isConstant = 0x0;
17287 if(type && type->kind == 12)
17288 FreeType(initializerType);
17289 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))
17291 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
17298 extern struct Symbol * FindType(struct Context * ctx, const char * name);
17300 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
17302 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct)
17308 if(spec->__anon1.specifier == THISCLASS)
17313 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17314 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17315 ProcessSpecifier(spec, declareStruct);
17322 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
17325 DeclareType(symbol->type, 0x1, 0x1);
17326 else if((symbol = spec->__anon1.__anon1.symbol) && symbol->__anon1.registered && symbol->__anon1.registered->type == 1 && declareStruct)
17327 DeclareStruct(spec->__anon1.__anon1.name, 0x0);
17332 struct Enumerator * e;
17334 if(spec->__anon1.__anon2.list)
17336 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
17339 ProcessExpressionType(e->exp);
17347 if(spec->__anon1.__anon2.definitions)
17349 struct ClassDef * def;
17350 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
17352 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
17359 static void ProcessDeclarator(struct Declarator * decl)
17364 if(decl->__anon1.identifier->classSym)
17366 FreeSpecifier(decl->__anon1.identifier->_class);
17367 decl->__anon1.identifier->_class = (((void *)0));
17371 if(decl->__anon1.array.exp)
17372 ProcessExpressionType(decl->__anon1.array.exp);
17379 if(decl->declarator)
17380 ProcessDeclarator(decl->declarator);
17381 if(decl->type == 4)
17383 struct Identifier * id = GetDeclId(decl);
17385 if(id && id->_class)
17387 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(id->_class), param->declarator = (((void *)0)), param);
17389 if(!decl->__anon1.function.parameters)
17390 decl->__anon1.function.parameters = MkList();
17391 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
17392 id->_class = (((void *)0));
17394 if(decl->__anon1.function.parameters)
17396 struct TypeName * param;
17398 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
17400 if(param->qualifiers && (*param->qualifiers).first)
17402 struct Specifier * spec = (*param->qualifiers).first;
17404 if(spec && spec->__anon1.specifier == TYPED_OBJECT)
17406 struct Declarator * d = param->declarator;
17407 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);
17410 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
17411 FreeList(param->qualifiers, FreeSpecifier);
17412 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
17413 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
17414 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
17417 else if(spec && spec->__anon1.specifier == ANY_OBJECT)
17419 struct Declarator * d = param->declarator;
17421 FreeList(param->qualifiers, FreeSpecifier);
17422 param->qualifiers = MkListOne(MkSpecifier(VOID));
17424 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
17425 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
17427 else if(spec->__anon1.specifier == THISCLASS)
17432 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17433 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17434 ProcessSpecifier(spec, 0x0);
17438 if(param->declarator)
17439 ProcessDeclarator(param->declarator);
17447 extern struct Identifier * CopyIdentifier(struct Identifier * id);
17449 extern void FreeInitDeclarator(struct InitDeclarator * decl);
17451 static void ProcessDeclaration(struct Declaration * decl)
17453 yylloc = decl->loc;
17458 unsigned int declareStruct = 0x0;
17460 if(decl->__anon1.__anon1.declarators)
17462 struct InitDeclarator * d;
17464 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17466 struct Type * type, * subType;
17468 ProcessDeclarator(d->declarator);
17469 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17472 ProcessInitializer(d->initializer, type);
17473 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
17475 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
17477 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
17479 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
17480 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
17481 if(decl->__anon1.__anon1.specifiers)
17482 FreeList(decl->__anon1.__anon1.specifiers, FreeSpecifier);
17483 FreeList(decl->__anon1.__anon1.declarators, FreeInitDeclarator);
17486 decl->__anon1.inst = inst;
17490 for(subType = type; subType; )
17492 if(subType->kind == 8)
17494 declareStruct = 0x1;
17497 else if(subType->kind == 13)
17499 else if(subType->kind == 12)
17500 subType = subType->__anon1.__anon4.arrayType;
17509 if(decl->__anon1.__anon1.specifiers)
17511 struct Specifier * s;
17513 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
17515 ProcessSpecifier(s, declareStruct);
17522 ProcessInstantiationType(decl->__anon1.inst);
17527 struct Specifier * spec;
17528 struct Declarator * d;
17529 unsigned int declareStruct = 0x0;
17531 if(decl->__anon1.__anon1.declarators)
17533 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17535 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17536 struct Type * subType;
17538 ProcessDeclarator(d);
17539 for(subType = type; subType; )
17541 if(subType->kind == 8)
17543 declareStruct = 0x1;
17546 else if(subType->kind == 13)
17548 else if(subType->kind == 12)
17549 subType = subType->__anon1.__anon4.arrayType;
17556 if(decl->__anon1.__anon1.specifiers)
17558 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
17559 ProcessSpecifier(spec, declareStruct);
17566 static struct FunctionDefinition * curFunction;
17568 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
17570 char propName[1024], propNameM[1024];
17571 char getName[1024], setName[1024];
17572 struct __ecereNameSpace__ecere__sys__OldList * args;
17574 DeclareProperty(prop, setName, getName);
17575 strcpy(propName, "__ecereProp_");
17576 FullClassNameCat(propName, prop->_class->fullName, 0x0);
17577 strcat(propName, "_");
17578 FullClassNameCat(propName, prop->name, 0x1);
17579 MangleClassName(propName);
17580 strcpy(propNameM, "__ecerePropM_");
17581 FullClassNameCat(propNameM, prop->_class->fullName, 0x0);
17582 strcat(propNameM, "_");
17583 FullClassNameCat(propNameM, prop->name, 0x1);
17584 MangleClassName(propNameM);
17585 if(prop->isWatchable)
17588 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17589 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17590 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17592 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17593 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17594 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17598 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17599 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17600 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17602 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17603 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17604 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17606 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
17607 curFunction->propSet->fireWatchersDone = 0x1;
17610 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
17612 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
17614 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
17616 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
17618 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
17620 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
17622 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
17624 extern void FreePropertyWatch(struct PropertyWatch * watcher);
17626 static void ProcessStatement(struct Statement * stmt)
17628 yylloc = stmt->loc;
17632 ProcessStatement(stmt->__anon1.labeled.stmt);
17635 if(stmt->__anon1.caseStmt.exp)
17637 FreeType(stmt->__anon1.caseStmt.exp->destType);
17638 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
17640 curSwitchType->refCount++;
17641 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
17642 ComputeExpression(stmt->__anon1.caseStmt.exp);
17644 if(stmt->__anon1.caseStmt.stmt)
17645 ProcessStatement(stmt->__anon1.caseStmt.stmt);
17649 if(stmt->__anon1.compound.context)
17651 struct Declaration * decl;
17652 struct Statement * s;
17653 struct Statement * prevCompound = curCompound;
17654 struct Context * prevContext = curContext;
17656 if(!stmt->__anon1.compound.isSwitch)
17657 curCompound = stmt;
17658 curContext = stmt->__anon1.compound.context;
17659 if(stmt->__anon1.compound.declarations)
17661 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
17662 ProcessDeclaration(decl);
17664 if(stmt->__anon1.compound.statements)
17666 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
17667 ProcessStatement(s);
17669 curContext = prevContext;
17670 curCompound = prevCompound;
17676 struct Expression * exp;
17678 if(stmt->__anon1.expressions)
17680 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
17681 ProcessExpressionType(exp);
17687 struct Expression * exp;
17689 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
17690 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
17691 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 0x1;
17692 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
17694 ProcessExpressionType(exp);
17696 if(stmt->__anon1.ifStmt.stmt)
17697 ProcessStatement(stmt->__anon1.ifStmt.stmt);
17698 if(stmt->__anon1.ifStmt.elseStmt)
17699 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
17704 struct Type * oldSwitchType = curSwitchType;
17706 if(stmt->__anon1.switchStmt.exp)
17708 struct Expression * exp;
17710 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
17714 ProcessExpressionType(exp);
17717 curSwitchType = exp->expType;
17720 ProcessStatement(stmt->__anon1.switchStmt.stmt);
17721 curSwitchType = oldSwitchType;
17726 if(stmt->__anon1.whileStmt.exp)
17728 struct Expression * exp;
17730 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
17731 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
17732 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 0x1;
17733 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
17735 ProcessExpressionType(exp);
17738 if(stmt->__anon1.whileStmt.stmt)
17739 ProcessStatement(stmt->__anon1.whileStmt.stmt);
17744 if(stmt->__anon1.doWhile.exp)
17746 struct Expression * exp;
17748 if((*stmt->__anon1.doWhile.exp).last)
17750 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
17751 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
17752 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 0x1;
17754 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
17756 ProcessExpressionType(exp);
17759 if(stmt->__anon1.doWhile.stmt)
17760 ProcessStatement(stmt->__anon1.doWhile.stmt);
17765 struct Expression * exp;
17767 if(stmt->__anon1.forStmt.init)
17768 ProcessStatement(stmt->__anon1.forStmt.init);
17769 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
17771 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
17772 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
17773 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 0x1;
17775 if(stmt->__anon1.forStmt.check)
17776 ProcessStatement(stmt->__anon1.forStmt.check);
17777 if(stmt->__anon1.forStmt.increment)
17779 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
17780 ProcessExpressionType(exp);
17782 if(stmt->__anon1.forStmt.stmt)
17783 ProcessStatement(stmt->__anon1.forStmt.stmt);
17788 struct Identifier * id = stmt->__anon1.forEachStmt.id;
17789 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
17790 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
17791 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
17792 char iteratorType[1024];
17793 struct Type * source;
17794 struct Expression * e;
17795 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));
17796 struct Expression * arrayExp;
17797 const char * typeString = (((void *)0));
17798 int builtinCount = 0;
17800 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
17804 FreeType(e->destType);
17805 e->destType = ProcessTypeString("Container", 0x0);
17807 if(!isBuiltin || e->next)
17808 ProcessExpressionType(e);
17810 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
17811 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)))
17813 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
17814 struct Symbol * symbol;
17815 struct Expression * expIt = (((void *)0));
17816 unsigned int isMap = 0x0, isArray = 0x0, isLinkList = 0x0, isList = 0x0, isCustomAVLTree = 0x0;
17817 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
17818 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
17819 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
17822 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
17823 stmt->__anon1.compound.context->parent = curContext;
17824 curContext = stmt->__anon1.compound.context;
17825 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
17827 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
17829 isCustomAVLTree = 0x1;
17830 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
17833 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
17835 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
17837 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
17840 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
17844 struct Declarator * decl;
17845 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17847 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
17848 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17849 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
17853 struct Type * type = (((void *)0));
17854 char typeStringBuf[1024];
17856 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
17857 if(((struct Expression *)(*exp).last)->type == 11)
17859 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
17862 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
17864 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)
17866 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
17868 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
17870 else if(arrayExp->__anon1.list)
17872 struct Expression * e;
17874 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
17876 ProcessExpressionType(e);
17886 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
17890 e->expType = (((void *)0));
17891 e = (*arrayExp->__anon1.list).first;
17892 ProcessExpressionType(e);
17895 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
17897 FreeType(e->expType);
17898 e->expType = (((void *)0));
17900 type = (((void *)0));
17908 FreeType(e->expType);
17909 e->expType = (((void *)0));
17915 typeStringBuf[0] = '\0';
17916 PrintType(type, typeStringBuf, 0x0, 0x1);
17917 typeString = typeStringBuf;
17923 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
17924 struct Declarator * decl;
17925 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17927 if(arrayExp->__anon1.list)
17929 struct Expression * e;
17931 builtinCount = (*arrayExp->__anon1.list).count;
17932 type = ProcessTypeString(typeString, 0x0);
17933 while(e = (*arrayExp->__anon1.list).first)
17935 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
17936 e->destType = type;
17938 ProcessExpressionType(e);
17939 ListAdd(initializers, MkInitializerAssignment(e));
17942 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
17944 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
17945 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, CopySpecifier), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
17946 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
17947 FreeList(exp, FreeExpression);
17951 arrayExp->expType = ProcessTypeString("Container", 0x0);
17952 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
17955 else if(isLinkList && !isList)
17957 struct Declarator * decl;
17958 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17960 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
17961 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17962 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
17964 else if(_class->templateArgs)
17967 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
17969 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
17970 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)))))))));
17972 symbol = FindSymbol(id->string, curContext, curContext, 0x0, 0x0);
17975 switch(block->type)
17978 if(block->__anon1.compound.context)
17979 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17982 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
17983 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17984 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
17985 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17988 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
17989 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17992 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
17993 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17996 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
17997 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18000 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
18001 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18004 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
18005 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18011 block = MkIfStmt(filter, block, (((void *)0)));
18015 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));
18016 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18017 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18018 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18024 sprintf(count, "%d", builtinCount);
18025 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));
18026 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18027 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18028 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18030 else if(isLinkList && !isList)
18032 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
18033 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
18035 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
18037 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));
18041 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18042 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18044 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));
18046 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18047 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18048 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18052 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
18054 ProcessExpressionType(expIt);
18055 if((*stmt->__anon1.compound.declarations).first)
18056 ProcessDeclaration((*stmt->__anon1.compound.declarations).first);
18058 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
18059 ProcessStatement(stmt);
18060 curContext = stmt->__anon1.compound.context->parent;
18065 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
18077 struct Expression * exp;
18079 if(stmt->__anon1.expressions)
18081 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
18085 if(curFunction && !curFunction->type)
18086 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
18087 FreeType(exp->destType);
18088 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
18090 exp->destType->refCount++;
18092 ProcessExpressionType(exp);
18099 ProcessDeclaration(stmt->__anon1.decl);
18104 struct AsmField * field;
18106 if(stmt->__anon1.asmStmt.inputFields)
18108 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
18109 if(field->expression)
18110 ProcessExpressionType(field->expression);
18112 if(stmt->__anon1.asmStmt.outputFields)
18114 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
18115 if(field->expression)
18116 ProcessExpressionType(field->expression);
18118 if(stmt->__anon1.asmStmt.clobberedFields)
18120 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
18122 if(field->expression)
18123 ProcessExpressionType(field->expression);
18130 struct PropertyWatch * propWatch;
18131 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18132 struct Expression * object = stmt->__anon1._watch.object;
18133 struct Expression * watcher = stmt->__anon1._watch.watcher;
18136 ProcessExpressionType(watcher);
18138 ProcessExpressionType(object);
18141 if(watcher || thisClass)
18143 struct External * external = curExternal;
18144 struct Context * context = curContext;
18147 stmt->__anon1.expressions = MkList();
18148 curExternal = external->prev;
18149 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18151 struct ClassFunction * func;
18152 char watcherName[1024];
18153 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;
18154 struct External * createdExternal;
18155 struct External * externalDecl = MkExternalDeclaration((((void *)0)));
18157 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, externalDecl);
18158 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
18159 if(propWatch->deleteWatch)
18160 strcat(watcherName, "_delete");
18163 struct Identifier * propID;
18165 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18167 strcat(watcherName, "_");
18168 strcat(watcherName, propID->string);
18171 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
18173 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)));
18174 ProcessClassFunctionBody(func, propWatch->compound);
18175 propWatch->compound = (((void *)0));
18176 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 0x1);
18177 createdExternal->symbol->idCode = external->symbol->idCode;
18178 curExternal = createdExternal;
18179 ProcessFunction(createdExternal->__anon1.function);
18181 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(createdExternal->__anon1.function->declarator), (((void *)0)))));
18183 externalDecl->__anon1.declaration = decl;
18184 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
18185 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
18187 if(propWatch->deleteWatch)
18189 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18191 ListAdd(args, CopyExpression(object));
18192 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18193 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18194 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
18198 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
18199 struct Identifier * propID;
18201 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18203 char propName[1024];
18204 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18208 char getName[1024], setName[1024];
18209 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18211 DeclareProperty(prop, setName, getName);
18212 strcpy(propName, "__ecereProp_");
18213 FullClassNameCat(propName, prop->_class->fullName, 0x0);
18214 strcat(propName, "_");
18215 FullClassNameCat(propName, prop->name, 0x1);
18216 ListAdd(args, CopyExpression(object));
18217 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18218 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18219 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18220 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
18223 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18228 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
18230 curExternal = external;
18231 curContext = context;
18233 FreeExpression(watcher);
18235 FreeExpression(object);
18236 FreeList(watches, FreePropertyWatch);
18239 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a _class\n", (((void *)0))));
18243 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18245 ProcessStatement(propWatch->compound);
18252 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18253 struct Expression * object = stmt->__anon1._watch.object;
18254 struct __ecereNameSpace__ecere__com__Class * _class;
18257 ProcessExpressionType(object);
18260 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
18263 struct Identifier * propID;
18266 stmt->__anon1.expressions = MkList();
18267 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
18269 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
18276 for(propID = (*watches).first; propID; propID = propID->next)
18278 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18282 CreateFireWatcher(prop, object, stmt);
18285 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18290 struct __ecereNameSpace__ecere__com__Property * prop;
18291 struct __ecereNameSpace__ecere__com__Class * base;
18293 for(base = _class; base; base = base->base)
18295 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
18297 if(prop->isProperty && prop->isWatchable)
18299 CreateFireWatcher(prop, object, stmt);
18305 FreeExpression(object);
18306 FreeList(watches, FreeIdentifier);
18309 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18315 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18316 struct Expression * object = stmt->__anon1._watch.object;
18317 struct Expression * watcher = stmt->__anon1._watch.watcher;
18318 struct __ecereNameSpace__ecere__com__Class * _class;
18321 ProcessExpressionType(object);
18323 ProcessExpressionType(watcher);
18326 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
18327 if(watcher || thisClass)
18331 struct Identifier * propID;
18334 stmt->__anon1.expressions = MkList();
18337 struct __ecereNameSpace__ecere__sys__OldList * args;
18340 ListAdd(args, CopyExpression(object));
18341 ListAdd(args, MkExpConstant("0"));
18342 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18343 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18347 for(propID = (*watches).first; propID; propID = propID->next)
18349 char propName[1024];
18350 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18354 char getName[1024], setName[1024];
18355 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18357 DeclareProperty(prop, setName, getName);
18358 strcpy(propName, "__ecereProp_");
18359 FullClassNameCat(propName, prop->_class->fullName, 0x0);
18360 strcat(propName, "_");
18361 FullClassNameCat(propName, prop->name, 0x1);
18362 MangleClassName(propName);
18363 ListAdd(args, CopyExpression(object));
18364 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18365 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18366 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18369 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18373 FreeExpression(object);
18375 FreeExpression(watcher);
18376 FreeList(watches, FreeIdentifier);
18379 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18382 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
18389 extern struct Expression * QBrackets(struct Expression * exp);
18391 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
18393 extern struct Declarator * QMkPtrDecl(const char * id);
18395 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
18397 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
18399 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
18401 static void ProcessFunction(struct FunctionDefinition * function)
18403 struct Identifier * id = GetDeclId(function->declarator);
18404 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18405 struct Type * type = symbol ? symbol->type : (((void *)0));
18406 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18407 struct Context * oldTopContext = topContext;
18409 yylloc = function->loc;
18410 if(type && type->__anon1.__anon2.thisClass)
18412 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18413 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18414 char className[1024];
18415 char structName[1024];
18416 struct Declarator * funcDecl;
18417 struct Symbol * thisSymbol;
18418 unsigned int typedObject = 0x0;
18420 if(_class && !_class->base)
18422 _class = currentClass;
18423 if(_class && !_class->symbol)
18424 _class->symbol = FindClass(_class->fullName);
18425 classSym = _class ? _class->symbol : (((void *)0));
18428 thisClass = _class;
18429 if(inCompiler && _class)
18431 if(type->kind == 11)
18433 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18435 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18437 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18440 if(type->classObjectType != 1)
18442 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18443 symbol->type->__anon1.__anon2.staticMethod = 0x1;
18444 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18445 symbol->type->extraParam = 0x0;
18448 strcpy(className, "__ecereClass_");
18449 FullClassNameCat(className, _class->fullName, 0x1);
18450 MangleClassName(className);
18451 structName[0] = (char)0;
18452 FullClassNameCat(structName, _class->fullName, 0x0);
18453 funcDecl = GetFuncDecl(function->declarator);
18456 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18458 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18460 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18462 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18463 FreeTypeName(param);
18466 if(!function->propertyNoThis)
18468 struct TypeName * thisParam;
18470 if(type->classObjectType != 1)
18472 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18473 if(!funcDecl->__anon1.function.parameters)
18474 funcDecl->__anon1.function.parameters = MkList();
18475 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18479 if(type->classObjectType != 1)
18481 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18482 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18484 thisParam = __extension__ ({
18485 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18487 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18489 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18493 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18495 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18497 funcDecl = GetFuncDecl(initDecl->declarator);
18500 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18502 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18504 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18506 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18507 FreeTypeName(param);
18510 if(type->classObjectType != 1)
18512 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18514 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18516 if(!funcDecl->__anon1.function.parameters)
18517 funcDecl->__anon1.function.parameters = MkList();
18518 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18526 if(type->classObjectType != 1)
18528 thisSymbol = __extension__ ({
18529 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18531 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18533 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18534 if(typedObject && thisSymbol->type)
18536 thisSymbol->type->classObjectType = 2;
18537 thisSymbol->type->byReference = type->byReference;
18538 thisSymbol->type->typedByReference = type->byReference;
18542 if(inCompiler && _class && (_class->type == 0) && type->classObjectType != 1)
18544 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18547 struct __ecereNameSpace__ecere__com__Class * base;
18549 for(base = _class; base && base->type != 1000; base = base->next)
18551 for(member = base->membersAndProperties.first; member; member = member->next)
18552 if(!member->isProperty)
18558 for(member = _class->membersAndProperties.first; member; member = member->next)
18559 if(!member->isProperty)
18563 char pointerName[1024];
18564 struct Declaration * decl;
18565 struct Initializer * initializer;
18566 struct Expression * exp, * bytePtr;
18568 strcpy(pointerName, "__ecerePointer_");
18569 FullClassNameCat(pointerName, _class->fullName, 0x0);
18571 char className[1024];
18573 strcpy(className, "__ecereClass_");
18574 FullClassNameCat(className, classSym->string, 0x1);
18575 MangleClassName(className);
18576 DeclareClass(classSym, className);
18578 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18583 sprintf(string, "%d", _class->offset);
18584 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpConstant(string)));
18588 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
18590 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
18591 exp->expType = __extension__ ({
18592 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18594 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
18595 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18597 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
18598 }), __ecereInstance2;
18602 yylloc = function->body->loc;
18603 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
18605 struct Context * prevContext = curContext;
18607 curContext = function->body->__anon1.compound.context;
18608 decl = MkDeclaration(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
18609 curContext = prevContext;
18611 decl->symbol = (((void *)0));
18612 if(!function->body->__anon1.compound.declarations)
18613 function->body->__anon1.compound.declarations = MkList();
18614 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
18620 thisClass = (((void *)0));
18623 FreeSpecifier(id->_class);
18624 id->_class = (((void *)0));
18625 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18627 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18629 id = GetDeclId(initDecl->declarator);
18630 FreeSpecifier(id->_class);
18631 id->_class = (((void *)0));
18635 topContext = function->body->__anon1.compound.context;
18637 struct FunctionDefinition * oldFunction = curFunction;
18639 curFunction = function;
18641 ProcessStatement(function->body);
18642 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
18644 struct Statement * prevCompound = curCompound;
18645 struct Context * prevContext = curContext;
18646 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
18648 if(!function->body->__anon1.compound.statements)
18649 function->body->__anon1.compound.statements = MkList();
18650 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
18651 curCompound = function->body;
18652 curContext = function->body->__anon1.compound.context;
18653 ProcessStatement(fireWatchers);
18654 curContext = prevContext;
18655 curCompound = prevCompound;
18657 curFunction = oldFunction;
18659 if(function->declarator)
18661 ProcessDeclarator(function->declarator);
18663 topContext = oldTopContext;
18664 thisClass = oldThisClass;
18667 extern void FreeSymbol(struct Symbol * symbol);
18669 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
18671 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
18673 struct ClassDef * def;
18674 struct External * external = curExternal;
18675 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
18677 for(def = definitions->first; def; def = def->next)
18681 if(def->__anon1.function->declarator)
18682 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
18684 curExternal = external;
18685 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
18687 else if(def->type == 2)
18689 if(def->__anon1.decl->type == 2)
18691 thisClass = regClass;
18692 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
18693 thisClass = (((void *)0));
18697 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
18700 thisClass = regClass;
18701 ProcessDeclaration(def->__anon1.decl);
18702 thisClass = backThisClass;
18705 else if(def->type == 1 && def->__anon1.defProperties)
18707 struct MemberInit * defProperty;
18708 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);
18710 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18711 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
18713 thisClass = regClass;
18714 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
18715 thisClass = (((void *)0));
18717 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18718 FreeSymbol(thisSymbol);
18720 else if(def->type == 3 && def->__anon1.propertyDef)
18722 struct PropertyDef * prop = def->__anon1.propertyDef;
18724 thisClass = regClass;
18729 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18731 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18733 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
18734 ProcessStatement(prop->setStmt);
18740 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18742 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18744 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
18745 ProcessStatement(prop->getStmt);
18747 if(prop->issetStmt)
18751 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18753 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18755 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
18756 ProcessStatement(prop->issetStmt);
18758 thisClass = (((void *)0));
18760 else if(def->type == 4 && def->__anon1.propertyWatch)
18762 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
18764 thisClass = regClass;
18765 if(propertyWatch->compound)
18767 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);
18769 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18770 curExternal = (((void *)0));
18771 ProcessStatement(propertyWatch->compound);
18773 thisClass = (((void *)0));
18778 void DeclareFunctionUtil(const char * s)
18780 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
18787 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
18788 strcpy(name, "__ecereFunction_");
18789 FullClassNameCat(name, s, 0x0);
18790 DeclareFunction(function, name);
18794 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
18796 void ComputeDataTypes()
18798 struct External * external;
18799 struct External * temp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_External);
18800 struct External * after = (((void *)0));
18802 currentClass = (((void *)0));
18803 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
18804 for(external = (*ast).first; external; external = external->next)
18806 if(external->type == 1)
18808 struct Declaration * decl = external->__anon1.declaration;
18812 struct __ecereNameSpace__ecere__sys__OldList * decls = decl->__anon1.__anon1.declarators;
18816 struct InitDeclarator * initDecl = (*decls).first;
18820 struct Declarator * declarator = initDecl->declarator;
18822 if(declarator && declarator->type == 1)
18824 struct Identifier * id = declarator->__anon1.identifier;
18826 if(id && id->string)
18828 if(!strcmp(id->string, "uintptr_t") || !strcmp(id->string, "intptr_t") || !strcmp(id->string, "size_t") || !strcmp(id->string, "ssize_t"))
18830 external->symbol->id = -1001, external->symbol->idCode = -1001;
18840 temp->symbol = __extension__ ({
18841 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18843 __ecereInstance1->id = -1000, __ecereInstance1->idCode = -1000, __ecereInstance1;
18845 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, temp);
18846 curExternal = temp;
18847 DeclareFunctionUtil("eSystem_New");
18848 DeclareFunctionUtil("eSystem_New0");
18849 DeclareFunctionUtil("eSystem_Renew");
18850 DeclareFunctionUtil("eSystem_Renew0");
18851 DeclareFunctionUtil("eSystem_Delete");
18852 DeclareFunctionUtil("eClass_GetProperty");
18853 DeclareFunctionUtil("eClass_SetProperty");
18854 DeclareFunctionUtil("eInstance_FireSelfWatchers");
18855 DeclareFunctionUtil("eInstance_SetMethod");
18856 DeclareFunctionUtil("eInstance_IncRef");
18857 DeclareFunctionUtil("eInstance_StopWatching");
18858 DeclareFunctionUtil("eInstance_Watch");
18859 DeclareFunctionUtil("eInstance_FireWatchers");
18860 DeclareStruct("ecere::com::Class", 0x0);
18861 DeclareStruct("ecere::com::Instance", 0x0);
18862 DeclareStruct("ecere::com::Property", 0x0);
18863 DeclareStruct("ecere::com::DataMember", 0x0);
18864 DeclareStruct("ecere::com::Method", 0x0);
18865 DeclareStruct("ecere::com::SerialBuffer", 0x0);
18866 DeclareStruct("ecere::com::ClassTemplateArgument", 0x0);
18867 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), temp);
18868 for(external = (*ast).first; external; external = external->next)
18870 afterExternal = curExternal = external;
18871 if(external->type == 0)
18873 currentClass = external->__anon1.function->_class;
18874 ProcessFunction(external->__anon1.function);
18876 else if(external->type == 1)
18878 currentClass = (((void *)0));
18879 if(external->__anon1.declaration)
18880 ProcessDeclaration(external->__anon1.declaration);
18882 else if(external->type == 2)
18884 struct ClassDefinition * _class = external->__anon1._class;
18886 currentClass = external->symbol->__anon1.registered;
18887 if(_class->definitions)
18889 ProcessClass(_class->definitions, _class->symbol);
18893 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
18894 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
18897 else if(external->type == 4)
18899 thisNameSpace = external->__anon1.id->string;
18902 currentClass = (((void *)0));
18903 thisNameSpace = (((void *)0));
18904 curExternal = (((void *)0));
18905 ((temp->symbol ? (__ecereClass_Symbol->Destructor ? __ecereClass_Symbol->Destructor((void *)temp->symbol) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp->symbol)) : 0), temp->symbol = 0);
18906 ((temp ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)temp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp)) : 0), temp = 0);
18909 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);
18911 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);
18913 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
18915 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
18917 struct __ecereNameSpace__ecere__com__Class * class;
18919 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
18920 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
18921 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
18922 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
18923 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
18924 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
18925 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
18926 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
18927 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
18928 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
18929 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
18930 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
18931 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
18932 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
18933 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
18934 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
18935 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
18936 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
18937 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
18938 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
18939 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
18940 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
18941 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
18942 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
18943 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
18944 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
18945 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
18946 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
18947 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
18948 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
18949 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
18950 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
18951 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
18952 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
18953 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
18954 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
18955 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
18956 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
18957 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
18958 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
18959 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
18960 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
18961 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
18962 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
18963 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
18964 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
18965 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
18966 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
18967 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
18968 __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);
18969 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "void DeclareStruct(const char * name, bool skipNoHead)", DeclareStruct, module, 2);
18970 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
18971 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
18972 __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);
18973 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
18974 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
18975 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
18976 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
18977 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
18978 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
18979 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
18980 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
18981 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
18982 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
18983 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
18984 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(GlobalData data)", DeclareGlobalData, module, 2);
18985 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, 0, 0, module, 2, 1);
18986 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
18987 __ecereClass_Conversion = class;
18988 __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);
18989 __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);
18990 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
18991 __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);
18992 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
18993 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
18994 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
18995 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
18996 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
18997 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
18998 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
18999 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19000 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19001 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19002 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19003 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19004 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19005 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19006 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19007 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19008 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19009 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19010 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19011 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19012 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(const String s)", DeclareFunctionUtil, module, 1);
19013 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);
19016 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)