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 unsigned int needTemplateCast;
494 } __attribute__ ((gcc_struct));
496 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
498 struct TemplateDatatype
500 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
501 struct Declarator * decl;
502 } __attribute__ ((gcc_struct));
504 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
506 struct TemplateArgument;
508 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
510 struct TemplateParameter
512 struct TemplateParameter * prev;
513 struct TemplateParameter * next;
516 struct Identifier * identifier;
519 struct TemplateDatatype * dataType;
521 } __attribute__ ((gcc_struct)) __anon1;
522 struct TemplateArgument * defaultArgument;
523 const char * dataTypeString;
524 struct Type * baseType;
525 } __attribute__ ((gcc_struct));
527 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
531 struct Specifier * prev;
532 struct Specifier * next;
540 struct ExtDecl * extDecl;
542 struct Symbol * symbol;
543 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
544 } __attribute__ ((gcc_struct)) __anon1;
547 struct Identifier * id;
548 struct __ecereNameSpace__ecere__sys__OldList * list;
549 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
550 struct __ecereNameSpace__ecere__sys__OldList * definitions;
551 unsigned int addNameSpace;
552 struct Context * ctx;
553 struct ExtDecl * extDeclStruct;
554 } __attribute__ ((gcc_struct)) __anon2;
555 struct Expression * expression;
556 struct Specifier * _class;
557 struct TemplateParameter * templateParameter;
558 } __attribute__ ((gcc_struct)) __anon1;
559 } __attribute__ ((gcc_struct));
561 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
565 struct Identifier * prev;
566 struct Identifier * next;
568 struct Symbol * classSym;
569 struct Specifier * _class;
571 struct Identifier * badID;
572 } __attribute__ ((gcc_struct));
574 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
578 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
582 struct Declarator * prev;
583 struct Declarator * next;
586 struct Symbol * symbol;
587 struct Declarator * declarator;
590 struct Identifier * identifier;
593 struct Expression * exp;
594 struct Expression * posExp;
595 struct Attrib * attrib;
596 } __attribute__ ((gcc_struct)) structDecl;
599 struct Expression * exp;
600 struct Specifier * enumClass;
601 } __attribute__ ((gcc_struct)) array;
604 struct __ecereNameSpace__ecere__sys__OldList * parameters;
605 } __attribute__ ((gcc_struct)) function;
608 struct Pointer * pointer;
609 } __attribute__ ((gcc_struct)) pointer;
612 struct ExtDecl * extended;
613 } __attribute__ ((gcc_struct)) extended;
614 } __attribute__ ((gcc_struct)) __anon1;
615 } __attribute__ ((gcc_struct));
617 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
619 struct FunctionDefinition
621 struct FunctionDefinition * prev;
622 struct FunctionDefinition * next;
624 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
625 struct Declarator * declarator;
626 struct __ecereNameSpace__ecere__sys__OldList * declarations;
627 struct Statement * body;
628 struct __ecereNameSpace__ecere__com__Class * _class;
629 struct __ecereNameSpace__ecere__sys__OldList attached;
632 struct Symbol * propSet;
634 unsigned int propertyNoThis;
635 } __attribute__ ((gcc_struct));
637 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
641 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
645 struct External * prev;
646 struct External * next;
649 struct Symbol * symbol;
652 struct FunctionDefinition * function;
653 struct ClassDefinition * _class;
654 struct Declaration * declaration;
656 struct Identifier * id;
657 struct DBTableDef * table;
658 } __attribute__ ((gcc_struct)) __anon1;
660 } __attribute__ ((gcc_struct));
662 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
666 struct ModuleImport * prev;
667 struct ModuleImport * next;
669 struct __ecereNameSpace__ecere__sys__OldList classes;
670 struct __ecereNameSpace__ecere__sys__OldList functions;
673 } __attribute__ ((gcc_struct));
675 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
679 struct ClassImport * prev;
680 struct ClassImport * next;
682 struct __ecereNameSpace__ecere__sys__OldList methods;
683 struct __ecereNameSpace__ecere__sys__OldList properties;
686 } __attribute__ ((gcc_struct));
688 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
693 struct Symbol * parent;
694 struct Symbol * left;
695 struct Symbol * right;
700 struct __ecereNameSpace__ecere__com__Method * method;
701 struct __ecereNameSpace__ecere__com__Property * _property;
702 struct __ecereNameSpace__ecere__com__Class * registered;
703 } __attribute__ ((gcc_struct)) __anon1;
710 struct External * pointerExternal;
711 struct External * structExternal;
712 } __attribute__ ((gcc_struct)) __anon1;
715 struct External * externalGet;
716 struct External * externalSet;
717 struct External * externalPtr;
718 struct External * externalIsSet;
719 } __attribute__ ((gcc_struct)) __anon2;
722 struct External * methodExternal;
723 struct External * methodCodeExternal;
724 } __attribute__ ((gcc_struct)) __anon3;
725 } __attribute__ ((gcc_struct)) __anon2;
726 unsigned int imported;
727 unsigned int declaredStructSym;
728 struct __ecereNameSpace__ecere__com__Class * _class;
729 unsigned int declaredStruct;
730 unsigned int needConstructor;
731 unsigned int needDestructor;
732 char * constructorName;
735 char * destructorName;
736 struct ModuleImport * module;
737 struct ClassImport * _import;
738 struct Location nameLoc;
739 unsigned int isParam;
740 unsigned int isRemote;
741 unsigned int isStruct;
742 unsigned int fireWatchersDone;
744 unsigned int classData;
745 unsigned int isStatic;
747 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
748 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
749 struct Context * ctx;
751 struct Expression * propCategory;
752 } __attribute__ ((gcc_struct));
754 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
763 struct Symbol * _class;
766 struct __ecereNameSpace__ecere__sys__OldList members;
768 } __attribute__ ((gcc_struct)) __anon1;
771 struct Type * returnType;
772 struct __ecereNameSpace__ecere__sys__OldList params;
773 struct Symbol * thisClass;
774 unsigned int staticMethod;
775 struct TemplateParameter * thisClassTemplate;
776 } __attribute__ ((gcc_struct)) __anon2;
779 struct __ecereNameSpace__ecere__com__Method * method;
780 struct __ecereNameSpace__ecere__com__Class * methodClass;
781 struct __ecereNameSpace__ecere__com__Class * usedClass;
782 } __attribute__ ((gcc_struct)) __anon3;
785 struct Type * arrayType;
787 struct Expression * arraySizeExp;
788 unsigned int freeExp;
789 struct Symbol * enumClass;
790 } __attribute__ ((gcc_struct)) __anon4;
792 struct TemplateParameter * templateParameter;
793 } __attribute__ ((gcc_struct)) __anon1;
803 unsigned int isSigned : 1;
804 unsigned int constant : 1;
805 unsigned int truth : 1;
806 unsigned int byReference : 1;
807 unsigned int extraParam : 1;
808 unsigned int directClassAccess : 1;
809 unsigned int computing : 1;
810 unsigned int keepCast : 1;
811 unsigned int passAsTemplate : 1;
812 unsigned int dllExport : 1;
813 unsigned int attrStdcall : 1;
814 unsigned int declaredWithStruct : 1;
815 unsigned int typedByReference : 1;
816 unsigned int casted : 1;
817 } __attribute__ ((gcc_struct));
819 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
821 struct __ecereNameSpace__ecere__com__Class
823 struct __ecereNameSpace__ecere__com__Class * prev;
824 struct __ecereNameSpace__ecere__com__Class * next;
830 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
831 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
834 struct __ecereNameSpace__ecere__com__Class * base;
835 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
836 struct __ecereNameSpace__ecere__sys__BinaryTree members;
837 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
838 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
839 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
840 struct __ecereNameSpace__ecere__sys__OldList derivatives;
844 struct __ecereNameSpace__ecere__com__Instance * module;
845 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
846 const char * dataTypeString;
847 struct Type * dataType;
849 int defaultAlignment;
850 void (* Initialize)();
852 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
853 const char * designerClass;
854 unsigned int noExpansion;
855 const char * defaultProperty;
856 unsigned int comRedefinition;
859 unsigned int internalDecl;
861 unsigned int computeSize;
863 int destructionWatchOffset;
865 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
866 int inheritanceAccess;
867 const char * fullName;
869 struct __ecereNameSpace__ecere__sys__OldList conversions;
870 struct __ecereNameSpace__ecere__sys__OldList templateParams;
871 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
872 struct __ecereNameSpace__ecere__com__Class * templateClass;
873 struct __ecereNameSpace__ecere__sys__OldList templatized;
875 unsigned int isInstanceClass;
876 unsigned int byValueSystemClass;
877 } __attribute__ ((gcc_struct));
879 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
881 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
883 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
885 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
887 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
889 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);
891 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
893 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
895 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
897 struct __ecereNameSpace__ecere__com__Instance
900 struct __ecereNameSpace__ecere__com__Class * _class;
902 } __attribute__ ((gcc_struct));
904 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
906 struct __ecereNameSpace__ecere__com__DataMember
908 struct __ecereNameSpace__ecere__com__DataMember * prev;
909 struct __ecereNameSpace__ecere__com__DataMember * next;
911 unsigned int isProperty;
914 struct __ecereNameSpace__ecere__com__Class * _class;
915 const char * dataTypeString;
916 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
917 struct Type * dataType;
921 struct __ecereNameSpace__ecere__sys__OldList members;
922 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
925 } __attribute__ ((gcc_struct));
927 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
929 struct __ecereNameSpace__ecere__com__SerialBuffer
931 unsigned char * _buffer;
935 } __attribute__ ((gcc_struct));
937 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
939 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
945 const char * dataTypeString;
946 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
947 } __attribute__ ((gcc_struct)) __anon1;
948 struct __ecereNameSpace__ecere__com__DataValue expression;
951 const char * memberString;
954 struct __ecereNameSpace__ecere__com__DataMember * member;
955 struct __ecereNameSpace__ecere__com__Property * prop;
956 struct __ecereNameSpace__ecere__com__Method * method;
957 } __attribute__ ((gcc_struct)) __anon1;
958 } __attribute__ ((gcc_struct)) __anon2;
959 } __attribute__ ((gcc_struct)) __anon1;
960 } __attribute__ ((gcc_struct));
962 void exit(int status);
964 void * calloc(size_t nmemb, size_t size);
966 void free(void * ptr);
968 void * malloc(size_t size);
970 void * realloc(void * ptr, size_t size);
972 long int strtol(const char * nptr, char ** endptr, int base);
974 long long int strtoll(const char * nptr, char ** endptr, int base);
976 unsigned long long int strtoull(const char * nptr, char ** endptr, int base);
980 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
983 typedef union YYSTYPE
988 struct Identifier * id;
989 struct Expression * exp;
990 struct Specifier * specifier;
991 struct __ecereNameSpace__ecere__sys__OldList * list;
992 struct Enumerator * enumerator;
993 struct Declarator * declarator;
994 struct Pointer * pointer;
995 struct Initializer * initializer;
996 struct InitDeclarator * initDeclarator;
997 struct TypeName * typeName;
998 struct Declaration * declaration;
999 struct Statement * stmt;
1000 struct FunctionDefinition * function;
1001 struct External * external;
1002 struct Context * context;
1003 struct AsmField * asmField;
1004 struct Attrib * attrib;
1005 struct ExtDecl * extDecl;
1006 struct Attribute * attribute;
1007 struct Instantiation * instance;
1008 struct MembersInit * membersInit;
1009 struct MemberInit * memberInit;
1010 struct ClassFunction * classFunction;
1011 struct ClassDefinition * _class;
1012 struct ClassDef * classDef;
1013 struct PropertyDef * prop;
1015 struct Symbol * symbol;
1016 struct PropertyWatch * propertyWatch;
1017 struct TemplateParameter * templateParameter;
1018 struct TemplateArgument * templateArgument;
1019 struct TemplateDatatype * templateDatatype;
1020 struct DBTableEntry * dbtableEntry;
1021 struct DBIndexItem * dbindexItem;
1022 struct DBTableDef * dbtableDef;
1023 } __attribute__ ((gcc_struct)) YYSTYPE;
1025 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
1029 struct Enumerator * prev;
1030 struct Enumerator * next;
1031 struct Location loc;
1032 struct Identifier * id;
1033 struct Expression * exp;
1034 } __attribute__ ((gcc_struct));
1036 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
1038 struct InitDeclarator
1040 struct InitDeclarator * prev;
1041 struct InitDeclarator * next;
1042 struct Location loc;
1043 struct Declarator * declarator;
1044 struct Initializer * initializer;
1045 } __attribute__ ((gcc_struct));
1047 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
1051 struct AsmField * prev;
1052 struct AsmField * next;
1053 struct Location loc;
1055 struct Expression * expression;
1056 struct Identifier * symbolic;
1057 } __attribute__ ((gcc_struct));
1059 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
1063 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
1065 struct ClassFunction
1067 struct ClassFunction * prev;
1068 struct ClassFunction * next;
1069 struct Location loc;
1070 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1071 struct Declarator * declarator;
1072 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1073 struct Statement * body;
1074 struct __ecereNameSpace__ecere__com__Class * _class;
1075 struct __ecereNameSpace__ecere__sys__OldList attached;
1078 struct Symbol * propSet;
1079 unsigned int isVirtual;
1080 unsigned int isConstructor;
1081 unsigned int isDestructor;
1082 unsigned int dontMangle;
1085 } __attribute__ ((gcc_struct));
1087 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1091 struct MembersInit * prev;
1092 struct MembersInit * next;
1093 struct Location loc;
1097 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1098 struct ClassFunction * function;
1099 } __attribute__ ((gcc_struct)) __anon1;
1100 } __attribute__ ((gcc_struct));
1102 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1106 struct MemberInit * prev;
1107 struct MemberInit * next;
1108 struct Location loc;
1109 struct Location realLoc;
1110 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1111 struct Initializer * initializer;
1113 unsigned int variable;
1114 unsigned int takeOutExp;
1115 } __attribute__ ((gcc_struct));
1117 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1121 struct PropertyDef * prev;
1122 struct PropertyDef * next;
1123 struct Location loc;
1124 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1125 struct Declarator * declarator;
1126 struct Identifier * id;
1127 struct Statement * getStmt;
1128 struct Statement * setStmt;
1129 struct Statement * issetStmt;
1130 struct Symbol * symbol;
1131 struct Expression * category;
1134 unsigned int conversion : 1;
1135 unsigned int isWatchable : 1;
1136 unsigned int isDBProp : 1;
1137 } __attribute__ ((gcc_struct)) __anon1;
1138 } __attribute__ ((gcc_struct));
1140 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1142 struct PropertyWatch
1144 struct PropertyWatch * prev;
1145 struct PropertyWatch * next;
1146 struct Location loc;
1147 struct Statement * compound;
1148 struct __ecereNameSpace__ecere__sys__OldList * properties;
1149 unsigned int deleteWatch;
1150 } __attribute__ ((gcc_struct));
1152 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1156 struct ClassDef * prev;
1157 struct ClassDef * next;
1158 struct Location loc;
1162 struct Declaration * decl;
1163 struct ClassFunction * function;
1164 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1165 struct PropertyDef * propertyDef;
1166 struct PropertyWatch * propertyWatch;
1168 struct Identifier * defaultProperty;
1171 struct Identifier * id;
1172 struct Initializer * initializer;
1173 } __attribute__ ((gcc_struct)) __anon1;
1174 } __attribute__ ((gcc_struct)) __anon1;
1177 } __attribute__ ((gcc_struct));
1179 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1181 struct DBTableEntry;
1183 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1187 extern YYSTYPE yylval;
1189 extern struct Location yylloc;
1191 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
1193 extern int returnCode;
1195 extern struct Expression * parsedExpression;
1197 extern unsigned int yydebug;
1199 void SetYydebug(unsigned int b)
1204 extern unsigned int echoOn;
1206 void resetScanner();
1210 int expression_yyparse();
1212 static struct Statement * curCompound;
1214 struct External * curExternal, * afterExternal;
1216 static struct Type * curSwitchType;
1218 static struct __ecereNameSpace__ecere__com__Class * currentClass;
1220 struct __ecereNameSpace__ecere__com__Class * thisClass;
1222 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
1227 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
1232 static char * thisNameSpace;
1234 struct __ecereNameSpace__ecere__com__Class * containerClass;
1236 unsigned int thisClassParams = 0x1;
1238 unsigned int internalValueCounter;
1240 extern unsigned int outputLineNumbers;
1242 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
1244 extern size_t strlen(const char * );
1246 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
1248 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
1250 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
1252 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
1254 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
1256 void PrintExpression(struct Expression * exp, char * string)
1259 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
1261 unsigned int backOutputLineNumbers = outputLineNumbers;
1263 outputLineNumbers = 0x0;
1265 OutputExpression(exp, f);
1266 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
1267 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1269 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1270 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
1271 count = strlen(string);
1272 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
1273 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1275 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1276 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
1277 string[count] = '\0';
1278 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
1279 outputLineNumbers = backOutputLineNumbers;
1283 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
1285 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1287 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1289 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1291 if(!param->baseType)
1293 if(param->dataTypeString)
1294 param->baseType = ProcessTypeString(param->dataTypeString, 0x0);
1296 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1298 return param->baseType;
1300 return (((void *)0));
1303 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1305 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1307 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0x0)
1311 if(type1->kind == type2->kind)
1322 if(type1->passAsTemplate && !type2->passAsTemplate)
1324 return type1->isSigned != type2->isSigned;
1326 return type1->__anon1._class != type2->__anon1._class;
1328 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1336 extern int strcmp(const char * , const char * );
1338 extern struct Context * curContext;
1340 extern struct Context * topContext;
1342 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
1344 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);
1346 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
1348 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);
1350 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);
1352 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassProperty;
1354 struct __ecereNameSpace__ecere__com__ClassProperty
1357 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1358 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1359 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1361 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1362 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1363 const char * dataTypeString;
1364 struct Type * dataType;
1365 unsigned int constant;
1366 } __attribute__ ((gcc_struct));
1368 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1370 extern struct Expression * QMkExpId(const char * id);
1372 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateParameter;
1374 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
1376 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
1377 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
1382 const char * dataTypeString;
1384 } __attribute__ ((gcc_struct)) __anon1;
1385 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
1387 } __attribute__ ((gcc_struct));
1389 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
1391 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1393 extern void FreeIdentifier(struct Identifier * id);
1395 void ProcessExpressionType(struct Expression * exp);
1397 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1399 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
1401 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
1403 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1405 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1407 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
1409 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
1411 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
1413 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
1415 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
1417 struct Identifier * id = exp->__anon1.__anon1.identifier;
1418 struct Context * ctx;
1419 struct Symbol * symbol = (((void *)0));
1421 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
1423 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
1425 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
1430 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))))
1432 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
1433 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
1434 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
1435 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
1439 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
1441 if(!prop && !method)
1442 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
1443 if(!prop && !method && !member)
1445 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
1447 if(prop || method || member || classProp)
1450 exp->__anon1.member.member = id;
1451 exp->__anon1.member.memberType = 0;
1452 exp->__anon1.member.exp = QMkExpId("this");
1453 exp->addedThis = 0x1;
1455 else if(_class && _class->templateParams.first)
1457 struct __ecereNameSpace__ecere__com__Class * sClass;
1459 for(sClass = _class; sClass; sClass = sClass->base)
1461 if(sClass->templateParams.first)
1463 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
1465 for(param = sClass->templateParams.first; param; param = param->next)
1467 if(param->type == 2 && !strcmp(param->name, id->string))
1469 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
1473 struct Declarator * decl;
1474 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1476 FreeIdentifier(exp->__anon1.member.member);
1477 ProcessExpressionType(argExp);
1478 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
1479 exp->expType = ProcessType(specs, decl);
1481 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
1492 extern int sprintf(char * , const char * , ...);
1494 extern int __ecereNameSpace__ecere__com__GetRuntimePlatform(void);
1496 extern char * strcat(char * , const char * );
1498 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
1500 char * PrintInt(long long result)
1504 if(result > (((int)0x7fffffff)))
1505 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1507 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64d" : "%lld"), result);
1508 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
1510 return __ecereNameSpace__ecere__sys__CopyString(temp);
1513 char * PrintUInt(uint64 result)
1517 if(result > (0xffffffff))
1518 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1519 else if(result > (((int)0x7fffffff)))
1520 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1522 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64d" : "%lld"), result);
1523 return __ecereNameSpace__ecere__sys__CopyString(temp);
1526 char * PrintInt64(long long result)
1530 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64dLL" : "%lldLL"), result);
1531 return __ecereNameSpace__ecere__sys__CopyString(temp);
1534 char * PrintUInt64(uint64 result)
1538 if(result > (((long long)0x7fffffffffffffffLL)))
1539 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1541 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "%I64dLL" : "%lldLL"), result);
1542 return __ecereNameSpace__ecere__sys__CopyString(temp);
1545 char * PrintHexUInt(uint64 result)
1549 if(result > (0xffffffff))
1550 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1552 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1553 if(result > (0xffffffff))
1555 return __ecereNameSpace__ecere__sys__CopyString(temp);
1558 char * PrintHexUInt64(uint64 result)
1562 if(result > (0xffffffff))
1563 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1565 sprintf(temp, ((__ecereNameSpace__ecere__com__GetRuntimePlatform() == 1) ? "0x%I64X" : "0x%llX"), result);
1566 return __ecereNameSpace__ecere__sys__CopyString(temp);
1569 char * PrintShort(short result)
1573 sprintf(temp, "%d", (unsigned short)result);
1574 return __ecereNameSpace__ecere__sys__CopyString(temp);
1577 char * PrintUShort(unsigned short result)
1581 if(result > (unsigned short)32767)
1582 sprintf(temp, "0x%X", (int)result);
1584 sprintf(temp, "%d", (int)result);
1585 return __ecereNameSpace__ecere__sys__CopyString(temp);
1588 extern int isprint(int c);
1590 char * PrintChar(char result)
1594 if(result > (char)0 && isprint(result))
1595 sprintf(temp, "'%c'", result);
1596 else if(result < (char)0)
1597 sprintf(temp, "%d", (int)result);
1599 sprintf(temp, "0x%X", (unsigned char)result);
1600 return __ecereNameSpace__ecere__sys__CopyString(temp);
1603 char * PrintUChar(unsigned char result)
1607 sprintf(temp, "0x%X", result);
1608 return __ecereNameSpace__ecere__sys__CopyString(temp);
1611 extern char * strcpy(char * , const char * );
1613 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
1615 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_isInf;
1617 extern int (* __ecereProp_float_Get_signBit)(float this);
1619 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_signBit;
1621 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
1623 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_isNan;
1625 char * PrintFloat(float result)
1629 if(__ecereProp_float_Get_isInf(result))
1631 if(__ecereProp_float_Get_signBit(result))
1632 strcpy(temp, "-inf");
1634 strcpy(temp, "inf");
1636 else if(__ecereProp_float_Get_isNan(result))
1638 if(__ecereProp_float_Get_signBit(result))
1639 strcpy(temp, "-nan");
1641 strcpy(temp, "nan");
1644 sprintf(temp, "%.16ff", result);
1645 return __ecereNameSpace__ecere__sys__CopyString(temp);
1648 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
1650 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_isInf;
1652 extern int (* __ecereProp_double_Get_signBit)(double this);
1654 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_signBit;
1656 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
1658 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_isNan;
1660 char * PrintDouble(double result)
1664 if(__ecereProp_double_Get_isInf(result))
1666 if(__ecereProp_double_Get_signBit(result))
1667 strcpy(temp, "-inf");
1669 strcpy(temp, "inf");
1671 else if(__ecereProp_double_Get_isNan(result))
1673 if(__ecereProp_double_Get_signBit(result))
1674 strcpy(temp, "-nan");
1676 strcpy(temp, "nan");
1679 sprintf(temp, "%.16f", result);
1680 return __ecereNameSpace__ecere__sys__CopyString(temp);
1683 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_OpTable;
1687 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1688 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1689 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1690 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1691 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1692 unsigned int (* Neg)(struct Expression *, struct Operand *);
1693 unsigned int (* Inc)(struct Expression *, struct Operand *);
1694 unsigned int (* Dec)(struct Expression *, struct Operand *);
1695 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1696 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1697 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1698 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1699 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1700 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1701 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1702 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1703 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1704 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1705 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1706 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1707 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1708 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1709 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1710 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1711 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1712 unsigned int (* Not)(struct Expression *, struct Operand *);
1713 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1714 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1715 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1716 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1717 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1718 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1719 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1720 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1721 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1722 } __attribute__ ((gcc_struct));
1724 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Operand;
1730 unsigned int ptrSize;
1743 } __attribute__ ((gcc_struct)) __anon1;
1745 } __attribute__ ((gcc_struct));
1747 unsigned int GetOpInt(struct Operand * op2, int * value2)
1749 if(op2->kind == 3 && op2->type->isSigned)
1750 *value2 = op2->__anon1.i;
1751 else if(op2->kind == 3)
1752 *value2 = (int)op2->__anon1.ui;
1753 else if(op2->kind == 4 && op2->type->isSigned)
1754 *value2 = (int)op2->__anon1.i64;
1755 else if(op2->kind == 4)
1756 *value2 = (int)op2->__anon1.ui64;
1757 else if(op2->kind == 23 && op2->type->isSigned)
1758 *value2 = (int)op2->__anon1.i64;
1759 else if(op2->kind == 23)
1760 *value2 = (int)op2->__anon1.ui64;
1761 else if(op2->kind == 22 && op2->type->isSigned)
1762 *value2 = (int)op2->__anon1.i64;
1763 else if(op2->kind == 22)
1764 *value2 = (int)op2->__anon1.ui64;
1765 else if(op2->kind == 2 && op2->type->isSigned)
1766 *value2 = (int)op2->__anon1.s;
1767 else if(op2->kind == 2)
1768 *value2 = (int)op2->__anon1.us;
1769 else if(op2->kind == 1 && op2->type->isSigned)
1770 *value2 = (int)op2->__anon1.c;
1771 else if(op2->kind == 24 || op2->kind == 1)
1772 *value2 = (int)op2->__anon1.uc;
1773 else if(op2->kind == 6)
1774 *value2 = (int)op2->__anon1.f;
1775 else if(op2->kind == 7)
1776 *value2 = (int)op2->__anon1.d;
1777 else if(op2->kind == 13)
1778 *value2 = (int)op2->__anon1.ui64;
1784 struct Operand GetOperand(struct Expression * exp);
1786 unsigned int GetInt(struct Expression * exp, int * value2)
1788 struct Operand op2 = GetOperand(exp);
1790 return GetOpInt(&op2, value2);
1793 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1795 if(op2->kind == 3 && op2->type->isSigned)
1796 *value2 = (unsigned int)op2->__anon1.i;
1797 else if(op2->kind == 3)
1798 *value2 = op2->__anon1.ui;
1799 else if(op2->kind == 4 && op2->type->isSigned)
1800 *value2 = (unsigned int)op2->__anon1.i64;
1801 else if(op2->kind == 4)
1802 *value2 = (unsigned int)op2->__anon1.ui64;
1803 else if(op2->kind == 23 && op2->type->isSigned)
1804 *value2 = (unsigned int)op2->__anon1.i64;
1805 else if(op2->kind == 23)
1806 *value2 = (unsigned int)op2->__anon1.ui64;
1807 else if(op2->kind == 22 && op2->type->isSigned)
1808 *value2 = (unsigned int)op2->__anon1.i64;
1809 else if(op2->kind == 22)
1810 *value2 = (unsigned int)op2->__anon1.ui64;
1811 else if(op2->kind == 2 && op2->type->isSigned)
1812 *value2 = (unsigned int)op2->__anon1.s;
1813 else if(op2->kind == 2)
1814 *value2 = (unsigned int)op2->__anon1.us;
1815 else if(op2->kind == 1 && op2->type->isSigned)
1816 *value2 = (unsigned int)op2->__anon1.c;
1817 else if(op2->kind == 24 || op2->kind == 1)
1818 *value2 = (unsigned int)op2->__anon1.uc;
1819 else if(op2->kind == 6)
1820 *value2 = (unsigned int)op2->__anon1.f;
1821 else if(op2->kind == 7)
1822 *value2 = (unsigned int)op2->__anon1.d;
1823 else if(op2->kind == 13)
1824 *value2 = (unsigned int)op2->__anon1.ui64;
1830 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
1832 struct Operand op2 = GetOperand(exp);
1834 return GetOpUInt(&op2, value2);
1837 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
1839 if(op2->kind == 3 && op2->type->isSigned)
1840 *value2 = (long long)op2->__anon1.i;
1841 else if(op2->kind == 3)
1842 *value2 = (long long)op2->__anon1.ui;
1843 else if(op2->kind == 4 && op2->type->isSigned)
1844 *value2 = op2->__anon1.i64;
1845 else if(op2->kind == 4)
1846 *value2 = (long long)op2->__anon1.ui64;
1847 else if(op2->kind == 23 && op2->type->isSigned)
1848 *value2 = op2->__anon1.i64;
1849 else if(op2->kind == 23)
1850 *value2 = (long long)op2->__anon1.ui64;
1851 else if(op2->kind == 22 && op2->type->isSigned)
1852 *value2 = op2->__anon1.i64;
1853 else if(op2->kind == 22)
1854 *value2 = (long long)op2->__anon1.ui64;
1855 else if(op2->kind == 2 && op2->type->isSigned)
1856 *value2 = (long long)op2->__anon1.s;
1857 else if(op2->kind == 2)
1858 *value2 = (long long)op2->__anon1.us;
1859 else if(op2->kind == 1 && op2->type->isSigned)
1860 *value2 = (long long)op2->__anon1.c;
1861 else if(op2->kind == 24 || op2->kind == 1)
1862 *value2 = (long long)op2->__anon1.uc;
1863 else if(op2->kind == 6)
1864 *value2 = (long long)op2->__anon1.f;
1865 else if(op2->kind == 7)
1866 *value2 = (long long)op2->__anon1.d;
1867 else if(op2->kind == 13)
1868 *value2 = (long long)op2->__anon1.ui64;
1874 unsigned int GetInt64(struct Expression * exp, long long * value2)
1876 struct Operand op2 = GetOperand(exp);
1878 return GetOpInt64(&op2, value2);
1881 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
1883 if(op2->kind == 3 && op2->type->isSigned)
1884 *value2 = (uint64)op2->__anon1.i;
1885 else if(op2->kind == 3)
1886 *value2 = (uint64)op2->__anon1.ui;
1887 else if(op2->kind == 4 && op2->type->isSigned)
1888 *value2 = (uint64)op2->__anon1.i64;
1889 else if(op2->kind == 4)
1890 *value2 = op2->__anon1.ui64;
1891 else if(op2->kind == 23 && op2->type->isSigned)
1892 *value2 = (uint64)op2->__anon1.i64;
1893 else if(op2->kind == 23)
1894 *value2 = op2->__anon1.ui64;
1895 else if(op2->kind == 22 && op2->type->isSigned)
1896 *value2 = (uint64)op2->__anon1.i64;
1897 else if(op2->kind == 22)
1898 *value2 = op2->__anon1.ui64;
1899 else if(op2->kind == 2 && op2->type->isSigned)
1900 *value2 = (uint64)op2->__anon1.s;
1901 else if(op2->kind == 2)
1902 *value2 = (uint64)op2->__anon1.us;
1903 else if(op2->kind == 1 && op2->type->isSigned)
1904 *value2 = (uint64)op2->__anon1.c;
1905 else if(op2->kind == 24 || op2->kind == 1)
1906 *value2 = (uint64)op2->__anon1.uc;
1907 else if(op2->kind == 6)
1908 *value2 = (uint64)op2->__anon1.f;
1909 else if(op2->kind == 7)
1910 *value2 = (uint64)op2->__anon1.d;
1911 else if(op2->kind == 13)
1912 *value2 = op2->__anon1.ui64;
1918 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
1920 struct Operand op2 = GetOperand(exp);
1922 return GetOpUInt64(&op2, value2);
1925 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
1927 if(op2->kind == 3 && op2->type->isSigned)
1928 *value2 = (intptr_t)op2->__anon1.i;
1929 else if(op2->kind == 3)
1930 *value2 = (intptr_t)op2->__anon1.ui;
1931 else if(op2->kind == 4 && op2->type->isSigned)
1932 *value2 = (intptr_t)op2->__anon1.i64;
1933 else if(op2->kind == 4)
1934 *value2 = (intptr_t)op2->__anon1.ui64;
1935 else if(op2->kind == 23 && op2->type->isSigned)
1936 *value2 = (intptr_t)op2->__anon1.i64;
1937 else if(op2->kind == 23)
1938 *value2 = (intptr_t)op2->__anon1.ui64;
1939 else if(op2->kind == 22 && op2->type->isSigned)
1940 *value2 = (intptr_t)op2->__anon1.i64;
1941 else if(op2->kind == 22)
1942 *value2 = (intptr_t)op2->__anon1.ui64;
1943 else if(op2->kind == 2 && op2->type->isSigned)
1944 *value2 = (intptr_t)op2->__anon1.s;
1945 else if(op2->kind == 2)
1946 *value2 = (intptr_t)op2->__anon1.us;
1947 else if(op2->kind == 1 && op2->type->isSigned)
1948 *value2 = (intptr_t)op2->__anon1.c;
1949 else if(op2->kind == 24 || op2->kind == 1)
1950 *value2 = (intptr_t)op2->__anon1.uc;
1951 else if(op2->kind == 6)
1952 *value2 = (intptr_t)op2->__anon1.f;
1953 else if(op2->kind == 7)
1954 *value2 = (intptr_t)op2->__anon1.d;
1955 else if(op2->kind == 13)
1956 *value2 = (intptr_t)op2->__anon1.ui64;
1962 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
1964 struct Operand op2 = GetOperand(exp);
1966 return GetOpIntPtr(&op2, value2);
1969 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
1971 if(op2->kind == 3 && op2->type->isSigned)
1972 *value2 = (uintptr_t)op2->__anon1.i;
1973 else if(op2->kind == 3)
1974 *value2 = (uintptr_t)op2->__anon1.ui;
1975 else if(op2->kind == 4 && op2->type->isSigned)
1976 *value2 = (uintptr_t)op2->__anon1.i64;
1977 else if(op2->kind == 4)
1978 *value2 = (uintptr_t)op2->__anon1.ui64;
1979 else if(op2->kind == 23 && op2->type->isSigned)
1980 *value2 = (uintptr_t)op2->__anon1.i64;
1981 else if(op2->kind == 23)
1982 *value2 = (uintptr_t)op2->__anon1.ui64;
1983 else if(op2->kind == 22 && op2->type->isSigned)
1984 *value2 = (uintptr_t)op2->__anon1.i64;
1985 else if(op2->kind == 22)
1986 *value2 = (uintptr_t)op2->__anon1.ui64;
1987 else if(op2->kind == 2 && op2->type->isSigned)
1988 *value2 = (uintptr_t)op2->__anon1.s;
1989 else if(op2->kind == 2)
1990 *value2 = (uintptr_t)op2->__anon1.us;
1991 else if(op2->kind == 1 && op2->type->isSigned)
1992 *value2 = (uintptr_t)op2->__anon1.c;
1993 else if(op2->kind == 24 || op2->kind == 1)
1994 *value2 = (uintptr_t)op2->__anon1.uc;
1995 else if(op2->kind == 6)
1996 *value2 = (uintptr_t)op2->__anon1.f;
1997 else if(op2->kind == 7)
1998 *value2 = (uintptr_t)op2->__anon1.d;
1999 else if(op2->kind == 13)
2000 *value2 = (uintptr_t)op2->__anon1.ui64;
2006 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
2008 struct Operand op2 = GetOperand(exp);
2010 return GetOpUIntPtr(&op2, value2);
2013 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2015 if(op2->kind == 3 && op2->type->isSigned)
2016 *value2 = (ssize_t)op2->__anon1.i;
2017 else if(op2->kind == 3)
2018 *value2 = (ssize_t)op2->__anon1.ui;
2019 else if(op2->kind == 4 && op2->type->isSigned)
2020 *value2 = (ssize_t)op2->__anon1.i64;
2021 else if(op2->kind == 4)
2022 *value2 = (ssize_t)op2->__anon1.ui64;
2023 else if(op2->kind == 23 && op2->type->isSigned)
2024 *value2 = (ssize_t)op2->__anon1.i64;
2025 else if(op2->kind == 23)
2026 *value2 = (ssize_t)op2->__anon1.ui64;
2027 else if(op2->kind == 22 && op2->type->isSigned)
2028 *value2 = (ssize_t)op2->__anon1.i64;
2029 else if(op2->kind == 22)
2030 *value2 = (ssize_t)op2->__anon1.ui64;
2031 else if(op2->kind == 2 && op2->type->isSigned)
2032 *value2 = (ssize_t)op2->__anon1.s;
2033 else if(op2->kind == 2)
2034 *value2 = (ssize_t)op2->__anon1.us;
2035 else if(op2->kind == 1 && op2->type->isSigned)
2036 *value2 = (ssize_t)op2->__anon1.c;
2037 else if(op2->kind == 24 || op2->kind == 1)
2038 *value2 = (ssize_t)op2->__anon1.uc;
2039 else if(op2->kind == 6)
2040 *value2 = (ssize_t)op2->__anon1.f;
2041 else if(op2->kind == 7)
2042 *value2 = (ssize_t)op2->__anon1.d;
2043 else if(op2->kind == 13)
2044 *value2 = (ssize_t)op2->__anon1.ui64;
2050 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
2052 struct Operand op2 = GetOperand(exp);
2054 return GetOpIntSize(&op2, value2);
2057 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2059 if(op2->kind == 3 && op2->type->isSigned)
2060 *value2 = (size_t)op2->__anon1.i;
2061 else if(op2->kind == 3)
2062 *value2 = (size_t)op2->__anon1.ui;
2063 else if(op2->kind == 4 && op2->type->isSigned)
2064 *value2 = (size_t)op2->__anon1.i64;
2065 else if(op2->kind == 4)
2066 *value2 = (size_t)op2->__anon1.ui64;
2067 else if(op2->kind == 23 && op2->type->isSigned)
2068 *value2 = (size_t)op2->__anon1.i64;
2069 else if(op2->kind == 23)
2070 *value2 = (size_t)op2->__anon1.ui64;
2071 else if(op2->kind == 22 && op2->type->isSigned)
2072 *value2 = (size_t)op2->__anon1.i64;
2073 else if(op2->kind == 22)
2074 *value2 = (size_t)op2->__anon1.ui64;
2075 else if(op2->kind == 2 && op2->type->isSigned)
2076 *value2 = (size_t)op2->__anon1.s;
2077 else if(op2->kind == 2)
2078 *value2 = (size_t)op2->__anon1.us;
2079 else if(op2->kind == 1 && op2->type->isSigned)
2080 *value2 = (size_t)op2->__anon1.c;
2081 else if(op2->kind == 24 || op2->kind == 1)
2082 *value2 = (size_t)op2->__anon1.uc;
2083 else if(op2->kind == 6)
2084 *value2 = (size_t)op2->__anon1.f;
2085 else if(op2->kind == 7)
2086 *value2 = (size_t)op2->__anon1.d;
2087 else if(op2->kind == 13)
2088 *value2 = (size_t)op2->__anon1.ui64;
2094 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
2096 struct Operand op2 = GetOperand(exp);
2098 return GetOpUIntSize(&op2, value2);
2101 unsigned int GetOpShort(struct Operand * op2, short * value2)
2103 if(op2->kind == 3 && op2->type->isSigned)
2104 *value2 = (short)op2->__anon1.i;
2105 else if(op2->kind == 3)
2106 *value2 = (short)op2->__anon1.ui;
2107 else if(op2->kind == 4 && op2->type->isSigned)
2108 *value2 = (short)op2->__anon1.i64;
2109 else if(op2->kind == 4)
2110 *value2 = (short)op2->__anon1.ui64;
2111 else if(op2->kind == 23 && op2->type->isSigned)
2112 *value2 = (short)op2->__anon1.i64;
2113 else if(op2->kind == 23)
2114 *value2 = (short)op2->__anon1.ui64;
2115 else if(op2->kind == 22 && op2->type->isSigned)
2116 *value2 = (short)op2->__anon1.i64;
2117 else if(op2->kind == 22)
2118 *value2 = (short)op2->__anon1.ui64;
2119 else if(op2->kind == 2 && op2->type->isSigned)
2120 *value2 = op2->__anon1.s;
2121 else if(op2->kind == 2)
2122 *value2 = (short)op2->__anon1.us;
2123 else if(op2->kind == 1 && op2->type->isSigned)
2124 *value2 = (short)op2->__anon1.c;
2125 else if(op2->kind == 24 || op2->kind == 1)
2126 *value2 = (short)op2->__anon1.uc;
2127 else if(op2->kind == 6)
2128 *value2 = (short)op2->__anon1.f;
2129 else if(op2->kind == 7)
2130 *value2 = (short)op2->__anon1.d;
2131 else if(op2->kind == 13)
2132 *value2 = (short)op2->__anon1.ui64;
2138 unsigned int GetShort(struct Expression * exp, short * value2)
2140 struct Operand op2 = GetOperand(exp);
2142 return GetOpShort(&op2, value2);
2145 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2147 if(op2->kind == 3 && op2->type->isSigned)
2148 *value2 = (unsigned short)op2->__anon1.i;
2149 else if(op2->kind == 3)
2150 *value2 = (unsigned short)op2->__anon1.ui;
2151 else if(op2->kind == 4 && op2->type->isSigned)
2152 *value2 = (unsigned short)op2->__anon1.i64;
2153 else if(op2->kind == 4)
2154 *value2 = (unsigned short)op2->__anon1.ui64;
2155 else if(op2->kind == 23 && op2->type->isSigned)
2156 *value2 = (unsigned short)op2->__anon1.i64;
2157 else if(op2->kind == 23)
2158 *value2 = (unsigned short)op2->__anon1.ui64;
2159 else if(op2->kind == 22 && op2->type->isSigned)
2160 *value2 = (unsigned short)op2->__anon1.i64;
2161 else if(op2->kind == 22)
2162 *value2 = (unsigned short)op2->__anon1.ui64;
2163 else if(op2->kind == 2 && op2->type->isSigned)
2164 *value2 = (unsigned short)op2->__anon1.s;
2165 else if(op2->kind == 2)
2166 *value2 = op2->__anon1.us;
2167 else if(op2->kind == 1 && op2->type->isSigned)
2168 *value2 = (unsigned short)op2->__anon1.c;
2169 else if(op2->kind == 24 || op2->kind == 1)
2170 *value2 = (unsigned short)op2->__anon1.uc;
2171 else if(op2->kind == 6)
2172 *value2 = (unsigned short)op2->__anon1.f;
2173 else if(op2->kind == 7)
2174 *value2 = (unsigned short)op2->__anon1.d;
2175 else if(op2->kind == 13)
2176 *value2 = (unsigned short)op2->__anon1.ui64;
2182 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
2184 struct Operand op2 = GetOperand(exp);
2186 return GetOpUShort(&op2, value2);
2189 unsigned int GetOpChar(struct Operand * op2, char * value2)
2191 if(op2->kind == 3 && op2->type->isSigned)
2192 *value2 = (char)op2->__anon1.i;
2193 else if(op2->kind == 3)
2194 *value2 = (char)op2->__anon1.ui;
2195 else if(op2->kind == 4 && op2->type->isSigned)
2196 *value2 = (char)op2->__anon1.i64;
2197 else if(op2->kind == 4)
2198 *value2 = (char)op2->__anon1.ui64;
2199 else if(op2->kind == 23 && op2->type->isSigned)
2200 *value2 = (char)op2->__anon1.i64;
2201 else if(op2->kind == 23)
2202 *value2 = (char)op2->__anon1.ui64;
2203 else if(op2->kind == 22 && op2->type->isSigned)
2204 *value2 = (char)op2->__anon1.i64;
2205 else if(op2->kind == 22)
2206 *value2 = (char)op2->__anon1.ui64;
2207 else if(op2->kind == 2 && op2->type->isSigned)
2208 *value2 = (char)op2->__anon1.s;
2209 else if(op2->kind == 2)
2210 *value2 = (char)op2->__anon1.us;
2211 else if(op2->kind == 1 && op2->type->isSigned)
2212 *value2 = op2->__anon1.c;
2213 else if(op2->kind == 24 || op2->kind == 1)
2214 *value2 = (char)op2->__anon1.uc;
2215 else if(op2->kind == 6)
2216 *value2 = (char)op2->__anon1.f;
2217 else if(op2->kind == 7)
2218 *value2 = (char)op2->__anon1.d;
2219 else if(op2->kind == 13)
2220 *value2 = (char)op2->__anon1.ui64;
2226 unsigned int GetChar(struct Expression * exp, char * value2)
2228 struct Operand op2 = GetOperand(exp);
2230 return GetOpChar(&op2, value2);
2233 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2235 if(op2->kind == 3 && op2->type->isSigned)
2236 *value2 = (unsigned char)op2->__anon1.i;
2237 else if(op2->kind == 3)
2238 *value2 = (unsigned char)op2->__anon1.ui;
2239 else if(op2->kind == 4 && op2->type->isSigned)
2240 *value2 = (unsigned char)op2->__anon1.i64;
2241 else if(op2->kind == 4)
2242 *value2 = (unsigned char)op2->__anon1.ui64;
2243 else if(op2->kind == 23 && op2->type->isSigned)
2244 *value2 = (unsigned char)op2->__anon1.i64;
2245 else if(op2->kind == 23)
2246 *value2 = (unsigned char)op2->__anon1.ui64;
2247 else if(op2->kind == 22 && op2->type->isSigned)
2248 *value2 = (unsigned char)op2->__anon1.i64;
2249 else if(op2->kind == 22)
2250 *value2 = (unsigned char)op2->__anon1.ui64;
2251 else if(op2->kind == 2 && op2->type->isSigned)
2252 *value2 = (unsigned char)op2->__anon1.s;
2253 else if(op2->kind == 2)
2254 *value2 = (unsigned char)op2->__anon1.us;
2255 else if(op2->kind == 1 && op2->type->isSigned)
2256 *value2 = (unsigned char)op2->__anon1.c;
2257 else if(op2->kind == 24 || op2->kind == 1)
2258 *value2 = op2->__anon1.uc;
2259 else if(op2->kind == 6)
2260 *value2 = (unsigned char)op2->__anon1.f;
2261 else if(op2->kind == 7)
2262 *value2 = (unsigned char)op2->__anon1.d;
2263 else if(op2->kind == 13)
2264 *value2 = (unsigned char)op2->__anon1.ui64;
2270 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
2272 struct Operand op2 = GetOperand(exp);
2274 return GetOpUChar(&op2, value2);
2277 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2279 if(op2->kind == 3 && op2->type->isSigned)
2280 *value2 = (float)(float)op2->__anon1.i;
2281 else if(op2->kind == 3)
2282 *value2 = (float)(float)op2->__anon1.ui;
2283 else if(op2->kind == 4 && op2->type->isSigned)
2284 *value2 = (float)(float)op2->__anon1.i64;
2285 else if(op2->kind == 4)
2286 *value2 = (float)(float)op2->__anon1.ui64;
2287 else if(op2->kind == 23 && op2->type->isSigned)
2288 *value2 = (float)(float)op2->__anon1.i64;
2289 else if(op2->kind == 23)
2290 *value2 = (float)(float)op2->__anon1.ui64;
2291 else if(op2->kind == 22 && op2->type->isSigned)
2292 *value2 = (float)(float)op2->__anon1.i64;
2293 else if(op2->kind == 22)
2294 *value2 = (float)(float)op2->__anon1.ui64;
2295 else if(op2->kind == 2 && op2->type->isSigned)
2296 *value2 = (float)(float)op2->__anon1.s;
2297 else if(op2->kind == 2)
2298 *value2 = (float)(float)op2->__anon1.us;
2299 else if(op2->kind == 1 && op2->type->isSigned)
2300 *value2 = (float)(float)op2->__anon1.c;
2301 else if(op2->kind == 24 || op2->kind == 1)
2302 *value2 = (float)(float)op2->__anon1.uc;
2303 else if(op2->kind == 6)
2304 *value2 = (float)op2->__anon1.f;
2305 else if(op2->kind == 7)
2306 *value2 = (float)op2->__anon1.d;
2307 else if(op2->kind == 13)
2308 *value2 = (float)(float)op2->__anon1.ui64;
2314 unsigned int GetFloat(struct Expression * exp, float * value2)
2316 struct Operand op2 = GetOperand(exp);
2318 return GetOpFloat(&op2, value2);
2321 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2323 if(op2->kind == 3 && op2->type->isSigned)
2324 *value2 = (double)(double)op2->__anon1.i;
2325 else if(op2->kind == 3)
2326 *value2 = (double)(double)op2->__anon1.ui;
2327 else if(op2->kind == 4 && op2->type->isSigned)
2328 *value2 = (double)(double)op2->__anon1.i64;
2329 else if(op2->kind == 4)
2330 *value2 = (double)(double)op2->__anon1.ui64;
2331 else if(op2->kind == 23 && op2->type->isSigned)
2332 *value2 = (double)(double)op2->__anon1.i64;
2333 else if(op2->kind == 23)
2334 *value2 = (double)(double)op2->__anon1.ui64;
2335 else if(op2->kind == 22 && op2->type->isSigned)
2336 *value2 = (double)(double)op2->__anon1.i64;
2337 else if(op2->kind == 22)
2338 *value2 = (double)(double)op2->__anon1.ui64;
2339 else if(op2->kind == 2 && op2->type->isSigned)
2340 *value2 = (double)(double)op2->__anon1.s;
2341 else if(op2->kind == 2)
2342 *value2 = (double)(double)op2->__anon1.us;
2343 else if(op2->kind == 1 && op2->type->isSigned)
2344 *value2 = (double)(double)op2->__anon1.c;
2345 else if(op2->kind == 24 || op2->kind == 1)
2346 *value2 = (double)(double)op2->__anon1.uc;
2347 else if(op2->kind == 6)
2348 *value2 = (double)op2->__anon1.f;
2349 else if(op2->kind == 7)
2350 *value2 = (double)op2->__anon1.d;
2351 else if(op2->kind == 13)
2352 *value2 = (double)(double)op2->__anon1.ui64;
2358 unsigned int GetDouble(struct Expression * exp, double * value2)
2360 struct Operand op2 = GetOperand(exp);
2362 return GetOpDouble(&op2, value2);
2365 void ComputeExpression(struct Expression * exp);
2367 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class);
2369 extern int targetBits;
2371 int ComputeTypeSize(struct Type * type);
2373 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
2375 struct __ecereNameSpace__ecere__com__BitMember
2377 struct __ecereNameSpace__ecere__com__BitMember * prev;
2378 struct __ecereNameSpace__ecere__com__BitMember * next;
2380 unsigned int isProperty;
2383 struct __ecereNameSpace__ecere__com__Class * _class;
2384 const char * dataTypeString;
2385 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
2386 struct Type * dataType;
2391 } __attribute__ ((gcc_struct));
2393 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldLink;
2395 struct __ecereNameSpace__ecere__sys__OldLink
2397 struct __ecereNameSpace__ecere__sys__OldLink * prev;
2398 struct __ecereNameSpace__ecere__sys__OldLink * next;
2400 } __attribute__ ((gcc_struct));
2402 void FinishTemplatesContext(struct Context * context);
2404 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
2406 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2407 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2409 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))
2411 int unionMemberOffset = 0;
2416 member->memberOffset = 0;
2417 if(targetBits < sizeof(void *) * 8)
2418 member->structAlignment = 0;
2420 else if(targetBits < sizeof(void *) * 8)
2421 _class->structAlignment = 0;
2422 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
2423 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
2424 if(!member && _class->destructionWatchOffset)
2425 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2427 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2429 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2431 if(!dataMember->isProperty)
2433 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
2435 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
2441 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2443 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2445 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
2447 if(!isMember && _class->type == 2 && dataMember->dataType)
2449 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
2453 ComputeTypeSize(dataMember->dataType);
2454 if(bitMember->pos == -1)
2455 bitMember->pos = _class->memberOffset;
2456 if(!bitMember->size)
2457 bitMember->size = dataMember->dataType->size * 8;
2458 _class->memberOffset = bitMember->pos + bitMember->size;
2459 for(d = 0; d < bitMember->size; d++)
2465 bitMember->mask = mask << bitMember->pos;
2467 else if(dataMember->type == 0 && dataMember->dataType)
2472 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)))
2473 ComputeTypeSize(dataMember->dataType);
2474 if(dataMember->dataType->bitFieldCount)
2476 bitFields += dataMember->dataType->bitFieldCount;
2483 int size = (bitFields + 7) / 8;
2487 int __simpleStruct0;
2491 int __simpleStruct0;
2493 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2494 if(member->memberOffset % alignment)
2495 member->memberOffset += alignment - (member->memberOffset % alignment);
2497 dataMember->offset = member->memberOffset;
2498 if(member->type == 1)
2499 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2502 member->memberOffset += size;
2509 int __simpleStruct0;
2511 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2512 if(_class->memberOffset % alignment)
2513 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2515 dataMember->offset = _class->memberOffset;
2516 _class->memberOffset += size;
2520 size = dataMember->dataType->size;
2521 alignment = dataMember->dataType->alignment;
2525 int __simpleStruct0;
2529 int __simpleStruct0;
2531 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2532 if(member->memberOffset % alignment)
2533 member->memberOffset += alignment - (member->memberOffset % alignment);
2535 dataMember->offset = member->memberOffset;
2536 if(member->type == 1)
2537 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2540 member->memberOffset += size;
2547 int __simpleStruct0;
2549 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2550 if(_class->memberOffset % alignment)
2551 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2553 dataMember->offset = _class->memberOffset;
2554 _class->memberOffset += size;
2561 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 0x1);
2562 alignment = dataMember->structAlignment;
2565 int __simpleStruct0;
2569 int __simpleStruct0;
2571 if(member->memberOffset % alignment)
2572 member->memberOffset += alignment - (member->memberOffset % alignment);
2573 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2575 dataMember->offset = member->memberOffset;
2576 if(member->type == 1)
2577 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2579 member->memberOffset += dataMember->memberOffset;
2585 int __simpleStruct0;
2587 if(_class->memberOffset % alignment)
2588 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2589 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2591 dataMember->offset = _class->memberOffset;
2592 _class->memberOffset += dataMember->memberOffset;
2600 int size = (bitFields + 7) / 8;
2604 int __simpleStruct0;
2608 int __simpleStruct0;
2610 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2611 if(member->memberOffset % alignment)
2612 member->memberOffset += alignment - (member->memberOffset % alignment);
2614 if(member->type == 1)
2615 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2618 member->memberOffset += size;
2625 int __simpleStruct0;
2627 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2628 if(_class->memberOffset % alignment)
2629 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2631 _class->memberOffset += size;
2636 if(member && member->type == 1)
2638 member->memberOffset = unionMemberOffset;
2642 if(_class->type != 2)
2646 if(_class->structAlignment)
2648 if(_class->memberOffset % _class->structAlignment)
2649 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
2651 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
2654 struct __ecereNameSpace__ecere__com__Property * prop;
2656 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
2658 if(prop->isProperty && prop->isWatchable)
2660 prop->watcherOffset = _class->structSize;
2661 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2666 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
2668 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
2670 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
2672 if(deriv->computeSize)
2674 deriv->offset = _class->structSize;
2675 deriv->memberOffset = 0;
2676 deriv->structSize = deriv->offset;
2677 ComputeClassMembers(deriv, 0x0);
2685 FinishTemplatesContext(context);
2688 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
2690 struct __ecereNameSpace__ecere__com__NameSpace
2693 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
2694 struct __ecereNameSpace__ecere__com__NameSpace * left;
2695 struct __ecereNameSpace__ecere__com__NameSpace * right;
2697 struct __ecereNameSpace__ecere__com__NameSpace * parent;
2698 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
2699 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
2700 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
2701 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
2702 } __attribute__ ((gcc_struct));
2704 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2706 struct __ecereNameSpace__ecere__com__Module
2708 struct __ecereNameSpace__ecere__com__Instance * application;
2709 struct __ecereNameSpace__ecere__sys__OldList classes;
2710 struct __ecereNameSpace__ecere__sys__OldList defines;
2711 struct __ecereNameSpace__ecere__sys__OldList functions;
2712 struct __ecereNameSpace__ecere__sys__OldList modules;
2713 struct __ecereNameSpace__ecere__com__Instance * prev;
2714 struct __ecereNameSpace__ecere__com__Instance * next;
2720 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
2721 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
2722 } __attribute__ ((gcc_struct));
2724 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
2726 struct __ecereNameSpace__ecere__com__Class * _class;
2727 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
2729 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
2730 ComputeModuleClasses(subModule->data);
2731 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes.first; _class; _class = _class->next)
2732 ComputeClassMembers(_class, 0x0);
2735 extern unsigned int inCompiler;
2737 extern void Compiler_Error(const char * format, ...);
2739 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
2741 int ComputeTypeSize(struct Type * type)
2743 unsigned int size = type ? type->size : 0;
2745 if(!size && type && !type->computing)
2747 type->computing = 0x1;
2751 type->alignment = size = sizeof(char);
2754 type->alignment = size = sizeof(char);
2757 type->alignment = size = sizeof(int);
2760 type->alignment = size = sizeof(long long);
2763 type->alignment = size = targetBits / 8;
2766 type->alignment = size = targetBits / 8;
2769 type->alignment = size = sizeof(long);
2772 type->alignment = size = sizeof(short);
2775 type->alignment = size = sizeof(float);
2778 type->alignment = size = sizeof(double);
2782 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
2784 if(_class && _class->type == 1)
2786 ComputeClassMembers(_class, 0x0);
2787 type->alignment = _class->structAlignment;
2788 size = _class->structSize;
2789 if(type->alignment && size % type->alignment)
2790 size += type->alignment - (size % type->alignment);
2792 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
2794 if(!_class->dataType)
2795 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
2796 size = type->alignment = ComputeTypeSize(_class->dataType);
2799 size = type->alignment = targetBits / 8;
2804 size = type->alignment = targetBits / 8;
2807 if(type->__anon1.__anon4.arraySizeExp)
2809 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
2810 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
2811 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)))
2813 struct Location oldLoc = yylloc;
2814 char expression[10240];
2816 expression[0] = '\0';
2817 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
2818 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
2820 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
2821 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
2824 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
2826 else if(type->__anon1.__anon4.enumClass)
2828 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
2830 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
2833 type->__anon1.__anon4.arraySize = 0;
2837 type->__anon1.__anon4.arraySize = 0;
2839 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
2840 if(type->__anon1.type)
2841 type->alignment = type->__anon1.type->alignment;
2845 struct Type * member;
2847 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2849 int __simpleStruct0, __simpleStruct1;
2850 unsigned int addSize = ComputeTypeSize(member);
2852 member->offset = size;
2853 if(member->alignment && size % member->alignment)
2854 member->offset += member->alignment - (size % member->alignment);
2855 size = member->offset;
2856 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2859 if(type->alignment && size % type->alignment)
2860 size += type->alignment - (size % type->alignment);
2865 struct Type * member;
2867 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2869 int __simpleStruct0, __simpleStruct1;
2870 unsigned int addSize = ComputeTypeSize(member);
2872 member->offset = size;
2873 if(member->alignment && size % member->alignment)
2874 member->offset += member->alignment - (size % member->alignment);
2875 size = member->offset;
2876 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2877 size = ((size > addSize) ? size : addSize);
2879 if(type->alignment && size % type->alignment)
2880 size += type->alignment - (size % type->alignment);
2885 struct TemplateParameter * param = type->__anon1.templateParameter;
2886 struct Type * baseType = ProcessTemplateParameterType(param);
2890 size = ComputeTypeSize(baseType);
2891 type->alignment = baseType->alignment;
2894 type->alignment = size = sizeof(uint64);
2899 type->alignment = size = sizeof(enum
2907 type->alignment = size = targetBits / 8;
2912 type->computing = 0x0;
2917 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
2919 extern struct Identifier * MkIdentifier(const char * string);
2921 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
2923 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
2925 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
2927 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
2929 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class);
2931 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams);
2933 extern void FreeType(struct Type * type);
2935 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
2937 extern struct Specifier * MkSpecifier(int specifier);
2939 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
2941 extern struct Expression * MkExpConstant(const char * string);
2943 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)
2945 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2946 unsigned int totalSize = 0;
2947 unsigned int maxSize = 0;
2950 struct __ecereNameSpace__ecere__com__DataMember * member;
2952 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2955 *addedPadding = 0x0;
2956 if(!isMember && _class->base)
2958 maxSize = _class->structSize;
2960 if(_class->type == 1 || _class->type == 5)
2961 AddMembers(declarations, _class->base, 0x0, &totalSize, topClass, (((void *)0)));
2964 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
2966 if(maxSize > baseSize)
2967 maxSize -= baseSize;
2973 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
2975 if(!member->isProperty)
2977 switch(member->type)
2981 if(member->dataTypeString)
2983 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
2984 struct Declarator * decl;
2986 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
2987 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
2988 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
2989 if(!member->dataType)
2990 member->dataType = ProcessType(specs, decl);
2991 ReplaceThisClassSpecifiers(specs, topClass);
2993 struct Type * type = ProcessType(specs, decl);
2995 DeclareType(member->dataType, 0x0, 0x0);
2998 ComputeTypeSize(member->dataType);
2999 size = member->dataType->size;
3000 alignment = member->dataType->alignment;
3003 if(totalSize % alignment)
3004 totalSize += alignment - (totalSize % alignment);
3013 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
3016 sprintf(id, "__anon%d", anonID++);
3018 AddMembers(list, (struct __ecereNameSpace__ecere__com__Class *)member, 0x1, &size, topClass, (((void *)0)));
3019 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
3020 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
3021 alignment = member->structAlignment;
3024 if(totalSize % alignment)
3025 totalSize += alignment - (totalSize % alignment);
3035 unsigned int __simpleStruct0;
3037 if(topMember && topMember->type == 1)
3038 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
3040 *retSize += totalSize;
3042 else if(totalSize < maxSize && _class->type != 1000)
3044 int autoPadding = 0;
3046 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
3047 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
3048 if(totalSize + autoPadding < maxSize)
3050 char sizeString[50];
3052 sprintf(sizeString, "%d", maxSize - totalSize);
3053 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
3055 *addedPadding = 0x1;
3059 FinishTemplatesContext(context);
3060 return topMember ? topMember->memberID : _class->memberID;
3063 static int DeclareMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
3065 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
3066 struct __ecereNameSpace__ecere__com__DataMember * member;
3067 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
3069 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
3070 DeclareMembers(_class->base, 0x0);
3071 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
3073 if(!member->isProperty)
3075 switch(member->type)
3079 if(!member->dataType && member->dataTypeString)
3080 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
3081 if(member->dataType)
3082 DeclareType(member->dataType, 0x0, 0x0);
3088 DeclareMembers((struct __ecereNameSpace__ecere__com__Class *)member, 0x1);
3095 FinishTemplatesContext(context);
3096 return topMember ? topMember->memberID : _class->memberID;
3099 extern struct Identifier * GetDeclId(struct Declarator * decl);
3101 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
3103 struct ClassDef * def;
3106 for(def = (*definitions).first; def; def = def->next)
3110 struct Declaration * decl = def->__anon1.decl;
3112 if(decl && decl->__anon1.__anon1.specifiers)
3114 struct Specifier * spec;
3115 unsigned int isStruct = 0x0;
3117 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3119 if(spec->type == 3 || spec->type == 4)
3121 if(spec->__anon1.__anon2.definitions)
3122 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3128 struct Declarator * d = (((void *)0));
3130 if(decl->__anon1.__anon1.declarators)
3132 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
3134 struct Identifier * idDecl = GetDeclId(d);
3144 sprintf(id, "__anon%d", anonID++);
3145 if(!decl->__anon1.__anon1.declarators)
3146 decl->__anon1.__anon1.declarators = MkList();
3147 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
3155 extern struct Symbol * FindClass(const char * name);
3157 extern char * strchr(const char * , int);
3159 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
3161 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
3163 extern void FreeClassDef(struct ClassDef * def);
3165 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
3167 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
3169 extern void MangleClassName(char * className);
3171 extern void DeclareClass(struct Symbol * classSym, const char * className);
3173 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move(struct __ecereNameSpace__ecere__sys__OldList * this, void * item, void * prevItem);
3175 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
3177 void DeclareStruct(const char * name, unsigned int skipNoHead)
3179 struct External * external = (((void *)0));
3180 struct Symbol * classSym = FindClass(name);
3182 if(!inCompiler || !classSym)
3184 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
3186 if(classSym->__anon1.registered && classSym->imported && !classSym->declaredStructSym)
3188 struct Declaration * decl;
3189 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3190 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
3191 char structName[1024];
3192 struct Specifier * spec = (((void *)0));
3194 external = (classSym->__anon1.registered && classSym->__anon1.registered->type == 1) ? classSym->__anon2.__anon1.pointerExternal : classSym->__anon2.__anon1.structExternal;
3195 classSym->declaring++;
3196 if(strchr(classSym->string, '<'))
3198 if(classSym->__anon1.registered->templateClass)
3200 DeclareStruct(classSym->__anon1.registered->templateClass->fullName, skipNoHead);
3201 classSym->declaring--;
3205 DeclareMembers(classSym->__anon1.registered, 0x0);
3206 structName[0] = (char)0;
3207 FullClassNameCat(structName, name, 0x0);
3208 if(external && external->__anon1.declaration && external->__anon1.declaration->__anon1.__anon1.specifiers)
3210 for(spec = (*external->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3212 if(spec->type == 3 || spec->type == 4)
3216 if(!skipNoHead && (!spec || !spec->__anon1.__anon2.definitions))
3218 unsigned int addedPadding = 0x0;
3220 classSym->declaredStructSym = 0x1;
3221 declarations = MkList();
3222 AddMembers(declarations, classSym->__anon1.registered, 0x0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
3223 if(!(*declarations).count || ((*declarations).count == 1 && addedPadding))
3225 FreeList(declarations, FreeClassDef);
3226 declarations = (((void *)0));
3229 if(skipNoHead || declarations)
3234 spec->__anon1.__anon2.definitions = declarations;
3235 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3237 if(classSym->__anon2.__anon1.structExternal)
3238 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3239 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3240 classSym->id = curExternal->symbol->idCode;
3241 classSym->idCode = curExternal->symbol->idCode;
3247 external = MkExternalDeclaration((((void *)0)));
3248 specifiers = MkList();
3249 declarators = MkList();
3250 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
3251 external->__anon1.declaration = decl = MkDeclaration(specifiers, declarators);
3252 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
3253 decl->symbol->__anon2.__anon1.pointerExternal = external;
3254 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3256 char className[1024];
3258 strcpy(className, "__ecereClass_");
3259 FullClassNameCat(className, classSym->string, 0x1);
3260 MangleClassName(className);
3261 DeclareClass(classSym, className);
3262 external->symbol = classSym;
3263 classSym->__anon2.__anon1.pointerExternal = external;
3264 classSym->id = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3265 classSym->idCode = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3269 char className[1024];
3271 strcpy(className, "__ecereClass_");
3272 FullClassNameCat(className, classSym->string, 0x1);
3273 MangleClassName(className);
3274 classSym->__anon2.__anon1.structExternal = external;
3275 DeclareClass(classSym, className);
3276 external->symbol = classSym;
3278 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
3281 classSym->declaring--;
3285 if(classSym->__anon2.__anon1.structExternal && classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
3287 struct Specifier * spec;
3289 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3291 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3294 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3296 classSym->declaring++;
3298 if(classSym->__anon1.registered)
3299 DeclareMembers(classSym->__anon1.registered, 0x0);
3301 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 1 || classSym->__anon1.registered->type == 5))
3303 if(classSym->__anon2.__anon1.structExternal)
3304 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3305 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3306 classSym->id = curExternal->symbol->idCode;
3307 classSym->idCode = curExternal->symbol->idCode;
3309 classSym->declaring--;
3314 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
3316 extern struct ModuleImport * mainModule;
3318 extern struct Specifier * MkSpecifierName(const char * name);
3320 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
3322 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
3324 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
3326 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
3328 extern void FreeDeclarator(struct Declarator * decl);
3330 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
3332 struct PropertyImport
3334 struct PropertyImport * prev;
3335 struct PropertyImport * next;
3337 unsigned int isVirtual;
3338 unsigned int hasSet;
3339 unsigned int hasGet;
3340 } __attribute__ ((gcc_struct));
3342 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
3344 void DeclareProperty(struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
3346 struct Symbol * symbol = prop->symbol;
3348 strcpy(setName, "__ecereProp_");
3349 FullClassNameCat(setName, prop->_class->fullName, 0x0);
3350 strcat(setName, "_Set_");
3351 FullClassNameCat(setName, prop->name, 0x1);
3352 MangleClassName(setName);
3353 strcpy(getName, "__ecereProp_");
3354 FullClassNameCat(getName, prop->_class->fullName, 0x0);
3355 strcat(getName, "_Get_");
3356 FullClassNameCat(getName, prop->name, 0x1);
3357 MangleClassName(getName);
3358 if(prop->_class->type == 1)
3359 DeclareStruct(prop->_class->fullName, 0x0);
3360 if(!symbol || curExternal->symbol->idCode < symbol->id)
3362 unsigned int imported = 0x0;
3363 unsigned int dllImport = 0x0;
3365 if(!symbol || symbol->_import)
3369 struct Symbol * classSym;
3371 if(!prop->_class->symbol)
3372 prop->_class->symbol = FindClass(prop->_class->fullName);
3373 classSym = prop->_class->symbol;
3374 if(classSym && !classSym->_import)
3376 struct ModuleImport * module;
3378 if(prop->_class->module)
3379 module = FindModule(prop->_class->module);
3381 module = mainModule;
3382 classSym->_import = __extension__ ({
3383 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
3385 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
3387 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
3389 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
3390 symbol->_import = (struct ClassImport *)__extension__ ({
3391 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
3393 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0x0, __ecereInstance1->hasSet = prop->Set ? 0x1 : 0x0, __ecereInstance1->hasGet = prop->Get ? 0x1 : 0x0, __ecereInstance1;
3396 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
3399 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)
3404 struct Context * context = SetupTemplatesContext(prop->_class);
3406 symbol->type = ProcessTypeString(prop->dataTypeString, 0x0);
3407 FinishTemplatesContext(context);
3411 if(!symbol->__anon2.__anon2.externalGet || symbol->__anon2.__anon2.externalGet->type == 0)
3413 struct Declaration * decl;
3414 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3415 struct Declarator * d;
3416 struct __ecereNameSpace__ecere__sys__OldList * params;
3417 struct Specifier * spec;
3418 struct External * external;
3419 struct Declarator * typeDecl;
3420 unsigned int simple = 0x0;
3422 specifiers = MkList();
3423 declarators = MkList();
3425 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3426 d = MkDeclaratorIdentifier(MkIdentifier(getName));
3428 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3430 struct Context * context = SetupTemplatesContext(prop->_class);
3432 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
3433 FinishTemplatesContext(context);
3435 for(spec = (*specifiers).first; spec; spec = spec->next)
3439 if((!typeDecl || typeDecl->type == 1))
3441 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3443 symbol->_class = classSym->__anon1.registered;
3444 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3446 DeclareStruct(spec->__anon1.__anon1.name, 0x0);
3453 d = PlugDeclarator(typeDecl, d);
3456 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
3457 specifiers = MkList();
3459 d = MkDeclaratorFunction(d, params);
3461 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3462 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3463 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3465 ListAdd(specifiers, MkSpecifier(VOID));
3466 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3467 decl = MkDeclaration(specifiers, declarators);
3468 external = MkExternalDeclaration(decl);
3469 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3470 external->symbol = symbol;
3471 symbol->__anon2.__anon2.externalGet = external;
3472 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3474 FreeDeclarator(typeDecl);
3478 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalGet, curExternal->prev);
3483 if(!symbol->__anon2.__anon2.externalSet || symbol->__anon2.__anon2.externalSet->type == 0)
3485 struct Declaration * decl;
3486 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3487 struct Declarator * d;
3488 struct __ecereNameSpace__ecere__sys__OldList * params;
3489 struct Specifier * spec;
3490 struct External * external;
3491 struct Declarator * typeDecl;
3493 declarators = MkList();
3495 if(!prop->conversion || prop->_class->type == 1)
3497 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3499 specifiers = MkList();
3501 struct Context * context = SetupTemplatesContext(prop->_class);
3503 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
3504 FinishTemplatesContext(context);
3506 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
3507 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
3508 ListAdd(params, MkTypeName(specifiers, d));
3509 d = MkDeclaratorIdentifier(MkIdentifier(setName));
3511 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3512 d = MkDeclaratorFunction(d, params);
3513 for(spec = (*specifiers).first; spec; spec = spec->next)
3517 if((!typeDecl || typeDecl->type == 1))
3519 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3521 symbol->_class = classSym->__anon1.registered;
3522 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3523 DeclareStruct(spec->__anon1.__anon1.name, 0x0);
3527 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3528 specifiers = MkList();
3530 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3531 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3532 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3533 if(!prop->conversion || prop->_class->type == 1)
3534 ListAdd(specifiers, MkSpecifier(VOID));
3536 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
3537 decl = MkDeclaration(specifiers, declarators);
3538 external = MkExternalDeclaration(decl);
3539 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3540 external->symbol = symbol;
3541 symbol->__anon2.__anon2.externalSet = external;
3542 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3546 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalSet, curExternal->prev);
3549 if(!symbol->__anon2.__anon2.externalPtr)
3551 struct Declaration * decl;
3552 struct External * external;
3553 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
3554 char propName[1024];
3557 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3559 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3560 ListAdd(specifiers, MkSpecifierName("Property"));
3561 strcpy(propName, "__ecereProp_");
3562 FullClassNameCat(propName, prop->_class->fullName, 0x0);
3563 strcat(propName, "_");
3564 FullClassNameCat(propName, prop->name, 0x1);
3565 MangleClassName(propName);
3567 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
3569 ListAdd(list, MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(propName))), (((void *)0))));
3572 strcpy(propName, "__ecerePropM_");
3573 FullClassNameCat(propName, prop->_class->fullName, 0x0);
3574 strcat(propName, "_");
3575 FullClassNameCat(propName, prop->name, 0x1);
3576 MangleClassName(propName);
3577 ListAdd(list, MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(propName))), (((void *)0))));
3579 decl = MkDeclaration(specifiers, list);
3581 external = MkExternalDeclaration(decl);
3582 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3583 external->symbol = symbol;
3584 symbol->__anon2.__anon2.externalPtr = external;
3588 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalPtr, curExternal->prev);
3590 symbol->id = curExternal->symbol->idCode;
3594 struct Type * Dereference(struct Type * source)
3596 struct Type * type = (((void *)0));
3600 if(source->kind == 13 || source->kind == 12)
3602 type = source->__anon1.type;
3603 source->__anon1.type->refCount++;
3605 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
3607 type = __extension__ ({
3608 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
3610 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
3613 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
3619 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
3624 static struct Type * Reference(struct Type * source)
3626 struct Type * type = (((void *)0));
3630 type = __extension__ ({
3631 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
3633 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
3640 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);
3642 extern void * memcpy(void * , const void * , size_t size);
3644 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method);
3646 extern void FreeExpression(struct Expression * exp);
3648 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
3650 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);
3652 static void ProcessInitializer(struct Initializer * init, struct Type * type);
3654 extern struct Type * MkClassType(const char * name);
3656 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);
3658 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)
3660 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
3661 unsigned int found = 0x0;
3662 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
3663 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
3664 unsigned int freeType = 0x0;
3666 yylloc = member->loc;
3671 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
3675 dataMember = *curMember;
3681 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
3682 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
3683 int _subMemberStackPos = 0;
3686 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
3689 dataMember = thisMember;
3690 if(curMember && thisMember->memberAccess == 1)
3692 *curMember = thisMember;
3693 *curClass = thisMember->_class;
3694 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
3695 *subMemberStackPos = _subMemberStackPos;
3701 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
3702 if(method && method->type == 1)
3705 method = (((void *)0));
3710 struct Type * type = (((void *)0));
3714 if(!dataMember->dataType && dataMember->dataTypeString)
3716 struct Context * context = SetupTemplatesContext(_class);
3718 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
3719 FinishTemplatesContext(context);
3721 type = dataMember->dataType;
3725 if(!method->dataType)
3726 ProcessMethodType(method);
3727 type = method->dataType;
3729 if(ident && ident->next)
3731 for(ident = ident->next; ident && type; ident = ident->next)
3735 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
3737 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
3739 type = dataMember->dataType;
3741 else if(type->kind == 9 || type->kind == 10)
3743 struct Type * memberType;
3745 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
3747 if(!strcmp(memberType->name, ident->string))
3756 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
3759 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
3760 struct __ecereNameSpace__ecere__com__Class * sClass;
3762 for(sClass = _class; sClass; sClass = sClass->base)
3765 if(sClass->templateClass)
3766 sClass = sClass->templateClass;
3767 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
3769 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
3771 for(sClass = sClass->base; sClass; sClass = sClass->base)
3773 if(sClass->templateClass)
3774 sClass = sClass->templateClass;
3775 id += sClass->templateParams.count;
3786 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
3788 if(arg.__anon1.__anon1.dataTypeString)
3790 unsigned int constant = type->constant;
3792 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
3793 if(type->kind == 8 && constant)
3794 type->constant = 0x1;
3795 else if(type->kind == 13)
3797 struct Type * t = type->__anon1.type;
3799 while(t->kind == 13)
3800 t = t->__anon1.type;
3802 t->constant = constant;
3805 if(type && _class->templateClass)
3806 type->passAsTemplate = 0x1;
3813 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
3815 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
3816 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
3820 char templateString[1024];
3821 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
3823 sprintf(templateString, "%s<", expClass->templateClass->fullName);
3824 for(cClass = expClass; cClass; cClass = cClass->base)
3828 if(cClass->templateClass)
3829 cClass = cClass->templateClass;
3830 for(param = cClass->templateParams.first; param; param = param->next)
3833 struct __ecereNameSpace__ecere__com__Class * sClass;
3834 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
3836 for(sClass = cClass->base; sClass; sClass = sClass->base)
3838 if(sClass->templateClass)
3839 sClass = sClass->templateClass;
3840 id += sClass->templateParams.count;
3842 arg = expClass->templateArgs[id];
3843 for(sClass = _class; sClass; sClass = sClass->base)
3845 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
3847 struct __ecereNameSpace__ecere__com__Class * nextClass;
3849 if(sClass->templateClass)
3850 sClass = sClass->templateClass;
3851 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
3853 if(nextClass->templateClass)
3854 nextClass = nextClass->templateClass;
3855 p += nextClass->templateParams.count;
3857 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
3859 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
3861 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3863 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
3864 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
3878 char expString[1024];
3879 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
3880 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
3881 struct Expression * exp;
3882 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
3884 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
3885 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3886 ProcessExpressionType(exp);
3887 ComputeExpression(exp);
3888 expString[0] = '\0';
3889 PrintExpression(exp, expString);
3890 strcat(argument, expString);
3891 FreeExpression(exp);
3896 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
3901 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3902 strcat(argument, arg.__anon1.__anon1.dataTypeString);
3909 strcat(templateString, ", ");
3910 if(lastParam != p - 1)
3912 strcat(templateString, param->name);
3913 strcat(templateString, " = ");
3915 strcat(templateString, argument);
3924 int len = strlen(templateString);
3926 if(templateString[len - 1] == '<')
3930 if(templateString[len - 1] == '>')
3931 templateString[len++] = ' ';
3932 templateString[len++] = '>';
3934 templateString[len++] = '\0';
3937 struct Context * context = SetupTemplatesContext(_class);
3941 type = ProcessTypeString(templateString, 0x0);
3943 FinishTemplatesContext(context);
3946 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
3948 ProcessExpressionType(member->initializer->__anon1.exp);
3949 if(!member->initializer->__anon1.exp->expType)
3953 char expString[10240];
3955 expString[0] = '\0';
3956 PrintExpression(member->initializer->__anon1.exp, expString);
3957 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
3958 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
3961 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 0x1, 0x1, 0x0, 0x0, 0x1))
3963 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
3966 else if(member->initializer)
3968 ProcessInitializer(member->initializer, type);
3975 if(_class && _class->type == 3)
3977 if(member->initializer)
3979 struct Type * type = MkClassType(_class->fullName);
3981 ProcessInitializer(member->initializer, type);
3987 if(member->initializer)
3989 ProcessInitializer(member->initializer, (((void *)0)));
3995 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
3999 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
4001 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
4005 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
4010 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);
4012 extern void FreeSpecifier(struct Specifier * spec);
4014 static void ProcessFunction(struct FunctionDefinition * function);
4016 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
4018 extern struct Specifier * CopySpecifier(struct Specifier * spec);
4020 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
4022 extern void FreeClassFunction(struct ClassFunction * func);
4024 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
4026 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
4028 void ProcessInstantiationType(struct Instantiation * inst)
4033 struct MembersInit * members;
4034 struct Symbol * classSym;
4035 struct __ecereNameSpace__ecere__com__Class * _class;
4037 classSym = inst->_class->__anon1.__anon1.symbol;
4038 _class = classSym ? classSym->__anon1.registered : (((void *)0));
4039 if(!_class || _class->type != 5)
4040 DeclareStruct(inst->_class->__anon1.__anon1.name, 0x0);
4041 afterExternal = afterExternal ? afterExternal : curExternal;
4043 ProcessExpressionType(inst->exp);
4044 inst->isConstant = 0x1;
4047 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
4048 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
4049 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
4050 int subMemberStackPos = 0;
4052 for(members = (*inst->members).first; members; members = members->next)
4054 switch(members->type)
4059 static unsigned int instMethodID = 0;
4060 struct External * external = curExternal;
4061 struct Context * context = curContext;
4062 struct Declarator * declarator = members->__anon1.function->declarator;
4063 struct Identifier * nameID = GetDeclId(declarator);
4064 char * unmangled = nameID ? nameID->string : (((void *)0));
4065 struct Expression * exp;
4066 struct External * createdExternal = (((void *)0));
4072 strcpy(name, "__ecereInstMeth_");
4073 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0x0);
4075 strcat(name, nameID->string);
4077 sprintf(number, "_%08d", instMethodID++);
4078 strcat(name, number);
4079 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
4083 struct Symbol * symbol = declarator->symbol;
4084 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
4086 if(method && method->type == 1)
4088 symbol->__anon1.method = method;
4089 ProcessMethodType(method);
4090 if(!symbol->type->__anon1.__anon2.thisClass)
4092 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
4094 if(!currentClass->symbol)
4095 currentClass->symbol = FindClass(currentClass->fullName);
4096 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
4101 _class->symbol = FindClass(_class->fullName);
4102 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
4105 DeclareType(symbol->type, 0x1, 0x1);
4109 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
4112 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 0x1);
4115 FreeSpecifier(nameID->_class);
4116 nameID->_class = (((void *)0));
4120 struct External * oldExternal = curExternal;
4122 declarator->symbol->id = declarator->symbol->idCode = curExternal->symbol->idCode;
4124 struct External * externalDecl;
4126 externalDecl = MkExternalDeclaration((((void *)0)));
4127 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), oldExternal->prev, externalDecl);
4128 if(createdExternal->__anon1.function)
4130 ProcessFunction(createdExternal->__anon1.function);
4132 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(declarator), (((void *)0)))));
4134 externalDecl->__anon1.declaration = decl;
4135 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
4136 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4137 declarator->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4144 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
4145 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
4147 curExternal = external;
4148 curContext = context;
4151 FreeClassFunction(members->__anon1.function);
4152 exp = QMkExpId(name);
4154 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
4155 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
4161 if(members->__anon1.dataMembers && classSym)
4163 struct MemberInit * member;
4164 struct Location oldyyloc = yylloc;
4166 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
4168 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
4169 if(member->initializer && !member->initializer->isConstant)
4170 inst->isConstant = 0x0;
4182 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams)
4186 if(type->kind == 11)
4188 struct Type * param;
4192 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
4193 DeclareType(param, declarePointers, 0x1);
4195 DeclareType(type->__anon1.__anon2.returnType, declarePointers, 0x1);
4197 else if(type->kind == 13 && declarePointers)
4198 DeclareType(type->__anon1.type, declarePointers, 0x0);
4199 else if(type->kind == 8)
4201 if(type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 1 || type->__anon1._class->__anon1.registered->type == 5) && !type->__anon1._class->declaring)
4202 DeclareStruct(type->__anon1._class->__anon1.registered->fullName, type->__anon1._class->__anon1.registered->type == 5);
4204 else if(type->kind == 9 || type->kind == 10)
4206 struct Type * member;
4208 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
4209 DeclareType(member, 0x0, 0x0);
4211 else if(type->kind == 12)
4212 DeclareType(type->__anon1.__anon4.arrayType, declarePointers, 0x0);
4216 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
4218 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
4220 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
4222 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
4223 struct __ecereNameSpace__ecere__com__Class * sClass;
4225 for(sClass = _class; sClass; sClass = sClass->base)
4228 if(sClass->templateClass)
4229 sClass = sClass->templateClass;
4230 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
4232 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
4234 for(sClass = sClass->base; sClass; sClass = sClass->base)
4236 if(sClass->templateClass)
4237 sClass = sClass->templateClass;
4238 id += sClass->templateParams.count;
4249 arg = &_class->templateArgs[id];
4250 if(arg && param->type == 0)
4251 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
4256 extern struct Context * PushContext(void);
4258 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
4260 struct TemplatedType
4263 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4264 struct __ecereNameSpace__ecere__sys__BTNode * left;
4265 struct __ecereNameSpace__ecere__sys__BTNode * right;
4267 struct TemplateParameter * param;
4268 } __attribute__ ((gcc_struct));
4270 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
4272 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
4274 struct Context * context = PushContext();
4276 context->templateTypesOnly = 0x1;
4277 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
4279 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
4281 for(; param; param = param->next)
4283 if(param->type == 0 && param->identifier)
4285 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
4287 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4293 struct __ecereNameSpace__ecere__com__Class * sClass;
4295 for(sClass = _class; sClass; sClass = sClass->base)
4297 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
4299 for(p = sClass->templateParams.first; p; p = p->next)
4303 struct TemplateParameter * param = p->param;
4304 struct TemplatedType * type;
4308 p->param = param = __extension__ ({
4309 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
4311 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
4314 type = __extension__ ({
4315 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
4317 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
4319 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4327 extern void PopContext(struct Context * ctx);
4329 extern void FreeContext(struct Context * context);
4331 void FinishTemplatesContext(struct Context * context)
4333 PopContext(context);
4334 FreeContext(context);
4335 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
4338 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
4340 if(!method->dataType)
4342 struct Context * context = SetupTemplatesContext(method->_class);
4344 method->dataType = ProcessTypeString(method->dataTypeString, 0x0);
4345 FinishTemplatesContext(context);
4346 if(method->type != 1 && method->dataType)
4348 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
4350 if(!method->_class->symbol)
4351 method->_class->symbol = FindClass(method->_class->fullName);
4352 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
4358 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
4362 struct Context * context = SetupTemplatesContext(prop->_class);
4364 prop->dataType = ProcessTypeString(prop->dataTypeString, 0x0);
4365 FinishTemplatesContext(context);
4369 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
4371 extern void FreeTypeName(struct TypeName * typeName);
4373 static void ProcessDeclarator(struct Declarator * decl);
4375 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
4377 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
4381 struct MethodImport * prev;
4382 struct MethodImport * next;
4384 unsigned int isVirtual;
4385 } __attribute__ ((gcc_struct));
4387 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
4389 void DeclareMethod(struct __ecereNameSpace__ecere__com__Method * method, const char * name)
4391 struct Symbol * symbol = method->symbol;
4393 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && method->type == 1) || symbol->id > (curExternal ? curExternal->symbol->idCode : -1))
4395 unsigned int imported = 0x0;
4396 unsigned int dllImport = 0x0;
4398 if(!method->dataType)
4399 method->dataType = ProcessTypeString(method->dataTypeString, 0x0);
4400 if(!symbol || symbol->_import || method->type == 1)
4402 if(!symbol || method->type == 1)
4404 struct Symbol * classSym;
4406 if(!method->_class->symbol)
4407 method->_class->symbol = FindClass(method->_class->fullName);
4408 classSym = method->_class->symbol;
4409 if(!classSym->_import)
4411 struct ModuleImport * module;
4413 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + structSize_Instance)))->name)
4414 module = FindModule(method->_class->module);
4416 module = mainModule;
4417 classSym->_import = __extension__ ({
4418 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
4420 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
4422 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
4426 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4428 if(!symbol->_import)
4430 symbol->_import = (struct ClassImport *)__extension__ ({
4431 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
4433 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
4435 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
4439 symbol->type = method->dataType;
4441 symbol->type->refCount++;
4444 if(!method->dataType->dllExport)
4447 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)
4451 if(method->type != 1 && method->dataType)
4452 DeclareType(method->dataType, 0x1, 0x1);
4453 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4455 struct Declaration * decl;
4456 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4457 struct Declarator * d;
4458 struct Declarator * funcDecl;
4459 struct External * external;
4461 specifiers = MkList();
4462 declarators = MkList();
4464 ListAdd(specifiers, MkSpecifier(EXTERN));
4465 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
4466 ListAdd(specifiers, MkSpecifier(STATIC));
4467 if(method->type == 1)
4469 ListAdd(specifiers, MkSpecifier(INT));
4470 d = MkDeclaratorIdentifier(MkIdentifier(name));
4474 d = MkDeclaratorIdentifier(MkIdentifier(name));
4476 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4478 struct Context * context = SetupTemplatesContext(method->_class);
4480 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
4481 FinishTemplatesContext(context);
4483 funcDecl = GetFuncDecl(d);
4486 struct Specifier * spec, * next;
4488 for(spec = (*specifiers).first; spec; spec = next)
4493 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4494 FreeSpecifier(spec);
4498 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
4500 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
4502 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
4503 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")));
4504 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
4505 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
4507 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
4509 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
4511 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
4512 FreeTypeName(param);
4514 if(!funcDecl->__anon1.function.parameters)
4515 funcDecl->__anon1.function.parameters = MkList();
4516 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
4520 ProcessDeclarator(d);
4521 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4522 decl = MkDeclaration(specifiers, declarators);
4523 ReplaceThisClassSpecifiers(specifiers, method->_class);
4524 if(symbol->__anon2.__anon1.pointerExternal)
4526 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4529 *functionSymbol = *symbol;
4530 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4531 if(functionSymbol->type)
4532 functionSymbol->type->refCount++;
4534 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4535 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4537 external = MkExternalDeclaration(decl);
4539 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
4540 external->symbol = symbol;
4541 symbol->__anon2.__anon1.pointerExternal = external;
4545 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4547 symbol->id = curExternal ? curExternal->symbol->idCode : (((int)0x7fffffff));
4551 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
4553 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4555 unsigned int first = 0x1;
4557 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4559 char className[1024];
4561 strcpy(className, _class->fullName);
4562 for(param = _class->templateParams.first; param; param = param->next)
4566 strcat(className, "<");
4568 strcat(className, ", ");
4569 if(lastParam + 1 != p)
4571 strcat(className, param->name);
4572 strcat(className, " = ");
4574 strcat(className, param->name);
4582 int len = strlen(className);
4584 if(className[len - 1] == '>')
4585 className[len++] = ' ';
4586 className[len++] = '>';
4587 className[len++] = '\0';
4589 return __ecereNameSpace__ecere__sys__CopyString(className);
4592 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
4595 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
4597 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4599 unsigned int first = 0x1;
4601 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4603 char className[1024];
4605 strcpy(className, _class->fullName);
4606 for(param = _class->templateParams.first; param; param = param->next)
4610 strcat(className, "<");
4612 strcat(className, ", ");
4613 if(lastParam + 1 != p)
4615 strcat(className, param->name);
4616 strcat(className, " = ");
4618 strcat(className, param->name);
4626 int len = strlen(className);
4628 if(className[len - 1] == '>')
4629 className[len++] = ' ';
4630 className[len++] = '>';
4631 className[len++] = '\0';
4633 return MkClassType(className);
4637 return MkClassType(_class->fullName);
4641 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
4643 if(specs != (((void *)0)) && _class)
4645 struct Specifier * spec;
4647 for(spec = specs->first; spec; spec = spec->next)
4649 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
4652 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
4653 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
4659 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
4661 struct __ecereNameSpace__ecere__com__GlobalFunction
4663 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
4664 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
4667 struct __ecereNameSpace__ecere__com__Instance * module;
4668 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
4669 const char * dataTypeString;
4670 struct Type * dataType;
4672 } __attribute__ ((gcc_struct));
4674 extern struct Context * globalContext;
4676 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
4678 struct FunctionImport
4680 struct FunctionImport * prev;
4681 struct FunctionImport * next;
4683 } __attribute__ ((gcc_struct));
4685 unsigned int DeclareFunction(struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
4687 struct Symbol * symbol = function->symbol;
4689 if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
4691 unsigned int imported = 0x0;
4692 unsigned int dllImport = 0x0;
4694 if(!function->dataType)
4696 function->dataType = ProcessTypeString(function->dataTypeString, 0x0);
4697 if(!function->dataType->__anon1.__anon2.thisClass)
4698 function->dataType->__anon1.__anon2.staticMethod = 0x1;
4704 struct ModuleImport * module = FindModule(function->module);
4706 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4709 if(!function->dataType->dllExport)
4711 symbol->_import = (struct ClassImport *)__extension__ ({
4712 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
4714 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
4716 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
4720 symbol->type = ProcessTypeString(function->dataTypeString, 0x0);
4721 if(!symbol->type->__anon1.__anon2.thisClass)
4722 symbol->type->__anon1.__anon2.staticMethod = 0x1;
4725 imported = symbol->_import ? 0x1 : 0x0;
4726 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1)
4729 DeclareType(function->dataType, 0x1, 0x1);
4732 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4734 struct Declaration * decl;
4735 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4736 struct Declarator * d;
4737 struct Declarator * funcDecl;
4738 struct External * external;
4740 specifiers = MkList();
4741 declarators = MkList();
4742 ListAdd(specifiers, MkSpecifier(EXTERN));
4743 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
4745 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4746 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
4747 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType == 1)
4749 struct Specifier * spec;
4751 for(spec = (*specifiers).first; spec; spec = spec->next)
4752 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
4754 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4755 FreeSpecifier(spec);
4759 funcDecl = GetFuncDecl(d);
4760 if(funcDecl && !funcDecl->__anon1.function.parameters)
4762 funcDecl->__anon1.function.parameters = MkList();
4763 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
4765 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4767 struct Context * oldCtx = curContext;
4769 curContext = globalContext;
4770 decl = MkDeclaration(specifiers, declarators);
4771 curContext = oldCtx;
4773 if(symbol->__anon2.__anon1.pointerExternal)
4775 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4778 *functionSymbol = *symbol;
4779 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4780 if(functionSymbol->type)
4781 functionSymbol->type->refCount++;
4783 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4784 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4786 external = MkExternalDeclaration(decl);
4788 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
4789 external->symbol = symbol;
4790 symbol->__anon2.__anon1.pointerExternal = external;
4794 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4797 symbol->id = curExternal->symbol->idCode;
4800 return (symbol && symbol->_import && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1) ? 0x1 : 0x0;
4803 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_GlobalData;
4808 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4809 struct __ecereNameSpace__ecere__sys__BTNode * left;
4810 struct __ecereNameSpace__ecere__sys__BTNode * right;
4812 struct __ecereNameSpace__ecere__com__Instance * module;
4813 char * dataTypeString;
4814 struct Type * dataType;
4817 } __attribute__ ((gcc_struct));
4819 void DeclareGlobalData(struct GlobalData * data)
4821 struct Symbol * symbol = data->symbol;
4823 if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
4828 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4831 data->dataType = ProcessTypeString(data->dataTypeString, 0x0);
4832 DeclareType(data->dataType, 0x1, 0x1);
4835 if(!symbol->__anon2.__anon1.pointerExternal)
4837 struct Declaration * decl;
4838 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4839 struct Declarator * d;
4840 struct External * external;
4842 specifiers = MkList();
4843 declarators = MkList();
4844 ListAdd(specifiers, MkSpecifier(EXTERN));
4845 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
4846 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
4847 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4848 decl = MkDeclaration(specifiers, declarators);
4849 external = MkExternalDeclaration(decl);
4851 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
4852 external->symbol = symbol;
4853 symbol->__anon2.__anon1.pointerExternal = external;
4857 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4860 symbol->id = curExternal->symbol->idCode;
4867 struct Conversion * prev, * next;
4868 struct __ecereNameSpace__ecere__com__Property * convert;
4870 struct Type * resultType;
4871 } __attribute__ ((gcc_struct));
4873 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
4875 extern void Compiler_Warning(const char * format, ...);
4877 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
4879 unsigned int status = 0x1;
4881 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))
4883 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
4884 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
4886 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
4888 struct Type * sourceType = source, * destType = dest;
4890 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
4891 sourceType = sourceType->__anon1.type;
4892 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
4893 destType = destType->__anon1.type;
4894 if(!destType->constant && sourceType->constant)
4898 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
4905 extern void CopyTypeInto(struct Type * type, struct Type * src);
4907 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
4909 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)
4914 CheckConstCompatibility(source, dest, 0x1);
4915 if(source->kind == 20 && dest->kind != 20)
4917 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
4922 if(dest->kind == 20 && source->kind != 20)
4924 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
4929 if(dest->classObjectType == 2 && dest->kind != 11)
4931 if(source->classObjectType != 3)
4935 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
4943 if(source->kind != 11 && source->classObjectType == 3)
4945 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
4948 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
4950 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))
4953 if(dest->kind == 14 && source->kind != 0)
4955 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))
4957 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))
4959 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
4961 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
4963 if(conversions != (((void *)0)))
4965 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
4970 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
4972 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
4974 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
4976 if(sourceBase == destBase)
4980 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))
4984 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))
4986 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
4993 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
4997 if(source->kind == 8)
4999 struct __ecereNameSpace__ecere__com__Class * _class;
5001 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5003 struct __ecereNameSpace__ecere__com__Property * convert;
5005 for(convert = _class->conversions.first; convert; convert = convert->next)
5007 if(convert->memberAccess == 1 || _class->module == privateModule)
5009 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5011 if(!convert->dataType)
5012 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
5013 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))
5015 if(!conversions && !convert->Get)
5017 else if(conversions != (((void *)0)))
5019 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))
5023 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 0x1, conv);
5025 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5036 struct __ecereNameSpace__ecere__com__Class * _class;
5038 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5040 struct __ecereNameSpace__ecere__com__Property * convert;
5042 for(convert = _class->conversions.first; convert; convert = convert->next)
5044 if(convert->memberAccess == 1 || _class->module == privateModule)
5046 struct Type * constType = (((void *)0));
5047 unsigned int success = 0x0;
5049 if(!convert->dataType)
5050 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
5051 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
5053 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5055 constType = __extension__ ({
5056 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5058 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
5060 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
5061 ptrType->constant = 0x1;
5063 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, 0x0, 0x0, 0x1, warnConst))
5065 if(!conversions && !convert->Set)
5067 else if(conversions != (((void *)0)))
5069 if(_class->type == 3 && convert->dataType->kind == 8 && convert->dataType->__anon1._class && convert->dataType->__anon1._class->__anon1.registered && _class->base == convert->dataType->__anon1._class->__anon1.registered->base && (source->kind != 8 || source->__anon1._class->__anon1.registered != _class->base))
5073 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
5075 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
5081 FreeType(constType);
5087 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5089 if(!dest->__anon1._class->__anon1.registered->dataType)
5090 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5091 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
5093 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, dest->__anon1._class->__anon1.registered->dataType->kind == 8, 0x0, 0x0, warnConst))
5100 if(source->kind == 8)
5102 struct __ecereNameSpace__ecere__com__Class * _class;
5104 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5106 struct __ecereNameSpace__ecere__com__Property * convert;
5108 for(convert = _class->conversions.first; convert; convert = convert->next)
5110 if(convert->memberAccess == 1 || _class->module == privateModule)
5112 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5114 if(!convert->dataType)
5115 convert->dataType = ProcessTypeString(convert->dataTypeString, 0x0);
5116 if(convert->dataType != source && (!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), convert->dataType->kind == 8, convert->dataType->kind == 8, 0x0, 0x1, warnConst))
5118 if(!conversions && !convert->Get)
5120 else if(conversions != (((void *)0)))
5122 if(_class->type == 3 && convert->dataType->kind == 8 && convert->dataType->__anon1._class && convert->dataType->__anon1._class->__anon1.registered && _class->base == convert->dataType->__anon1._class->__anon1.registered->base && (dest->kind != 8 || dest->__anon1._class->__anon1.registered != _class->base))
5126 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 0x1, conv);
5128 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5136 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
5138 if(!source->__anon1._class->__anon1.registered->dataType)
5139 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5140 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
5142 if(MatchTypes(source->__anon1._class->__anon1.registered->dataType, dest, conversions, (((void *)0)), (((void *)0)), source->__anon1._class->__anon1.registered->dataType->kind == 8, source->__anon1._class->__anon1.registered->dataType->kind == 8, 0x0, 0x0, warnConst))
5144 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0, warnConst))
5150 if(source->kind == 8 || source->kind == 19)
5152 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
5154 else if(dest->kind == 7 && source->kind == 6)
5156 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
5158 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
5160 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
5162 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
5164 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
5166 else if(source->kind == 15 && (dest->kind == 3 || dest->kind == 2 || dest->kind == 1 || source->kind == 24 || dest->kind == 5 || dest->kind == 4 || dest->kind == 22 || dest->kind == 23))
5168 else if(dest->kind == 15 && !isConversionExploration && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 5 || source->kind == 4 || source->kind == 22 || source->kind == 23))
5170 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && ((source->kind == 11 || (source->kind == 13 && source->__anon1.type->kind == 11) || source->kind == 16)))
5172 struct Type * paramSource, * paramDest;
5174 if(dest->kind == 16)
5175 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
5176 if(source->kind == 16)
5177 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
5178 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
5179 dest = dest->__anon1.type;
5180 if(source->kind == 13 && source->__anon1.type->kind == 11)
5181 source = source->__anon1.type;
5182 if(dest->kind == 16)
5183 dest = dest->__anon1.__anon3.method->dataType;
5184 if(source->kind == 16)
5185 source = source->__anon1.__anon3.method->dataType;
5186 paramSource = source->__anon1.__anon2.params.first;
5187 if(paramSource && paramSource->kind == 0)
5188 paramSource = (((void *)0));
5189 paramDest = dest->__anon1.__anon2.params.first;
5190 if(paramDest && paramDest->kind == 0)
5191 paramDest = (((void *)0));
5192 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5194 if(!paramDest || (!(paramDest->kind == 13 && paramDest->__anon1.type && paramDest->__anon1.type->kind == 0) && (paramDest->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, paramDest->__anon1._class->__anon1.registered))))
5196 if(paramDest && paramDest->kind == 8)
5197 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
5199 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
5202 paramDest = paramDest->next;
5204 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
5206 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5208 if(dest->__anon1.__anon2.thisClass)
5210 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
5212 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5218 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
5221 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
5223 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
5227 paramSource = paramSource->next;
5231 if(dest->__anon1.__anon2.thisClass)
5233 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
5235 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5241 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
5243 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
5249 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5251 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
5255 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 0x1);
5256 for(; paramDest; paramDest = paramDest->next)
5260 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
5264 struct Type * paramDestType = paramDest;
5265 struct Type * paramSourceType = paramSource;
5266 struct Type * type = paramDestType;
5268 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
5271 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
5272 struct __ecereNameSpace__ecere__com__Class * sClass;
5274 for(sClass = owningClassSource; sClass; sClass = sClass->base)
5277 if(sClass->templateClass)
5278 sClass = sClass->templateClass;
5279 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
5281 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
5283 for(sClass = sClass->base; sClass; sClass = sClass->base)
5285 if(sClass->templateClass)
5286 sClass = sClass->templateClass;
5287 id += sClass->templateParams.count;
5298 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
5300 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
5303 if(!MatchTypes(paramDestType, paramSourceType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst) && (!acceptReversedParams || !MatchTypes(paramSourceType, paramDestType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst)))
5308 PrintType(paramDest, type, 0x0, 0x1);
5309 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
5310 if(paramDestType != paramDest)
5311 FreeType(paramDestType);
5314 if(paramDestType != paramDest)
5315 FreeType(paramDestType);
5317 paramSource = paramSource->next;
5321 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
5326 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
5330 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
5332 if(MatchTypes(source->__anon1.type, dest->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5339 static void FreeConvert(struct Conversion * convert)
5341 if(convert->resultType)
5342 FreeType(convert->resultType);
5345 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BTNamedLink;
5347 struct __ecereNameSpace__ecere__com__BTNamedLink
5350 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
5351 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
5352 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
5355 } __attribute__ ((gcc_struct));
5357 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__EnumClassData;
5359 struct __ecereNameSpace__ecere__com__EnumClassData
5361 struct __ecereNameSpace__ecere__sys__OldList values;
5363 } __attribute__ ((gcc_struct));
5365 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink;
5367 struct __ecereNameSpace__ecere__sys__NamedLink
5369 struct __ecereNameSpace__ecere__sys__NamedLink * prev;
5370 struct __ecereNameSpace__ecere__sys__NamedLink * next;
5373 } __attribute__ ((gcc_struct));
5375 extern void FreeExpContents(struct Expression * exp);
5377 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
5379 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
5381 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
5383 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
5385 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
5387 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5389 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
5391 for(link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&nameSpace->classes); link; link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)link)))
5393 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
5395 if(_class->type == 4)
5397 struct __ecereNameSpace__ecere__sys__OldList converts =
5401 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5405 _class->symbol = FindClass(_class->fullName);
5406 type->__anon1._class = _class->symbol;
5407 if(MatchTypes(type, dest, &converts, (((void *)0)), (((void *)0)), 0x1, 0x0, 0x0, 0x0, 0x0))
5409 struct __ecereNameSpace__ecere__sys__NamedLink * value;
5410 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5414 struct __ecereNameSpace__ecere__com__Class * baseClass;
5416 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
5418 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
5420 for(value = e->values.first; value; value = value->next)
5422 if(!strcmp(value->name, string))
5427 FreeExpContents(sourceExp);
5428 FreeType(sourceExp->expType);
5429 sourceExp->isConstant = 0x1;
5430 sourceExp->expType = MkClassType(baseClass->fullName);
5434 sourceExp->type = 2;
5435 if(!strcmp(baseClass->dataTypeString, "int"))
5436 sprintf(constant, "%d", (int)value->data);
5438 sprintf(constant, "0x%X", (int)value->data);
5439 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5441 while(converts.first)
5443 struct Conversion * convert = converts.first;
5445 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
5446 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
5448 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5455 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
5456 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5459 for(nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(&nameSpace->nameSpaces); nameSpace != (((void *)0)); nameSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)nameSpace)))
5460 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
5465 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SubModule;
5467 struct __ecereNameSpace__ecere__com__SubModule
5469 struct __ecereNameSpace__ecere__com__SubModule * prev;
5470 struct __ecereNameSpace__ecere__com__SubModule * next;
5471 struct __ecereNameSpace__ecere__com__Instance * module;
5473 } __attribute__ ((gcc_struct));
5475 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
5477 struct __ecereNameSpace__ecere__com__SubModule * subModule;
5479 if(searchFor == searchIn)
5481 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
5483 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->application)
5485 if(ModuleVisibility(subModule->module, searchFor))
5492 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
5494 struct __ecereNameSpace__ecere__com__Application
5497 const char * * argv;
5499 unsigned int isGUIApp;
5500 struct __ecereNameSpace__ecere__sys__OldList allModules;
5501 char * parsedCommand;
5502 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
5503 } __attribute__ ((gcc_struct));
5505 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5507 struct __ecereNameSpace__ecere__com__Instance * module;
5509 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Module)))->systemNameSpace, sourceExp, dest, string, conversions))
5511 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Instance)))->privateNameSpace, sourceExp, dest, string, conversions))
5513 if(MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
5515 for(module = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)mainModule + structSize_Instance)))->application + structSize_Module)))->allModules.first; module; module = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->next)
5517 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
5523 extern struct Expression * CopyExpression(struct Expression * exp);
5525 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
5527 void ReadString(char * output, char * string);
5529 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
5531 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
5533 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
5535 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
5537 struct Type * source;
5538 struct Type * realDest = dest;
5539 struct Type * backupSourceExpType = (((void *)0));
5540 struct Expression * computedExp = sourceExp;
5543 if(sourceExp->isConstant && sourceExp->type != 2 && sourceExp->type != 0 && sourceExp->type != 11 && dest->kind == 8 && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5545 computedExp = CopyExpression(sourceExp);
5546 ComputeExpression(computedExp);
5548 source = sourceExp->expType;
5549 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
5551 if(computedExp != sourceExp)
5553 FreeExpression(computedExp);
5554 computedExp = sourceExp;
5559 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
5561 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
5563 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
5565 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
5567 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
5569 if(sourceBase == destBase)
5571 if(computedExp != sourceExp)
5573 FreeExpression(computedExp);
5574 computedExp = sourceExp;
5583 struct __ecereNameSpace__ecere__sys__OldList * specs;
5584 unsigned int flag = 0x0;
5585 long long value = (((int)0x7fffffff));
5588 if(computedExp->type == 2)
5590 if(source->isSigned)
5591 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5593 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5595 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
5597 if(source->isSigned)
5598 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5600 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5602 if(computedExp != sourceExp)
5604 FreeExpression(computedExp);
5605 computedExp = sourceExp;
5607 if(dest->kind != 8 && source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && !strcmp(source->__anon1._class->__anon1.registered->fullName, "ecere::com::unichar"))
5610 source = __extension__ ({
5611 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5613 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0x0, __ecereInstance1->refCount = 1, __ecereInstance1;
5618 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5620 if(_class && _class->type == 3)
5622 if(source->kind != 8)
5624 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5625 struct Type * tempDest, * tempSource;
5627 for(; _class->base->type != 1000; _class = _class->base)
5630 tempDest = tempType;
5633 _class->symbol = FindClass(_class->fullName);
5634 tempType->__anon1._class = _class->symbol;
5635 tempType->truth = dest->truth;
5636 if(tempType->__anon1._class)
5637 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
5638 backupSourceExpType = sourceExp->expType;
5639 sourceExp->expType = dest;
5642 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5645 if(_class && _class->type == 2 && source->kind != 8)
5647 if(!dest->__anon1._class->__anon1.registered->dataType)
5648 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5649 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5652 FreeType(sourceExp->expType);
5653 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
5657 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
5659 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
5660 struct Declarator * decl;
5663 ReadString(string, sourceExp->__anon1.__anon2.string);
5664 decl = SpecDeclFromString(string, specs, (((void *)0)));
5665 FreeExpContents(sourceExp);
5666 FreeType(sourceExp->expType);
5667 sourceExp->type = 24;
5668 sourceExp->__anon1._classExp.specifiers = specs;
5669 sourceExp->__anon1._classExp.decl = decl;
5670 sourceExp->expType = dest;
5674 if(backupSourceExpType)
5675 FreeType(backupSourceExpType);
5679 else if(source->kind == 8)
5681 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
5683 if(_class && (_class->type == 3 || _class->type == 2))
5687 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5688 struct Type * tempDest, * tempSource;
5690 if(!source->__anon1._class->__anon1.registered->dataType)
5691 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0x0);
5692 for(; _class->base->type != 1000; _class = _class->base)
5695 tempSource = tempType;
5697 tempType->__anon1._class = FindClass(_class->fullName);
5698 tempType->truth = source->truth;
5699 tempType->classObjectType = source->classObjectType;
5700 if(tempType->__anon1._class)
5701 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
5702 if(conversions->last)
5704 ((struct Conversion *)conversions->last)->resultType = dest;
5707 FreeType(sourceExp->expType);
5708 sourceExp->expType = MkClassType(_class->fullName);
5709 sourceExp->expType->truth = source->truth;
5710 sourceExp->expType->classObjectType = source->classObjectType;
5711 if(!sourceExp->destType)
5713 FreeType(sourceExp->destType);
5714 sourceExp->destType = sourceExp->expType;
5715 if(sourceExp->expType)
5716 sourceExp->expType->refCount++;
5718 if(!_class->dataType)
5719 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
5721 dest = MkClassType(source->__anon1._class->string);
5722 dest->truth = source->truth;
5723 dest->classObjectType = source->classObjectType;
5725 source = _class->dataType;
5727 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5733 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst))
5742 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5743 unsigned int fittingValue = 0x0;
5745 if(_class && _class->type == 4)
5747 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5748 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5750 if(c && value >= 0 && value <= c->largest)
5753 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
5755 if(_class->type == 0 || _class->type == 5)
5757 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5759 *newExp = *sourceExp;
5760 if(sourceExp->destType)
5761 sourceExp->destType->refCount++;
5762 if(sourceExp->expType)
5763 sourceExp->expType->refCount++;
5764 sourceExp->type = 11;
5765 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
5766 sourceExp->__anon1.cast.exp = newExp;
5767 FreeType(sourceExp->expType);
5768 sourceExp->expType = (((void *)0));
5769 ProcessExpressionType(sourceExp);
5772 FreeType(sourceExp->expType);
5773 sourceExp->expType = dest;
5778 if(backupSourceExpType)
5779 FreeType(backupSourceExpType);
5782 if(!_class->dataType)
5783 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
5785 dest = _class->dataType;
5788 if(dest->kind == 7 && (source->kind == 7 || source->kind == 6 || dest->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24))
5790 specs = MkListOne(MkSpecifier(DOUBLE));
5792 else if(dest->kind == 6 && (source->kind == 6 || dest->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 7))
5794 specs = MkListOne(MkSpecifier(FLOAT));
5796 else if(dest->kind == 4 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
5800 ListAdd(specs, MkSpecifier(UNSIGNED));
5801 ListAdd(specs, MkSpecifier(INT64));
5803 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
5807 ListAdd(specs, MkSpecifier(UNSIGNED));
5808 ListAdd(specs, MkSpecifier(INT));
5810 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5814 ListAdd(specs, MkSpecifier(UNSIGNED));
5815 ListAdd(specs, MkSpecifier(SHORT));
5817 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5821 ListAdd(specs, MkSpecifier(UNSIGNED));
5822 ListAdd(specs, MkSpecifier(CHAR));
5828 if(backupSourceExpType)
5830 if(sourceExp->expType)
5831 FreeType(sourceExp->expType);
5832 sourceExp->expType = backupSourceExpType;
5837 else if(dest->kind == 7 && (source->kind == 7 || source->kind == 6 || source->kind == 4 || source->kind == 3 || source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5839 specs = MkListOne(MkSpecifier(DOUBLE));
5841 else if(dest->kind == 6 && (source->kind == 6 || source->kind == 15 || source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5843 specs = MkListOne(MkSpecifier(FLOAT));
5845 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
5848 ListAdd(specs, MkSpecifier(BOOL));
5850 else if(dest->kind == 1 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (dest->isSigned ? (value >= -128 && value <= 127) : (value >= 0 && value <= 255)))
5854 ListAdd(specs, MkSpecifier(UNSIGNED));
5855 ListAdd(specs, MkSpecifier(CHAR));
5857 else if(dest->kind == 2 && (source->kind == 15 || source->kind == 24 || source->kind == 1 || source->kind == 2 || (source->kind == 3 && (dest->isSigned ? (value >= -32768 && value <= 32767) : (value >= 0 && value <= 65535)))))
5861 ListAdd(specs, MkSpecifier(UNSIGNED));
5862 ListAdd(specs, MkSpecifier(SHORT));
5864 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
5868 ListAdd(specs, MkSpecifier(UNSIGNED));
5869 ListAdd(specs, MkSpecifier(INT));
5871 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
5875 ListAdd(specs, MkSpecifier(UNSIGNED));
5876 ListAdd(specs, MkSpecifier(INT64));
5878 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5880 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
5886 if(backupSourceExpType)
5888 if(sourceExp->expType)
5889 FreeType(sourceExp->expType);
5890 sourceExp->expType = backupSourceExpType;
5894 if(!flag && !sourceExp->opDestType)
5896 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5898 *newExp = *sourceExp;
5899 newExp->prev = (((void *)0));
5900 newExp->next = (((void *)0));
5901 if(sourceExp->destType)
5902 sourceExp->destType->refCount++;
5903 if(sourceExp->expType)
5904 sourceExp->expType->refCount++;
5905 sourceExp->type = 11;
5906 if(realDest->kind == 8)
5908 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
5909 FreeList(specs, FreeSpecifier);
5912 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
5913 if(newExp->type == 4)
5915 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
5918 sourceExp->__anon1.cast.exp = newExp;
5919 FreeType(sourceExp->expType);
5920 sourceExp->expType = (((void *)0));
5921 ProcessExpressionType(sourceExp);
5924 FreeList(specs, FreeSpecifier);
5927 if(backupSourceExpType)
5928 FreeType(backupSourceExpType);
5933 if(computedExp != sourceExp)
5935 FreeExpression(computedExp);
5936 computedExp = sourceExp;
5938 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
5939 sourceExp = (*sourceExp->__anon1.list).last;
5940 if(sourceExp->type == 0)
5942 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
5946 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5948 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
5949 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5953 for(; _class && _class->type == 4; _class = _class->base)
5955 struct __ecereNameSpace__ecere__sys__NamedLink * value;
5956 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5958 for(value = e->values.first; value; value = value->next)
5960 if(!strcmp(value->name, id->string))
5965 FreeExpContents(sourceExp);
5966 FreeType(sourceExp->expType);
5967 sourceExp->isConstant = 0x1;
5968 sourceExp->expType = MkClassType(_class->fullName);
5972 sourceExp->type = 2;
5973 if(_class->dataTypeString && !strcmp(_class->dataTypeString, "int"))
5974 sprintf(constant, "%d", (int)value->data);
5976 sprintf(constant, "0x%X", (int)value->data);
5977 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5986 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
5997 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
5999 int value2 = op2->__anon1.i;
6002 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
6005 exp->expType = op1->type;
6007 op1->type->refCount++;
6012 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6014 unsigned int value2 = op2->__anon1.ui;
6017 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
6020 exp->expType = op1->type;
6022 op1->type->refCount++;
6027 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6029 long long value2 = op2->__anon1.i64;
6032 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
6035 exp->expType = op1->type;
6037 op1->type->refCount++;
6042 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6044 uint64 value2 = op2->__anon1.ui64;
6047 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
6050 exp->expType = op1->type;
6052 op1->type->refCount++;
6057 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6059 short value2 = op2->__anon1.s;
6062 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
6065 exp->expType = op1->type;
6067 op1->type->refCount++;
6072 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6074 unsigned short value2 = op2->__anon1.us;
6077 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
6080 exp->expType = op1->type;
6082 op1->type->refCount++;
6087 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6089 char value2 = op2->__anon1.c;
6092 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
6095 exp->expType = op1->type;
6097 op1->type->refCount++;
6102 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6104 unsigned char value2 = op2->__anon1.uc;
6107 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
6110 exp->expType = op1->type;
6112 op1->type->refCount++;
6117 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6119 float value2 = op2->__anon1.f;
6122 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
6125 exp->expType = op1->type;
6127 op1->type->refCount++;
6132 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6134 double value2 = op2->__anon1.d;
6137 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
6140 exp->expType = op1->type;
6142 op1->type->refCount++;
6147 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6149 int value2 = op2->__anon1.i;
6152 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
6155 exp->expType = op1->type;
6157 op1->type->refCount++;
6162 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6164 unsigned int value2 = op2->__anon1.ui;
6167 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
6170 exp->expType = op1->type;
6172 op1->type->refCount++;
6177 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6179 long long value2 = op2->__anon1.i64;
6182 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
6185 exp->expType = op1->type;
6187 op1->type->refCount++;
6192 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6194 uint64 value2 = op2->__anon1.ui64;
6197 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
6200 exp->expType = op1->type;
6202 op1->type->refCount++;
6207 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6209 short value2 = op2->__anon1.s;
6212 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
6215 exp->expType = op1->type;
6217 op1->type->refCount++;
6222 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6224 unsigned short value2 = op2->__anon1.us;
6227 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
6230 exp->expType = op1->type;
6232 op1->type->refCount++;
6237 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6239 char value2 = op2->__anon1.c;
6242 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
6245 exp->expType = op1->type;
6247 op1->type->refCount++;
6252 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6254 unsigned char value2 = op2->__anon1.uc;
6257 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
6260 exp->expType = op1->type;
6262 op1->type->refCount++;
6267 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6269 float value2 = op2->__anon1.f;
6272 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
6275 exp->expType = op1->type;
6277 op1->type->refCount++;
6282 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6284 double value2 = op2->__anon1.d;
6287 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
6290 exp->expType = op1->type;
6292 op1->type->refCount++;
6297 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6299 int value2 = op2->__anon1.i;
6302 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
6305 exp->expType = op1->type;
6307 op1->type->refCount++;
6312 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6314 unsigned int value2 = op2->__anon1.ui;
6317 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
6320 exp->expType = op1->type;
6322 op1->type->refCount++;
6327 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6329 long long value2 = op2->__anon1.i64;
6332 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
6335 exp->expType = op1->type;
6337 op1->type->refCount++;
6342 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6344 uint64 value2 = op2->__anon1.ui64;
6347 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
6350 exp->expType = op1->type;
6352 op1->type->refCount++;
6357 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6359 short value2 = op2->__anon1.s;
6362 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
6365 exp->expType = op1->type;
6367 op1->type->refCount++;
6372 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6374 unsigned short value2 = op2->__anon1.us;
6377 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
6380 exp->expType = op1->type;
6382 op1->type->refCount++;
6387 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6389 char value2 = op2->__anon1.c;
6392 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
6395 exp->expType = op1->type;
6397 op1->type->refCount++;
6402 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6404 unsigned char value2 = op2->__anon1.uc;
6407 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
6410 exp->expType = op1->type;
6412 op1->type->refCount++;
6417 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6419 float value2 = op2->__anon1.f;
6422 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
6425 exp->expType = op1->type;
6427 op1->type->refCount++;
6432 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6434 double value2 = op2->__anon1.d;
6437 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
6440 exp->expType = op1->type;
6442 op1->type->refCount++;
6447 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6449 int value2 = op2->__anon1.i;
6452 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
6455 exp->expType = op1->type;
6457 op1->type->refCount++;
6462 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6464 unsigned int value2 = op2->__anon1.ui;
6467 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
6470 exp->expType = op1->type;
6472 op1->type->refCount++;
6477 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6479 long long value2 = op2->__anon1.i64;
6482 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
6485 exp->expType = op1->type;
6487 op1->type->refCount++;
6492 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6494 uint64 value2 = op2->__anon1.ui64;
6497 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
6500 exp->expType = op1->type;
6502 op1->type->refCount++;
6507 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6509 short value2 = op2->__anon1.s;
6512 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
6515 exp->expType = op1->type;
6517 op1->type->refCount++;
6522 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6524 unsigned short value2 = op2->__anon1.us;
6527 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
6530 exp->expType = op1->type;
6532 op1->type->refCount++;
6537 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6539 char value2 = op2->__anon1.c;
6542 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
6545 exp->expType = op1->type;
6547 op1->type->refCount++;
6552 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6554 unsigned char value2 = op2->__anon1.uc;
6557 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
6560 exp->expType = op1->type;
6562 op1->type->refCount++;
6567 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6569 float value2 = op2->__anon1.f;
6572 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
6575 exp->expType = op1->type;
6577 op1->type->refCount++;
6582 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6584 double value2 = op2->__anon1.d;
6587 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
6590 exp->expType = op1->type;
6592 op1->type->refCount++;
6597 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6599 int value2 = op2->__anon1.i;
6602 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
6605 exp->expType = op1->type;
6607 op1->type->refCount++;
6612 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6614 unsigned int value2 = op2->__anon1.ui;
6617 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
6620 exp->expType = op1->type;
6622 op1->type->refCount++;
6627 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6629 long long value2 = op2->__anon1.i64;
6632 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
6635 exp->expType = op1->type;
6637 op1->type->refCount++;
6642 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6644 uint64 value2 = op2->__anon1.ui64;
6647 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
6650 exp->expType = op1->type;
6652 op1->type->refCount++;
6657 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6659 short value2 = op2->__anon1.s;
6662 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
6665 exp->expType = op1->type;
6667 op1->type->refCount++;
6672 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6674 unsigned short value2 = op2->__anon1.us;
6677 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
6680 exp->expType = op1->type;
6682 op1->type->refCount++;
6687 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6689 char value2 = op2->__anon1.c;
6692 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
6695 exp->expType = op1->type;
6697 op1->type->refCount++;
6702 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6704 unsigned char value2 = op2->__anon1.uc;
6707 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
6710 exp->expType = op1->type;
6712 op1->type->refCount++;
6717 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
6720 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
6723 exp->expType = op1->type;
6725 op1->type->refCount++;
6730 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
6733 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
6736 exp->expType = op1->type;
6738 op1->type->refCount++;
6743 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
6746 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
6749 exp->expType = op1->type;
6751 op1->type->refCount++;
6756 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
6759 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
6762 exp->expType = op1->type;
6764 op1->type->refCount++;
6769 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
6772 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
6775 exp->expType = op1->type;
6777 op1->type->refCount++;
6782 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
6785 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
6788 exp->expType = op1->type;
6790 op1->type->refCount++;
6795 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
6798 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
6801 exp->expType = op1->type;
6803 op1->type->refCount++;
6808 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
6811 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
6814 exp->expType = op1->type;
6816 op1->type->refCount++;
6821 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
6824 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
6827 exp->expType = op1->type;
6829 op1->type->refCount++;
6834 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
6837 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
6840 exp->expType = op1->type;
6842 op1->type->refCount++;
6847 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
6850 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
6853 exp->expType = op1->type;
6855 op1->type->refCount++;
6860 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
6863 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
6866 exp->expType = op1->type;
6868 op1->type->refCount++;
6873 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
6876 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
6879 exp->expType = op1->type;
6881 op1->type->refCount++;
6886 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
6889 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
6892 exp->expType = op1->type;
6894 op1->type->refCount++;
6899 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
6902 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
6905 exp->expType = op1->type;
6907 op1->type->refCount++;
6912 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
6915 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
6918 exp->expType = op1->type;
6920 op1->type->refCount++;
6925 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
6928 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
6931 exp->expType = op1->type;
6933 op1->type->refCount++;
6938 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
6941 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
6944 exp->expType = op1->type;
6946 op1->type->refCount++;
6951 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
6954 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
6957 exp->expType = op1->type;
6959 op1->type->refCount++;
6964 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
6967 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
6970 exp->expType = op1->type;
6972 op1->type->refCount++;
6977 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
6980 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
6983 exp->expType = op1->type;
6985 op1->type->refCount++;
6990 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
6993 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
6996 exp->expType = op1->type;
6998 op1->type->refCount++;
7003 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
7006 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
7009 exp->expType = op1->type;
7011 op1->type->refCount++;
7016 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
7019 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
7022 exp->expType = op1->type;
7024 op1->type->refCount++;
7029 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
7032 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
7035 exp->expType = op1->type;
7037 op1->type->refCount++;
7042 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
7045 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
7048 exp->expType = op1->type;
7050 op1->type->refCount++;
7055 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
7058 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
7061 exp->expType = op1->type;
7063 op1->type->refCount++;
7068 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
7071 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
7074 exp->expType = op1->type;
7076 op1->type->refCount++;
7081 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
7084 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
7087 exp->expType = op1->type;
7089 op1->type->refCount++;
7094 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
7097 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
7100 exp->expType = op1->type;
7102 op1->type->refCount++;
7107 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7109 int value2 = op2->__anon1.i;
7112 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
7115 exp->expType = op1->type;
7117 op1->type->refCount++;
7122 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7124 unsigned int value2 = op2->__anon1.ui;
7127 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
7130 exp->expType = op1->type;
7132 op1->type->refCount++;
7137 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7139 long long value2 = op2->__anon1.i64;
7142 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
7145 exp->expType = op1->type;
7147 op1->type->refCount++;
7152 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7154 uint64 value2 = op2->__anon1.ui64;
7157 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
7160 exp->expType = op1->type;
7162 op1->type->refCount++;
7167 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7169 short value2 = op2->__anon1.s;
7172 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
7175 exp->expType = op1->type;
7177 op1->type->refCount++;
7182 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7184 unsigned short value2 = op2->__anon1.us;
7187 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
7190 exp->expType = op1->type;
7192 op1->type->refCount++;
7197 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7199 char value2 = op2->__anon1.c;
7202 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
7205 exp->expType = op1->type;
7207 op1->type->refCount++;
7212 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7214 unsigned char value2 = op2->__anon1.uc;
7217 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
7220 exp->expType = op1->type;
7222 op1->type->refCount++;
7227 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7229 float value2 = op2->__anon1.f;
7232 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
7235 exp->expType = op1->type;
7237 op1->type->refCount++;
7242 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7244 double value2 = op2->__anon1.d;
7247 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
7250 exp->expType = op1->type;
7252 op1->type->refCount++;
7257 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7259 int value2 = op2->__anon1.i;
7262 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
7265 exp->expType = op1->type;
7267 op1->type->refCount++;
7272 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7274 unsigned int value2 = op2->__anon1.ui;
7277 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
7280 exp->expType = op1->type;
7282 op1->type->refCount++;
7287 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7289 long long value2 = op2->__anon1.i64;
7292 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
7295 exp->expType = op1->type;
7297 op1->type->refCount++;
7302 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7304 uint64 value2 = op2->__anon1.ui64;
7307 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
7310 exp->expType = op1->type;
7312 op1->type->refCount++;
7317 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7319 short value2 = op2->__anon1.s;
7322 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
7325 exp->expType = op1->type;
7327 op1->type->refCount++;
7332 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7334 unsigned short value2 = op2->__anon1.us;
7337 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
7340 exp->expType = op1->type;
7342 op1->type->refCount++;
7347 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7349 char value2 = op2->__anon1.c;
7352 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
7355 exp->expType = op1->type;
7357 op1->type->refCount++;
7362 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7364 unsigned char value2 = op2->__anon1.uc;
7367 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
7370 exp->expType = op1->type;
7372 op1->type->refCount++;
7377 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7379 float value2 = op2->__anon1.f;
7382 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
7385 exp->expType = op1->type;
7387 op1->type->refCount++;
7392 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7394 double value2 = op2->__anon1.d;
7397 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
7400 exp->expType = op1->type;
7402 op1->type->refCount++;
7407 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7409 int value2 = op2->__anon1.i;
7412 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
7415 exp->expType = op1->type;
7417 op1->type->refCount++;
7422 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7424 unsigned int value2 = op2->__anon1.ui;
7427 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
7430 exp->expType = op1->type;
7432 op1->type->refCount++;
7437 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7439 long long value2 = op2->__anon1.i64;
7442 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
7445 exp->expType = op1->type;
7447 op1->type->refCount++;
7452 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7454 uint64 value2 = op2->__anon1.ui64;
7457 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
7460 exp->expType = op1->type;
7462 op1->type->refCount++;
7467 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7469 short value2 = op2->__anon1.s;
7472 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
7475 exp->expType = op1->type;
7477 op1->type->refCount++;
7482 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7484 unsigned short value2 = op2->__anon1.us;
7487 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
7490 exp->expType = op1->type;
7492 op1->type->refCount++;
7497 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7499 char value2 = op2->__anon1.c;
7502 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
7505 exp->expType = op1->type;
7507 op1->type->refCount++;
7512 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7514 unsigned char value2 = op2->__anon1.uc;
7517 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
7520 exp->expType = op1->type;
7522 op1->type->refCount++;
7527 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7529 float value2 = op2->__anon1.f;
7532 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
7535 exp->expType = op1->type;
7537 op1->type->refCount++;
7542 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7544 double value2 = op2->__anon1.d;
7547 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
7550 exp->expType = op1->type;
7552 op1->type->refCount++;
7557 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7559 int value2 = op2->__anon1.i;
7562 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
7565 exp->expType = op1->type;
7567 op1->type->refCount++;
7572 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7574 unsigned int value2 = op2->__anon1.ui;
7577 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
7580 exp->expType = op1->type;
7582 op1->type->refCount++;
7587 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7589 long long value2 = op2->__anon1.i64;
7592 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
7595 exp->expType = op1->type;
7597 op1->type->refCount++;
7602 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7604 uint64 value2 = op2->__anon1.ui64;
7607 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
7610 exp->expType = op1->type;
7612 op1->type->refCount++;
7617 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7619 short value2 = op2->__anon1.s;
7622 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
7625 exp->expType = op1->type;
7627 op1->type->refCount++;
7632 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7634 unsigned short value2 = op2->__anon1.us;
7637 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
7640 exp->expType = op1->type;
7642 op1->type->refCount++;
7647 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7649 char value2 = op2->__anon1.c;
7652 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
7655 exp->expType = op1->type;
7657 op1->type->refCount++;
7662 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7664 unsigned char value2 = op2->__anon1.uc;
7667 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
7670 exp->expType = op1->type;
7672 op1->type->refCount++;
7677 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7679 float value2 = op2->__anon1.f;
7682 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
7685 exp->expType = op1->type;
7687 op1->type->refCount++;
7692 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7694 double value2 = op2->__anon1.d;
7697 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
7700 exp->expType = op1->type;
7702 op1->type->refCount++;
7707 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7709 int value2 = op2->__anon1.i;
7712 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
7715 exp->expType = op1->type;
7717 op1->type->refCount++;
7722 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7724 unsigned int value2 = op2->__anon1.ui;
7727 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
7730 exp->expType = op1->type;
7732 op1->type->refCount++;
7737 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7739 long long value2 = op2->__anon1.i64;
7742 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
7745 exp->expType = op1->type;
7747 op1->type->refCount++;
7752 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7754 uint64 value2 = op2->__anon1.ui64;
7757 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
7760 exp->expType = op1->type;
7762 op1->type->refCount++;
7767 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7769 short value2 = op2->__anon1.s;
7772 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
7775 exp->expType = op1->type;
7777 op1->type->refCount++;
7782 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7784 unsigned short value2 = op2->__anon1.us;
7787 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
7790 exp->expType = op1->type;
7792 op1->type->refCount++;
7797 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7799 char value2 = op2->__anon1.c;
7802 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
7805 exp->expType = op1->type;
7807 op1->type->refCount++;
7812 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7814 unsigned char value2 = op2->__anon1.uc;
7817 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
7820 exp->expType = op1->type;
7822 op1->type->refCount++;
7827 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7829 float value2 = op2->__anon1.f;
7832 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
7835 exp->expType = op1->type;
7837 op1->type->refCount++;
7842 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7844 double value2 = op2->__anon1.d;
7847 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
7850 exp->expType = op1->type;
7852 op1->type->refCount++;
7857 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7859 int value2 = op2->__anon1.i;
7862 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
7865 exp->expType = op1->type;
7867 op1->type->refCount++;
7872 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7874 unsigned int value2 = op2->__anon1.ui;
7877 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
7880 exp->expType = op1->type;
7882 op1->type->refCount++;
7887 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7889 long long value2 = op2->__anon1.i64;
7892 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
7895 exp->expType = op1->type;
7897 op1->type->refCount++;
7902 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7904 uint64 value2 = op2->__anon1.ui64;
7907 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
7910 exp->expType = op1->type;
7912 op1->type->refCount++;
7917 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7919 short value2 = op2->__anon1.s;
7922 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
7925 exp->expType = op1->type;
7927 op1->type->refCount++;
7932 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7934 unsigned short value2 = op2->__anon1.us;
7937 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
7940 exp->expType = op1->type;
7942 op1->type->refCount++;
7947 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7949 char value2 = op2->__anon1.c;
7952 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
7955 exp->expType = op1->type;
7957 op1->type->refCount++;
7962 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7964 unsigned char value2 = op2->__anon1.uc;
7967 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
7970 exp->expType = op1->type;
7972 op1->type->refCount++;
7977 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7979 int value2 = op2->__anon1.i;
7982 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
7985 exp->expType = op1->type;
7987 op1->type->refCount++;
7992 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7994 unsigned int value2 = op2->__anon1.ui;
7997 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
8000 exp->expType = op1->type;
8002 op1->type->refCount++;
8007 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8009 long long value2 = op2->__anon1.i64;
8012 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
8015 exp->expType = op1->type;
8017 op1->type->refCount++;
8022 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8024 uint64 value2 = op2->__anon1.ui64;
8027 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
8030 exp->expType = op1->type;
8032 op1->type->refCount++;
8037 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8039 short value2 = op2->__anon1.s;
8042 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
8045 exp->expType = op1->type;
8047 op1->type->refCount++;
8052 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8054 unsigned short value2 = op2->__anon1.us;
8057 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
8060 exp->expType = op1->type;
8062 op1->type->refCount++;
8067 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8069 char value2 = op2->__anon1.c;
8072 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
8075 exp->expType = op1->type;
8077 op1->type->refCount++;
8082 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8084 unsigned char value2 = op2->__anon1.uc;
8087 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
8090 exp->expType = op1->type;
8092 op1->type->refCount++;
8097 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8099 int value2 = op2->__anon1.i;
8102 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
8105 exp->expType = op1->type;
8107 op1->type->refCount++;
8112 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8114 unsigned int value2 = op2->__anon1.ui;
8117 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
8120 exp->expType = op1->type;
8122 op1->type->refCount++;
8127 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8129 long long value2 = op2->__anon1.i64;
8132 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
8135 exp->expType = op1->type;
8137 op1->type->refCount++;
8142 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8144 uint64 value2 = op2->__anon1.ui64;
8147 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
8150 exp->expType = op1->type;
8152 op1->type->refCount++;
8157 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8159 short value2 = op2->__anon1.s;
8162 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
8165 exp->expType = op1->type;
8167 op1->type->refCount++;
8172 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8174 unsigned short value2 = op2->__anon1.us;
8177 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
8180 exp->expType = op1->type;
8182 op1->type->refCount++;
8187 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8189 char value2 = op2->__anon1.c;
8192 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
8195 exp->expType = op1->type;
8197 op1->type->refCount++;
8202 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8204 unsigned char value2 = op2->__anon1.uc;
8207 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
8210 exp->expType = op1->type;
8212 op1->type->refCount++;
8217 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8219 int value2 = op2->__anon1.i;
8222 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
8225 exp->expType = op1->type;
8227 op1->type->refCount++;
8232 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8234 unsigned int value2 = op2->__anon1.ui;
8237 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
8240 exp->expType = op1->type;
8242 op1->type->refCount++;
8247 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8249 long long value2 = op2->__anon1.i64;
8252 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
8255 exp->expType = op1->type;
8257 op1->type->refCount++;
8262 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8264 uint64 value2 = op2->__anon1.ui64;
8267 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
8270 exp->expType = op1->type;
8272 op1->type->refCount++;
8277 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8279 short value2 = op2->__anon1.s;
8282 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
8285 exp->expType = op1->type;
8287 op1->type->refCount++;
8292 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8294 unsigned short value2 = op2->__anon1.us;
8297 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
8300 exp->expType = op1->type;
8302 op1->type->refCount++;
8307 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8309 char value2 = op2->__anon1.c;
8312 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
8315 exp->expType = op1->type;
8317 op1->type->refCount++;
8322 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8324 unsigned char value2 = op2->__anon1.uc;
8327 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
8330 exp->expType = op1->type;
8332 op1->type->refCount++;
8337 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8339 int value2 = op2->__anon1.i;
8342 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
8345 exp->expType = op1->type;
8347 op1->type->refCount++;
8352 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8354 unsigned int value2 = op2->__anon1.ui;
8357 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
8360 exp->expType = op1->type;
8362 op1->type->refCount++;
8367 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8369 long long value2 = op2->__anon1.i64;
8372 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
8375 exp->expType = op1->type;
8377 op1->type->refCount++;
8382 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8384 uint64 value2 = op2->__anon1.ui64;
8387 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
8390 exp->expType = op1->type;
8392 op1->type->refCount++;
8397 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8399 short value2 = op2->__anon1.s;
8402 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
8405 exp->expType = op1->type;
8407 op1->type->refCount++;
8412 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8414 unsigned short value2 = op2->__anon1.us;
8417 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
8420 exp->expType = op1->type;
8422 op1->type->refCount++;
8427 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8429 char value2 = op2->__anon1.c;
8432 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
8435 exp->expType = op1->type;
8437 op1->type->refCount++;
8442 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8444 unsigned char value2 = op2->__anon1.uc;
8447 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
8450 exp->expType = op1->type;
8452 op1->type->refCount++;
8457 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8459 int value2 = op2->__anon1.i;
8462 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
8465 exp->expType = op1->type;
8467 op1->type->refCount++;
8472 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8474 unsigned int value2 = op2->__anon1.ui;
8477 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
8480 exp->expType = op1->type;
8482 op1->type->refCount++;
8487 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8489 long long value2 = op2->__anon1.i64;
8492 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
8495 exp->expType = op1->type;
8497 op1->type->refCount++;
8502 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8504 uint64 value2 = op2->__anon1.ui64;
8507 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
8510 exp->expType = op1->type;
8512 op1->type->refCount++;
8517 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8519 short value2 = op2->__anon1.s;
8522 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
8525 exp->expType = op1->type;
8527 op1->type->refCount++;
8532 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8534 unsigned short value2 = op2->__anon1.us;
8537 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
8540 exp->expType = op1->type;
8542 op1->type->refCount++;
8547 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8549 char value2 = op2->__anon1.c;
8552 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
8555 exp->expType = op1->type;
8557 op1->type->refCount++;
8562 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8564 unsigned char value2 = op2->__anon1.uc;
8567 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
8570 exp->expType = op1->type;
8572 op1->type->refCount++;
8577 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
8580 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
8583 exp->expType = op1->type;
8585 op1->type->refCount++;
8590 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
8593 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
8596 exp->expType = op1->type;
8598 op1->type->refCount++;
8603 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
8606 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
8609 exp->expType = op1->type;
8611 op1->type->refCount++;
8616 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
8619 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
8622 exp->expType = op1->type;
8624 op1->type->refCount++;
8629 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
8632 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
8635 exp->expType = op1->type;
8637 op1->type->refCount++;
8642 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
8645 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
8648 exp->expType = op1->type;
8650 op1->type->refCount++;
8655 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
8658 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
8661 exp->expType = op1->type;
8663 op1->type->refCount++;
8668 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
8671 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
8674 exp->expType = op1->type;
8676 op1->type->refCount++;
8681 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8683 int value2 = op2->__anon1.i;
8686 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
8689 exp->expType = op1->type;
8691 op1->type->refCount++;
8696 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8698 unsigned int value2 = op2->__anon1.ui;
8701 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
8704 exp->expType = op1->type;
8706 op1->type->refCount++;
8711 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8713 long long value2 = op2->__anon1.i64;
8716 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
8719 exp->expType = op1->type;
8721 op1->type->refCount++;
8726 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8728 uint64 value2 = op2->__anon1.ui64;
8731 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
8734 exp->expType = op1->type;
8736 op1->type->refCount++;
8741 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8743 short value2 = op2->__anon1.s;
8746 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
8749 exp->expType = op1->type;
8751 op1->type->refCount++;
8756 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8758 unsigned short value2 = op2->__anon1.us;
8761 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
8764 exp->expType = op1->type;
8766 op1->type->refCount++;
8771 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8773 char value2 = op2->__anon1.c;
8776 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
8779 exp->expType = op1->type;
8781 op1->type->refCount++;
8786 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8788 unsigned char value2 = op2->__anon1.uc;
8791 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
8794 exp->expType = op1->type;
8796 op1->type->refCount++;
8801 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8803 int value2 = op2->__anon1.i;
8806 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
8809 exp->expType = op1->type;
8811 op1->type->refCount++;
8816 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8818 unsigned int value2 = op2->__anon1.ui;
8821 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
8824 exp->expType = op1->type;
8826 op1->type->refCount++;
8831 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8833 long long value2 = op2->__anon1.i64;
8836 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
8839 exp->expType = op1->type;
8841 op1->type->refCount++;
8846 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8848 uint64 value2 = op2->__anon1.ui64;
8851 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
8854 exp->expType = op1->type;
8856 op1->type->refCount++;
8861 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8863 short value2 = op2->__anon1.s;
8866 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
8869 exp->expType = op1->type;
8871 op1->type->refCount++;
8876 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8878 unsigned short value2 = op2->__anon1.us;
8881 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
8884 exp->expType = op1->type;
8886 op1->type->refCount++;
8891 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8893 char value2 = op2->__anon1.c;
8896 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
8899 exp->expType = op1->type;
8901 op1->type->refCount++;
8906 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8908 unsigned char value2 = op2->__anon1.uc;
8911 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
8914 exp->expType = op1->type;
8916 op1->type->refCount++;
8921 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8923 int value2 = op2->__anon1.i;
8926 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
8929 exp->expType = op1->type;
8931 op1->type->refCount++;
8936 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8938 unsigned int value2 = op2->__anon1.ui;
8941 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
8944 exp->expType = op1->type;
8946 op1->type->refCount++;
8951 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8953 long long value2 = op2->__anon1.i64;
8956 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
8959 exp->expType = op1->type;
8961 op1->type->refCount++;
8966 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8968 uint64 value2 = op2->__anon1.ui64;
8971 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
8974 exp->expType = op1->type;
8976 op1->type->refCount++;
8981 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8983 short value2 = op2->__anon1.s;
8986 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
8989 exp->expType = op1->type;
8991 op1->type->refCount++;
8996 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8998 unsigned short value2 = op2->__anon1.us;
9001 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
9004 exp->expType = op1->type;
9006 op1->type->refCount++;
9011 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9013 char value2 = op2->__anon1.c;
9016 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
9019 exp->expType = op1->type;
9021 op1->type->refCount++;
9026 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9028 unsigned char value2 = op2->__anon1.uc;
9031 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
9034 exp->expType = op1->type;
9036 op1->type->refCount++;
9041 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9043 int value2 = op2->__anon1.i;
9046 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
9049 exp->expType = op1->type;
9051 op1->type->refCount++;
9056 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9058 unsigned int value2 = op2->__anon1.ui;
9061 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
9064 exp->expType = op1->type;
9066 op1->type->refCount++;
9071 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9073 long long value2 = op2->__anon1.i64;
9076 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
9079 exp->expType = op1->type;
9081 op1->type->refCount++;
9086 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9088 uint64 value2 = op2->__anon1.ui64;
9091 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
9094 exp->expType = op1->type;
9096 op1->type->refCount++;
9101 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9103 short value2 = op2->__anon1.s;
9106 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
9109 exp->expType = op1->type;
9111 op1->type->refCount++;
9116 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9118 unsigned short value2 = op2->__anon1.us;
9121 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
9124 exp->expType = op1->type;
9126 op1->type->refCount++;
9131 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9133 char value2 = op2->__anon1.c;
9136 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
9139 exp->expType = op1->type;
9141 op1->type->refCount++;
9146 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9148 unsigned char value2 = op2->__anon1.uc;
9151 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
9154 exp->expType = op1->type;
9156 op1->type->refCount++;
9161 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9163 int value2 = op2->__anon1.i;
9166 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
9169 exp->expType = op1->type;
9171 op1->type->refCount++;
9176 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9178 unsigned int value2 = op2->__anon1.ui;
9181 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
9184 exp->expType = op1->type;
9186 op1->type->refCount++;
9191 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9193 long long value2 = op2->__anon1.i64;
9196 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
9199 exp->expType = op1->type;
9201 op1->type->refCount++;
9206 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9208 uint64 value2 = op2->__anon1.ui64;
9211 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
9214 exp->expType = op1->type;
9216 op1->type->refCount++;
9221 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9223 short value2 = op2->__anon1.s;
9226 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
9229 exp->expType = op1->type;
9231 op1->type->refCount++;
9236 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9238 unsigned short value2 = op2->__anon1.us;
9241 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
9244 exp->expType = op1->type;
9246 op1->type->refCount++;
9251 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9253 char value2 = op2->__anon1.c;
9256 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
9259 exp->expType = op1->type;
9261 op1->type->refCount++;
9266 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9268 unsigned char value2 = op2->__anon1.uc;
9271 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
9274 exp->expType = op1->type;
9276 op1->type->refCount++;
9281 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
9284 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
9287 exp->expType = op1->type;
9289 op1->type->refCount++;
9294 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
9297 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
9300 exp->expType = op1->type;
9302 op1->type->refCount++;
9307 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
9310 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
9313 exp->expType = op1->type;
9315 op1->type->refCount++;
9320 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
9323 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
9326 exp->expType = op1->type;
9328 op1->type->refCount++;
9333 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
9336 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
9339 exp->expType = op1->type;
9341 op1->type->refCount++;
9346 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
9349 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
9352 exp->expType = op1->type;
9354 op1->type->refCount++;
9359 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
9362 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
9365 exp->expType = op1->type;
9367 op1->type->refCount++;
9372 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
9375 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
9378 exp->expType = op1->type;
9380 op1->type->refCount++;
9385 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9387 int value2 = op2->__anon1.i;
9390 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
9393 exp->expType = op1->type;
9395 op1->type->refCount++;
9400 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9402 unsigned int value2 = op2->__anon1.ui;
9405 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
9408 exp->expType = op1->type;
9410 op1->type->refCount++;
9415 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9417 long long value2 = op2->__anon1.i64;
9420 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
9423 exp->expType = op1->type;
9425 op1->type->refCount++;
9430 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9432 uint64 value2 = op2->__anon1.ui64;
9435 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
9438 exp->expType = op1->type;
9440 op1->type->refCount++;
9445 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9447 short value2 = op2->__anon1.s;
9450 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
9453 exp->expType = op1->type;
9455 op1->type->refCount++;
9460 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9462 unsigned short value2 = op2->__anon1.us;
9465 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
9468 exp->expType = op1->type;
9470 op1->type->refCount++;
9475 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9477 char value2 = op2->__anon1.c;
9480 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
9483 exp->expType = op1->type;
9485 op1->type->refCount++;
9490 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9492 unsigned char value2 = op2->__anon1.uc;
9495 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
9498 exp->expType = op1->type;
9500 op1->type->refCount++;
9505 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9507 float value2 = op2->__anon1.f;
9510 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
9513 exp->expType = op1->type;
9515 op1->type->refCount++;
9520 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9522 double value2 = op2->__anon1.d;
9525 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
9528 exp->expType = op1->type;
9530 op1->type->refCount++;
9535 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9537 int value2 = op2->__anon1.i;
9540 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
9543 exp->expType = op1->type;
9545 op1->type->refCount++;
9550 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9552 unsigned int value2 = op2->__anon1.ui;
9555 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
9558 exp->expType = op1->type;
9560 op1->type->refCount++;
9565 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9567 long long value2 = op2->__anon1.i64;
9570 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
9573 exp->expType = op1->type;
9575 op1->type->refCount++;
9580 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9582 uint64 value2 = op2->__anon1.ui64;
9585 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
9588 exp->expType = op1->type;
9590 op1->type->refCount++;
9595 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9597 short value2 = op2->__anon1.s;
9600 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
9603 exp->expType = op1->type;
9605 op1->type->refCount++;
9610 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9612 unsigned short value2 = op2->__anon1.us;
9615 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
9618 exp->expType = op1->type;
9620 op1->type->refCount++;
9625 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9627 char value2 = op2->__anon1.c;
9630 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
9633 exp->expType = op1->type;
9635 op1->type->refCount++;
9640 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9642 unsigned char value2 = op2->__anon1.uc;
9645 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
9648 exp->expType = op1->type;
9650 op1->type->refCount++;
9655 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9657 float value2 = op2->__anon1.f;
9660 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
9663 exp->expType = op1->type;
9665 op1->type->refCount++;
9670 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9672 double value2 = op2->__anon1.d;
9675 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
9678 exp->expType = op1->type;
9680 op1->type->refCount++;
9685 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9687 int value2 = op2->__anon1.i;
9690 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
9693 exp->expType = op1->type;
9695 op1->type->refCount++;
9700 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9702 unsigned int value2 = op2->__anon1.ui;
9705 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
9708 exp->expType = op1->type;
9710 op1->type->refCount++;
9715 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9717 long long value2 = op2->__anon1.i64;
9720 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
9723 exp->expType = op1->type;
9725 op1->type->refCount++;
9730 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9732 uint64 value2 = op2->__anon1.ui64;
9735 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
9738 exp->expType = op1->type;
9740 op1->type->refCount++;
9745 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9747 short value2 = op2->__anon1.s;
9750 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
9753 exp->expType = op1->type;
9755 op1->type->refCount++;
9760 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9762 unsigned short value2 = op2->__anon1.us;
9765 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
9768 exp->expType = op1->type;
9770 op1->type->refCount++;
9775 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9777 char value2 = op2->__anon1.c;
9780 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
9783 exp->expType = op1->type;
9785 op1->type->refCount++;
9790 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9792 unsigned char value2 = op2->__anon1.uc;
9795 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
9798 exp->expType = op1->type;
9800 op1->type->refCount++;
9805 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9807 float value2 = op2->__anon1.f;
9810 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
9813 exp->expType = op1->type;
9815 op1->type->refCount++;
9820 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9822 double value2 = op2->__anon1.d;
9825 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
9828 exp->expType = op1->type;
9830 op1->type->refCount++;
9835 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9837 int value2 = op2->__anon1.i;
9840 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
9843 exp->expType = op1->type;
9845 op1->type->refCount++;
9850 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9852 unsigned int value2 = op2->__anon1.ui;
9855 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
9858 exp->expType = op1->type;
9860 op1->type->refCount++;
9865 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9867 long long value2 = op2->__anon1.i64;
9870 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
9873 exp->expType = op1->type;
9875 op1->type->refCount++;
9880 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9882 uint64 value2 = op2->__anon1.ui64;
9885 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
9888 exp->expType = op1->type;
9890 op1->type->refCount++;
9895 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9897 short value2 = op2->__anon1.s;
9900 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
9903 exp->expType = op1->type;
9905 op1->type->refCount++;
9910 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9912 unsigned short value2 = op2->__anon1.us;
9915 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
9918 exp->expType = op1->type;
9920 op1->type->refCount++;
9925 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9927 char value2 = op2->__anon1.c;
9930 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
9933 exp->expType = op1->type;
9935 op1->type->refCount++;
9940 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9942 unsigned char value2 = op2->__anon1.uc;
9945 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
9948 exp->expType = op1->type;
9950 op1->type->refCount++;
9955 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9957 float value2 = op2->__anon1.f;
9960 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
9963 exp->expType = op1->type;
9965 op1->type->refCount++;
9970 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9972 double value2 = op2->__anon1.d;
9975 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
9978 exp->expType = op1->type;
9980 op1->type->refCount++;
9985 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9987 int value2 = op2->__anon1.i;
9990 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
9993 exp->expType = op1->type;
9995 op1->type->refCount++;
10000 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10002 unsigned int value2 = op2->__anon1.ui;
10005 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
10008 exp->expType = op1->type;
10010 op1->type->refCount++;
10015 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10017 long long value2 = op2->__anon1.i64;
10020 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
10023 exp->expType = op1->type;
10025 op1->type->refCount++;
10030 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10032 uint64 value2 = op2->__anon1.ui64;
10035 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
10038 exp->expType = op1->type;
10040 op1->type->refCount++;
10045 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10047 short value2 = op2->__anon1.s;
10050 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
10053 exp->expType = op1->type;
10055 op1->type->refCount++;
10060 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10062 unsigned short value2 = op2->__anon1.us;
10065 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
10068 exp->expType = op1->type;
10070 op1->type->refCount++;
10075 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10077 char value2 = op2->__anon1.c;
10080 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
10083 exp->expType = op1->type;
10085 op1->type->refCount++;
10090 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10092 unsigned char value2 = op2->__anon1.uc;
10095 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
10098 exp->expType = op1->type;
10100 op1->type->refCount++;
10105 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10107 float value2 = op2->__anon1.f;
10110 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
10113 exp->expType = op1->type;
10115 op1->type->refCount++;
10120 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10122 double value2 = op2->__anon1.d;
10125 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
10128 exp->expType = op1->type;
10130 op1->type->refCount++;
10135 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10137 int value2 = op2->__anon1.i;
10140 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
10143 exp->expType = op1->type;
10145 op1->type->refCount++;
10150 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10152 unsigned int value2 = op2->__anon1.ui;
10155 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
10158 exp->expType = op1->type;
10160 op1->type->refCount++;
10165 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10167 long long value2 = op2->__anon1.i64;
10170 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
10173 exp->expType = op1->type;
10175 op1->type->refCount++;
10180 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10182 uint64 value2 = op2->__anon1.ui64;
10185 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
10188 exp->expType = op1->type;
10190 op1->type->refCount++;
10195 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10197 short value2 = op2->__anon1.s;
10200 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
10203 exp->expType = op1->type;
10205 op1->type->refCount++;
10210 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10212 unsigned short value2 = op2->__anon1.us;
10215 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
10218 exp->expType = op1->type;
10220 op1->type->refCount++;
10225 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10227 char value2 = op2->__anon1.c;
10230 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
10233 exp->expType = op1->type;
10235 op1->type->refCount++;
10240 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10242 unsigned char value2 = op2->__anon1.uc;
10245 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
10248 exp->expType = op1->type;
10250 op1->type->refCount++;
10255 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10257 float value2 = op2->__anon1.f;
10260 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
10263 exp->expType = op1->type;
10265 op1->type->refCount++;
10270 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10272 double value2 = op2->__anon1.d;
10275 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
10278 exp->expType = op1->type;
10280 op1->type->refCount++;
10285 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10287 int value2 = op2->__anon1.i;
10290 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
10293 exp->expType = op1->type;
10295 op1->type->refCount++;
10300 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10302 unsigned int value2 = op2->__anon1.ui;
10305 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
10308 exp->expType = op1->type;
10310 op1->type->refCount++;
10315 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10317 long long value2 = op2->__anon1.i64;
10320 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
10323 exp->expType = op1->type;
10325 op1->type->refCount++;
10330 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10332 uint64 value2 = op2->__anon1.ui64;
10335 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
10338 exp->expType = op1->type;
10340 op1->type->refCount++;
10345 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10347 short value2 = op2->__anon1.s;
10350 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
10353 exp->expType = op1->type;
10355 op1->type->refCount++;
10360 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10362 unsigned short value2 = op2->__anon1.us;
10365 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
10368 exp->expType = op1->type;
10370 op1->type->refCount++;
10375 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10377 char value2 = op2->__anon1.c;
10380 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
10383 exp->expType = op1->type;
10385 op1->type->refCount++;
10390 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10392 unsigned char value2 = op2->__anon1.uc;
10395 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
10398 exp->expType = op1->type;
10400 op1->type->refCount++;
10405 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10407 float value2 = op2->__anon1.f;
10410 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
10413 exp->expType = op1->type;
10415 op1->type->refCount++;
10420 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10422 double value2 = op2->__anon1.d;
10425 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
10428 exp->expType = op1->type;
10430 op1->type->refCount++;
10435 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10437 int value2 = op2->__anon1.i;
10440 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
10443 exp->expType = op1->type;
10445 op1->type->refCount++;
10450 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10452 unsigned int value2 = op2->__anon1.ui;
10455 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
10458 exp->expType = op1->type;
10460 op1->type->refCount++;
10465 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10467 long long value2 = op2->__anon1.i64;
10470 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
10473 exp->expType = op1->type;
10475 op1->type->refCount++;
10480 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10482 uint64 value2 = op2->__anon1.ui64;
10485 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
10488 exp->expType = op1->type;
10490 op1->type->refCount++;
10495 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10497 short value2 = op2->__anon1.s;
10500 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
10503 exp->expType = op1->type;
10505 op1->type->refCount++;
10510 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10512 unsigned short value2 = op2->__anon1.us;
10515 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
10518 exp->expType = op1->type;
10520 op1->type->refCount++;
10525 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10527 char value2 = op2->__anon1.c;
10530 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
10533 exp->expType = op1->type;
10535 op1->type->refCount++;
10540 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10542 unsigned char value2 = op2->__anon1.uc;
10545 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
10548 exp->expType = op1->type;
10550 op1->type->refCount++;
10555 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10557 float value2 = op2->__anon1.f;
10560 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
10563 exp->expType = op1->type;
10565 op1->type->refCount++;
10570 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10572 double value2 = op2->__anon1.d;
10575 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
10578 exp->expType = op1->type;
10580 op1->type->refCount++;
10585 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10588 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
10591 exp->expType = op1->type;
10593 op1->type->refCount++;
10598 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10601 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
10604 exp->expType = op1->type;
10606 op1->type->refCount++;
10611 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10614 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
10617 exp->expType = op1->type;
10619 op1->type->refCount++;
10624 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10627 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
10630 exp->expType = op1->type;
10632 op1->type->refCount++;
10637 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10640 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
10643 exp->expType = op1->type;
10645 op1->type->refCount++;
10650 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10653 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
10656 exp->expType = op1->type;
10658 op1->type->refCount++;
10663 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10666 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
10669 exp->expType = op1->type;
10671 op1->type->refCount++;
10676 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10679 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
10682 exp->expType = op1->type;
10684 op1->type->refCount++;
10689 struct OpTable intOps =
10691 IntAdd, IntSub, IntMul, IntDiv, IntMod, IntNeg, IntInc, IntDec, IntAsign, IntAddAsign, IntSubAsign, IntMulAsign, IntDivAsign, IntModAsign, IntBitAnd, IntBitOr, IntBitXor, IntLShift, IntRShift, IntBitNot, IntAndAsign, IntOrAsign, IntXorAsign, IntLShiftAsign, IntRShiftAsign, IntNot, IntEqu, IntNqu, IntAnd, IntOr, IntGrt, IntSma, IntGrtEqu, IntSmaEqu, IntCond
10694 struct OpTable uintOps =
10696 UIntAdd, UIntSub, UIntMul, UIntDiv, UIntMod, UIntNeg, UIntInc, UIntDec, UIntAsign, UIntAddAsign, UIntSubAsign, UIntMulAsign, UIntDivAsign, UIntModAsign, UIntBitAnd, UIntBitOr, UIntBitXor, UIntLShift, UIntRShift, UIntBitNot, UIntAndAsign, UIntOrAsign, UIntXorAsign, UIntLShiftAsign, UIntRShiftAsign, UIntNot, UIntEqu, UIntNqu, UIntAnd, UIntOr, UIntGrt, UIntSma, UIntGrtEqu, UIntSmaEqu, UIntCond
10699 struct OpTable int64Ops =
10701 Int64Add, Int64Sub, Int64Mul, Int64Div, Int64Mod, Int64Neg, Int64Inc, Int64Dec, Int64Asign, Int64AddAsign, Int64SubAsign, Int64MulAsign, Int64DivAsign, Int64ModAsign, Int64BitAnd, Int64BitOr, Int64BitXor, Int64LShift, Int64RShift, Int64BitNot, Int64AndAsign, Int64OrAsign, Int64XorAsign, Int64LShiftAsign, Int64RShiftAsign, Int64Not, Int64Equ, Int64Nqu, Int64And, Int64Or, Int64Grt, Int64Sma, Int64GrtEqu, Int64SmaEqu, Int64Cond
10704 struct OpTable uint64Ops =
10706 UInt64Add, UInt64Sub, UInt64Mul, UInt64Div, UInt64Mod, UInt64Neg, UInt64Inc, UInt64Dec, UInt64Asign, UInt64AddAsign, UInt64SubAsign, UInt64MulAsign, UInt64DivAsign, UInt64ModAsign, UInt64BitAnd, UInt64BitOr, UInt64BitXor, UInt64LShift, UInt64RShift, UInt64BitNot, UInt64AndAsign, UInt64OrAsign, UInt64XorAsign, UInt64LShiftAsign, UInt64RShiftAsign, UInt64Not, UInt64Equ, UInt64Nqu, UInt64And, UInt64Or, UInt64Grt, UInt64Sma, UInt64GrtEqu, UInt64SmaEqu, UInt64Cond
10709 struct OpTable shortOps =
10711 ShortAdd, ShortSub, ShortMul, ShortDiv, ShortMod, ShortNeg, ShortInc, ShortDec, ShortAsign, ShortAddAsign, ShortSubAsign, ShortMulAsign, ShortDivAsign, ShortModAsign, ShortBitAnd, ShortBitOr, ShortBitXor, ShortLShift, ShortRShift, ShortBitNot, ShortAndAsign, ShortOrAsign, ShortXorAsign, ShortLShiftAsign, ShortRShiftAsign, ShortNot, ShortEqu, ShortNqu, ShortAnd, ShortOr, ShortGrt, ShortSma, ShortGrtEqu, ShortSmaEqu, ShortCond
10714 struct OpTable ushortOps =
10716 UShortAdd, UShortSub, UShortMul, UShortDiv, UShortMod, UShortNeg, UShortInc, UShortDec, UShortAsign, UShortAddAsign, UShortSubAsign, UShortMulAsign, UShortDivAsign, UShortModAsign, UShortBitAnd, UShortBitOr, UShortBitXor, UShortLShift, UShortRShift, UShortBitNot, UShortAndAsign, UShortOrAsign, UShortXorAsign, UShortLShiftAsign, UShortRShiftAsign, UShortNot, UShortEqu, UShortNqu, UShortAnd, UShortOr, UShortGrt, UShortSma, UShortGrtEqu, UShortSmaEqu, UShortCond
10719 struct OpTable floatOps =
10721 FloatAdd, FloatSub, FloatMul, FloatDiv, (((void *)0)), FloatNeg, FloatInc, FloatDec, FloatAsign, FloatAddAsign, FloatSubAsign, FloatMulAsign, FloatDivAsign, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), FloatEqu, FloatNqu, FloatAnd, FloatOr, FloatGrt, FloatSma, FloatGrtEqu, FloatSmaEqu
10724 struct OpTable doubleOps =
10726 DoubleAdd, DoubleSub, DoubleMul, DoubleDiv, (((void *)0)), DoubleNeg, DoubleInc, DoubleDec, DoubleAsign, DoubleAddAsign, DoubleSubAsign, DoubleMulAsign, DoubleDivAsign, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)), DoubleEqu, DoubleNqu, DoubleAnd, DoubleOr, DoubleGrt, DoubleSma, DoubleGrtEqu, DoubleSmaEqu
10729 struct OpTable charOps =
10731 CharAdd, CharSub, CharMul, CharDiv, CharMod, CharNeg, CharInc, CharDec, CharAsign, CharAddAsign, CharSubAsign, CharMulAsign, CharDivAsign, CharModAsign, CharBitAnd, CharBitOr, CharBitXor, CharLShift, CharRShift, CharBitNot, CharAndAsign, CharOrAsign, CharXorAsign, CharLShiftAsign, CharRShiftAsign, CharNot, CharEqu, CharNqu, CharAnd, CharOr, CharGrt, CharSma, CharGrtEqu, CharSmaEqu, CharCond
10734 struct OpTable ucharOps =
10736 UCharAdd, UCharSub, UCharMul, UCharDiv, UCharMod, UCharNeg, UCharInc, UCharDec, UCharAsign, UCharAddAsign, UCharSubAsign, UCharMulAsign, UCharDivAsign, UCharModAsign, UCharBitAnd, UCharBitOr, UCharBitXor, UCharLShift, UCharRShift, UCharBitNot, UCharAndAsign, UCharOrAsign, UCharXorAsign, UCharLShiftAsign, UCharRShiftAsign, UCharNot, UCharEqu, UCharNqu, UCharAnd, UCharOr, UCharGrt, UCharSma, UCharGrtEqu, UCharSmaEqu, UCharCond
10739 void ReadString(char * output, char * string)
10741 int len = strlen(string);
10743 unsigned int quoted = 0x0, escaped = 0x0;
10745 for(c = 0; c < len; c++)
10747 char ch = string[c];
10805 int UnescapeString(char * d, char * s, int len)
10810 while(j < len && (ch = s[j]))
10815 switch((ch = s[++j]))
10861 char * OffsetEscapedString(char * s, int len, int offset)
10866 while(j < len && k < offset && (ch = s[j]))
10872 return (k == offset) ? s + j : (((void *)0));
10875 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
10877 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
10879 extern double strtod(const char * , char * * );
10881 extern float (* __ecereMethod_float_inf)(void);
10883 extern float (* __ecereMethod_float_nan)(void);
10885 extern double (* __ecereMethod_double_inf)(void);
10887 extern double (* __ecereMethod_double_nan)(void);
10889 struct Operand GetOperand(struct Expression * exp)
10891 struct Operand op =
10898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
10901 struct Type * type = exp->expType;
10905 while(type->kind == 8 && type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 2 || type->__anon1._class->__anon1.registered->type == 3 || type->__anon1._class->__anon1.registered->type == 4))
10907 if(!type->__anon1._class->__anon1.registered->dataType)
10908 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
10909 type = type->__anon1._class->__anon1.registered->dataType;
10911 if(exp->type == 3 && op.kind == 13)
10913 op.__anon1.ui64 = (uint64)exp->__anon1.__anon2.string;
10915 op.ops = uint64Ops;
10917 else if(exp->isConstant && exp->type == 2)
10919 op.kind = type->kind;
10920 op.type = exp->expType;
10926 if(exp->__anon1.__anon1.constant[0] == '\'')
10928 op.__anon1.c = exp->__anon1.__anon1.constant[1];
10931 else if(type->isSigned)
10933 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10938 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10946 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10951 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10952 op.ops = ushortOps;
10959 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10964 op.__anon1.ui = strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10972 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10977 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10978 op.ops = uint64Ops;
10985 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10990 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10991 op.ops = uint64Ops;
10998 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11003 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11004 op.ops = uint64Ops;
11009 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11010 op.__anon1.f = __ecereMethod_float_inf();
11011 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11012 op.__anon1.f = -__ecereMethod_float_inf();
11013 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11014 op.__anon1.f = __ecereMethod_float_nan();
11015 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11016 op.__anon1.f = -__ecereMethod_float_nan();
11018 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11022 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11023 op.__anon1.d = __ecereMethod_double_inf();
11024 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11025 op.__anon1.d = -__ecereMethod_double_inf();
11026 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11027 op.__anon1.d = __ecereMethod_double_nan();
11028 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11029 op.__anon1.d = -__ecereMethod_double_nan();
11031 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11032 op.ops = doubleOps;
11037 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11039 op.ops = uint64Ops;
11047 int __ecereVMethodID_class_OnGetString;
11049 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
11051 static __attribute__((unused)) void UnusedFunction()
11055 ((const char * (*)(struct __ecereNameSpace__ecere__com__Class *, const void *, char * tempString, void * fieldData, unsigned int * needClass))__ecereClass_int->_vTbl[__ecereVMethodID_class_OnGetString])(__ecereClass_int, &a, 0, 0, 0);
11058 extern int __ecereVMethodID_class_OnGetString;
11060 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
11062 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11064 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
11066 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11067 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
11070 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11071 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11072 struct Type * type;
11073 void * ptr = inst->data + dataMember->offset + offset;
11074 char * result = (((void *)0));
11076 exp->loc = member->loc = inst->loc;
11077 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11078 if(!dataMember->dataType)
11079 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11080 type = dataMember->dataType;
11081 if(type->kind == 8)
11083 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11085 if(_class->type == 4)
11087 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11091 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11092 struct __ecereNameSpace__ecere__sys__NamedLink * item;
11094 for(item = e->values.first; item; item = item->next)
11096 if((int)item->data == *(int *)ptr)
11098 result = item->name;
11104 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11106 exp->destType = MkClassType(_class->fullName);
11107 ProcessExpressionType(exp);
11111 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11113 if(!_class->dataType)
11114 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11115 type = _class->dataType;
11124 FreeExpContents(exp);
11125 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11131 FreeExpContents(exp);
11132 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11138 FreeExpContents(exp);
11139 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11145 FreeExpContents(exp);
11146 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11152 FreeExpContents(exp);
11153 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11159 FreeExpContents(exp);
11160 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11165 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11168 ListAdd(memberList, member);
11170 if(parentDataMember->type == 1)
11175 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
11177 void PopulateInstance(struct Instantiation * inst)
11179 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
11180 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
11181 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11182 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
11185 inst->members = MkListOne(MkMembersInitList(memberList));
11187 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
11188 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
11190 if(!dataMember->isProperty)
11192 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11193 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
11196 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11197 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11198 struct Type * type;
11199 void * ptr = inst->data + dataMember->offset;
11200 char * result = (((void *)0));
11202 exp->loc = member->loc = inst->loc;
11203 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11204 if(!dataMember->dataType)
11205 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11206 type = dataMember->dataType;
11207 if(type->kind == 8)
11209 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11211 if(_class->type == 4)
11213 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11217 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11218 struct __ecereNameSpace__ecere__sys__NamedLink * item;
11220 for(item = e->values.first; item; item = item->next)
11222 if((int)item->data == *(int *)ptr)
11224 result = item->name;
11231 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11233 exp->destType = MkClassType(_class->fullName);
11234 ProcessExpressionType(exp);
11237 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11239 if(!_class->dataType)
11240 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11241 type = _class->dataType;
11250 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11256 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11262 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11268 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11274 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11279 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11282 ListAdd(memberList, member);
11288 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, unsigned int * offset, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos);
11290 extern void FreeInstance(struct Instantiation * inst);
11292 void ComputeInstantiation(struct Expression * exp)
11294 struct Instantiation * inst = exp->__anon1.instance;
11295 struct MembersInit * members;
11296 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11297 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11298 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11299 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11300 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11301 int subMemberStackPos = 0;
11304 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11308 if(_class->type == 0 || _class->type == 5)
11310 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11311 if(_class->type == 0)
11312 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11315 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11319 for(members = (*inst->members).first; members; members = members->next)
11321 switch(members->type)
11325 if(members->__anon1.dataMembers)
11327 struct MemberInit * member;
11329 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11331 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11332 unsigned int found = 0x0;
11333 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11334 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11335 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
11336 unsigned int dataMemberOffset;
11340 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11343 if(curMember->isProperty)
11344 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11347 dataMember = curMember;
11348 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11349 if(_class->type == 0)
11350 dataMemberOffset += _class->base->structSize;
11357 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11361 if(prop->memberAccess == 1)
11363 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11364 curClass = prop->_class;
11369 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11370 int _subMemberStackPos = 0;
11372 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11376 if(dataMember->memberAccess == 1)
11378 curMember = dataMember;
11379 curClass = dataMember->_class;
11380 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11381 subMemberStackPos = _subMemberStackPos;
11386 if(found && member->initializer && member->initializer->type == 0)
11388 struct Expression * value = member->initializer->__anon1.exp;
11389 struct Type * type = (((void *)0));
11390 unsigned int deepMember = 0x0;
11394 type = prop->dataType;
11396 else if(dataMember)
11398 if(!dataMember->dataType)
11399 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0x0);
11400 type = dataMember->dataType;
11402 if(ident && ident->next)
11405 for(ident = ident->next; ident && type; ident = ident->next)
11407 if(type->kind == 8)
11409 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11411 type = prop->dataType;
11414 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11416 type = dataMember->dataType;
11419 else if(type->kind == 9 || type->kind == 10)
11421 struct Type * memberType;
11423 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11425 if(!strcmp(memberType->name, ident->string))
11436 FreeType(value->destType);
11437 value->destType = type;
11440 ComputeExpression(value);
11442 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11444 if(type->kind == 8)
11446 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11448 if(_class->type == 2 || _class->type == 3 || _class->type == 4)
11450 if(!_class->dataType)
11451 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11452 type = _class->dataType;
11457 void * ptr = inst->data + dataMemberOffset;
11459 if(value->type == 2)
11465 GetInt(value, (int *)ptr);
11470 GetInt64(value, (long long *)ptr);
11475 GetIntPtr(value, (intptr_t *)ptr);
11480 GetIntSize(value, (ssize_t *)ptr);
11485 GetFloat(value, (float *)ptr);
11490 GetDouble(value, (double *)ptr);
11495 else if(value->type == 1)
11497 if(type->kind == 8)
11499 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11501 if(_class->type == 1)
11503 ComputeTypeSize(type);
11504 if(value->__anon1.instance->data)
11505 memcpy(ptr, value->__anon1.instance->data, type->size);
11512 if(value->type == 1 && value->__anon1.instance->data)
11514 if(type->kind == 8)
11516 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11518 if(_class && (_class->type != 0 || __ecereNameSpace__ecere__com__eClass_IsDerived(((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)value->__anon1.instance->data))->_class, _class)))
11520 void (* Set)(void *, void *) = (void *)prop->Set;
11522 Set(inst->data, value->__anon1.instance->data);
11523 PopulateInstance(inst);
11527 else if(value->type == 2)
11533 void (* Set)(void *, double) = (void *)prop->Set;
11535 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11540 void (* Set)(void *, float) = (void *)prop->Set;
11542 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11547 void (* Set)(void *, int) = (void *)prop->Set;
11549 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11554 void (* Set)(void *, long long) = (void *)prop->Set;
11556 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11561 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11563 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11568 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11570 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11575 else if(value->type == 3)
11579 ReadString(temp, value->__anon1.__anon2.string);
11580 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11584 else if(!deepMember && type && _class->type == 3)
11588 if(value->type == 2)
11590 if(type->kind == 8)
11592 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11594 if(_class->type == 3)
11596 if(!_class->dataType)
11597 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
11598 type = _class->dataType;
11606 float (* Set)(float) = (void *)prop->Set;
11608 GetFloat(member->initializer->__anon1.exp, &fValue);
11609 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11616 double (* Set)(double) = (void *)prop->Set;
11618 GetDouble(member->initializer->__anon1.exp, &dValue);
11619 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11627 else if(!deepMember && type && _class->type == 2)
11631 if(value->type == 1 && value->__anon1.instance->data)
11633 unsigned int (* Set)(void *) = (void *)prop->Set;
11635 bits = Set(value->__anon1.instance->data);
11637 else if(value->type == 2)
11641 else if(dataMember)
11643 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11644 struct Type * type;
11647 bits = (bits & ~bitMember->mask);
11648 if(!bitMember->dataType)
11649 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0x0);
11650 type = bitMember->dataType;
11651 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11653 if(!type->__anon1._class->__anon1.registered->dataType)
11654 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
11655 type = type->__anon1._class->__anon1.registered->dataType;
11664 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11672 type->isSigned ? GetShort(value, &v) : GetUShort(value, &v);
11681 type->isSigned ? GetInt(value, &v) : GetUInt(value, &v);
11689 type->isSigned ? GetInt64(value, &v) : GetUInt64(value, &v);
11697 type->isSigned ? GetIntPtr(value, &v) : GetUIntPtr(value, &v);
11705 type->isSigned ? GetIntSize(value, &v) : GetUIntSize(value, &v);
11710 bits |= part << bitMember->pos;
11716 if(_class && _class->type == 3)
11718 ComputeExpression(member->initializer->__anon1.exp);
11719 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11721 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11731 if(_class && _class->type == 2)
11733 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11738 FreeInstance(inst);
11742 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
11744 unsigned int result = 0x0;
11749 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
11750 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
11754 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
11755 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11758 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 6 || op->kind == 7 || op->kind == 13 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
11759 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11762 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
11763 result = GetOpFloat(op, &op->__anon1.f);
11766 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 6 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
11767 result = GetOpDouble(op, &op->__anon1.d);
11770 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 6 || op->kind == 7 || op->kind == 13 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
11771 result = GetOpUIntPtr(op, &op->__anon1.ui64);
11774 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 6 || op->kind == 7 || op->kind == 13 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
11775 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11778 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11779 result = isSigned ? GetOpIntPtr(op, &op->__anon1.i64) : GetOpUIntPtr(op, &op->__anon1.i64);
11782 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11783 result = isSigned ? GetOpIntSize(op, &op->__anon1.ui64) : GetOpUIntSize(op, &op->__anon1.ui64);
11789 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11791 if(exp->__anon1.op.op == SIZEOF)
11793 FreeExpContents(exp);
11795 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11799 if(!exp->__anon1.op.exp1)
11801 switch(exp->__anon1.op.op)
11805 struct Expression * exp2 = exp->__anon1.op.exp2;
11807 exp->__anon1.op.exp2 = (((void *)0));
11808 FreeExpContents(exp);
11809 FreeType(exp->expType);
11810 FreeType(exp->destType);
11812 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11818 FreeExpContents(exp);
11819 op1->ops.Neg(exp, op1);
11823 if(op1->ops.BitNot)
11825 FreeExpContents(exp);
11826 op1->ops.BitNot(exp, op1);
11832 FreeExpContents(exp);
11833 op1->ops.Not(exp, op1);
11840 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11842 if(Promote(op2, op1->kind, op1->type->isSigned))
11843 op2->kind = op1->kind, op2->ops = op1->ops;
11844 else if(Promote(op1, op2->kind, op2->type->isSigned))
11845 op1->kind = op2->kind, op1->ops = op2->ops;
11847 switch(exp->__anon1.op.op)
11852 FreeExpContents(exp);
11853 op1->ops.Add(exp, op1, op2);
11859 FreeExpContents(exp);
11860 op1->ops.Sub(exp, op1, op2);
11866 FreeExpContents(exp);
11867 op1->ops.Mul(exp, op1, op2);
11873 FreeExpContents(exp);
11874 op1->ops.Div(exp, op1, op2);
11880 FreeExpContents(exp);
11881 op1->ops.Mod(exp, op1, op2);
11885 if(exp->__anon1.op.exp2)
11887 if(op1->ops.BitAnd)
11889 FreeExpContents(exp);
11890 op1->ops.BitAnd(exp, op1, op2);
11897 FreeExpContents(exp);
11898 op1->ops.BitOr(exp, op1, op2);
11902 if(op1->ops.BitXor)
11904 FreeExpContents(exp);
11905 op1->ops.BitXor(exp, op1, op2);
11909 if(op1->ops.LShift)
11911 FreeExpContents(exp);
11912 op1->ops.LShift(exp, op1, op2);
11916 if(op1->ops.RShift)
11918 FreeExpContents(exp);
11919 op1->ops.RShift(exp, op1, op2);
11925 FreeExpContents(exp);
11926 op1->ops.Equ(exp, op1, op2);
11932 FreeExpContents(exp);
11933 op1->ops.Nqu(exp, op1, op2);
11939 FreeExpContents(exp);
11940 op1->ops.And(exp, op1, op2);
11946 FreeExpContents(exp);
11947 op1->ops.Or(exp, op1, op2);
11953 FreeExpContents(exp);
11954 op1->ops.Grt(exp, op1, op2);
11960 FreeExpContents(exp);
11961 op1->ops.Sma(exp, op1, op2);
11965 if(op1->ops.GrtEqu)
11967 FreeExpContents(exp);
11968 op1->ops.GrtEqu(exp, op1, op2);
11972 if(op1->ops.SmaEqu)
11974 FreeExpContents(exp);
11975 op1->ops.SmaEqu(exp, op1, op2);
11983 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
11985 extern struct Expression * MkExpIdentifier(struct Identifier * id);
11987 void ComputeExpression(struct Expression * exp)
11989 char expString[10240];
11991 expString[0] = '\0';
11996 ComputeInstantiation(exp);
12001 struct Expression * exp1, * exp2 = (((void *)0));
12002 struct Operand op1 =
12009 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12012 struct Operand op2 =
12019 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12023 if(exp->__anon1.op.exp2)
12025 struct Expression * e = exp->__anon1.op.exp2;
12027 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
12029 if(e->type == 5 || e->type == 32 || e->type == 23)
12032 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12034 e = (*e->__anon1.list).last;
12037 if(exp->__anon1.op.op == 261 && e && e->expType)
12039 if(e->type == 3 && e->__anon1.__anon2.string)
12041 char * string = e->__anon1.__anon2.string;
12042 int len = strlen(string);
12043 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
12045 len = UnescapeString(tmp, string + 1, len - 2);
12046 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
12047 FreeExpContents(exp);
12049 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
12053 struct Type * type = e->expType;
12056 FreeExpContents(exp);
12058 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12064 ComputeExpression(exp->__anon1.op.exp2);
12066 if(exp->__anon1.op.exp1)
12068 ComputeExpression(exp->__anon1.op.exp1);
12069 exp1 = exp->__anon1.op.exp1;
12070 exp2 = exp->__anon1.op.exp2;
12071 op1 = GetOperand(exp1);
12073 op1.type->refCount++;
12076 op2 = GetOperand(exp2);
12078 op2.type->refCount++;
12083 exp1 = exp->__anon1.op.exp2;
12084 op1 = GetOperand(exp1);
12086 op1.type->refCount++;
12088 CallOperator(exp, exp1, exp2, &op1, &op2);
12090 FreeType(op1.type);
12092 FreeType(op2.type);
12098 struct Expression * e, * n;
12100 for(e = (*exp->__anon1.list).first; e; e = n)
12105 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
12106 struct Expression * prev = exp->prev;
12107 struct Expression * next = exp->next;
12109 ComputeExpression(e);
12110 FreeType(exp->expType);
12111 FreeType(exp->destType);
12115 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
12116 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
12127 struct Expression * memberExp = exp->__anon1.member.exp;
12128 struct Identifier * memberID = exp->__anon1.member.member;
12129 struct Type * type;
12131 ComputeExpression(exp->__anon1.member.exp);
12132 type = exp->__anon1.member.exp->expType;
12135 struct __ecereNameSpace__ecere__com__Class * _class = (exp->__anon1.member.member && exp->__anon1.member.member->classSym) ? exp->__anon1.member.member->classSym->__anon1.registered : (((type->kind == 8 || type->kind == 19) && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0)));
12136 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
12137 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
12138 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
12140 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
12141 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
12145 struct Symbol * classSym;
12148 PrintTypeNoConst(type, string, 0x0, 0x1);
12149 classSym = FindClass(string);
12150 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12152 if(exp->__anon1.member.member)
12154 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
12156 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
12158 if(!prop && !member && _class && exp->__anon1.member.member)
12160 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
12162 convertTo = _class;
12163 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12164 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
12170 struct Type * type = prop->dataType;
12172 if(_class->type == 3)
12174 if(type->kind == 8)
12176 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12178 if(_class->type == 3)
12180 if(!_class->dataType)
12181 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
12182 type = _class->dataType;
12190 float (* Get)(float) = (void *)prop->Get;
12192 GetFloat(exp->__anon1.member.exp, &value);
12193 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
12200 double (* Get)(double);
12202 GetDouble(exp->__anon1.member.exp, &value);
12204 Get = (void *)prop->Set;
12206 Get = (void *)prop->Get;
12207 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
12217 struct Expression * value = exp->__anon1.member.exp;
12218 struct Type * type;
12220 if(!prop->dataType)
12221 ProcessPropertyType(prop);
12222 type = prop->dataType;
12226 else if(_class->type == 1)
12232 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12234 if(propertyClass->type == 1 && value->type == 1)
12236 void (* Set)(void *, void *) = (void *)prop->Set;
12238 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12239 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12240 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12241 exp->__anon1.instance->loc = exp->loc;
12243 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
12244 PopulateInstance(exp->__anon1.instance);
12251 void (* Set)(void *, int) = (void *)prop->Set;
12253 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12254 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12255 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12256 exp->__anon1.instance->loc = exp->loc;
12258 GetInt(value, &intValue);
12259 Set(exp->__anon1.instance->data, intValue);
12260 PopulateInstance(exp->__anon1.instance);
12265 long long intValue;
12266 void (* Set)(void *, long long) = (void *)prop->Set;
12268 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12269 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12270 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12271 exp->__anon1.instance->loc = exp->loc;
12273 GetInt64(value, &intValue);
12274 Set(exp->__anon1.instance->data, intValue);
12275 PopulateInstance(exp->__anon1.instance);
12281 void (* Set)(void *, intptr_t) = (void *)prop->Set;
12283 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12284 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12285 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12286 exp->__anon1.instance->loc = exp->loc;
12288 GetIntPtr(value, &intValue);
12289 Set(exp->__anon1.instance->data, intValue);
12290 PopulateInstance(exp->__anon1.instance);
12296 void (* Set)(void *, ssize_t) = (void *)prop->Set;
12298 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12299 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12300 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12301 exp->__anon1.instance->loc = exp->loc;
12303 GetIntSize(value, &intValue);
12304 Set(exp->__anon1.instance->data, intValue);
12305 PopulateInstance(exp->__anon1.instance);
12311 void (* Set)(void *, float) = (void *)prop->Set;
12313 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12314 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12315 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12316 exp->__anon1.instance->loc = exp->loc;
12318 GetFloat(value, &floatValue);
12319 Set(exp->__anon1.instance->data, floatValue);
12320 PopulateInstance(exp->__anon1.instance);
12325 double doubleValue;
12326 void (* Set)(void *, double) = (void *)prop->Set;
12328 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12329 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12330 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12331 exp->__anon1.instance->loc = exp->loc;
12333 GetDouble(value, &doubleValue);
12334 Set(exp->__anon1.instance->data, doubleValue);
12335 PopulateInstance(exp->__anon1.instance);
12340 else if(_class->type == 2)
12346 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12348 if(propertyClass->type == 1 && value->__anon1.instance->data)
12350 unsigned int (* Set)(void *) = (void *)prop->Set;
12351 unsigned int bits = Set(value->__anon1.instance->data);
12353 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12357 else if(_class->type == 2)
12359 unsigned int value;
12360 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
12363 GetUInt(exp->__anon1.member.exp, &value);
12365 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12374 if(_class->type == 2)
12376 unsigned int value;
12378 GetUInt(exp->__anon1.member.exp, &value);
12383 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12385 if(_class->type == 1)
12387 void (* Get)(unsigned int, void *) = (void *)prop->Get;
12389 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12390 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12391 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12392 exp->__anon1.instance->loc = exp->loc;
12394 Get(value, exp->__anon1.instance->data);
12395 PopulateInstance(exp->__anon1.instance);
12397 else if(_class->type == 2)
12399 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
12400 uint64 bits = Get(value);
12402 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
12409 else if(_class->type == 1)
12411 char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
12417 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12419 if(_class->type == 1 && value)
12421 void (* Get)(void *, void *) = (void *)prop->Get;
12423 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12424 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12425 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12426 exp->__anon1.instance->loc = exp->loc;
12428 Get(value, exp->__anon1.instance->data);
12429 PopulateInstance(exp->__anon1.instance);
12440 exp->isConstant = 0x0;
12449 FreeExpression(memberExp);
12450 FreeIdentifier(memberID);
12456 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
12458 FreeExpContents(exp);
12459 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12466 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
12468 if(classSym && classSym->__anon1.registered)
12470 if(classSym->__anon1.registered->fixed)
12472 FreeSpecifier(exp->__anon1._class);
12473 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
12478 char className[1024];
12480 strcpy(className, "__ecereClass_");
12481 FullClassNameCat(className, classSym->string, 0x1);
12482 MangleClassName(className);
12483 DeclareClass(classSym, className);
12484 FreeExpContents(exp);
12486 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
12487 exp->__anon1.member.member = MkIdentifier("structSize");
12494 struct Type * type;
12495 struct Expression * e = exp;
12497 if(exp->type == 11)
12499 if(exp->__anon1.cast.exp)
12500 ComputeExpression(exp->__anon1.cast.exp);
12501 e = exp->__anon1.cast.exp;
12503 if(e && exp->expType)
12505 type = exp->expType;
12506 if(type->kind == 8)
12508 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12510 if(_class && (_class->type == 3 || _class->type == 2))
12512 if(!_class->dataType)
12513 _class->dataType = ProcessTypeString(_class->dataTypeString, 0x0);
12514 type = _class->dataType;
12523 char value = (char)0;
12525 if(GetChar(e, &value))
12527 FreeExpContents(exp);
12528 exp->__anon1.__anon1.constant = PrintChar(value);
12534 unsigned char value = (unsigned char)0;
12536 if(GetUChar(e, &value))
12538 FreeExpContents(exp);
12539 exp->__anon1.__anon1.constant = PrintUChar(value);
12547 short value = (short)0;
12549 if(GetShort(e, &value))
12551 FreeExpContents(exp);
12552 exp->__anon1.__anon1.constant = PrintShort(value);
12558 unsigned short value = (unsigned short)0;
12560 if(GetUShort(e, &value))
12562 FreeExpContents(exp);
12563 exp->__anon1.__anon1.constant = PrintUShort(value);
12573 if(GetInt(e, &value))
12575 FreeExpContents(exp);
12576 exp->__anon1.__anon1.constant = PrintInt(value);
12582 unsigned int value = 0;
12584 if(GetUInt(e, &value))
12586 FreeExpContents(exp);
12587 exp->__anon1.__anon1.constant = PrintUInt(value);
12595 long long value = 0;
12597 if(GetInt64(e, &value))
12599 FreeExpContents(exp);
12600 exp->__anon1.__anon1.constant = PrintInt64(value);
12608 if(GetUInt64(e, &value))
12610 FreeExpContents(exp);
12611 exp->__anon1.__anon1.constant = PrintUInt64(value);
12619 intptr_t value = 0;
12621 if(GetIntPtr(e, &value))
12623 FreeExpContents(exp);
12624 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12630 uintptr_t value = 0;
12632 if(GetUIntPtr(e, &value))
12634 FreeExpContents(exp);
12635 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12645 if(GetIntSize(e, &value))
12647 FreeExpContents(exp);
12648 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12656 if(GetUIntSize(e, &value))
12658 FreeExpContents(exp);
12659 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12668 if(GetFloat(e, &value))
12670 FreeExpContents(exp);
12671 exp->__anon1.__anon1.constant = PrintFloat(value);
12680 if(GetDouble(e, &value))
12682 FreeExpContents(exp);
12683 exp->__anon1.__anon1.constant = PrintDouble(value);
12694 struct Operand op1 =
12701 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12704 struct Operand op2 =
12711 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12714 struct Operand op3 =
12721 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12725 if(exp->__anon1.cond.exp)
12726 ComputeExpression((*exp->__anon1.cond.exp).last);
12727 if(exp->__anon1.cond.elseExp)
12728 ComputeExpression(exp->__anon1.cond.elseExp);
12729 if(exp->__anon1.cond.cond)
12730 ComputeExpression(exp->__anon1.cond.cond);
12731 op1 = GetOperand(exp->__anon1.cond.cond);
12733 op1.type->refCount++;
12734 op2 = GetOperand((*exp->__anon1.cond.exp).last);
12736 op2.type->refCount++;
12737 op3 = GetOperand(exp->__anon1.cond.elseExp);
12739 op3.type->refCount++;
12742 FreeExpContents(exp);
12743 op1.ops.Cond(exp, &op1, &op2, &op3);
12746 FreeType(op1.type);
12748 FreeType(op2.type);
12750 FreeType(op3.type);
12756 void ApplyAnyObjectLogic(struct Expression * e);
12758 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
12760 unsigned int result = 0x1;
12764 struct __ecereNameSpace__ecere__sys__OldList converts =
12768 struct Conversion * convert;
12770 if(destType->kind == 0)
12772 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
12776 for(convert = converts.first; convert; convert = convert->next)
12778 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
12782 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12783 int objectType = exp->expType ? exp->expType->classObjectType : 0;
12786 newExp->prev = (((void *)0));
12787 newExp->next = (((void *)0));
12788 newExp->destType = (((void *)0));
12792 exp->addedThis = 0x1;
12793 exp->__anon1.member.exp = newExp;
12794 FreeType(exp->__anon1.member.exp->expType);
12795 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
12796 exp->__anon1.member.exp->expType->classObjectType = objectType;
12797 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
12798 exp->__anon1.member.memberType = 1;
12799 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12800 exp->needCast = 0x1;
12802 exp->expType->refCount++;
12803 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12809 exp->addedThis = 0x1;
12810 exp->__anon1.member.exp = newExp;
12811 if(newExp->expType && newExp->expType->kind == 8 && newExp->expType->__anon1._class && newExp->expType->__anon1._class->__anon1.registered && newExp->expType->__anon1._class->__anon1.registered->type == 5)
12813 newExp->byReference = 0x1;
12815 FreeType(exp->__anon1.member.exp->expType);
12816 exp->__anon1.member.exp->expType = (((void *)0));
12817 if(convert->convert->dataType)
12819 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12820 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
12821 exp->__anon1.member.exp->expType->refCount = 1;
12822 exp->__anon1.member.exp->expType->classObjectType = objectType;
12823 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12825 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
12826 exp->__anon1.member.memberType = 4;
12827 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12828 exp->needCast = 0x1;
12829 if(convert->resultType)
12830 convert->resultType->refCount++;
12836 FreeType(exp->expType);
12839 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12840 if(exp->destType->casted)
12841 exp->needCast = 0x1;
12843 exp->expType->refCount++;
12847 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12848 if(exp->destType->casted)
12849 exp->needCast = 0x1;
12850 if(convert->resultType)
12851 convert->resultType->refCount++;
12855 if(exp->isConstant && inCompiler)
12856 ComputeExpression(exp);
12857 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
12859 if(!result && exp->expType && converts.count)
12861 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 0x1, 0x1, 0x0, 0x0, warnConst);
12863 if(!result && exp->expType && exp->destType)
12865 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))
12872 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
12874 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
12876 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
12878 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
12880 void CheckTemplateTypes(struct Expression * exp)
12882 struct Expression * nbExp = GetNonBracketsExp(exp);
12884 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
12886 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12887 struct Context * context;
12891 exp->destType->refCount++;
12893 exp->expType->refCount++;
12894 newExp->prev = (((void *)0));
12895 newExp->next = (((void *)0));
12896 switch(exp->expType->kind)
12899 if(exp->destType->classObjectType)
12902 exp->destType->refCount--;
12904 exp->expType->refCount--;
12905 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12909 struct __ecereNameSpace__ecere__sys__OldList * specs;
12910 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12911 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12913 context = PushContext();
12914 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12915 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12916 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12918 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12919 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
12920 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
12921 exp->__anon1.compound->__anon1.compound.context = context;
12922 PopContext(context);
12927 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
12928 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12929 exp->needCast = 0x1;
12933 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
12935 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12936 struct Statement * compound;
12937 struct Context * context;
12941 exp->destType->refCount++;
12943 exp->expType->refCount++;
12944 newExp->prev = (((void *)0));
12945 newExp->next = (((void *)0));
12946 switch(exp->expType->kind)
12949 if(exp->destType->classObjectType)
12952 exp->destType->refCount--;
12954 exp->expType->refCount--;
12955 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12959 struct __ecereNameSpace__ecere__sys__OldList * specs;
12960 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12961 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12963 context = PushContext();
12964 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12965 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12966 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12968 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12969 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
12970 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
12971 exp->__anon1.compound->__anon1.compound.context = context;
12972 PopContext(context);
12977 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
12980 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)));
12981 ProcessExpressionType((*exp->__anon1.list).first);
12987 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
12988 exp->needTemplateCast = 2;
12989 newExp->needCast = 0x1;
12990 newExp->needTemplateCast = 2;
12991 ProcessExpressionType((*exp->__anon1.list).first);
12997 if(exp->expType->kind == 20)
12999 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
13003 FreeType(exp->destType);
13004 FreeType(exp->expType);
13005 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13009 if(newExp->type == 8 && newExp->__anon1.member.memberType == 3)
13012 exp->__anon1.op.op = '*';
13013 exp->__anon1.op.exp1 = (((void *)0));
13014 exp->__anon1.op.exp2 = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uint64")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '&', newExp))));
13018 char typeString[1024];
13019 struct Declarator * decl;
13020 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13022 typeString[0] = '\0';
13023 PrintType(exp->expType, typeString, 0x0, 0x0);
13024 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13026 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
13027 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
13028 exp->__anon1.cast.exp->needCast = 0x1;
13036 extern int strncmp(const char * , const char * , size_t n);
13038 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
13040 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
13042 int nsLen = strlen(nameSpace);
13043 struct Symbol * symbol;
13045 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)))
13047 char * s = symbol->string;
13049 if(!strncmp(s, nameSpace, nsLen))
13054 for(c = strlen(s) - 1; c >= 0; c--)
13057 namePart = s + c + 1;
13058 if(!strcmp(namePart, name))
13066 return (((void *)0));
13069 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
13072 char nameSpace[1024];
13073 const char * namePart;
13074 unsigned int gotColon = 0x0;
13076 nameSpace[0] = '\0';
13077 for(c = strlen(name) - 1; c >= 0; c--)
13083 namePart = name + c + 1;
13084 while(c >= 0 && name[c] == ':')
13088 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
13092 memcpy(nameSpace, name, c + 1);
13093 nameSpace[c + 1] = (char)0;
13094 return ScanWithNameSpace(tree, nameSpace, namePart);
13098 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13104 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13108 return ScanWithNameSpace(tree, "", namePart);
13110 return (((void *)0));
13113 static void ProcessDeclaration(struct Declaration * decl);
13115 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
13117 struct Context * ctx;
13118 struct Symbol * symbol = (((void *)0));
13120 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
13122 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
13124 symbol = (((void *)0));
13127 char curName[1024];
13129 strcpy(curName, thisNameSpace);
13130 strcat(curName, "::");
13131 strcat(curName, name);
13132 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
13135 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
13138 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
13139 if(symbol || ctx == endContext)
13142 if(inCompiler && curExternal && symbol && ctx == globalContext && curExternal->symbol && symbol->id > curExternal->symbol->idCode && symbol->__anon2.__anon1.pointerExternal)
13144 if(symbol->__anon2.__anon1.pointerExternal->type == 0)
13146 struct FunctionDefinition * function = symbol->__anon2.__anon1.pointerExternal->__anon1.function;
13147 struct Context * tmpContext = curContext;
13149 curContext = (((void *)0));
13150 symbol->__anon2.__anon1.pointerExternal = MkExternalDeclaration(MkDeclaration(CopyList(function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(function->declarator), (((void *)0))))));
13151 curContext = tmpContext;
13152 symbol->__anon2.__anon1.pointerExternal->symbol = symbol;
13153 DeclareType(symbol->type, 0x1, 0x1);
13154 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, symbol->__anon2.__anon1.pointerExternal);
13155 symbol->id = curExternal->symbol->idCode;
13157 else if(symbol->__anon2.__anon1.pointerExternal->type == 1 && curExternal->symbol->idCode < symbol->__anon2.__anon1.pointerExternal->symbol->id)
13159 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
13160 symbol->id = curExternal->symbol->idCode;
13166 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
13168 if(!type->isSigned && type->kind != 22 && type->kind != 23)
13169 ListAdd(specs, MkSpecifier(UNSIGNED));
13174 if(type->__anon1._class->__anon1.registered)
13176 if(!type->__anon1._class->__anon1.registered->dataType)
13177 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0x0);
13178 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
13183 ListAdd(specs, MkSpecifier(DOUBLE));
13186 ListAdd(specs, MkSpecifier(FLOAT));
13189 ListAdd(specs, MkSpecifier(CHAR));
13192 ListAdd(specs, MkSpecifier(_BOOL));
13195 ListAdd(specs, MkSpecifier(SHORT));
13198 ListAdd(specs, MkSpecifier(INT64));
13201 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
13204 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
13208 ListAdd(specs, MkSpecifier(INT));
13213 static void PrintArraySize(struct Type * arrayType, char * string)
13219 if(arrayType->__anon1.__anon4.enumClass)
13220 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
13221 else if(arrayType->__anon1.__anon4.arraySizeExp)
13222 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
13224 strcat(string, size);
13227 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
13231 if(printConst && type->constant)
13232 strcat(string, "const ");
13237 struct Symbol * c = type->__anon1._class;
13239 if(type->classObjectType == 2)
13240 strcat(string, "typed_object");
13241 else if(type->classObjectType == 3)
13242 strcat(string, "any_object");
13246 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
13248 if(type->byReference)
13249 strcat(string, " &");
13253 strcat(string, "void");
13256 strcat(string, type->isSigned ? "int" : "uint");
13259 strcat(string, type->isSigned ? "int64" : "uint64");
13262 strcat(string, type->isSigned ? "intptr" : "uintptr");
13265 strcat(string, type->isSigned ? "intsize" : "uintsize");
13268 strcat(string, type->isSigned ? "char" : "byte");
13271 strcat(string, "_Bool");
13274 strcat(string, type->isSigned ? "short" : "uint16");
13277 strcat(string, "float");
13280 strcat(string, "double");
13283 if(type->__anon1.__anon1.enumName)
13285 strcat(string, "struct ");
13286 strcat(string, type->__anon1.__anon1.enumName);
13288 else if(type->typeName)
13289 strcat(string, type->typeName);
13292 struct Type * member;
13294 strcat(string, "struct { ");
13295 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
13297 PrintType(member, string, 0x1, fullName);
13298 strcat(string, "; ");
13300 strcat(string, "}");
13304 if(type->__anon1.__anon1.enumName)
13306 strcat(string, "union ");
13307 strcat(string, type->__anon1.__anon1.enumName);
13309 else if(type->typeName)
13310 strcat(string, type->typeName);
13313 strcat(string, "union ");
13314 strcat(string, "(unnamed)");
13318 if(type->__anon1.__anon1.enumName)
13320 strcat(string, "enum ");
13321 strcat(string, type->__anon1.__anon1.enumName);
13323 else if(type->typeName)
13324 strcat(string, type->typeName);
13326 strcat(string, "int");
13329 strcat(string, "...");
13332 strcat(string, "subclass(");
13333 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
13334 strcat(string, ")");
13337 strcat(string, type->__anon1.templateParameter->identifier->string);
13340 strcat(string, "thisclass");
13343 strcat(string, "__builtin_va_list");
13349 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
13351 static void PrintName(struct Type * type, char * string, unsigned int fullName)
13353 if(type->name && type->name[0])
13356 strcat(string, type->name);
13359 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 0x1, 0x0);
13365 strcat(string, name);
13370 static void PrintAttribs(struct Type * type, char * string)
13374 if(type->dllExport)
13375 strcat(string, "dllexport ");
13376 if(type->attrStdcall)
13377 strcat(string, "stdcall ");
13381 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
13383 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13385 struct Type * attrType = (((void *)0));
13387 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
13388 PrintAttribs(type, string);
13389 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
13390 strcat(string, " const");
13391 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
13392 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13393 strcat(string, " (");
13394 if(type->kind == 13)
13396 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
13397 PrintAttribs(type->__anon1.type, string);
13399 if(type->kind == 13)
13401 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
13402 strcat(string, "*");
13404 strcat(string, " *");
13406 if(printConst && type->constant && type->kind == 13)
13407 strcat(string, " const");
13410 PrintTypeSpecs(type, string, fullName, printConst);
13413 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
13415 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13416 strcat(string, ")");
13417 if(type->kind == 12)
13418 PrintArraySize(type, string);
13419 else if(type->kind == 11)
13421 struct Type * param;
13423 strcat(string, "(");
13424 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
13426 PrintType(param, string, 0x1, fullName);
13428 strcat(string, ", ");
13430 strcat(string, ")");
13432 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13433 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
13436 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
13438 PrePrintType(type, string, fullName, (((void *)0)), printConst);
13439 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
13440 strcat(string, " ");
13441 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
13443 struct Symbol * _class = type->__anon1.__anon2.thisClass;
13445 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
13447 if(type->classObjectType == 1)
13448 strcat(string, "class");
13450 strcat(string, type->byReference ? "typed_object&" : "typed_object");
13452 else if(_class && _class->string)
13454 char * s = _class->string;
13460 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 0x1, 0x0);
13466 strcat(string, name);
13469 strcat(string, "::");
13471 if(printName && type->name)
13472 PrintName(type, string, fullName);
13473 PostPrintType(type, string, fullName);
13474 if(type->bitFieldCount)
13478 sprintf(count, ":%d", type->bitFieldCount);
13479 strcat(string, count);
13483 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13485 _PrintType(type, string, printName, fullName, 0x1);
13488 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13490 _PrintType(type, string, printName, fullName, 0x0);
13493 static struct Type * FindMember(struct Type * type, char * string)
13495 struct Type * memberType;
13497 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13499 if(!memberType->name)
13501 struct Type * subType = FindMember(memberType, string);
13506 else if(!strcmp(memberType->name, string))
13509 return (((void *)0));
13512 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
13514 struct Type * memberType;
13516 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13518 if(!memberType->name)
13520 struct Type * subType = FindMember(memberType, string);
13524 *offset += memberType->offset;
13528 else if(!strcmp(memberType->name, string))
13530 *offset += memberType->offset;
13534 return (((void *)0));
13537 extern unsigned int parseError;
13539 unsigned int GetParseError()
13544 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
13546 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
13548 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
13550 struct Expression * ParseExpressionString(char * expression)
13553 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
13554 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
13555 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13557 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13558 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
13559 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
13560 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13562 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13563 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
13565 parsedExpression = (((void *)0));
13567 expression_yyparse();
13568 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
13569 return parsedExpression;
13572 extern char * QMkString(const char * source);
13574 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
13576 struct Identifier * id = exp->__anon1.__anon1.identifier;
13577 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
13578 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13579 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13580 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
13582 if(_class && _class->type == 4)
13584 struct __ecereNameSpace__ecere__sys__NamedLink * value = (((void *)0));
13585 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13589 struct __ecereNameSpace__ecere__com__Class * baseClass;
13591 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
13593 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
13595 for(value = e->values.first; value; value = value->next)
13597 if(!strcmp(value->name, id->string))
13602 char constant[256];
13604 FreeExpContents(exp);
13606 exp->isConstant = 0x1;
13607 if(!strcmp(baseClass->dataTypeString, "int"))
13608 sprintf(constant, "%d", (int)value->data);
13610 sprintf(constant, "0x%X", (int)value->data);
13611 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13612 exp->expType = MkClassType(baseClass->fullName);
13620 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
13622 ProcessMethodType(method);
13623 exp->expType = __extension__ ({
13624 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13626 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
13630 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
13632 if(!prop->dataType)
13633 ProcessPropertyType(prop);
13634 exp->expType = prop->dataType;
13636 prop->dataType->refCount++;
13639 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
13641 if(!member->dataType)
13642 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
13643 exp->expType = member->dataType;
13644 if(member->dataType)
13645 member->dataType->refCount++;
13648 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
13650 if(!classProp->dataType)
13651 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0x0);
13652 if(classProp->constant)
13654 FreeExpContents(exp);
13655 exp->isConstant = 0x1;
13656 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
13659 exp->__anon1.__anon1.constant = QMkString((char *)classProp->Get(_class));
13663 char constant[256];
13666 sprintf(constant, "%d", (int)classProp->Get(_class));
13667 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13673 exp->expType = classProp->dataType;
13674 if(classProp->dataType)
13675 classProp->dataType->refCount++;
13681 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
13683 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
13684 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
13685 struct __ecereNameSpace__ecere__com__NameSpace * child;
13689 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)))
13691 data = ScanGlobalData(child, name);
13699 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
13701 extern char * strncpy(char * , const char * , size_t n);
13703 static struct GlobalData * FindGlobalData(char * name)
13706 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
13708 nameSpace = globalData;
13709 for(c = 0; name[c]; c++)
13711 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
13713 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
13714 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
13716 strncpy(spaceName, name + start, c - start);
13717 spaceName[c - start] = '\0';
13718 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
13719 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
13721 return (((void *)0));
13722 nameSpace = newSpace;
13730 return ScanGlobalData(nameSpace, name + start);
13732 return (((void *)0));
13735 static int definedExpStackPos;
13737 static void * definedExpStack[512];
13739 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
13741 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
13743 FreeExpContents(checkedExp);
13744 FreeType(checkedExp->expType);
13745 FreeType(checkedExp->destType);
13746 *checkedExp = *newExp;
13747 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13748 checkedExp->prev = prev;
13749 checkedExp->next = next;
13752 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
13754 extern int printf(const char * , ...);
13756 void __ecereMethod_Expression_Clear();
13758 void ApplyAnyObjectLogic(struct Expression * e)
13760 struct Type * destType = e->destType;
13762 if(destType && (destType->classObjectType == 3))
13764 if(e && e->expType)
13766 struct Type * type = e->expType;
13767 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
13769 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
13771 _class = type->__anon1._class->__anon1.registered;
13773 else if(type->kind == 19)
13775 _class = FindClass("ecere::com::Class")->__anon1.registered;
13779 char string[1024] = "";
13780 struct Symbol * classSym;
13782 PrintTypeNoConst(type, string, 0x0, 0x1);
13783 classSym = FindClass(string);
13785 _class = classSym->__anon1.registered;
13787 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)))
13789 if(!_class || strcmp(_class->fullName, "char *"))
13791 struct Expression * checkedExp = e, * newExp;
13793 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13795 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13797 if(checkedExp->type == 23)
13799 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13802 checkedExp = (*checkedExp->__anon1.list).last;
13804 else if(checkedExp->type == 11)
13805 checkedExp = checkedExp->__anon1.cast.exp;
13807 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
13809 newExp = checkedExp->__anon1.op.exp2;
13810 checkedExp->__anon1.op.exp2 = (((void *)0));
13811 FreeExpContents(checkedExp);
13812 if(e->expType && e->expType->passAsTemplate)
13816 ComputeTypeSize(e->expType);
13817 sprintf(size, "%d", e->expType->size);
13818 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))))));
13820 ReplaceExpContents(checkedExp, newExp);
13821 e->byReference = 0x1;
13823 else if(!e->byReference || (_class && _class->type == 5))
13825 struct Expression * checkedExp;
13828 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;
13830 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
13832 struct Context * context = PushContext();
13833 struct Declarator * decl;
13834 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13835 char typeString[1024];
13836 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13838 typeString[0] = '\0';
13840 newExp->prev = (((void *)0));
13841 newExp->next = (((void *)0));
13842 newExp->expType = (((void *)0));
13843 PrintTypeNoConst(e->expType, typeString, 0x0, 0x1);
13844 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13845 newExp->destType = ProcessType(specs, decl);
13846 curContext = context;
13850 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
13853 sprintf(name, "__internalValue%03X", internalValueCounter++);
13854 if(!curCompound->__anon1.compound.declarations)
13855 curCompound->__anon1.compound.declarations = MkList();
13856 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
13857 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
13858 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
13859 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
13862 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
13864 struct Type * type = e->destType;
13866 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13867 CopyTypeInto(e->destType, type);
13868 e->destType->refCount = 1;
13869 e->destType->classObjectType = 0;
13872 e->__anon1.compound->__anon1.compound.context = context;
13873 PopContext(context);
13874 curContext = context->parent;
13878 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13880 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13882 if(checkedExp->type == 23)
13884 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13887 checkedExp = (*checkedExp->__anon1.list).last;
13889 else if(checkedExp->type == 11)
13890 checkedExp = checkedExp->__anon1.cast.exp;
13893 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13895 *operand = *checkedExp;
13896 checkedExp->destType = (((void *)0));
13897 checkedExp->expType = (((void *)0));
13898 __ecereMethod_Expression_Clear(checkedExp);
13899 checkedExp->type = 4;
13900 checkedExp->__anon1.op.op = '&';
13901 checkedExp->__anon1.op.exp1 = (((void *)0));
13902 checkedExp->__anon1.op.exp2 = operand;
13911 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))))
13913 if(e->expType->classObjectType && destType && destType->classObjectType)
13919 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13922 thisExp->prev = (((void *)0));
13923 thisExp->next = (((void *)0));
13924 __ecereMethod_Expression_Clear(e);
13926 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
13927 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
13928 ((struct Expression *)(*e->__anon1.list).first)->byReference = 0x1;
13930 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13931 CopyTypeInto(e->expType, thisExp->expType);
13932 e->expType->byReference = 0x0;
13933 e->expType->refCount = 1;
13934 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))
13936 e->expType->classObjectType = 0;
13941 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
13943 if(destType->kind == 14)
13945 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
13947 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))
13949 unsigned int byReference = e->expType->byReference;
13950 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13951 struct Declarator * decl;
13952 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13953 char typeString[1024];
13954 struct Type * type;
13955 int backupClassObjectType;
13956 unsigned int backupByReference;
13958 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
13962 backupClassObjectType = type->classObjectType;
13963 backupByReference = type->byReference;
13964 type->classObjectType = 0;
13965 type->byReference = 0x0;
13966 typeString[0] = '\0';
13967 PrintType(type, typeString, 0x0, 0x1);
13968 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13969 type->classObjectType = backupClassObjectType;
13970 type->byReference = backupByReference;
13972 thisExp->prev = (((void *)0));
13973 thisExp->next = (((void *)0));
13974 __ecereMethod_Expression_Clear(e);
13975 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)))
13978 e->__anon1.op.op = '*';
13979 e->__anon1.op.exp1 = (((void *)0));
13980 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
13981 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13982 CopyTypeInto(e->expType, type);
13983 e->expType->byReference = 0x0;
13984 e->expType->refCount = 1;
13989 e->__anon1.cast.typeName = MkTypeName(specs, decl);
13990 e->__anon1.cast.exp = thisExp;
13991 e->byReference = 0x1;
13995 e->destType = destType;
13996 destType->refCount++;
14001 void ApplyLocation(struct Expression * exp, struct Location * loc)
14007 if(exp->__anon1.op.exp1)
14008 ApplyLocation(exp->__anon1.op.exp1, loc);
14009 if(exp->__anon1.op.exp2)
14010 ApplyLocation(exp->__anon1.op.exp2, loc);
14013 if(exp->__anon1.list)
14015 struct Expression * e;
14017 for(e = (*exp->__anon1.list).first; e; e = e->next)
14018 ApplyLocation(e, loc);
14022 if(exp->__anon1.index.index)
14024 struct Expression * e;
14026 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
14027 ApplyLocation(e, loc);
14029 if(exp->__anon1.index.exp)
14030 ApplyLocation(exp->__anon1.index.exp, loc);
14033 if(exp->__anon1.call.arguments)
14035 struct Expression * arg;
14037 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
14038 ApplyLocation(arg, loc);
14040 if(exp->__anon1.call.exp)
14041 ApplyLocation(exp->__anon1.call.exp, loc);
14045 if(exp->__anon1.member.exp)
14046 ApplyLocation(exp->__anon1.member.exp, loc);
14049 if(exp->__anon1.cast.exp)
14050 ApplyLocation(exp->__anon1.cast.exp, loc);
14053 if(exp->__anon1.cond.exp)
14055 struct Expression * e;
14057 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
14058 ApplyLocation(e, loc);
14060 if(exp->__anon1.cond.cond)
14061 ApplyLocation(exp->__anon1.cond.cond, loc);
14062 if(exp->__anon1.cond.elseExp)
14063 ApplyLocation(exp->__anon1.cond.elseExp, loc);
14066 if(exp->__anon1.vaArg.exp)
14067 ApplyLocation(exp->__anon1.vaArg.exp, loc);
14074 extern char * strstr(const char * , const char * );
14076 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DefinedExpression;
14078 struct __ecereNameSpace__ecere__com__DefinedExpression
14080 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
14081 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
14083 const char * value;
14084 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
14085 } __attribute__ ((gcc_struct));
14087 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14089 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14091 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
14093 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
14095 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
14097 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
14099 static void ProcessStatement(struct Statement * stmt);
14101 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
14103 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
14105 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
14107 extern const char * sourceFile;
14109 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
14111 void ProcessExpressionType(struct Expression * exp)
14113 unsigned int unresolved = 0x0;
14114 struct Location oldyylloc = yylloc;
14115 unsigned int notByReference = 0x0;
14117 if(!exp || exp->expType)
14124 struct Identifier * id = exp->__anon1.__anon1.identifier;
14126 if(!id || !topContext)
14128 if(id->_class && id->_class->__anon1.__anon1.name)
14130 id->classSym = id->_class->__anon1.__anon1.symbol;
14132 if(strstr(id->string, "__ecereClass") == id->string)
14134 exp->expType = ProcessTypeString("ecere::com::Class", 0x1);
14137 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
14139 ReplaceClassMembers(exp, thisClass);
14142 ProcessExpressionType(exp);
14145 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0x0))
14150 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14154 if(exp->destType && CheckExpressionType(exp, exp->destType, 0x0, 0x0))
14160 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
14163 ProcessExpressionType(exp);
14167 else if(currentClass && !id->_class)
14169 if(ResolveIdWithClass(exp, currentClass, 0x1))
14172 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14177 struct Type * type = symbol->type;
14178 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
14180 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
14182 struct Context * context = SetupTemplatesContext(_class);
14184 type = ReplaceThisClassType(_class);
14185 FinishTemplatesContext(context);
14187 type->refCount = 0;
14189 FreeSpecifier(id->_class);
14190 id->_class = (((void *)0));
14191 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14192 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
14193 id->classSym = (((void *)0));
14194 exp->expType = type;
14197 if(type && (type->kind == 15))
14198 exp->isConstant = 0x1;
14199 if(symbol->isParam || !strcmp(id->string, "this"))
14201 if(_class && _class->type == 1 && !type->declaredWithStruct)
14202 exp->byReference = 0x1;
14204 if(symbol->isIterator)
14206 if(symbol->isIterator == 3)
14209 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
14210 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
14211 exp->expType = (((void *)0));
14212 ProcessExpressionType(exp);
14214 else if(symbol->isIterator != 4)
14217 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
14218 exp->__anon1.member.exp->expType = exp->expType;
14219 exp->__anon1.member.member = MkIdentifier("data");
14220 exp->expType = (((void *)0));
14221 ProcessExpressionType(exp);
14228 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
14230 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14234 strcpy(name, thisNameSpace);
14235 strcat(name, "::");
14236 strcat(name, id->string);
14237 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
14240 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
14245 for(c = 0; c < definedExpStackPos; c++)
14246 if(definedExpStack[c] == definedExp)
14248 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
14250 struct Location backupYylloc = yylloc;
14251 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
14253 definedExpStack[definedExpStackPos++] = definedExp;
14254 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
14255 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
14256 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14258 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14259 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
14260 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
14261 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14263 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14264 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
14266 parsedExpression = (((void *)0));
14268 expression_yyparse();
14269 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
14271 fileInput = backInput;
14272 yylloc = backupYylloc;
14273 if(parsedExpression)
14275 FreeIdentifier(id);
14277 exp->__anon1.list = MkListOne(parsedExpression);
14278 ApplyLocation(parsedExpression, &yylloc);
14279 ProcessExpressionType(exp);
14280 definedExpStackPos--;
14283 definedExpStackPos--;
14289 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
14295 struct GlobalData * data = (((void *)0));
14297 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14301 strcpy(name, thisNameSpace);
14302 strcat(name, "::");
14303 strcat(name, id->string);
14304 data = FindGlobalData(name);
14307 data = FindGlobalData(id->string);
14310 DeclareGlobalData(data);
14311 exp->expType = data->dataType;
14313 data->dataType->refCount++;
14314 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14315 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
14316 FreeSpecifier(id->_class);
14317 id->_class = (((void *)0));
14322 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
14324 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14328 strcpy(name, thisNameSpace);
14329 strcat(name, "::");
14330 strcat(name, id->string);
14331 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
14334 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
14339 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14340 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
14342 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
14343 strcpy(name, "__ecereFunction_");
14344 FullClassNameCat(name, id->string, 0x0);
14345 if(DeclareFunction(function, name))
14347 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14348 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
14350 exp->expType = function->dataType;
14351 if(function->dataType)
14352 function->dataType->refCount++;
14353 FreeSpecifier(id->_class);
14354 id->_class = (((void *)0));
14366 struct __ecereNameSpace__ecere__com__Class * _class;
14368 if(!exp->__anon1.instance->_class)
14370 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
14372 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
14375 ProcessInstantiationType(exp->__anon1.instance);
14376 exp->isConstant = exp->__anon1.instance->isConstant;
14377 if(exp->__anon1.instance->_class)
14379 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
14387 char * constant = exp->__anon1.__anon1.constant;
14388 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 0x1, type);
14390 exp->expType = type;
14391 if(constant[0] == '\'')
14393 if((int)((unsigned char *)constant)[1] > 127)
14396 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
14400 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
14401 exp->__anon1.__anon1.constant = PrintUInt(ch);
14403 type->__anon1._class = FindClass("unichar");
14404 type->isSigned = 0x0;
14409 type->isSigned = 0x1;
14414 char * dot = strchr(constant, '.');
14415 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
14420 exponent = strchr(constant, 'p');
14422 exponent = strchr(constant, 'P');
14426 exponent = strchr(constant, 'e');
14428 exponent = strchr(constant, 'E');
14430 if(dot || exponent)
14432 if(strchr(constant, 'f') || strchr(constant, 'F'))
14436 type->isSigned = 0x1;
14440 unsigned int isSigned = constant[0] == '-';
14441 char * endP = (((void *)0));
14442 long long i64 = strtoll(constant, &endP, 0);
14443 uint64 ui64 = strtoull(constant, &endP, 0);
14444 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll"));
14448 if(i64 < (((int)0x80000000)))
14453 if(ui64 > (((int)0x7fffffff)))
14455 if(ui64 > (0xffffffff))
14458 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
14462 else if(constant[0] != '0' || !constant[1])
14465 type->kind = is64Bit ? 4 : 3;
14466 type->isSigned = isSigned;
14469 exp->isConstant = 0x1;
14470 if(exp->destType && exp->destType->kind == 7)
14472 else if(exp->destType && exp->destType->kind == 6)
14474 else if(exp->destType && exp->destType->kind == 4)
14481 exp->isConstant = 0x1;
14482 exp->expType = __extension__ ({
14483 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14485 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
14486 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14488 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 1, __ecereInstance1->constant = 0x1, __ecereInstance1->isSigned = 0x1, __ecereInstance1;
14489 }), __ecereInstance2;
14495 ProcessExpressionType(exp->__anon1._new.size);
14496 exp->expType = __extension__ ({
14497 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14499 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
14501 DeclareType(exp->expType->__anon1.type, 0x0, 0x0);
14505 ProcessExpressionType(exp->__anon1._renew.size);
14506 ProcessExpressionType(exp->__anon1._renew.exp);
14507 exp->expType = __extension__ ({
14508 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14510 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
14512 DeclareType(exp->expType->__anon1.type, 0x0, 0x0);
14516 unsigned int assign = 0x0, boolResult = 0x0, boolOps = 0x0;
14517 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
14518 unsigned int useDestType = 0x0, useSideType = 0x0;
14519 struct Location oldyylloc = yylloc;
14520 unsigned int useSideUnit = 0x0;
14521 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
14522 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
14524 switch(exp->__anon1.op.op)
14578 if(exp->__anon1.op.exp1)
14585 if(exp->__anon1.op.op == '&')
14587 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
14589 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
14590 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0x0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14592 if(symbol && symbol->isIterator == 2)
14595 exp->__anon1.member.exp = exp->__anon1.op.exp2;
14596 exp->__anon1.member.member = MkIdentifier("key");
14597 exp->expType = (((void *)0));
14598 exp->__anon1.op.exp2->expType = symbol->type;
14599 symbol->type->refCount++;
14600 ProcessExpressionType(exp);
14606 if(exp->__anon1.op.exp1)
14608 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
14610 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
14612 if(exp->__anon1.op.exp1->destType)
14613 FreeType(exp->__anon1.op.exp1->destType);
14614 exp->__anon1.op.exp1->destType = exp->destType;
14615 exp->__anon1.op.exp1->opDestType = 0x1;
14617 exp->destType->refCount++;
14621 if(exp->__anon1.op.exp1->destType)
14622 FreeType(exp->__anon1.op.exp1->destType);
14623 exp->__anon1.op.exp1->destType = dummy;
14626 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14627 exp->__anon1.op.exp1->destType->count++;
14628 ProcessExpressionType(exp->__anon1.op.exp1);
14629 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14630 exp->__anon1.op.exp1->destType->count--;
14631 exp->__anon1.op.exp1->opDestType = 0x0;
14632 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)
14634 exp->__anon1.op.exp2 = MkExpConstant("1");
14635 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
14638 if(exp->__anon1.op.exp1->destType == dummy)
14641 exp->__anon1.op.exp1->destType = (((void *)0));
14643 type1 = exp->__anon1.op.exp1->expType;
14645 if(exp->__anon1.op.exp2)
14647 char expString[10240];
14649 expString[0] = '\0';
14650 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
14652 if(exp->__anon1.op.exp1)
14654 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
14655 if(exp->__anon1.op.exp1->expType)
14656 exp->__anon1.op.exp1->expType->refCount++;
14660 exp->__anon1.op.exp2->destType = exp->destType;
14661 if(!exp->__anon1.op.exp1 || exp->__anon1.op.op != '&')
14662 exp->__anon1.op.exp2->opDestType = 0x1;
14664 exp->destType->refCount++;
14668 exp->expType = type1;
14673 PrintExpression(exp->__anon1.op.exp2, expString);
14674 if(type1 && type1->kind == 13)
14676 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)
14677 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
14678 else if(exp->__anon1.op.op == '=')
14680 if(exp->__anon1.op.exp2->destType)
14681 FreeType(exp->__anon1.op.exp2->destType);
14682 exp->__anon1.op.exp2->destType = type1;
14689 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)
14693 if(exp->__anon1.op.exp2->destType)
14694 FreeType(exp->__anon1.op.exp2->destType);
14695 exp->__anon1.op.exp2->destType = type1;
14702 exp->expType = type1;
14704 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
14706 if(exp->__anon1.op.exp2->destType)
14707 FreeType(exp->__anon1.op.exp2->destType);
14708 exp->__anon1.op.exp2->destType = exp->destType;
14709 if(exp->__anon1.op.op != '&')
14710 exp->__anon1.op.exp2->opDestType = 0x1;
14712 exp->destType->refCount++;
14716 if(exp->__anon1.op.exp2->destType)
14717 FreeType(exp->__anon1.op.exp2->destType);
14718 exp->__anon1.op.exp2->destType = dummy;
14721 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))
14723 FreeType(exp->__anon1.op.exp2->destType);
14724 exp->__anon1.op.exp2->destType = type1;
14727 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14728 exp->__anon1.op.exp2->destType->count++;
14729 if(exp->__anon1.op.op == SIZEOF)
14731 struct Expression * e = exp->__anon1.op.exp2;
14733 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
14735 if(e->type == 5 || e->type == 32 || e->type == 23)
14738 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
14740 e = (*e->__anon1.list).last;
14743 if(e->type == 11 && e->__anon1.cast.exp)
14744 e->__anon1.cast.exp->needCast = 0x1;
14746 ProcessExpressionType(exp->__anon1.op.exp2);
14747 exp->__anon1.op.exp2->opDestType = 0x0;
14748 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14749 exp->__anon1.op.exp2->destType->count--;
14750 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
14752 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)
14754 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
14755 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14757 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)))
14759 if(exp->__anon1.op.op == ADD_ASSIGN)
14760 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14762 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))
14764 if(exp->__anon1.op.op == ADD_ASSIGN)
14765 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14767 else if(inCompiler)
14769 char type1String[1024];
14770 char type2String[1024];
14772 type1String[0] = '\0';
14773 type2String[0] = '\0';
14774 PrintType(exp->__anon1.op.exp2->expType, type1String, 0x0, 0x1);
14775 PrintType(type1, type2String, 0x0, 0x1);
14776 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
14777 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
14780 if(exp->__anon1.op.exp2->destType == dummy)
14783 exp->__anon1.op.exp2->destType = (((void *)0));
14785 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
14787 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14788 type2->refCount = 1;
14789 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
14790 type2->isSigned = 0x1;
14792 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))
14794 type2 = __extension__ ({
14795 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14797 __ecereInstance1->kind = 3, __ecereInstance1;
14799 type2->refCount = 1;
14800 type2->isSigned = 0x1;
14804 type2 = exp->__anon1.op.exp2->expType;
14810 if(exp->__anon1.op.op == SIZEOF)
14812 exp->expType = __extension__ ({
14813 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14815 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
14817 exp->isConstant = 0x1;
14819 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
14821 exp->expType = Dereference(type2);
14822 if(type2 && type2->kind == 8)
14823 notByReference = 0x1;
14825 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
14826 exp->expType = Reference(type2);
14831 if(exp->__anon1.op.exp1)
14833 if(exp->__anon1.op.exp1->destType)
14834 FreeType(exp->__anon1.op.exp1->destType);
14835 exp->__anon1.op.exp1->destType = MkClassType("bool");
14836 exp->__anon1.op.exp1->destType->truth = 0x1;
14837 if(!exp->__anon1.op.exp1->expType)
14838 ProcessExpressionType(exp->__anon1.op.exp1);
14840 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
14841 FreeType(exp->__anon1.op.exp1->expType);
14842 exp->__anon1.op.exp1->expType = MkClassType("bool");
14843 exp->__anon1.op.exp1->expType->truth = 0x1;
14845 if(exp->__anon1.op.exp2)
14847 if(exp->__anon1.op.exp2->destType)
14848 FreeType(exp->__anon1.op.exp2->destType);
14849 exp->__anon1.op.exp2->destType = MkClassType("bool");
14850 exp->__anon1.op.exp2->destType->truth = 0x1;
14851 if(!exp->__anon1.op.exp2->expType)
14852 ProcessExpressionType(exp->__anon1.op.exp2);
14854 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
14855 FreeType(exp->__anon1.op.exp2->expType);
14856 exp->__anon1.op.exp2->expType = MkClassType("bool");
14857 exp->__anon1.op.exp2->expType->truth = 0x1;
14860 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")))))
14862 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"))))
14864 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)))
14866 struct Type * intType;
14868 if(!type1->__anon1._class->__anon1.registered->dataType)
14869 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0x0);
14870 if(!type2->__anon1._class->__anon1.registered->dataType)
14871 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0x0);
14872 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0x0);
14873 if(exp->__anon1.op.exp1->destType)
14874 FreeType(exp->__anon1.op.exp1->destType);
14875 if(exp->__anon1.op.exp2->destType)
14876 FreeType(exp->__anon1.op.exp2->destType);
14877 exp->__anon1.op.exp1->destType = intType;
14878 exp->__anon1.op.exp2->destType = intType;
14879 intType->refCount++;
14883 if(exp->__anon1.op.exp2->destType)
14884 FreeType(exp->__anon1.op.exp2->destType);
14885 exp->__anon1.op.exp2->destType = type1;
14887 if(exp->__anon1.op.exp1->destType)
14888 FreeType(exp->__anon1.op.exp1->destType);
14889 exp->__anon1.op.exp1->destType = type2;
14892 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)
14893 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);
14894 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
14896 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 0x1);
14900 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14902 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
14903 ProcessExpressionType(exp->__anon1.op.exp1);
14904 if(type2->kind != 13)
14906 ProcessExpressionType(classExp);
14907 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
14908 if(!exp->__anon1.op.exp2->expType)
14912 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0x0);
14915 ProcessExpressionType(exp->__anon1.op.exp2);
14919 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)))
14921 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
14922 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14923 exp->expType = type1;
14927 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)))
14929 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
14930 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14931 exp->expType = type2;
14935 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))
14937 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
14941 unsigned int success = 0x0;
14943 if(type1->kind == 13 && type2->kind == 13)
14945 if(exp->__anon1.op.op == '+')
14946 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14947 else if(exp->__anon1.op.op == '-')
14949 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0x0, 0x0, 0x0, 0x0, 0x0))
14951 exp->expType = __extension__ ({
14952 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14954 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
14957 if(type1->__anon1.type->kind == 20)
14959 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 0x1);
14963 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14965 ProcessExpressionType(classExp);
14967 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"))));
14968 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
14976 if(!success && exp->__anon1.op.exp1->type == 2)
14978 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
14981 FreeType(exp->expType);
14982 exp->expType = exp->__anon1.op.exp1->destType;
14983 if(exp->__anon1.op.exp1->destType)
14984 exp->__anon1.op.exp1->destType->refCount++;
14987 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
14990 FreeType(exp->expType);
14991 exp->expType = exp->__anon1.op.exp2->destType;
14992 if(exp->__anon1.op.exp2->destType)
14993 exp->__anon1.op.exp2->destType->refCount++;
14999 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
15002 FreeType(exp->expType);
15003 exp->expType = exp->__anon1.op.exp2->destType;
15004 if(exp->__anon1.op.exp2->destType)
15005 exp->__anon1.op.exp2->destType->refCount++;
15008 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15011 FreeType(exp->expType);
15012 exp->expType = exp->__anon1.op.exp1->destType;
15013 if(exp->__anon1.op.exp1->destType)
15014 exp->__anon1.op.exp1->destType->refCount++;
15020 char expString1[10240];
15021 char expString2[10240];
15025 expString1[0] = '\0';
15026 expString2[0] = '\0';
15031 PrintExpression(exp->__anon1.op.exp1, expString1);
15032 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15033 PrintExpression(exp->__anon1.op.exp2, expString2);
15034 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15035 PrintType(exp->__anon1.op.exp1->expType, type1, 0x0, 0x1);
15036 PrintType(exp->__anon1.op.exp2->expType, type2, 0x0, 0x1);
15038 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
15042 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)
15044 if(exp->__anon1.op.exp1->destType)
15045 FreeType(exp->__anon1.op.exp1->destType);
15046 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15047 if(type2->__anon1._class->__anon1.registered->dataType)
15048 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15049 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15050 exp->expType = type2;
15054 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)
15056 if(exp->__anon1.op.exp2->destType)
15057 FreeType(exp->__anon1.op.exp2->destType);
15058 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15059 if(type1->__anon1._class->__anon1.registered->dataType)
15060 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15061 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15062 exp->expType = type1;
15068 unsigned int valid = 0x0;
15070 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
15072 if(exp->__anon1.op.exp2->destType)
15073 FreeType(exp->__anon1.op.exp2->destType);
15074 if(!type1->__anon1._class->__anon1.registered->dataType)
15075 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0x0);
15076 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15077 exp->__anon1.op.exp2->destType->refCount++;
15078 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15081 type2 = exp->__anon1.op.exp2->destType;
15084 exp->expType = type2;
15087 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
15089 if(exp->__anon1.op.exp1->destType)
15090 FreeType(exp->__anon1.op.exp1->destType);
15091 if(!type2->__anon1._class->__anon1.registered->dataType)
15092 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0x0);
15093 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15094 exp->__anon1.op.exp1->destType->refCount++;
15095 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15096 type1 = exp->__anon1.op.exp1->destType;
15097 exp->expType = type1;
15100 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
15102 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
15103 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
15105 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
15107 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15109 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0x0, 0x0))
15112 FreeType(exp->expType);
15113 exp->expType = exp->__anon1.op.exp2->expType;
15114 if(exp->__anon1.op.exp2->expType)
15115 exp->__anon1.op.exp2->expType->refCount++;
15119 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15121 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0x0, 0x0))
15124 FreeType(exp->expType);
15125 exp->expType = exp->__anon1.op.exp1->expType;
15126 if(exp->__anon1.op.exp1->expType)
15127 exp->__anon1.op.exp1->expType->refCount++;
15134 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15136 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0x0, 0x0))
15139 FreeType(exp->expType);
15140 exp->expType = exp->__anon1.op.exp1->expType;
15141 if(exp->__anon1.op.exp1->expType)
15142 exp->__anon1.op.exp1->expType->refCount++;
15146 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15148 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0x0, 0x0))
15151 FreeType(exp->expType);
15152 exp->expType = exp->__anon1.op.exp2->expType;
15153 if(exp->__anon1.op.exp2->expType)
15154 exp->__anon1.op.exp2->expType->refCount++;
15162 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))
15164 if(exp->__anon1.op.exp1->destType)
15165 FreeType(exp->__anon1.op.exp1->destType);
15166 exp->__anon1.op.exp1->destType = type2;
15168 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15171 FreeType(exp->expType);
15172 exp->expType = exp->__anon1.op.exp1->destType;
15173 if(exp->__anon1.op.exp1->destType)
15174 exp->__anon1.op.exp1->destType->refCount++;
15179 if(exp->__anon1.op.exp2->destType)
15180 FreeType(exp->__anon1.op.exp2->destType);
15181 exp->__anon1.op.exp2->destType = type1;
15183 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0))
15186 FreeType(exp->expType);
15187 exp->expType = exp->__anon1.op.exp2->destType;
15188 if(exp->__anon1.op.exp2->destType)
15189 exp->__anon1.op.exp2->destType->refCount++;
15191 else if(type1 && type2)
15193 char expString1[10240];
15194 char expString2[10240];
15195 char type1String[1024];
15196 char type2String[1024];
15198 expString1[0] = '\0';
15199 expString2[0] = '\0';
15200 type1String[0] = '\0';
15201 type2String[0] = '\0';
15204 PrintExpression(exp->__anon1.op.exp1, expString1);
15205 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15206 PrintExpression(exp->__anon1.op.exp2, expString2);
15207 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15208 PrintType(exp->__anon1.op.exp1->expType, type1String, 0x0, 0x1);
15209 PrintType(exp->__anon1.op.exp2->expType, type2String, 0x0, 0x1);
15211 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
15212 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
15214 exp->expType = exp->__anon1.op.exp1->expType;
15215 if(exp->__anon1.op.exp1->expType)
15216 exp->__anon1.op.exp1->expType->refCount++;
15218 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15220 exp->expType = exp->__anon1.op.exp2->expType;
15221 if(exp->__anon1.op.exp2->expType)
15222 exp->__anon1.op.exp2->expType->refCount++;
15230 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15232 struct Type * oldType = exp->__anon1.op.exp1->expType;
15234 exp->__anon1.op.exp1->expType = (((void *)0));
15235 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15238 exp->__anon1.op.exp1->expType = oldType;
15240 if(exp->__anon1.op.exp1->destType)
15241 FreeType(exp->__anon1.op.exp1->destType);
15242 exp->__anon1.op.exp1->destType = type2;
15244 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0))
15247 FreeType(exp->expType);
15248 exp->expType = exp->__anon1.op.exp1->destType;
15249 if(exp->__anon1.op.exp1->destType)
15250 exp->__anon1.op.exp1->destType->refCount++;
15254 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
15256 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
15258 if(exp->__anon1.op.exp1->destType)
15259 FreeType(exp->__anon1.op.exp1->destType);
15260 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15261 if(type2->__anon1._class->__anon1.registered->dataType)
15262 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15263 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0x0, 0x0);
15265 if(exp->__anon1.op.op == '!')
15267 exp->expType = MkClassType("bool");
15268 exp->expType->truth = 0x1;
15272 exp->expType = type2;
15277 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
15279 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
15281 if(exp->__anon1.op.exp2->destType)
15282 FreeType(exp->__anon1.op.exp2->destType);
15283 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15284 if(type1->__anon1._class->__anon1.registered->dataType)
15285 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15286 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0x0, 0x0);
15288 exp->expType = type1;
15294 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
15296 char expString[10000];
15298 expString[0] = '\0';
15301 PrintExpression(exp->__anon1.op.exp1, expString);
15302 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15305 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15307 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
15309 char expString[10240];
15311 expString[0] = '\0';
15314 PrintExpression(exp->__anon1.op.exp2, expString);
15315 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15318 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15322 FreeType(exp->expType);
15323 exp->expType = MkClassType("bool");
15324 exp->expType->truth = 0x1;
15326 if(exp->__anon1.op.op != SIZEOF)
15327 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
15328 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
15330 DeclareType(exp->__anon1.op.exp2->expType, 0x0, 0x0);
15332 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
15333 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
15334 yylloc = oldyylloc;
15343 struct Expression * e;
15345 exp->isConstant = 0x1;
15346 for(e = (*exp->__anon1.list).first; e; e = e->next)
15348 unsigned int inced = 0x0;
15352 FreeType(e->destType);
15353 e->opDestType = exp->opDestType;
15354 e->destType = exp->destType;
15357 exp->destType->refCount++;
15358 e->destType->count++;
15362 ProcessExpressionType(e);
15364 exp->destType->count--;
15365 if(!exp->expType && !e->next)
15367 exp->expType = e->expType;
15369 e->expType->refCount++;
15372 exp->isConstant = 0x0;
15374 e = (*exp->__anon1.list).first;
15375 if(!e->next && e->type == 8)
15377 struct Expression * next = exp->next, * prev = exp->prev;
15379 FreeType(exp->expType);
15380 FreeType(exp->destType);
15381 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
15385 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
15386 ProcessExpressionType(exp);
15392 struct Expression * e;
15394 exp->isConstant = 0x1;
15395 ProcessExpressionType(exp->__anon1.index.exp);
15396 if(!exp->__anon1.index.exp->isConstant)
15397 exp->isConstant = 0x0;
15398 if(exp->__anon1.index.exp->expType)
15400 struct Type * source = exp->__anon1.index.exp->expType;
15402 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
15404 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
15405 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
15407 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
15409 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0x0);
15410 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
15412 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0x0);
15414 if(type->kind == 8)
15415 type->constant = 0x1;
15416 else if(type->kind == 13)
15418 struct Type * t = type;
15420 while(t->kind == 13)
15421 t = t->__anon1.type;
15424 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
15429 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
15431 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
15434 FreeType(e->destType);
15435 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
15437 ProcessExpressionType(e);
15442 exp->isConstant = 0x0;
15445 exp->expType = Dereference(exp->__anon1.index.exp->expType);
15447 DeclareType(exp->expType, 0x0, 0x0);
15452 struct Expression * e;
15453 struct Type * functionType;
15454 struct Type * methodType = (((void *)0));
15460 PrintExpression(exp->__anon1.call.exp, name);
15461 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
15463 PrintExpression(exp->__anon1.call.exp, name);
15466 if(exp->__anon1.call.exp->type == 0)
15468 struct Expression * idExp = exp->__anon1.call.exp;
15469 struct Identifier * id = idExp->__anon1.__anon1.identifier;
15471 if(!strcmp(id->string, "__builtin_frame_address"))
15473 exp->expType = ProcessTypeString("void *", 0x1);
15474 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15475 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15478 else if(!strcmp(id->string, "__ENDIAN_PAD"))
15480 exp->expType = ProcessTypeString("int", 0x1);
15481 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15482 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15485 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
15487 struct Expression * a = (((void *)0));
15488 struct Expression * b = (((void *)0));
15489 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
15491 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
15493 a = (*exp->__anon1.call.arguments).first;
15494 b = (*exp->__anon1.call.arguments).last;
15498 else if((*exp->__anon1.call.arguments).count == 1)
15500 a = (*exp->__anon1.call.arguments).first;
15505 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
15506 idExp->__anon1.__anon1.identifier = (((void *)0));
15507 FreeExpContents(exp);
15508 ProcessExpressionType(a);
15510 ProcessExpressionType(b);
15512 exp->__anon1.list = MkList();
15513 if(a->expType && (!b || b->expType))
15515 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
15519 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15520 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
15521 struct Declaration * decl;
15522 char temp1[1024], temp2[1024];
15524 GetTypeSpecs(a->expType, specs);
15525 if(a && !a->isConstant && a->type != 0)
15527 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
15528 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
15529 tempExp1 = QMkExpId(temp1);
15530 tempExp1->expType = a->expType;
15532 a->expType->refCount++;
15533 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
15535 if(b && !b->isConstant && b->type != 0)
15537 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
15538 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
15539 tempExp2 = QMkExpId(temp2);
15540 tempExp2->expType = b->expType;
15542 b->expType->refCount++;
15543 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
15545 decl = MkDeclaration(specs, decls);
15546 if(!curCompound->__anon1.compound.declarations)
15547 curCompound->__anon1.compound.declarations = MkList();
15548 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
15552 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
15554 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
15556 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
15557 exp->expType = a->expType;
15559 a->expType->refCount++;
15561 else if(!strcmp(id->string, "Abs"))
15563 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
15564 exp->expType = a->expType;
15566 a->expType->refCount++;
15568 else if(!strcmp(id->string, "Sgn"))
15570 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"))))));
15571 exp->expType = ProcessTypeString("int", 0x0);
15573 FreeExpression(tempExp1);
15575 FreeExpression(tempExp2);
15576 FreeIdentifier(id);
15582 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
15584 if(!exp->__anon1.call.exp->destType)
15586 exp->__anon1.call.exp->destType = dummy;
15589 ProcessExpressionType(exp->__anon1.call.exp);
15590 if(exp->__anon1.call.exp->destType == dummy)
15593 exp->__anon1.call.exp->destType = (((void *)0));
15597 functionType = exp->__anon1.call.exp->expType;
15598 if(functionType && functionType->kind == 16)
15600 methodType = functionType;
15601 functionType = methodType->__anon1.__anon3.method->dataType;
15602 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
15604 char typeString[1024];
15606 typeString[0] = '\0';
15608 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
15610 functionType->__anon1.__anon2.thisClass = (((void *)0));
15611 PrintType(functionType, typeString, 0x1, 0x1);
15612 functionType->__anon1.__anon2.thisClass = back;
15614 if(strstr(typeString, "thisclass"))
15616 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15617 struct Declarator * decl;
15620 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15622 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
15623 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))
15624 thisClassParams = 0x0;
15625 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15627 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
15629 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
15630 ProcessDeclarator(decl);
15631 thisClass = backupThisClass;
15633 thisClassParams = 0x1;
15634 functionType = ProcessType(specs, decl);
15635 functionType->refCount = 0;
15636 FinishTemplatesContext(context);
15638 FreeList(specs, FreeSpecifier);
15639 FreeDeclarator(decl);
15643 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
15645 struct Type * type = functionType->__anon1.type;
15647 if(!functionType->refCount)
15649 functionType->__anon1.type = (((void *)0));
15650 FreeType(functionType);
15652 functionType = type;
15654 if(functionType && functionType->kind != 11)
15656 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
15658 else if(functionType)
15660 unsigned int emptyParams = 0x0, noParams = 0x0;
15661 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
15662 struct Type * type = functionType->__anon1.__anon2.params.first;
15663 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
15665 struct Location oldyylloc = yylloc;
15669 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
15671 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
15674 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
15676 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)
15678 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
15681 e->destType = type;
15683 type = functionType->__anon1.__anon2.params.first;
15686 type->refCount = 0;
15688 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
15690 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
15691 type->byReference = functionType->byReference;
15692 type->typedByReference = functionType->typedByReference;
15695 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
15697 e->destType = type;
15699 type = functionType->__anon1.__anon2.params.first;
15702 type->refCount = 0;
15705 if(type && type->kind == 0)
15708 if(!type->refCount)
15710 type = (((void *)0));
15712 for(; e; e = e->next)
15714 if(!type && !emptyParams)
15717 if(methodType && methodType->__anon1.__anon3.methodClass)
15718 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);
15720 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);
15723 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
15725 struct Type * templatedType = (((void *)0));
15726 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
15727 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
15730 if(_class && _class->templateArgs)
15732 struct __ecereNameSpace__ecere__com__Class * sClass;
15734 for(sClass = _class; sClass; sClass = sClass->base)
15736 if(sClass->templateClass)
15737 sClass = sClass->templateClass;
15739 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
15741 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
15743 struct __ecereNameSpace__ecere__com__Class * nextClass;
15745 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
15747 if(nextClass->templateClass)
15748 nextClass = nextClass->templateClass;
15749 id += nextClass->templateParams.count;
15759 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
15761 unsigned int constant = type->constant;
15762 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
15765 struct Context * context = SetupTemplatesContext(_class);
15767 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
15768 FinishTemplatesContext(context);
15770 if(templatedType->kind == 8 && constant)
15771 templatedType->constant = 0x1;
15772 else if(templatedType->kind == 13)
15774 struct Type * t = templatedType->__anon1.type;
15776 while(t->kind == 13)
15777 t = t->__anon1.type;
15779 t->constant = constant;
15781 e->destType = templatedType;
15784 templatedType->passAsTemplate = 0x1;
15789 e->destType = type;
15796 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
15798 e->destType = type->prev;
15799 e->destType->refCount++;
15803 e->destType = type;
15808 if(type && type->kind != 14)
15810 struct Type * next = type->next;
15812 if(!type->refCount)
15817 if(type && type->kind != 14)
15819 if(methodType && methodType->__anon1.__anon3.methodClass)
15820 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);
15822 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);
15824 yylloc = oldyylloc;
15825 if(type && !type->refCount)
15830 functionType = __extension__ ({
15831 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15833 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
15835 if(exp->__anon1.call.exp->type == 0)
15837 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
15841 struct Symbol * symbol;
15842 struct Location oldyylloc = yylloc;
15844 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
15845 if(strstr(string, "__builtin_") == string)
15849 functionType->__anon1.__anon2.returnType = exp->destType;
15850 exp->destType->refCount++;
15854 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
15855 symbol = __extension__ ({
15856 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
15858 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 0x1), __ecereInstance1;
15860 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
15861 if(strstr(symbol->string, "::"))
15862 globalContext->hasNameSpace = 0x1;
15863 yylloc = oldyylloc;
15866 else if(exp->__anon1.call.exp->type == 8)
15870 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
15871 if(!functionType->__anon1.__anon2.returnType)
15873 functionType->__anon1.__anon2.returnType = __extension__ ({
15874 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15876 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
15880 if(functionType && functionType->kind == 11)
15882 exp->expType = functionType->__anon1.__anon2.returnType;
15883 if(functionType->__anon1.__anon2.returnType)
15884 functionType->__anon1.__anon2.returnType->refCount++;
15885 if(!functionType->refCount)
15886 FreeType(functionType);
15888 if(exp->__anon1.call.arguments)
15890 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
15892 struct Type * destType = e->destType;
15894 ProcessExpressionType(e);
15901 struct Type * type;
15902 struct Location oldyylloc = yylloc;
15903 unsigned int thisPtr;
15904 struct Expression * checkExp = exp->__anon1.member.exp;
15908 if(checkExp->type == 11)
15909 checkExp = checkExp->__anon1.cast.exp;
15910 else if(checkExp->type == 5)
15911 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
15915 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
15916 exp->thisPtr = thisPtr;
15917 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
15919 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
15921 ProcessExpressionType(exp->__anon1.member.exp);
15922 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)
15924 exp->isConstant = 0x0;
15927 exp->isConstant = exp->__anon1.member.exp->isConstant;
15928 type = exp->__anon1.member.exp->expType;
15930 if(type && (type->kind == 20))
15932 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
15933 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
15937 for(param = _class->templateParams.first; param; param = param->next)
15939 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
15943 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
15945 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
15949 struct Expression * expMember = exp->__anon1.member.exp;
15950 struct Declarator * decl;
15951 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15952 char thisClassTypeString[1024];
15954 FreeIdentifier(exp->__anon1.member.member);
15955 ProcessExpressionType(argExp);
15957 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
15961 char className[1024];
15962 struct __ecereNameSpace__ecere__com__Class * sClass;
15964 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
15965 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
15968 strcpy(thisClassTypeString, _class->fullName);
15970 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
15971 exp->expType = ProcessType(specs, decl);
15972 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
15974 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
15975 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
15977 int paramCount = 0;
15978 int lastParam = -1;
15979 char templateString[1024];
15980 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
15982 sprintf(templateString, "%s<", expClass->templateClass->fullName);
15983 for(cClass = expClass; cClass; cClass = cClass->base)
15987 for(param = cClass->templateParams.first; param; param = param->next)
15990 struct __ecereNameSpace__ecere__com__Class * sClass;
15991 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
15993 for(sClass = cClass->base; sClass; sClass = sClass->base)
15994 id += sClass->templateParams.count;
15995 arg = expClass->templateArgs[id];
15996 for(sClass = _class; sClass; sClass = sClass->base)
15998 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
16000 struct __ecereNameSpace__ecere__com__Class * nextClass;
16002 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
16003 p += nextClass->templateParams.count;
16004 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
16006 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
16008 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16010 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
16011 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
16018 char argument[256];
16020 argument[0] = '\0';
16021 switch(param->type)
16025 char expString[1024];
16026 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16027 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16028 struct Expression * exp;
16029 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16031 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16032 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16033 ProcessExpressionType(exp);
16034 ComputeExpression(exp);
16035 expString[0] = '\0';
16036 PrintExpression(exp, expString);
16037 strcat(argument, expString);
16038 FreeExpression(exp);
16043 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16048 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16050 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
16051 strcat(argument, thisClassTypeString);
16053 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16061 strcat(templateString, ", ");
16062 if(lastParam != p - 1)
16064 strcat(templateString, param->name);
16065 strcat(templateString, " = ");
16067 strcat(templateString, argument);
16076 int len = strlen(templateString);
16078 if(templateString[len - 1] == '>')
16079 templateString[len++] = ' ';
16080 templateString[len++] = '>';
16081 templateString[len++] = '\0';
16084 struct Context * context = SetupTemplatesContext(_class);
16086 FreeType(exp->expType);
16087 exp->expType = ProcessTypeString(templateString, 0x0);
16088 FinishTemplatesContext(context);
16092 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")))))))));
16095 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
16097 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
16100 if(type && (type->kind == 20))
16102 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)))
16104 struct Identifier * id = exp->__anon1.member.member;
16105 int typeKind = type->kind;
16106 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));
16108 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
16110 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
16115 if(typeKind == 3 || typeKind == 15)
16116 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
16119 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
16121 _class = type->__anon1._class->__anon1.registered;
16123 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
16125 _class = FindClass("char *")->__anon1.registered;
16127 else if(type->kind == 13)
16129 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
16130 FreeType(exp->expType);
16131 exp->expType = ProcessTypeString("uintptr", 0x0);
16132 exp->byReference = 0x1;
16136 char string[1024] = "";
16137 struct Symbol * classSym;
16139 PrintTypeNoConst(type, string, 0x0, 0x1);
16140 classSym = FindClass(string);
16142 _class = classSym->__anon1.registered;
16148 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
16149 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
16150 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
16151 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
16152 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
16154 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
16155 exp->__anon1.member.memberType = 1;
16156 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
16157 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
16160 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
16162 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16163 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
16165 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16167 member = (((void *)0));
16169 if(!member && !prop)
16170 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16171 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
16172 exp->__anon1.member.thisPtr = 0x1;
16176 unsigned int useMemberForNonConst = 0x0;
16180 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
16181 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);
16182 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16183 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
16185 if((!prop || useMemberForNonConst) && !member)
16187 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
16190 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16191 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);
16192 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16193 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16198 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
16199 prop = (((void *)0));
16201 member = (((void *)0));
16205 if(!prop && !member && !method)
16206 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
16207 if(!prop && !member && !method)
16211 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
16214 exp->__anon1.member.memberType = 5;
16215 exp->expType = ProcessTypeString(classProp->dataTypeString, 0x0);
16219 char structName[1024];
16220 struct Identifier * id = exp->__anon1.member.member;
16221 struct Expression * classExp = exp->__anon1.member.exp;
16224 FreeType(classExp->expType);
16225 classExp->expType = ProcessTypeString("ecere::com::Class", 0x0);
16226 strcpy(structName, "__ecereClassData_");
16227 FullClassNameCat(structName, type->__anon1._class->string, 0x0);
16229 exp->__anon1.member.member = id;
16230 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"))))))));
16232 ProcessExpressionType(exp);
16238 struct Symbol * classSym = FindClass(id->string);
16242 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
16245 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
16251 exp->__anon1.member.memberType = 1;
16252 if(!prop->dataType)
16253 ProcessPropertyType(prop);
16254 exp->expType = prop->dataType;
16255 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
16257 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16259 CopyTypeInto(type, exp->expType);
16260 type->refCount = 1;
16261 type->constant = 0x1;
16262 exp->expType = type;
16264 else if(prop->dataType)
16265 prop->dataType->refCount++;
16269 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16271 FreeExpContents(exp);
16273 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16274 ProcessExpressionType(exp);
16277 exp->__anon1.member.memberType = 3;
16278 DeclareStruct(_class->fullName, 0x0);
16279 if(!member->dataType)
16281 struct Context * context = SetupTemplatesContext(_class);
16283 member->dataType = ProcessTypeString(member->dataTypeString, 0x0);
16284 FinishTemplatesContext(context);
16286 exp->expType = member->dataType;
16287 if(member->dataType)
16288 member->dataType->refCount++;
16290 else if(revConvert)
16292 exp->__anon1.member.memberType = 4;
16293 exp->expType = MkClassType(revConvert->_class->fullName);
16298 exp->__anon1.member.memberType = 2;
16300 if(!method->dataType)
16301 ProcessMethodType(method);
16302 exp->expType = __extension__ ({
16303 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16305 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
16307 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
16308 exp->expType->__anon1.__anon3.usedClass = _class;
16310 else if(!classProp)
16312 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16314 FreeExpContents(exp);
16316 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16317 FreeType(exp->expType);
16318 exp->expType = MkClassType("ecere::com::Class");
16321 yylloc = exp->__anon1.member.member->loc;
16322 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
16324 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
16326 if(_class && exp->expType)
16328 struct __ecereNameSpace__ecere__com__Class * tClass;
16330 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
16331 while(tClass && !tClass->templateClass)
16332 tClass = tClass->base;
16333 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
16336 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16337 struct __ecereNameSpace__ecere__com__Class * sClass;
16339 for(sClass = tClass; sClass; sClass = sClass->base)
16342 if(sClass->templateClass)
16343 sClass = sClass->templateClass;
16344 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16346 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
16348 for(sClass = sClass->base; sClass; sClass = sClass->base)
16349 id += sClass->templateParams.count;
16357 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
16359 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16360 struct Context * context = SetupTemplatesContext(tClass);
16361 unsigned int constant = exp->expType->constant;
16363 FreeType(exp->expType);
16364 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16365 if(exp->expType->kind == 8 && constant)
16366 exp->expType->constant = 0x1;
16367 else if(exp->expType->kind == 13)
16369 struct Type * t = exp->expType->__anon1.type;
16371 while(t->kind == 13)
16372 t = t->__anon1.type;
16374 t->constant = constant;
16378 if(exp->expType->kind == 21)
16380 FreeType(exp->expType);
16381 exp->expType = ReplaceThisClassType(_class);
16383 if(tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType))))
16384 exp->expType->passAsTemplate = 0x1;
16387 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16388 if(exp->destType->kind == 8 && constant)
16389 exp->destType->constant = 0x1;
16390 else if(exp->destType->kind == 13)
16392 struct Type * t = exp->destType->__anon1.type;
16394 while(t->kind == 13)
16395 t = t->__anon1.type;
16397 t->constant = constant;
16399 if(exp->destType->kind == 21)
16401 FreeType(exp->destType);
16402 exp->destType = ReplaceThisClassType(_class);
16406 FinishTemplatesContext(context);
16409 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)
16412 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16413 struct __ecereNameSpace__ecere__com__Class * sClass;
16415 for(sClass = tClass; sClass; sClass = sClass->base)
16418 if(sClass->templateClass)
16419 sClass = sClass->templateClass;
16420 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16422 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
16424 for(sClass = sClass->base; sClass; sClass = sClass->base)
16425 id += sClass->templateParams.count;
16435 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16436 struct Context * context = SetupTemplatesContext(tClass);
16437 struct Type * basicType;
16439 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0x0);
16442 if(basicType->kind == 21)
16444 FreeType(basicType);
16445 basicType = ReplaceThisClassType(_class);
16447 FreeType(exp->expType);
16448 exp->expType = __extension__ ({
16449 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16451 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
16455 exp->destType = exp->expType;
16456 exp->destType->refCount++;
16459 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16460 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16461 struct Declarator * decl;
16463 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
16466 exp->destType->refCount++;
16468 exp->expType->refCount++;
16470 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
16471 exp->__anon1.cast.exp = newExp;
16474 FinishTemplatesContext(context);
16477 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
16479 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
16483 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
16486 int paramCount = 0;
16487 int lastParam = -1;
16488 char templateString[1024];
16489 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
16491 sprintf(templateString, "%s<", expClass->templateClass->fullName);
16492 while(cClass != expClass)
16494 struct __ecereNameSpace__ecere__com__Class * sClass;
16496 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
16499 for(param = cClass->templateParams.first; param; param = param->next)
16501 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
16504 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
16505 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
16507 while(cClassCur != tClass && !paramCur)
16509 struct __ecereNameSpace__ecere__com__Class * sClassCur;
16511 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
16513 cClassCur = sClassCur;
16514 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
16516 if(!strcmp(paramCur->name, param->name))
16523 if(paramCur && paramCur->type == 0)
16524 arg = tClass->templateArgs[cp];
16526 arg = expClass->templateArgs[p];
16528 char argument[256];
16530 argument[0] = '\0';
16531 switch(param->type)
16535 char expString[1024];
16536 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16537 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16538 struct Expression * exp;
16539 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16541 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16542 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16543 ProcessExpressionType(exp);
16544 ComputeExpression(exp);
16545 expString[0] = '\0';
16546 PrintExpression(exp, expString);
16547 strcat(argument, expString);
16548 FreeExpression(exp);
16553 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16558 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16559 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16566 strcat(templateString, ", ");
16567 if(lastParam != p - 1)
16569 strcat(templateString, param->name);
16570 strcat(templateString, " = ");
16572 strcat(templateString, argument);
16581 int len = strlen(templateString);
16583 if(templateString[len - 1] == '>')
16584 templateString[len++] = ' ';
16585 templateString[len++] = '>';
16586 templateString[len++] = '\0';
16588 FreeType(exp->expType);
16590 struct Context * context = SetupTemplatesContext(tClass);
16592 exp->expType = ProcessTypeString(templateString, 0x0);
16593 FinishTemplatesContext(context);
16600 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)");
16602 else if(type && (type->kind == 9 || type->kind == 10))
16604 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
16608 exp->expType = memberType;
16610 memberType->refCount++;
16615 char expString[10240];
16617 expString[0] = '\0';
16620 PrintExpression(exp, expString);
16621 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16623 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
16625 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
16627 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
16629 struct Identifier * id = exp->__anon1.member.member;
16630 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));
16634 FreeType(exp->expType);
16635 exp->expType = ReplaceThisClassType(_class);
16639 yylloc = oldyylloc;
16644 struct Type * destType = exp->destType;
16646 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
16648 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
16650 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
16654 ProcessExpressionType(exp);
16661 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
16663 if(classSym && classSym->__anon1.registered)
16665 if(classSym->__anon1.registered->type == 5)
16670 DeclareStruct(classSym->string, 0x0);
16671 FreeSpecifier(exp->__anon1._class);
16673 FullClassNameCat(name, classSym->string, 0x0);
16674 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
16678 if(classSym->__anon1.registered->fixed)
16680 FreeSpecifier(exp->__anon1._class);
16681 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
16686 char className[1024];
16688 strcpy(className, "__ecereClass_");
16689 FullClassNameCat(className, classSym->string, 0x1);
16690 MangleClassName(className);
16691 DeclareClass(classSym, className);
16692 FreeExpContents(exp);
16694 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
16695 exp->__anon1.member.member = MkIdentifier("structSize");
16699 exp->expType = __extension__ ({
16700 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16702 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16708 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
16710 exp->expType = __extension__ ({
16711 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16713 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16715 exp->isConstant = 0x1;
16716 DeclareType(type, 0x0, 0x0);
16722 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
16725 FreeType(exp->__anon1.cast.exp->destType);
16726 exp->__anon1.cast.exp->destType = type;
16728 type->casted = 0x1;
16729 ProcessExpressionType(exp->__anon1.cast.exp);
16730 type->casted = 0x0;
16732 exp->expType = type;
16733 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
16735 void * prev = exp->prev, * next = exp->next;
16736 struct Type * expType = exp->__anon1.cast.exp->destType;
16737 struct Expression * castExp = exp->__anon1.cast.exp;
16738 struct Type * destType = exp->destType;
16741 expType->refCount++;
16742 FreeType(exp->expType);
16743 FreeTypeName(exp->__anon1.cast.typeName);
16745 FreeType(exp->expType);
16746 FreeType(exp->destType);
16747 exp->expType = expType;
16748 exp->destType = destType;
16749 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
16755 exp->isConstant = exp->__anon1.cast.exp->isConstant;
16761 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
16763 exp->expType = type;
16768 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
16770 ProcessExpressionType(exp->__anon1.vaArg.exp);
16771 exp->expType = type;
16776 struct Expression * e;
16778 exp->isConstant = 0x1;
16779 FreeType(exp->__anon1.cond.cond->destType);
16780 exp->__anon1.cond.cond->destType = MkClassType("bool");
16781 exp->__anon1.cond.cond->destType->truth = 0x1;
16782 ProcessExpressionType(exp->__anon1.cond.cond);
16783 if(!exp->__anon1.cond.cond->isConstant)
16784 exp->isConstant = 0x0;
16785 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
16789 FreeType(e->destType);
16790 e->destType = exp->destType;
16792 e->destType->refCount++;
16794 ProcessExpressionType(e);
16797 exp->expType = e->expType;
16799 e->expType->refCount++;
16802 exp->isConstant = 0x0;
16804 FreeType(exp->__anon1.cond.elseExp->destType);
16805 exp->__anon1.cond.elseExp->destType = exp->destType ? exp->destType : exp->expType;
16806 if(exp->__anon1.cond.elseExp->destType)
16807 exp->__anon1.cond.elseExp->destType->refCount++;
16808 ProcessExpressionType(exp->__anon1.cond.elseExp);
16809 if(!exp->__anon1.cond.elseExp->isConstant)
16810 exp->isConstant = 0x0;
16815 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
16817 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
16819 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
16821 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
16823 exp->destType->refCount++;
16825 ProcessStatement(exp->__anon1.compound);
16826 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
16828 exp->expType->refCount++;
16834 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
16836 if(spec && spec->type == 1)
16838 exp->expType = MkClassType(spec->__anon1.__anon1.name);
16839 exp->expType->kind = 19;
16840 exp->byReference = 0x1;
16844 exp->expType = MkClassType("ecere::com::Class");
16845 exp->byReference = 0x1;
16851 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
16855 struct Identifier * id = exp->__anon1.classData.id;
16856 char structName[1024];
16857 struct Expression * classExp;
16859 strcpy(structName, "__ecereClassData_");
16860 FullClassNameCat(structName, _class->fullName, 0x0);
16862 exp->__anon1.member.member = id;
16863 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0x0, 0x0))
16864 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
16866 classExp = MkExpIdentifier(MkIdentifier("class"));
16867 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"))))))));
16868 ProcessExpressionType(exp);
16875 struct Type * type = (((void *)0));
16876 const char * typeString = (((void *)0));
16877 char typeStringBuf[1024];
16879 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))
16881 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
16883 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
16885 else if(exp->__anon1.list)
16887 struct Expression * e;
16889 for(e = (*exp->__anon1.list).first; e; e = e->next)
16891 ProcessExpressionType(e);
16901 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
16905 e->expType = (((void *)0));
16906 e = (*exp->__anon1.list).first;
16907 ProcessExpressionType(e);
16910 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
16912 FreeType(e->expType);
16913 e->expType = (((void *)0));
16915 type = (((void *)0));
16923 FreeType(e->expType);
16924 e->expType = (((void *)0));
16930 typeStringBuf[0] = '\0';
16931 PrintTypeNoConst(type, typeStringBuf, 0x0, 0x1);
16932 typeString = typeStringBuf;
16934 type = (((void *)0));
16939 char templateString[1024];
16940 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
16941 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
16942 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16943 struct Expression * expExt;
16944 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
16946 sprintf(templateString, "Container<%s>", typeString);
16947 if(exp->__anon1.list)
16949 struct Expression * e;
16951 type = ProcessTypeString(typeString, 0x0);
16952 while(e = (*exp->__anon1.list).first)
16954 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
16955 e->destType = type;
16957 ProcessExpressionType(e);
16958 ListAdd(initializers, MkInitializerAssignment(e));
16961 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
16963 DeclareStruct("ecere::com::BuiltInContainer", 0x0);
16964 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
16965 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16966 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
16967 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16968 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
16969 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16970 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
16971 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16972 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
16973 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16975 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, &(*initializers).count, (void *)0), __ecereInstance1;
16977 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16978 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, CopySpecifier), CopyDeclarator(decl))));
16979 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
16980 exp->expType = ProcessTypeString(templateString, 0x0);
16982 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
16983 ProcessExpressionType(expExt);
16987 exp->expType = ProcessTypeString("Container", 0x0);
16988 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
16993 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
16995 FreeType(exp->expType);
16996 exp->expType = ReplaceThisClassType(thisClass);
16998 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)
17000 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 0x1, 0x0);
17004 if(exp->expType->kind != 15)
17006 struct Type * member;
17007 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
17009 FreeType(exp->expType);
17010 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17011 exp->expType->kind = symbol->type->kind;
17012 exp->expType->refCount++;
17013 exp->expType->__anon1.__anon1.enumName = enumName;
17014 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
17015 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17016 member->refCount++;
17020 struct __ecereNameSpace__ecere__sys__NamedLink * member;
17022 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17024 struct __ecereNameSpace__ecere__sys__NamedLink * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
17026 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
17032 if(exp->destType && (exp->destType->kind == 18))
17034 else if(exp->destType && !exp->destType->keepCast)
17036 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
17037 exp->needTemplateCast = 1;
17038 if(exp->destType->kind == 0)
17040 else if(!CheckExpressionType(exp, exp->destType, 0x0, !exp->destType->casted))
17042 if(!exp->destType->count || unresolved)
17047 if(exp->destType->kind != 14)
17054 char expString[10240];
17056 expString[0] = '\0';
17057 PrintType(exp->destType, type2, 0x0, 0x1);
17060 PrintExpression(exp, expString);
17061 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17064 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
17065 else if(exp->type != 16)
17066 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
17071 char expString[10240];
17073 expString[0] = '\0';
17076 PrintExpression(exp, expString);
17077 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17080 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
17081 else if(exp->type != 16)
17082 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17094 PrintType(exp->expType, type1, 0x0, 0x1);
17095 PrintType(exp->destType, type2, 0x0, 0x1);
17097 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)))
17101 char expString[10240];
17103 expString[0] = '\0';
17106 PrintExpression(exp, expString);
17107 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17109 if(!sourceFile || (strcmp(sourceFile, "src\\lexer.ec") && strcmp(sourceFile, "src/lexer.ec") && strcmp(sourceFile, "src\\grammar.ec") && strcmp(sourceFile, "src/grammar.ec")))
17110 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
17111 FreeType(exp->expType);
17112 exp->destType->refCount++;
17113 exp->expType = exp->destType;
17119 else if(unresolved)
17121 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
17122 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);
17123 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
17124 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
17126 else if(!exp->expType && exp->type != 16)
17128 char expString[10240];
17130 expString[0] = '\0';
17133 PrintExpression(exp, expString);
17134 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17136 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17139 ApplyAnyObjectLogic(exp);
17140 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)))
17142 exp->byReference = 0x1;
17144 yylloc = oldyylloc;
17147 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)
17151 *curMember = (*curMember)->next;
17152 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
17154 *curMember = subMemberStack[--(*subMemberStackPos)];
17155 *curMember = (*curMember)->next;
17157 while((*curMember) && (*curMember)->isProperty)
17158 *curMember = (*curMember)->next;
17159 if(subMemberStackPos)
17161 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17163 subMemberStack[(*subMemberStackPos)++] = *curMember;
17164 *curMember = (*curMember)->members.first;
17165 while(*curMember && (*curMember)->isProperty)
17166 *curMember = (*curMember)->next;
17174 if(subMemberStackPos && *subMemberStackPos)
17176 *curMember = subMemberStack[--(*subMemberStackPos)];
17177 *curMember = (*curMember)->next;
17181 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
17183 if(*curClass == _class)
17185 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
17187 *curMember = (*curClass)->membersAndProperties.first;
17189 while((*curMember) && (*curMember)->isProperty)
17190 *curMember = (*curMember)->next;
17191 if(subMemberStackPos)
17193 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17195 subMemberStack[(*subMemberStackPos)++] = *curMember;
17196 *curMember = (*curMember)->members.first;
17197 while(*curMember && (*curMember)->isProperty)
17198 *curMember = (*curMember)->next;
17205 static void ProcessInitializer(struct Initializer * init, struct Type * type)
17210 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
17212 if(init->__anon1.exp && !init->__anon1.exp->destType)
17214 FreeType(init->__anon1.exp->destType);
17215 init->__anon1.exp->destType = type;
17219 if(init->__anon1.exp)
17221 ProcessExpressionType(init->__anon1.exp);
17222 init->isConstant = init->__anon1.exp->isConstant;
17228 struct Expression * exp = init->__anon1.exp;
17229 struct Instantiation * inst = exp->__anon1.instance;
17230 struct MembersInit * members;
17233 init->__anon1.list = MkList();
17236 for(members = (*inst->members).first; members; members = members->next)
17238 if(members->type == 0)
17240 struct MemberInit * member;
17242 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
17244 ListAdd(init->__anon1.list, member->initializer);
17245 member->initializer = (((void *)0));
17250 FreeExpression(exp);
17254 struct Initializer * i;
17255 struct Type * initializerType = (((void *)0));
17256 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
17257 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
17258 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
17259 int subMemberStackPos = 0;
17261 if(type && type->kind == 12)
17262 initializerType = Dereference(type);
17263 else if(type && (type->kind == 9 || type->kind == 10))
17264 initializerType = type->__anon1.__anon1.members.first;
17265 for(i = (*init->__anon1.list).first; i; i = i->next)
17267 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17269 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
17272 if(!curMember->dataType)
17273 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0x0);
17274 initializerType = curMember->dataType;
17277 ProcessInitializer(i, initializerType);
17278 if(initializerType && type && (type->kind == 9 || type->kind == 10))
17279 initializerType = initializerType->next;
17281 init->isConstant = 0x0;
17283 if(type && type->kind == 12)
17284 FreeType(initializerType);
17285 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))
17287 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
17294 extern struct Symbol * FindType(struct Context * ctx, const char * name);
17296 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
17298 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct)
17304 if(spec->__anon1.specifier == THISCLASS)
17309 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17310 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17311 ProcessSpecifier(spec, declareStruct);
17318 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
17321 DeclareType(symbol->type, 0x1, 0x1);
17322 else if((symbol = spec->__anon1.__anon1.symbol) && symbol->__anon1.registered && symbol->__anon1.registered->type == 1 && declareStruct)
17323 DeclareStruct(spec->__anon1.__anon1.name, 0x0);
17328 struct Enumerator * e;
17330 if(spec->__anon1.__anon2.list)
17332 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
17335 ProcessExpressionType(e->exp);
17343 if(spec->__anon1.__anon2.definitions)
17345 struct ClassDef * def;
17346 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
17348 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
17355 static void ProcessDeclarator(struct Declarator * decl)
17360 if(decl->__anon1.identifier->classSym)
17362 FreeSpecifier(decl->__anon1.identifier->_class);
17363 decl->__anon1.identifier->_class = (((void *)0));
17367 if(decl->__anon1.array.exp)
17368 ProcessExpressionType(decl->__anon1.array.exp);
17375 if(decl->declarator)
17376 ProcessDeclarator(decl->declarator);
17377 if(decl->type == 4)
17379 struct Identifier * id = GetDeclId(decl);
17381 if(id && id->_class)
17383 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(id->_class), param->declarator = (((void *)0)), param);
17385 if(!decl->__anon1.function.parameters)
17386 decl->__anon1.function.parameters = MkList();
17387 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
17388 id->_class = (((void *)0));
17390 if(decl->__anon1.function.parameters)
17392 struct TypeName * param;
17394 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
17396 if(param->qualifiers && (*param->qualifiers).first)
17398 struct Specifier * spec = (*param->qualifiers).first;
17400 if(spec && spec->__anon1.specifier == TYPED_OBJECT)
17402 struct Declarator * d = param->declarator;
17403 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);
17406 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
17407 FreeList(param->qualifiers, FreeSpecifier);
17408 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
17409 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
17410 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
17413 else if(spec && spec->__anon1.specifier == ANY_OBJECT)
17415 struct Declarator * d = param->declarator;
17417 FreeList(param->qualifiers, FreeSpecifier);
17418 param->qualifiers = MkListOne(MkSpecifier(VOID));
17420 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
17421 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
17423 else if(spec->__anon1.specifier == THISCLASS)
17428 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17429 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17430 ProcessSpecifier(spec, 0x0);
17434 if(param->declarator)
17435 ProcessDeclarator(param->declarator);
17443 extern struct Identifier * CopyIdentifier(struct Identifier * id);
17445 extern void FreeInitDeclarator(struct InitDeclarator * decl);
17447 static void ProcessDeclaration(struct Declaration * decl)
17449 yylloc = decl->loc;
17454 unsigned int declareStruct = 0x0;
17456 if(decl->__anon1.__anon1.declarators)
17458 struct InitDeclarator * d;
17460 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17462 struct Type * type, * subType;
17464 ProcessDeclarator(d->declarator);
17465 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17468 ProcessInitializer(d->initializer, type);
17469 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
17471 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
17473 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
17475 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
17476 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
17477 if(decl->__anon1.__anon1.specifiers)
17478 FreeList(decl->__anon1.__anon1.specifiers, FreeSpecifier);
17479 FreeList(decl->__anon1.__anon1.declarators, FreeInitDeclarator);
17482 decl->__anon1.inst = inst;
17486 for(subType = type; subType; )
17488 if(subType->kind == 8)
17490 declareStruct = 0x1;
17493 else if(subType->kind == 13)
17495 else if(subType->kind == 12)
17496 subType = subType->__anon1.__anon4.arrayType;
17505 if(decl->__anon1.__anon1.specifiers)
17507 struct Specifier * s;
17509 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
17511 ProcessSpecifier(s, declareStruct);
17518 ProcessInstantiationType(decl->__anon1.inst);
17523 struct Specifier * spec;
17524 struct Declarator * d;
17525 unsigned int declareStruct = 0x0;
17527 if(decl->__anon1.__anon1.declarators)
17529 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17531 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17532 struct Type * subType;
17534 ProcessDeclarator(d);
17535 for(subType = type; subType; )
17537 if(subType->kind == 8)
17539 declareStruct = 0x1;
17542 else if(subType->kind == 13)
17544 else if(subType->kind == 12)
17545 subType = subType->__anon1.__anon4.arrayType;
17552 if(decl->__anon1.__anon1.specifiers)
17554 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
17555 ProcessSpecifier(spec, declareStruct);
17562 static struct FunctionDefinition * curFunction;
17564 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
17566 char propName[1024], propNameM[1024];
17567 char getName[1024], setName[1024];
17568 struct __ecereNameSpace__ecere__sys__OldList * args;
17570 DeclareProperty(prop, setName, getName);
17571 strcpy(propName, "__ecereProp_");
17572 FullClassNameCat(propName, prop->_class->fullName, 0x0);
17573 strcat(propName, "_");
17574 FullClassNameCat(propName, prop->name, 0x1);
17575 MangleClassName(propName);
17576 strcpy(propNameM, "__ecerePropM_");
17577 FullClassNameCat(propNameM, prop->_class->fullName, 0x0);
17578 strcat(propNameM, "_");
17579 FullClassNameCat(propNameM, prop->name, 0x1);
17580 MangleClassName(propNameM);
17581 if(prop->isWatchable)
17584 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17585 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17586 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17588 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17589 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17590 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17594 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17595 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17596 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17598 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17599 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17600 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17602 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
17603 curFunction->propSet->fireWatchersDone = 0x1;
17606 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
17608 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
17610 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
17612 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
17614 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
17616 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
17618 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
17620 extern void FreePropertyWatch(struct PropertyWatch * watcher);
17622 static void ProcessStatement(struct Statement * stmt)
17624 yylloc = stmt->loc;
17628 ProcessStatement(stmt->__anon1.labeled.stmt);
17631 if(stmt->__anon1.caseStmt.exp)
17633 FreeType(stmt->__anon1.caseStmt.exp->destType);
17634 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
17636 curSwitchType->refCount++;
17637 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
17638 ComputeExpression(stmt->__anon1.caseStmt.exp);
17640 if(stmt->__anon1.caseStmt.stmt)
17641 ProcessStatement(stmt->__anon1.caseStmt.stmt);
17645 if(stmt->__anon1.compound.context)
17647 struct Declaration * decl;
17648 struct Statement * s;
17649 struct Statement * prevCompound = curCompound;
17650 struct Context * prevContext = curContext;
17652 if(!stmt->__anon1.compound.isSwitch)
17653 curCompound = stmt;
17654 curContext = stmt->__anon1.compound.context;
17655 if(stmt->__anon1.compound.declarations)
17657 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
17658 ProcessDeclaration(decl);
17660 if(stmt->__anon1.compound.statements)
17662 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
17663 ProcessStatement(s);
17665 curContext = prevContext;
17666 curCompound = prevCompound;
17672 struct Expression * exp;
17674 if(stmt->__anon1.expressions)
17676 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
17677 ProcessExpressionType(exp);
17683 struct Expression * exp;
17685 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
17686 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
17687 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 0x1;
17688 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
17690 ProcessExpressionType(exp);
17692 if(stmt->__anon1.ifStmt.stmt)
17693 ProcessStatement(stmt->__anon1.ifStmt.stmt);
17694 if(stmt->__anon1.ifStmt.elseStmt)
17695 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
17700 struct Type * oldSwitchType = curSwitchType;
17702 if(stmt->__anon1.switchStmt.exp)
17704 struct Expression * exp;
17706 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
17710 ProcessExpressionType(exp);
17713 curSwitchType = exp->expType;
17716 ProcessStatement(stmt->__anon1.switchStmt.stmt);
17717 curSwitchType = oldSwitchType;
17722 if(stmt->__anon1.whileStmt.exp)
17724 struct Expression * exp;
17726 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
17727 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
17728 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 0x1;
17729 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
17731 ProcessExpressionType(exp);
17734 if(stmt->__anon1.whileStmt.stmt)
17735 ProcessStatement(stmt->__anon1.whileStmt.stmt);
17740 if(stmt->__anon1.doWhile.exp)
17742 struct Expression * exp;
17744 if((*stmt->__anon1.doWhile.exp).last)
17746 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
17747 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
17748 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 0x1;
17750 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
17752 ProcessExpressionType(exp);
17755 if(stmt->__anon1.doWhile.stmt)
17756 ProcessStatement(stmt->__anon1.doWhile.stmt);
17761 struct Expression * exp;
17763 if(stmt->__anon1.forStmt.init)
17764 ProcessStatement(stmt->__anon1.forStmt.init);
17765 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
17767 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
17768 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
17769 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 0x1;
17771 if(stmt->__anon1.forStmt.check)
17772 ProcessStatement(stmt->__anon1.forStmt.check);
17773 if(stmt->__anon1.forStmt.increment)
17775 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
17776 ProcessExpressionType(exp);
17778 if(stmt->__anon1.forStmt.stmt)
17779 ProcessStatement(stmt->__anon1.forStmt.stmt);
17784 struct Identifier * id = stmt->__anon1.forEachStmt.id;
17785 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
17786 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
17787 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
17788 char iteratorType[1024];
17789 struct Type * source;
17790 struct Expression * e;
17791 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));
17792 struct Expression * arrayExp;
17793 const char * typeString = (((void *)0));
17794 int builtinCount = 0;
17796 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
17800 FreeType(e->destType);
17801 e->destType = ProcessTypeString("Container", 0x0);
17803 if(!isBuiltin || e->next)
17804 ProcessExpressionType(e);
17806 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
17807 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)))
17809 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
17810 struct Symbol * symbol;
17811 struct Expression * expIt = (((void *)0));
17812 unsigned int isMap = 0x0, isArray = 0x0, isLinkList = 0x0, isList = 0x0, isCustomAVLTree = 0x0;
17813 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
17814 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
17815 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
17818 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
17819 stmt->__anon1.compound.context->parent = curContext;
17820 curContext = stmt->__anon1.compound.context;
17821 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
17823 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
17825 isCustomAVLTree = 0x1;
17826 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
17829 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
17831 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
17833 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
17836 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
17840 struct Declarator * decl;
17841 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17843 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
17844 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17845 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
17849 struct Type * type = (((void *)0));
17850 char typeStringBuf[1024];
17852 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
17853 if(((struct Expression *)(*exp).last)->type == 11)
17855 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
17858 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
17860 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)
17862 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
17864 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
17866 else if(arrayExp->__anon1.list)
17868 struct Expression * e;
17870 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
17872 ProcessExpressionType(e);
17882 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
17886 e->expType = (((void *)0));
17887 e = (*arrayExp->__anon1.list).first;
17888 ProcessExpressionType(e);
17891 if(!MatchTypeExpression(e, type, (((void *)0)), 0x0, 0x1))
17893 FreeType(e->expType);
17894 e->expType = (((void *)0));
17896 type = (((void *)0));
17904 FreeType(e->expType);
17905 e->expType = (((void *)0));
17911 typeStringBuf[0] = '\0';
17912 PrintType(type, typeStringBuf, 0x0, 0x1);
17913 typeString = typeStringBuf;
17919 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
17920 struct Declarator * decl;
17921 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17923 if(arrayExp->__anon1.list)
17925 struct Expression * e;
17927 builtinCount = (*arrayExp->__anon1.list).count;
17928 type = ProcessTypeString(typeString, 0x0);
17929 while(e = (*arrayExp->__anon1.list).first)
17931 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
17932 e->destType = type;
17934 ProcessExpressionType(e);
17935 ListAdd(initializers, MkInitializerAssignment(e));
17938 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
17940 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
17941 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, CopySpecifier), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
17942 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
17943 FreeList(exp, FreeExpression);
17947 arrayExp->expType = ProcessTypeString("Container", 0x0);
17948 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
17951 else if(isLinkList && !isList)
17953 struct Declarator * decl;
17954 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17956 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
17957 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17958 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
17960 else if(_class->templateArgs)
17963 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
17965 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
17966 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)))))))));
17968 symbol = FindSymbol(id->string, curContext, curContext, 0x0, 0x0);
17971 switch(block->type)
17974 if(block->__anon1.compound.context)
17975 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17978 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
17979 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17980 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
17981 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17984 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
17985 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17988 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
17989 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17992 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
17993 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
17996 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
17997 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18000 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
18001 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18007 block = MkIfStmt(filter, block, (((void *)0)));
18011 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));
18012 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18013 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18014 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18020 sprintf(count, "%d", builtinCount);
18021 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));
18022 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18023 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18024 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18026 else if(isLinkList && !isList)
18028 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
18029 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
18031 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
18033 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));
18037 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18038 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18040 stmt->__anon1.compound.statements = MkListOne(MkForStmt(MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("first"))))), MkExpressionStmt(MkListOne(MkExpIdentifier(CopyIdentifier(id)))), MkListOne(MkExpOp(MkExpIdentifier(CopyIdentifier(id)), '=', MkExpCast(MkTypeName(specs, decl), MkExpCall(MkExpMember(MkExpIdentifier(MkIdentifier("__internalLinkList")), MkIdentifier("GetNext")), MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("IteratorPointer")), (((void *)0))), MkExpIdentifier(CopyIdentifier(id)))))))), block));
18042 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18043 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18044 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18048 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
18050 ProcessExpressionType(expIt);
18051 if((*stmt->__anon1.compound.declarations).first)
18052 ProcessDeclaration((*stmt->__anon1.compound.declarations).first);
18054 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
18055 ProcessStatement(stmt);
18056 curContext = stmt->__anon1.compound.context->parent;
18061 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
18073 struct Expression * exp;
18075 if(stmt->__anon1.expressions)
18077 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
18081 if(curFunction && !curFunction->type)
18082 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
18083 FreeType(exp->destType);
18084 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
18086 exp->destType->refCount++;
18088 ProcessExpressionType(exp);
18095 ProcessDeclaration(stmt->__anon1.decl);
18100 struct AsmField * field;
18102 if(stmt->__anon1.asmStmt.inputFields)
18104 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
18105 if(field->expression)
18106 ProcessExpressionType(field->expression);
18108 if(stmt->__anon1.asmStmt.outputFields)
18110 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
18111 if(field->expression)
18112 ProcessExpressionType(field->expression);
18114 if(stmt->__anon1.asmStmt.clobberedFields)
18116 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
18118 if(field->expression)
18119 ProcessExpressionType(field->expression);
18126 struct PropertyWatch * propWatch;
18127 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18128 struct Expression * object = stmt->__anon1._watch.object;
18129 struct Expression * watcher = stmt->__anon1._watch.watcher;
18132 ProcessExpressionType(watcher);
18134 ProcessExpressionType(object);
18137 if(watcher || thisClass)
18139 struct External * external = curExternal;
18140 struct Context * context = curContext;
18143 stmt->__anon1.expressions = MkList();
18144 curExternal = external->prev;
18145 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18147 struct ClassFunction * func;
18148 char watcherName[1024];
18149 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;
18150 struct External * createdExternal;
18151 struct External * externalDecl = MkExternalDeclaration((((void *)0)));
18153 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, externalDecl);
18154 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
18155 if(propWatch->deleteWatch)
18156 strcat(watcherName, "_delete");
18159 struct Identifier * propID;
18161 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18163 strcat(watcherName, "_");
18164 strcat(watcherName, propID->string);
18167 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
18169 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)));
18170 ProcessClassFunctionBody(func, propWatch->compound);
18171 propWatch->compound = (((void *)0));
18172 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 0x1);
18173 createdExternal->symbol->idCode = external->symbol->idCode;
18174 curExternal = createdExternal;
18175 ProcessFunction(createdExternal->__anon1.function);
18177 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(createdExternal->__anon1.function->declarator), (((void *)0)))));
18179 externalDecl->__anon1.declaration = decl;
18180 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
18181 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
18183 if(propWatch->deleteWatch)
18185 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18187 ListAdd(args, CopyExpression(object));
18188 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18189 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18190 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
18194 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
18195 struct Identifier * propID;
18197 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18199 char propName[1024];
18200 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18204 char getName[1024], setName[1024];
18205 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18207 DeclareProperty(prop, setName, getName);
18208 strcpy(propName, "__ecereProp_");
18209 FullClassNameCat(propName, prop->_class->fullName, 0x0);
18210 strcat(propName, "_");
18211 FullClassNameCat(propName, prop->name, 0x1);
18212 ListAdd(args, CopyExpression(object));
18213 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18214 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18215 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18216 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
18219 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18224 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
18226 curExternal = external;
18227 curContext = context;
18229 FreeExpression(watcher);
18231 FreeExpression(object);
18232 FreeList(watches, FreePropertyWatch);
18235 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a _class\n", (((void *)0))));
18239 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18241 ProcessStatement(propWatch->compound);
18248 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18249 struct Expression * object = stmt->__anon1._watch.object;
18250 struct __ecereNameSpace__ecere__com__Class * _class;
18253 ProcessExpressionType(object);
18256 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
18259 struct Identifier * propID;
18262 stmt->__anon1.expressions = MkList();
18263 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
18265 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
18272 for(propID = (*watches).first; propID; propID = propID->next)
18274 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18278 CreateFireWatcher(prop, object, stmt);
18281 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18286 struct __ecereNameSpace__ecere__com__Property * prop;
18287 struct __ecereNameSpace__ecere__com__Class * base;
18289 for(base = _class; base; base = base->base)
18291 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
18293 if(prop->isProperty && prop->isWatchable)
18295 CreateFireWatcher(prop, object, stmt);
18301 FreeExpression(object);
18302 FreeList(watches, FreeIdentifier);
18305 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18311 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18312 struct Expression * object = stmt->__anon1._watch.object;
18313 struct Expression * watcher = stmt->__anon1._watch.watcher;
18314 struct __ecereNameSpace__ecere__com__Class * _class;
18317 ProcessExpressionType(object);
18319 ProcessExpressionType(watcher);
18322 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
18323 if(watcher || thisClass)
18327 struct Identifier * propID;
18330 stmt->__anon1.expressions = MkList();
18333 struct __ecereNameSpace__ecere__sys__OldList * args;
18336 ListAdd(args, CopyExpression(object));
18337 ListAdd(args, MkExpConstant("0"));
18338 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18339 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18343 for(propID = (*watches).first; propID; propID = propID->next)
18345 char propName[1024];
18346 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18350 char getName[1024], setName[1024];
18351 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18353 DeclareProperty(prop, setName, getName);
18354 strcpy(propName, "__ecereProp_");
18355 FullClassNameCat(propName, prop->_class->fullName, 0x0);
18356 strcat(propName, "_");
18357 FullClassNameCat(propName, prop->name, 0x1);
18358 MangleClassName(propName);
18359 ListAdd(args, CopyExpression(object));
18360 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18361 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18362 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18365 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18369 FreeExpression(object);
18371 FreeExpression(watcher);
18372 FreeList(watches, FreeIdentifier);
18375 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18378 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
18385 extern struct Expression * QBrackets(struct Expression * exp);
18387 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
18389 extern struct Declarator * QMkPtrDecl(const char * id);
18391 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
18393 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
18395 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
18397 static void ProcessFunction(struct FunctionDefinition * function)
18399 struct Identifier * id = GetDeclId(function->declarator);
18400 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18401 struct Type * type = symbol ? symbol->type : (((void *)0));
18402 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18403 struct Context * oldTopContext = topContext;
18405 yylloc = function->loc;
18406 if(type && type->__anon1.__anon2.thisClass)
18408 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18409 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18410 char className[1024];
18411 char structName[1024];
18412 struct Declarator * funcDecl;
18413 struct Symbol * thisSymbol;
18414 unsigned int typedObject = 0x0;
18416 if(_class && !_class->base)
18418 _class = currentClass;
18419 if(_class && !_class->symbol)
18420 _class->symbol = FindClass(_class->fullName);
18421 classSym = _class ? _class->symbol : (((void *)0));
18424 thisClass = _class;
18425 if(inCompiler && _class)
18427 if(type->kind == 11)
18429 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18431 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18433 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18436 if(type->classObjectType != 1)
18438 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18439 symbol->type->__anon1.__anon2.staticMethod = 0x1;
18440 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18441 symbol->type->extraParam = 0x0;
18444 strcpy(className, "__ecereClass_");
18445 FullClassNameCat(className, _class->fullName, 0x1);
18446 MangleClassName(className);
18447 structName[0] = (char)0;
18448 FullClassNameCat(structName, _class->fullName, 0x0);
18449 funcDecl = GetFuncDecl(function->declarator);
18452 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18454 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18456 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18458 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18459 FreeTypeName(param);
18462 if(!function->propertyNoThis)
18464 struct TypeName * thisParam;
18466 if(type->classObjectType != 1)
18468 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18469 if(!funcDecl->__anon1.function.parameters)
18470 funcDecl->__anon1.function.parameters = MkList();
18471 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18475 if(type->classObjectType != 1)
18477 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18478 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18480 thisParam = __extension__ ({
18481 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18483 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18485 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18489 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18491 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18493 funcDecl = GetFuncDecl(initDecl->declarator);
18496 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18498 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18500 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18502 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18503 FreeTypeName(param);
18506 if(type->classObjectType != 1)
18508 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18510 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18512 if(!funcDecl->__anon1.function.parameters)
18513 funcDecl->__anon1.function.parameters = MkList();
18514 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18522 if(type->classObjectType != 1)
18524 thisSymbol = __extension__ ({
18525 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18527 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18529 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18530 if(typedObject && thisSymbol->type)
18532 thisSymbol->type->classObjectType = 2;
18533 thisSymbol->type->byReference = type->byReference;
18534 thisSymbol->type->typedByReference = type->byReference;
18538 if(inCompiler && _class && (_class->type == 0) && type->classObjectType != 1)
18540 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18543 struct __ecereNameSpace__ecere__com__Class * base;
18545 for(base = _class; base && base->type != 1000; base = base->next)
18547 for(member = base->membersAndProperties.first; member; member = member->next)
18548 if(!member->isProperty)
18554 for(member = _class->membersAndProperties.first; member; member = member->next)
18555 if(!member->isProperty)
18559 char pointerName[1024];
18560 struct Declaration * decl;
18561 struct Initializer * initializer;
18562 struct Expression * exp, * bytePtr;
18564 strcpy(pointerName, "__ecerePointer_");
18565 FullClassNameCat(pointerName, _class->fullName, 0x0);
18567 char className[1024];
18569 strcpy(className, "__ecereClass_");
18570 FullClassNameCat(className, classSym->string, 0x1);
18571 MangleClassName(className);
18572 DeclareClass(classSym, className);
18574 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18579 sprintf(string, "%d", _class->offset);
18580 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpConstant(string)));
18584 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
18586 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
18587 exp->expType = __extension__ ({
18588 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18590 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
18591 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18593 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
18594 }), __ecereInstance2;
18598 yylloc = function->body->loc;
18599 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
18601 struct Context * prevContext = curContext;
18603 curContext = function->body->__anon1.compound.context;
18604 decl = MkDeclaration(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
18605 curContext = prevContext;
18607 decl->symbol = (((void *)0));
18608 if(!function->body->__anon1.compound.declarations)
18609 function->body->__anon1.compound.declarations = MkList();
18610 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
18616 thisClass = (((void *)0));
18619 FreeSpecifier(id->_class);
18620 id->_class = (((void *)0));
18621 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18623 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18625 id = GetDeclId(initDecl->declarator);
18626 FreeSpecifier(id->_class);
18627 id->_class = (((void *)0));
18631 topContext = function->body->__anon1.compound.context;
18633 struct FunctionDefinition * oldFunction = curFunction;
18635 curFunction = function;
18637 ProcessStatement(function->body);
18638 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
18640 struct Statement * prevCompound = curCompound;
18641 struct Context * prevContext = curContext;
18642 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
18644 if(!function->body->__anon1.compound.statements)
18645 function->body->__anon1.compound.statements = MkList();
18646 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
18647 curCompound = function->body;
18648 curContext = function->body->__anon1.compound.context;
18649 ProcessStatement(fireWatchers);
18650 curContext = prevContext;
18651 curCompound = prevCompound;
18653 curFunction = oldFunction;
18655 if(function->declarator)
18657 ProcessDeclarator(function->declarator);
18659 topContext = oldTopContext;
18660 thisClass = oldThisClass;
18663 extern void FreeSymbol(struct Symbol * symbol);
18665 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
18667 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
18669 struct ClassDef * def;
18670 struct External * external = curExternal;
18671 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
18673 for(def = definitions->first; def; def = def->next)
18677 if(def->__anon1.function->declarator)
18678 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
18680 curExternal = external;
18681 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
18683 else if(def->type == 2)
18685 if(def->__anon1.decl->type == 2)
18687 thisClass = regClass;
18688 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
18689 thisClass = (((void *)0));
18693 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
18696 thisClass = regClass;
18697 ProcessDeclaration(def->__anon1.decl);
18698 thisClass = backThisClass;
18701 else if(def->type == 1 && def->__anon1.defProperties)
18703 struct MemberInit * defProperty;
18704 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);
18706 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18707 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
18709 thisClass = regClass;
18710 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
18711 thisClass = (((void *)0));
18713 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18714 FreeSymbol(thisSymbol);
18716 else if(def->type == 3 && def->__anon1.propertyDef)
18718 struct PropertyDef * prop = def->__anon1.propertyDef;
18720 thisClass = regClass;
18725 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18727 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18729 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
18730 ProcessStatement(prop->setStmt);
18736 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18738 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18740 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
18741 ProcessStatement(prop->getStmt);
18743 if(prop->issetStmt)
18747 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18749 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18751 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
18752 ProcessStatement(prop->issetStmt);
18754 thisClass = (((void *)0));
18756 else if(def->type == 4 && def->__anon1.propertyWatch)
18758 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
18760 thisClass = regClass;
18761 if(propertyWatch->compound)
18763 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);
18765 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18766 curExternal = (((void *)0));
18767 ProcessStatement(propertyWatch->compound);
18769 thisClass = (((void *)0));
18774 void DeclareFunctionUtil(const char * s)
18776 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
18783 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
18784 strcpy(name, "__ecereFunction_");
18785 FullClassNameCat(name, s, 0x0);
18786 DeclareFunction(function, name);
18790 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
18792 void ComputeDataTypes()
18794 struct External * external;
18795 struct External * temp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_External);
18796 struct External * after = (((void *)0));
18798 currentClass = (((void *)0));
18799 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
18800 for(external = (*ast).first; external; external = external->next)
18802 if(external->type == 1)
18804 struct Declaration * decl = external->__anon1.declaration;
18808 struct __ecereNameSpace__ecere__sys__OldList * decls = decl->__anon1.__anon1.declarators;
18812 struct InitDeclarator * initDecl = (*decls).first;
18816 struct Declarator * declarator = initDecl->declarator;
18818 if(declarator && declarator->type == 1)
18820 struct Identifier * id = declarator->__anon1.identifier;
18822 if(id && id->string)
18824 if(!strcmp(id->string, "uintptr_t") || !strcmp(id->string, "intptr_t") || !strcmp(id->string, "size_t") || !strcmp(id->string, "ssize_t"))
18826 external->symbol->id = -1001, external->symbol->idCode = -1001;
18836 temp->symbol = __extension__ ({
18837 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18839 __ecereInstance1->id = -1000, __ecereInstance1->idCode = -1000, __ecereInstance1;
18841 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, temp);
18842 curExternal = temp;
18843 DeclareFunctionUtil("eSystem_New");
18844 DeclareFunctionUtil("eSystem_New0");
18845 DeclareFunctionUtil("eSystem_Renew");
18846 DeclareFunctionUtil("eSystem_Renew0");
18847 DeclareFunctionUtil("eSystem_Delete");
18848 DeclareFunctionUtil("eClass_GetProperty");
18849 DeclareFunctionUtil("eClass_SetProperty");
18850 DeclareFunctionUtil("eInstance_FireSelfWatchers");
18851 DeclareFunctionUtil("eInstance_SetMethod");
18852 DeclareFunctionUtil("eInstance_IncRef");
18853 DeclareFunctionUtil("eInstance_StopWatching");
18854 DeclareFunctionUtil("eInstance_Watch");
18855 DeclareFunctionUtil("eInstance_FireWatchers");
18856 DeclareStruct("ecere::com::Class", 0x0);
18857 DeclareStruct("ecere::com::Instance", 0x0);
18858 DeclareStruct("ecere::com::Property", 0x0);
18859 DeclareStruct("ecere::com::DataMember", 0x0);
18860 DeclareStruct("ecere::com::Method", 0x0);
18861 DeclareStruct("ecere::com::SerialBuffer", 0x0);
18862 DeclareStruct("ecere::com::ClassTemplateArgument", 0x0);
18863 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), temp);
18864 for(external = (*ast).first; external; external = external->next)
18866 afterExternal = curExternal = external;
18867 if(external->type == 0)
18869 currentClass = external->__anon1.function->_class;
18870 ProcessFunction(external->__anon1.function);
18872 else if(external->type == 1)
18874 currentClass = (((void *)0));
18875 if(external->__anon1.declaration)
18876 ProcessDeclaration(external->__anon1.declaration);
18878 else if(external->type == 2)
18880 struct ClassDefinition * _class = external->__anon1._class;
18882 currentClass = external->symbol->__anon1.registered;
18883 if(_class->definitions)
18885 ProcessClass(_class->definitions, _class->symbol);
18889 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
18890 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
18893 else if(external->type == 4)
18895 thisNameSpace = external->__anon1.id->string;
18898 currentClass = (((void *)0));
18899 thisNameSpace = (((void *)0));
18900 curExternal = (((void *)0));
18901 ((temp->symbol ? (__ecereClass_Symbol->Destructor ? __ecereClass_Symbol->Destructor((void *)temp->symbol) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp->symbol)) : 0), temp->symbol = 0);
18902 ((temp ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)temp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp)) : 0), temp = 0);
18905 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);
18907 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);
18909 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
18911 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
18913 struct __ecereNameSpace__ecere__com__Class * class;
18915 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
18916 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
18917 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
18918 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
18919 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
18920 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
18921 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
18922 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
18923 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
18924 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
18925 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
18926 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
18927 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
18928 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
18929 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
18930 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
18931 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
18932 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
18933 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
18934 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
18935 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
18936 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
18937 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
18938 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
18939 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
18940 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
18941 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
18942 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
18943 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
18944 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
18945 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
18946 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
18947 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
18948 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
18949 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
18950 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
18951 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
18952 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
18953 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
18954 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
18955 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
18956 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
18957 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
18958 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
18959 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
18960 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
18961 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
18962 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
18963 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
18964 __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);
18965 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "void DeclareStruct(const char * name, bool skipNoHead)", DeclareStruct, module, 2);
18966 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
18967 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
18968 __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);
18969 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
18970 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
18971 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
18972 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
18973 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
18974 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
18975 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
18976 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
18977 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
18978 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
18979 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
18980 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(GlobalData data)", DeclareGlobalData, module, 2);
18981 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, 0, 0, module, 2, 1);
18982 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
18983 __ecereClass_Conversion = class;
18984 __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);
18985 __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);
18986 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
18987 __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);
18988 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
18989 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
18990 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
18991 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
18992 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
18993 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
18994 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
18995 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
18996 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
18997 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
18998 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
18999 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19000 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19001 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19002 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19003 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19004 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19005 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19006 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19007 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19008 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(const String s)", DeclareFunctionUtil, module, 1);
19009 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);
19012 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)