1 /* Code generated from eC source file: pass15.ec */
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
7 #define __runtimePlatform 2
10 typedef long long int64;
11 typedef unsigned long long uint64;
15 #elif defined(__TINYC__)
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
27 typedef long long int64;
28 typedef unsigned long long uint64;
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
34 #define __ENDIAN_PAD(x) (8 - (x))
36 #define __ENDIAN_PAD(x) 0
39 #include <sys/types.h>
41 #if /*defined(_W64) || */(defined(__WORDSIZE) && __WORDSIZE == 8) || defined(__x86_64__)
47 #define arch_PointerSize sizeof(void *)
48 #define structSize_Instance (_64BIT ? 24 : 12)
49 #define structSize_Module (_64BIT ? 560 : 300)
50 #define structSize_NamedLink64 (_64BIT ? 32 : 24)
52 struct __ecereNameSpace__ecere__com__Instance;
54 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
56 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
58 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
60 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
62 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
64 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
66 struct __ecereNameSpace__ecere__sys__BTNode;
68 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
70 struct __ecereNameSpace__ecere__sys__BinaryTree
72 struct __ecereNameSpace__ecere__sys__BTNode * root;
74 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
75 void (* FreeKey)(void * key);
76 } __attribute__ ((gcc_struct));
78 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
80 struct __ecereNameSpace__ecere__sys__OldList
87 } __attribute__ ((gcc_struct));
89 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
91 struct __ecereNameSpace__ecere__com__Method
94 struct __ecereNameSpace__ecere__com__Method * parent;
95 struct __ecereNameSpace__ecere__com__Method * left;
96 struct __ecereNameSpace__ecere__com__Method * right;
101 struct __ecereNameSpace__ecere__com__Class * _class;
103 const char * dataTypeString;
104 struct Type * dataType;
106 } __attribute__ ((gcc_struct));
108 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
110 struct __ecereNameSpace__ecere__com__Property
112 struct __ecereNameSpace__ecere__com__Property * prev;
113 struct __ecereNameSpace__ecere__com__Property * next;
115 unsigned int isProperty;
118 struct __ecereNameSpace__ecere__com__Class * _class;
119 const char * dataTypeString;
120 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
121 struct Type * dataType;
122 void (* Set)(void * , int);
123 int (* Get)(void * );
124 unsigned int (* IsSet)(void * );
128 unsigned int conversion;
129 unsigned int watcherOffset;
130 const char * category;
131 unsigned int compiled;
132 unsigned int selfWatchable;
133 unsigned int isWatchable;
134 } __attribute__ ((gcc_struct));
136 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
144 } __attribute__ ((gcc_struct));
146 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
150 struct CodePosition start;
151 struct CodePosition end;
152 } __attribute__ ((gcc_struct));
154 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
158 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
167 struct Attrib * attr;
168 } __attribute__ ((gcc_struct)) __anon1;
169 } __attribute__ ((gcc_struct));
171 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
173 struct ClassDefinition
175 struct ClassDefinition * prev;
176 struct ClassDefinition * next;
178 struct Specifier * _class;
179 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
180 struct __ecereNameSpace__ecere__sys__OldList * definitions;
181 struct Symbol * symbol;
182 struct Location blockStart;
183 struct Location nameLoc;
186 unsigned int deleteWatchable;
187 } __attribute__ ((gcc_struct));
189 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
193 struct Context * parent;
194 struct __ecereNameSpace__ecere__sys__BinaryTree types;
195 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
196 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
197 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
200 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
201 struct ClassDefinition * classDef;
202 unsigned int templateTypesOnly;
203 unsigned int hasNameSpace;
204 } __attribute__ ((gcc_struct));
206 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
210 struct Instantiation * prev;
211 struct Instantiation * next;
213 struct Specifier * _class;
214 struct Expression * exp;
215 struct __ecereNameSpace__ecere__sys__OldList * members;
216 struct Symbol * symbol;
217 unsigned int fullSet;
218 unsigned int isConstant;
219 unsigned char * data;
220 struct Location nameLoc;
221 struct Location insideLoc;
223 } __attribute__ ((gcc_struct));
225 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
229 struct Declaration * prev;
230 struct Declaration * next;
237 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
238 struct __ecereNameSpace__ecere__sys__OldList * declarators;
239 } __attribute__ ((gcc_struct)) __anon1;
240 struct Instantiation * inst;
243 struct Identifier * id;
244 struct Expression * exp;
245 } __attribute__ ((gcc_struct)) __anon2;
246 } __attribute__ ((gcc_struct)) __anon1;
247 struct Specifier * extStorage;
248 struct Symbol * symbol;
250 } __attribute__ ((gcc_struct));
252 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
256 struct Statement * prev;
257 struct Statement * next;
262 struct __ecereNameSpace__ecere__sys__OldList * expressions;
265 struct Identifier * id;
266 struct Statement * stmt;
267 } __attribute__ ((gcc_struct)) labeled;
270 struct Expression * exp;
271 struct Statement * stmt;
272 } __attribute__ ((gcc_struct)) caseStmt;
275 struct __ecereNameSpace__ecere__sys__OldList * declarations;
276 struct __ecereNameSpace__ecere__sys__OldList * statements;
277 struct Context * context;
278 unsigned int isSwitch;
279 } __attribute__ ((gcc_struct)) compound;
282 struct __ecereNameSpace__ecere__sys__OldList * exp;
283 struct Statement * stmt;
284 struct Statement * elseStmt;
285 } __attribute__ ((gcc_struct)) ifStmt;
288 struct __ecereNameSpace__ecere__sys__OldList * exp;
289 struct Statement * stmt;
290 } __attribute__ ((gcc_struct)) switchStmt;
293 struct __ecereNameSpace__ecere__sys__OldList * exp;
294 struct Statement * stmt;
295 } __attribute__ ((gcc_struct)) whileStmt;
298 struct __ecereNameSpace__ecere__sys__OldList * exp;
299 struct Statement * stmt;
300 } __attribute__ ((gcc_struct)) doWhile;
303 struct Statement * init;
304 struct Statement * check;
305 struct __ecereNameSpace__ecere__sys__OldList * increment;
306 struct Statement * stmt;
307 } __attribute__ ((gcc_struct)) forStmt;
310 struct Identifier * id;
311 } __attribute__ ((gcc_struct)) gotoStmt;
314 struct Specifier * spec;
316 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
317 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
318 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
319 } __attribute__ ((gcc_struct)) asmStmt;
322 struct Expression * watcher;
323 struct Expression * object;
324 struct __ecereNameSpace__ecere__sys__OldList * watches;
325 } __attribute__ ((gcc_struct)) _watch;
328 struct Identifier * id;
329 struct __ecereNameSpace__ecere__sys__OldList * exp;
330 struct __ecereNameSpace__ecere__sys__OldList * filter;
331 struct Statement * stmt;
332 } __attribute__ ((gcc_struct)) forEachStmt;
333 struct Declaration * decl;
334 } __attribute__ ((gcc_struct)) __anon1;
335 } __attribute__ ((gcc_struct));
337 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
341 struct TypeName * prev;
342 struct TypeName * next;
344 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
345 struct Declarator * declarator;
347 struct Expression * bitCount;
348 } __attribute__ ((gcc_struct));
350 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
354 struct Initializer * prev;
355 struct Initializer * next;
360 struct Expression * exp;
361 struct __ecereNameSpace__ecere__sys__OldList * list;
362 } __attribute__ ((gcc_struct)) __anon1;
363 unsigned int isConstant;
364 struct Identifier * id;
365 } __attribute__ ((gcc_struct));
367 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
369 struct __ecereNameSpace__ecere__com__DataValue
384 } __attribute__ ((gcc_struct)) __anon1;
385 } __attribute__ ((gcc_struct));
387 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
391 struct Expression * prev;
392 struct Expression * next;
400 struct Identifier * identifier;
401 } __attribute__ ((gcc_struct)) __anon1;
402 struct Statement * compound;
403 struct Instantiation * instance;
407 unsigned int intlString;
408 } __attribute__ ((gcc_struct)) __anon2;
409 struct __ecereNameSpace__ecere__sys__OldList * list;
412 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
413 struct Declarator * decl;
414 } __attribute__ ((gcc_struct)) _classExp;
417 struct Identifier * id;
418 } __attribute__ ((gcc_struct)) classData;
421 struct Expression * exp;
422 struct __ecereNameSpace__ecere__sys__OldList * arguments;
423 struct Location argLoc;
424 } __attribute__ ((gcc_struct)) call;
427 struct Expression * exp;
428 struct __ecereNameSpace__ecere__sys__OldList * index;
429 } __attribute__ ((gcc_struct)) index;
432 struct Expression * exp;
433 struct Identifier * member;
435 unsigned int thisPtr;
436 } __attribute__ ((gcc_struct)) member;
440 struct Expression * exp1;
441 struct Expression * exp2;
442 } __attribute__ ((gcc_struct)) op;
443 struct TypeName * typeName;
444 struct Specifier * _class;
447 struct TypeName * typeName;
448 struct Expression * exp;
449 } __attribute__ ((gcc_struct)) cast;
452 struct Expression * cond;
453 struct __ecereNameSpace__ecere__sys__OldList * exp;
454 struct Expression * elseExp;
455 } __attribute__ ((gcc_struct)) cond;
458 struct TypeName * typeName;
459 struct Expression * size;
460 } __attribute__ ((gcc_struct)) _new;
463 struct TypeName * typeName;
464 struct Expression * size;
465 struct Expression * exp;
466 } __attribute__ ((gcc_struct)) _renew;
470 struct Identifier * id;
471 } __attribute__ ((gcc_struct)) db;
474 struct Expression * ds;
475 struct Expression * name;
476 } __attribute__ ((gcc_struct)) dbopen;
479 struct TypeName * typeName;
480 struct Initializer * initializer;
481 } __attribute__ ((gcc_struct)) initializer;
484 struct Expression * exp;
485 struct TypeName * typeName;
486 } __attribute__ ((gcc_struct)) vaArg;
487 } __attribute__ ((gcc_struct)) __anon1;
488 unsigned int debugValue;
489 struct __ecereNameSpace__ecere__com__DataValue val;
491 unsigned int hasAddress;
492 struct Type * expType;
493 struct Type * destType;
496 unsigned int byReference;
497 unsigned int isConstant;
498 unsigned int addedThis;
499 unsigned int needCast;
500 unsigned int thisPtr;
501 unsigned int opDestType;
502 unsigned int needTemplateCast;
503 } __attribute__ ((gcc_struct));
505 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
507 struct TemplateDatatype
509 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
510 struct Declarator * decl;
511 } __attribute__ ((gcc_struct));
513 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
515 struct TemplateArgument;
517 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
519 struct TemplateParameter
521 struct TemplateParameter * prev;
522 struct TemplateParameter * next;
525 struct Identifier * identifier;
528 struct TemplateDatatype * dataType;
530 } __attribute__ ((gcc_struct)) __anon1;
531 struct TemplateArgument * defaultArgument;
532 const char * dataTypeString;
533 struct Type * baseType;
534 } __attribute__ ((gcc_struct));
536 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
540 struct Specifier * prev;
541 struct Specifier * next;
549 struct ExtDecl * extDecl;
551 struct Symbol * symbol;
552 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
553 } __attribute__ ((gcc_struct)) __anon1;
556 struct Identifier * id;
557 struct __ecereNameSpace__ecere__sys__OldList * list;
558 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
559 struct __ecereNameSpace__ecere__sys__OldList * definitions;
560 unsigned int addNameSpace;
561 struct Context * ctx;
562 struct ExtDecl * extDeclStruct;
563 } __attribute__ ((gcc_struct)) __anon2;
564 struct Expression * expression;
565 struct Specifier * _class;
566 struct TemplateParameter * templateParameter;
567 } __attribute__ ((gcc_struct)) __anon1;
568 } __attribute__ ((gcc_struct));
570 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
574 struct Identifier * prev;
575 struct Identifier * next;
577 struct Symbol * classSym;
578 struct Specifier * _class;
580 struct Identifier * badID;
581 } __attribute__ ((gcc_struct));
583 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
587 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
591 struct Declarator * prev;
592 struct Declarator * next;
595 struct Symbol * symbol;
596 struct Declarator * declarator;
599 struct Identifier * identifier;
602 struct Expression * exp;
603 struct Expression * posExp;
604 struct Attrib * attrib;
605 } __attribute__ ((gcc_struct)) structDecl;
608 struct Expression * exp;
609 struct Specifier * enumClass;
610 } __attribute__ ((gcc_struct)) array;
613 struct __ecereNameSpace__ecere__sys__OldList * parameters;
614 } __attribute__ ((gcc_struct)) function;
617 struct Pointer * pointer;
618 } __attribute__ ((gcc_struct)) pointer;
621 struct ExtDecl * extended;
622 } __attribute__ ((gcc_struct)) extended;
623 } __attribute__ ((gcc_struct)) __anon1;
624 } __attribute__ ((gcc_struct));
626 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
628 struct FunctionDefinition
630 struct FunctionDefinition * prev;
631 struct FunctionDefinition * next;
633 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
634 struct Declarator * declarator;
635 struct __ecereNameSpace__ecere__sys__OldList * declarations;
636 struct Statement * body;
637 struct __ecereNameSpace__ecere__com__Class * _class;
638 struct __ecereNameSpace__ecere__sys__OldList attached;
641 struct Symbol * propSet;
643 unsigned int propertyNoThis;
644 } __attribute__ ((gcc_struct));
646 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
650 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
654 struct External * prev;
655 struct External * next;
658 struct Symbol * symbol;
661 struct FunctionDefinition * function;
662 struct ClassDefinition * _class;
663 struct Declaration * declaration;
665 struct Identifier * id;
666 struct DBTableDef * table;
667 } __attribute__ ((gcc_struct)) __anon1;
669 } __attribute__ ((gcc_struct));
671 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
675 struct ModuleImport * prev;
676 struct ModuleImport * next;
678 struct __ecereNameSpace__ecere__sys__OldList classes;
679 struct __ecereNameSpace__ecere__sys__OldList functions;
682 } __attribute__ ((gcc_struct));
684 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
688 struct ClassImport * prev;
689 struct ClassImport * next;
691 struct __ecereNameSpace__ecere__sys__OldList methods;
692 struct __ecereNameSpace__ecere__sys__OldList properties;
695 } __attribute__ ((gcc_struct));
697 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
702 struct Symbol * parent;
703 struct Symbol * left;
704 struct Symbol * right;
709 struct __ecereNameSpace__ecere__com__Method * method;
710 struct __ecereNameSpace__ecere__com__Property * _property;
711 struct __ecereNameSpace__ecere__com__Class * registered;
712 } __attribute__ ((gcc_struct)) __anon1;
719 struct External * pointerExternal;
720 struct External * structExternal;
721 } __attribute__ ((gcc_struct)) __anon1;
724 struct External * externalGet;
725 struct External * externalSet;
726 struct External * externalPtr;
727 struct External * externalIsSet;
728 } __attribute__ ((gcc_struct)) __anon2;
731 struct External * methodExternal;
732 struct External * methodCodeExternal;
733 } __attribute__ ((gcc_struct)) __anon3;
734 } __attribute__ ((gcc_struct)) __anon2;
735 unsigned int imported;
736 unsigned int declaredStructSym;
737 struct __ecereNameSpace__ecere__com__Class * _class;
738 unsigned int declaredStruct;
739 unsigned int needConstructor;
740 unsigned int needDestructor;
741 char * constructorName;
744 char * destructorName;
745 struct ModuleImport * module;
746 struct ClassImport * _import;
747 struct Location nameLoc;
748 unsigned int isParam;
749 unsigned int isRemote;
750 unsigned int isStruct;
751 unsigned int fireWatchersDone;
753 unsigned int classData;
754 unsigned int isStatic;
756 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
757 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
758 struct Context * ctx;
760 struct Expression * propCategory;
761 } __attribute__ ((gcc_struct));
763 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
772 struct Symbol * _class;
775 struct __ecereNameSpace__ecere__sys__OldList members;
777 } __attribute__ ((gcc_struct)) __anon1;
780 struct Type * returnType;
781 struct __ecereNameSpace__ecere__sys__OldList params;
782 struct Symbol * thisClass;
783 unsigned int staticMethod;
784 struct TemplateParameter * thisClassTemplate;
785 } __attribute__ ((gcc_struct)) __anon2;
788 struct __ecereNameSpace__ecere__com__Method * method;
789 struct __ecereNameSpace__ecere__com__Class * methodClass;
790 struct __ecereNameSpace__ecere__com__Class * usedClass;
791 } __attribute__ ((gcc_struct)) __anon3;
794 struct Type * arrayType;
796 struct Expression * arraySizeExp;
797 unsigned int freeExp;
798 struct Symbol * enumClass;
799 } __attribute__ ((gcc_struct)) __anon4;
801 struct TemplateParameter * templateParameter;
802 } __attribute__ ((gcc_struct)) __anon1;
812 unsigned int isSigned : 1;
813 unsigned int constant : 1;
814 unsigned int truth : 1;
815 unsigned int byReference : 1;
816 unsigned int extraParam : 1;
817 unsigned int directClassAccess : 1;
818 unsigned int computing : 1;
819 unsigned int keepCast : 1;
820 unsigned int passAsTemplate : 1;
821 unsigned int dllExport : 1;
822 unsigned int attrStdcall : 1;
823 unsigned int declaredWithStruct : 1;
824 unsigned int typedByReference : 1;
825 unsigned int casted : 1;
826 } __attribute__ ((gcc_struct));
828 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
830 struct __ecereNameSpace__ecere__com__Class
832 struct __ecereNameSpace__ecere__com__Class * prev;
833 struct __ecereNameSpace__ecere__com__Class * next;
839 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
840 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
843 struct __ecereNameSpace__ecere__com__Class * base;
844 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
845 struct __ecereNameSpace__ecere__sys__BinaryTree members;
846 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
847 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
848 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
849 struct __ecereNameSpace__ecere__sys__OldList derivatives;
853 struct __ecereNameSpace__ecere__com__Instance * module;
854 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
855 const char * dataTypeString;
856 struct Type * dataType;
858 int defaultAlignment;
859 void (* Initialize)();
861 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
862 const char * designerClass;
863 unsigned int noExpansion;
864 const char * defaultProperty;
865 unsigned int comRedefinition;
868 unsigned int internalDecl;
870 unsigned int computeSize;
872 int destructionWatchOffset;
874 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
875 int inheritanceAccess;
876 const char * fullName;
878 struct __ecereNameSpace__ecere__sys__OldList conversions;
879 struct __ecereNameSpace__ecere__sys__OldList templateParams;
880 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
881 struct __ecereNameSpace__ecere__com__Class * templateClass;
882 struct __ecereNameSpace__ecere__sys__OldList templatized;
884 unsigned int isInstanceClass;
885 unsigned int byValueSystemClass;
886 } __attribute__ ((gcc_struct));
888 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
890 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
892 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
894 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
896 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
898 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);
900 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
902 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
904 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
906 struct __ecereNameSpace__ecere__com__Instance
909 struct __ecereNameSpace__ecere__com__Class * _class;
911 } __attribute__ ((gcc_struct));
913 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
915 struct __ecereNameSpace__ecere__com__DataMember
917 struct __ecereNameSpace__ecere__com__DataMember * prev;
918 struct __ecereNameSpace__ecere__com__DataMember * next;
920 unsigned int isProperty;
923 struct __ecereNameSpace__ecere__com__Class * _class;
924 const char * dataTypeString;
925 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
926 struct Type * dataType;
930 struct __ecereNameSpace__ecere__sys__OldList members;
931 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
934 } __attribute__ ((gcc_struct));
936 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
938 struct __ecereNameSpace__ecere__com__SerialBuffer
940 unsigned char * _buffer;
944 } __attribute__ ((gcc_struct));
946 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
948 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
954 const char * dataTypeString;
955 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
956 } __attribute__ ((gcc_struct)) __anon1;
957 struct __ecereNameSpace__ecere__com__DataValue expression;
960 const char * memberString;
963 struct __ecereNameSpace__ecere__com__DataMember * member;
964 struct __ecereNameSpace__ecere__com__Property * prop;
965 struct __ecereNameSpace__ecere__com__Method * method;
966 } __attribute__ ((gcc_struct)) __anon1;
967 } __attribute__ ((gcc_struct)) __anon2;
968 } __attribute__ ((gcc_struct)) __anon1;
969 } __attribute__ ((gcc_struct));
971 void exit(int status);
973 void * calloc(size_t nmemb, size_t size);
975 void free(void * ptr);
977 void * malloc(size_t size);
979 void * realloc(void * ptr, size_t size);
981 long int strtol(const char * nptr, char ** endptr, int base);
983 long long int strtoll(const char * nptr, char ** endptr, int base);
985 unsigned long long int strtoull(const char * nptr, char ** endptr, int base);
989 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
992 typedef union YYSTYPE
997 struct Identifier * id;
998 struct Expression * exp;
999 struct Specifier * specifier;
1000 struct __ecereNameSpace__ecere__sys__OldList * list;
1001 struct Enumerator * enumerator;
1002 struct Declarator * declarator;
1003 struct Pointer * pointer;
1004 struct Initializer * initializer;
1005 struct InitDeclarator * initDeclarator;
1006 struct TypeName * typeName;
1007 struct Declaration * declaration;
1008 struct Statement * stmt;
1009 struct FunctionDefinition * function;
1010 struct External * external;
1011 struct Context * context;
1012 struct AsmField * asmField;
1013 struct Attrib * attrib;
1014 struct ExtDecl * extDecl;
1015 struct Attribute * attribute;
1016 struct Instantiation * instance;
1017 struct MembersInit * membersInit;
1018 struct MemberInit * memberInit;
1019 struct ClassFunction * classFunction;
1020 struct ClassDefinition * _class;
1021 struct ClassDef * classDef;
1022 struct PropertyDef * prop;
1024 struct Symbol * symbol;
1025 struct PropertyWatch * propertyWatch;
1026 struct TemplateParameter * templateParameter;
1027 struct TemplateArgument * templateArgument;
1028 struct TemplateDatatype * templateDatatype;
1029 struct DBTableEntry * dbtableEntry;
1030 struct DBIndexItem * dbindexItem;
1031 struct DBTableDef * dbtableDef;
1032 } __attribute__ ((gcc_struct)) YYSTYPE;
1034 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
1038 struct Enumerator * prev;
1039 struct Enumerator * next;
1040 struct Location loc;
1041 struct Identifier * id;
1042 struct Expression * exp;
1043 } __attribute__ ((gcc_struct));
1045 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
1047 struct InitDeclarator
1049 struct InitDeclarator * prev;
1050 struct InitDeclarator * next;
1051 struct Location loc;
1052 struct Declarator * declarator;
1053 struct Initializer * initializer;
1054 } __attribute__ ((gcc_struct));
1056 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
1060 struct AsmField * prev;
1061 struct AsmField * next;
1062 struct Location loc;
1064 struct Expression * expression;
1065 struct Identifier * symbolic;
1066 } __attribute__ ((gcc_struct));
1068 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
1072 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
1074 struct ClassFunction
1076 struct ClassFunction * prev;
1077 struct ClassFunction * next;
1078 struct Location loc;
1079 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1080 struct Declarator * declarator;
1081 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1082 struct Statement * body;
1083 struct __ecereNameSpace__ecere__com__Class * _class;
1084 struct __ecereNameSpace__ecere__sys__OldList attached;
1087 struct Symbol * propSet;
1088 unsigned int isVirtual;
1089 unsigned int isConstructor;
1090 unsigned int isDestructor;
1091 unsigned int dontMangle;
1094 } __attribute__ ((gcc_struct));
1096 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1100 struct MembersInit * prev;
1101 struct MembersInit * next;
1102 struct Location loc;
1106 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1107 struct ClassFunction * function;
1108 } __attribute__ ((gcc_struct)) __anon1;
1109 } __attribute__ ((gcc_struct));
1111 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1115 struct MemberInit * prev;
1116 struct MemberInit * next;
1117 struct Location loc;
1118 struct Location realLoc;
1119 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1120 struct Initializer * initializer;
1122 unsigned int variable;
1123 unsigned int takeOutExp;
1124 } __attribute__ ((gcc_struct));
1126 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1130 struct PropertyDef * prev;
1131 struct PropertyDef * next;
1132 struct Location loc;
1133 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1134 struct Declarator * declarator;
1135 struct Identifier * id;
1136 struct Statement * getStmt;
1137 struct Statement * setStmt;
1138 struct Statement * issetStmt;
1139 struct Symbol * symbol;
1140 struct Expression * category;
1143 unsigned int conversion : 1;
1144 unsigned int isWatchable : 1;
1145 unsigned int isDBProp : 1;
1146 } __attribute__ ((gcc_struct)) __anon1;
1147 } __attribute__ ((gcc_struct));
1149 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1151 struct PropertyWatch
1153 struct PropertyWatch * prev;
1154 struct PropertyWatch * next;
1155 struct Location loc;
1156 struct Statement * compound;
1157 struct __ecereNameSpace__ecere__sys__OldList * properties;
1158 unsigned int deleteWatch;
1159 } __attribute__ ((gcc_struct));
1161 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1165 struct ClassDef * prev;
1166 struct ClassDef * next;
1167 struct Location loc;
1171 struct Declaration * decl;
1172 struct ClassFunction * function;
1173 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1174 struct PropertyDef * propertyDef;
1175 struct PropertyWatch * propertyWatch;
1177 struct Identifier * defaultProperty;
1180 struct Identifier * id;
1181 struct Initializer * initializer;
1182 } __attribute__ ((gcc_struct)) __anon1;
1183 } __attribute__ ((gcc_struct)) __anon1;
1186 } __attribute__ ((gcc_struct));
1188 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1190 struct DBTableEntry;
1192 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1196 extern YYSTYPE yylval;
1198 extern struct Location yylloc;
1200 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
1202 extern int returnCode;
1204 extern struct Expression * parsedExpression;
1206 extern unsigned int yydebug;
1208 void SetYydebug(unsigned int b)
1213 extern unsigned int echoOn;
1215 void resetScanner();
1219 int expression_yyparse();
1221 static struct Statement * curCompound;
1223 struct External * curExternal, * afterExternal;
1225 static struct Type * curSwitchType;
1227 static struct __ecereNameSpace__ecere__com__Class * currentClass;
1229 struct __ecereNameSpace__ecere__com__Class * thisClass;
1231 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
1236 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
1241 static char * thisNameSpace;
1243 struct __ecereNameSpace__ecere__com__Class * containerClass;
1245 unsigned int thisClassParams = 1;
1247 unsigned int internalValueCounter;
1249 extern unsigned int outputLineNumbers;
1251 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
1253 extern size_t strlen(const char * );
1255 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
1257 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
1259 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
1261 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
1263 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
1265 void PrintExpression(struct Expression * exp, char * string)
1268 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
1270 unsigned int backOutputLineNumbers = outputLineNumbers;
1272 outputLineNumbers = 0;
1274 OutputExpression(exp, f);
1275 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
1276 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1278 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1279 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
1280 count = strlen(string);
1281 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
1282 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1284 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1285 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
1286 string[count] = '\0';
1287 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
1288 outputLineNumbers = backOutputLineNumbers;
1292 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
1294 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1296 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1298 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1300 if(!param->baseType)
1302 if(param->dataTypeString)
1303 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1305 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1307 return param->baseType;
1309 return (((void *)0));
1312 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1314 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1316 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1320 if(type1->kind == type2->kind)
1331 if(type1->passAsTemplate && !type2->passAsTemplate)
1333 return type1->isSigned != type2->isSigned;
1335 return type1->__anon1._class != type2->__anon1._class;
1337 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1345 extern int strcmp(const char * , const char * );
1347 extern struct Context * curContext;
1349 extern struct Context * topContext;
1351 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
1353 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);
1355 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
1357 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);
1359 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);
1361 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassProperty;
1363 struct __ecereNameSpace__ecere__com__ClassProperty
1366 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1367 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1368 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1370 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1371 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1372 const char * dataTypeString;
1373 struct Type * dataType;
1374 unsigned int constant;
1375 } __attribute__ ((gcc_struct));
1377 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1379 extern struct Expression * QMkExpId(const char * id);
1381 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateParameter;
1383 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
1385 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
1386 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
1391 const char * dataTypeString;
1393 } __attribute__ ((gcc_struct)) __anon1;
1394 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
1396 } __attribute__ ((gcc_struct));
1398 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
1400 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1402 extern void FreeIdentifier(struct Identifier * id);
1404 void ProcessExpressionType(struct Expression * exp);
1406 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1408 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
1410 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
1412 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1414 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1416 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
1418 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
1420 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
1422 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
1424 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
1426 struct Identifier * id = exp->__anon1.__anon1.identifier;
1427 struct Context * ctx;
1428 struct Symbol * symbol = (((void *)0));
1430 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
1432 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
1434 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
1439 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))))
1441 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
1442 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
1443 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
1444 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
1448 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
1450 if(!prop && !method)
1451 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
1452 if(!prop && !method && !member)
1454 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
1456 if(prop || method || member || classProp)
1459 exp->__anon1.member.member = id;
1460 exp->__anon1.member.memberType = 0;
1461 exp->__anon1.member.exp = QMkExpId("this");
1464 else if(_class && _class->templateParams.first)
1466 struct __ecereNameSpace__ecere__com__Class * sClass;
1468 for(sClass = _class; sClass; sClass = sClass->base)
1470 if(sClass->templateParams.first)
1472 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
1474 for(param = sClass->templateParams.first; param; param = param->next)
1476 if(param->type == 2 && !strcmp(param->name, id->string))
1478 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
1482 struct Declarator * decl;
1483 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1485 FreeIdentifier(exp->__anon1.member.member);
1486 ProcessExpressionType(argExp);
1487 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
1488 exp->expType = ProcessType(specs, decl);
1490 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
1501 extern int sprintf(char * , const char * , ...);
1503 extern char * strcat(char * , const char * );
1505 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
1507 char * PrintInt(long long result)
1511 if(result > (((int)0x7fffffff)))
1512 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1514 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
1515 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
1517 return __ecereNameSpace__ecere__sys__CopyString(temp);
1520 char * PrintUInt(uint64 result)
1524 if(result > (0xffffffff))
1525 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1526 else if(result > (((int)0x7fffffff)))
1527 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1529 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
1530 return __ecereNameSpace__ecere__sys__CopyString(temp);
1533 char * PrintInt64(long long result)
1537 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
1538 sprintf(temp, ((__runtimePlatform == 1) ? "%I64dLL" : "%lldLL"), result);
1540 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
1541 return __ecereNameSpace__ecere__sys__CopyString(temp);
1544 char * PrintUInt64(uint64 result)
1548 if(result > (0xffffffff))
1549 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1550 else if(result > (((int)0x7fffffff)))
1551 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1553 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
1554 return __ecereNameSpace__ecere__sys__CopyString(temp);
1557 char * PrintHexUInt(uint64 result)
1561 if(result > (0xffffffff))
1562 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1564 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1565 if(result > (0xffffffff))
1567 return __ecereNameSpace__ecere__sys__CopyString(temp);
1570 char * PrintHexUInt64(uint64 result)
1574 if(result > (0xffffffff))
1575 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1577 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1578 return __ecereNameSpace__ecere__sys__CopyString(temp);
1581 char * PrintShort(short result)
1585 sprintf(temp, "%d", (unsigned short)result);
1586 return __ecereNameSpace__ecere__sys__CopyString(temp);
1589 char * PrintUShort(unsigned short result)
1593 if(result > (unsigned short)32767)
1594 sprintf(temp, "0x%X", (int)result);
1596 sprintf(temp, "%d", (int)result);
1597 return __ecereNameSpace__ecere__sys__CopyString(temp);
1600 extern int isprint(int c);
1602 char * PrintChar(char result)
1606 if(result > (char)0 && isprint(result))
1607 sprintf(temp, "'%c'", result);
1608 else if(result < (char)0)
1609 sprintf(temp, "%d", (int)result);
1611 sprintf(temp, "0x%X", (unsigned char)result);
1612 return __ecereNameSpace__ecere__sys__CopyString(temp);
1615 char * PrintUChar(unsigned char result)
1619 sprintf(temp, "0x%X", result);
1620 return __ecereNameSpace__ecere__sys__CopyString(temp);
1623 extern char * strcpy(char * , const char * );
1625 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
1627 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_isInf;
1629 extern int (* __ecereProp_float_Get_signBit)(float this);
1631 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_signBit;
1633 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
1635 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_float_isNan;
1637 char * PrintFloat(float result)
1641 if(__ecereProp_float_Get_isInf(result))
1643 if(__ecereProp_float_Get_signBit(result))
1644 strcpy(temp, "-inf");
1646 strcpy(temp, "inf");
1648 else if(__ecereProp_float_Get_isNan(result))
1650 if(__ecereProp_float_Get_signBit(result))
1651 strcpy(temp, "-nan");
1653 strcpy(temp, "nan");
1656 sprintf(temp, "%.16ff", result);
1657 return __ecereNameSpace__ecere__sys__CopyString(temp);
1660 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
1662 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_isInf;
1664 extern int (* __ecereProp_double_Get_signBit)(double this);
1666 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_signBit;
1668 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
1670 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_double_isNan;
1672 char * PrintDouble(double result)
1676 if(__ecereProp_double_Get_isInf(result))
1678 if(__ecereProp_double_Get_signBit(result))
1679 strcpy(temp, "-inf");
1681 strcpy(temp, "inf");
1683 else if(__ecereProp_double_Get_isNan(result))
1685 if(__ecereProp_double_Get_signBit(result))
1686 strcpy(temp, "-nan");
1688 strcpy(temp, "nan");
1691 sprintf(temp, "%.16f", result);
1692 return __ecereNameSpace__ecere__sys__CopyString(temp);
1695 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_OpTable;
1699 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1700 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1701 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1702 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1703 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1704 unsigned int (* Neg)(struct Expression *, struct Operand *);
1705 unsigned int (* Inc)(struct Expression *, struct Operand *);
1706 unsigned int (* Dec)(struct Expression *, struct Operand *);
1707 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1708 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1709 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1710 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1711 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1712 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1713 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1714 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1715 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1716 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1717 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1718 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1719 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1720 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1721 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1722 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1723 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1724 unsigned int (* Not)(struct Expression *, struct Operand *);
1725 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1726 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1727 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1728 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1729 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1730 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1731 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1732 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1733 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1734 } __attribute__ ((gcc_struct));
1736 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Operand;
1742 unsigned int ptrSize;
1755 } __attribute__ ((gcc_struct)) __anon1;
1757 } __attribute__ ((gcc_struct));
1759 unsigned int GetOpInt(struct Operand * op2, int * value2)
1761 if(op2->kind == 3 && op2->type->isSigned)
1762 *value2 = op2->__anon1.i;
1763 else if(op2->kind == 3)
1764 *value2 = (int)op2->__anon1.ui;
1765 else if(op2->kind == 4 && op2->type->isSigned)
1766 *value2 = (int)op2->__anon1.i64;
1767 else if(op2->kind == 4)
1768 *value2 = (int)op2->__anon1.ui64;
1769 else if(op2->kind == 23 && op2->type->isSigned)
1770 *value2 = (int)op2->__anon1.i64;
1771 else if(op2->kind == 23)
1772 *value2 = (int)op2->__anon1.ui64;
1773 else if(op2->kind == 22 && op2->type->isSigned)
1774 *value2 = (int)op2->__anon1.i64;
1775 else if(op2->kind == 22)
1776 *value2 = (int)op2->__anon1.ui64;
1777 else if(op2->kind == 2 && op2->type->isSigned)
1778 *value2 = (int)op2->__anon1.s;
1779 else if(op2->kind == 2)
1780 *value2 = (int)op2->__anon1.us;
1781 else if(op2->kind == 1 && op2->type->isSigned)
1782 *value2 = (int)op2->__anon1.c;
1783 else if(op2->kind == 24 || op2->kind == 1)
1784 *value2 = (int)op2->__anon1.uc;
1785 else if(op2->kind == 6)
1786 *value2 = (int)op2->__anon1.f;
1787 else if(op2->kind == 7)
1788 *value2 = (int)op2->__anon1.d;
1789 else if(op2->kind == 13)
1790 *value2 = (int)op2->__anon1.ui64;
1796 struct Operand GetOperand(struct Expression * exp);
1798 unsigned int GetInt(struct Expression * exp, int * value2)
1800 struct Operand op2 = GetOperand(exp);
1802 return GetOpInt(&op2, value2);
1805 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1807 if(op2->kind == 3 && op2->type->isSigned)
1808 *value2 = (unsigned int)op2->__anon1.i;
1809 else if(op2->kind == 3)
1810 *value2 = op2->__anon1.ui;
1811 else if(op2->kind == 4 && op2->type->isSigned)
1812 *value2 = (unsigned int)op2->__anon1.i64;
1813 else if(op2->kind == 4)
1814 *value2 = (unsigned int)op2->__anon1.ui64;
1815 else if(op2->kind == 23 && op2->type->isSigned)
1816 *value2 = (unsigned int)op2->__anon1.i64;
1817 else if(op2->kind == 23)
1818 *value2 = (unsigned int)op2->__anon1.ui64;
1819 else if(op2->kind == 22 && op2->type->isSigned)
1820 *value2 = (unsigned int)op2->__anon1.i64;
1821 else if(op2->kind == 22)
1822 *value2 = (unsigned int)op2->__anon1.ui64;
1823 else if(op2->kind == 2 && op2->type->isSigned)
1824 *value2 = (unsigned int)op2->__anon1.s;
1825 else if(op2->kind == 2)
1826 *value2 = (unsigned int)op2->__anon1.us;
1827 else if(op2->kind == 1 && op2->type->isSigned)
1828 *value2 = (unsigned int)op2->__anon1.c;
1829 else if(op2->kind == 24 || op2->kind == 1)
1830 *value2 = (unsigned int)op2->__anon1.uc;
1831 else if(op2->kind == 6)
1832 *value2 = (unsigned int)op2->__anon1.f;
1833 else if(op2->kind == 7)
1834 *value2 = (unsigned int)op2->__anon1.d;
1835 else if(op2->kind == 13)
1836 *value2 = (unsigned int)op2->__anon1.ui64;
1842 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
1844 struct Operand op2 = GetOperand(exp);
1846 return GetOpUInt(&op2, value2);
1849 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
1851 if(op2->kind == 3 && op2->type->isSigned)
1852 *value2 = (long long)op2->__anon1.i;
1853 else if(op2->kind == 3)
1854 *value2 = (long long)op2->__anon1.ui;
1855 else if(op2->kind == 4 && op2->type->isSigned)
1856 *value2 = op2->__anon1.i64;
1857 else if(op2->kind == 4)
1858 *value2 = (long long)op2->__anon1.ui64;
1859 else if(op2->kind == 23 && op2->type->isSigned)
1860 *value2 = op2->__anon1.i64;
1861 else if(op2->kind == 23)
1862 *value2 = (long long)op2->__anon1.ui64;
1863 else if(op2->kind == 22 && op2->type->isSigned)
1864 *value2 = op2->__anon1.i64;
1865 else if(op2->kind == 22)
1866 *value2 = (long long)op2->__anon1.ui64;
1867 else if(op2->kind == 2 && op2->type->isSigned)
1868 *value2 = (long long)op2->__anon1.s;
1869 else if(op2->kind == 2)
1870 *value2 = (long long)op2->__anon1.us;
1871 else if(op2->kind == 1 && op2->type->isSigned)
1872 *value2 = (long long)op2->__anon1.c;
1873 else if(op2->kind == 24 || op2->kind == 1)
1874 *value2 = (long long)op2->__anon1.uc;
1875 else if(op2->kind == 6)
1876 *value2 = (long long)op2->__anon1.f;
1877 else if(op2->kind == 7)
1878 *value2 = (long long)op2->__anon1.d;
1879 else if(op2->kind == 13)
1880 *value2 = (long long)op2->__anon1.ui64;
1886 unsigned int GetInt64(struct Expression * exp, long long * value2)
1888 struct Operand op2 = GetOperand(exp);
1890 return GetOpInt64(&op2, value2);
1893 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
1895 if(op2->kind == 3 && op2->type->isSigned)
1896 *value2 = (uint64)op2->__anon1.i;
1897 else if(op2->kind == 3)
1898 *value2 = (uint64)op2->__anon1.ui;
1899 else if(op2->kind == 4 && op2->type->isSigned)
1900 *value2 = (uint64)op2->__anon1.i64;
1901 else if(op2->kind == 4)
1902 *value2 = op2->__anon1.ui64;
1903 else if(op2->kind == 23 && op2->type->isSigned)
1904 *value2 = (uint64)op2->__anon1.i64;
1905 else if(op2->kind == 23)
1906 *value2 = op2->__anon1.ui64;
1907 else if(op2->kind == 22 && op2->type->isSigned)
1908 *value2 = (uint64)op2->__anon1.i64;
1909 else if(op2->kind == 22)
1910 *value2 = op2->__anon1.ui64;
1911 else if(op2->kind == 2 && op2->type->isSigned)
1912 *value2 = (uint64)op2->__anon1.s;
1913 else if(op2->kind == 2)
1914 *value2 = (uint64)op2->__anon1.us;
1915 else if(op2->kind == 1 && op2->type->isSigned)
1916 *value2 = (uint64)op2->__anon1.c;
1917 else if(op2->kind == 24 || op2->kind == 1)
1918 *value2 = (uint64)op2->__anon1.uc;
1919 else if(op2->kind == 6)
1920 *value2 = (uint64)op2->__anon1.f;
1921 else if(op2->kind == 7)
1922 *value2 = (uint64)op2->__anon1.d;
1923 else if(op2->kind == 13)
1924 *value2 = op2->__anon1.ui64;
1930 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
1932 struct Operand op2 = GetOperand(exp);
1934 return GetOpUInt64(&op2, value2);
1937 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
1939 if(op2->kind == 3 && op2->type->isSigned)
1940 *value2 = (intptr_t)op2->__anon1.i;
1941 else if(op2->kind == 3)
1942 *value2 = (intptr_t)op2->__anon1.ui;
1943 else if(op2->kind == 4 && op2->type->isSigned)
1944 *value2 = (intptr_t)op2->__anon1.i64;
1945 else if(op2->kind == 4)
1946 *value2 = (intptr_t)op2->__anon1.ui64;
1947 else if(op2->kind == 23 && op2->type->isSigned)
1948 *value2 = (intptr_t)op2->__anon1.i64;
1949 else if(op2->kind == 23)
1950 *value2 = (intptr_t)op2->__anon1.ui64;
1951 else if(op2->kind == 22 && op2->type->isSigned)
1952 *value2 = (intptr_t)op2->__anon1.i64;
1953 else if(op2->kind == 22)
1954 *value2 = (intptr_t)op2->__anon1.ui64;
1955 else if(op2->kind == 2 && op2->type->isSigned)
1956 *value2 = (intptr_t)op2->__anon1.s;
1957 else if(op2->kind == 2)
1958 *value2 = (intptr_t)op2->__anon1.us;
1959 else if(op2->kind == 1 && op2->type->isSigned)
1960 *value2 = (intptr_t)op2->__anon1.c;
1961 else if(op2->kind == 24 || op2->kind == 1)
1962 *value2 = (intptr_t)op2->__anon1.uc;
1963 else if(op2->kind == 6)
1964 *value2 = (intptr_t)op2->__anon1.f;
1965 else if(op2->kind == 7)
1966 *value2 = (intptr_t)op2->__anon1.d;
1967 else if(op2->kind == 13)
1968 *value2 = (intptr_t)op2->__anon1.ui64;
1974 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
1976 struct Operand op2 = GetOperand(exp);
1978 return GetOpIntPtr(&op2, value2);
1981 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
1983 if(op2->kind == 3 && op2->type->isSigned)
1984 *value2 = (uintptr_t)op2->__anon1.i;
1985 else if(op2->kind == 3)
1986 *value2 = (uintptr_t)op2->__anon1.ui;
1987 else if(op2->kind == 4 && op2->type->isSigned)
1988 *value2 = (uintptr_t)op2->__anon1.i64;
1989 else if(op2->kind == 4)
1990 *value2 = (uintptr_t)op2->__anon1.ui64;
1991 else if(op2->kind == 23 && op2->type->isSigned)
1992 *value2 = (uintptr_t)op2->__anon1.i64;
1993 else if(op2->kind == 23)
1994 *value2 = (uintptr_t)op2->__anon1.ui64;
1995 else if(op2->kind == 22 && op2->type->isSigned)
1996 *value2 = (uintptr_t)op2->__anon1.i64;
1997 else if(op2->kind == 22)
1998 *value2 = (uintptr_t)op2->__anon1.ui64;
1999 else if(op2->kind == 2 && op2->type->isSigned)
2000 *value2 = (uintptr_t)op2->__anon1.s;
2001 else if(op2->kind == 2)
2002 *value2 = (uintptr_t)op2->__anon1.us;
2003 else if(op2->kind == 1 && op2->type->isSigned)
2004 *value2 = (uintptr_t)op2->__anon1.c;
2005 else if(op2->kind == 24 || op2->kind == 1)
2006 *value2 = (uintptr_t)op2->__anon1.uc;
2007 else if(op2->kind == 6)
2008 *value2 = (uintptr_t)op2->__anon1.f;
2009 else if(op2->kind == 7)
2010 *value2 = (uintptr_t)op2->__anon1.d;
2011 else if(op2->kind == 13)
2012 *value2 = (uintptr_t)op2->__anon1.ui64;
2018 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
2020 struct Operand op2 = GetOperand(exp);
2022 return GetOpUIntPtr(&op2, value2);
2025 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2027 if(op2->kind == 3 && op2->type->isSigned)
2028 *value2 = (ssize_t)op2->__anon1.i;
2029 else if(op2->kind == 3)
2030 *value2 = (ssize_t)op2->__anon1.ui;
2031 else if(op2->kind == 4 && op2->type->isSigned)
2032 *value2 = (ssize_t)op2->__anon1.i64;
2033 else if(op2->kind == 4)
2034 *value2 = (ssize_t)op2->__anon1.ui64;
2035 else if(op2->kind == 23 && op2->type->isSigned)
2036 *value2 = (ssize_t)op2->__anon1.i64;
2037 else if(op2->kind == 23)
2038 *value2 = (ssize_t)op2->__anon1.ui64;
2039 else if(op2->kind == 22 && op2->type->isSigned)
2040 *value2 = (ssize_t)op2->__anon1.i64;
2041 else if(op2->kind == 22)
2042 *value2 = (ssize_t)op2->__anon1.ui64;
2043 else if(op2->kind == 2 && op2->type->isSigned)
2044 *value2 = (ssize_t)op2->__anon1.s;
2045 else if(op2->kind == 2)
2046 *value2 = (ssize_t)op2->__anon1.us;
2047 else if(op2->kind == 1 && op2->type->isSigned)
2048 *value2 = (ssize_t)op2->__anon1.c;
2049 else if(op2->kind == 24 || op2->kind == 1)
2050 *value2 = (ssize_t)op2->__anon1.uc;
2051 else if(op2->kind == 6)
2052 *value2 = (ssize_t)op2->__anon1.f;
2053 else if(op2->kind == 7)
2054 *value2 = (ssize_t)op2->__anon1.d;
2055 else if(op2->kind == 13)
2056 *value2 = (ssize_t)op2->__anon1.ui64;
2062 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
2064 struct Operand op2 = GetOperand(exp);
2066 return GetOpIntSize(&op2, value2);
2069 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2071 if(op2->kind == 3 && op2->type->isSigned)
2072 *value2 = (size_t)op2->__anon1.i;
2073 else if(op2->kind == 3)
2074 *value2 = (size_t)op2->__anon1.ui;
2075 else if(op2->kind == 4 && op2->type->isSigned)
2076 *value2 = (size_t)op2->__anon1.i64;
2077 else if(op2->kind == 4)
2078 *value2 = (size_t)op2->__anon1.ui64;
2079 else if(op2->kind == 23 && op2->type->isSigned)
2080 *value2 = (size_t)op2->__anon1.i64;
2081 else if(op2->kind == 23)
2082 *value2 = (size_t)op2->__anon1.ui64;
2083 else if(op2->kind == 22 && op2->type->isSigned)
2084 *value2 = (size_t)op2->__anon1.i64;
2085 else if(op2->kind == 22)
2086 *value2 = (size_t)op2->__anon1.ui64;
2087 else if(op2->kind == 2 && op2->type->isSigned)
2088 *value2 = (size_t)op2->__anon1.s;
2089 else if(op2->kind == 2)
2090 *value2 = (size_t)op2->__anon1.us;
2091 else if(op2->kind == 1 && op2->type->isSigned)
2092 *value2 = (size_t)op2->__anon1.c;
2093 else if(op2->kind == 24 || op2->kind == 1)
2094 *value2 = (size_t)op2->__anon1.uc;
2095 else if(op2->kind == 6)
2096 *value2 = (size_t)op2->__anon1.f;
2097 else if(op2->kind == 7)
2098 *value2 = (size_t)op2->__anon1.d;
2099 else if(op2->kind == 13)
2100 *value2 = (size_t)op2->__anon1.ui64;
2106 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
2108 struct Operand op2 = GetOperand(exp);
2110 return GetOpUIntSize(&op2, value2);
2113 unsigned int GetOpShort(struct Operand * op2, short * value2)
2115 if(op2->kind == 3 && op2->type->isSigned)
2116 *value2 = (short)op2->__anon1.i;
2117 else if(op2->kind == 3)
2118 *value2 = (short)op2->__anon1.ui;
2119 else if(op2->kind == 4 && op2->type->isSigned)
2120 *value2 = (short)op2->__anon1.i64;
2121 else if(op2->kind == 4)
2122 *value2 = (short)op2->__anon1.ui64;
2123 else if(op2->kind == 23 && op2->type->isSigned)
2124 *value2 = (short)op2->__anon1.i64;
2125 else if(op2->kind == 23)
2126 *value2 = (short)op2->__anon1.ui64;
2127 else if(op2->kind == 22 && op2->type->isSigned)
2128 *value2 = (short)op2->__anon1.i64;
2129 else if(op2->kind == 22)
2130 *value2 = (short)op2->__anon1.ui64;
2131 else if(op2->kind == 2 && op2->type->isSigned)
2132 *value2 = op2->__anon1.s;
2133 else if(op2->kind == 2)
2134 *value2 = (short)op2->__anon1.us;
2135 else if(op2->kind == 1 && op2->type->isSigned)
2136 *value2 = (short)op2->__anon1.c;
2137 else if(op2->kind == 24 || op2->kind == 1)
2138 *value2 = (short)op2->__anon1.uc;
2139 else if(op2->kind == 6)
2140 *value2 = (short)op2->__anon1.f;
2141 else if(op2->kind == 7)
2142 *value2 = (short)op2->__anon1.d;
2143 else if(op2->kind == 13)
2144 *value2 = (short)op2->__anon1.ui64;
2150 unsigned int GetShort(struct Expression * exp, short * value2)
2152 struct Operand op2 = GetOperand(exp);
2154 return GetOpShort(&op2, value2);
2157 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2159 if(op2->kind == 3 && op2->type->isSigned)
2160 *value2 = (unsigned short)op2->__anon1.i;
2161 else if(op2->kind == 3)
2162 *value2 = (unsigned short)op2->__anon1.ui;
2163 else if(op2->kind == 4 && op2->type->isSigned)
2164 *value2 = (unsigned short)op2->__anon1.i64;
2165 else if(op2->kind == 4)
2166 *value2 = (unsigned short)op2->__anon1.ui64;
2167 else if(op2->kind == 23 && op2->type->isSigned)
2168 *value2 = (unsigned short)op2->__anon1.i64;
2169 else if(op2->kind == 23)
2170 *value2 = (unsigned short)op2->__anon1.ui64;
2171 else if(op2->kind == 22 && op2->type->isSigned)
2172 *value2 = (unsigned short)op2->__anon1.i64;
2173 else if(op2->kind == 22)
2174 *value2 = (unsigned short)op2->__anon1.ui64;
2175 else if(op2->kind == 2 && op2->type->isSigned)
2176 *value2 = (unsigned short)op2->__anon1.s;
2177 else if(op2->kind == 2)
2178 *value2 = op2->__anon1.us;
2179 else if(op2->kind == 1 && op2->type->isSigned)
2180 *value2 = (unsigned short)op2->__anon1.c;
2181 else if(op2->kind == 24 || op2->kind == 1)
2182 *value2 = (unsigned short)op2->__anon1.uc;
2183 else if(op2->kind == 6)
2184 *value2 = (unsigned short)op2->__anon1.f;
2185 else if(op2->kind == 7)
2186 *value2 = (unsigned short)op2->__anon1.d;
2187 else if(op2->kind == 13)
2188 *value2 = (unsigned short)op2->__anon1.ui64;
2194 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
2196 struct Operand op2 = GetOperand(exp);
2198 return GetOpUShort(&op2, value2);
2201 unsigned int GetOpChar(struct Operand * op2, char * value2)
2203 if(op2->kind == 3 && op2->type->isSigned)
2204 *value2 = (char)op2->__anon1.i;
2205 else if(op2->kind == 3)
2206 *value2 = (char)op2->__anon1.ui;
2207 else if(op2->kind == 4 && op2->type->isSigned)
2208 *value2 = (char)op2->__anon1.i64;
2209 else if(op2->kind == 4)
2210 *value2 = (char)op2->__anon1.ui64;
2211 else if(op2->kind == 23 && op2->type->isSigned)
2212 *value2 = (char)op2->__anon1.i64;
2213 else if(op2->kind == 23)
2214 *value2 = (char)op2->__anon1.ui64;
2215 else if(op2->kind == 22 && op2->type->isSigned)
2216 *value2 = (char)op2->__anon1.i64;
2217 else if(op2->kind == 22)
2218 *value2 = (char)op2->__anon1.ui64;
2219 else if(op2->kind == 2 && op2->type->isSigned)
2220 *value2 = (char)op2->__anon1.s;
2221 else if(op2->kind == 2)
2222 *value2 = (char)op2->__anon1.us;
2223 else if(op2->kind == 1 && op2->type->isSigned)
2224 *value2 = op2->__anon1.c;
2225 else if(op2->kind == 24 || op2->kind == 1)
2226 *value2 = (char)op2->__anon1.uc;
2227 else if(op2->kind == 6)
2228 *value2 = (char)op2->__anon1.f;
2229 else if(op2->kind == 7)
2230 *value2 = (char)op2->__anon1.d;
2231 else if(op2->kind == 13)
2232 *value2 = (char)op2->__anon1.ui64;
2238 unsigned int GetChar(struct Expression * exp, char * value2)
2240 struct Operand op2 = GetOperand(exp);
2242 return GetOpChar(&op2, value2);
2245 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2247 if(op2->kind == 3 && op2->type->isSigned)
2248 *value2 = (unsigned char)op2->__anon1.i;
2249 else if(op2->kind == 3)
2250 *value2 = (unsigned char)op2->__anon1.ui;
2251 else if(op2->kind == 4 && op2->type->isSigned)
2252 *value2 = (unsigned char)op2->__anon1.i64;
2253 else if(op2->kind == 4)
2254 *value2 = (unsigned char)op2->__anon1.ui64;
2255 else if(op2->kind == 23 && op2->type->isSigned)
2256 *value2 = (unsigned char)op2->__anon1.i64;
2257 else if(op2->kind == 23)
2258 *value2 = (unsigned char)op2->__anon1.ui64;
2259 else if(op2->kind == 22 && op2->type->isSigned)
2260 *value2 = (unsigned char)op2->__anon1.i64;
2261 else if(op2->kind == 22)
2262 *value2 = (unsigned char)op2->__anon1.ui64;
2263 else if(op2->kind == 2 && op2->type->isSigned)
2264 *value2 = (unsigned char)op2->__anon1.s;
2265 else if(op2->kind == 2)
2266 *value2 = (unsigned char)op2->__anon1.us;
2267 else if(op2->kind == 1 && op2->type->isSigned)
2268 *value2 = (unsigned char)op2->__anon1.c;
2269 else if(op2->kind == 24 || op2->kind == 1)
2270 *value2 = op2->__anon1.uc;
2271 else if(op2->kind == 6)
2272 *value2 = (unsigned char)op2->__anon1.f;
2273 else if(op2->kind == 7)
2274 *value2 = (unsigned char)op2->__anon1.d;
2275 else if(op2->kind == 13)
2276 *value2 = (unsigned char)op2->__anon1.ui64;
2282 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
2284 struct Operand op2 = GetOperand(exp);
2286 return GetOpUChar(&op2, value2);
2289 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2291 if(op2->kind == 3 && op2->type->isSigned)
2292 *value2 = (float)(float)op2->__anon1.i;
2293 else if(op2->kind == 3)
2294 *value2 = (float)(float)op2->__anon1.ui;
2295 else if(op2->kind == 4 && op2->type->isSigned)
2296 *value2 = (float)(float)op2->__anon1.i64;
2297 else if(op2->kind == 4)
2298 *value2 = (float)(float)op2->__anon1.ui64;
2299 else if(op2->kind == 23 && op2->type->isSigned)
2300 *value2 = (float)(float)op2->__anon1.i64;
2301 else if(op2->kind == 23)
2302 *value2 = (float)(float)op2->__anon1.ui64;
2303 else if(op2->kind == 22 && op2->type->isSigned)
2304 *value2 = (float)(float)op2->__anon1.i64;
2305 else if(op2->kind == 22)
2306 *value2 = (float)(float)op2->__anon1.ui64;
2307 else if(op2->kind == 2 && op2->type->isSigned)
2308 *value2 = (float)(float)op2->__anon1.s;
2309 else if(op2->kind == 2)
2310 *value2 = (float)(float)op2->__anon1.us;
2311 else if(op2->kind == 1 && op2->type->isSigned)
2312 *value2 = (float)(float)op2->__anon1.c;
2313 else if(op2->kind == 24 || op2->kind == 1)
2314 *value2 = (float)(float)op2->__anon1.uc;
2315 else if(op2->kind == 6)
2316 *value2 = (float)op2->__anon1.f;
2317 else if(op2->kind == 7)
2318 *value2 = (float)op2->__anon1.d;
2319 else if(op2->kind == 13)
2320 *value2 = (float)(float)op2->__anon1.ui64;
2326 unsigned int GetFloat(struct Expression * exp, float * value2)
2328 struct Operand op2 = GetOperand(exp);
2330 return GetOpFloat(&op2, value2);
2333 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2335 if(op2->kind == 3 && op2->type->isSigned)
2336 *value2 = (double)(double)op2->__anon1.i;
2337 else if(op2->kind == 3)
2338 *value2 = (double)(double)op2->__anon1.ui;
2339 else if(op2->kind == 4 && op2->type->isSigned)
2340 *value2 = (double)(double)op2->__anon1.i64;
2341 else if(op2->kind == 4)
2342 *value2 = (double)(double)op2->__anon1.ui64;
2343 else if(op2->kind == 23 && op2->type->isSigned)
2344 *value2 = (double)(double)op2->__anon1.i64;
2345 else if(op2->kind == 23)
2346 *value2 = (double)(double)op2->__anon1.ui64;
2347 else if(op2->kind == 22 && op2->type->isSigned)
2348 *value2 = (double)(double)op2->__anon1.i64;
2349 else if(op2->kind == 22)
2350 *value2 = (double)(double)op2->__anon1.ui64;
2351 else if(op2->kind == 2 && op2->type->isSigned)
2352 *value2 = (double)(double)op2->__anon1.s;
2353 else if(op2->kind == 2)
2354 *value2 = (double)(double)op2->__anon1.us;
2355 else if(op2->kind == 1 && op2->type->isSigned)
2356 *value2 = (double)(double)op2->__anon1.c;
2357 else if(op2->kind == 24 || op2->kind == 1)
2358 *value2 = (double)(double)op2->__anon1.uc;
2359 else if(op2->kind == 6)
2360 *value2 = (double)op2->__anon1.f;
2361 else if(op2->kind == 7)
2362 *value2 = (double)op2->__anon1.d;
2363 else if(op2->kind == 13)
2364 *value2 = (double)(double)op2->__anon1.ui64;
2370 unsigned int GetDouble(struct Expression * exp, double * value2)
2372 struct Operand op2 = GetOperand(exp);
2374 return GetOpDouble(&op2, value2);
2377 void ComputeExpression(struct Expression * exp);
2379 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class);
2381 extern int targetBits;
2383 int ComputeTypeSize(struct Type * type);
2385 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
2387 struct __ecereNameSpace__ecere__com__BitMember
2389 struct __ecereNameSpace__ecere__com__BitMember * prev;
2390 struct __ecereNameSpace__ecere__com__BitMember * next;
2392 unsigned int isProperty;
2395 struct __ecereNameSpace__ecere__com__Class * _class;
2396 const char * dataTypeString;
2397 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
2398 struct Type * dataType;
2403 } __attribute__ ((gcc_struct));
2405 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldLink;
2407 struct __ecereNameSpace__ecere__sys__OldLink
2409 struct __ecereNameSpace__ecere__sys__OldLink * prev;
2410 struct __ecereNameSpace__ecere__sys__OldLink * next;
2412 } __attribute__ ((gcc_struct));
2414 void FinishTemplatesContext(struct Context * context);
2416 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
2418 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2419 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2421 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))
2423 int unionMemberOffset = 0;
2428 member->memberOffset = 0;
2429 if(targetBits < sizeof(void *) * 8)
2430 member->structAlignment = 0;
2432 else if(targetBits < sizeof(void *) * 8)
2433 _class->structAlignment = 0;
2434 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
2435 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
2436 if(!member && _class->destructionWatchOffset)
2437 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2439 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2441 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2443 if(!dataMember->isProperty)
2445 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
2447 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
2453 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2455 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2457 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
2459 if(!isMember && _class->type == 2 && dataMember->dataType)
2461 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
2465 ComputeTypeSize(dataMember->dataType);
2466 if(bitMember->pos == -1)
2467 bitMember->pos = _class->memberOffset;
2468 if(!bitMember->size)
2469 bitMember->size = dataMember->dataType->size * 8;
2470 _class->memberOffset = bitMember->pos + bitMember->size;
2471 for(d = 0; d < bitMember->size; d++)
2477 bitMember->mask = mask << bitMember->pos;
2479 else if(dataMember->type == 0 && dataMember->dataType)
2484 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)))
2485 ComputeTypeSize(dataMember->dataType);
2486 if(dataMember->dataType->bitFieldCount)
2488 bitFields += dataMember->dataType->bitFieldCount;
2495 int size = (bitFields + 7) / 8;
2499 int __simpleStruct0;
2503 int __simpleStruct0;
2505 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2506 if(member->memberOffset % alignment)
2507 member->memberOffset += alignment - (member->memberOffset % alignment);
2509 dataMember->offset = member->memberOffset;
2510 if(member->type == 1)
2511 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2514 member->memberOffset += size;
2521 int __simpleStruct0;
2523 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2524 if(_class->memberOffset % alignment)
2525 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2527 dataMember->offset = _class->memberOffset;
2528 _class->memberOffset += size;
2532 size = dataMember->dataType->size;
2533 alignment = dataMember->dataType->alignment;
2537 int __simpleStruct0;
2541 int __simpleStruct0;
2543 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2544 if(member->memberOffset % alignment)
2545 member->memberOffset += alignment - (member->memberOffset % alignment);
2547 dataMember->offset = member->memberOffset;
2548 if(member->type == 1)
2549 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2552 member->memberOffset += size;
2559 int __simpleStruct0;
2561 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2562 if(_class->memberOffset % alignment)
2563 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2565 dataMember->offset = _class->memberOffset;
2566 _class->memberOffset += size;
2573 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
2574 alignment = dataMember->structAlignment;
2577 int __simpleStruct0;
2581 int __simpleStruct0;
2583 if(member->memberOffset % alignment)
2584 member->memberOffset += alignment - (member->memberOffset % alignment);
2585 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2587 dataMember->offset = member->memberOffset;
2588 if(member->type == 1)
2589 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2591 member->memberOffset += dataMember->memberOffset;
2597 int __simpleStruct0;
2599 if(_class->memberOffset % alignment)
2600 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2601 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2603 dataMember->offset = _class->memberOffset;
2604 _class->memberOffset += dataMember->memberOffset;
2612 int size = (bitFields + 7) / 8;
2616 int __simpleStruct0;
2620 int __simpleStruct0;
2622 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2623 if(member->memberOffset % alignment)
2624 member->memberOffset += alignment - (member->memberOffset % alignment);
2626 if(member->type == 1)
2627 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2630 member->memberOffset += size;
2637 int __simpleStruct0;
2639 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2640 if(_class->memberOffset % alignment)
2641 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2643 _class->memberOffset += size;
2648 if(member && member->type == 1)
2650 member->memberOffset = unionMemberOffset;
2654 if(_class->type != 2)
2658 if(_class->structAlignment)
2660 if(_class->memberOffset % _class->structAlignment)
2661 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
2663 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
2666 struct __ecereNameSpace__ecere__com__Property * prop;
2668 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
2670 if(prop->isProperty && prop->isWatchable)
2672 prop->watcherOffset = _class->structSize;
2673 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2678 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
2680 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
2682 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
2684 if(deriv->computeSize)
2686 deriv->offset = _class->structSize;
2687 deriv->memberOffset = 0;
2688 deriv->structSize = deriv->offset;
2689 ComputeClassMembers(deriv, 0);
2697 FinishTemplatesContext(context);
2700 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
2702 struct __ecereNameSpace__ecere__com__NameSpace
2705 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
2706 struct __ecereNameSpace__ecere__com__NameSpace * left;
2707 struct __ecereNameSpace__ecere__com__NameSpace * right;
2709 struct __ecereNameSpace__ecere__com__NameSpace * parent;
2710 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
2711 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
2712 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
2713 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
2714 } __attribute__ ((gcc_struct));
2716 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2718 struct __ecereNameSpace__ecere__com__Module
2720 struct __ecereNameSpace__ecere__com__Instance * application;
2721 struct __ecereNameSpace__ecere__sys__OldList classes;
2722 struct __ecereNameSpace__ecere__sys__OldList defines;
2723 struct __ecereNameSpace__ecere__sys__OldList functions;
2724 struct __ecereNameSpace__ecere__sys__OldList modules;
2725 struct __ecereNameSpace__ecere__com__Instance * prev;
2726 struct __ecereNameSpace__ecere__com__Instance * next;
2732 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
2733 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
2734 } __attribute__ ((gcc_struct));
2736 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
2738 struct __ecereNameSpace__ecere__com__Class * _class;
2739 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
2741 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
2742 ComputeModuleClasses(subModule->data);
2743 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes.first; _class; _class = _class->next)
2744 ComputeClassMembers(_class, 0);
2747 extern unsigned int inCompiler;
2749 extern void Compiler_Error(const char * format, ...);
2751 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
2753 int ComputeTypeSize(struct Type * type)
2755 unsigned int size = type ? type->size : 0;
2757 if(!size && type && !type->computing)
2759 type->computing = 1;
2763 type->alignment = size = sizeof(char);
2766 type->alignment = size = sizeof(char);
2769 type->alignment = size = sizeof(int);
2772 type->alignment = size = sizeof(long long);
2775 type->alignment = size = targetBits / 8;
2778 type->alignment = size = targetBits / 8;
2781 type->alignment = size = sizeof(long);
2784 type->alignment = size = sizeof(short);
2787 type->alignment = size = sizeof(float);
2790 type->alignment = size = sizeof(double);
2794 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
2796 if(_class && _class->type == 1)
2798 ComputeClassMembers(_class, 0);
2799 type->alignment = _class->structAlignment;
2800 size = _class->structSize;
2801 if(type->alignment && size % type->alignment)
2802 size += type->alignment - (size % type->alignment);
2804 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
2806 if(!_class->dataType)
2807 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
2808 size = type->alignment = ComputeTypeSize(_class->dataType);
2811 size = type->alignment = targetBits / 8;
2816 size = type->alignment = targetBits / 8;
2819 if(type->__anon1.__anon4.arraySizeExp)
2821 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
2822 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
2823 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)))
2825 struct Location oldLoc = yylloc;
2826 char expression[10240];
2828 expression[0] = '\0';
2829 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
2830 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
2832 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
2833 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
2836 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
2838 else if(type->__anon1.__anon4.enumClass)
2840 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
2842 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
2845 type->__anon1.__anon4.arraySize = 0;
2849 type->__anon1.__anon4.arraySize = 0;
2851 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
2852 if(type->__anon1.type)
2853 type->alignment = type->__anon1.type->alignment;
2857 struct Type * member;
2859 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2861 int __simpleStruct0, __simpleStruct1;
2862 unsigned int addSize = ComputeTypeSize(member);
2864 member->offset = size;
2865 if(member->alignment && size % member->alignment)
2866 member->offset += member->alignment - (size % member->alignment);
2867 size = member->offset;
2868 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2871 if(type->alignment && size % type->alignment)
2872 size += type->alignment - (size % type->alignment);
2877 struct Type * member;
2879 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2881 int __simpleStruct0, __simpleStruct1;
2882 unsigned int addSize = ComputeTypeSize(member);
2884 member->offset = size;
2885 if(member->alignment && size % member->alignment)
2886 member->offset += member->alignment - (size % member->alignment);
2887 size = member->offset;
2888 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2889 size = ((size > addSize) ? size : addSize);
2891 if(type->alignment && size % type->alignment)
2892 size += type->alignment - (size % type->alignment);
2897 struct TemplateParameter * param = type->__anon1.templateParameter;
2898 struct Type * baseType = ProcessTemplateParameterType(param);
2902 size = ComputeTypeSize(baseType);
2903 type->alignment = baseType->alignment;
2906 type->alignment = size = sizeof(uint64);
2911 type->alignment = size = sizeof(enum
2919 type->alignment = size = targetBits / 8;
2924 type->computing = 0;
2929 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
2931 extern struct Identifier * MkIdentifier(const char * string);
2933 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
2935 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
2937 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
2939 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
2941 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class);
2943 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams);
2945 extern void FreeType(struct Type * type);
2947 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
2949 extern struct Specifier * MkSpecifier(int specifier);
2951 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
2953 extern struct Expression * MkExpConstant(const char * string);
2955 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)
2957 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2958 unsigned int totalSize = 0;
2959 unsigned int maxSize = 0;
2962 struct __ecereNameSpace__ecere__com__DataMember * member;
2964 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2968 if(!isMember && _class->base)
2970 maxSize = _class->structSize;
2972 if(_class->type == 1 || _class->type == 5)
2973 AddMembers(declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
2976 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
2978 if(maxSize > baseSize)
2979 maxSize -= baseSize;
2985 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
2987 if(!member->isProperty)
2989 switch(member->type)
2993 if(member->dataTypeString)
2995 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
2996 struct Declarator * decl;
2998 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
2999 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
3000 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
3001 if(!member->dataType)
3002 member->dataType = ProcessType(specs, decl);
3003 ReplaceThisClassSpecifiers(specs, topClass);
3005 struct Type * type = ProcessType(specs, decl);
3007 DeclareType(member->dataType, 0, 0);
3010 ComputeTypeSize(member->dataType);
3011 size = member->dataType->size;
3012 alignment = member->dataType->alignment;
3015 if(totalSize % alignment)
3016 totalSize += alignment - (totalSize % alignment);
3025 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
3028 sprintf(id, "__anon%d", anonID++);
3030 AddMembers(list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
3031 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
3032 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
3033 alignment = member->structAlignment;
3036 if(totalSize % alignment)
3037 totalSize += alignment - (totalSize % alignment);
3047 unsigned int __simpleStruct0;
3049 if(topMember && topMember->type == 1)
3050 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
3052 *retSize += totalSize;
3054 else if(totalSize < maxSize && _class->type != 1000)
3056 int autoPadding = 0;
3058 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
3059 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
3060 if(totalSize + autoPadding < maxSize)
3062 char sizeString[50];
3064 sprintf(sizeString, "%d", maxSize - totalSize);
3065 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
3071 FinishTemplatesContext(context);
3072 return topMember ? topMember->memberID : _class->memberID;
3075 static int DeclareMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
3077 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
3078 struct __ecereNameSpace__ecere__com__DataMember * member;
3079 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
3081 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
3082 DeclareMembers(_class->base, 0);
3083 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
3085 if(!member->isProperty)
3087 switch(member->type)
3091 if(!member->dataType && member->dataTypeString)
3092 member->dataType = ProcessTypeString(member->dataTypeString, 0);
3093 if(member->dataType)
3094 DeclareType(member->dataType, 0, 0);
3100 DeclareMembers((struct __ecereNameSpace__ecere__com__Class *)member, 1);
3107 FinishTemplatesContext(context);
3108 return topMember ? topMember->memberID : _class->memberID;
3111 extern struct Identifier * GetDeclId(struct Declarator * decl);
3113 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
3115 struct ClassDef * def;
3118 for(def = (*definitions).first; def; def = def->next)
3122 struct Declaration * decl = def->__anon1.decl;
3124 if(decl && decl->__anon1.__anon1.specifiers)
3126 struct Specifier * spec;
3127 unsigned int isStruct = 0;
3129 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3131 if(spec->type == 3 || spec->type == 4)
3133 if(spec->__anon1.__anon2.definitions)
3134 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3140 struct Declarator * d = (((void *)0));
3142 if(decl->__anon1.__anon1.declarators)
3144 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
3146 struct Identifier * idDecl = GetDeclId(d);
3156 sprintf(id, "__anon%d", anonID++);
3157 if(!decl->__anon1.__anon1.declarators)
3158 decl->__anon1.__anon1.declarators = MkList();
3159 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
3167 extern struct Symbol * FindClass(const char * name);
3169 extern char * strchr(const char * , int);
3171 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
3173 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
3175 extern void FreeClassDef(struct ClassDef * def);
3177 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
3179 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
3181 extern void DeclareClass(struct Symbol * classSym, const char * className);
3183 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move(struct __ecereNameSpace__ecere__sys__OldList * this, void * item, void * prevItem);
3185 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
3187 void DeclareStruct(const char * name, unsigned int skipNoHead)
3189 struct External * external = (((void *)0));
3190 struct Symbol * classSym = FindClass(name);
3192 if(!inCompiler || !classSym)
3194 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
3196 if(classSym->__anon1.registered && classSym->imported && !classSym->declaredStructSym)
3198 struct Declaration * decl;
3199 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3200 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
3201 char structName[1024];
3202 struct Specifier * spec = (((void *)0));
3204 external = (classSym->__anon1.registered && classSym->__anon1.registered->type == 1) ? classSym->__anon2.__anon1.pointerExternal : classSym->__anon2.__anon1.structExternal;
3205 classSym->declaring++;
3206 if(strchr(classSym->string, '<'))
3208 if(classSym->__anon1.registered->templateClass)
3210 DeclareStruct(classSym->__anon1.registered->templateClass->fullName, skipNoHead);
3211 classSym->declaring--;
3215 DeclareMembers(classSym->__anon1.registered, 0);
3216 structName[0] = (char)0;
3217 FullClassNameCat(structName, name, 0);
3218 if(external && external->__anon1.declaration && external->__anon1.declaration->__anon1.__anon1.specifiers)
3220 for(spec = (*external->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3222 if(spec->type == 3 || spec->type == 4)
3226 if(!skipNoHead && (!spec || !spec->__anon1.__anon2.definitions))
3228 unsigned int addedPadding = 0;
3230 classSym->declaredStructSym = 1;
3231 declarations = MkList();
3232 AddMembers(declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
3233 if(!(*declarations).count || ((*declarations).count == 1 && addedPadding))
3235 FreeList(declarations, FreeClassDef);
3236 declarations = (((void *)0));
3239 if(skipNoHead || declarations)
3244 spec->__anon1.__anon2.definitions = declarations;
3245 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3247 if(classSym->__anon2.__anon1.structExternal)
3248 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3249 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3250 classSym->id = curExternal->symbol->idCode;
3251 classSym->idCode = curExternal->symbol->idCode;
3257 external = MkExternalDeclaration((((void *)0)));
3258 specifiers = MkList();
3259 declarators = MkList();
3260 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
3261 external->__anon1.declaration = decl = MkDeclaration(specifiers, declarators);
3262 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
3263 decl->symbol->__anon2.__anon1.pointerExternal = external;
3264 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3266 char className[1024];
3268 strcpy(className, "__ecereClass_");
3269 FullClassNameCat(className, classSym->string, 1);
3270 DeclareClass(classSym, className);
3271 external->symbol = classSym;
3272 classSym->__anon2.__anon1.pointerExternal = external;
3273 classSym->id = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3274 classSym->idCode = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3278 char className[1024];
3280 strcpy(className, "__ecereClass_");
3281 FullClassNameCat(className, classSym->string, 1);
3282 classSym->__anon2.__anon1.structExternal = external;
3283 DeclareClass(classSym, className);
3284 external->symbol = classSym;
3286 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
3289 classSym->declaring--;
3293 if(classSym->__anon2.__anon1.structExternal && classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
3295 struct Specifier * spec;
3297 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3299 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3302 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3304 classSym->declaring++;
3306 if(classSym->__anon1.registered)
3307 DeclareMembers(classSym->__anon1.registered, 0);
3309 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 1 || classSym->__anon1.registered->type == 5))
3311 if(classSym->__anon2.__anon1.structExternal)
3312 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3313 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3314 classSym->id = curExternal->symbol->idCode;
3315 classSym->idCode = curExternal->symbol->idCode;
3317 classSym->declaring--;
3322 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
3324 extern struct ModuleImport * mainModule;
3326 extern struct Specifier * MkSpecifierName(const char * name);
3328 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
3330 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
3332 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
3334 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
3336 extern void FreeDeclarator(struct Declarator * decl);
3338 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
3340 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
3342 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
3344 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
3346 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
3348 struct PropertyImport
3350 struct PropertyImport * prev;
3351 struct PropertyImport * next;
3353 unsigned int isVirtual;
3354 unsigned int hasSet;
3355 unsigned int hasGet;
3356 } __attribute__ ((gcc_struct));
3358 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
3360 void DeclareProperty(struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
3362 struct Symbol * symbol = prop->symbol;
3364 strcpy(setName, "__ecereProp_");
3365 FullClassNameCat(setName, prop->_class->fullName, 0);
3366 strcat(setName, "_Set_");
3367 FullClassNameCat(setName, prop->name, 1);
3368 strcpy(getName, "__ecereProp_");
3369 FullClassNameCat(getName, prop->_class->fullName, 0);
3370 strcat(getName, "_Get_");
3371 FullClassNameCat(getName, prop->name, 1);
3372 if(prop->_class->type == 1)
3373 DeclareStruct(prop->_class->fullName, 0);
3374 if(!symbol || curExternal->symbol->idCode < symbol->id)
3376 unsigned int imported = 0;
3377 unsigned int dllImport = 0;
3379 if(!symbol || symbol->_import)
3383 struct Symbol * classSym;
3385 if(!prop->_class->symbol)
3386 prop->_class->symbol = FindClass(prop->_class->fullName);
3387 classSym = prop->_class->symbol;
3388 if(classSym && !classSym->_import)
3390 struct ModuleImport * module;
3392 if(prop->_class->module)
3393 module = FindModule(prop->_class->module);
3395 module = mainModule;
3396 classSym->_import = __extension__ ({
3397 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
3399 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
3401 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
3403 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
3404 symbol->_import = (struct ClassImport *)__extension__ ({
3405 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
3407 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
3410 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
3413 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)
3418 struct Context * context = SetupTemplatesContext(prop->_class);
3420 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
3421 FinishTemplatesContext(context);
3425 if(!symbol->__anon2.__anon2.externalGet || symbol->__anon2.__anon2.externalGet->type == 0)
3427 struct Declaration * decl;
3428 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3429 struct Declarator * d;
3430 struct __ecereNameSpace__ecere__sys__OldList * params;
3431 struct Specifier * spec;
3432 struct External * external;
3433 struct Declarator * typeDecl;
3434 unsigned int simple = 0;
3436 specifiers = MkList();
3437 declarators = MkList();
3439 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3440 d = MkDeclaratorIdentifier(MkIdentifier(getName));
3442 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3444 struct Context * context = SetupTemplatesContext(prop->_class);
3446 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
3447 FinishTemplatesContext(context);
3449 for(spec = (*specifiers).first; spec; spec = spec->next)
3453 if((!typeDecl || typeDecl->type == 1))
3455 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3457 symbol->_class = classSym->__anon1.registered;
3458 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3460 DeclareStruct(spec->__anon1.__anon1.name, 0);
3467 d = PlugDeclarator(typeDecl, d);
3470 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
3471 specifiers = MkList();
3473 d = MkDeclaratorFunction(d, params);
3475 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3476 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3477 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3479 ListAdd(specifiers, MkSpecifier(VOID));
3480 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3481 decl = MkDeclaration(specifiers, declarators);
3482 external = MkExternalDeclaration(decl);
3483 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3484 external->symbol = symbol;
3485 symbol->__anon2.__anon2.externalGet = external;
3486 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3488 FreeDeclarator(typeDecl);
3492 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalGet, curExternal->prev);
3497 if(!symbol->__anon2.__anon2.externalSet || symbol->__anon2.__anon2.externalSet->type == 0)
3499 struct Declaration * decl;
3500 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3501 struct Declarator * d;
3502 struct __ecereNameSpace__ecere__sys__OldList * params;
3503 struct Specifier * spec;
3504 struct External * external;
3505 struct Declarator * typeDecl;
3507 declarators = MkList();
3509 if(!prop->conversion || prop->_class->type == 1)
3511 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3513 specifiers = MkList();
3515 struct Context * context = SetupTemplatesContext(prop->_class);
3517 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
3518 FinishTemplatesContext(context);
3520 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
3521 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
3522 ListAdd(params, MkTypeName(specifiers, d));
3523 d = MkDeclaratorIdentifier(MkIdentifier(setName));
3525 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3526 d = MkDeclaratorFunction(d, params);
3527 for(spec = (*specifiers).first; spec; spec = spec->next)
3531 if((!typeDecl || typeDecl->type == 1))
3533 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3535 symbol->_class = classSym->__anon1.registered;
3536 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3537 DeclareStruct(spec->__anon1.__anon1.name, 0);
3541 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3542 specifiers = MkList();
3544 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3545 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3546 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3547 if(!prop->conversion || prop->_class->type == 1)
3548 ListAdd(specifiers, MkSpecifier(VOID));
3550 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
3551 decl = MkDeclaration(specifiers, declarators);
3552 external = MkExternalDeclaration(decl);
3553 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3554 external->symbol = symbol;
3555 symbol->__anon2.__anon2.externalSet = external;
3556 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3560 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalSet, curExternal->prev);
3563 if(!symbol->__anon2.__anon2.externalPtr)
3565 struct Declaration * decl;
3566 struct External * external;
3567 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
3568 char propName[1024];
3571 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3574 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3575 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
3577 ListAdd(specifiers, MkSpecifierName("Property"));
3578 strcpy(propName, "__ecereProp_");
3579 FullClassNameCat(propName, prop->_class->fullName, 0);
3580 strcat(propName, "_");
3581 FullClassNameCat(propName, prop->name, 1);
3583 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
3585 ListAdd(list, MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(propName))), (((void *)0))));
3588 strcpy(propName, "__ecerePropM_");
3589 FullClassNameCat(propName, prop->_class->fullName, 0);
3590 strcat(propName, "_");
3591 FullClassNameCat(propName, prop->name, 1);
3592 ListAdd(list, MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(propName))), (((void *)0))));
3594 decl = MkDeclaration(specifiers, list);
3596 external = MkExternalDeclaration(decl);
3597 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3598 external->symbol = symbol;
3599 symbol->__anon2.__anon2.externalPtr = external;
3603 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalPtr, curExternal->prev);
3605 symbol->id = curExternal->symbol->idCode;
3609 struct Type * Dereference(struct Type * source)
3611 struct Type * type = (((void *)0));
3615 if(source->kind == 13 || source->kind == 12)
3617 type = source->__anon1.type;
3618 source->__anon1.type->refCount++;
3620 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
3622 type = __extension__ ({
3623 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
3625 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
3628 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
3634 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
3639 static struct Type * Reference(struct Type * source)
3641 struct Type * type = (((void *)0));
3645 type = __extension__ ({
3646 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
3648 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
3655 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);
3657 extern void * memcpy(void * , const void * , size_t size);
3659 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method);
3661 extern void FreeExpression(struct Expression * exp);
3663 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
3665 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);
3667 static void ProcessInitializer(struct Initializer * init, struct Type * type);
3669 extern struct Type * MkClassType(const char * name);
3671 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);
3673 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)
3675 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
3676 unsigned int found = 0;
3677 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
3678 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
3679 unsigned int freeType = 0;
3681 yylloc = member->loc;
3686 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
3690 dataMember = *curMember;
3696 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
3697 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
3698 int _subMemberStackPos = 0;
3701 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
3704 dataMember = thisMember;
3705 if(curMember && thisMember->memberAccess == 1)
3707 *curMember = thisMember;
3708 *curClass = thisMember->_class;
3709 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
3710 *subMemberStackPos = _subMemberStackPos;
3716 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
3717 if(method && method->type == 1)
3720 method = (((void *)0));
3725 struct Type * type = (((void *)0));
3729 if(!dataMember->dataType && dataMember->dataTypeString)
3731 struct Context * context = SetupTemplatesContext(_class);
3733 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
3734 FinishTemplatesContext(context);
3736 type = dataMember->dataType;
3740 if(!method->dataType)
3741 ProcessMethodType(method);
3742 type = method->dataType;
3744 if(ident && ident->next)
3746 for(ident = ident->next; ident && type; ident = ident->next)
3750 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
3752 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
3754 type = dataMember->dataType;
3756 else if(type->kind == 9 || type->kind == 10)
3758 struct Type * memberType;
3760 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
3762 if(!strcmp(memberType->name, ident->string))
3771 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
3774 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
3775 struct __ecereNameSpace__ecere__com__Class * sClass;
3777 for(sClass = _class; sClass; sClass = sClass->base)
3780 if(sClass->templateClass)
3781 sClass = sClass->templateClass;
3782 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
3784 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
3786 for(sClass = sClass->base; sClass; sClass = sClass->base)
3788 if(sClass->templateClass)
3789 sClass = sClass->templateClass;
3790 id += sClass->templateParams.count;
3801 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
3803 if(arg.__anon1.__anon1.dataTypeString)
3805 unsigned int constant = type->constant;
3807 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
3808 if(type->kind == 8 && constant)
3810 else if(type->kind == 13)
3812 struct Type * t = type->__anon1.type;
3814 while(t->kind == 13)
3815 t = t->__anon1.type;
3817 t->constant = constant;
3820 if(type && _class->templateClass)
3821 type->passAsTemplate = 1;
3828 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
3830 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
3831 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
3834 char templateString[1024];
3835 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
3837 sprintf(templateString, "%s<", expClass->templateClass->fullName);
3838 for(cClass = expClass; cClass; cClass = cClass->base)
3842 if(cClass->templateClass)
3843 cClass = cClass->templateClass;
3844 for(param = cClass->templateParams.first; param; param = param->next)
3847 struct __ecereNameSpace__ecere__com__Class * sClass;
3848 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
3850 for(sClass = cClass->base; sClass; sClass = sClass->base)
3852 if(sClass->templateClass)
3853 sClass = sClass->templateClass;
3854 id += sClass->templateParams.count;
3856 arg = expClass->templateArgs[id];
3857 for(sClass = _class; sClass; sClass = sClass->base)
3859 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
3861 struct __ecereNameSpace__ecere__com__Class * nextClass;
3863 if(sClass->templateClass)
3864 sClass = sClass->templateClass;
3865 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
3867 if(nextClass->templateClass)
3868 nextClass = nextClass->templateClass;
3869 p += nextClass->templateParams.count;
3871 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
3873 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
3875 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3877 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
3878 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
3892 char expString[1024];
3893 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
3894 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
3895 struct Expression * exp;
3896 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
3898 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
3899 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3900 ProcessExpressionType(exp);
3901 ComputeExpression(exp);
3902 expString[0] = '\0';
3903 PrintExpression(exp, expString);
3904 strcat(argument, expString);
3905 FreeExpression(exp);
3910 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
3915 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3916 strcat(argument, arg.__anon1.__anon1.dataTypeString);
3923 strcat(templateString, ", ");
3924 if(lastParam != p - 1)
3926 strcat(templateString, param->name);
3927 strcat(templateString, " = ");
3929 strcat(templateString, argument);
3938 int len = strlen(templateString);
3940 if(templateString[len - 1] == '<')
3944 if(templateString[len - 1] == '>')
3945 templateString[len++] = ' ';
3946 templateString[len++] = '>';
3948 templateString[len++] = '\0';
3951 struct Context * context = SetupTemplatesContext(_class);
3955 type = ProcessTypeString(templateString, 0);
3957 FinishTemplatesContext(context);
3960 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
3962 ProcessExpressionType(member->initializer->__anon1.exp);
3963 if(!member->initializer->__anon1.exp->expType)
3967 char expString[10240];
3969 expString[0] = '\0';
3970 PrintExpression(member->initializer->__anon1.exp, expString);
3971 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
3972 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
3975 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
3977 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
3980 else if(member->initializer)
3982 ProcessInitializer(member->initializer, type);
3989 if(_class && _class->type == 3)
3991 if(member->initializer)
3993 struct Type * type = MkClassType(_class->fullName);
3995 ProcessInitializer(member->initializer, type);
4001 if(member->initializer)
4003 ProcessInitializer(member->initializer, (((void *)0)));
4009 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
4013 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
4015 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
4019 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
4024 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);
4026 extern void FreeSpecifier(struct Specifier * spec);
4028 static void ProcessFunction(struct FunctionDefinition * function);
4030 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
4032 extern struct Specifier * CopySpecifier(struct Specifier * spec);
4034 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
4036 extern void FreeClassFunction(struct ClassFunction * func);
4038 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
4040 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
4042 void ProcessInstantiationType(struct Instantiation * inst)
4047 struct MembersInit * members;
4048 struct Symbol * classSym;
4049 struct __ecereNameSpace__ecere__com__Class * _class;
4051 classSym = inst->_class->__anon1.__anon1.symbol;
4052 _class = classSym ? classSym->__anon1.registered : (((void *)0));
4053 if(!_class || _class->type != 5)
4054 DeclareStruct(inst->_class->__anon1.__anon1.name, 0);
4055 afterExternal = afterExternal ? afterExternal : curExternal;
4057 ProcessExpressionType(inst->exp);
4058 inst->isConstant = 1;
4061 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
4062 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
4063 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
4064 int subMemberStackPos = 0;
4066 for(members = (*inst->members).first; members; members = members->next)
4068 switch(members->type)
4073 static unsigned int instMethodID = 0;
4074 struct External * external = curExternal;
4075 struct Context * context = curContext;
4076 struct Declarator * declarator = members->__anon1.function->declarator;
4077 struct Identifier * nameID = GetDeclId(declarator);
4078 char * unmangled = nameID ? nameID->string : (((void *)0));
4079 struct Expression * exp;
4080 struct External * createdExternal = (((void *)0));
4086 strcpy(name, "__ecereInstMeth_");
4087 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
4089 strcat(name, nameID->string);
4091 sprintf(number, "_%08d", instMethodID++);
4092 strcat(name, number);
4093 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
4097 struct Symbol * symbol = declarator->symbol;
4098 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
4100 if(method && method->type == 1)
4102 symbol->__anon1.method = method;
4103 ProcessMethodType(method);
4104 if(!symbol->type->__anon1.__anon2.thisClass)
4106 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
4108 if(!currentClass->symbol)
4109 currentClass->symbol = FindClass(currentClass->fullName);
4110 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
4115 _class->symbol = FindClass(_class->fullName);
4116 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
4119 DeclareType(symbol->type, 1, 1);
4123 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
4126 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
4129 FreeSpecifier(nameID->_class);
4130 nameID->_class = (((void *)0));
4134 struct External * oldExternal = curExternal;
4136 declarator->symbol->id = declarator->symbol->idCode = curExternal->symbol->idCode;
4138 struct External * externalDecl;
4140 externalDecl = MkExternalDeclaration((((void *)0)));
4141 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), oldExternal->prev, externalDecl);
4142 if(createdExternal->__anon1.function)
4144 ProcessFunction(createdExternal->__anon1.function);
4146 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(declarator), (((void *)0)))));
4148 externalDecl->__anon1.declaration = decl;
4149 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
4150 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4151 declarator->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4158 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
4159 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
4161 curExternal = external;
4162 curContext = context;
4165 FreeClassFunction(members->__anon1.function);
4166 exp = QMkExpId(name);
4168 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
4169 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
4175 if(members->__anon1.dataMembers && classSym)
4177 struct MemberInit * member;
4178 struct Location oldyyloc = yylloc;
4180 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
4182 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
4183 if(member->initializer && !member->initializer->isConstant)
4184 inst->isConstant = 0;
4196 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams)
4200 if(type->kind == 11)
4202 struct Type * param;
4206 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
4207 DeclareType(param, declarePointers, 1);
4209 DeclareType(type->__anon1.__anon2.returnType, declarePointers, 1);
4211 else if(type->kind == 13 && declarePointers)
4212 DeclareType(type->__anon1.type, declarePointers, 0);
4213 else if(type->kind == 8)
4215 if(type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 1 || type->__anon1._class->__anon1.registered->type == 5) && !type->__anon1._class->declaring)
4216 DeclareStruct(type->__anon1._class->__anon1.registered->fullName, type->__anon1._class->__anon1.registered->type == 5);
4218 else if(type->kind == 9 || type->kind == 10)
4220 struct Type * member;
4222 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
4223 DeclareType(member, 0, 0);
4225 else if(type->kind == 12)
4226 DeclareType(type->__anon1.__anon4.arrayType, declarePointers, 0);
4230 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
4232 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
4234 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
4236 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
4237 struct __ecereNameSpace__ecere__com__Class * sClass;
4239 for(sClass = _class; sClass; sClass = sClass->base)
4242 if(sClass->templateClass)
4243 sClass = sClass->templateClass;
4244 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
4246 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
4248 for(sClass = sClass->base; sClass; sClass = sClass->base)
4250 if(sClass->templateClass)
4251 sClass = sClass->templateClass;
4252 id += sClass->templateParams.count;
4263 arg = &_class->templateArgs[id];
4264 if(arg && param->type == 0)
4265 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
4270 extern struct Context * PushContext(void);
4272 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
4274 struct TemplatedType
4277 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4278 struct __ecereNameSpace__ecere__sys__BTNode * left;
4279 struct __ecereNameSpace__ecere__sys__BTNode * right;
4281 struct TemplateParameter * param;
4282 } __attribute__ ((gcc_struct));
4284 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
4286 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
4288 struct Context * context = PushContext();
4290 context->templateTypesOnly = 1;
4291 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
4293 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
4295 for(; param; param = param->next)
4297 if(param->type == 0 && param->identifier)
4299 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
4301 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4307 struct __ecereNameSpace__ecere__com__Class * sClass;
4309 for(sClass = _class; sClass; sClass = sClass->base)
4311 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
4313 for(p = sClass->templateParams.first; p; p = p->next)
4317 struct TemplateParameter * param = p->param;
4318 struct TemplatedType * type;
4322 p->param = param = __extension__ ({
4323 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
4325 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
4328 type = __extension__ ({
4329 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
4331 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
4333 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4341 extern void PopContext(struct Context * ctx);
4343 extern void FreeContext(struct Context * context);
4345 void FinishTemplatesContext(struct Context * context)
4347 PopContext(context);
4348 FreeContext(context);
4349 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
4352 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
4354 if(!method->dataType)
4356 struct Context * context = SetupTemplatesContext(method->_class);
4358 method->dataType = ProcessTypeString(method->dataTypeString, 0);
4359 FinishTemplatesContext(context);
4360 if(method->type != 1 && method->dataType)
4362 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
4364 if(!method->_class->symbol)
4365 method->_class->symbol = FindClass(method->_class->fullName);
4366 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
4372 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
4376 struct Context * context = SetupTemplatesContext(prop->_class);
4378 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
4379 FinishTemplatesContext(context);
4383 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
4385 extern void FreeTypeName(struct TypeName * typeName);
4387 static void ProcessDeclarator(struct Declarator * decl);
4389 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
4391 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
4395 struct MethodImport * prev;
4396 struct MethodImport * next;
4398 unsigned int isVirtual;
4399 } __attribute__ ((gcc_struct));
4401 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
4403 void DeclareMethod(struct __ecereNameSpace__ecere__com__Method * method, const char * name)
4405 struct Symbol * symbol = method->symbol;
4407 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && method->type == 1) || symbol->id > (curExternal ? curExternal->symbol->idCode : -1))
4409 unsigned int dllImport = 0;
4411 if(!method->dataType)
4412 method->dataType = ProcessTypeString(method->dataTypeString, 0);
4413 if(!symbol || symbol->_import || method->type == 1)
4415 if(!symbol || method->type == 1)
4417 struct Symbol * classSym;
4419 if(!method->_class->symbol)
4420 method->_class->symbol = FindClass(method->_class->fullName);
4421 classSym = method->_class->symbol;
4422 if(!classSym->_import)
4424 struct ModuleImport * module;
4426 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + structSize_Instance)))->name)
4427 module = FindModule(method->_class->module);
4429 module = mainModule;
4430 classSym->_import = __extension__ ({
4431 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
4433 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
4435 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
4439 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4441 if(!symbol->_import)
4443 symbol->_import = (struct ClassImport *)__extension__ ({
4444 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
4446 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
4448 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
4452 symbol->type = method->dataType;
4454 symbol->type->refCount++;
4457 if(!method->dataType->dllExport)
4459 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)
4463 if(method->type != 1 && method->dataType)
4464 DeclareType(method->dataType, 1, 1);
4465 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4467 struct Declaration * decl;
4468 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4469 struct Declarator * d;
4470 struct Declarator * funcDecl;
4471 struct External * external;
4473 specifiers = MkList();
4474 declarators = MkList();
4476 ListAdd(specifiers, MkSpecifier(EXTERN));
4477 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
4478 ListAdd(specifiers, MkSpecifier(STATIC));
4479 if(method->type == 1)
4481 ListAdd(specifiers, MkSpecifier(INT));
4482 d = MkDeclaratorIdentifier(MkIdentifier(name));
4486 d = MkDeclaratorIdentifier(MkIdentifier(name));
4488 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4490 struct Context * context = SetupTemplatesContext(method->_class);
4492 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
4493 FinishTemplatesContext(context);
4495 funcDecl = GetFuncDecl(d);
4498 struct Specifier * spec, * next;
4500 for(spec = (*specifiers).first; spec; spec = next)
4505 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4506 FreeSpecifier(spec);
4510 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
4512 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
4514 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
4515 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")));
4516 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
4517 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
4519 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
4521 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
4523 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
4524 FreeTypeName(param);
4526 if(!funcDecl->__anon1.function.parameters)
4527 funcDecl->__anon1.function.parameters = MkList();
4528 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
4532 ProcessDeclarator(d);
4533 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4534 decl = MkDeclaration(specifiers, declarators);
4535 ReplaceThisClassSpecifiers(specifiers, method->_class);
4536 if(symbol->__anon2.__anon1.pointerExternal)
4538 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4541 *functionSymbol = *symbol;
4542 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4543 if(functionSymbol->type)
4544 functionSymbol->type->refCount++;
4546 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4547 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4549 external = MkExternalDeclaration(decl);
4551 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
4552 external->symbol = symbol;
4553 symbol->__anon2.__anon1.pointerExternal = external;
4557 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4559 symbol->id = curExternal ? curExternal->symbol->idCode : (((int)0x7fffffff));
4563 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
4565 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4567 unsigned int first = 1;
4569 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4571 char className[1024];
4573 strcpy(className, _class->fullName);
4574 for(param = _class->templateParams.first; param; param = param->next)
4578 strcat(className, "<");
4580 strcat(className, ", ");
4581 if(lastParam + 1 != p)
4583 strcat(className, param->name);
4584 strcat(className, " = ");
4586 strcat(className, param->name);
4594 int len = strlen(className);
4596 if(className[len - 1] == '>')
4597 className[len++] = ' ';
4598 className[len++] = '>';
4599 className[len++] = '\0';
4601 return __ecereNameSpace__ecere__sys__CopyString(className);
4604 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
4607 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
4611 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4613 unsigned int first = 1;
4615 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4617 char className[1024];
4619 strcpy(className, _class->fullName);
4620 for(param = _class->templateParams.first; param; param = param->next)
4624 strcat(className, "<");
4626 strcat(className, ", ");
4627 if(lastParam + 1 != p)
4629 strcat(className, param->name);
4630 strcat(className, " = ");
4632 strcat(className, param->name);
4640 int len = strlen(className);
4642 if(className[len - 1] == '>')
4643 className[len++] = ' ';
4644 className[len++] = '>';
4645 className[len++] = '\0';
4647 type = MkClassType(className);
4651 type = MkClassType(_class->fullName);
4656 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
4658 if(specs != (((void *)0)) && _class)
4660 struct Specifier * spec;
4662 for(spec = specs->first; spec; spec = spec->next)
4664 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
4667 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
4668 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
4674 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
4676 struct __ecereNameSpace__ecere__com__GlobalFunction
4678 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
4679 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
4682 struct __ecereNameSpace__ecere__com__Instance * module;
4683 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
4684 const char * dataTypeString;
4685 struct Type * dataType;
4687 } __attribute__ ((gcc_struct));
4689 extern struct Context * globalContext;
4691 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
4693 struct FunctionImport
4695 struct FunctionImport * prev;
4696 struct FunctionImport * next;
4698 } __attribute__ ((gcc_struct));
4700 unsigned int DeclareFunction(struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
4702 struct Symbol * symbol = function->symbol;
4704 if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
4706 unsigned int imported = 0;
4707 unsigned int dllImport = 0;
4709 if(!function->dataType)
4711 function->dataType = ProcessTypeString(function->dataTypeString, 0);
4712 if(!function->dataType->__anon1.__anon2.thisClass)
4713 function->dataType->__anon1.__anon2.staticMethod = 1;
4719 struct ModuleImport * module = FindModule(function->module);
4721 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4724 if(!function->dataType->dllExport)
4726 symbol->_import = (struct ClassImport *)__extension__ ({
4727 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
4729 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
4731 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
4735 symbol->type = ProcessTypeString(function->dataTypeString, 0);
4736 if(!symbol->type->__anon1.__anon2.thisClass)
4737 symbol->type->__anon1.__anon2.staticMethod = 1;
4740 imported = symbol->_import ? 1 : 0;
4741 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1)
4744 DeclareType(function->dataType, 1, 1);
4747 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4749 struct Declaration * decl;
4750 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4751 struct Declarator * d;
4752 struct Declarator * funcDecl;
4753 struct External * external;
4755 specifiers = MkList();
4756 declarators = MkList();
4757 ListAdd(specifiers, MkSpecifier(EXTERN));
4758 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
4760 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4761 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
4762 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType == 1)
4764 struct Specifier * spec;
4766 for(spec = (*specifiers).first; spec; spec = spec->next)
4767 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
4769 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4770 FreeSpecifier(spec);
4774 funcDecl = GetFuncDecl(d);
4775 if(funcDecl && !funcDecl->__anon1.function.parameters)
4777 funcDecl->__anon1.function.parameters = MkList();
4778 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
4780 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4782 struct Context * oldCtx = curContext;
4784 curContext = globalContext;
4785 decl = MkDeclaration(specifiers, declarators);
4786 curContext = oldCtx;
4788 if(symbol->__anon2.__anon1.pointerExternal)
4790 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4793 *functionSymbol = *symbol;
4794 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4795 if(functionSymbol->type)
4796 functionSymbol->type->refCount++;
4798 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4799 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4801 external = MkExternalDeclaration(decl);
4803 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
4804 external->symbol = symbol;
4805 symbol->__anon2.__anon1.pointerExternal = external;
4809 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4812 symbol->id = curExternal->symbol->idCode;
4815 return (symbol && symbol->_import && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1) ? 1 : 0;
4818 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_GlobalData;
4823 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4824 struct __ecereNameSpace__ecere__sys__BTNode * left;
4825 struct __ecereNameSpace__ecere__sys__BTNode * right;
4827 struct __ecereNameSpace__ecere__com__Instance * module;
4828 char * dataTypeString;
4829 struct Type * dataType;
4832 } __attribute__ ((gcc_struct));
4834 void DeclareGlobalData(struct GlobalData * data)
4836 struct Symbol * symbol = data->symbol;
4838 if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
4843 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4846 data->dataType = ProcessTypeString(data->dataTypeString, 0);
4847 DeclareType(data->dataType, 1, 1);
4850 if(!symbol->__anon2.__anon1.pointerExternal)
4852 struct Declaration * decl;
4853 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4854 struct Declarator * d;
4855 struct External * external;
4857 specifiers = MkList();
4858 declarators = MkList();
4859 ListAdd(specifiers, MkSpecifier(EXTERN));
4860 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
4861 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
4862 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4863 decl = MkDeclaration(specifiers, declarators);
4864 external = MkExternalDeclaration(decl);
4866 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
4867 external->symbol = symbol;
4868 symbol->__anon2.__anon1.pointerExternal = external;
4872 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4875 symbol->id = curExternal->symbol->idCode;
4882 struct Conversion * prev, * next;
4883 struct __ecereNameSpace__ecere__com__Property * convert;
4885 struct Type * resultType;
4886 } __attribute__ ((gcc_struct));
4888 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
4890 extern void Compiler_Warning(const char * format, ...);
4892 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
4894 unsigned int status = 1;
4896 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))
4898 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
4899 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
4901 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
4903 struct Type * sourceType = source, * destType = dest;
4905 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
4906 sourceType = sourceType->__anon1.type;
4907 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
4908 destType = destType->__anon1.type;
4909 if(!destType->constant && sourceType->constant)
4913 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
4920 extern void CopyTypeInto(struct Type * type, struct Type * src);
4922 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
4924 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)
4929 CheckConstCompatibility(source, dest, 1);
4930 if(source->kind == 20 && dest->kind != 20)
4932 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
4937 if(dest->kind == 20 && source->kind != 20)
4939 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
4944 if(dest->classObjectType == 2 && dest->kind != 11)
4946 if(source->classObjectType != 3)
4950 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
4958 if(source->kind != 11 && source->classObjectType == 3)
4960 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
4963 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
4965 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))
4968 if(dest->kind == 14 && source->kind != 0)
4970 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))
4972 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))
4974 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
4976 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
4978 if(conversions != (((void *)0)))
4980 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
4985 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
4987 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
4989 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
4991 if(sourceBase == destBase)
4995 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))
4999 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))
5001 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
5008 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
5012 if(source->kind == 8)
5014 struct __ecereNameSpace__ecere__com__Class * _class;
5016 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5018 struct __ecereNameSpace__ecere__com__Property * convert;
5020 for(convert = _class->conversions.first; convert; convert = convert->next)
5022 if(convert->memberAccess == 1 || _class->module == privateModule)
5024 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5026 if(!convert->dataType)
5027 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
5028 if((!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), (convert->dataType->kind == 8 && !strcmp(convert->dataTypeString, "String")) ? 1 : 0, convert->dataType->kind == 8, 0, 1, warnConst))
5030 if(!conversions && !convert->Get)
5032 else if(conversions != (((void *)0)))
5034 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))
5038 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
5040 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5051 struct __ecereNameSpace__ecere__com__Class * _class;
5053 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5055 struct __ecereNameSpace__ecere__com__Property * convert;
5057 for(convert = _class->conversions.first; convert; convert = convert->next)
5059 if(convert->memberAccess == 1 || _class->module == privateModule)
5061 struct Type * constType = (((void *)0));
5062 unsigned int success = 0;
5064 if(!convert->dataType)
5065 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
5066 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
5068 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5070 constType = __extension__ ({
5071 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5073 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
5075 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
5076 ptrType->constant = 1;
5078 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
5080 if(!conversions && !convert->Set)
5082 else if(conversions != (((void *)0)))
5084 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))
5088 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
5090 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
5096 FreeType(constType);
5102 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5104 if(!dest->__anon1._class->__anon1.registered->dataType)
5105 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
5106 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
5108 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, dest->__anon1._class->__anon1.registered->dataType->kind == 8, 0, 0, warnConst))
5115 if(source->kind == 8)
5117 struct __ecereNameSpace__ecere__com__Class * _class;
5119 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5121 struct __ecereNameSpace__ecere__com__Property * convert;
5123 for(convert = _class->conversions.first; convert; convert = convert->next)
5125 if(convert->memberAccess == 1 || _class->module == privateModule)
5127 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5129 if(!convert->dataType)
5130 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
5131 if(convert->dataType != source && (!isConversionExploration || convert->dataType->kind == 8 || !strcmp(_class->name, "String")) && MatchTypes(convert->dataType, dest, conversions, (((void *)0)), (((void *)0)), convert->dataType->kind == 8, convert->dataType->kind == 8, 0, 1, warnConst))
5133 if(!conversions && !convert->Get)
5135 else if(conversions != (((void *)0)))
5137 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))
5141 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
5143 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5151 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
5153 if(!source->__anon1._class->__anon1.registered->dataType)
5154 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
5155 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
5157 if(MatchTypes(source->__anon1._class->__anon1.registered->dataType, dest, conversions, (((void *)0)), (((void *)0)), source->__anon1._class->__anon1.registered->dataType->kind == 8, source->__anon1._class->__anon1.registered->dataType->kind == 8, 0, 0, warnConst))
5159 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
5165 if(source->kind == 8 || source->kind == 19)
5167 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
5169 else if(dest->kind == 7 && source->kind == 6)
5171 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
5173 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
5175 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
5177 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
5179 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
5181 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))
5183 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))
5185 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)))
5187 struct Type * paramSource, * paramDest;
5189 if(dest->kind == 16)
5190 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
5191 if(source->kind == 16)
5192 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
5193 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
5194 dest = dest->__anon1.type;
5195 if(source->kind == 13 && source->__anon1.type->kind == 11)
5196 source = source->__anon1.type;
5197 if(dest->kind == 16)
5198 dest = dest->__anon1.__anon3.method->dataType;
5199 if(source->kind == 16)
5200 source = source->__anon1.__anon3.method->dataType;
5201 paramSource = source->__anon1.__anon2.params.first;
5202 if(paramSource && paramSource->kind == 0)
5203 paramSource = (((void *)0));
5204 paramDest = dest->__anon1.__anon2.params.first;
5205 if(paramDest && paramDest->kind == 0)
5206 paramDest = (((void *)0));
5207 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5209 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))))
5211 if(paramDest && paramDest->kind == 8)
5212 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
5214 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
5217 paramDest = paramDest->next;
5219 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
5221 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5223 if(dest->__anon1.__anon2.thisClass)
5225 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
5227 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5233 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
5236 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
5238 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
5242 paramSource = paramSource->next;
5246 if(dest->__anon1.__anon2.thisClass)
5248 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
5250 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5256 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
5258 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
5264 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5266 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
5270 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
5271 for(; paramDest; paramDest = paramDest->next)
5275 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
5279 struct Type * paramDestType = paramDest;
5280 struct Type * paramSourceType = paramSource;
5281 struct Type * type = paramDestType;
5283 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
5286 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
5287 struct __ecereNameSpace__ecere__com__Class * sClass;
5289 for(sClass = owningClassSource; sClass; sClass = sClass->base)
5292 if(sClass->templateClass)
5293 sClass = sClass->templateClass;
5294 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
5296 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
5298 for(sClass = sClass->base; sClass; sClass = sClass->base)
5300 if(sClass->templateClass)
5301 sClass = sClass->templateClass;
5302 id += sClass->templateParams.count;
5313 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
5315 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
5318 if(!MatchTypes(paramDestType, paramSourceType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst) && (!acceptReversedParams || !MatchTypes(paramSourceType, paramDestType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst)))
5323 PrintType(paramDest, type, 0, 1);
5324 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
5325 if(paramDestType != paramDest)
5326 FreeType(paramDestType);
5329 if(paramDestType != paramDest)
5330 FreeType(paramDestType);
5332 paramSource = paramSource->next;
5336 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
5341 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
5345 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
5347 if(MatchTypes(source->__anon1.type, dest->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5354 static void FreeConvert(struct Conversion * convert)
5356 if(convert->resultType)
5357 FreeType(convert->resultType);
5360 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BTNamedLink;
5362 struct __ecereNameSpace__ecere__com__BTNamedLink
5365 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
5366 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
5367 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
5370 } __attribute__ ((gcc_struct));
5372 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__EnumClassData;
5374 struct __ecereNameSpace__ecere__com__EnumClassData
5376 struct __ecereNameSpace__ecere__sys__OldList values;
5378 } __attribute__ ((gcc_struct));
5380 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
5382 struct __ecereNameSpace__ecere__sys__NamedLink64
5384 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
5385 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
5388 } __attribute__ ((gcc_struct));
5390 extern void FreeExpContents(struct Expression * exp);
5392 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
5394 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
5396 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
5398 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
5400 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
5402 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5404 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
5406 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)))
5408 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
5410 if(_class->type == 4)
5412 struct __ecereNameSpace__ecere__sys__OldList converts =
5416 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5420 _class->symbol = FindClass(_class->fullName);
5421 type->__anon1._class = _class->symbol;
5422 if(MatchTypes(type, dest, &converts, (((void *)0)), (((void *)0)), 1, 0, 0, 0, 0))
5424 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
5425 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5429 struct __ecereNameSpace__ecere__com__Class * baseClass;
5431 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
5433 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
5435 for(value = e->values.first; value; value = value->next)
5437 if(!strcmp(value->name, string))
5442 FreeExpContents(sourceExp);
5443 FreeType(sourceExp->expType);
5444 sourceExp->isConstant = 1;
5445 sourceExp->expType = MkClassType(baseClass->fullName);
5449 sourceExp->type = 2;
5450 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
5451 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
5453 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
5454 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5456 while(converts.first)
5458 struct Conversion * convert = converts.first;
5460 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
5461 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
5463 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5470 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
5471 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5474 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)))
5475 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
5480 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SubModule;
5482 struct __ecereNameSpace__ecere__com__SubModule
5484 struct __ecereNameSpace__ecere__com__SubModule * prev;
5485 struct __ecereNameSpace__ecere__com__SubModule * next;
5486 struct __ecereNameSpace__ecere__com__Instance * module;
5488 } __attribute__ ((gcc_struct));
5490 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
5492 struct __ecereNameSpace__ecere__com__SubModule * subModule;
5494 if(searchFor == searchIn)
5496 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
5498 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->application)
5500 if(ModuleVisibility(subModule->module, searchFor))
5507 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
5509 struct __ecereNameSpace__ecere__com__Application
5512 const char * * argv;
5514 unsigned int isGUIApp;
5515 struct __ecereNameSpace__ecere__sys__OldList allModules;
5516 char * parsedCommand;
5517 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
5518 } __attribute__ ((gcc_struct));
5520 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5522 struct __ecereNameSpace__ecere__com__Instance * module;
5524 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))
5526 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))
5528 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))
5530 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)
5532 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
5538 extern struct Expression * CopyExpression(struct Expression * exp);
5540 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
5542 void ReadString(char * output, char * string);
5544 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
5546 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
5548 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
5550 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
5552 struct Type * source;
5553 struct Type * realDest = dest;
5554 struct Type * backupSourceExpType = (((void *)0));
5555 struct Expression * computedExp = sourceExp;
5558 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)
5560 computedExp = CopyExpression(sourceExp);
5561 ComputeExpression(computedExp);
5563 source = sourceExp->expType;
5564 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
5566 if(computedExp != sourceExp)
5568 FreeExpression(computedExp);
5569 computedExp = sourceExp;
5574 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
5576 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
5578 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
5580 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
5582 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
5584 if(sourceBase == destBase)
5586 if(computedExp != sourceExp)
5588 FreeExpression(computedExp);
5589 computedExp = sourceExp;
5598 struct __ecereNameSpace__ecere__sys__OldList * specs;
5599 unsigned int flag = 0;
5600 long long value = (((int)0x7fffffff));
5603 if(computedExp->type == 2)
5605 if(source->isSigned)
5606 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5608 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5610 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
5612 if(source->isSigned)
5613 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5615 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5617 if(computedExp != sourceExp)
5619 FreeExpression(computedExp);
5620 computedExp = sourceExp;
5622 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"))
5625 source = __extension__ ({
5626 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5628 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
5633 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5635 if(_class && _class->type == 3)
5637 if(source->kind != 8)
5639 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5640 struct Type * tempDest, * tempSource;
5642 for(; _class->base->type != 1000; _class = _class->base)
5645 tempDest = tempType;
5648 _class->symbol = FindClass(_class->fullName);
5649 tempType->__anon1._class = _class->symbol;
5650 tempType->truth = dest->truth;
5651 if(tempType->__anon1._class)
5652 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
5653 backupSourceExpType = sourceExp->expType;
5654 sourceExp->expType = dest;
5657 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5660 if(_class && _class->type == 2 && source->kind != 8)
5662 if(!dest->__anon1._class->__anon1.registered->dataType)
5663 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
5664 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5667 FreeType(sourceExp->expType);
5668 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
5672 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
5674 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
5675 struct Declarator * decl;
5678 ReadString(string, sourceExp->__anon1.__anon2.string);
5679 decl = SpecDeclFromString(string, specs, (((void *)0)));
5680 FreeExpContents(sourceExp);
5681 FreeType(sourceExp->expType);
5682 sourceExp->type = 24;
5683 sourceExp->__anon1._classExp.specifiers = specs;
5684 sourceExp->__anon1._classExp.decl = decl;
5685 sourceExp->expType = dest;
5689 if(backupSourceExpType)
5690 FreeType(backupSourceExpType);
5694 else if(source->kind == 8)
5696 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
5698 if(_class && (_class->type == 3 || _class->type == 2))
5702 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5703 struct Type * tempDest, * tempSource;
5705 if(!source->__anon1._class->__anon1.registered->dataType)
5706 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
5707 for(; _class->base->type != 1000; _class = _class->base)
5710 tempSource = tempType;
5712 tempType->__anon1._class = FindClass(_class->fullName);
5713 tempType->truth = source->truth;
5714 tempType->classObjectType = source->classObjectType;
5715 if(tempType->__anon1._class)
5716 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
5717 if(conversions->last)
5719 ((struct Conversion *)conversions->last)->resultType = dest;
5722 FreeType(sourceExp->expType);
5723 sourceExp->expType = MkClassType(_class->fullName);
5724 sourceExp->expType->truth = source->truth;
5725 sourceExp->expType->classObjectType = source->classObjectType;
5726 if(!sourceExp->destType)
5728 FreeType(sourceExp->destType);
5729 sourceExp->destType = sourceExp->expType;
5730 if(sourceExp->expType)
5731 sourceExp->expType->refCount++;
5733 if(!_class->dataType)
5734 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
5736 dest = MkClassType(source->__anon1._class->string);
5737 dest->truth = source->truth;
5738 dest->classObjectType = source->classObjectType;
5740 source = _class->dataType;
5742 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5748 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5757 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5758 unsigned int fittingValue = 0;
5760 if(_class && _class->type == 4)
5762 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5763 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5765 if(c && value >= 0 && value <= c->largest)
5768 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
5770 if(_class->type == 0 || _class->type == 5)
5772 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5774 *newExp = *sourceExp;
5775 if(sourceExp->destType)
5776 sourceExp->destType->refCount++;
5777 if(sourceExp->expType)
5778 sourceExp->expType->refCount++;
5779 sourceExp->type = 11;
5780 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
5781 sourceExp->__anon1.cast.exp = newExp;
5782 FreeType(sourceExp->expType);
5783 sourceExp->expType = (((void *)0));
5784 ProcessExpressionType(sourceExp);
5787 FreeType(sourceExp->expType);
5788 sourceExp->expType = dest;
5793 if(backupSourceExpType)
5794 FreeType(backupSourceExpType);
5797 if(!_class->dataType)
5798 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
5800 dest = _class->dataType;
5803 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))
5805 specs = MkListOne(MkSpecifier(DOUBLE));
5807 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))
5809 specs = MkListOne(MkSpecifier(FLOAT));
5811 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))
5815 ListAdd(specs, MkSpecifier(UNSIGNED));
5816 ListAdd(specs, MkSpecifier(INT64));
5818 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
5822 ListAdd(specs, MkSpecifier(UNSIGNED));
5823 ListAdd(specs, MkSpecifier(INT));
5825 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5829 ListAdd(specs, MkSpecifier(UNSIGNED));
5830 ListAdd(specs, MkSpecifier(SHORT));
5832 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5836 ListAdd(specs, MkSpecifier(UNSIGNED));
5837 ListAdd(specs, MkSpecifier(CHAR));
5843 if(backupSourceExpType)
5845 if(sourceExp->expType)
5846 FreeType(sourceExp->expType);
5847 sourceExp->expType = backupSourceExpType;
5852 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))
5854 specs = MkListOne(MkSpecifier(DOUBLE));
5856 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))
5858 specs = MkListOne(MkSpecifier(FLOAT));
5860 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
5863 ListAdd(specs, MkSpecifier(BOOL));
5865 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)))
5869 ListAdd(specs, MkSpecifier(UNSIGNED));
5870 ListAdd(specs, MkSpecifier(CHAR));
5872 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)))))
5876 ListAdd(specs, MkSpecifier(UNSIGNED));
5877 ListAdd(specs, MkSpecifier(SHORT));
5879 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
5883 ListAdd(specs, MkSpecifier(UNSIGNED));
5884 ListAdd(specs, MkSpecifier(INT));
5886 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
5890 ListAdd(specs, MkSpecifier(UNSIGNED));
5891 ListAdd(specs, MkSpecifier(INT64));
5893 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5895 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
5901 if(backupSourceExpType)
5903 if(sourceExp->expType)
5904 FreeType(sourceExp->expType);
5905 sourceExp->expType = backupSourceExpType;
5909 if(!flag && !sourceExp->opDestType)
5911 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5913 *newExp = *sourceExp;
5914 newExp->prev = (((void *)0));
5915 newExp->next = (((void *)0));
5916 if(sourceExp->destType)
5917 sourceExp->destType->refCount++;
5918 if(sourceExp->expType)
5919 sourceExp->expType->refCount++;
5920 sourceExp->type = 11;
5921 if(realDest->kind == 8)
5923 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
5924 FreeList(specs, FreeSpecifier);
5927 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
5928 if(newExp->type == 4)
5930 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
5933 sourceExp->__anon1.cast.exp = newExp;
5934 FreeType(sourceExp->expType);
5935 sourceExp->expType = (((void *)0));
5936 ProcessExpressionType(sourceExp);
5939 FreeList(specs, FreeSpecifier);
5942 if(backupSourceExpType)
5943 FreeType(backupSourceExpType);
5948 if(computedExp != sourceExp)
5950 FreeExpression(computedExp);
5951 computedExp = sourceExp;
5953 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
5954 sourceExp = (*sourceExp->__anon1.list).last;
5955 if(sourceExp->type == 0)
5957 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
5961 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5963 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
5964 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5968 for(; _class && _class->type == 4; _class = _class->base)
5970 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
5971 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5973 for(value = e->values.first; value; value = value->next)
5975 if(!strcmp(value->name, id->string))
5980 FreeExpContents(sourceExp);
5981 FreeType(sourceExp->expType);
5982 sourceExp->isConstant = 1;
5983 sourceExp->expType = MkClassType(_class->fullName);
5985 sourceExp->type = 2;
5986 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
5987 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
5989 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
5998 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
6009 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6011 int value2 = op2->__anon1.i;
6014 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
6017 exp->expType = op1->type;
6019 op1->type->refCount++;
6024 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6026 unsigned int value2 = op2->__anon1.ui;
6029 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
6032 exp->expType = op1->type;
6034 op1->type->refCount++;
6039 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6041 long long value2 = op2->__anon1.i64;
6044 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
6047 exp->expType = op1->type;
6049 op1->type->refCount++;
6054 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6056 uint64 value2 = op2->__anon1.ui64;
6059 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
6062 exp->expType = op1->type;
6064 op1->type->refCount++;
6069 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6071 short value2 = op2->__anon1.s;
6074 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
6077 exp->expType = op1->type;
6079 op1->type->refCount++;
6084 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6086 unsigned short value2 = op2->__anon1.us;
6089 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
6092 exp->expType = op1->type;
6094 op1->type->refCount++;
6099 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6101 char value2 = op2->__anon1.c;
6104 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
6107 exp->expType = op1->type;
6109 op1->type->refCount++;
6114 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6116 unsigned char value2 = op2->__anon1.uc;
6119 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
6122 exp->expType = op1->type;
6124 op1->type->refCount++;
6129 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6131 float value2 = op2->__anon1.f;
6134 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
6137 exp->expType = op1->type;
6139 op1->type->refCount++;
6144 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6146 double value2 = op2->__anon1.d;
6149 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
6152 exp->expType = op1->type;
6154 op1->type->refCount++;
6159 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6161 int value2 = op2->__anon1.i;
6164 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
6167 exp->expType = op1->type;
6169 op1->type->refCount++;
6174 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6176 unsigned int value2 = op2->__anon1.ui;
6179 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
6182 exp->expType = op1->type;
6184 op1->type->refCount++;
6189 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6191 long long value2 = op2->__anon1.i64;
6194 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
6197 exp->expType = op1->type;
6199 op1->type->refCount++;
6204 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6206 uint64 value2 = op2->__anon1.ui64;
6209 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
6212 exp->expType = op1->type;
6214 op1->type->refCount++;
6219 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6221 short value2 = op2->__anon1.s;
6224 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
6227 exp->expType = op1->type;
6229 op1->type->refCount++;
6234 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6236 unsigned short value2 = op2->__anon1.us;
6239 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
6242 exp->expType = op1->type;
6244 op1->type->refCount++;
6249 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6251 char value2 = op2->__anon1.c;
6254 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
6257 exp->expType = op1->type;
6259 op1->type->refCount++;
6264 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6266 unsigned char value2 = op2->__anon1.uc;
6269 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
6272 exp->expType = op1->type;
6274 op1->type->refCount++;
6279 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6281 float value2 = op2->__anon1.f;
6284 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
6287 exp->expType = op1->type;
6289 op1->type->refCount++;
6294 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6296 double value2 = op2->__anon1.d;
6299 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
6302 exp->expType = op1->type;
6304 op1->type->refCount++;
6309 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6311 int value2 = op2->__anon1.i;
6314 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
6317 exp->expType = op1->type;
6319 op1->type->refCount++;
6324 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6326 unsigned int value2 = op2->__anon1.ui;
6329 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
6332 exp->expType = op1->type;
6334 op1->type->refCount++;
6339 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6341 long long value2 = op2->__anon1.i64;
6344 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
6347 exp->expType = op1->type;
6349 op1->type->refCount++;
6354 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6356 uint64 value2 = op2->__anon1.ui64;
6359 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
6362 exp->expType = op1->type;
6364 op1->type->refCount++;
6369 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6371 short value2 = op2->__anon1.s;
6374 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
6377 exp->expType = op1->type;
6379 op1->type->refCount++;
6384 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6386 unsigned short value2 = op2->__anon1.us;
6389 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
6392 exp->expType = op1->type;
6394 op1->type->refCount++;
6399 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6401 char value2 = op2->__anon1.c;
6404 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
6407 exp->expType = op1->type;
6409 op1->type->refCount++;
6414 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6416 unsigned char value2 = op2->__anon1.uc;
6419 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
6422 exp->expType = op1->type;
6424 op1->type->refCount++;
6429 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6431 float value2 = op2->__anon1.f;
6434 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
6437 exp->expType = op1->type;
6439 op1->type->refCount++;
6444 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6446 double value2 = op2->__anon1.d;
6449 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
6452 exp->expType = op1->type;
6454 op1->type->refCount++;
6459 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6461 int value2 = op2->__anon1.i;
6464 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
6467 exp->expType = op1->type;
6469 op1->type->refCount++;
6474 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6476 unsigned int value2 = op2->__anon1.ui;
6479 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
6482 exp->expType = op1->type;
6484 op1->type->refCount++;
6489 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6491 long long value2 = op2->__anon1.i64;
6494 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
6497 exp->expType = op1->type;
6499 op1->type->refCount++;
6504 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6506 uint64 value2 = op2->__anon1.ui64;
6509 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
6512 exp->expType = op1->type;
6514 op1->type->refCount++;
6519 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6521 short value2 = op2->__anon1.s;
6524 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
6527 exp->expType = op1->type;
6529 op1->type->refCount++;
6534 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6536 unsigned short value2 = op2->__anon1.us;
6539 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
6542 exp->expType = op1->type;
6544 op1->type->refCount++;
6549 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6551 char value2 = op2->__anon1.c;
6554 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
6557 exp->expType = op1->type;
6559 op1->type->refCount++;
6564 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6566 unsigned char value2 = op2->__anon1.uc;
6569 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
6572 exp->expType = op1->type;
6574 op1->type->refCount++;
6579 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6581 float value2 = op2->__anon1.f;
6584 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
6587 exp->expType = op1->type;
6589 op1->type->refCount++;
6594 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6596 double value2 = op2->__anon1.d;
6599 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
6602 exp->expType = op1->type;
6604 op1->type->refCount++;
6609 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6611 int value2 = op2->__anon1.i;
6614 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
6617 exp->expType = op1->type;
6619 op1->type->refCount++;
6624 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6626 unsigned int value2 = op2->__anon1.ui;
6629 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
6632 exp->expType = op1->type;
6634 op1->type->refCount++;
6639 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6641 long long value2 = op2->__anon1.i64;
6644 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
6647 exp->expType = op1->type;
6649 op1->type->refCount++;
6654 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6656 uint64 value2 = op2->__anon1.ui64;
6659 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
6662 exp->expType = op1->type;
6664 op1->type->refCount++;
6669 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6671 short value2 = op2->__anon1.s;
6674 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
6677 exp->expType = op1->type;
6679 op1->type->refCount++;
6684 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6686 unsigned short value2 = op2->__anon1.us;
6689 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
6692 exp->expType = op1->type;
6694 op1->type->refCount++;
6699 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6701 char value2 = op2->__anon1.c;
6704 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
6707 exp->expType = op1->type;
6709 op1->type->refCount++;
6714 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6716 unsigned char value2 = op2->__anon1.uc;
6719 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
6722 exp->expType = op1->type;
6724 op1->type->refCount++;
6729 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
6732 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
6735 exp->expType = op1->type;
6737 op1->type->refCount++;
6742 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
6745 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
6748 exp->expType = op1->type;
6750 op1->type->refCount++;
6755 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
6758 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
6761 exp->expType = op1->type;
6763 op1->type->refCount++;
6768 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
6771 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
6774 exp->expType = op1->type;
6776 op1->type->refCount++;
6781 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
6784 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
6787 exp->expType = op1->type;
6789 op1->type->refCount++;
6794 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
6797 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
6800 exp->expType = op1->type;
6802 op1->type->refCount++;
6807 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
6810 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
6813 exp->expType = op1->type;
6815 op1->type->refCount++;
6820 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
6823 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
6826 exp->expType = op1->type;
6828 op1->type->refCount++;
6833 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
6836 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
6839 exp->expType = op1->type;
6841 op1->type->refCount++;
6846 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
6849 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
6852 exp->expType = op1->type;
6854 op1->type->refCount++;
6859 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
6862 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
6865 exp->expType = op1->type;
6867 op1->type->refCount++;
6872 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
6875 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
6878 exp->expType = op1->type;
6880 op1->type->refCount++;
6885 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
6888 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
6891 exp->expType = op1->type;
6893 op1->type->refCount++;
6898 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
6901 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
6904 exp->expType = op1->type;
6906 op1->type->refCount++;
6911 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
6914 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
6917 exp->expType = op1->type;
6919 op1->type->refCount++;
6924 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
6927 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
6930 exp->expType = op1->type;
6932 op1->type->refCount++;
6937 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
6940 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
6943 exp->expType = op1->type;
6945 op1->type->refCount++;
6950 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
6953 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
6956 exp->expType = op1->type;
6958 op1->type->refCount++;
6963 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
6966 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
6969 exp->expType = op1->type;
6971 op1->type->refCount++;
6976 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
6979 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
6982 exp->expType = op1->type;
6984 op1->type->refCount++;
6989 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
6992 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
6995 exp->expType = op1->type;
6997 op1->type->refCount++;
7002 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
7005 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
7008 exp->expType = op1->type;
7010 op1->type->refCount++;
7015 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
7018 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
7021 exp->expType = op1->type;
7023 op1->type->refCount++;
7028 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
7031 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
7034 exp->expType = op1->type;
7036 op1->type->refCount++;
7041 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
7044 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
7047 exp->expType = op1->type;
7049 op1->type->refCount++;
7054 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
7057 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
7060 exp->expType = op1->type;
7062 op1->type->refCount++;
7067 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
7070 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
7073 exp->expType = op1->type;
7075 op1->type->refCount++;
7080 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
7083 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
7086 exp->expType = op1->type;
7088 op1->type->refCount++;
7093 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
7096 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
7099 exp->expType = op1->type;
7101 op1->type->refCount++;
7106 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
7109 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
7112 exp->expType = op1->type;
7114 op1->type->refCount++;
7119 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7121 int value2 = op2->__anon1.i;
7124 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
7127 exp->expType = op1->type;
7129 op1->type->refCount++;
7134 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7136 unsigned int value2 = op2->__anon1.ui;
7139 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
7142 exp->expType = op1->type;
7144 op1->type->refCount++;
7149 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7151 long long value2 = op2->__anon1.i64;
7154 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
7157 exp->expType = op1->type;
7159 op1->type->refCount++;
7164 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7166 uint64 value2 = op2->__anon1.ui64;
7169 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
7172 exp->expType = op1->type;
7174 op1->type->refCount++;
7179 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7181 short value2 = op2->__anon1.s;
7184 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
7187 exp->expType = op1->type;
7189 op1->type->refCount++;
7194 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7196 unsigned short value2 = op2->__anon1.us;
7199 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
7202 exp->expType = op1->type;
7204 op1->type->refCount++;
7209 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7211 char value2 = op2->__anon1.c;
7214 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
7217 exp->expType = op1->type;
7219 op1->type->refCount++;
7224 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7226 unsigned char value2 = op2->__anon1.uc;
7229 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
7232 exp->expType = op1->type;
7234 op1->type->refCount++;
7239 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7241 float value2 = op2->__anon1.f;
7244 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
7247 exp->expType = op1->type;
7249 op1->type->refCount++;
7254 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7256 double value2 = op2->__anon1.d;
7259 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
7262 exp->expType = op1->type;
7264 op1->type->refCount++;
7269 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7271 int value2 = op2->__anon1.i;
7274 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
7277 exp->expType = op1->type;
7279 op1->type->refCount++;
7284 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7286 unsigned int value2 = op2->__anon1.ui;
7289 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
7292 exp->expType = op1->type;
7294 op1->type->refCount++;
7299 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7301 long long value2 = op2->__anon1.i64;
7304 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
7307 exp->expType = op1->type;
7309 op1->type->refCount++;
7314 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7316 uint64 value2 = op2->__anon1.ui64;
7319 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
7322 exp->expType = op1->type;
7324 op1->type->refCount++;
7329 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7331 short value2 = op2->__anon1.s;
7334 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
7337 exp->expType = op1->type;
7339 op1->type->refCount++;
7344 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7346 unsigned short value2 = op2->__anon1.us;
7349 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
7352 exp->expType = op1->type;
7354 op1->type->refCount++;
7359 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7361 char value2 = op2->__anon1.c;
7364 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
7367 exp->expType = op1->type;
7369 op1->type->refCount++;
7374 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7376 unsigned char value2 = op2->__anon1.uc;
7379 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
7382 exp->expType = op1->type;
7384 op1->type->refCount++;
7389 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7391 float value2 = op2->__anon1.f;
7394 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
7397 exp->expType = op1->type;
7399 op1->type->refCount++;
7404 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7406 double value2 = op2->__anon1.d;
7409 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
7412 exp->expType = op1->type;
7414 op1->type->refCount++;
7419 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7421 int value2 = op2->__anon1.i;
7424 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
7427 exp->expType = op1->type;
7429 op1->type->refCount++;
7434 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7436 unsigned int value2 = op2->__anon1.ui;
7439 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
7442 exp->expType = op1->type;
7444 op1->type->refCount++;
7449 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7451 long long value2 = op2->__anon1.i64;
7454 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
7457 exp->expType = op1->type;
7459 op1->type->refCount++;
7464 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7466 uint64 value2 = op2->__anon1.ui64;
7469 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
7472 exp->expType = op1->type;
7474 op1->type->refCount++;
7479 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7481 short value2 = op2->__anon1.s;
7484 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
7487 exp->expType = op1->type;
7489 op1->type->refCount++;
7494 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7496 unsigned short value2 = op2->__anon1.us;
7499 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
7502 exp->expType = op1->type;
7504 op1->type->refCount++;
7509 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7511 char value2 = op2->__anon1.c;
7514 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
7517 exp->expType = op1->type;
7519 op1->type->refCount++;
7524 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7526 unsigned char value2 = op2->__anon1.uc;
7529 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
7532 exp->expType = op1->type;
7534 op1->type->refCount++;
7539 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7541 float value2 = op2->__anon1.f;
7544 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
7547 exp->expType = op1->type;
7549 op1->type->refCount++;
7554 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7556 double value2 = op2->__anon1.d;
7559 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
7562 exp->expType = op1->type;
7564 op1->type->refCount++;
7569 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7571 int value2 = op2->__anon1.i;
7574 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
7577 exp->expType = op1->type;
7579 op1->type->refCount++;
7584 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7586 unsigned int value2 = op2->__anon1.ui;
7589 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
7592 exp->expType = op1->type;
7594 op1->type->refCount++;
7599 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7601 long long value2 = op2->__anon1.i64;
7604 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
7607 exp->expType = op1->type;
7609 op1->type->refCount++;
7614 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7616 uint64 value2 = op2->__anon1.ui64;
7619 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
7622 exp->expType = op1->type;
7624 op1->type->refCount++;
7629 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7631 short value2 = op2->__anon1.s;
7634 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
7637 exp->expType = op1->type;
7639 op1->type->refCount++;
7644 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7646 unsigned short value2 = op2->__anon1.us;
7649 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
7652 exp->expType = op1->type;
7654 op1->type->refCount++;
7659 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7661 char value2 = op2->__anon1.c;
7664 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
7667 exp->expType = op1->type;
7669 op1->type->refCount++;
7674 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7676 unsigned char value2 = op2->__anon1.uc;
7679 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
7682 exp->expType = op1->type;
7684 op1->type->refCount++;
7689 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7691 float value2 = op2->__anon1.f;
7694 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
7697 exp->expType = op1->type;
7699 op1->type->refCount++;
7704 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7706 double value2 = op2->__anon1.d;
7709 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
7712 exp->expType = op1->type;
7714 op1->type->refCount++;
7719 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7721 int value2 = op2->__anon1.i;
7724 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
7727 exp->expType = op1->type;
7729 op1->type->refCount++;
7734 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7736 unsigned int value2 = op2->__anon1.ui;
7739 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
7742 exp->expType = op1->type;
7744 op1->type->refCount++;
7749 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7751 long long value2 = op2->__anon1.i64;
7754 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
7757 exp->expType = op1->type;
7759 op1->type->refCount++;
7764 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7766 uint64 value2 = op2->__anon1.ui64;
7769 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
7772 exp->expType = op1->type;
7774 op1->type->refCount++;
7779 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7781 short value2 = op2->__anon1.s;
7784 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
7787 exp->expType = op1->type;
7789 op1->type->refCount++;
7794 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7796 unsigned short value2 = op2->__anon1.us;
7799 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
7802 exp->expType = op1->type;
7804 op1->type->refCount++;
7809 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7811 char value2 = op2->__anon1.c;
7814 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
7817 exp->expType = op1->type;
7819 op1->type->refCount++;
7824 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7826 unsigned char value2 = op2->__anon1.uc;
7829 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
7832 exp->expType = op1->type;
7834 op1->type->refCount++;
7839 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7841 float value2 = op2->__anon1.f;
7844 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
7847 exp->expType = op1->type;
7849 op1->type->refCount++;
7854 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7856 double value2 = op2->__anon1.d;
7859 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
7862 exp->expType = op1->type;
7864 op1->type->refCount++;
7869 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7871 int value2 = op2->__anon1.i;
7874 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
7877 exp->expType = op1->type;
7879 op1->type->refCount++;
7884 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7886 unsigned int value2 = op2->__anon1.ui;
7889 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
7892 exp->expType = op1->type;
7894 op1->type->refCount++;
7899 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7901 long long value2 = op2->__anon1.i64;
7904 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
7907 exp->expType = op1->type;
7909 op1->type->refCount++;
7914 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7916 uint64 value2 = op2->__anon1.ui64;
7919 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
7922 exp->expType = op1->type;
7924 op1->type->refCount++;
7929 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7931 short value2 = op2->__anon1.s;
7934 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
7937 exp->expType = op1->type;
7939 op1->type->refCount++;
7944 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7946 unsigned short value2 = op2->__anon1.us;
7949 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
7952 exp->expType = op1->type;
7954 op1->type->refCount++;
7959 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7961 char value2 = op2->__anon1.c;
7964 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
7967 exp->expType = op1->type;
7969 op1->type->refCount++;
7974 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7976 unsigned char value2 = op2->__anon1.uc;
7979 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
7982 exp->expType = op1->type;
7984 op1->type->refCount++;
7989 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7991 int value2 = op2->__anon1.i;
7994 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
7997 exp->expType = op1->type;
7999 op1->type->refCount++;
8004 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8006 unsigned int value2 = op2->__anon1.ui;
8009 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
8012 exp->expType = op1->type;
8014 op1->type->refCount++;
8019 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8021 long long value2 = op2->__anon1.i64;
8024 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
8027 exp->expType = op1->type;
8029 op1->type->refCount++;
8034 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8036 uint64 value2 = op2->__anon1.ui64;
8039 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
8042 exp->expType = op1->type;
8044 op1->type->refCount++;
8049 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8051 short value2 = op2->__anon1.s;
8054 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
8057 exp->expType = op1->type;
8059 op1->type->refCount++;
8064 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8066 unsigned short value2 = op2->__anon1.us;
8069 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
8072 exp->expType = op1->type;
8074 op1->type->refCount++;
8079 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8081 char value2 = op2->__anon1.c;
8084 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
8087 exp->expType = op1->type;
8089 op1->type->refCount++;
8094 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8096 unsigned char value2 = op2->__anon1.uc;
8099 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
8102 exp->expType = op1->type;
8104 op1->type->refCount++;
8109 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8111 int value2 = op2->__anon1.i;
8114 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
8117 exp->expType = op1->type;
8119 op1->type->refCount++;
8124 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8126 unsigned int value2 = op2->__anon1.ui;
8129 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
8132 exp->expType = op1->type;
8134 op1->type->refCount++;
8139 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8141 long long value2 = op2->__anon1.i64;
8144 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
8147 exp->expType = op1->type;
8149 op1->type->refCount++;
8154 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8156 uint64 value2 = op2->__anon1.ui64;
8159 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
8162 exp->expType = op1->type;
8164 op1->type->refCount++;
8169 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8171 short value2 = op2->__anon1.s;
8174 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
8177 exp->expType = op1->type;
8179 op1->type->refCount++;
8184 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8186 unsigned short value2 = op2->__anon1.us;
8189 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
8192 exp->expType = op1->type;
8194 op1->type->refCount++;
8199 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8201 char value2 = op2->__anon1.c;
8204 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
8207 exp->expType = op1->type;
8209 op1->type->refCount++;
8214 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8216 unsigned char value2 = op2->__anon1.uc;
8219 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
8222 exp->expType = op1->type;
8224 op1->type->refCount++;
8229 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8231 int value2 = op2->__anon1.i;
8234 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
8237 exp->expType = op1->type;
8239 op1->type->refCount++;
8244 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8246 unsigned int value2 = op2->__anon1.ui;
8249 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
8252 exp->expType = op1->type;
8254 op1->type->refCount++;
8259 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8261 long long value2 = op2->__anon1.i64;
8264 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
8267 exp->expType = op1->type;
8269 op1->type->refCount++;
8274 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8276 uint64 value2 = op2->__anon1.ui64;
8279 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
8282 exp->expType = op1->type;
8284 op1->type->refCount++;
8289 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8291 short value2 = op2->__anon1.s;
8294 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
8297 exp->expType = op1->type;
8299 op1->type->refCount++;
8304 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8306 unsigned short value2 = op2->__anon1.us;
8309 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
8312 exp->expType = op1->type;
8314 op1->type->refCount++;
8319 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8321 char value2 = op2->__anon1.c;
8324 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
8327 exp->expType = op1->type;
8329 op1->type->refCount++;
8334 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8336 unsigned char value2 = op2->__anon1.uc;
8339 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
8342 exp->expType = op1->type;
8344 op1->type->refCount++;
8349 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8351 int value2 = op2->__anon1.i;
8354 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
8357 exp->expType = op1->type;
8359 op1->type->refCount++;
8364 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8366 unsigned int value2 = op2->__anon1.ui;
8369 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
8372 exp->expType = op1->type;
8374 op1->type->refCount++;
8379 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8381 long long value2 = op2->__anon1.i64;
8384 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
8387 exp->expType = op1->type;
8389 op1->type->refCount++;
8394 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8396 uint64 value2 = op2->__anon1.ui64;
8399 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
8402 exp->expType = op1->type;
8404 op1->type->refCount++;
8409 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8411 short value2 = op2->__anon1.s;
8414 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
8417 exp->expType = op1->type;
8419 op1->type->refCount++;
8424 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8426 unsigned short value2 = op2->__anon1.us;
8429 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
8432 exp->expType = op1->type;
8434 op1->type->refCount++;
8439 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8441 char value2 = op2->__anon1.c;
8444 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
8447 exp->expType = op1->type;
8449 op1->type->refCount++;
8454 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8456 unsigned char value2 = op2->__anon1.uc;
8459 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
8462 exp->expType = op1->type;
8464 op1->type->refCount++;
8469 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8471 int value2 = op2->__anon1.i;
8474 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
8477 exp->expType = op1->type;
8479 op1->type->refCount++;
8484 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8486 unsigned int value2 = op2->__anon1.ui;
8489 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
8492 exp->expType = op1->type;
8494 op1->type->refCount++;
8499 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8501 long long value2 = op2->__anon1.i64;
8504 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
8507 exp->expType = op1->type;
8509 op1->type->refCount++;
8514 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8516 uint64 value2 = op2->__anon1.ui64;
8519 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
8522 exp->expType = op1->type;
8524 op1->type->refCount++;
8529 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8531 short value2 = op2->__anon1.s;
8534 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
8537 exp->expType = op1->type;
8539 op1->type->refCount++;
8544 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8546 unsigned short value2 = op2->__anon1.us;
8549 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
8552 exp->expType = op1->type;
8554 op1->type->refCount++;
8559 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8561 char value2 = op2->__anon1.c;
8564 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
8567 exp->expType = op1->type;
8569 op1->type->refCount++;
8574 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8576 unsigned char value2 = op2->__anon1.uc;
8579 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
8582 exp->expType = op1->type;
8584 op1->type->refCount++;
8589 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
8592 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
8595 exp->expType = op1->type;
8597 op1->type->refCount++;
8602 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
8605 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
8608 exp->expType = op1->type;
8610 op1->type->refCount++;
8615 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
8618 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
8621 exp->expType = op1->type;
8623 op1->type->refCount++;
8628 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
8631 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
8634 exp->expType = op1->type;
8636 op1->type->refCount++;
8641 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
8644 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
8647 exp->expType = op1->type;
8649 op1->type->refCount++;
8654 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
8657 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
8660 exp->expType = op1->type;
8662 op1->type->refCount++;
8667 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
8670 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
8673 exp->expType = op1->type;
8675 op1->type->refCount++;
8680 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
8683 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
8686 exp->expType = op1->type;
8688 op1->type->refCount++;
8693 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8695 int value2 = op2->__anon1.i;
8698 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
8701 exp->expType = op1->type;
8703 op1->type->refCount++;
8708 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8710 unsigned int value2 = op2->__anon1.ui;
8713 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
8716 exp->expType = op1->type;
8718 op1->type->refCount++;
8723 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8725 long long value2 = op2->__anon1.i64;
8728 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
8731 exp->expType = op1->type;
8733 op1->type->refCount++;
8738 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8740 uint64 value2 = op2->__anon1.ui64;
8743 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
8746 exp->expType = op1->type;
8748 op1->type->refCount++;
8753 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8755 short value2 = op2->__anon1.s;
8758 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
8761 exp->expType = op1->type;
8763 op1->type->refCount++;
8768 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8770 unsigned short value2 = op2->__anon1.us;
8773 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
8776 exp->expType = op1->type;
8778 op1->type->refCount++;
8783 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8785 char value2 = op2->__anon1.c;
8788 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
8791 exp->expType = op1->type;
8793 op1->type->refCount++;
8798 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8800 unsigned char value2 = op2->__anon1.uc;
8803 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
8806 exp->expType = op1->type;
8808 op1->type->refCount++;
8813 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8815 int value2 = op2->__anon1.i;
8818 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
8821 exp->expType = op1->type;
8823 op1->type->refCount++;
8828 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8830 unsigned int value2 = op2->__anon1.ui;
8833 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
8836 exp->expType = op1->type;
8838 op1->type->refCount++;
8843 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8845 long long value2 = op2->__anon1.i64;
8848 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
8851 exp->expType = op1->type;
8853 op1->type->refCount++;
8858 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8860 uint64 value2 = op2->__anon1.ui64;
8863 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
8866 exp->expType = op1->type;
8868 op1->type->refCount++;
8873 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8875 short value2 = op2->__anon1.s;
8878 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
8881 exp->expType = op1->type;
8883 op1->type->refCount++;
8888 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8890 unsigned short value2 = op2->__anon1.us;
8893 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
8896 exp->expType = op1->type;
8898 op1->type->refCount++;
8903 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8905 char value2 = op2->__anon1.c;
8908 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
8911 exp->expType = op1->type;
8913 op1->type->refCount++;
8918 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8920 unsigned char value2 = op2->__anon1.uc;
8923 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
8926 exp->expType = op1->type;
8928 op1->type->refCount++;
8933 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8935 int value2 = op2->__anon1.i;
8938 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
8941 exp->expType = op1->type;
8943 op1->type->refCount++;
8948 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8950 unsigned int value2 = op2->__anon1.ui;
8953 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
8956 exp->expType = op1->type;
8958 op1->type->refCount++;
8963 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8965 long long value2 = op2->__anon1.i64;
8968 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
8971 exp->expType = op1->type;
8973 op1->type->refCount++;
8978 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8980 uint64 value2 = op2->__anon1.ui64;
8983 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
8986 exp->expType = op1->type;
8988 op1->type->refCount++;
8993 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8995 short value2 = op2->__anon1.s;
8998 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
9001 exp->expType = op1->type;
9003 op1->type->refCount++;
9008 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9010 unsigned short value2 = op2->__anon1.us;
9013 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
9016 exp->expType = op1->type;
9018 op1->type->refCount++;
9023 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9025 char value2 = op2->__anon1.c;
9028 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
9031 exp->expType = op1->type;
9033 op1->type->refCount++;
9038 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9040 unsigned char value2 = op2->__anon1.uc;
9043 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
9046 exp->expType = op1->type;
9048 op1->type->refCount++;
9053 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9055 int value2 = op2->__anon1.i;
9058 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
9061 exp->expType = op1->type;
9063 op1->type->refCount++;
9068 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9070 unsigned int value2 = op2->__anon1.ui;
9073 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
9076 exp->expType = op1->type;
9078 op1->type->refCount++;
9083 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9085 long long value2 = op2->__anon1.i64;
9088 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
9091 exp->expType = op1->type;
9093 op1->type->refCount++;
9098 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9100 uint64 value2 = op2->__anon1.ui64;
9103 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
9106 exp->expType = op1->type;
9108 op1->type->refCount++;
9113 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9115 short value2 = op2->__anon1.s;
9118 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
9121 exp->expType = op1->type;
9123 op1->type->refCount++;
9128 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9130 unsigned short value2 = op2->__anon1.us;
9133 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
9136 exp->expType = op1->type;
9138 op1->type->refCount++;
9143 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9145 char value2 = op2->__anon1.c;
9148 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
9151 exp->expType = op1->type;
9153 op1->type->refCount++;
9158 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9160 unsigned char value2 = op2->__anon1.uc;
9163 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
9166 exp->expType = op1->type;
9168 op1->type->refCount++;
9173 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9175 int value2 = op2->__anon1.i;
9178 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
9181 exp->expType = op1->type;
9183 op1->type->refCount++;
9188 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9190 unsigned int value2 = op2->__anon1.ui;
9193 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
9196 exp->expType = op1->type;
9198 op1->type->refCount++;
9203 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9205 long long value2 = op2->__anon1.i64;
9208 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
9211 exp->expType = op1->type;
9213 op1->type->refCount++;
9218 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9220 uint64 value2 = op2->__anon1.ui64;
9223 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
9226 exp->expType = op1->type;
9228 op1->type->refCount++;
9233 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9235 short value2 = op2->__anon1.s;
9238 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
9241 exp->expType = op1->type;
9243 op1->type->refCount++;
9248 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9250 unsigned short value2 = op2->__anon1.us;
9253 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
9256 exp->expType = op1->type;
9258 op1->type->refCount++;
9263 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9265 char value2 = op2->__anon1.c;
9268 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
9271 exp->expType = op1->type;
9273 op1->type->refCount++;
9278 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9280 unsigned char value2 = op2->__anon1.uc;
9283 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
9286 exp->expType = op1->type;
9288 op1->type->refCount++;
9293 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
9296 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
9299 exp->expType = op1->type;
9301 op1->type->refCount++;
9306 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
9309 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
9312 exp->expType = op1->type;
9314 op1->type->refCount++;
9319 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
9322 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
9325 exp->expType = op1->type;
9327 op1->type->refCount++;
9332 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
9335 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
9338 exp->expType = op1->type;
9340 op1->type->refCount++;
9345 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
9348 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
9351 exp->expType = op1->type;
9353 op1->type->refCount++;
9358 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
9361 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
9364 exp->expType = op1->type;
9366 op1->type->refCount++;
9371 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
9374 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
9377 exp->expType = op1->type;
9379 op1->type->refCount++;
9384 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
9387 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
9390 exp->expType = op1->type;
9392 op1->type->refCount++;
9397 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9399 int value2 = op2->__anon1.i;
9402 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
9405 exp->expType = op1->type;
9407 op1->type->refCount++;
9412 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9414 unsigned int value2 = op2->__anon1.ui;
9417 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
9420 exp->expType = op1->type;
9422 op1->type->refCount++;
9427 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9429 long long value2 = op2->__anon1.i64;
9432 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
9435 exp->expType = op1->type;
9437 op1->type->refCount++;
9442 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9444 uint64 value2 = op2->__anon1.ui64;
9447 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
9450 exp->expType = op1->type;
9452 op1->type->refCount++;
9457 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9459 short value2 = op2->__anon1.s;
9462 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
9465 exp->expType = op1->type;
9467 op1->type->refCount++;
9472 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9474 unsigned short value2 = op2->__anon1.us;
9477 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
9480 exp->expType = op1->type;
9482 op1->type->refCount++;
9487 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9489 char value2 = op2->__anon1.c;
9492 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
9495 exp->expType = op1->type;
9497 op1->type->refCount++;
9502 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9504 unsigned char value2 = op2->__anon1.uc;
9507 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
9510 exp->expType = op1->type;
9512 op1->type->refCount++;
9517 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9519 float value2 = op2->__anon1.f;
9522 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
9525 exp->expType = op1->type;
9527 op1->type->refCount++;
9532 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9534 double value2 = op2->__anon1.d;
9537 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
9540 exp->expType = op1->type;
9542 op1->type->refCount++;
9547 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9549 int value2 = op2->__anon1.i;
9552 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
9555 exp->expType = op1->type;
9557 op1->type->refCount++;
9562 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9564 unsigned int value2 = op2->__anon1.ui;
9567 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
9570 exp->expType = op1->type;
9572 op1->type->refCount++;
9577 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9579 long long value2 = op2->__anon1.i64;
9582 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
9585 exp->expType = op1->type;
9587 op1->type->refCount++;
9592 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9594 uint64 value2 = op2->__anon1.ui64;
9597 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
9600 exp->expType = op1->type;
9602 op1->type->refCount++;
9607 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9609 short value2 = op2->__anon1.s;
9612 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
9615 exp->expType = op1->type;
9617 op1->type->refCount++;
9622 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9624 unsigned short value2 = op2->__anon1.us;
9627 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
9630 exp->expType = op1->type;
9632 op1->type->refCount++;
9637 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9639 char value2 = op2->__anon1.c;
9642 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
9645 exp->expType = op1->type;
9647 op1->type->refCount++;
9652 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9654 unsigned char value2 = op2->__anon1.uc;
9657 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
9660 exp->expType = op1->type;
9662 op1->type->refCount++;
9667 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9669 float value2 = op2->__anon1.f;
9672 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
9675 exp->expType = op1->type;
9677 op1->type->refCount++;
9682 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9684 double value2 = op2->__anon1.d;
9687 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
9690 exp->expType = op1->type;
9692 op1->type->refCount++;
9697 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9699 int value2 = op2->__anon1.i;
9702 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
9705 exp->expType = op1->type;
9707 op1->type->refCount++;
9712 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9714 unsigned int value2 = op2->__anon1.ui;
9717 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
9720 exp->expType = op1->type;
9722 op1->type->refCount++;
9727 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9729 long long value2 = op2->__anon1.i64;
9732 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
9735 exp->expType = op1->type;
9737 op1->type->refCount++;
9742 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9744 uint64 value2 = op2->__anon1.ui64;
9747 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
9750 exp->expType = op1->type;
9752 op1->type->refCount++;
9757 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9759 short value2 = op2->__anon1.s;
9762 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
9765 exp->expType = op1->type;
9767 op1->type->refCount++;
9772 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9774 unsigned short value2 = op2->__anon1.us;
9777 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
9780 exp->expType = op1->type;
9782 op1->type->refCount++;
9787 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9789 char value2 = op2->__anon1.c;
9792 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
9795 exp->expType = op1->type;
9797 op1->type->refCount++;
9802 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9804 unsigned char value2 = op2->__anon1.uc;
9807 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
9810 exp->expType = op1->type;
9812 op1->type->refCount++;
9817 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9819 float value2 = op2->__anon1.f;
9822 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
9825 exp->expType = op1->type;
9827 op1->type->refCount++;
9832 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9834 double value2 = op2->__anon1.d;
9837 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
9840 exp->expType = op1->type;
9842 op1->type->refCount++;
9847 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9849 int value2 = op2->__anon1.i;
9852 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
9855 exp->expType = op1->type;
9857 op1->type->refCount++;
9862 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9864 unsigned int value2 = op2->__anon1.ui;
9867 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
9870 exp->expType = op1->type;
9872 op1->type->refCount++;
9877 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9879 long long value2 = op2->__anon1.i64;
9882 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
9885 exp->expType = op1->type;
9887 op1->type->refCount++;
9892 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9894 uint64 value2 = op2->__anon1.ui64;
9897 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
9900 exp->expType = op1->type;
9902 op1->type->refCount++;
9907 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9909 short value2 = op2->__anon1.s;
9912 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
9915 exp->expType = op1->type;
9917 op1->type->refCount++;
9922 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9924 unsigned short value2 = op2->__anon1.us;
9927 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
9930 exp->expType = op1->type;
9932 op1->type->refCount++;
9937 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9939 char value2 = op2->__anon1.c;
9942 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
9945 exp->expType = op1->type;
9947 op1->type->refCount++;
9952 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9954 unsigned char value2 = op2->__anon1.uc;
9957 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
9960 exp->expType = op1->type;
9962 op1->type->refCount++;
9967 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9969 float value2 = op2->__anon1.f;
9972 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
9975 exp->expType = op1->type;
9977 op1->type->refCount++;
9982 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9984 double value2 = op2->__anon1.d;
9987 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
9990 exp->expType = op1->type;
9992 op1->type->refCount++;
9997 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9999 int value2 = op2->__anon1.i;
10002 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
10005 exp->expType = op1->type;
10007 op1->type->refCount++;
10012 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10014 unsigned int value2 = op2->__anon1.ui;
10017 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
10020 exp->expType = op1->type;
10022 op1->type->refCount++;
10027 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10029 long long value2 = op2->__anon1.i64;
10032 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
10035 exp->expType = op1->type;
10037 op1->type->refCount++;
10042 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10044 uint64 value2 = op2->__anon1.ui64;
10047 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
10050 exp->expType = op1->type;
10052 op1->type->refCount++;
10057 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10059 short value2 = op2->__anon1.s;
10062 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
10065 exp->expType = op1->type;
10067 op1->type->refCount++;
10072 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10074 unsigned short value2 = op2->__anon1.us;
10077 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
10080 exp->expType = op1->type;
10082 op1->type->refCount++;
10087 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10089 char value2 = op2->__anon1.c;
10092 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
10095 exp->expType = op1->type;
10097 op1->type->refCount++;
10102 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10104 unsigned char value2 = op2->__anon1.uc;
10107 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
10110 exp->expType = op1->type;
10112 op1->type->refCount++;
10117 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10119 float value2 = op2->__anon1.f;
10122 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
10125 exp->expType = op1->type;
10127 op1->type->refCount++;
10132 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10134 double value2 = op2->__anon1.d;
10137 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
10140 exp->expType = op1->type;
10142 op1->type->refCount++;
10147 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10149 int value2 = op2->__anon1.i;
10152 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
10155 exp->expType = op1->type;
10157 op1->type->refCount++;
10162 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10164 unsigned int value2 = op2->__anon1.ui;
10167 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
10170 exp->expType = op1->type;
10172 op1->type->refCount++;
10177 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10179 long long value2 = op2->__anon1.i64;
10182 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
10185 exp->expType = op1->type;
10187 op1->type->refCount++;
10192 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10194 uint64 value2 = op2->__anon1.ui64;
10197 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
10200 exp->expType = op1->type;
10202 op1->type->refCount++;
10207 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10209 short value2 = op2->__anon1.s;
10212 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
10215 exp->expType = op1->type;
10217 op1->type->refCount++;
10222 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10224 unsigned short value2 = op2->__anon1.us;
10227 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
10230 exp->expType = op1->type;
10232 op1->type->refCount++;
10237 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10239 char value2 = op2->__anon1.c;
10242 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
10245 exp->expType = op1->type;
10247 op1->type->refCount++;
10252 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10254 unsigned char value2 = op2->__anon1.uc;
10257 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
10260 exp->expType = op1->type;
10262 op1->type->refCount++;
10267 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10269 float value2 = op2->__anon1.f;
10272 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
10275 exp->expType = op1->type;
10277 op1->type->refCount++;
10282 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10284 double value2 = op2->__anon1.d;
10287 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
10290 exp->expType = op1->type;
10292 op1->type->refCount++;
10297 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10299 int value2 = op2->__anon1.i;
10302 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
10305 exp->expType = op1->type;
10307 op1->type->refCount++;
10312 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10314 unsigned int value2 = op2->__anon1.ui;
10317 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
10320 exp->expType = op1->type;
10322 op1->type->refCount++;
10327 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10329 long long value2 = op2->__anon1.i64;
10332 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
10335 exp->expType = op1->type;
10337 op1->type->refCount++;
10342 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10344 uint64 value2 = op2->__anon1.ui64;
10347 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
10350 exp->expType = op1->type;
10352 op1->type->refCount++;
10357 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10359 short value2 = op2->__anon1.s;
10362 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
10365 exp->expType = op1->type;
10367 op1->type->refCount++;
10372 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10374 unsigned short value2 = op2->__anon1.us;
10377 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
10380 exp->expType = op1->type;
10382 op1->type->refCount++;
10387 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10389 char value2 = op2->__anon1.c;
10392 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
10395 exp->expType = op1->type;
10397 op1->type->refCount++;
10402 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10404 unsigned char value2 = op2->__anon1.uc;
10407 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
10410 exp->expType = op1->type;
10412 op1->type->refCount++;
10417 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10419 float value2 = op2->__anon1.f;
10422 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
10425 exp->expType = op1->type;
10427 op1->type->refCount++;
10432 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10434 double value2 = op2->__anon1.d;
10437 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
10440 exp->expType = op1->type;
10442 op1->type->refCount++;
10447 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10449 int value2 = op2->__anon1.i;
10452 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
10455 exp->expType = op1->type;
10457 op1->type->refCount++;
10462 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10464 unsigned int value2 = op2->__anon1.ui;
10467 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
10470 exp->expType = op1->type;
10472 op1->type->refCount++;
10477 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10479 long long value2 = op2->__anon1.i64;
10482 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
10485 exp->expType = op1->type;
10487 op1->type->refCount++;
10492 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10494 uint64 value2 = op2->__anon1.ui64;
10497 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
10500 exp->expType = op1->type;
10502 op1->type->refCount++;
10507 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10509 short value2 = op2->__anon1.s;
10512 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
10515 exp->expType = op1->type;
10517 op1->type->refCount++;
10522 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10524 unsigned short value2 = op2->__anon1.us;
10527 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
10530 exp->expType = op1->type;
10532 op1->type->refCount++;
10537 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10539 char value2 = op2->__anon1.c;
10542 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
10545 exp->expType = op1->type;
10547 op1->type->refCount++;
10552 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10554 unsigned char value2 = op2->__anon1.uc;
10557 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
10560 exp->expType = op1->type;
10562 op1->type->refCount++;
10567 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10569 float value2 = op2->__anon1.f;
10572 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
10575 exp->expType = op1->type;
10577 op1->type->refCount++;
10582 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10584 double value2 = op2->__anon1.d;
10587 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
10590 exp->expType = op1->type;
10592 op1->type->refCount++;
10597 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10600 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
10603 exp->expType = op1->type;
10605 op1->type->refCount++;
10610 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10613 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
10616 exp->expType = op1->type;
10618 op1->type->refCount++;
10623 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10626 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
10629 exp->expType = op1->type;
10631 op1->type->refCount++;
10636 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10639 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
10642 exp->expType = op1->type;
10644 op1->type->refCount++;
10649 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10652 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
10655 exp->expType = op1->type;
10657 op1->type->refCount++;
10662 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10665 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
10668 exp->expType = op1->type;
10670 op1->type->refCount++;
10675 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10678 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
10681 exp->expType = op1->type;
10683 op1->type->refCount++;
10688 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10691 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
10694 exp->expType = op1->type;
10696 op1->type->refCount++;
10701 struct OpTable intOps =
10703 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
10706 struct OpTable uintOps =
10708 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
10711 struct OpTable int64Ops =
10713 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
10716 struct OpTable uint64Ops =
10718 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
10721 struct OpTable shortOps =
10723 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
10726 struct OpTable ushortOps =
10728 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
10731 struct OpTable floatOps =
10733 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
10736 struct OpTable doubleOps =
10738 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
10741 struct OpTable charOps =
10743 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
10746 struct OpTable ucharOps =
10748 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
10751 void ReadString(char * output, char * string)
10753 int len = strlen(string);
10755 unsigned int quoted = 0, escaped = 0;
10757 for(c = 0; c < len; c++)
10759 char ch = string[c];
10817 int UnescapeString(char * d, char * s, int len)
10822 while(j < len && (ch = s[j]))
10827 switch((ch = s[++j]))
10873 char * OffsetEscapedString(char * s, int len, int offset)
10878 while(j < len && k < offset && (ch = s[j]))
10884 return (k == offset) ? s + j : (((void *)0));
10887 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
10889 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
10891 extern double strtod(const char * , char * * );
10893 extern float (* __ecereMethod_float_inf)(void);
10895 extern float (* __ecereMethod_float_nan)(void);
10897 extern double (* __ecereMethod_double_inf)(void);
10899 extern double (* __ecereMethod_double_nan)(void);
10901 struct Operand GetOperand(struct Expression * exp)
10903 struct Operand op =
10910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
10913 struct Type * type = exp->expType;
10917 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))
10919 if(!type->__anon1._class->__anon1.registered->dataType)
10920 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
10921 type = type->__anon1._class->__anon1.registered->dataType;
10923 if(exp->type == 3 && op.kind == 13)
10925 op.__anon1.ui64 = (uint64)exp->__anon1.__anon2.string;
10927 op.ops = uint64Ops;
10929 else if(exp->isConstant && exp->type == 2)
10931 op.kind = type->kind;
10938 if(exp->__anon1.__anon1.constant[0] == '\'')
10940 op.__anon1.c = exp->__anon1.__anon1.constant[1];
10943 else if(type->isSigned)
10945 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10950 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10958 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10963 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10964 op.ops = ushortOps;
10971 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10976 op.__anon1.ui = strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10984 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10989 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10990 op.ops = uint64Ops;
10997 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11002 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11003 op.ops = uint64Ops;
11010 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11015 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11016 op.ops = uint64Ops;
11021 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11022 op.__anon1.f = __ecereMethod_float_inf();
11023 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11024 op.__anon1.f = -__ecereMethod_float_inf();
11025 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11026 op.__anon1.f = __ecereMethod_float_nan();
11027 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11028 op.__anon1.f = -__ecereMethod_float_nan();
11030 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11034 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11035 op.__anon1.d = __ecereMethod_double_inf();
11036 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11037 op.__anon1.d = -__ecereMethod_double_inf();
11038 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11039 op.__anon1.d = __ecereMethod_double_nan();
11040 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11041 op.__anon1.d = -__ecereMethod_double_nan();
11043 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11044 op.ops = doubleOps;
11049 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11051 op.ops = uint64Ops;
11059 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
11063 switch(_class->typeSize)
11066 if(!strcmp(_class->dataTypeString, "uint64"))
11067 v = (long long)*(uint64 *)ptr;
11069 v = *(long long *)ptr;
11072 if(!strcmp(_class->dataTypeString, "uint"))
11073 v = (long long)*(unsigned int *)ptr;
11075 v = (long long)*(int *)ptr;
11078 if(!strcmp(_class->dataTypeString, "uint16"))
11079 v = (long long)*(unsigned short *)ptr;
11081 v = (long long)*(short *)ptr;
11084 if(!strcmp(_class->dataTypeString, "byte"))
11085 v = (long long)*(unsigned char *)ptr;
11087 v = (long long)*(char *)ptr;
11093 int __ecereVMethodID_class_OnGetString;
11095 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
11097 static __attribute__((unused)) void UnusedFunction()
11101 ((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);
11104 extern int __ecereVMethodID_class_OnGetString;
11106 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
11108 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11110 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
11112 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11113 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
11116 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11117 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11118 struct Type * type;
11119 void * ptr = inst->data + dataMember->offset + offset;
11120 char * result = (((void *)0));
11122 exp->loc = member->loc = inst->loc;
11123 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11124 if(!dataMember->dataType)
11125 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11126 type = dataMember->dataType;
11127 if(type->kind == 8)
11129 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11131 if(_class->type == 4)
11133 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11137 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11138 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
11140 for(item = e->values.first; item; item = item->next)
11142 if(item->data == GetEnumValue(_class, ptr))
11144 result = item->name;
11150 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11152 exp->destType = MkClassType(_class->fullName);
11153 ProcessExpressionType(exp);
11157 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11159 if(!_class->dataType)
11160 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11161 type = _class->dataType;
11170 FreeExpContents(exp);
11171 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11177 FreeExpContents(exp);
11178 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11184 FreeExpContents(exp);
11185 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11191 FreeExpContents(exp);
11192 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11198 FreeExpContents(exp);
11199 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11205 FreeExpContents(exp);
11206 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11211 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11214 ListAdd(memberList, member);
11216 if(parentDataMember->type == 1)
11221 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
11223 void PopulateInstance(struct Instantiation * inst)
11225 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
11226 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
11227 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11228 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
11231 inst->members = MkListOne(MkMembersInitList(memberList));
11233 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
11234 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
11236 if(!dataMember->isProperty)
11238 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11239 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
11242 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11243 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11244 struct Type * type;
11245 void * ptr = inst->data + dataMember->offset;
11246 char * result = (((void *)0));
11248 exp->loc = member->loc = inst->loc;
11249 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11250 if(!dataMember->dataType)
11251 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11252 type = dataMember->dataType;
11253 if(type->kind == 8)
11255 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11257 if(_class->type == 4)
11259 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11263 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11264 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
11266 for(item = e->values.first; item; item = item->next)
11268 if(item->data == GetEnumValue(_class, ptr))
11270 result = item->name;
11277 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11279 exp->destType = MkClassType(_class->fullName);
11280 ProcessExpressionType(exp);
11283 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11285 if(!_class->dataType)
11286 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11287 type = _class->dataType;
11296 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11302 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11308 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11314 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11320 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11325 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11328 ListAdd(memberList, member);
11334 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);
11336 extern void FreeInstance(struct Instantiation * inst);
11338 void ComputeInstantiation(struct Expression * exp)
11340 struct Instantiation * inst = exp->__anon1.instance;
11341 struct MembersInit * members;
11342 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11343 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11344 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11345 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11346 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11347 int subMemberStackPos = 0;
11350 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11354 if(_class->type == 0 || _class->type == 5)
11356 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11357 if(_class->type == 0)
11358 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11361 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11365 for(members = (*inst->members).first; members; members = members->next)
11367 switch(members->type)
11371 if(members->__anon1.dataMembers)
11373 struct MemberInit * member;
11375 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11377 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11378 unsigned int found = 0;
11379 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11380 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11381 unsigned int dataMemberOffset;
11385 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11388 if(curMember->isProperty)
11389 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11392 dataMember = curMember;
11393 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11394 if(_class->type == 0)
11395 dataMemberOffset += _class->base->structSize;
11402 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11406 if(prop->memberAccess == 1)
11408 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11409 curClass = prop->_class;
11414 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11415 int _subMemberStackPos = 0;
11417 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11421 if(dataMember->memberAccess == 1)
11423 curMember = dataMember;
11424 curClass = dataMember->_class;
11425 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11426 subMemberStackPos = _subMemberStackPos;
11431 if(found && member->initializer && member->initializer->type == 0)
11433 struct Expression * value = member->initializer->__anon1.exp;
11434 struct Type * type = (((void *)0));
11435 unsigned int deepMember = 0;
11439 type = prop->dataType;
11441 else if(dataMember)
11443 if(!dataMember->dataType)
11444 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11445 type = dataMember->dataType;
11447 if(ident && ident->next)
11450 for(ident = ident->next; ident && type; ident = ident->next)
11452 if(type->kind == 8)
11454 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11456 type = prop->dataType;
11459 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11461 type = dataMember->dataType;
11464 else if(type->kind == 9 || type->kind == 10)
11466 struct Type * memberType;
11468 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11470 if(!strcmp(memberType->name, ident->string))
11481 FreeType(value->destType);
11482 value->destType = type;
11485 ComputeExpression(value);
11487 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11489 if(type->kind == 8)
11491 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11493 if(_class->type == 2 || _class->type == 3 || _class->type == 4)
11495 if(!_class->dataType)
11496 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11497 type = _class->dataType;
11502 void * ptr = inst->data + dataMemberOffset;
11504 if(value->type == 2)
11510 GetInt(value, (int *)ptr);
11515 GetInt64(value, (long long *)ptr);
11520 GetIntPtr(value, (intptr_t *)ptr);
11525 GetIntSize(value, (ssize_t *)ptr);
11530 GetFloat(value, (float *)ptr);
11535 GetDouble(value, (double *)ptr);
11540 else if(value->type == 1)
11542 if(type->kind == 8)
11544 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11546 if(_class->type == 1)
11548 ComputeTypeSize(type);
11549 if(value->__anon1.instance->data)
11550 memcpy(ptr, value->__anon1.instance->data, type->size);
11557 if(value->type == 1 && value->__anon1.instance->data)
11559 if(type->kind == 8)
11561 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11563 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)))
11565 void (* Set)(void *, void *) = (void *)prop->Set;
11567 Set(inst->data, value->__anon1.instance->data);
11568 PopulateInstance(inst);
11572 else if(value->type == 2)
11578 void (* Set)(void *, double) = (void *)prop->Set;
11580 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11585 void (* Set)(void *, float) = (void *)prop->Set;
11587 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11592 void (* Set)(void *, int) = (void *)prop->Set;
11594 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11599 void (* Set)(void *, long long) = (void *)prop->Set;
11601 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11606 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11608 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11613 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11615 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11620 else if(value->type == 3)
11624 ReadString(temp, value->__anon1.__anon2.string);
11625 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11629 else if(!deepMember && type && _class->type == 3)
11633 if(value->type == 2)
11635 if(type->kind == 8)
11637 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11639 if(_class->type == 3)
11641 if(!_class->dataType)
11642 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11643 type = _class->dataType;
11651 float (* Set)(float) = (void *)prop->Set;
11653 GetFloat(member->initializer->__anon1.exp, &fValue);
11654 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11661 double (* Set)(double) = (void *)prop->Set;
11663 GetDouble(member->initializer->__anon1.exp, &dValue);
11664 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11672 else if(!deepMember && type && _class->type == 2)
11676 if(value->type == 1 && value->__anon1.instance->data)
11678 unsigned int (* Set)(void *) = (void *)prop->Set;
11680 bits = Set(value->__anon1.instance->data);
11682 else if(value->type == 2)
11686 else if(dataMember)
11688 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11689 struct Type * type;
11692 bits = (bits & ~bitMember->mask);
11693 if(!bitMember->dataType)
11694 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11695 type = bitMember->dataType;
11696 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11698 if(!type->__anon1._class->__anon1.registered->dataType)
11699 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11700 type = type->__anon1._class->__anon1.registered->dataType;
11709 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11717 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11726 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11734 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11742 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11750 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11755 bits |= part << bitMember->pos;
11761 if(_class && _class->type == 3)
11763 ComputeExpression(member->initializer->__anon1.exp);
11764 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11766 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11776 if(_class && _class->type == 2)
11778 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11783 FreeInstance(inst);
11787 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
11789 unsigned int result = 0;
11794 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
11795 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
11799 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
11800 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11803 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 4 || op->kind == 5 || op->kind == 6 || op->kind == 7 || op->kind == 13 || op->kind == 15 || op->kind == 22 || op->kind == 23 || op->kind == 24)
11804 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11807 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)
11808 result = GetOpFloat(op, &op->__anon1.f);
11811 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)
11812 result = GetOpDouble(op, &op->__anon1.d);
11815 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)
11816 result = GetOpUInt64(op, &op->__anon1.ui64);
11819 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)
11820 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11823 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11824 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11827 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11828 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11834 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11836 if(exp->__anon1.op.op == SIZEOF)
11838 FreeExpContents(exp);
11840 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11844 if(!exp->__anon1.op.exp1)
11846 switch(exp->__anon1.op.op)
11850 struct Expression * exp2 = exp->__anon1.op.exp2;
11852 exp->__anon1.op.exp2 = (((void *)0));
11853 FreeExpContents(exp);
11854 FreeType(exp->expType);
11855 FreeType(exp->destType);
11857 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11863 FreeExpContents(exp);
11864 op1->ops.Neg(exp, op1);
11868 if(op1->ops.BitNot)
11870 FreeExpContents(exp);
11871 op1->ops.BitNot(exp, op1);
11877 FreeExpContents(exp);
11878 op1->ops.Not(exp, op1);
11885 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11887 if(Promote(op2, op1->kind, op1->type->isSigned))
11888 op2->kind = op1->kind, op2->ops = op1->ops;
11889 else if(Promote(op1, op2->kind, op2->type->isSigned))
11890 op1->kind = op2->kind, op1->ops = op2->ops;
11892 switch(exp->__anon1.op.op)
11897 FreeExpContents(exp);
11898 op1->ops.Add(exp, op1, op2);
11904 FreeExpContents(exp);
11905 op1->ops.Sub(exp, op1, op2);
11911 FreeExpContents(exp);
11912 op1->ops.Mul(exp, op1, op2);
11918 FreeExpContents(exp);
11919 op1->ops.Div(exp, op1, op2);
11925 FreeExpContents(exp);
11926 op1->ops.Mod(exp, op1, op2);
11930 if(exp->__anon1.op.exp2)
11932 if(op1->ops.BitAnd)
11934 FreeExpContents(exp);
11935 op1->ops.BitAnd(exp, op1, op2);
11942 FreeExpContents(exp);
11943 op1->ops.BitOr(exp, op1, op2);
11947 if(op1->ops.BitXor)
11949 FreeExpContents(exp);
11950 op1->ops.BitXor(exp, op1, op2);
11954 if(op1->ops.LShift)
11956 FreeExpContents(exp);
11957 op1->ops.LShift(exp, op1, op2);
11961 if(op1->ops.RShift)
11963 FreeExpContents(exp);
11964 op1->ops.RShift(exp, op1, op2);
11970 FreeExpContents(exp);
11971 op1->ops.Equ(exp, op1, op2);
11977 FreeExpContents(exp);
11978 op1->ops.Nqu(exp, op1, op2);
11984 FreeExpContents(exp);
11985 op1->ops.And(exp, op1, op2);
11991 FreeExpContents(exp);
11992 op1->ops.Or(exp, op1, op2);
11998 FreeExpContents(exp);
11999 op1->ops.Grt(exp, op1, op2);
12005 FreeExpContents(exp);
12006 op1->ops.Sma(exp, op1, op2);
12010 if(op1->ops.GrtEqu)
12012 FreeExpContents(exp);
12013 op1->ops.GrtEqu(exp, op1, op2);
12017 if(op1->ops.SmaEqu)
12019 FreeExpContents(exp);
12020 op1->ops.SmaEqu(exp, op1, op2);
12028 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
12030 extern struct Expression * MkExpIdentifier(struct Identifier * id);
12032 void ComputeExpression(struct Expression * exp)
12038 ComputeInstantiation(exp);
12043 struct Expression * exp1, * exp2 = (((void *)0));
12044 struct Operand op1 =
12051 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12054 struct Operand op2 =
12061 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12065 if(exp->__anon1.op.exp2)
12067 struct Expression * e = exp->__anon1.op.exp2;
12069 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
12071 if(e->type == 5 || e->type == 32 || e->type == 23)
12074 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12076 e = (*e->__anon1.list).last;
12079 if(exp->__anon1.op.op == 261 && e && e->expType)
12081 if(e->type == 3 && e->__anon1.__anon2.string)
12083 char * string = e->__anon1.__anon2.string;
12084 int len = strlen(string);
12085 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
12087 len = UnescapeString(tmp, string + 1, len - 2);
12088 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
12089 FreeExpContents(exp);
12091 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
12095 struct Type * type = e->expType;
12098 FreeExpContents(exp);
12100 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12106 ComputeExpression(exp->__anon1.op.exp2);
12108 if(exp->__anon1.op.exp1)
12110 ComputeExpression(exp->__anon1.op.exp1);
12111 exp1 = exp->__anon1.op.exp1;
12112 exp2 = exp->__anon1.op.exp2;
12113 op1 = GetOperand(exp1);
12115 op1.type->refCount++;
12118 op2 = GetOperand(exp2);
12120 op2.type->refCount++;
12125 exp1 = exp->__anon1.op.exp2;
12126 op1 = GetOperand(exp1);
12128 op1.type->refCount++;
12130 CallOperator(exp, exp1, exp2, &op1, &op2);
12132 FreeType(op1.type);
12134 FreeType(op2.type);
12140 struct Expression * e, * n;
12142 for(e = (*exp->__anon1.list).first; e; e = n)
12147 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
12148 struct Expression * prev = exp->prev;
12149 struct Expression * next = exp->next;
12151 ComputeExpression(e);
12152 FreeType(exp->expType);
12153 FreeType(exp->destType);
12157 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
12158 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
12169 struct Expression * memberExp = exp->__anon1.member.exp;
12170 struct Identifier * memberID = exp->__anon1.member.member;
12171 struct Type * type;
12173 ComputeExpression(exp->__anon1.member.exp);
12174 type = exp->__anon1.member.exp->expType;
12177 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)));
12178 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
12179 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
12180 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
12182 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
12183 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
12187 struct Symbol * classSym;
12190 PrintTypeNoConst(type, string, 0, 1);
12191 classSym = FindClass(string);
12192 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12194 if(exp->__anon1.member.member)
12196 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
12198 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
12200 if(!prop && !member && _class && exp->__anon1.member.member)
12202 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
12204 convertTo = _class;
12205 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12206 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
12212 struct Type * type = prop->dataType;
12214 if(_class->type == 3)
12216 if(type->kind == 8)
12218 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12220 if(_class->type == 3)
12222 if(!_class->dataType)
12223 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12224 type = _class->dataType;
12232 float (* Get)(float) = (void *)prop->Get;
12234 GetFloat(exp->__anon1.member.exp, &value);
12235 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
12242 double (* Get)(double);
12244 GetDouble(exp->__anon1.member.exp, &value);
12246 Get = (void *)prop->Set;
12248 Get = (void *)prop->Get;
12249 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
12259 struct Expression * value = exp->__anon1.member.exp;
12260 struct Type * type;
12262 if(!prop->dataType)
12263 ProcessPropertyType(prop);
12264 type = prop->dataType;
12268 else if(_class->type == 1)
12274 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12276 if(propertyClass->type == 1 && value->type == 1)
12278 void (* Set)(void *, void *) = (void *)prop->Set;
12280 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12281 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12282 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12283 exp->__anon1.instance->loc = exp->loc;
12285 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
12286 PopulateInstance(exp->__anon1.instance);
12293 void (* Set)(void *, int) = (void *)prop->Set;
12295 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12296 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12297 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12298 exp->__anon1.instance->loc = exp->loc;
12300 GetInt(value, &intValue);
12301 Set(exp->__anon1.instance->data, intValue);
12302 PopulateInstance(exp->__anon1.instance);
12307 long long intValue;
12308 void (* Set)(void *, long long) = (void *)prop->Set;
12310 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12311 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12312 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12313 exp->__anon1.instance->loc = exp->loc;
12315 GetInt64(value, &intValue);
12316 Set(exp->__anon1.instance->data, intValue);
12317 PopulateInstance(exp->__anon1.instance);
12323 void (* Set)(void *, intptr_t) = (void *)prop->Set;
12325 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12326 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12327 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12328 exp->__anon1.instance->loc = exp->loc;
12330 GetIntPtr(value, &intValue);
12331 Set(exp->__anon1.instance->data, intValue);
12332 PopulateInstance(exp->__anon1.instance);
12338 void (* Set)(void *, ssize_t) = (void *)prop->Set;
12340 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12341 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12342 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12343 exp->__anon1.instance->loc = exp->loc;
12345 GetIntSize(value, &intValue);
12346 Set(exp->__anon1.instance->data, intValue);
12347 PopulateInstance(exp->__anon1.instance);
12353 void (* Set)(void *, float) = (void *)prop->Set;
12355 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12356 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12357 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12358 exp->__anon1.instance->loc = exp->loc;
12360 GetFloat(value, &floatValue);
12361 Set(exp->__anon1.instance->data, floatValue);
12362 PopulateInstance(exp->__anon1.instance);
12367 double doubleValue;
12368 void (* Set)(void *, double) = (void *)prop->Set;
12370 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12371 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12372 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12373 exp->__anon1.instance->loc = exp->loc;
12375 GetDouble(value, &doubleValue);
12376 Set(exp->__anon1.instance->data, doubleValue);
12377 PopulateInstance(exp->__anon1.instance);
12382 else if(_class->type == 2)
12388 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12390 if(propertyClass->type == 1 && value->__anon1.instance->data)
12392 unsigned int (* Set)(void *) = (void *)prop->Set;
12393 unsigned int bits = Set(value->__anon1.instance->data);
12395 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12399 else if(_class->type == 2)
12401 unsigned int value;
12402 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
12405 GetUInt(exp->__anon1.member.exp, &value);
12407 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12416 if(_class->type == 2)
12418 unsigned int value;
12420 GetUInt(exp->__anon1.member.exp, &value);
12425 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12427 if(_class->type == 1)
12429 void (* Get)(unsigned int, void *) = (void *)prop->Get;
12431 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12432 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12433 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12434 exp->__anon1.instance->loc = exp->loc;
12436 Get(value, exp->__anon1.instance->data);
12437 PopulateInstance(exp->__anon1.instance);
12439 else if(_class->type == 2)
12441 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
12442 uint64 bits = Get(value);
12444 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
12451 else if(_class->type == 1)
12453 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
12459 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12461 if(_class->type == 1 && value)
12463 void (* Get)(void *, void *) = (void *)prop->Get;
12465 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12466 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12467 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12468 exp->__anon1.instance->loc = exp->loc;
12470 Get(value, exp->__anon1.instance->data);
12471 PopulateInstance(exp->__anon1.instance);
12482 exp->isConstant = 0;
12491 FreeExpression(memberExp);
12492 FreeIdentifier(memberID);
12498 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
12500 FreeExpContents(exp);
12501 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12508 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
12510 if(classSym && classSym->__anon1.registered)
12512 if(classSym->__anon1.registered->fixed)
12514 FreeSpecifier(exp->__anon1._class);
12515 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
12520 char className[1024];
12522 strcpy(className, "__ecereClass_");
12523 FullClassNameCat(className, classSym->string, 1);
12524 DeclareClass(classSym, className);
12525 FreeExpContents(exp);
12527 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
12528 exp->__anon1.member.member = MkIdentifier("structSize");
12535 struct Type * type;
12536 struct Expression * e = exp;
12538 if(exp->type == 11)
12540 if(exp->__anon1.cast.exp)
12541 ComputeExpression(exp->__anon1.cast.exp);
12542 e = exp->__anon1.cast.exp;
12544 if(e && exp->expType)
12546 type = exp->expType;
12547 if(type->kind == 8)
12549 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12551 if(_class && (_class->type == 3 || _class->type == 2))
12553 if(!_class->dataType)
12554 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12555 type = _class->dataType;
12564 char value = (char)0;
12566 if(GetChar(e, &value))
12568 FreeExpContents(exp);
12569 exp->__anon1.__anon1.constant = PrintChar(value);
12575 unsigned char value = (unsigned char)0;
12577 if(GetUChar(e, &value))
12579 FreeExpContents(exp);
12580 exp->__anon1.__anon1.constant = PrintUChar(value);
12588 short value = (short)0;
12590 if(GetShort(e, &value))
12592 FreeExpContents(exp);
12593 exp->__anon1.__anon1.constant = PrintShort(value);
12599 unsigned short value = (unsigned short)0;
12601 if(GetUShort(e, &value))
12603 FreeExpContents(exp);
12604 exp->__anon1.__anon1.constant = PrintUShort(value);
12614 if(GetInt(e, &value))
12616 FreeExpContents(exp);
12617 exp->__anon1.__anon1.constant = PrintInt(value);
12623 unsigned int value = 0;
12625 if(GetUInt(e, &value))
12627 FreeExpContents(exp);
12628 exp->__anon1.__anon1.constant = PrintUInt(value);
12636 long long value = 0;
12638 if(GetInt64(e, &value))
12640 FreeExpContents(exp);
12641 exp->__anon1.__anon1.constant = PrintInt64(value);
12649 if(GetUInt64(e, &value))
12651 FreeExpContents(exp);
12652 exp->__anon1.__anon1.constant = PrintUInt64(value);
12660 intptr_t value = 0;
12662 if(GetIntPtr(e, &value))
12664 FreeExpContents(exp);
12665 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12671 uintptr_t value = 0;
12673 if(GetUIntPtr(e, &value))
12675 FreeExpContents(exp);
12676 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12686 if(GetIntSize(e, &value))
12688 FreeExpContents(exp);
12689 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12697 if(GetUIntSize(e, &value))
12699 FreeExpContents(exp);
12700 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12709 if(GetFloat(e, &value))
12711 FreeExpContents(exp);
12712 exp->__anon1.__anon1.constant = PrintFloat(value);
12721 if(GetDouble(e, &value))
12723 FreeExpContents(exp);
12724 exp->__anon1.__anon1.constant = PrintDouble(value);
12735 struct Operand op1 =
12742 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12745 struct Operand op2 =
12752 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12755 struct Operand op3 =
12762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12766 if(exp->__anon1.cond.exp)
12767 ComputeExpression((*exp->__anon1.cond.exp).last);
12768 if(exp->__anon1.cond.elseExp)
12769 ComputeExpression(exp->__anon1.cond.elseExp);
12770 if(exp->__anon1.cond.cond)
12771 ComputeExpression(exp->__anon1.cond.cond);
12772 op1 = GetOperand(exp->__anon1.cond.cond);
12774 op1.type->refCount++;
12775 op2 = GetOperand((*exp->__anon1.cond.exp).last);
12777 op2.type->refCount++;
12778 op3 = GetOperand(exp->__anon1.cond.elseExp);
12780 op3.type->refCount++;
12783 FreeExpContents(exp);
12784 op1.ops.Cond(exp, &op1, &op2, &op3);
12787 FreeType(op1.type);
12789 FreeType(op2.type);
12791 FreeType(op3.type);
12797 void ApplyAnyObjectLogic(struct Expression * e);
12799 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
12801 unsigned int result = 1;
12805 struct __ecereNameSpace__ecere__sys__OldList converts =
12809 struct Conversion * convert;
12811 if(destType->kind == 0)
12813 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
12817 for(convert = converts.first; convert; convert = convert->next)
12819 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
12823 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12824 int objectType = exp->expType ? exp->expType->classObjectType : 0;
12827 newExp->prev = (((void *)0));
12828 newExp->next = (((void *)0));
12829 newExp->destType = (((void *)0));
12833 exp->addedThis = 1;
12834 exp->__anon1.member.exp = newExp;
12835 FreeType(exp->__anon1.member.exp->expType);
12836 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
12837 exp->__anon1.member.exp->expType->classObjectType = objectType;
12838 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
12839 exp->__anon1.member.memberType = 1;
12840 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12843 exp->expType->refCount++;
12844 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12850 exp->addedThis = 1;
12851 exp->__anon1.member.exp = newExp;
12852 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)
12854 newExp->byReference = 1;
12856 FreeType(exp->__anon1.member.exp->expType);
12857 exp->__anon1.member.exp->expType = (((void *)0));
12858 if(convert->convert->dataType)
12860 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12861 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
12862 exp->__anon1.member.exp->expType->refCount = 1;
12863 exp->__anon1.member.exp->expType->classObjectType = objectType;
12864 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12866 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
12867 exp->__anon1.member.memberType = 4;
12868 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12870 if(convert->resultType)
12871 convert->resultType->refCount++;
12877 FreeType(exp->expType);
12880 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12881 if(exp->destType->casted)
12884 exp->expType->refCount++;
12888 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12889 if(exp->destType->casted)
12891 if(convert->resultType)
12892 convert->resultType->refCount++;
12896 if(exp->isConstant && inCompiler)
12897 ComputeExpression(exp);
12898 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, FreeConvert);
12900 if(!result && exp->expType && converts.count)
12902 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
12904 if(!result && exp->expType && exp->destType)
12906 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))
12913 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
12915 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
12917 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
12919 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
12921 void CheckTemplateTypes(struct Expression * exp)
12923 struct Expression * nbExp = GetNonBracketsExp(exp);
12925 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
12927 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12928 struct Context * context;
12932 exp->destType->refCount++;
12934 exp->expType->refCount++;
12935 newExp->prev = (((void *)0));
12936 newExp->next = (((void *)0));
12937 switch(exp->expType->kind)
12940 if(exp->destType->classObjectType)
12943 exp->destType->refCount--;
12945 exp->expType->refCount--;
12946 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12950 struct __ecereNameSpace__ecere__sys__OldList * specs;
12951 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12952 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12954 context = PushContext();
12955 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12956 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12957 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12959 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12960 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
12961 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
12962 exp->__anon1.compound->__anon1.compound.context = context;
12963 PopContext(context);
12968 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
12969 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
12974 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
12976 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12977 struct Context * context;
12981 exp->destType->refCount++;
12983 exp->expType->refCount++;
12984 newExp->prev = (((void *)0));
12985 newExp->next = (((void *)0));
12986 switch(exp->expType->kind)
12989 if(exp->destType->classObjectType)
12992 exp->destType->refCount--;
12994 exp->expType->refCount--;
12995 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12999 struct __ecereNameSpace__ecere__sys__OldList * specs;
13000 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
13001 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
13003 context = PushContext();
13004 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
13005 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
13006 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
13008 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
13009 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
13010 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
13011 exp->__anon1.compound->__anon1.compound.context = context;
13012 PopContext(context);
13017 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
13020 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)));
13021 ProcessExpressionType((*exp->__anon1.list).first);
13027 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
13028 exp->needTemplateCast = 2;
13029 newExp->needCast = 1;
13030 newExp->needTemplateCast = 2;
13031 ProcessExpressionType((*exp->__anon1.list).first);
13037 if(exp->expType->kind == 20)
13039 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
13043 FreeType(exp->destType);
13044 FreeType(exp->expType);
13045 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13049 if(newExp->type == 8 && newExp->__anon1.member.memberType == 3)
13052 exp->__anon1.op.op = '*';
13053 exp->__anon1.op.exp1 = (((void *)0));
13054 exp->__anon1.op.exp2 = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uint64")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '&', newExp))));
13058 char typeString[1024];
13059 struct Declarator * decl;
13060 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13062 typeString[0] = '\0';
13063 PrintType(exp->expType, typeString, 0, 0);
13064 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13066 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
13067 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
13068 exp->__anon1.cast.exp->needCast = 1;
13076 extern int strncmp(const char * , const char * , size_t n);
13078 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
13080 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
13082 int nsLen = strlen(nameSpace);
13083 struct Symbol * symbol;
13085 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)))
13087 char * s = symbol->string;
13089 if(!strncmp(s, nameSpace, nsLen))
13094 for(c = strlen(s) - 1; c >= 0; c--)
13097 namePart = s + c + 1;
13098 if(!strcmp(namePart, name))
13106 return (((void *)0));
13109 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
13112 char nameSpace[1024];
13113 const char * namePart;
13114 unsigned int gotColon = 0;
13116 nameSpace[0] = '\0';
13117 for(c = strlen(name) - 1; c >= 0; c--)
13123 namePart = name + c + 1;
13124 while(c >= 0 && name[c] == ':')
13128 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
13132 memcpy(nameSpace, name, c + 1);
13133 nameSpace[c + 1] = (char)0;
13134 return ScanWithNameSpace(tree, nameSpace, namePart);
13138 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13144 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13148 return ScanWithNameSpace(tree, "", namePart);
13150 return (((void *)0));
13153 static void ProcessDeclaration(struct Declaration * decl);
13155 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
13157 struct Context * ctx;
13158 struct Symbol * symbol = (((void *)0));
13160 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
13162 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
13164 symbol = (((void *)0));
13167 char curName[1024];
13169 strcpy(curName, thisNameSpace);
13170 strcat(curName, "::");
13171 strcat(curName, name);
13172 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
13175 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
13178 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
13179 if(symbol || ctx == endContext)
13182 if(inCompiler && curExternal && symbol && ctx == globalContext && curExternal->symbol && symbol->id > curExternal->symbol->idCode && symbol->__anon2.__anon1.pointerExternal)
13184 if(symbol->__anon2.__anon1.pointerExternal->type == 0)
13186 struct FunctionDefinition * function = symbol->__anon2.__anon1.pointerExternal->__anon1.function;
13187 struct Context * tmpContext = curContext;
13189 curContext = (((void *)0));
13190 symbol->__anon2.__anon1.pointerExternal = MkExternalDeclaration(MkDeclaration(CopyList(function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(function->declarator), (((void *)0))))));
13191 curContext = tmpContext;
13192 symbol->__anon2.__anon1.pointerExternal->symbol = symbol;
13193 DeclareType(symbol->type, 1, 1);
13194 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, symbol->__anon2.__anon1.pointerExternal);
13195 symbol->id = curExternal->symbol->idCode;
13197 else if(symbol->__anon2.__anon1.pointerExternal->type == 1 && curExternal->symbol->idCode < symbol->__anon2.__anon1.pointerExternal->symbol->id)
13199 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
13200 symbol->id = curExternal->symbol->idCode;
13206 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
13208 if(!type->isSigned && type->kind != 22 && type->kind != 23)
13209 ListAdd(specs, MkSpecifier(UNSIGNED));
13214 if(type->__anon1._class->__anon1.registered)
13216 if(!type->__anon1._class->__anon1.registered->dataType)
13217 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
13218 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
13223 ListAdd(specs, MkSpecifier(DOUBLE));
13226 ListAdd(specs, MkSpecifier(FLOAT));
13229 ListAdd(specs, MkSpecifier(CHAR));
13232 ListAdd(specs, MkSpecifier(_BOOL));
13235 ListAdd(specs, MkSpecifier(SHORT));
13238 ListAdd(specs, MkSpecifier(INT64));
13241 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
13244 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
13248 ListAdd(specs, MkSpecifier(INT));
13253 static void PrintArraySize(struct Type * arrayType, char * string)
13259 if(arrayType->__anon1.__anon4.enumClass)
13260 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
13261 else if(arrayType->__anon1.__anon4.arraySizeExp)
13262 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
13264 strcat(string, size);
13267 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
13271 if(printConst && type->constant)
13272 strcat(string, "const ");
13277 struct Symbol * c = type->__anon1._class;
13279 if(type->classObjectType == 2)
13280 strcat(string, "typed_object");
13281 else if(type->classObjectType == 3)
13282 strcat(string, "any_object");
13286 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
13288 if(type->byReference)
13289 strcat(string, " &");
13293 strcat(string, "void");
13296 strcat(string, type->isSigned ? "int" : "uint");
13299 strcat(string, type->isSigned ? "int64" : "uint64");
13302 strcat(string, type->isSigned ? "intptr" : "uintptr");
13305 strcat(string, type->isSigned ? "intsize" : "uintsize");
13308 strcat(string, type->isSigned ? "char" : "byte");
13311 strcat(string, "_Bool");
13314 strcat(string, type->isSigned ? "short" : "uint16");
13317 strcat(string, "float");
13320 strcat(string, "double");
13323 if(type->__anon1.__anon1.enumName)
13325 strcat(string, "struct ");
13326 strcat(string, type->__anon1.__anon1.enumName);
13328 else if(type->typeName)
13329 strcat(string, type->typeName);
13332 struct Type * member;
13334 strcat(string, "struct { ");
13335 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
13337 PrintType(member, string, 1, fullName);
13338 strcat(string, "; ");
13340 strcat(string, "}");
13344 if(type->__anon1.__anon1.enumName)
13346 strcat(string, "union ");
13347 strcat(string, type->__anon1.__anon1.enumName);
13349 else if(type->typeName)
13350 strcat(string, type->typeName);
13353 strcat(string, "union ");
13354 strcat(string, "(unnamed)");
13358 if(type->__anon1.__anon1.enumName)
13360 strcat(string, "enum ");
13361 strcat(string, type->__anon1.__anon1.enumName);
13363 else if(type->typeName)
13364 strcat(string, type->typeName);
13366 strcat(string, "int");
13369 strcat(string, "...");
13372 strcat(string, "subclass(");
13373 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
13374 strcat(string, ")");
13377 strcat(string, type->__anon1.templateParameter->identifier->string);
13380 strcat(string, "thisclass");
13383 strcat(string, "__builtin_va_list");
13389 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
13391 static void PrintName(struct Type * type, char * string, unsigned int fullName)
13393 if(type->name && type->name[0])
13396 strcat(string, type->name);
13399 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
13405 strcat(string, name);
13410 static void PrintAttribs(struct Type * type, char * string)
13414 if(type->dllExport)
13415 strcat(string, "dllexport ");
13416 if(type->attrStdcall)
13417 strcat(string, "stdcall ");
13421 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
13423 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13425 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
13426 PrintAttribs(type, string);
13427 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
13428 strcat(string, " const");
13429 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
13430 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13431 strcat(string, " (");
13432 if(type->kind == 13)
13434 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
13435 PrintAttribs(type->__anon1.type, string);
13437 if(type->kind == 13)
13439 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
13440 strcat(string, "*");
13442 strcat(string, " *");
13444 if(printConst && type->constant && type->kind == 13)
13445 strcat(string, " const");
13448 PrintTypeSpecs(type, string, fullName, printConst);
13451 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
13453 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13454 strcat(string, ")");
13455 if(type->kind == 12)
13456 PrintArraySize(type, string);
13457 else if(type->kind == 11)
13459 struct Type * param;
13461 strcat(string, "(");
13462 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
13464 PrintType(param, string, 1, fullName);
13466 strcat(string, ", ");
13468 strcat(string, ")");
13470 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13471 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
13474 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
13476 PrePrintType(type, string, fullName, (((void *)0)), printConst);
13477 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
13478 strcat(string, " ");
13479 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
13481 struct Symbol * _class = type->__anon1.__anon2.thisClass;
13483 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
13485 if(type->classObjectType == 1)
13486 strcat(string, "class");
13488 strcat(string, type->byReference ? "typed_object&" : "typed_object");
13490 else if(_class && _class->string)
13492 char * s = _class->string;
13498 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
13504 strcat(string, name);
13507 strcat(string, "::");
13509 if(printName && type->name)
13510 PrintName(type, string, fullName);
13511 PostPrintType(type, string, fullName);
13512 if(type->bitFieldCount)
13516 sprintf(count, ":%d", type->bitFieldCount);
13517 strcat(string, count);
13521 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13523 _PrintType(type, string, printName, fullName, 1);
13526 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13528 _PrintType(type, string, printName, fullName, 0);
13531 static struct Type * FindMember(struct Type * type, char * string)
13533 struct Type * memberType;
13535 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13537 if(!memberType->name)
13539 struct Type * subType = FindMember(memberType, string);
13544 else if(!strcmp(memberType->name, string))
13547 return (((void *)0));
13550 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
13552 struct Type * memberType;
13554 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13556 if(!memberType->name)
13558 struct Type * subType = FindMember(memberType, string);
13562 *offset += memberType->offset;
13566 else if(!strcmp(memberType->name, string))
13568 *offset += memberType->offset;
13572 return (((void *)0));
13575 extern unsigned int parseError;
13577 unsigned int GetParseError()
13582 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
13584 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
13586 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
13588 struct Expression * ParseExpressionString(char * expression)
13591 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
13592 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
13593 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13595 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13596 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
13597 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
13598 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13600 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13601 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
13603 parsedExpression = (((void *)0));
13605 expression_yyparse();
13606 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
13607 return parsedExpression;
13610 extern char * QMkString(const char * source);
13612 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
13614 struct Identifier * id = exp->__anon1.__anon1.identifier;
13615 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
13616 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13617 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13618 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
13620 if(_class && _class->type == 4)
13622 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
13623 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13627 struct __ecereNameSpace__ecere__com__Class * baseClass;
13629 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
13631 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
13633 for(value = e->values.first; value; value = value->next)
13635 if(!strcmp(value->name, id->string))
13640 char constant[256];
13642 FreeExpContents(exp);
13644 exp->isConstant = 1;
13645 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
13646 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
13648 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
13649 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13650 exp->expType = MkClassType(baseClass->fullName);
13658 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
13660 ProcessMethodType(method);
13661 exp->expType = __extension__ ({
13662 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13664 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
13668 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
13670 if(!prop->dataType)
13671 ProcessPropertyType(prop);
13672 exp->expType = prop->dataType;
13674 prop->dataType->refCount++;
13677 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
13679 if(!member->dataType)
13680 member->dataType = ProcessTypeString(member->dataTypeString, 0);
13681 exp->expType = member->dataType;
13682 if(member->dataType)
13683 member->dataType->refCount++;
13686 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
13688 if(!classProp->dataType)
13689 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
13690 if(classProp->constant)
13692 FreeExpContents(exp);
13693 exp->isConstant = 1;
13694 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
13697 exp->__anon1.__anon1.constant = QMkString((char *)classProp->Get(_class));
13701 char constant[256];
13704 sprintf(constant, "%d", (int)classProp->Get(_class));
13705 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13711 exp->expType = classProp->dataType;
13712 if(classProp->dataType)
13713 classProp->dataType->refCount++;
13719 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
13721 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
13722 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
13723 struct __ecereNameSpace__ecere__com__NameSpace * child;
13727 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)))
13729 data = ScanGlobalData(child, name);
13737 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
13739 extern char * strncpy(char * , const char * , size_t n);
13741 static struct GlobalData * FindGlobalData(char * name)
13744 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
13746 nameSpace = globalData;
13747 for(c = 0; name[c]; c++)
13749 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
13751 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
13752 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
13754 strncpy(spaceName, name + start, c - start);
13755 spaceName[c - start] = '\0';
13756 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
13757 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
13759 return (((void *)0));
13760 nameSpace = newSpace;
13768 return ScanGlobalData(nameSpace, name + start);
13770 return (((void *)0));
13773 static int definedExpStackPos;
13775 static void * definedExpStack[512];
13777 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
13779 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
13781 FreeExpContents(checkedExp);
13782 FreeType(checkedExp->expType);
13783 FreeType(checkedExp->destType);
13784 *checkedExp = *newExp;
13785 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13786 checkedExp->prev = prev;
13787 checkedExp->next = next;
13790 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
13792 extern int printf(const char * , ...);
13794 void __ecereMethod_Expression_Clear();
13796 void ApplyAnyObjectLogic(struct Expression * e)
13798 struct Type * destType = e->destType;
13800 if(destType && (destType->classObjectType == 3))
13802 if(e && e->expType)
13804 struct Type * type = e->expType;
13805 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
13807 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
13809 _class = type->__anon1._class->__anon1.registered;
13811 else if(type->kind == 19)
13813 _class = FindClass("ecere::com::Class")->__anon1.registered;
13817 char string[1024] = "";
13818 struct Symbol * classSym;
13820 PrintTypeNoConst(type, string, 0, 1);
13821 classSym = FindClass(string);
13823 _class = classSym->__anon1.registered;
13825 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)))
13827 if(!_class || strcmp(_class->fullName, "char *"))
13829 struct Expression * checkedExp = e, * newExp;
13831 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13833 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13835 if(checkedExp->type == 23)
13837 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13840 checkedExp = (*checkedExp->__anon1.list).last;
13842 else if(checkedExp->type == 11)
13843 checkedExp = checkedExp->__anon1.cast.exp;
13845 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
13847 newExp = checkedExp->__anon1.op.exp2;
13848 checkedExp->__anon1.op.exp2 = (((void *)0));
13849 FreeExpContents(checkedExp);
13850 if(e->expType && e->expType->passAsTemplate)
13854 ComputeTypeSize(e->expType);
13855 sprintf(size, "%d", e->expType->size);
13856 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))))));
13858 ReplaceExpContents(checkedExp, newExp);
13859 e->byReference = 1;
13861 else if(!e->byReference || (_class && _class->type == 5))
13863 struct Expression * checkedExp;
13866 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;
13868 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
13870 struct Context * context = PushContext();
13871 struct Declarator * decl;
13872 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13873 char typeString[1024];
13874 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13876 typeString[0] = '\0';
13878 newExp->prev = (((void *)0));
13879 newExp->next = (((void *)0));
13880 newExp->expType = (((void *)0));
13881 PrintTypeNoConst(e->expType, typeString, 0, 1);
13882 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13883 newExp->destType = ProcessType(specs, decl);
13884 curContext = context;
13888 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
13891 sprintf(name, "__internalValue%03X", internalValueCounter++);
13892 if(!curCompound->__anon1.compound.declarations)
13893 curCompound->__anon1.compound.declarations = MkList();
13894 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
13895 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
13896 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
13897 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
13900 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
13902 struct Type * type = e->destType;
13904 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13905 CopyTypeInto(e->destType, type);
13906 e->destType->refCount = 1;
13907 e->destType->classObjectType = 0;
13910 e->__anon1.compound->__anon1.compound.context = context;
13911 PopContext(context);
13912 curContext = context->parent;
13916 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13918 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13920 if(checkedExp->type == 23)
13922 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13925 checkedExp = (*checkedExp->__anon1.list).last;
13927 else if(checkedExp->type == 11)
13928 checkedExp = checkedExp->__anon1.cast.exp;
13931 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13933 *operand = *checkedExp;
13934 __ecereMethod_Expression_Clear(checkedExp);
13935 checkedExp->destType = ProcessTypeString("void *", 0);
13936 checkedExp->expType = checkedExp->destType;
13937 checkedExp->destType->refCount++;
13938 checkedExp->type = 4;
13939 checkedExp->__anon1.op.op = '&';
13940 checkedExp->__anon1.op.exp1 = (((void *)0));
13941 checkedExp->__anon1.op.exp2 = operand;
13950 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))))
13952 if(e->expType->classObjectType && destType && destType->classObjectType)
13958 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13961 thisExp->prev = (((void *)0));
13962 thisExp->next = (((void *)0));
13963 __ecereMethod_Expression_Clear(e);
13965 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
13966 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
13967 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
13969 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13970 CopyTypeInto(e->expType, thisExp->expType);
13971 e->expType->byReference = 0;
13972 e->expType->refCount = 1;
13973 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))
13975 e->expType->classObjectType = 0;
13980 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
13982 if(destType->kind == 14)
13984 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
13986 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))
13988 unsigned int byReference = e->expType->byReference;
13989 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13990 struct Declarator * decl;
13991 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13992 char typeString[1024];
13993 struct Type * type;
13994 int backupClassObjectType;
13995 unsigned int backupByReference;
13997 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
14001 backupClassObjectType = type->classObjectType;
14002 backupByReference = type->byReference;
14003 type->classObjectType = 0;
14004 type->byReference = 0;
14005 typeString[0] = '\0';
14006 PrintType(type, typeString, 0, 1);
14007 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
14008 type->classObjectType = backupClassObjectType;
14009 type->byReference = backupByReference;
14011 thisExp->prev = (((void *)0));
14012 thisExp->next = (((void *)0));
14013 __ecereMethod_Expression_Clear(e);
14014 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)))
14017 e->__anon1.op.op = '*';
14018 e->__anon1.op.exp1 = (((void *)0));
14019 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
14020 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14021 CopyTypeInto(e->expType, type);
14022 e->expType->byReference = 0;
14023 e->expType->refCount = 1;
14028 e->__anon1.cast.typeName = MkTypeName(specs, decl);
14029 e->__anon1.cast.exp = thisExp;
14030 e->byReference = 1;
14034 e->destType = destType;
14035 destType->refCount++;
14040 void ApplyLocation(struct Expression * exp, struct Location * loc)
14046 if(exp->__anon1.op.exp1)
14047 ApplyLocation(exp->__anon1.op.exp1, loc);
14048 if(exp->__anon1.op.exp2)
14049 ApplyLocation(exp->__anon1.op.exp2, loc);
14052 if(exp->__anon1.list)
14054 struct Expression * e;
14056 for(e = (*exp->__anon1.list).first; e; e = e->next)
14057 ApplyLocation(e, loc);
14061 if(exp->__anon1.index.index)
14063 struct Expression * e;
14065 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
14066 ApplyLocation(e, loc);
14068 if(exp->__anon1.index.exp)
14069 ApplyLocation(exp->__anon1.index.exp, loc);
14072 if(exp->__anon1.call.arguments)
14074 struct Expression * arg;
14076 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
14077 ApplyLocation(arg, loc);
14079 if(exp->__anon1.call.exp)
14080 ApplyLocation(exp->__anon1.call.exp, loc);
14084 if(exp->__anon1.member.exp)
14085 ApplyLocation(exp->__anon1.member.exp, loc);
14088 if(exp->__anon1.cast.exp)
14089 ApplyLocation(exp->__anon1.cast.exp, loc);
14092 if(exp->__anon1.cond.exp)
14094 struct Expression * e;
14096 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
14097 ApplyLocation(e, loc);
14099 if(exp->__anon1.cond.cond)
14100 ApplyLocation(exp->__anon1.cond.cond, loc);
14101 if(exp->__anon1.cond.elseExp)
14102 ApplyLocation(exp->__anon1.cond.elseExp, loc);
14105 if(exp->__anon1.vaArg.exp)
14106 ApplyLocation(exp->__anon1.vaArg.exp, loc);
14113 extern char * strstr(const char * , const char * );
14115 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DefinedExpression;
14117 struct __ecereNameSpace__ecere__com__DefinedExpression
14119 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
14120 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
14122 const char * value;
14123 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
14124 } __attribute__ ((gcc_struct));
14126 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14128 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14130 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
14132 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
14134 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
14136 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
14138 static void ProcessStatement(struct Statement * stmt);
14140 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
14142 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
14144 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
14146 extern const char * sourceFile;
14148 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
14150 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp_Type_specConst;
14152 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
14154 void ProcessExpressionType(struct Expression * exp)
14156 unsigned int unresolved = 0;
14157 struct Location oldyylloc = yylloc;
14158 unsigned int notByReference = 0;
14160 if(!exp || exp->expType)
14167 struct Identifier * id = exp->__anon1.__anon1.identifier;
14169 if(!id || !topContext)
14171 if(id->_class && id->_class->__anon1.__anon1.name)
14173 id->classSym = id->_class->__anon1.__anon1.symbol;
14175 if(!strcmp(id->string, "__runtimePlatform"))
14177 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
14180 else if(strstr(id->string, "__ecereClass") == id->string)
14182 exp->expType = ProcessTypeString("ecere::com::Class", 1);
14185 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
14187 ReplaceClassMembers(exp, thisClass);
14190 ProcessExpressionType(exp);
14193 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
14198 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14202 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
14208 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
14211 ProcessExpressionType(exp);
14215 else if(currentClass && !id->_class)
14217 if(ResolveIdWithClass(exp, currentClass, 1))
14220 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14225 struct Type * type = symbol->type;
14226 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
14228 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
14230 struct Context * context = SetupTemplatesContext(_class);
14232 type = ReplaceThisClassType(_class);
14233 FinishTemplatesContext(context);
14235 type->refCount = 0;
14237 FreeSpecifier(id->_class);
14238 id->_class = (((void *)0));
14239 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14240 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
14241 id->classSym = (((void *)0));
14242 exp->expType = type;
14245 if(type && (type->kind == 15))
14246 exp->isConstant = 1;
14247 if(symbol->isParam || !strcmp(id->string, "this"))
14249 if(_class && _class->type == 1 && !type->declaredWithStruct)
14250 exp->byReference = 1;
14252 if(symbol->isIterator)
14254 if(symbol->isIterator == 3)
14257 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
14258 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
14259 exp->expType = (((void *)0));
14260 ProcessExpressionType(exp);
14262 else if(symbol->isIterator != 4)
14265 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
14266 exp->__anon1.member.exp->expType = exp->expType;
14267 exp->__anon1.member.member = MkIdentifier("data");
14268 exp->expType = (((void *)0));
14269 ProcessExpressionType(exp);
14276 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
14278 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14282 strcpy(name, thisNameSpace);
14283 strcat(name, "::");
14284 strcat(name, id->string);
14285 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
14288 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
14293 for(c = 0; c < definedExpStackPos; c++)
14294 if(definedExpStack[c] == definedExp)
14296 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
14298 struct Location backupYylloc = yylloc;
14299 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
14301 definedExpStack[definedExpStackPos++] = definedExp;
14302 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
14303 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
14304 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14306 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14307 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
14308 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
14309 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14311 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14312 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
14314 parsedExpression = (((void *)0));
14316 expression_yyparse();
14317 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
14319 fileInput = backInput;
14320 yylloc = backupYylloc;
14321 if(parsedExpression)
14323 FreeIdentifier(id);
14325 exp->__anon1.list = MkListOne(parsedExpression);
14326 ApplyLocation(parsedExpression, &yylloc);
14327 ProcessExpressionType(exp);
14328 definedExpStackPos--;
14331 definedExpStackPos--;
14337 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
14343 struct GlobalData * data = (((void *)0));
14345 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14349 strcpy(name, thisNameSpace);
14350 strcat(name, "::");
14351 strcat(name, id->string);
14352 data = FindGlobalData(name);
14355 data = FindGlobalData(id->string);
14358 DeclareGlobalData(data);
14359 exp->expType = data->dataType;
14361 data->dataType->refCount++;
14362 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14363 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
14364 FreeSpecifier(id->_class);
14365 id->_class = (((void *)0));
14370 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
14372 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14376 strcpy(name, thisNameSpace);
14377 strcat(name, "::");
14378 strcat(name, id->string);
14379 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
14382 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
14387 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14388 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
14390 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
14391 strcpy(name, "__ecereFunction_");
14392 FullClassNameCat(name, id->string, 0);
14393 if(DeclareFunction(function, name))
14395 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14396 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
14398 exp->expType = function->dataType;
14399 if(function->dataType)
14400 function->dataType->refCount++;
14401 FreeSpecifier(id->_class);
14402 id->_class = (((void *)0));
14414 if(!exp->__anon1.instance->_class)
14416 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
14418 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
14421 ProcessInstantiationType(exp->__anon1.instance);
14422 exp->isConstant = exp->__anon1.instance->isConstant;
14423 if(exp->__anon1.instance->_class)
14425 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
14433 char * constant = exp->__anon1.__anon1.constant;
14434 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
14436 exp->expType = type;
14437 if(constant[0] == '\'')
14439 if((int)((unsigned char *)constant)[1] > 127)
14442 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
14446 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
14447 exp->__anon1.__anon1.constant = PrintUInt(ch);
14449 type->__anon1._class = FindClass("unichar");
14450 type->isSigned = 0;
14455 type->isSigned = 1;
14460 char * dot = strchr(constant, '.');
14461 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
14466 exponent = strchr(constant, 'p');
14468 exponent = strchr(constant, 'P');
14472 exponent = strchr(constant, 'e');
14474 exponent = strchr(constant, 'E');
14476 if(dot || exponent)
14478 if(strchr(constant, 'f') || strchr(constant, 'F'))
14482 type->isSigned = 1;
14486 unsigned int isSigned = constant[0] == '-';
14487 char * endP = (((void *)0));
14488 long long i64 = strtoll(constant, &endP, 0);
14489 uint64 ui64 = strtoull(constant, &endP, 0);
14490 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll"));
14494 if(i64 < (((int)0x80000000)))
14499 if(ui64 > (((int)0x7fffffff)))
14501 if(ui64 > (0xffffffff))
14504 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
14508 else if(constant[0] != '0' || !constant[1])
14511 type->kind = is64Bit ? 4 : 3;
14512 type->isSigned = isSigned;
14515 exp->isConstant = 1;
14516 if(exp->destType && exp->destType->kind == 7)
14518 else if(exp->destType && exp->destType->kind == 6)
14520 else if(exp->destType && exp->destType->kind == 4)
14527 exp->isConstant = 1;
14528 exp->expType = __extension__ ({
14529 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14531 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
14532 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14534 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = 1, __ecereInstance1;
14535 }), __ecereInstance2;
14541 ProcessExpressionType(exp->__anon1._new.size);
14542 exp->expType = __extension__ ({
14543 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14545 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
14547 DeclareType(exp->expType->__anon1.type, 0, 0);
14551 ProcessExpressionType(exp->__anon1._renew.size);
14552 ProcessExpressionType(exp->__anon1._renew.exp);
14553 exp->expType = __extension__ ({
14554 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14556 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
14558 DeclareType(exp->expType->__anon1.type, 0, 0);
14562 unsigned int assign = 0, boolResult = 0, boolOps = 0;
14563 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
14564 unsigned int useDestType = 0, useSideType = 0;
14565 struct Location oldyylloc = yylloc;
14566 unsigned int useSideUnit = 0;
14567 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
14568 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
14570 switch(exp->__anon1.op.op)
14624 if(exp->__anon1.op.exp1)
14631 if(exp->__anon1.op.op == '&')
14633 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
14635 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
14636 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14638 if(symbol && symbol->isIterator == 2)
14641 exp->__anon1.member.exp = exp->__anon1.op.exp2;
14642 exp->__anon1.member.member = MkIdentifier("key");
14643 exp->expType = (((void *)0));
14644 exp->__anon1.op.exp2->expType = symbol->type;
14645 symbol->type->refCount++;
14646 ProcessExpressionType(exp);
14652 if(exp->__anon1.op.exp1)
14654 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
14656 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
14658 if(exp->__anon1.op.exp1->destType)
14659 FreeType(exp->__anon1.op.exp1->destType);
14660 exp->__anon1.op.exp1->destType = exp->destType;
14661 exp->__anon1.op.exp1->opDestType = 1;
14663 exp->destType->refCount++;
14667 if(exp->__anon1.op.exp1->destType)
14668 FreeType(exp->__anon1.op.exp1->destType);
14669 exp->__anon1.op.exp1->destType = dummy;
14672 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14673 exp->__anon1.op.exp1->destType->count++;
14674 ProcessExpressionType(exp->__anon1.op.exp1);
14675 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14676 exp->__anon1.op.exp1->destType->count--;
14677 exp->__anon1.op.exp1->opDestType = 0;
14678 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)
14680 exp->__anon1.op.exp2 = MkExpConstant("1");
14681 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
14684 if(exp->__anon1.op.exp1->destType == dummy)
14687 exp->__anon1.op.exp1->destType = (((void *)0));
14689 type1 = exp->__anon1.op.exp1->expType;
14691 if(exp->__anon1.op.exp2)
14693 char expString[10240];
14695 expString[0] = '\0';
14696 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
14698 if(exp->__anon1.op.exp1)
14700 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
14701 if(exp->__anon1.op.exp1->expType)
14702 exp->__anon1.op.exp1->expType->refCount++;
14706 exp->__anon1.op.exp2->destType = exp->destType;
14707 if(!exp->__anon1.op.exp1 || exp->__anon1.op.op != '&')
14708 exp->__anon1.op.exp2->opDestType = 1;
14710 exp->destType->refCount++;
14714 exp->expType = type1;
14719 PrintExpression(exp->__anon1.op.exp2, expString);
14720 if(type1 && type1->kind == 13)
14722 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)
14723 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
14724 else if(exp->__anon1.op.op == '=')
14726 if(exp->__anon1.op.exp2->destType)
14727 FreeType(exp->__anon1.op.exp2->destType);
14728 exp->__anon1.op.exp2->destType = type1;
14735 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)
14739 if(exp->__anon1.op.exp2->destType)
14740 FreeType(exp->__anon1.op.exp2->destType);
14741 exp->__anon1.op.exp2->destType = type1;
14748 exp->expType = type1;
14750 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
14752 if(exp->__anon1.op.exp2->destType)
14753 FreeType(exp->__anon1.op.exp2->destType);
14754 exp->__anon1.op.exp2->destType = exp->destType;
14755 if(exp->__anon1.op.op != '&')
14756 exp->__anon1.op.exp2->opDestType = 1;
14758 exp->destType->refCount++;
14762 if(exp->__anon1.op.exp2->destType)
14763 FreeType(exp->__anon1.op.exp2->destType);
14764 exp->__anon1.op.exp2->destType = dummy;
14767 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))
14769 FreeType(exp->__anon1.op.exp2->destType);
14770 exp->__anon1.op.exp2->destType = type1;
14773 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14774 exp->__anon1.op.exp2->destType->count++;
14775 if(exp->__anon1.op.op == SIZEOF)
14777 struct Expression * e = exp->__anon1.op.exp2;
14779 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
14781 if(e->type == 5 || e->type == 32 || e->type == 23)
14784 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
14786 e = (*e->__anon1.list).last;
14789 if(e->type == 11 && e->__anon1.cast.exp)
14790 e->__anon1.cast.exp->needCast = 1;
14792 ProcessExpressionType(exp->__anon1.op.exp2);
14793 exp->__anon1.op.exp2->opDestType = 0;
14794 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14795 exp->__anon1.op.exp2->destType->count--;
14796 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
14798 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)
14800 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
14801 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14803 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)))
14805 if(exp->__anon1.op.op == ADD_ASSIGN)
14806 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14808 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))
14810 if(exp->__anon1.op.op == ADD_ASSIGN)
14811 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14813 else if(inCompiler)
14815 char type1String[1024];
14816 char type2String[1024];
14818 type1String[0] = '\0';
14819 type2String[0] = '\0';
14820 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
14821 PrintType(type1, type2String, 0, 1);
14822 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
14823 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
14826 if(exp->__anon1.op.exp2->destType == dummy)
14829 exp->__anon1.op.exp2->destType = (((void *)0));
14831 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
14833 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14834 type2->refCount = 1;
14835 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
14836 type2->isSigned = 1;
14838 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))
14840 type2 = __extension__ ({
14841 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14843 __ecereInstance1->kind = 3, __ecereInstance1;
14845 type2->refCount = 1;
14846 type2->isSigned = 1;
14850 type2 = exp->__anon1.op.exp2->expType;
14856 if(exp->__anon1.op.op == SIZEOF)
14858 exp->expType = __extension__ ({
14859 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14861 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
14863 exp->isConstant = 1;
14865 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
14867 exp->expType = Dereference(type2);
14868 if(type2 && type2->kind == 8)
14869 notByReference = 1;
14871 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
14872 exp->expType = Reference(type2);
14877 if(exp->__anon1.op.exp1)
14879 if(exp->__anon1.op.exp1->destType)
14880 FreeType(exp->__anon1.op.exp1->destType);
14881 exp->__anon1.op.exp1->destType = MkClassType("bool");
14882 exp->__anon1.op.exp1->destType->truth = 1;
14883 if(!exp->__anon1.op.exp1->expType)
14884 ProcessExpressionType(exp->__anon1.op.exp1);
14886 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
14887 FreeType(exp->__anon1.op.exp1->expType);
14888 exp->__anon1.op.exp1->expType = MkClassType("bool");
14889 exp->__anon1.op.exp1->expType->truth = 1;
14891 if(exp->__anon1.op.exp2)
14893 if(exp->__anon1.op.exp2->destType)
14894 FreeType(exp->__anon1.op.exp2->destType);
14895 exp->__anon1.op.exp2->destType = MkClassType("bool");
14896 exp->__anon1.op.exp2->destType->truth = 1;
14897 if(!exp->__anon1.op.exp2->expType)
14898 ProcessExpressionType(exp->__anon1.op.exp2);
14900 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
14901 FreeType(exp->__anon1.op.exp2->expType);
14902 exp->__anon1.op.exp2->expType = MkClassType("bool");
14903 exp->__anon1.op.exp2->expType->truth = 1;
14906 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")))))
14908 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"))))
14910 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)))
14912 struct Type * intType;
14914 if(!type1->__anon1._class->__anon1.registered->dataType)
14915 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
14916 if(!type2->__anon1._class->__anon1.registered->dataType)
14917 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
14918 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
14919 if(exp->__anon1.op.exp1->destType)
14920 FreeType(exp->__anon1.op.exp1->destType);
14921 if(exp->__anon1.op.exp2->destType)
14922 FreeType(exp->__anon1.op.exp2->destType);
14923 exp->__anon1.op.exp1->destType = intType;
14924 exp->__anon1.op.exp2->destType = intType;
14925 intType->refCount++;
14929 if(exp->__anon1.op.exp2->destType)
14930 FreeType(exp->__anon1.op.exp2->destType);
14931 exp->__anon1.op.exp2->destType = type1;
14933 if(exp->__anon1.op.exp1->destType)
14934 FreeType(exp->__anon1.op.exp1->destType);
14935 exp->__anon1.op.exp1->destType = type2;
14938 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)
14939 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);
14940 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
14942 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
14946 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
14948 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
14949 ProcessExpressionType(exp->__anon1.op.exp1);
14950 if(type2->kind != 13)
14952 ProcessExpressionType(classExp);
14953 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
14954 if(!exp->__anon1.op.exp2->expType)
14958 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
14961 ProcessExpressionType(exp->__anon1.op.exp2);
14965 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)))
14967 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
14968 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14969 exp->expType = type1;
14973 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)))
14975 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
14976 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14977 exp->expType = type2;
14981 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))
14983 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
14987 unsigned int success = 0;
14989 if(type1->kind == 13 && type2->kind == 13)
14991 if(exp->__anon1.op.op == '+')
14992 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14993 else if(exp->__anon1.op.op == '-')
14995 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
14997 exp->expType = __extension__ ({
14998 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15000 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
15003 if(type1->__anon1.type->kind == 20)
15005 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
15009 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
15011 ProcessExpressionType(classExp);
15013 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"))));
15014 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
15022 if(!success && exp->__anon1.op.exp1->type == 2)
15024 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15027 FreeType(exp->expType);
15028 exp->expType = exp->__anon1.op.exp1->destType;
15029 if(exp->__anon1.op.exp1->destType)
15030 exp->__anon1.op.exp1->destType->refCount++;
15033 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
15036 FreeType(exp->expType);
15037 exp->expType = exp->__anon1.op.exp2->destType;
15038 if(exp->__anon1.op.exp2->destType)
15039 exp->__anon1.op.exp2->destType->refCount++;
15045 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
15048 FreeType(exp->expType);
15049 exp->expType = exp->__anon1.op.exp2->destType;
15050 if(exp->__anon1.op.exp2->destType)
15051 exp->__anon1.op.exp2->destType->refCount++;
15054 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15057 FreeType(exp->expType);
15058 exp->expType = exp->__anon1.op.exp1->destType;
15059 if(exp->__anon1.op.exp1->destType)
15060 exp->__anon1.op.exp1->destType->refCount++;
15066 char expString1[10240];
15067 char expString2[10240];
15071 expString1[0] = '\0';
15072 expString2[0] = '\0';
15077 PrintExpression(exp->__anon1.op.exp1, expString1);
15078 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15079 PrintExpression(exp->__anon1.op.exp2, expString2);
15080 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15081 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
15082 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
15084 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
15088 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)
15090 if(exp->__anon1.op.exp1->destType)
15091 FreeType(exp->__anon1.op.exp1->destType);
15092 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15093 if(type2->__anon1._class->__anon1.registered->dataType)
15094 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15095 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
15096 exp->expType = type2;
15100 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)
15102 if(exp->__anon1.op.exp2->destType)
15103 FreeType(exp->__anon1.op.exp2->destType);
15104 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15105 if(type1->__anon1._class->__anon1.registered->dataType)
15106 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15107 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
15108 exp->expType = type1;
15114 unsigned int valid = 0;
15116 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
15118 if(exp->__anon1.op.exp2->destType)
15119 FreeType(exp->__anon1.op.exp2->destType);
15120 if(!type1->__anon1._class->__anon1.registered->dataType)
15121 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
15122 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15123 exp->__anon1.op.exp2->destType->refCount++;
15124 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
15127 type2 = exp->__anon1.op.exp2->destType;
15130 exp->expType = type2;
15133 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
15135 if(exp->__anon1.op.exp1->destType)
15136 FreeType(exp->__anon1.op.exp1->destType);
15137 if(!type2->__anon1._class->__anon1.registered->dataType)
15138 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
15139 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15140 exp->__anon1.op.exp1->destType->refCount++;
15141 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
15142 type1 = exp->__anon1.op.exp1->destType;
15143 exp->expType = type1;
15146 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
15148 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
15149 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
15151 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
15153 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15155 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
15158 FreeType(exp->expType);
15159 exp->expType = exp->__anon1.op.exp2->expType;
15160 if(exp->__anon1.op.exp2->expType)
15161 exp->__anon1.op.exp2->expType->refCount++;
15165 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15167 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
15170 FreeType(exp->expType);
15171 exp->expType = exp->__anon1.op.exp1->expType;
15172 if(exp->__anon1.op.exp1->expType)
15173 exp->__anon1.op.exp1->expType->refCount++;
15180 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15182 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
15185 FreeType(exp->expType);
15186 exp->expType = exp->__anon1.op.exp1->expType;
15187 if(exp->__anon1.op.exp1->expType)
15188 exp->__anon1.op.exp1->expType->refCount++;
15192 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15194 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
15197 FreeType(exp->expType);
15198 exp->expType = exp->__anon1.op.exp2->expType;
15199 if(exp->__anon1.op.exp2->expType)
15200 exp->__anon1.op.exp2->expType->refCount++;
15208 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))
15210 if(exp->__anon1.op.exp1->destType)
15211 FreeType(exp->__anon1.op.exp1->destType);
15212 exp->__anon1.op.exp1->destType = type2;
15214 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15217 FreeType(exp->expType);
15218 exp->expType = exp->__anon1.op.exp1->destType;
15219 if(exp->__anon1.op.exp1->destType)
15220 exp->__anon1.op.exp1->destType->refCount++;
15225 if(exp->__anon1.op.exp2->destType)
15226 FreeType(exp->__anon1.op.exp2->destType);
15227 exp->__anon1.op.exp2->destType = type1;
15229 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
15232 FreeType(exp->expType);
15233 exp->expType = exp->__anon1.op.exp2->destType;
15234 if(exp->__anon1.op.exp2->destType)
15235 exp->__anon1.op.exp2->destType->refCount++;
15237 else if(type1 && type2)
15239 char expString1[10240];
15240 char expString2[10240];
15241 char type1String[1024];
15242 char type2String[1024];
15244 expString1[0] = '\0';
15245 expString2[0] = '\0';
15246 type1String[0] = '\0';
15247 type2String[0] = '\0';
15250 PrintExpression(exp->__anon1.op.exp1, expString1);
15251 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15252 PrintExpression(exp->__anon1.op.exp2, expString2);
15253 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15254 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
15255 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
15257 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
15258 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
15260 exp->expType = exp->__anon1.op.exp1->expType;
15261 if(exp->__anon1.op.exp1->expType)
15262 exp->__anon1.op.exp1->expType->refCount++;
15264 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15266 exp->expType = exp->__anon1.op.exp2->expType;
15267 if(exp->__anon1.op.exp2->expType)
15268 exp->__anon1.op.exp2->expType->refCount++;
15276 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15278 struct Type * oldType = exp->__anon1.op.exp1->expType;
15280 exp->__anon1.op.exp1->expType = (((void *)0));
15281 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15284 exp->__anon1.op.exp1->expType = oldType;
15286 if(exp->__anon1.op.exp1->destType)
15287 FreeType(exp->__anon1.op.exp1->destType);
15288 exp->__anon1.op.exp1->destType = type2;
15290 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15293 FreeType(exp->expType);
15294 exp->expType = exp->__anon1.op.exp1->destType;
15295 if(exp->__anon1.op.exp1->destType)
15296 exp->__anon1.op.exp1->destType->refCount++;
15300 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
15302 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
15304 if(exp->__anon1.op.exp1->destType)
15305 FreeType(exp->__anon1.op.exp1->destType);
15306 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15307 if(type2->__anon1._class->__anon1.registered->dataType)
15308 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15309 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
15311 if(exp->__anon1.op.op == '!')
15313 exp->expType = MkClassType("bool");
15314 exp->expType->truth = 1;
15318 exp->expType = type2;
15323 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
15325 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
15327 if(exp->__anon1.op.exp2->destType)
15328 FreeType(exp->__anon1.op.exp2->destType);
15329 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15330 if(type1->__anon1._class->__anon1.registered->dataType)
15331 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15332 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
15334 exp->expType = type1;
15340 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
15342 char expString[10000];
15344 expString[0] = '\0';
15347 PrintExpression(exp->__anon1.op.exp1, expString);
15348 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15351 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15353 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
15355 char expString[10240];
15357 expString[0] = '\0';
15360 PrintExpression(exp->__anon1.op.exp2, expString);
15361 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15364 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15368 FreeType(exp->expType);
15369 exp->expType = MkClassType("bool");
15370 exp->expType->truth = 1;
15372 if(exp->__anon1.op.op != SIZEOF)
15373 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
15374 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
15376 DeclareType(exp->__anon1.op.exp2->expType, 0, 0);
15378 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
15379 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
15380 yylloc = oldyylloc;
15389 struct Expression * e;
15391 exp->isConstant = 1;
15392 for(e = (*exp->__anon1.list).first; e; e = e->next)
15394 unsigned int inced = 0;
15398 FreeType(e->destType);
15399 e->opDestType = exp->opDestType;
15400 e->destType = exp->destType;
15403 exp->destType->refCount++;
15404 e->destType->count++;
15408 ProcessExpressionType(e);
15410 exp->destType->count--;
15411 if(!exp->expType && !e->next)
15413 exp->expType = e->expType;
15415 e->expType->refCount++;
15418 exp->isConstant = 0;
15420 e = (*exp->__anon1.list).first;
15421 if(!e->next && e->type == 8)
15423 struct Expression * next = exp->next, * prev = exp->prev;
15425 FreeType(exp->expType);
15426 FreeType(exp->destType);
15427 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
15431 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
15432 ProcessExpressionType(exp);
15438 struct Expression * e;
15440 exp->isConstant = 1;
15441 ProcessExpressionType(exp->__anon1.index.exp);
15442 if(!exp->__anon1.index.exp->isConstant)
15443 exp->isConstant = 0;
15444 if(exp->__anon1.index.exp->expType)
15446 struct Type * source = exp->__anon1.index.exp->expType;
15448 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
15450 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
15451 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
15453 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
15455 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
15456 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
15458 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
15460 if(type->kind == 8)
15461 type->constant = 1;
15462 else if(type->kind == 13)
15464 struct Type * t = type;
15466 while(t->kind == 13)
15467 t = t->__anon1.type;
15470 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
15475 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
15477 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
15480 FreeType(e->destType);
15481 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
15483 ProcessExpressionType(e);
15488 exp->isConstant = 0;
15491 exp->expType = Dereference(exp->__anon1.index.exp->expType);
15493 DeclareType(exp->expType, 0, 0);
15498 struct Expression * e;
15499 struct Type * functionType;
15500 struct Type * methodType = (((void *)0));
15506 PrintExpression(exp->__anon1.call.exp, name);
15507 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
15509 PrintExpression(exp->__anon1.call.exp, name);
15512 if(exp->__anon1.call.exp->type == 0)
15514 struct Expression * idExp = exp->__anon1.call.exp;
15515 struct Identifier * id = idExp->__anon1.__anon1.identifier;
15517 if(!strcmp(id->string, "__builtin_frame_address"))
15519 exp->expType = ProcessTypeString("void *", 1);
15520 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15521 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15524 else if(!strcmp(id->string, "__ENDIAN_PAD"))
15526 exp->expType = ProcessTypeString("int", 1);
15527 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15528 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15531 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
15533 struct Expression * a = (((void *)0));
15534 struct Expression * b = (((void *)0));
15535 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
15537 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
15539 a = (*exp->__anon1.call.arguments).first;
15540 b = (*exp->__anon1.call.arguments).last;
15544 else if((*exp->__anon1.call.arguments).count == 1)
15546 a = (*exp->__anon1.call.arguments).first;
15551 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
15552 idExp->__anon1.__anon1.identifier = (((void *)0));
15553 FreeExpContents(exp);
15554 ProcessExpressionType(a);
15556 ProcessExpressionType(b);
15558 exp->__anon1.list = MkList();
15559 if(a->expType && (!b || b->expType))
15561 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
15565 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15566 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
15567 struct Declaration * decl;
15568 char temp1[1024], temp2[1024];
15570 GetTypeSpecs(a->expType, specs);
15571 if(a && !a->isConstant && a->type != 0)
15573 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
15574 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
15575 tempExp1 = QMkExpId(temp1);
15576 tempExp1->expType = a->expType;
15578 a->expType->refCount++;
15579 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
15581 if(b && !b->isConstant && b->type != 0)
15583 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
15584 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
15585 tempExp2 = QMkExpId(temp2);
15586 tempExp2->expType = b->expType;
15588 b->expType->refCount++;
15589 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
15591 decl = MkDeclaration(specs, decls);
15592 if(!curCompound->__anon1.compound.declarations)
15593 curCompound->__anon1.compound.declarations = MkList();
15594 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
15598 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
15600 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
15602 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
15603 exp->expType = a->expType;
15605 a->expType->refCount++;
15607 else if(!strcmp(id->string, "Abs"))
15609 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
15610 exp->expType = a->expType;
15612 a->expType->refCount++;
15614 else if(!strcmp(id->string, "Sgn"))
15616 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"))))));
15617 exp->expType = ProcessTypeString("int", 0);
15619 FreeExpression(tempExp1);
15621 FreeExpression(tempExp2);
15622 FreeIdentifier(id);
15628 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
15630 if(!exp->__anon1.call.exp->destType)
15632 exp->__anon1.call.exp->destType = dummy;
15635 ProcessExpressionType(exp->__anon1.call.exp);
15636 if(exp->__anon1.call.exp->destType == dummy)
15639 exp->__anon1.call.exp->destType = (((void *)0));
15643 functionType = exp->__anon1.call.exp->expType;
15644 if(functionType && functionType->kind == 16)
15646 methodType = functionType;
15647 functionType = methodType->__anon1.__anon3.method->dataType;
15648 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
15650 char typeString[1024];
15652 typeString[0] = '\0';
15654 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
15656 functionType->__anon1.__anon2.thisClass = (((void *)0));
15657 PrintType(functionType, typeString, 1, 1);
15658 functionType->__anon1.__anon2.thisClass = back;
15660 if(strstr(typeString, "thisclass"))
15662 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15663 struct Declarator * decl;
15666 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15668 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
15669 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))
15670 thisClassParams = 0;
15671 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15673 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
15675 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
15676 ProcessDeclarator(decl);
15677 thisClass = backupThisClass;
15679 thisClassParams = 1;
15680 functionType = ProcessType(specs, decl);
15681 functionType->refCount = 0;
15682 FinishTemplatesContext(context);
15684 FreeList(specs, FreeSpecifier);
15685 FreeDeclarator(decl);
15689 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
15691 struct Type * type = functionType->__anon1.type;
15693 if(!functionType->refCount)
15695 functionType->__anon1.type = (((void *)0));
15696 FreeType(functionType);
15698 functionType = type;
15700 if(functionType && functionType->kind != 11)
15702 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
15704 else if(functionType)
15706 unsigned int emptyParams = 0, noParams = 0;
15707 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
15708 struct Type * type = functionType->__anon1.__anon2.params.first;
15709 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
15711 struct Location oldyylloc = yylloc;
15715 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
15717 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
15720 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
15722 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)
15724 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
15727 e->destType = type;
15729 type = functionType->__anon1.__anon2.params.first;
15732 type->refCount = 0;
15734 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
15736 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
15737 type->byReference = functionType->byReference;
15738 type->typedByReference = functionType->typedByReference;
15741 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
15743 e->destType = type;
15745 type = functionType->__anon1.__anon2.params.first;
15748 type->refCount = 0;
15751 if(type && type->kind == 0)
15754 if(!type->refCount)
15756 type = (((void *)0));
15758 for(; e; e = e->next)
15760 if(!type && !emptyParams)
15763 if(methodType && methodType->__anon1.__anon3.methodClass)
15764 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);
15766 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);
15769 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
15771 struct Type * templatedType = (((void *)0));
15772 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
15773 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
15776 if(_class && _class->templateArgs)
15778 struct __ecereNameSpace__ecere__com__Class * sClass;
15780 for(sClass = _class; sClass; sClass = sClass->base)
15782 if(sClass->templateClass)
15783 sClass = sClass->templateClass;
15785 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
15787 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
15789 struct __ecereNameSpace__ecere__com__Class * nextClass;
15791 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
15793 if(nextClass->templateClass)
15794 nextClass = nextClass->templateClass;
15795 id += nextClass->templateParams.count;
15805 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
15807 unsigned int constant = type->constant;
15808 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
15811 struct Context * context = SetupTemplatesContext(_class);
15813 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
15814 FinishTemplatesContext(context);
15816 if(templatedType->kind == 8 && constant)
15817 templatedType->constant = 1;
15818 else if(templatedType->kind == 13)
15820 struct Type * t = templatedType->__anon1.type;
15822 while(t->kind == 13)
15823 t = t->__anon1.type;
15825 t->constant = constant;
15827 e->destType = templatedType;
15830 templatedType->passAsTemplate = 1;
15835 e->destType = type;
15842 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
15844 e->destType = type->prev;
15845 e->destType->refCount++;
15849 e->destType = type;
15854 if(type && type->kind != 14)
15856 struct Type * next = type->next;
15858 if(!type->refCount)
15863 if(type && type->kind != 14)
15865 if(methodType && methodType->__anon1.__anon3.methodClass)
15866 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);
15868 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);
15870 yylloc = oldyylloc;
15871 if(type && !type->refCount)
15876 functionType = __extension__ ({
15877 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15879 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
15881 if(exp->__anon1.call.exp->type == 0)
15883 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
15887 struct Symbol * symbol;
15888 struct Location oldyylloc = yylloc;
15890 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
15891 if(strstr(string, "__builtin_") == string)
15895 functionType->__anon1.__anon2.returnType = exp->destType;
15896 exp->destType->refCount++;
15900 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
15901 symbol = __extension__ ({
15902 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
15904 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
15906 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
15907 if(strstr(symbol->string, "::"))
15908 globalContext->hasNameSpace = 1;
15909 yylloc = oldyylloc;
15912 else if(exp->__anon1.call.exp->type == 8)
15916 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
15917 if(!functionType->__anon1.__anon2.returnType)
15919 functionType->__anon1.__anon2.returnType = __extension__ ({
15920 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15922 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
15926 if(functionType && functionType->kind == 11)
15928 exp->expType = functionType->__anon1.__anon2.returnType;
15929 if(functionType->__anon1.__anon2.returnType)
15930 functionType->__anon1.__anon2.returnType->refCount++;
15931 if(!functionType->refCount)
15932 FreeType(functionType);
15934 if(exp->__anon1.call.arguments)
15936 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
15937 ProcessExpressionType(e);
15943 struct Type * type;
15944 struct Location oldyylloc = yylloc;
15945 unsigned int thisPtr;
15946 struct Expression * checkExp = exp->__anon1.member.exp;
15950 if(checkExp->type == 11)
15951 checkExp = checkExp->__anon1.cast.exp;
15952 else if(checkExp->type == 5)
15953 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
15957 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
15958 exp->thisPtr = thisPtr;
15959 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
15961 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
15963 ProcessExpressionType(exp->__anon1.member.exp);
15964 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)
15966 exp->isConstant = 0;
15969 exp->isConstant = exp->__anon1.member.exp->isConstant;
15970 type = exp->__anon1.member.exp->expType;
15972 if(type && (type->kind == 20))
15974 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
15975 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
15979 for(param = _class->templateParams.first; param; param = param->next)
15981 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
15985 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
15987 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
15991 struct Expression * expMember = exp->__anon1.member.exp;
15992 struct Declarator * decl;
15993 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15994 char thisClassTypeString[1024];
15996 FreeIdentifier(exp->__anon1.member.member);
15997 ProcessExpressionType(argExp);
15999 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
16003 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
16004 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
16007 strcpy(thisClassTypeString, _class->fullName);
16009 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
16010 exp->expType = ProcessType(specs, decl);
16011 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
16013 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
16014 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
16015 int paramCount = 0;
16016 int lastParam = -1;
16017 char templateString[1024];
16018 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
16020 sprintf(templateString, "%s<", expClass->templateClass->fullName);
16021 for(cClass = expClass; cClass; cClass = cClass->base)
16025 for(param = cClass->templateParams.first; param; param = param->next)
16028 struct __ecereNameSpace__ecere__com__Class * sClass;
16029 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
16031 for(sClass = cClass->base; sClass; sClass = sClass->base)
16032 id += sClass->templateParams.count;
16033 arg = expClass->templateArgs[id];
16034 for(sClass = _class; sClass; sClass = sClass->base)
16036 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
16038 struct __ecereNameSpace__ecere__com__Class * nextClass;
16040 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
16041 p += nextClass->templateParams.count;
16042 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
16044 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
16046 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16048 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
16049 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
16056 char argument[256];
16058 argument[0] = '\0';
16059 switch(param->type)
16063 char expString[1024];
16064 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16065 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16066 struct Expression * exp;
16067 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16069 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16070 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16071 ProcessExpressionType(exp);
16072 ComputeExpression(exp);
16073 expString[0] = '\0';
16074 PrintExpression(exp, expString);
16075 strcat(argument, expString);
16076 FreeExpression(exp);
16081 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16086 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16088 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
16089 strcat(argument, thisClassTypeString);
16091 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16099 strcat(templateString, ", ");
16100 if(lastParam != p - 1)
16102 strcat(templateString, param->name);
16103 strcat(templateString, " = ");
16105 strcat(templateString, argument);
16114 int len = strlen(templateString);
16116 if(templateString[len - 1] == '>')
16117 templateString[len++] = ' ';
16118 templateString[len++] = '>';
16119 templateString[len++] = '\0';
16122 struct Context * context = SetupTemplatesContext(_class);
16124 FreeType(exp->expType);
16125 exp->expType = ProcessTypeString(templateString, 0);
16126 FinishTemplatesContext(context);
16130 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")))))))));
16133 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
16135 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
16138 if(type && (type->kind == 20))
16140 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)))
16142 struct Identifier * id = exp->__anon1.member.member;
16143 int typeKind = type->kind;
16144 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));
16146 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
16148 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
16153 if(typeKind == 3 || typeKind == 15)
16154 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
16157 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
16159 _class = type->__anon1._class->__anon1.registered;
16161 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
16163 _class = FindClass("char *")->__anon1.registered;
16165 else if(type->kind == 13)
16167 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
16168 FreeType(exp->expType);
16169 exp->expType = ProcessTypeString("uintptr", 0);
16170 exp->byReference = 1;
16174 char string[1024] = "";
16175 struct Symbol * classSym;
16177 PrintTypeNoConst(type, string, 0, 1);
16178 classSym = FindClass(string);
16180 _class = classSym->__anon1.registered;
16186 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
16187 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
16188 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
16189 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
16190 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
16192 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
16193 exp->__anon1.member.memberType = 1;
16194 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
16195 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
16198 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
16200 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16201 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
16203 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16205 member = (((void *)0));
16207 if(!member && !prop)
16208 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16209 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
16210 exp->__anon1.member.thisPtr = 1;
16214 unsigned int useMemberForNonConst = 0;
16218 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
16219 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);
16220 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16221 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
16223 if((!prop || useMemberForNonConst) && !member)
16225 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
16228 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16229 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);
16230 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16231 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16236 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
16237 prop = (((void *)0));
16239 member = (((void *)0));
16243 if(!prop && !member && !method)
16244 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
16245 if(!prop && !member && !method)
16249 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
16252 exp->__anon1.member.memberType = 5;
16253 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
16257 char structName[1024];
16258 struct Identifier * id = exp->__anon1.member.member;
16259 struct Expression * classExp = exp->__anon1.member.exp;
16262 FreeType(classExp->expType);
16263 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
16264 strcpy(structName, "__ecereClassData_");
16265 FullClassNameCat(structName, type->__anon1._class->string, 0);
16267 exp->__anon1.member.member = id;
16268 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"))))))));
16270 ProcessExpressionType(exp);
16276 struct Symbol * classSym = FindClass(id->string);
16280 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
16283 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
16287 if(exp->__anon1.member.exp->destType)
16288 FreeType(exp->__anon1.member.exp->destType);
16290 if(method && !method->_class->symbol)
16291 method->_class->symbol = FindClass(method->_class->fullName);
16292 if(prop && !prop->_class->symbol)
16293 prop->_class->symbol = FindClass(prop->_class->fullName);
16294 exp->__anon1.member.exp->destType = __extension__ ({
16295 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16297 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 8, __ecereInstance1->__anon1._class = prop ? prop->_class->symbol : method ? method->_class->symbol : _class->symbol, __ecereInstance1;
16302 exp->__anon1.member.memberType = 1;
16303 if(!prop->dataType)
16304 ProcessPropertyType(prop);
16305 exp->expType = prop->dataType;
16306 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
16308 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16310 CopyTypeInto(type, exp->expType);
16311 type->refCount = 1;
16312 type->constant = 1;
16313 exp->expType = type;
16315 else if(prop->dataType)
16316 prop->dataType->refCount++;
16320 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16322 FreeExpContents(exp);
16324 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16325 ProcessExpressionType(exp);
16328 exp->__anon1.member.memberType = 3;
16329 DeclareStruct(_class->fullName, 0);
16330 if(!member->dataType)
16332 struct Context * context = SetupTemplatesContext(_class);
16334 member->dataType = ProcessTypeString(member->dataTypeString, 0);
16335 FinishTemplatesContext(context);
16337 exp->expType = member->dataType;
16338 if(member->dataType)
16339 member->dataType->refCount++;
16341 else if(revConvert)
16343 exp->__anon1.member.memberType = 4;
16344 exp->expType = MkClassType(revConvert->_class->fullName);
16349 exp->__anon1.member.memberType = 2;
16351 if(!method->dataType)
16352 ProcessMethodType(method);
16353 exp->expType = __extension__ ({
16354 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16356 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
16358 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
16359 exp->expType->__anon1.__anon3.usedClass = _class;
16361 else if(!classProp)
16363 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16365 FreeExpContents(exp);
16367 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16368 FreeType(exp->expType);
16369 exp->expType = MkClassType("ecere::com::Class");
16372 yylloc = exp->__anon1.member.member->loc;
16373 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
16375 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
16377 if(_class && exp->expType)
16379 struct __ecereNameSpace__ecere__com__Class * tClass;
16381 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
16382 while(tClass && !tClass->templateClass)
16383 tClass = tClass->base;
16384 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
16387 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16388 struct __ecereNameSpace__ecere__com__Class * sClass;
16390 for(sClass = tClass; sClass; sClass = sClass->base)
16393 if(sClass->templateClass)
16394 sClass = sClass->templateClass;
16395 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16397 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
16399 for(sClass = sClass->base; sClass; sClass = sClass->base)
16400 id += sClass->templateParams.count;
16408 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
16410 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16411 struct Context * context = SetupTemplatesContext(tClass);
16412 unsigned int constant = exp->expType->constant;
16414 FreeType(exp->expType);
16415 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16416 if(exp->expType->kind == 8 && constant)
16417 exp->expType->constant = 1;
16418 else if(exp->expType->kind == 13)
16420 struct Type * t = exp->expType->__anon1.type;
16422 while(t->kind == 13)
16423 t = t->__anon1.type;
16425 t->constant = constant;
16429 if(exp->expType->kind == 21)
16431 FreeType(exp->expType);
16432 exp->expType = ReplaceThisClassType(_class);
16434 if(tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType))))
16435 exp->expType->passAsTemplate = 1;
16438 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16439 if(exp->destType->kind == 8 && constant)
16440 exp->destType->constant = 1;
16441 else if(exp->destType->kind == 13)
16443 struct Type * t = exp->destType->__anon1.type;
16445 while(t->kind == 13)
16446 t = t->__anon1.type;
16448 t->constant = constant;
16450 if(exp->destType->kind == 21)
16452 FreeType(exp->destType);
16453 exp->destType = ReplaceThisClassType(_class);
16457 FinishTemplatesContext(context);
16460 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)
16463 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16464 struct __ecereNameSpace__ecere__com__Class * sClass;
16466 for(sClass = tClass; sClass; sClass = sClass->base)
16469 if(sClass->templateClass)
16470 sClass = sClass->templateClass;
16471 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16473 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
16475 for(sClass = sClass->base; sClass; sClass = sClass->base)
16476 id += sClass->templateParams.count;
16486 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16487 struct Context * context = SetupTemplatesContext(tClass);
16488 struct Type * basicType;
16490 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16493 if(basicType->kind == 21)
16495 FreeType(basicType);
16496 basicType = ReplaceThisClassType(_class);
16498 FreeType(exp->expType);
16499 exp->expType = __extension__ ({
16500 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16502 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
16506 exp->destType = exp->expType;
16507 exp->destType->refCount++;
16510 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16511 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16512 struct Declarator * decl;
16514 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
16517 exp->destType->refCount++;
16519 exp->expType->refCount++;
16521 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
16522 exp->__anon1.cast.exp = newExp;
16525 FinishTemplatesContext(context);
16528 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
16530 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
16534 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
16536 int paramCount = 0;
16537 int lastParam = -1;
16538 char templateString[1024];
16539 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
16541 sprintf(templateString, "%s<", expClass->templateClass->fullName);
16542 while(cClass != expClass)
16544 struct __ecereNameSpace__ecere__com__Class * sClass;
16546 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
16549 for(param = cClass->templateParams.first; param; param = param->next)
16551 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
16553 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
16554 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
16556 while(cClassCur != tClass && !paramCur)
16558 struct __ecereNameSpace__ecere__com__Class * sClassCur;
16560 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
16562 cClassCur = sClassCur;
16563 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
16565 if(!strcmp(paramCur->name, param->name))
16572 if(paramCur && paramCur->type == 0)
16573 arg = tClass->templateArgs[cp];
16575 arg = expClass->templateArgs[p];
16577 char argument[256];
16579 argument[0] = '\0';
16580 switch(param->type)
16584 char expString[1024];
16585 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16586 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16587 struct Expression * exp;
16588 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16590 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16591 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16592 ProcessExpressionType(exp);
16593 ComputeExpression(exp);
16594 expString[0] = '\0';
16595 PrintExpression(exp, expString);
16596 strcat(argument, expString);
16597 FreeExpression(exp);
16602 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16607 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16608 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16615 strcat(templateString, ", ");
16616 if(lastParam != p - 1)
16618 strcat(templateString, param->name);
16619 strcat(templateString, " = ");
16621 strcat(templateString, argument);
16630 int len = strlen(templateString);
16632 if(templateString[len - 1] == '>')
16633 templateString[len++] = ' ';
16634 templateString[len++] = '>';
16635 templateString[len++] = '\0';
16637 FreeType(exp->expType);
16639 struct Context * context = SetupTemplatesContext(tClass);
16641 exp->expType = ProcessTypeString(templateString, 0);
16642 FinishTemplatesContext(context);
16649 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)");
16651 else if(type && (type->kind == 9 || type->kind == 10))
16653 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
16657 exp->expType = memberType;
16659 memberType->refCount++;
16664 char expString[10240];
16666 expString[0] = '\0';
16669 PrintExpression(exp, expString);
16670 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16672 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
16674 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
16676 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
16678 struct Identifier * id = exp->__anon1.member.member;
16679 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));
16683 FreeType(exp->expType);
16684 exp->expType = ReplaceThisClassType(_class);
16688 yylloc = oldyylloc;
16693 struct Type * destType = exp->destType;
16695 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
16697 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
16699 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
16703 ProcessExpressionType(exp);
16710 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
16712 if(classSym && classSym->__anon1.registered)
16714 if(classSym->__anon1.registered->type == 5)
16719 DeclareStruct(classSym->string, 0);
16720 FreeSpecifier(exp->__anon1._class);
16722 FullClassNameCat(name, classSym->string, 0);
16723 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
16727 if(classSym->__anon1.registered->fixed)
16729 FreeSpecifier(exp->__anon1._class);
16730 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
16735 char className[1024];
16737 strcpy(className, "__ecereClass_");
16738 FullClassNameCat(className, classSym->string, 1);
16739 DeclareClass(classSym, className);
16740 FreeExpContents(exp);
16742 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
16743 exp->__anon1.member.member = MkIdentifier("structSize");
16747 exp->expType = __extension__ ({
16748 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16750 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16756 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
16758 exp->expType = __extension__ ({
16759 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16761 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16763 exp->isConstant = 1;
16764 DeclareType(type, 0, 0);
16770 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
16773 FreeType(exp->__anon1.cast.exp->destType);
16774 exp->__anon1.cast.exp->destType = type;
16777 ProcessExpressionType(exp->__anon1.cast.exp);
16780 exp->expType = type;
16781 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
16783 void * prev = exp->prev, * next = exp->next;
16784 struct Type * expType = exp->__anon1.cast.exp->destType;
16785 struct Expression * castExp = exp->__anon1.cast.exp;
16786 struct Type * destType = exp->destType;
16789 expType->refCount++;
16790 FreeType(exp->expType);
16791 FreeTypeName(exp->__anon1.cast.typeName);
16793 FreeType(exp->expType);
16794 FreeType(exp->destType);
16795 exp->expType = expType;
16796 exp->destType = destType;
16797 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
16803 exp->isConstant = exp->__anon1.cast.exp->isConstant;
16809 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
16811 exp->expType = type;
16816 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
16818 ProcessExpressionType(exp->__anon1.vaArg.exp);
16819 exp->expType = type;
16824 struct Expression * e;
16826 exp->isConstant = 1;
16827 FreeType(exp->__anon1.cond.cond->destType);
16828 exp->__anon1.cond.cond->destType = MkClassType("bool");
16829 exp->__anon1.cond.cond->destType->truth = 1;
16830 ProcessExpressionType(exp->__anon1.cond.cond);
16831 if(!exp->__anon1.cond.cond->isConstant)
16832 exp->isConstant = 0;
16833 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
16837 FreeType(e->destType);
16838 e->destType = exp->destType;
16840 e->destType->refCount++;
16842 ProcessExpressionType(e);
16845 exp->expType = e->expType;
16847 e->expType->refCount++;
16850 exp->isConstant = 0;
16852 FreeType(exp->__anon1.cond.elseExp->destType);
16853 exp->__anon1.cond.elseExp->destType = exp->destType ? exp->destType : exp->expType;
16854 if(exp->__anon1.cond.elseExp->destType)
16855 exp->__anon1.cond.elseExp->destType->refCount++;
16856 ProcessExpressionType(exp->__anon1.cond.elseExp);
16857 if(!exp->__anon1.cond.elseExp->isConstant)
16858 exp->isConstant = 0;
16863 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
16865 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
16867 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
16869 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
16871 exp->destType->refCount++;
16873 ProcessStatement(exp->__anon1.compound);
16874 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
16876 exp->expType->refCount++;
16882 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
16884 if(spec && spec->type == 1)
16886 exp->expType = MkClassType(spec->__anon1.__anon1.name);
16887 exp->expType->kind = 19;
16888 exp->byReference = 1;
16892 exp->expType = MkClassType("ecere::com::Class");
16893 exp->byReference = 1;
16899 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
16903 struct Identifier * id = exp->__anon1.classData.id;
16904 char structName[1024];
16905 struct Expression * classExp;
16907 strcpy(structName, "__ecereClassData_");
16908 FullClassNameCat(structName, _class->fullName, 0);
16910 exp->__anon1.member.member = id;
16911 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
16912 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
16914 classExp = MkExpIdentifier(MkIdentifier("class"));
16915 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"))))))));
16916 ProcessExpressionType(exp);
16923 struct Type * type = (((void *)0));
16924 const char * typeString = (((void *)0));
16925 char typeStringBuf[1024];
16927 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))
16929 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
16931 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
16933 else if(exp->__anon1.list)
16935 struct Expression * e;
16937 for(e = (*exp->__anon1.list).first; e; e = e->next)
16939 ProcessExpressionType(e);
16949 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
16953 e->expType = (((void *)0));
16954 e = (*exp->__anon1.list).first;
16955 ProcessExpressionType(e);
16958 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
16960 FreeType(e->expType);
16961 e->expType = (((void *)0));
16963 type = (((void *)0));
16971 FreeType(e->expType);
16972 e->expType = (((void *)0));
16978 typeStringBuf[0] = '\0';
16979 PrintTypeNoConst(type, typeStringBuf, 0, 1);
16980 typeString = typeStringBuf;
16982 type = (((void *)0));
16987 char templateString[1024];
16988 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
16989 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
16990 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16991 struct Expression * expExt;
16992 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
16994 sprintf(templateString, "Container<%s>", typeString);
16995 if(exp->__anon1.list)
16997 struct Expression * e;
16999 type = ProcessTypeString(typeString, 0);
17000 while((e = (*exp->__anon1.list).first))
17002 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
17003 e->destType = type;
17005 ProcessExpressionType(e);
17006 ListAdd(initializers, MkInitializerAssignment(e));
17009 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
17011 DeclareStruct("ecere::com::BuiltInContainer", 0);
17012 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
17013 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17014 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
17015 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17016 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
17017 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17018 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
17019 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17020 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
17021 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
17023 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, &(*initializers).count, (void *)0), __ecereInstance1;
17025 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17026 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, CopySpecifier), CopyDeclarator(decl))));
17027 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17028 exp->expType = ProcessTypeString(templateString, 0);
17030 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
17031 ProcessExpressionType(expExt);
17035 exp->expType = ProcessTypeString("Container", 0);
17036 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
17041 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
17043 FreeType(exp->expType);
17044 exp->expType = ReplaceThisClassType(thisClass);
17046 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)
17048 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
17052 if(exp->expType->kind != 15)
17054 struct Type * member;
17055 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
17057 FreeType(exp->expType);
17058 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17059 exp->expType->kind = symbol->type->kind;
17060 exp->expType->refCount++;
17061 exp->expType->__anon1.__anon1.enumName = enumName;
17062 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
17063 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17064 member->refCount++;
17068 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
17070 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17072 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink64), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
17074 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
17080 if(exp->destType && (exp->destType->kind == 18))
17082 else if(exp->destType && !exp->destType->keepCast)
17084 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
17085 exp->needTemplateCast = 1;
17086 if(exp->destType->kind == 0)
17088 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
17090 if(!exp->destType->count || unresolved)
17095 if(exp->destType->kind != 14)
17102 char expString[10240];
17104 expString[0] = '\0';
17105 PrintType(exp->destType, type2, 0, 1);
17108 PrintExpression(exp, expString);
17109 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17112 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
17113 else if(exp->type != 16)
17114 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
17119 char expString[10240];
17121 expString[0] = '\0';
17124 PrintExpression(exp, expString);
17125 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17128 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
17129 else if(exp->type != 16)
17130 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17142 PrintType(exp->expType, type1, 0, 1);
17143 PrintType(exp->destType, type2, 0, 1);
17145 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)))
17149 char expString[10240];
17151 expString[0] = '\0';
17154 PrintExpression(exp, expString);
17155 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17157 if(!sourceFile || (strcmp(sourceFile, "src\\lexer.ec") && strcmp(sourceFile, "src/lexer.ec") && strcmp(sourceFile, "src\\grammar.ec") && strcmp(sourceFile, "src/grammar.ec")))
17158 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
17159 FreeType(exp->expType);
17160 exp->destType->refCount++;
17161 exp->expType = exp->destType;
17167 else if(unresolved)
17169 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
17170 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);
17171 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
17172 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
17174 else if(!exp->expType && exp->type != 16)
17176 char expString[10240];
17178 expString[0] = '\0';
17181 PrintExpression(exp, expString);
17182 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17184 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17187 ApplyAnyObjectLogic(exp);
17188 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)))
17190 exp->byReference = 1;
17192 yylloc = oldyylloc;
17195 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)
17199 *curMember = (*curMember)->next;
17200 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
17202 *curMember = subMemberStack[--(*subMemberStackPos)];
17203 *curMember = (*curMember)->next;
17205 while((*curMember) && (*curMember)->isProperty)
17206 *curMember = (*curMember)->next;
17207 if(subMemberStackPos)
17209 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17211 subMemberStack[(*subMemberStackPos)++] = *curMember;
17212 *curMember = (*curMember)->members.first;
17213 while(*curMember && (*curMember)->isProperty)
17214 *curMember = (*curMember)->next;
17222 if(subMemberStackPos && *subMemberStackPos)
17224 *curMember = subMemberStack[--(*subMemberStackPos)];
17225 *curMember = (*curMember)->next;
17229 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
17231 if(*curClass == _class)
17233 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
17235 *curMember = (*curClass)->membersAndProperties.first;
17237 while((*curMember) && (*curMember)->isProperty)
17238 *curMember = (*curMember)->next;
17239 if(subMemberStackPos)
17241 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17243 subMemberStack[(*subMemberStackPos)++] = *curMember;
17244 *curMember = (*curMember)->members.first;
17245 while(*curMember && (*curMember)->isProperty)
17246 *curMember = (*curMember)->next;
17253 static void ProcessInitializer(struct Initializer * init, struct Type * type)
17258 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
17260 if(init->__anon1.exp && !init->__anon1.exp->destType)
17262 FreeType(init->__anon1.exp->destType);
17263 init->__anon1.exp->destType = type;
17267 if(init->__anon1.exp)
17269 ProcessExpressionType(init->__anon1.exp);
17270 init->isConstant = init->__anon1.exp->isConstant;
17276 struct Expression * exp = init->__anon1.exp;
17277 struct Instantiation * inst = exp->__anon1.instance;
17278 struct MembersInit * members;
17281 init->__anon1.list = MkList();
17284 for(members = (*inst->members).first; members; members = members->next)
17286 if(members->type == 0)
17288 struct MemberInit * member;
17290 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
17292 ListAdd(init->__anon1.list, member->initializer);
17293 member->initializer = (((void *)0));
17298 FreeExpression(exp);
17302 struct Initializer * i;
17303 struct Type * initializerType = (((void *)0));
17304 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
17305 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
17306 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
17307 int subMemberStackPos = 0;
17309 if(type && type->kind == 12)
17310 initializerType = Dereference(type);
17311 else if(type && (type->kind == 9 || type->kind == 10))
17312 initializerType = type->__anon1.__anon1.members.first;
17313 for(i = (*init->__anon1.list).first; i; i = i->next)
17315 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17317 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
17320 if(!curMember->dataType)
17321 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
17322 initializerType = curMember->dataType;
17325 ProcessInitializer(i, initializerType);
17326 if(initializerType && type && (type->kind == 9 || type->kind == 10))
17327 initializerType = initializerType->next;
17329 init->isConstant = 0;
17331 if(type && type->kind == 12)
17332 FreeType(initializerType);
17333 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))
17335 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
17342 extern struct Symbol * FindType(struct Context * ctx, const char * name);
17344 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
17346 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct)
17352 if(spec->__anon1.specifier == THISCLASS)
17357 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17358 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17359 ProcessSpecifier(spec, declareStruct);
17366 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
17369 DeclareType(symbol->type, 1, 1);
17370 else if((symbol = spec->__anon1.__anon1.symbol) && symbol->__anon1.registered && symbol->__anon1.registered->type == 1 && declareStruct)
17371 DeclareStruct(spec->__anon1.__anon1.name, 0);
17376 struct Enumerator * e;
17378 if(spec->__anon1.__anon2.list)
17380 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
17383 ProcessExpressionType(e->exp);
17391 if(spec->__anon1.__anon2.definitions)
17393 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
17395 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
17402 static void ProcessDeclarator(struct Declarator * decl)
17407 if(decl->__anon1.identifier->classSym)
17409 FreeSpecifier(decl->__anon1.identifier->_class);
17410 decl->__anon1.identifier->_class = (((void *)0));
17414 if(decl->__anon1.array.exp)
17415 ProcessExpressionType(decl->__anon1.array.exp);
17422 if(decl->declarator)
17423 ProcessDeclarator(decl->declarator);
17424 if(decl->type == 4)
17426 struct Identifier * id = GetDeclId(decl);
17428 if(id && id->_class)
17430 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(id->_class), param->declarator = (((void *)0)), param);
17432 if(!decl->__anon1.function.parameters)
17433 decl->__anon1.function.parameters = MkList();
17434 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
17435 id->_class = (((void *)0));
17437 if(decl->__anon1.function.parameters)
17439 struct TypeName * param;
17441 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
17443 if(param->qualifiers && (*param->qualifiers).first)
17445 struct Specifier * spec = (*param->qualifiers).first;
17447 if(spec && spec->__anon1.specifier == TYPED_OBJECT)
17449 struct Declarator * d = param->declarator;
17450 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);
17453 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
17454 FreeList(param->qualifiers, FreeSpecifier);
17455 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
17456 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
17457 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
17460 else if(spec && spec->__anon1.specifier == ANY_OBJECT)
17462 struct Declarator * d = param->declarator;
17464 FreeList(param->qualifiers, FreeSpecifier);
17465 param->qualifiers = MkListOne(MkSpecifier(VOID));
17467 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
17468 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
17470 else if(spec->__anon1.specifier == THISCLASS)
17475 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17476 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17477 ProcessSpecifier(spec, 0);
17481 if(param->declarator)
17482 ProcessDeclarator(param->declarator);
17490 extern struct Identifier * CopyIdentifier(struct Identifier * id);
17492 extern void FreeInitDeclarator(struct InitDeclarator * decl);
17494 static void ProcessDeclaration(struct Declaration * decl)
17496 yylloc = decl->loc;
17501 unsigned int declareStruct = 0;
17503 if(decl->__anon1.__anon1.declarators)
17505 struct InitDeclarator * d;
17507 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17509 struct Type * type, * subType;
17511 ProcessDeclarator(d->declarator);
17512 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17515 ProcessInitializer(d->initializer, type);
17516 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
17518 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
17520 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
17522 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
17523 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
17524 if(decl->__anon1.__anon1.specifiers)
17525 FreeList(decl->__anon1.__anon1.specifiers, FreeSpecifier);
17526 FreeList(decl->__anon1.__anon1.declarators, FreeInitDeclarator);
17529 decl->__anon1.inst = inst;
17533 for(subType = type; subType; )
17535 if(subType->kind == 8)
17540 else if(subType->kind == 13)
17542 else if(subType->kind == 12)
17543 subType = subType->__anon1.__anon4.arrayType;
17552 if(decl->__anon1.__anon1.specifiers)
17554 struct Specifier * s;
17556 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
17558 ProcessSpecifier(s, declareStruct);
17565 ProcessInstantiationType(decl->__anon1.inst);
17570 struct Specifier * spec;
17571 struct Declarator * d;
17572 unsigned int declareStruct = 0;
17574 if(decl->__anon1.__anon1.declarators)
17576 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17578 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17579 struct Type * subType;
17581 ProcessDeclarator(d);
17582 for(subType = type; subType; )
17584 if(subType->kind == 8)
17589 else if(subType->kind == 13)
17591 else if(subType->kind == 12)
17592 subType = subType->__anon1.__anon4.arrayType;
17599 if(decl->__anon1.__anon1.specifiers)
17601 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
17602 ProcessSpecifier(spec, declareStruct);
17609 static struct FunctionDefinition * curFunction;
17611 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
17613 char propName[1024], propNameM[1024];
17614 char getName[1024], setName[1024];
17615 struct __ecereNameSpace__ecere__sys__OldList * args;
17617 DeclareProperty(prop, setName, getName);
17618 strcpy(propName, "__ecereProp_");
17619 FullClassNameCat(propName, prop->_class->fullName, 0);
17620 strcat(propName, "_");
17621 FullClassNameCat(propName, prop->name, 1);
17622 strcpy(propNameM, "__ecerePropM_");
17623 FullClassNameCat(propNameM, prop->_class->fullName, 0);
17624 strcat(propNameM, "_");
17625 FullClassNameCat(propNameM, prop->name, 1);
17626 if(prop->isWatchable)
17629 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17630 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17631 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17633 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17634 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17635 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17639 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17640 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17641 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17643 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17644 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17645 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17647 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
17648 curFunction->propSet->fireWatchersDone = 1;
17651 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
17653 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
17655 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
17657 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
17659 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
17661 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
17663 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
17665 extern void FreePropertyWatch(struct PropertyWatch * watcher);
17667 static void ProcessStatement(struct Statement * stmt)
17669 yylloc = stmt->loc;
17673 ProcessStatement(stmt->__anon1.labeled.stmt);
17676 if(stmt->__anon1.caseStmt.exp)
17678 FreeType(stmt->__anon1.caseStmt.exp->destType);
17679 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
17681 curSwitchType->refCount++;
17682 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
17683 ComputeExpression(stmt->__anon1.caseStmt.exp);
17685 if(stmt->__anon1.caseStmt.stmt)
17686 ProcessStatement(stmt->__anon1.caseStmt.stmt);
17690 if(stmt->__anon1.compound.context)
17692 struct Declaration * decl;
17693 struct Statement * s;
17694 struct Statement * prevCompound = curCompound;
17695 struct Context * prevContext = curContext;
17697 if(!stmt->__anon1.compound.isSwitch)
17698 curCompound = stmt;
17699 curContext = stmt->__anon1.compound.context;
17700 if(stmt->__anon1.compound.declarations)
17702 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
17703 ProcessDeclaration(decl);
17705 if(stmt->__anon1.compound.statements)
17707 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
17708 ProcessStatement(s);
17710 curContext = prevContext;
17711 curCompound = prevCompound;
17717 struct Expression * exp;
17719 if(stmt->__anon1.expressions)
17721 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
17722 ProcessExpressionType(exp);
17728 struct Expression * exp;
17730 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
17731 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
17732 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
17733 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
17735 ProcessExpressionType(exp);
17737 if(stmt->__anon1.ifStmt.stmt)
17738 ProcessStatement(stmt->__anon1.ifStmt.stmt);
17739 if(stmt->__anon1.ifStmt.elseStmt)
17740 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
17745 struct Type * oldSwitchType = curSwitchType;
17747 if(stmt->__anon1.switchStmt.exp)
17749 struct Expression * exp;
17751 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
17755 ProcessExpressionType(exp);
17758 curSwitchType = exp->expType;
17761 ProcessStatement(stmt->__anon1.switchStmt.stmt);
17762 curSwitchType = oldSwitchType;
17767 if(stmt->__anon1.whileStmt.exp)
17769 struct Expression * exp;
17771 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
17772 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
17773 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
17774 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
17776 ProcessExpressionType(exp);
17779 if(stmt->__anon1.whileStmt.stmt)
17780 ProcessStatement(stmt->__anon1.whileStmt.stmt);
17785 if(stmt->__anon1.doWhile.exp)
17787 struct Expression * exp;
17789 if((*stmt->__anon1.doWhile.exp).last)
17791 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
17792 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
17793 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
17795 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
17797 ProcessExpressionType(exp);
17800 if(stmt->__anon1.doWhile.stmt)
17801 ProcessStatement(stmt->__anon1.doWhile.stmt);
17806 struct Expression * exp;
17808 if(stmt->__anon1.forStmt.init)
17809 ProcessStatement(stmt->__anon1.forStmt.init);
17810 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
17812 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
17813 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
17814 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
17816 if(stmt->__anon1.forStmt.check)
17817 ProcessStatement(stmt->__anon1.forStmt.check);
17818 if(stmt->__anon1.forStmt.increment)
17820 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
17821 ProcessExpressionType(exp);
17823 if(stmt->__anon1.forStmt.stmt)
17824 ProcessStatement(stmt->__anon1.forStmt.stmt);
17829 struct Identifier * id = stmt->__anon1.forEachStmt.id;
17830 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
17831 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
17832 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
17833 char iteratorType[1024];
17834 struct Type * source;
17835 struct Expression * e;
17836 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));
17837 struct Expression * arrayExp;
17838 const char * typeString = (((void *)0));
17839 int builtinCount = 0;
17841 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
17845 FreeType(e->destType);
17846 e->destType = ProcessTypeString("Container", 0);
17848 if(!isBuiltin || e->next)
17849 ProcessExpressionType(e);
17851 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
17852 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)))
17854 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
17855 struct Symbol * symbol;
17856 struct Expression * expIt = (((void *)0));
17857 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
17858 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
17859 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
17860 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
17863 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
17864 stmt->__anon1.compound.context->parent = curContext;
17865 curContext = stmt->__anon1.compound.context;
17866 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
17868 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
17870 isCustomAVLTree = 1;
17871 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
17874 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
17876 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
17878 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
17881 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
17885 struct Declarator * decl;
17886 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17888 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
17889 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17890 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
17894 struct Type * type = (((void *)0));
17895 char typeStringBuf[1024];
17897 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
17898 if(((struct Expression *)(*exp).last)->type == 11)
17900 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
17903 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
17905 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)
17907 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
17909 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
17911 else if(arrayExp->__anon1.list)
17913 struct Expression * e;
17915 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
17917 ProcessExpressionType(e);
17927 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
17931 e->expType = (((void *)0));
17932 e = (*arrayExp->__anon1.list).first;
17933 ProcessExpressionType(e);
17936 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
17938 FreeType(e->expType);
17939 e->expType = (((void *)0));
17941 type = (((void *)0));
17949 FreeType(e->expType);
17950 e->expType = (((void *)0));
17956 typeStringBuf[0] = '\0';
17957 PrintType(type, typeStringBuf, 0, 1);
17958 typeString = typeStringBuf;
17964 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
17965 struct Declarator * decl;
17966 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17968 if(arrayExp->__anon1.list)
17970 struct Expression * e;
17972 builtinCount = (*arrayExp->__anon1.list).count;
17973 type = ProcessTypeString(typeString, 0);
17974 while((e = (*arrayExp->__anon1.list).first))
17976 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
17977 e->destType = type;
17979 ProcessExpressionType(e);
17980 ListAdd(initializers, MkInitializerAssignment(e));
17983 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
17985 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
17986 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, CopySpecifier), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
17987 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
17988 FreeList(exp, FreeExpression);
17992 arrayExp->expType = ProcessTypeString("Container", 0);
17993 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
17996 else if(isLinkList && !isList)
17998 struct Declarator * decl;
17999 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18001 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
18002 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
18003 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
18005 else if(_class->templateArgs)
18008 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
18010 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
18011 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)))))))));
18013 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
18016 switch(block->type)
18019 if(block->__anon1.compound.context)
18020 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18023 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
18024 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18025 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
18026 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18029 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
18030 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18033 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
18034 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18037 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
18038 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18041 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
18042 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18045 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
18046 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18052 block = MkIfStmt(filter, block, (((void *)0)));
18056 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));
18057 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18058 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18059 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18065 sprintf(count, "%d", builtinCount);
18066 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));
18067 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18068 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18069 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18071 else if(isLinkList && !isList)
18073 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
18074 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
18076 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
18078 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));
18082 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18083 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18085 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));
18087 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18088 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18089 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18093 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
18095 ProcessExpressionType(expIt);
18096 if((*stmt->__anon1.compound.declarations).first)
18097 ProcessDeclaration((*stmt->__anon1.compound.declarations).first);
18099 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
18100 ProcessStatement(stmt);
18101 curContext = stmt->__anon1.compound.context->parent;
18106 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
18118 struct Expression * exp;
18120 if(stmt->__anon1.expressions)
18122 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
18126 if(curFunction && !curFunction->type)
18127 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
18128 FreeType(exp->destType);
18129 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
18131 exp->destType->refCount++;
18133 ProcessExpressionType(exp);
18140 ProcessDeclaration(stmt->__anon1.decl);
18145 struct AsmField * field;
18147 if(stmt->__anon1.asmStmt.inputFields)
18149 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
18150 if(field->expression)
18151 ProcessExpressionType(field->expression);
18153 if(stmt->__anon1.asmStmt.outputFields)
18155 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
18156 if(field->expression)
18157 ProcessExpressionType(field->expression);
18159 if(stmt->__anon1.asmStmt.clobberedFields)
18161 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
18163 if(field->expression)
18164 ProcessExpressionType(field->expression);
18171 struct PropertyWatch * propWatch;
18172 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18173 struct Expression * object = stmt->__anon1._watch.object;
18174 struct Expression * watcher = stmt->__anon1._watch.watcher;
18177 ProcessExpressionType(watcher);
18179 ProcessExpressionType(object);
18182 if(watcher || thisClass)
18184 struct External * external = curExternal;
18185 struct Context * context = curContext;
18188 stmt->__anon1.expressions = MkList();
18189 curExternal = external->prev;
18190 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18192 struct ClassFunction * func;
18193 char watcherName[1024];
18194 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;
18195 struct External * createdExternal;
18196 struct External * externalDecl = MkExternalDeclaration((((void *)0)));
18198 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, externalDecl);
18199 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
18200 if(propWatch->deleteWatch)
18201 strcat(watcherName, "_delete");
18204 struct Identifier * propID;
18206 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18208 strcat(watcherName, "_");
18209 strcat(watcherName, propID->string);
18212 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
18214 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)));
18215 ProcessClassFunctionBody(func, propWatch->compound);
18216 propWatch->compound = (((void *)0));
18217 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
18218 createdExternal->symbol->idCode = external->symbol->idCode;
18219 curExternal = createdExternal;
18220 ProcessFunction(createdExternal->__anon1.function);
18222 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, CopySpecifier), MkListOne(MkInitDeclarator(CopyDeclarator(createdExternal->__anon1.function->declarator), (((void *)0)))));
18224 externalDecl->__anon1.declaration = decl;
18225 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
18226 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
18228 if(propWatch->deleteWatch)
18230 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18232 ListAdd(args, CopyExpression(object));
18233 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18234 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18235 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
18239 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
18240 struct Identifier * propID;
18242 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18244 char propName[1024];
18245 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18249 char getName[1024], setName[1024];
18250 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18252 DeclareProperty(prop, setName, getName);
18253 strcpy(propName, "__ecereProp_");
18254 FullClassNameCat(propName, prop->_class->fullName, 0);
18255 strcat(propName, "_");
18256 FullClassNameCat(propName, prop->name, 1);
18257 ListAdd(args, CopyExpression(object));
18258 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18259 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18260 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18261 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
18264 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18269 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
18271 curExternal = external;
18272 curContext = context;
18274 FreeExpression(watcher);
18276 FreeExpression(object);
18277 FreeList(watches, FreePropertyWatch);
18280 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a _class\n", (((void *)0))));
18284 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18286 ProcessStatement(propWatch->compound);
18293 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18294 struct Expression * object = stmt->__anon1._watch.object;
18295 struct __ecereNameSpace__ecere__com__Class * _class;
18298 ProcessExpressionType(object);
18301 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
18304 struct Identifier * propID;
18307 stmt->__anon1.expressions = MkList();
18308 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
18310 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
18317 for(propID = (*watches).first; propID; propID = propID->next)
18319 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18323 CreateFireWatcher(prop, object, stmt);
18326 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18331 struct __ecereNameSpace__ecere__com__Property * prop;
18332 struct __ecereNameSpace__ecere__com__Class * base;
18334 for(base = _class; base; base = base->base)
18336 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
18338 if(prop->isProperty && prop->isWatchable)
18340 CreateFireWatcher(prop, object, stmt);
18346 FreeExpression(object);
18347 FreeList(watches, FreeIdentifier);
18350 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18356 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18357 struct Expression * object = stmt->__anon1._watch.object;
18358 struct Expression * watcher = stmt->__anon1._watch.watcher;
18359 struct __ecereNameSpace__ecere__com__Class * _class;
18362 ProcessExpressionType(object);
18364 ProcessExpressionType(watcher);
18367 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
18368 if(watcher || thisClass)
18372 struct Identifier * propID;
18375 stmt->__anon1.expressions = MkList();
18378 struct __ecereNameSpace__ecere__sys__OldList * args;
18381 ListAdd(args, CopyExpression(object));
18382 ListAdd(args, MkExpConstant("0"));
18383 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18384 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18388 for(propID = (*watches).first; propID; propID = propID->next)
18390 char propName[1024];
18391 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18395 char getName[1024], setName[1024];
18396 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18398 DeclareProperty(prop, setName, getName);
18399 strcpy(propName, "__ecereProp_");
18400 FullClassNameCat(propName, prop->_class->fullName, 0);
18401 strcat(propName, "_");
18402 FullClassNameCat(propName, prop->name, 1);
18403 ListAdd(args, CopyExpression(object));
18404 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18405 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18406 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18409 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18413 FreeExpression(object);
18415 FreeExpression(watcher);
18416 FreeList(watches, FreeIdentifier);
18419 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18422 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
18429 extern struct Expression * QBrackets(struct Expression * exp);
18431 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
18433 extern struct Declarator * QMkPtrDecl(const char * id);
18435 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
18437 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
18439 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
18441 static void ProcessFunction(struct FunctionDefinition * function)
18443 struct Identifier * id = GetDeclId(function->declarator);
18444 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18445 struct Type * type = symbol ? symbol->type : (((void *)0));
18446 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18447 struct Context * oldTopContext = topContext;
18449 yylloc = function->loc;
18450 if(type && type->__anon1.__anon2.thisClass)
18452 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18453 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18454 char className[1024];
18455 char structName[1024];
18456 struct Declarator * funcDecl;
18457 struct Symbol * thisSymbol;
18458 unsigned int typedObject = 0;
18460 if(_class && !_class->base)
18462 _class = currentClass;
18463 if(_class && !_class->symbol)
18464 _class->symbol = FindClass(_class->fullName);
18465 classSym = _class ? _class->symbol : (((void *)0));
18468 thisClass = _class;
18469 if(inCompiler && _class)
18471 if(type->kind == 11)
18473 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18475 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18477 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18480 if(type->classObjectType != 1)
18482 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18483 symbol->type->__anon1.__anon2.staticMethod = 1;
18484 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18485 symbol->type->extraParam = 0;
18488 strcpy(className, "__ecereClass_");
18489 FullClassNameCat(className, _class->fullName, 1);
18490 structName[0] = (char)0;
18491 FullClassNameCat(structName, _class->fullName, 0);
18492 funcDecl = GetFuncDecl(function->declarator);
18495 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18497 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18499 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18501 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18502 FreeTypeName(param);
18505 if(!function->propertyNoThis)
18507 struct TypeName * thisParam = (((void *)0));
18509 if(type->classObjectType != 1)
18511 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);
18518 if(type->classObjectType != 1)
18520 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18521 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18523 thisParam = __extension__ ({
18524 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18526 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18528 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18532 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18534 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18536 funcDecl = GetFuncDecl(initDecl->declarator);
18539 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18541 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18543 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18545 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18546 FreeTypeName(param);
18549 if(type->classObjectType != 1)
18551 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18553 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18555 if(!funcDecl->__anon1.function.parameters)
18556 funcDecl->__anon1.function.parameters = MkList();
18557 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18565 if(type->classObjectType != 1)
18567 thisSymbol = __extension__ ({
18568 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18570 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18572 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18573 if(typedObject && thisSymbol->type)
18575 thisSymbol->type->classObjectType = 2;
18576 thisSymbol->type->byReference = type->byReference;
18577 thisSymbol->type->typedByReference = type->byReference;
18581 if(inCompiler && _class && (_class->type == 0) && type->classObjectType != 1)
18583 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18586 struct __ecereNameSpace__ecere__com__Class * base;
18588 for(base = _class; base && base->type != 1000; base = base->next)
18590 for(member = base->membersAndProperties.first; member; member = member->next)
18591 if(!member->isProperty)
18597 for(member = _class->membersAndProperties.first; member; member = member->next)
18598 if(!member->isProperty)
18602 char pointerName[1024];
18603 struct Declaration * decl;
18604 struct Initializer * initializer;
18605 struct Expression * exp, * bytePtr;
18607 strcpy(pointerName, "__ecerePointer_");
18608 FullClassNameCat(pointerName, _class->fullName, 0);
18610 char className[1024];
18612 strcpy(className, "__ecereClass_");
18613 FullClassNameCat(className, classSym->string, 1);
18614 DeclareClass(classSym, className);
18616 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18621 sprintf(string, "%d", _class->offset);
18622 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpConstant(string)));
18626 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
18628 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
18629 exp->expType = __extension__ ({
18630 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18632 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
18633 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18635 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
18636 }), __ecereInstance2;
18640 yylloc = function->body->loc;
18641 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
18643 struct Context * prevContext = curContext;
18644 struct __ecereNameSpace__ecere__sys__OldList * list;
18646 curContext = function->body->__anon1.compound.context;
18647 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
18648 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
18649 curContext = prevContext;
18651 decl->symbol = (((void *)0));
18652 if(!function->body->__anon1.compound.declarations)
18653 function->body->__anon1.compound.declarations = MkList();
18654 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
18660 thisClass = (((void *)0));
18663 FreeSpecifier(id->_class);
18664 id->_class = (((void *)0));
18665 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18667 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18669 id = GetDeclId(initDecl->declarator);
18670 FreeSpecifier(id->_class);
18671 id->_class = (((void *)0));
18675 topContext = function->body->__anon1.compound.context;
18677 struct FunctionDefinition * oldFunction = curFunction;
18679 curFunction = function;
18681 ProcessStatement(function->body);
18682 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
18684 struct Statement * prevCompound = curCompound;
18685 struct Context * prevContext = curContext;
18686 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
18688 if(!function->body->__anon1.compound.statements)
18689 function->body->__anon1.compound.statements = MkList();
18690 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
18691 curCompound = function->body;
18692 curContext = function->body->__anon1.compound.context;
18693 ProcessStatement(fireWatchers);
18694 curContext = prevContext;
18695 curCompound = prevCompound;
18697 curFunction = oldFunction;
18699 if(function->declarator)
18701 ProcessDeclarator(function->declarator);
18703 topContext = oldTopContext;
18704 thisClass = oldThisClass;
18707 extern void FreeSymbol(struct Symbol * symbol);
18709 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
18711 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
18713 struct ClassDef * def;
18714 struct External * external = curExternal;
18715 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
18717 for(def = definitions->first; def; def = def->next)
18721 if(def->__anon1.function->declarator)
18722 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
18724 curExternal = external;
18725 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
18727 else if(def->type == 2)
18729 if(def->__anon1.decl->type == 2)
18731 thisClass = regClass;
18732 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
18733 thisClass = (((void *)0));
18737 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
18740 thisClass = regClass;
18741 ProcessDeclaration(def->__anon1.decl);
18742 thisClass = backThisClass;
18745 else if(def->type == 1 && def->__anon1.defProperties)
18747 struct MemberInit * defProperty;
18748 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);
18750 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18751 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
18753 thisClass = regClass;
18754 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
18755 thisClass = (((void *)0));
18757 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18758 FreeSymbol(thisSymbol);
18760 else if(def->type == 3 && def->__anon1.propertyDef)
18762 struct PropertyDef * prop = def->__anon1.propertyDef;
18764 thisClass = regClass;
18769 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18771 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18773 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
18774 ProcessStatement(prop->setStmt);
18780 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18782 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18784 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
18785 ProcessStatement(prop->getStmt);
18787 if(prop->issetStmt)
18791 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18793 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18795 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
18796 ProcessStatement(prop->issetStmt);
18798 thisClass = (((void *)0));
18800 else if(def->type == 4 && def->__anon1.propertyWatch)
18802 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
18804 thisClass = regClass;
18805 if(propertyWatch->compound)
18807 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);
18809 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18810 curExternal = (((void *)0));
18811 ProcessStatement(propertyWatch->compound);
18813 thisClass = (((void *)0));
18818 void DeclareFunctionUtil(const char * s)
18820 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
18827 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
18828 strcpy(name, "__ecereFunction_");
18829 FullClassNameCat(name, s, 0);
18830 DeclareFunction(function, name);
18834 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
18836 void ComputeDataTypes()
18838 struct External * external;
18839 struct External * temp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_External);
18840 struct External * after = (((void *)0));
18842 currentClass = (((void *)0));
18843 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
18844 for(external = (*ast).first; external; external = external->next)
18846 if(external->type == 1)
18848 struct Declaration * decl = external->__anon1.declaration;
18852 struct __ecereNameSpace__ecere__sys__OldList * decls = decl->__anon1.__anon1.declarators;
18856 struct InitDeclarator * initDecl = (*decls).first;
18860 struct Declarator * declarator = initDecl->declarator;
18862 if(declarator && declarator->type == 1)
18864 struct Identifier * id = declarator->__anon1.identifier;
18866 if(id && id->string)
18868 if(!strcmp(id->string, "uintptr_t") || !strcmp(id->string, "intptr_t") || !strcmp(id->string, "size_t") || !strcmp(id->string, "ssize_t"))
18870 external->symbol->id = -1001, external->symbol->idCode = -1001;
18881 struct External * e = MkExternalDeclaration(MkDeclaration(MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Instance"), (((void *)0)))), (((void *)0))));
18883 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, e);
18886 temp->symbol = __extension__ ({
18887 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18889 __ecereInstance1->id = -1000, __ecereInstance1->idCode = -1000, __ecereInstance1;
18891 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, temp);
18892 curExternal = temp;
18893 DeclareFunctionUtil("eSystem_New");
18894 DeclareFunctionUtil("eSystem_New0");
18895 DeclareFunctionUtil("eSystem_Renew");
18896 DeclareFunctionUtil("eSystem_Renew0");
18897 DeclareFunctionUtil("eSystem_Delete");
18898 DeclareFunctionUtil("eClass_GetProperty");
18899 DeclareFunctionUtil("eClass_SetProperty");
18900 DeclareFunctionUtil("eInstance_FireSelfWatchers");
18901 DeclareFunctionUtil("eInstance_SetMethod");
18902 DeclareFunctionUtil("eInstance_IncRef");
18903 DeclareFunctionUtil("eInstance_StopWatching");
18904 DeclareFunctionUtil("eInstance_Watch");
18905 DeclareFunctionUtil("eInstance_FireWatchers");
18906 DeclareStruct("ecere::com::Class", 0);
18907 DeclareStruct("ecere::com::Instance", 0);
18908 DeclareStruct("ecere::com::Property", 0);
18909 DeclareStruct("ecere::com::DataMember", 0);
18910 DeclareStruct("ecere::com::Method", 0);
18911 DeclareStruct("ecere::com::SerialBuffer", 0);
18912 DeclareStruct("ecere::com::ClassTemplateArgument", 0);
18913 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), temp);
18914 for(external = (*ast).first; external; external = external->next)
18916 afterExternal = curExternal = external;
18917 if(external->type == 0)
18919 currentClass = external->__anon1.function->_class;
18920 ProcessFunction(external->__anon1.function);
18922 else if(external->type == 1)
18924 currentClass = (((void *)0));
18925 if(external->__anon1.declaration)
18926 ProcessDeclaration(external->__anon1.declaration);
18928 else if(external->type == 2)
18930 struct ClassDefinition * _class = external->__anon1._class;
18932 currentClass = external->symbol->__anon1.registered;
18933 if(_class->definitions)
18935 ProcessClass(_class->definitions, _class->symbol);
18939 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
18940 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
18943 else if(external->type == 4)
18945 thisNameSpace = external->__anon1.id->string;
18948 currentClass = (((void *)0));
18949 thisNameSpace = (((void *)0));
18950 curExternal = (((void *)0));
18951 ((temp->symbol ? (__ecereClass_Symbol->Destructor ? __ecereClass_Symbol->Destructor((void *)temp->symbol) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp->symbol)) : 0), temp->symbol = 0);
18952 ((temp ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)temp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp)) : 0), temp = 0);
18955 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);
18957 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);
18959 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
18961 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
18963 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
18965 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
18966 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
18967 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
18968 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
18969 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
18970 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
18971 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
18972 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
18973 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
18974 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
18975 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
18976 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
18977 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
18978 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
18979 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
18980 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
18981 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
18982 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
18983 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
18984 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
18985 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
18986 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
18987 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
18988 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
18989 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
18990 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
18991 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
18992 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
18993 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
18994 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
18995 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
18996 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
18997 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
18998 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
18999 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19000 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19001 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19002 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19003 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19004 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19005 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19006 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19007 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19008 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19009 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19010 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19011 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19012 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19013 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19014 __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);
19015 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "void DeclareStruct(const char * name, bool skipNoHead)", DeclareStruct, module, 2);
19016 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19017 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19018 __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);
19019 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19020 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19021 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19022 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19023 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19024 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19025 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19026 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19027 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19028 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19029 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19030 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(GlobalData data)", DeclareGlobalData, module, 2);
19031 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, 0, 0, module, 2, 1);
19032 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
19033 __ecereClass_Conversion = class;
19034 __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);
19035 __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);
19036 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19037 __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);
19038 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19039 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19040 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19041 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19042 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19043 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19044 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19045 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19046 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19047 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19048 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19049 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19050 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19051 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19052 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19053 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19054 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19055 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19056 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19057 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19058 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(const String s)", DeclareFunctionUtil, module, 1);
19059 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);
19062 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)