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 unsigned int wideString;
409 } __attribute__ ((gcc_struct)) __anon2;
410 struct __ecereNameSpace__ecere__sys__OldList * list;
413 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
414 struct Declarator * decl;
415 } __attribute__ ((gcc_struct)) _classExp;
418 struct Identifier * id;
419 } __attribute__ ((gcc_struct)) classData;
422 struct Expression * exp;
423 struct __ecereNameSpace__ecere__sys__OldList * arguments;
424 struct Location argLoc;
425 } __attribute__ ((gcc_struct)) call;
428 struct Expression * exp;
429 struct __ecereNameSpace__ecere__sys__OldList * index;
430 } __attribute__ ((gcc_struct)) index;
433 struct Expression * exp;
434 struct Identifier * member;
436 unsigned int thisPtr;
437 } __attribute__ ((gcc_struct)) member;
441 struct Expression * exp1;
442 struct Expression * exp2;
443 } __attribute__ ((gcc_struct)) op;
444 struct TypeName * typeName;
445 struct Specifier * _class;
448 struct TypeName * typeName;
449 struct Expression * exp;
450 } __attribute__ ((gcc_struct)) cast;
453 struct Expression * cond;
454 struct __ecereNameSpace__ecere__sys__OldList * exp;
455 struct Expression * elseExp;
456 } __attribute__ ((gcc_struct)) cond;
459 struct TypeName * typeName;
460 struct Expression * size;
461 } __attribute__ ((gcc_struct)) _new;
464 struct TypeName * typeName;
465 struct Expression * size;
466 struct Expression * exp;
467 } __attribute__ ((gcc_struct)) _renew;
471 struct Identifier * id;
472 } __attribute__ ((gcc_struct)) db;
475 struct Expression * ds;
476 struct Expression * name;
477 } __attribute__ ((gcc_struct)) dbopen;
480 struct TypeName * typeName;
481 struct Initializer * initializer;
482 } __attribute__ ((gcc_struct)) initializer;
485 struct Expression * exp;
486 struct TypeName * typeName;
487 } __attribute__ ((gcc_struct)) vaArg;
488 } __attribute__ ((gcc_struct)) __anon1;
489 unsigned int debugValue;
490 struct __ecereNameSpace__ecere__com__DataValue val;
492 unsigned int hasAddress;
493 struct Type * expType;
494 struct Type * destType;
497 unsigned int byReference;
498 unsigned int isConstant;
499 unsigned int addedThis;
500 unsigned int needCast;
501 unsigned int thisPtr;
502 unsigned int opDestType;
503 unsigned int needTemplateCast;
504 } __attribute__ ((gcc_struct));
506 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
508 struct TemplateDatatype
510 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
511 struct Declarator * decl;
512 } __attribute__ ((gcc_struct));
514 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
516 struct TemplateArgument;
518 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
520 struct TemplateParameter
522 struct TemplateParameter * prev;
523 struct TemplateParameter * next;
526 struct Identifier * identifier;
529 struct TemplateDatatype * dataType;
531 } __attribute__ ((gcc_struct)) __anon1;
532 struct TemplateArgument * defaultArgument;
533 const char * dataTypeString;
534 struct Type * baseType;
535 } __attribute__ ((gcc_struct));
537 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
541 struct Specifier * prev;
542 struct Specifier * next;
550 struct ExtDecl * extDecl;
552 struct Symbol * symbol;
553 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
554 } __attribute__ ((gcc_struct)) __anon1;
557 struct Identifier * id;
558 struct __ecereNameSpace__ecere__sys__OldList * list;
559 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
560 struct __ecereNameSpace__ecere__sys__OldList * definitions;
561 unsigned int addNameSpace;
562 struct Context * ctx;
563 struct ExtDecl * extDeclStruct;
564 } __attribute__ ((gcc_struct)) __anon2;
565 struct Expression * expression;
566 struct Specifier * _class;
567 struct TemplateParameter * templateParameter;
568 } __attribute__ ((gcc_struct)) __anon1;
569 } __attribute__ ((gcc_struct));
571 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
575 struct Identifier * prev;
576 struct Identifier * next;
578 struct Symbol * classSym;
579 struct Specifier * _class;
581 struct Identifier * badID;
582 } __attribute__ ((gcc_struct));
584 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
588 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
592 struct Declarator * prev;
593 struct Declarator * next;
596 struct Symbol * symbol;
597 struct Declarator * declarator;
600 struct Identifier * identifier;
603 struct Expression * exp;
604 struct Expression * posExp;
605 struct Attrib * attrib;
606 } __attribute__ ((gcc_struct)) structDecl;
609 struct Expression * exp;
610 struct Specifier * enumClass;
611 } __attribute__ ((gcc_struct)) array;
614 struct __ecereNameSpace__ecere__sys__OldList * parameters;
615 } __attribute__ ((gcc_struct)) function;
618 struct Pointer * pointer;
619 } __attribute__ ((gcc_struct)) pointer;
622 struct ExtDecl * extended;
623 } __attribute__ ((gcc_struct)) extended;
624 } __attribute__ ((gcc_struct)) __anon1;
625 } __attribute__ ((gcc_struct));
627 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
629 struct FunctionDefinition
631 struct FunctionDefinition * prev;
632 struct FunctionDefinition * next;
634 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
635 struct Declarator * declarator;
636 struct __ecereNameSpace__ecere__sys__OldList * declarations;
637 struct Statement * body;
638 struct __ecereNameSpace__ecere__com__Class * _class;
639 struct __ecereNameSpace__ecere__sys__OldList attached;
642 struct Symbol * propSet;
644 unsigned int propertyNoThis;
645 } __attribute__ ((gcc_struct));
647 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
651 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
655 struct External * prev;
656 struct External * next;
659 struct Symbol * symbol;
662 struct FunctionDefinition * function;
663 struct ClassDefinition * _class;
664 struct Declaration * declaration;
666 struct Identifier * id;
667 struct DBTableDef * table;
668 } __attribute__ ((gcc_struct)) __anon1;
670 } __attribute__ ((gcc_struct));
672 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
676 struct ModuleImport * prev;
677 struct ModuleImport * next;
679 struct __ecereNameSpace__ecere__sys__OldList classes;
680 struct __ecereNameSpace__ecere__sys__OldList functions;
683 } __attribute__ ((gcc_struct));
685 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
689 struct ClassImport * prev;
690 struct ClassImport * next;
692 struct __ecereNameSpace__ecere__sys__OldList methods;
693 struct __ecereNameSpace__ecere__sys__OldList properties;
696 } __attribute__ ((gcc_struct));
698 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
703 struct Symbol * parent;
704 struct Symbol * left;
705 struct Symbol * right;
710 struct __ecereNameSpace__ecere__com__Method * method;
711 struct __ecereNameSpace__ecere__com__Property * _property;
712 struct __ecereNameSpace__ecere__com__Class * registered;
713 } __attribute__ ((gcc_struct)) __anon1;
720 struct External * pointerExternal;
721 struct External * structExternal;
722 } __attribute__ ((gcc_struct)) __anon1;
725 struct External * externalGet;
726 struct External * externalSet;
727 struct External * externalPtr;
728 struct External * externalIsSet;
729 } __attribute__ ((gcc_struct)) __anon2;
732 struct External * methodExternal;
733 struct External * methodCodeExternal;
734 } __attribute__ ((gcc_struct)) __anon3;
735 } __attribute__ ((gcc_struct)) __anon2;
736 unsigned int imported;
737 unsigned int declaredStructSym;
738 struct __ecereNameSpace__ecere__com__Class * _class;
739 unsigned int declaredStruct;
740 unsigned int needConstructor;
741 unsigned int needDestructor;
742 char * constructorName;
745 char * destructorName;
746 struct ModuleImport * module;
747 struct ClassImport * _import;
748 struct Location nameLoc;
749 unsigned int isParam;
750 unsigned int isRemote;
751 unsigned int isStruct;
752 unsigned int fireWatchersDone;
754 unsigned int classData;
755 unsigned int isStatic;
757 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
758 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
759 struct Context * ctx;
761 struct Expression * propCategory;
762 } __attribute__ ((gcc_struct));
764 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
773 struct Symbol * _class;
776 struct __ecereNameSpace__ecere__sys__OldList members;
778 } __attribute__ ((gcc_struct)) __anon1;
781 struct Type * returnType;
782 struct __ecereNameSpace__ecere__sys__OldList params;
783 struct Symbol * thisClass;
784 unsigned int staticMethod;
785 struct TemplateParameter * thisClassTemplate;
786 } __attribute__ ((gcc_struct)) __anon2;
789 struct __ecereNameSpace__ecere__com__Method * method;
790 struct __ecereNameSpace__ecere__com__Class * methodClass;
791 struct __ecereNameSpace__ecere__com__Class * usedClass;
792 } __attribute__ ((gcc_struct)) __anon3;
795 struct Type * arrayType;
797 struct Expression * arraySizeExp;
798 unsigned int freeExp;
799 struct Symbol * enumClass;
800 } __attribute__ ((gcc_struct)) __anon4;
802 struct TemplateParameter * templateParameter;
803 } __attribute__ ((gcc_struct)) __anon1;
813 unsigned int isSigned : 1;
814 unsigned int constant : 1;
815 unsigned int truth : 1;
816 unsigned int byReference : 1;
817 unsigned int extraParam : 1;
818 unsigned int directClassAccess : 1;
819 unsigned int computing : 1;
820 unsigned int keepCast : 1;
821 unsigned int passAsTemplate : 1;
822 unsigned int dllExport : 1;
823 unsigned int attrStdcall : 1;
824 unsigned int declaredWithStruct : 1;
825 unsigned int typedByReference : 1;
826 unsigned int casted : 1;
827 } __attribute__ ((gcc_struct));
829 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
831 struct __ecereNameSpace__ecere__com__Class
833 struct __ecereNameSpace__ecere__com__Class * prev;
834 struct __ecereNameSpace__ecere__com__Class * next;
840 unsigned int (* Constructor)(void * );
841 void (* Destructor)(void * );
844 struct __ecereNameSpace__ecere__com__Class * base;
845 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
846 struct __ecereNameSpace__ecere__sys__BinaryTree members;
847 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
848 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
849 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
850 struct __ecereNameSpace__ecere__sys__OldList derivatives;
854 struct __ecereNameSpace__ecere__com__Instance * module;
855 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
856 const char * dataTypeString;
857 struct Type * dataType;
859 int defaultAlignment;
860 void (* Initialize)();
862 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
863 const char * designerClass;
864 unsigned int noExpansion;
865 const char * defaultProperty;
866 unsigned int comRedefinition;
869 unsigned int internalDecl;
871 unsigned int computeSize;
873 int destructionWatchOffset;
875 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
876 int inheritanceAccess;
877 const char * fullName;
879 struct __ecereNameSpace__ecere__sys__OldList conversions;
880 struct __ecereNameSpace__ecere__sys__OldList templateParams;
881 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
882 struct __ecereNameSpace__ecere__com__Class * templateClass;
883 struct __ecereNameSpace__ecere__sys__OldList templatized;
885 unsigned int isInstanceClass;
886 unsigned int byValueSystemClass;
887 } __attribute__ ((gcc_struct));
889 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
891 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
893 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
895 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
897 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
899 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);
901 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
903 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
905 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
907 struct __ecereNameSpace__ecere__com__Instance
910 struct __ecereNameSpace__ecere__com__Class * _class;
912 } __attribute__ ((gcc_struct));
914 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
916 struct __ecereNameSpace__ecere__com__DataMember
918 struct __ecereNameSpace__ecere__com__DataMember * prev;
919 struct __ecereNameSpace__ecere__com__DataMember * next;
921 unsigned int isProperty;
924 struct __ecereNameSpace__ecere__com__Class * _class;
925 const char * dataTypeString;
926 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
927 struct Type * dataType;
931 struct __ecereNameSpace__ecere__sys__OldList members;
932 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
935 } __attribute__ ((gcc_struct));
937 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
939 struct __ecereNameSpace__ecere__com__SerialBuffer
941 unsigned char * _buffer;
945 } __attribute__ ((gcc_struct));
947 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
949 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
955 const char * dataTypeString;
956 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
957 } __attribute__ ((gcc_struct)) __anon1;
958 struct __ecereNameSpace__ecere__com__DataValue expression;
961 const char * memberString;
964 struct __ecereNameSpace__ecere__com__DataMember * member;
965 struct __ecereNameSpace__ecere__com__Property * prop;
966 struct __ecereNameSpace__ecere__com__Method * method;
967 } __attribute__ ((gcc_struct)) __anon1;
968 } __attribute__ ((gcc_struct)) __anon2;
969 } __attribute__ ((gcc_struct)) __anon1;
970 } __attribute__ ((gcc_struct));
972 void exit(int status);
974 void * calloc(size_t nmemb, size_t size);
976 void free(void * ptr);
978 void * malloc(size_t size);
980 void * realloc(void * ptr, size_t size);
982 long int strtol(const char * nptr, char ** endptr, int base);
984 long long int strtoll(const char * nptr, char ** endptr, int base);
986 unsigned long long int strtoull(const char * nptr, char ** endptr, int base);
990 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, WIDE_STRING_LITERAL = 373
993 typedef union YYSTYPE
998 struct Identifier * id;
999 struct Expression * exp;
1000 struct Specifier * specifier;
1001 struct __ecereNameSpace__ecere__sys__OldList * list;
1002 struct Enumerator * enumerator;
1003 struct Declarator * declarator;
1004 struct Pointer * pointer;
1005 struct Initializer * initializer;
1006 struct InitDeclarator * initDeclarator;
1007 struct TypeName * typeName;
1008 struct Declaration * declaration;
1009 struct Statement * stmt;
1010 struct FunctionDefinition * function;
1011 struct External * external;
1012 struct Context * context;
1013 struct AsmField * asmField;
1014 struct Attrib * attrib;
1015 struct ExtDecl * extDecl;
1016 struct Attribute * attribute;
1017 struct Instantiation * instance;
1018 struct MembersInit * membersInit;
1019 struct MemberInit * memberInit;
1020 struct ClassFunction * classFunction;
1021 struct ClassDefinition * _class;
1022 struct ClassDef * classDef;
1023 struct PropertyDef * prop;
1025 struct Symbol * symbol;
1026 struct PropertyWatch * propertyWatch;
1027 struct TemplateParameter * templateParameter;
1028 struct TemplateArgument * templateArgument;
1029 struct TemplateDatatype * templateDatatype;
1030 struct DBTableEntry * dbtableEntry;
1031 struct DBIndexItem * dbindexItem;
1032 struct DBTableDef * dbtableDef;
1033 } __attribute__ ((gcc_struct)) YYSTYPE;
1035 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
1039 struct Enumerator * prev;
1040 struct Enumerator * next;
1041 struct Location loc;
1042 struct Identifier * id;
1043 struct Expression * exp;
1044 } __attribute__ ((gcc_struct));
1046 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
1048 struct InitDeclarator
1050 struct InitDeclarator * prev;
1051 struct InitDeclarator * next;
1052 struct Location loc;
1053 struct Declarator * declarator;
1054 struct Initializer * initializer;
1055 } __attribute__ ((gcc_struct));
1057 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
1061 struct AsmField * prev;
1062 struct AsmField * next;
1063 struct Location loc;
1065 struct Expression * expression;
1066 struct Identifier * symbolic;
1067 } __attribute__ ((gcc_struct));
1069 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
1073 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
1075 struct ClassFunction
1077 struct ClassFunction * prev;
1078 struct ClassFunction * next;
1079 struct Location loc;
1080 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1081 struct Declarator * declarator;
1082 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1083 struct Statement * body;
1084 struct __ecereNameSpace__ecere__com__Class * _class;
1085 struct __ecereNameSpace__ecere__sys__OldList attached;
1088 struct Symbol * propSet;
1089 unsigned int isVirtual;
1090 unsigned int isConstructor;
1091 unsigned int isDestructor;
1092 unsigned int dontMangle;
1095 } __attribute__ ((gcc_struct));
1097 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1101 struct MembersInit * prev;
1102 struct MembersInit * next;
1103 struct Location loc;
1107 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1108 struct ClassFunction * function;
1109 } __attribute__ ((gcc_struct)) __anon1;
1110 } __attribute__ ((gcc_struct));
1112 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1116 struct MemberInit * prev;
1117 struct MemberInit * next;
1118 struct Location loc;
1119 struct Location realLoc;
1120 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1121 struct Initializer * initializer;
1123 unsigned int variable;
1124 unsigned int takeOutExp;
1125 } __attribute__ ((gcc_struct));
1127 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1131 struct PropertyDef * prev;
1132 struct PropertyDef * next;
1133 struct Location loc;
1134 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1135 struct Declarator * declarator;
1136 struct Identifier * id;
1137 struct Statement * getStmt;
1138 struct Statement * setStmt;
1139 struct Statement * issetStmt;
1140 struct Symbol * symbol;
1141 struct Expression * category;
1144 unsigned int conversion : 1;
1145 unsigned int isWatchable : 1;
1146 unsigned int isDBProp : 1;
1147 } __attribute__ ((gcc_struct)) __anon1;
1148 } __attribute__ ((gcc_struct));
1150 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1152 struct PropertyWatch
1154 struct PropertyWatch * prev;
1155 struct PropertyWatch * next;
1156 struct Location loc;
1157 struct Statement * compound;
1158 struct __ecereNameSpace__ecere__sys__OldList * properties;
1159 unsigned int deleteWatch;
1160 } __attribute__ ((gcc_struct));
1162 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1166 struct ClassDef * prev;
1167 struct ClassDef * next;
1168 struct Location loc;
1172 struct Declaration * decl;
1173 struct ClassFunction * function;
1174 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1175 struct PropertyDef * propertyDef;
1176 struct PropertyWatch * propertyWatch;
1178 struct Identifier * defaultProperty;
1181 struct Identifier * id;
1182 struct Initializer * initializer;
1183 } __attribute__ ((gcc_struct)) __anon1;
1184 } __attribute__ ((gcc_struct)) __anon1;
1187 } __attribute__ ((gcc_struct));
1189 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1191 struct DBTableEntry;
1193 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1197 extern YYSTYPE yylval;
1199 extern struct Location yylloc;
1201 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
1203 extern int returnCode;
1205 extern struct Expression * parsedExpression;
1207 extern unsigned int yydebug;
1209 void SetYydebug(unsigned int b)
1214 extern unsigned int echoOn;
1216 void resetScanner();
1220 int expression_yyparse();
1222 static struct Statement * curCompound;
1224 struct External * curExternal, * afterExternal;
1226 static struct Type * curSwitchType;
1228 static struct __ecereNameSpace__ecere__com__Class * currentClass;
1230 struct __ecereNameSpace__ecere__com__Class * thisClass;
1232 void SetThisClass(struct __ecereNameSpace__ecere__com__Class * c)
1237 struct __ecereNameSpace__ecere__com__Class * GetThisClass()
1242 static char * thisNameSpace;
1244 struct __ecereNameSpace__ecere__com__Class * containerClass;
1246 unsigned int thisClassParams = 1;
1248 unsigned int internalValueCounter;
1250 extern unsigned int outputLineNumbers;
1252 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
1254 extern size_t strlen(const char * );
1256 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
1258 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
1260 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
1262 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
1264 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
1266 void PrintExpression(struct Expression * exp, char * string)
1269 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
1271 unsigned int backOutputLineNumbers = outputLineNumbers;
1273 outputLineNumbers = 0;
1275 OutputExpression(exp, f);
1276 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
1277 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1279 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1280 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
1281 count = strlen(string);
1282 count += ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
1283 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1285 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1286 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string + count, 1, 1023);
1287 string[count] = '\0';
1288 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
1289 outputLineNumbers = backOutputLineNumbers;
1293 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
1295 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1297 struct Type * ProcessTemplateParameterType(struct TemplateParameter * param)
1299 if(param && param->type == 0 && (param->__anon1.dataType || param->dataTypeString))
1301 if(!param->baseType)
1303 if(param->dataTypeString)
1304 param->baseType = ProcessTypeString(param->dataTypeString, 0);
1306 param->baseType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1308 return param->baseType;
1310 return (((void *)0));
1313 unsigned int NeedCast(struct Type * type1, struct Type * type2)
1315 if(!type1 || !type2 || type1->keepCast || type2->keepCast)
1317 if(type1->kind == 20 && type2->kind == 4 && type2->passAsTemplate == 0)
1321 if(type1->kind == type2->kind)
1332 if(type1->passAsTemplate && !type2->passAsTemplate)
1334 return type1->isSigned != type2->isSigned;
1336 return type1->__anon1._class != type2->__anon1._class;
1338 return (type1->__anon1.type && type2->__anon1.type && type1->__anon1.type->constant != type2->__anon1.type->constant) || NeedCast(type1->__anon1.type, type2->__anon1.type);
1346 extern int strcmp(const char * , const char * );
1348 extern struct Context * curContext;
1350 extern struct Context * topContext;
1352 extern unsigned int __ecereNameSpace__ecere__com__eClass_IsDerived(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * from);
1354 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);
1356 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
1358 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);
1360 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);
1362 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassProperty;
1364 struct __ecereNameSpace__ecere__com__ClassProperty
1367 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1368 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1369 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1371 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1372 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1373 const char * dataTypeString;
1374 struct Type * dataType;
1375 unsigned int constant;
1376 } __attribute__ ((gcc_struct));
1378 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_FindClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
1380 extern struct Expression * QMkExpId(const char * id);
1382 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateParameter;
1384 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
1386 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
1387 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
1392 const char * dataTypeString;
1394 } __attribute__ ((gcc_struct)) __anon1;
1395 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
1397 } __attribute__ ((gcc_struct));
1399 extern struct Expression * GetTemplateArgExpByName(const char * paramName, struct __ecereNameSpace__ecere__com__Class * curClass, int tplType);
1401 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1403 extern void FreeIdentifier(struct Identifier * id);
1405 void ProcessExpressionType(struct Expression * exp);
1407 extern struct Declarator * SpecDeclFromString(const char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1409 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
1411 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
1413 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
1415 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1417 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
1419 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
1421 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
1423 static void ReplaceClassMembers(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class)
1425 if(exp->type == 0 && exp->__anon1.__anon1.identifier)
1427 struct Identifier * id = exp->__anon1.__anon1.identifier;
1428 struct Context * ctx;
1429 struct Symbol * symbol = (((void *)0));
1431 if(!id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
1433 for(ctx = curContext; ctx != topContext->parent && !symbol; ctx = ctx->parent)
1435 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&ctx->symbols, id->string);
1440 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))))
1442 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
1443 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
1444 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
1445 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
1449 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
1451 if(!prop && !method)
1452 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
1453 if(!prop && !method && !member)
1455 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string);
1457 if(prop || method || member || classProp)
1460 exp->__anon1.member.member = id;
1461 exp->__anon1.member.memberType = 0;
1462 exp->__anon1.member.exp = QMkExpId("this");
1465 else if(_class && _class->templateParams.first)
1467 struct __ecereNameSpace__ecere__com__Class * sClass;
1469 for(sClass = _class; sClass; sClass = sClass->base)
1471 if(sClass->templateParams.first)
1473 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
1475 for(param = sClass->templateParams.first; param; param = param->next)
1477 if(param->type == 2 && !strcmp(param->name, id->string))
1479 struct Expression * argExp = GetTemplateArgExpByName(param->name, _class, 2);
1483 struct Declarator * decl;
1484 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1486 FreeIdentifier(exp->__anon1.member.member);
1487 ProcessExpressionType(argExp);
1488 decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
1489 exp->expType = ProcessType(specs, decl);
1491 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), MkExpOp((((void *)0)), '&', argExp))));
1502 extern int sprintf(char * , const char * , ...);
1504 extern char * strcat(char * , const char * );
1506 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
1508 char * PrintInt(long long result)
1512 if(result > (((int)0x7fffffff)))
1513 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1515 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
1516 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
1518 return __ecereNameSpace__ecere__sys__CopyString(temp);
1521 char * PrintUInt(uint64 result)
1525 if(result > (0xffffffff))
1526 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1527 else if(result > (((int)0x7fffffff)))
1528 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1530 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
1531 return __ecereNameSpace__ecere__sys__CopyString(temp);
1534 char * PrintInt64(long long result)
1538 if(result > (((int)0x7fffffff)) || result < (((int)0x80000000)))
1539 sprintf(temp, ((__runtimePlatform == 1) ? "%I64dLL" : "%lldLL"), result);
1541 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
1542 return __ecereNameSpace__ecere__sys__CopyString(temp);
1545 char * PrintUInt64(uint64 result)
1549 if(result > (0xffffffff))
1550 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1551 else if(result > (((int)0x7fffffff)))
1552 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1554 sprintf(temp, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), result);
1555 return __ecereNameSpace__ecere__sys__CopyString(temp);
1558 char * PrintHexUInt(uint64 result)
1562 if(result > (0xffffffff))
1563 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1565 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1566 if(result > (0xffffffff))
1568 return __ecereNameSpace__ecere__sys__CopyString(temp);
1571 char * PrintHexUInt64(uint64 result)
1575 if(result > (0xffffffff))
1576 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), result);
1578 sprintf(temp, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), result);
1579 return __ecereNameSpace__ecere__sys__CopyString(temp);
1582 char * PrintShort(short result)
1586 sprintf(temp, "%d", (unsigned short)result);
1587 return __ecereNameSpace__ecere__sys__CopyString(temp);
1590 char * PrintUShort(unsigned short result)
1594 if(result > (unsigned short)32767)
1595 sprintf(temp, "0x%X", (int)result);
1597 sprintf(temp, "%d", (int)result);
1598 return __ecereNameSpace__ecere__sys__CopyString(temp);
1601 extern int isprint(int c);
1603 char * PrintChar(char result)
1607 if(result > (char)0 && isprint(result))
1608 sprintf(temp, "'%c'", result);
1609 else if(result < (char)0)
1610 sprintf(temp, "%d", (int)result);
1612 sprintf(temp, "0x%X", (unsigned char)result);
1613 return __ecereNameSpace__ecere__sys__CopyString(temp);
1616 char * PrintUChar(unsigned char result)
1620 sprintf(temp, "0x%X", result);
1621 return __ecereNameSpace__ecere__sys__CopyString(temp);
1624 extern char * strcpy(char * , const char * );
1626 extern unsigned int (* __ecereProp_float_Get_isInf)(float this);
1628 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isInf;
1630 extern int (* __ecereProp_float_Get_signBit)(float this);
1632 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_signBit;
1634 extern unsigned int (* __ecereProp_float_Get_isNan)(float this);
1636 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_float_isNan;
1638 char * PrintFloat(float result)
1642 if(__ecereProp_float_Get_isInf(result))
1644 if(__ecereProp_float_Get_signBit(result))
1645 strcpy(temp, "-inf");
1647 strcpy(temp, "inf");
1649 else if(__ecereProp_float_Get_isNan(result))
1651 if(__ecereProp_float_Get_signBit(result))
1652 strcpy(temp, "-nan");
1654 strcpy(temp, "nan");
1657 sprintf(temp, "%.16ff", result);
1658 return __ecereNameSpace__ecere__sys__CopyString(temp);
1661 extern unsigned int (* __ecereProp_double_Get_isInf)(double this);
1663 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isInf;
1665 extern int (* __ecereProp_double_Get_signBit)(double this);
1667 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_signBit;
1669 extern unsigned int (* __ecereProp_double_Get_isNan)(double this);
1671 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_double_isNan;
1673 char * PrintDouble(double result)
1677 if(__ecereProp_double_Get_isInf(result))
1679 if(__ecereProp_double_Get_signBit(result))
1680 strcpy(temp, "-inf");
1682 strcpy(temp, "inf");
1684 else if(__ecereProp_double_Get_isNan(result))
1686 if(__ecereProp_double_Get_signBit(result))
1687 strcpy(temp, "-nan");
1689 strcpy(temp, "nan");
1692 sprintf(temp, "%.16f", result);
1693 return __ecereNameSpace__ecere__sys__CopyString(temp);
1696 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_OpTable;
1700 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1701 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1702 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1703 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1704 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1705 unsigned int (* Neg)(struct Expression *, struct Operand *);
1706 unsigned int (* Inc)(struct Expression *, struct Operand *);
1707 unsigned int (* Dec)(struct Expression *, struct Operand *);
1708 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1709 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1710 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1711 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1712 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1713 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1714 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1715 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1716 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1717 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1718 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1719 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1720 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1721 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1722 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1723 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1724 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1725 unsigned int (* Not)(struct Expression *, struct Operand *);
1726 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1727 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1728 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1729 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1730 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1731 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1732 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1733 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1734 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1735 } __attribute__ ((gcc_struct));
1737 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Operand;
1743 unsigned int ptrSize;
1756 } __attribute__ ((gcc_struct)) __anon1;
1758 } __attribute__ ((gcc_struct));
1760 unsigned int GetOpInt(struct Operand * op2, int * value2)
1762 if(op2->kind == 3 && op2->type->isSigned)
1763 *value2 = op2->__anon1.i;
1764 else if(op2->kind == 3)
1765 *value2 = (int)op2->__anon1.ui;
1766 else if(op2->kind == 4 && op2->type->isSigned)
1767 *value2 = (int)op2->__anon1.i64;
1768 else if(op2->kind == 4)
1769 *value2 = (int)op2->__anon1.ui64;
1770 else if(op2->kind == 23 && op2->type->isSigned)
1771 *value2 = (int)op2->__anon1.i64;
1772 else if(op2->kind == 23)
1773 *value2 = (int)op2->__anon1.ui64;
1774 else if(op2->kind == 22 && op2->type->isSigned)
1775 *value2 = (int)op2->__anon1.i64;
1776 else if(op2->kind == 22)
1777 *value2 = (int)op2->__anon1.ui64;
1778 else if(op2->kind == 2 && op2->type->isSigned)
1779 *value2 = (int)op2->__anon1.s;
1780 else if(op2->kind == 2)
1781 *value2 = (int)op2->__anon1.us;
1782 else if(op2->kind == 1 && op2->type->isSigned)
1783 *value2 = (int)op2->__anon1.c;
1784 else if(op2->kind == 24 || op2->kind == 1)
1785 *value2 = (int)op2->__anon1.uc;
1786 else if(op2->kind == 6)
1787 *value2 = (int)op2->__anon1.f;
1788 else if(op2->kind == 7)
1789 *value2 = (int)op2->__anon1.d;
1790 else if(op2->kind == 13)
1791 *value2 = (int)op2->__anon1.ui64;
1797 struct Operand GetOperand(struct Expression * exp);
1799 unsigned int GetInt(struct Expression * exp, int * value2)
1801 struct Operand op2 = GetOperand(exp);
1803 return GetOpInt(&op2, value2);
1806 unsigned int GetOpUInt(struct Operand * op2, unsigned int * value2)
1808 if(op2->kind == 3 && op2->type->isSigned)
1809 *value2 = (unsigned int)op2->__anon1.i;
1810 else if(op2->kind == 3)
1811 *value2 = op2->__anon1.ui;
1812 else if(op2->kind == 4 && op2->type->isSigned)
1813 *value2 = (unsigned int)op2->__anon1.i64;
1814 else if(op2->kind == 4)
1815 *value2 = (unsigned int)op2->__anon1.ui64;
1816 else if(op2->kind == 23 && op2->type->isSigned)
1817 *value2 = (unsigned int)op2->__anon1.i64;
1818 else if(op2->kind == 23)
1819 *value2 = (unsigned int)op2->__anon1.ui64;
1820 else if(op2->kind == 22 && op2->type->isSigned)
1821 *value2 = (unsigned int)op2->__anon1.i64;
1822 else if(op2->kind == 22)
1823 *value2 = (unsigned int)op2->__anon1.ui64;
1824 else if(op2->kind == 2 && op2->type->isSigned)
1825 *value2 = (unsigned int)op2->__anon1.s;
1826 else if(op2->kind == 2)
1827 *value2 = (unsigned int)op2->__anon1.us;
1828 else if(op2->kind == 1 && op2->type->isSigned)
1829 *value2 = (unsigned int)op2->__anon1.c;
1830 else if(op2->kind == 24 || op2->kind == 1)
1831 *value2 = (unsigned int)op2->__anon1.uc;
1832 else if(op2->kind == 6)
1833 *value2 = (unsigned int)op2->__anon1.f;
1834 else if(op2->kind == 7)
1835 *value2 = (unsigned int)op2->__anon1.d;
1836 else if(op2->kind == 13)
1837 *value2 = (unsigned int)op2->__anon1.ui64;
1843 unsigned int GetUInt(struct Expression * exp, unsigned int * value2)
1845 struct Operand op2 = GetOperand(exp);
1847 return GetOpUInt(&op2, value2);
1850 unsigned int GetOpInt64(struct Operand * op2, long long * value2)
1852 if(op2->kind == 3 && op2->type->isSigned)
1853 *value2 = (long long)op2->__anon1.i;
1854 else if(op2->kind == 3)
1855 *value2 = (long long)op2->__anon1.ui;
1856 else if(op2->kind == 4 && op2->type->isSigned)
1857 *value2 = op2->__anon1.i64;
1858 else if(op2->kind == 4)
1859 *value2 = (long long)op2->__anon1.ui64;
1860 else if(op2->kind == 23 && op2->type->isSigned)
1861 *value2 = op2->__anon1.i64;
1862 else if(op2->kind == 23)
1863 *value2 = (long long)op2->__anon1.ui64;
1864 else if(op2->kind == 22 && op2->type->isSigned)
1865 *value2 = op2->__anon1.i64;
1866 else if(op2->kind == 22)
1867 *value2 = (long long)op2->__anon1.ui64;
1868 else if(op2->kind == 2 && op2->type->isSigned)
1869 *value2 = (long long)op2->__anon1.s;
1870 else if(op2->kind == 2)
1871 *value2 = (long long)op2->__anon1.us;
1872 else if(op2->kind == 1 && op2->type->isSigned)
1873 *value2 = (long long)op2->__anon1.c;
1874 else if(op2->kind == 24 || op2->kind == 1)
1875 *value2 = (long long)op2->__anon1.uc;
1876 else if(op2->kind == 6)
1877 *value2 = (long long)op2->__anon1.f;
1878 else if(op2->kind == 7)
1879 *value2 = (long long)op2->__anon1.d;
1880 else if(op2->kind == 13)
1881 *value2 = (long long)op2->__anon1.ui64;
1887 unsigned int GetInt64(struct Expression * exp, long long * value2)
1889 struct Operand op2 = GetOperand(exp);
1891 return GetOpInt64(&op2, value2);
1894 unsigned int GetOpUInt64(struct Operand * op2, uint64 * value2)
1896 if(op2->kind == 3 && op2->type->isSigned)
1897 *value2 = (uint64)op2->__anon1.i;
1898 else if(op2->kind == 3)
1899 *value2 = (uint64)op2->__anon1.ui;
1900 else if(op2->kind == 4 && op2->type->isSigned)
1901 *value2 = (uint64)op2->__anon1.i64;
1902 else if(op2->kind == 4)
1903 *value2 = op2->__anon1.ui64;
1904 else if(op2->kind == 23 && op2->type->isSigned)
1905 *value2 = (uint64)op2->__anon1.i64;
1906 else if(op2->kind == 23)
1907 *value2 = op2->__anon1.ui64;
1908 else if(op2->kind == 22 && op2->type->isSigned)
1909 *value2 = (uint64)op2->__anon1.i64;
1910 else if(op2->kind == 22)
1911 *value2 = op2->__anon1.ui64;
1912 else if(op2->kind == 2 && op2->type->isSigned)
1913 *value2 = (uint64)op2->__anon1.s;
1914 else if(op2->kind == 2)
1915 *value2 = (uint64)op2->__anon1.us;
1916 else if(op2->kind == 1 && op2->type->isSigned)
1917 *value2 = (uint64)op2->__anon1.c;
1918 else if(op2->kind == 24 || op2->kind == 1)
1919 *value2 = (uint64)op2->__anon1.uc;
1920 else if(op2->kind == 6)
1921 *value2 = (uint64)op2->__anon1.f;
1922 else if(op2->kind == 7)
1923 *value2 = (uint64)op2->__anon1.d;
1924 else if(op2->kind == 13)
1925 *value2 = op2->__anon1.ui64;
1931 unsigned int GetUInt64(struct Expression * exp, uint64 * value2)
1933 struct Operand op2 = GetOperand(exp);
1935 return GetOpUInt64(&op2, value2);
1938 unsigned int GetOpIntPtr(struct Operand * op2, intptr_t * value2)
1940 if(op2->kind == 3 && op2->type->isSigned)
1941 *value2 = (intptr_t)op2->__anon1.i;
1942 else if(op2->kind == 3)
1943 *value2 = (intptr_t)op2->__anon1.ui;
1944 else if(op2->kind == 4 && op2->type->isSigned)
1945 *value2 = (intptr_t)op2->__anon1.i64;
1946 else if(op2->kind == 4)
1947 *value2 = (intptr_t)op2->__anon1.ui64;
1948 else if(op2->kind == 23 && op2->type->isSigned)
1949 *value2 = (intptr_t)op2->__anon1.i64;
1950 else if(op2->kind == 23)
1951 *value2 = (intptr_t)op2->__anon1.ui64;
1952 else if(op2->kind == 22 && op2->type->isSigned)
1953 *value2 = (intptr_t)op2->__anon1.i64;
1954 else if(op2->kind == 22)
1955 *value2 = (intptr_t)op2->__anon1.ui64;
1956 else if(op2->kind == 2 && op2->type->isSigned)
1957 *value2 = (intptr_t)op2->__anon1.s;
1958 else if(op2->kind == 2)
1959 *value2 = (intptr_t)op2->__anon1.us;
1960 else if(op2->kind == 1 && op2->type->isSigned)
1961 *value2 = (intptr_t)op2->__anon1.c;
1962 else if(op2->kind == 24 || op2->kind == 1)
1963 *value2 = (intptr_t)op2->__anon1.uc;
1964 else if(op2->kind == 6)
1965 *value2 = (intptr_t)op2->__anon1.f;
1966 else if(op2->kind == 7)
1967 *value2 = (intptr_t)op2->__anon1.d;
1968 else if(op2->kind == 13)
1969 *value2 = (intptr_t)op2->__anon1.ui64;
1975 unsigned int GetIntPtr(struct Expression * exp, intptr_t * value2)
1977 struct Operand op2 = GetOperand(exp);
1979 return GetOpIntPtr(&op2, value2);
1982 unsigned int GetOpUIntPtr(struct Operand * op2, uintptr_t * value2)
1984 if(op2->kind == 3 && op2->type->isSigned)
1985 *value2 = (uintptr_t)op2->__anon1.i;
1986 else if(op2->kind == 3)
1987 *value2 = (uintptr_t)op2->__anon1.ui;
1988 else if(op2->kind == 4 && op2->type->isSigned)
1989 *value2 = (uintptr_t)op2->__anon1.i64;
1990 else if(op2->kind == 4)
1991 *value2 = (uintptr_t)op2->__anon1.ui64;
1992 else if(op2->kind == 23 && op2->type->isSigned)
1993 *value2 = (uintptr_t)op2->__anon1.i64;
1994 else if(op2->kind == 23)
1995 *value2 = (uintptr_t)op2->__anon1.ui64;
1996 else if(op2->kind == 22 && op2->type->isSigned)
1997 *value2 = (uintptr_t)op2->__anon1.i64;
1998 else if(op2->kind == 22)
1999 *value2 = (uintptr_t)op2->__anon1.ui64;
2000 else if(op2->kind == 2 && op2->type->isSigned)
2001 *value2 = (uintptr_t)op2->__anon1.s;
2002 else if(op2->kind == 2)
2003 *value2 = (uintptr_t)op2->__anon1.us;
2004 else if(op2->kind == 1 && op2->type->isSigned)
2005 *value2 = (uintptr_t)op2->__anon1.c;
2006 else if(op2->kind == 24 || op2->kind == 1)
2007 *value2 = (uintptr_t)op2->__anon1.uc;
2008 else if(op2->kind == 6)
2009 *value2 = (uintptr_t)op2->__anon1.f;
2010 else if(op2->kind == 7)
2011 *value2 = (uintptr_t)op2->__anon1.d;
2012 else if(op2->kind == 13)
2013 *value2 = (uintptr_t)op2->__anon1.ui64;
2019 unsigned int GetUIntPtr(struct Expression * exp, uintptr_t * value2)
2021 struct Operand op2 = GetOperand(exp);
2023 return GetOpUIntPtr(&op2, value2);
2026 unsigned int GetOpIntSize(struct Operand * op2, ssize_t * value2)
2028 if(op2->kind == 3 && op2->type->isSigned)
2029 *value2 = (ssize_t)op2->__anon1.i;
2030 else if(op2->kind == 3)
2031 *value2 = (ssize_t)op2->__anon1.ui;
2032 else if(op2->kind == 4 && op2->type->isSigned)
2033 *value2 = (ssize_t)op2->__anon1.i64;
2034 else if(op2->kind == 4)
2035 *value2 = (ssize_t)op2->__anon1.ui64;
2036 else if(op2->kind == 23 && op2->type->isSigned)
2037 *value2 = (ssize_t)op2->__anon1.i64;
2038 else if(op2->kind == 23)
2039 *value2 = (ssize_t)op2->__anon1.ui64;
2040 else if(op2->kind == 22 && op2->type->isSigned)
2041 *value2 = (ssize_t)op2->__anon1.i64;
2042 else if(op2->kind == 22)
2043 *value2 = (ssize_t)op2->__anon1.ui64;
2044 else if(op2->kind == 2 && op2->type->isSigned)
2045 *value2 = (ssize_t)op2->__anon1.s;
2046 else if(op2->kind == 2)
2047 *value2 = (ssize_t)op2->__anon1.us;
2048 else if(op2->kind == 1 && op2->type->isSigned)
2049 *value2 = (ssize_t)op2->__anon1.c;
2050 else if(op2->kind == 24 || op2->kind == 1)
2051 *value2 = (ssize_t)op2->__anon1.uc;
2052 else if(op2->kind == 6)
2053 *value2 = (ssize_t)op2->__anon1.f;
2054 else if(op2->kind == 7)
2055 *value2 = (ssize_t)op2->__anon1.d;
2056 else if(op2->kind == 13)
2057 *value2 = (ssize_t)op2->__anon1.ui64;
2063 unsigned int GetIntSize(struct Expression * exp, ssize_t * value2)
2065 struct Operand op2 = GetOperand(exp);
2067 return GetOpIntSize(&op2, value2);
2070 unsigned int GetOpUIntSize(struct Operand * op2, size_t * value2)
2072 if(op2->kind == 3 && op2->type->isSigned)
2073 *value2 = (size_t)op2->__anon1.i;
2074 else if(op2->kind == 3)
2075 *value2 = (size_t)op2->__anon1.ui;
2076 else if(op2->kind == 4 && op2->type->isSigned)
2077 *value2 = (size_t)op2->__anon1.i64;
2078 else if(op2->kind == 4)
2079 *value2 = (size_t)op2->__anon1.ui64;
2080 else if(op2->kind == 23 && op2->type->isSigned)
2081 *value2 = (size_t)op2->__anon1.i64;
2082 else if(op2->kind == 23)
2083 *value2 = (size_t)op2->__anon1.ui64;
2084 else if(op2->kind == 22 && op2->type->isSigned)
2085 *value2 = (size_t)op2->__anon1.i64;
2086 else if(op2->kind == 22)
2087 *value2 = (size_t)op2->__anon1.ui64;
2088 else if(op2->kind == 2 && op2->type->isSigned)
2089 *value2 = (size_t)op2->__anon1.s;
2090 else if(op2->kind == 2)
2091 *value2 = (size_t)op2->__anon1.us;
2092 else if(op2->kind == 1 && op2->type->isSigned)
2093 *value2 = (size_t)op2->__anon1.c;
2094 else if(op2->kind == 24 || op2->kind == 1)
2095 *value2 = (size_t)op2->__anon1.uc;
2096 else if(op2->kind == 6)
2097 *value2 = (size_t)op2->__anon1.f;
2098 else if(op2->kind == 7)
2099 *value2 = (size_t)op2->__anon1.d;
2100 else if(op2->kind == 13)
2101 *value2 = (size_t)op2->__anon1.ui64;
2107 unsigned int GetUIntSize(struct Expression * exp, size_t * value2)
2109 struct Operand op2 = GetOperand(exp);
2111 return GetOpUIntSize(&op2, value2);
2114 unsigned int GetOpShort(struct Operand * op2, short * value2)
2116 if(op2->kind == 3 && op2->type->isSigned)
2117 *value2 = (short)op2->__anon1.i;
2118 else if(op2->kind == 3)
2119 *value2 = (short)op2->__anon1.ui;
2120 else if(op2->kind == 4 && op2->type->isSigned)
2121 *value2 = (short)op2->__anon1.i64;
2122 else if(op2->kind == 4)
2123 *value2 = (short)op2->__anon1.ui64;
2124 else if(op2->kind == 23 && op2->type->isSigned)
2125 *value2 = (short)op2->__anon1.i64;
2126 else if(op2->kind == 23)
2127 *value2 = (short)op2->__anon1.ui64;
2128 else if(op2->kind == 22 && op2->type->isSigned)
2129 *value2 = (short)op2->__anon1.i64;
2130 else if(op2->kind == 22)
2131 *value2 = (short)op2->__anon1.ui64;
2132 else if(op2->kind == 2 && op2->type->isSigned)
2133 *value2 = op2->__anon1.s;
2134 else if(op2->kind == 2)
2135 *value2 = (short)op2->__anon1.us;
2136 else if(op2->kind == 1 && op2->type->isSigned)
2137 *value2 = (short)op2->__anon1.c;
2138 else if(op2->kind == 24 || op2->kind == 1)
2139 *value2 = (short)op2->__anon1.uc;
2140 else if(op2->kind == 6)
2141 *value2 = (short)op2->__anon1.f;
2142 else if(op2->kind == 7)
2143 *value2 = (short)op2->__anon1.d;
2144 else if(op2->kind == 13)
2145 *value2 = (short)op2->__anon1.ui64;
2151 unsigned int GetShort(struct Expression * exp, short * value2)
2153 struct Operand op2 = GetOperand(exp);
2155 return GetOpShort(&op2, value2);
2158 unsigned int GetOpUShort(struct Operand * op2, unsigned short * value2)
2160 if(op2->kind == 3 && op2->type->isSigned)
2161 *value2 = (unsigned short)op2->__anon1.i;
2162 else if(op2->kind == 3)
2163 *value2 = (unsigned short)op2->__anon1.ui;
2164 else if(op2->kind == 4 && op2->type->isSigned)
2165 *value2 = (unsigned short)op2->__anon1.i64;
2166 else if(op2->kind == 4)
2167 *value2 = (unsigned short)op2->__anon1.ui64;
2168 else if(op2->kind == 23 && op2->type->isSigned)
2169 *value2 = (unsigned short)op2->__anon1.i64;
2170 else if(op2->kind == 23)
2171 *value2 = (unsigned short)op2->__anon1.ui64;
2172 else if(op2->kind == 22 && op2->type->isSigned)
2173 *value2 = (unsigned short)op2->__anon1.i64;
2174 else if(op2->kind == 22)
2175 *value2 = (unsigned short)op2->__anon1.ui64;
2176 else if(op2->kind == 2 && op2->type->isSigned)
2177 *value2 = (unsigned short)op2->__anon1.s;
2178 else if(op2->kind == 2)
2179 *value2 = op2->__anon1.us;
2180 else if(op2->kind == 1 && op2->type->isSigned)
2181 *value2 = (unsigned short)op2->__anon1.c;
2182 else if(op2->kind == 24 || op2->kind == 1)
2183 *value2 = (unsigned short)op2->__anon1.uc;
2184 else if(op2->kind == 6)
2185 *value2 = (unsigned short)op2->__anon1.f;
2186 else if(op2->kind == 7)
2187 *value2 = (unsigned short)op2->__anon1.d;
2188 else if(op2->kind == 13)
2189 *value2 = (unsigned short)op2->__anon1.ui64;
2195 unsigned int GetUShort(struct Expression * exp, unsigned short * value2)
2197 struct Operand op2 = GetOperand(exp);
2199 return GetOpUShort(&op2, value2);
2202 unsigned int GetOpChar(struct Operand * op2, char * value2)
2204 if(op2->kind == 3 && op2->type->isSigned)
2205 *value2 = (char)op2->__anon1.i;
2206 else if(op2->kind == 3)
2207 *value2 = (char)op2->__anon1.ui;
2208 else if(op2->kind == 4 && op2->type->isSigned)
2209 *value2 = (char)op2->__anon1.i64;
2210 else if(op2->kind == 4)
2211 *value2 = (char)op2->__anon1.ui64;
2212 else if(op2->kind == 23 && op2->type->isSigned)
2213 *value2 = (char)op2->__anon1.i64;
2214 else if(op2->kind == 23)
2215 *value2 = (char)op2->__anon1.ui64;
2216 else if(op2->kind == 22 && op2->type->isSigned)
2217 *value2 = (char)op2->__anon1.i64;
2218 else if(op2->kind == 22)
2219 *value2 = (char)op2->__anon1.ui64;
2220 else if(op2->kind == 2 && op2->type->isSigned)
2221 *value2 = (char)op2->__anon1.s;
2222 else if(op2->kind == 2)
2223 *value2 = (char)op2->__anon1.us;
2224 else if(op2->kind == 1 && op2->type->isSigned)
2225 *value2 = op2->__anon1.c;
2226 else if(op2->kind == 24 || op2->kind == 1)
2227 *value2 = (char)op2->__anon1.uc;
2228 else if(op2->kind == 6)
2229 *value2 = (char)op2->__anon1.f;
2230 else if(op2->kind == 7)
2231 *value2 = (char)op2->__anon1.d;
2232 else if(op2->kind == 13)
2233 *value2 = (char)op2->__anon1.ui64;
2239 unsigned int GetChar(struct Expression * exp, char * value2)
2241 struct Operand op2 = GetOperand(exp);
2243 return GetOpChar(&op2, value2);
2246 unsigned int GetOpUChar(struct Operand * op2, unsigned char * value2)
2248 if(op2->kind == 3 && op2->type->isSigned)
2249 *value2 = (unsigned char)op2->__anon1.i;
2250 else if(op2->kind == 3)
2251 *value2 = (unsigned char)op2->__anon1.ui;
2252 else if(op2->kind == 4 && op2->type->isSigned)
2253 *value2 = (unsigned char)op2->__anon1.i64;
2254 else if(op2->kind == 4)
2255 *value2 = (unsigned char)op2->__anon1.ui64;
2256 else if(op2->kind == 23 && op2->type->isSigned)
2257 *value2 = (unsigned char)op2->__anon1.i64;
2258 else if(op2->kind == 23)
2259 *value2 = (unsigned char)op2->__anon1.ui64;
2260 else if(op2->kind == 22 && op2->type->isSigned)
2261 *value2 = (unsigned char)op2->__anon1.i64;
2262 else if(op2->kind == 22)
2263 *value2 = (unsigned char)op2->__anon1.ui64;
2264 else if(op2->kind == 2 && op2->type->isSigned)
2265 *value2 = (unsigned char)op2->__anon1.s;
2266 else if(op2->kind == 2)
2267 *value2 = (unsigned char)op2->__anon1.us;
2268 else if(op2->kind == 1 && op2->type->isSigned)
2269 *value2 = (unsigned char)op2->__anon1.c;
2270 else if(op2->kind == 24 || op2->kind == 1)
2271 *value2 = op2->__anon1.uc;
2272 else if(op2->kind == 6)
2273 *value2 = (unsigned char)op2->__anon1.f;
2274 else if(op2->kind == 7)
2275 *value2 = (unsigned char)op2->__anon1.d;
2276 else if(op2->kind == 13)
2277 *value2 = (unsigned char)op2->__anon1.ui64;
2283 unsigned int GetUChar(struct Expression * exp, unsigned char * value2)
2285 struct Operand op2 = GetOperand(exp);
2287 return GetOpUChar(&op2, value2);
2290 unsigned int GetOpFloat(struct Operand * op2, float * value2)
2292 if(op2->kind == 3 && op2->type->isSigned)
2293 *value2 = (float)(float)op2->__anon1.i;
2294 else if(op2->kind == 3)
2295 *value2 = (float)(float)op2->__anon1.ui;
2296 else if(op2->kind == 4 && op2->type->isSigned)
2297 *value2 = (float)(float)op2->__anon1.i64;
2298 else if(op2->kind == 4)
2299 *value2 = (float)(float)op2->__anon1.ui64;
2300 else if(op2->kind == 23 && op2->type->isSigned)
2301 *value2 = (float)(float)op2->__anon1.i64;
2302 else if(op2->kind == 23)
2303 *value2 = (float)(float)op2->__anon1.ui64;
2304 else if(op2->kind == 22 && op2->type->isSigned)
2305 *value2 = (float)(float)op2->__anon1.i64;
2306 else if(op2->kind == 22)
2307 *value2 = (float)(float)op2->__anon1.ui64;
2308 else if(op2->kind == 2 && op2->type->isSigned)
2309 *value2 = (float)(float)op2->__anon1.s;
2310 else if(op2->kind == 2)
2311 *value2 = (float)(float)op2->__anon1.us;
2312 else if(op2->kind == 1 && op2->type->isSigned)
2313 *value2 = (float)(float)op2->__anon1.c;
2314 else if(op2->kind == 24 || op2->kind == 1)
2315 *value2 = (float)(float)op2->__anon1.uc;
2316 else if(op2->kind == 6)
2317 *value2 = (float)op2->__anon1.f;
2318 else if(op2->kind == 7)
2319 *value2 = (float)op2->__anon1.d;
2320 else if(op2->kind == 13)
2321 *value2 = (float)(float)op2->__anon1.ui64;
2327 unsigned int GetFloat(struct Expression * exp, float * value2)
2329 struct Operand op2 = GetOperand(exp);
2331 return GetOpFloat(&op2, value2);
2334 unsigned int GetOpDouble(struct Operand * op2, double * value2)
2336 if(op2->kind == 3 && op2->type->isSigned)
2337 *value2 = (double)(double)op2->__anon1.i;
2338 else if(op2->kind == 3)
2339 *value2 = (double)(double)op2->__anon1.ui;
2340 else if(op2->kind == 4 && op2->type->isSigned)
2341 *value2 = (double)(double)op2->__anon1.i64;
2342 else if(op2->kind == 4)
2343 *value2 = (double)(double)op2->__anon1.ui64;
2344 else if(op2->kind == 23 && op2->type->isSigned)
2345 *value2 = (double)(double)op2->__anon1.i64;
2346 else if(op2->kind == 23)
2347 *value2 = (double)(double)op2->__anon1.ui64;
2348 else if(op2->kind == 22 && op2->type->isSigned)
2349 *value2 = (double)(double)op2->__anon1.i64;
2350 else if(op2->kind == 22)
2351 *value2 = (double)(double)op2->__anon1.ui64;
2352 else if(op2->kind == 2 && op2->type->isSigned)
2353 *value2 = (double)(double)op2->__anon1.s;
2354 else if(op2->kind == 2)
2355 *value2 = (double)(double)op2->__anon1.us;
2356 else if(op2->kind == 1 && op2->type->isSigned)
2357 *value2 = (double)(double)op2->__anon1.c;
2358 else if(op2->kind == 24 || op2->kind == 1)
2359 *value2 = (double)(double)op2->__anon1.uc;
2360 else if(op2->kind == 6)
2361 *value2 = (double)op2->__anon1.f;
2362 else if(op2->kind == 7)
2363 *value2 = (double)op2->__anon1.d;
2364 else if(op2->kind == 13)
2365 *value2 = (double)(double)op2->__anon1.ui64;
2371 unsigned int GetDouble(struct Expression * exp, double * value2)
2373 struct Operand op2 = GetOperand(exp);
2375 return GetOpDouble(&op2, value2);
2378 void ComputeExpression(struct Expression * exp);
2380 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class);
2382 extern int targetBits;
2384 int ComputeTypeSize(struct Type * type);
2386 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
2388 struct __ecereNameSpace__ecere__com__BitMember
2390 struct __ecereNameSpace__ecere__com__BitMember * prev;
2391 struct __ecereNameSpace__ecere__com__BitMember * next;
2393 unsigned int isProperty;
2396 struct __ecereNameSpace__ecere__com__Class * _class;
2397 const char * dataTypeString;
2398 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
2399 struct Type * dataType;
2404 } __attribute__ ((gcc_struct));
2406 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldLink;
2408 struct __ecereNameSpace__ecere__sys__OldLink
2410 struct __ecereNameSpace__ecere__sys__OldLink * prev;
2411 struct __ecereNameSpace__ecere__sys__OldLink * next;
2413 } __attribute__ ((gcc_struct));
2415 void FinishTemplatesContext(struct Context * context);
2417 void ComputeClassMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
2419 struct __ecereNameSpace__ecere__com__DataMember * member = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2420 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2422 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))
2424 int unionMemberOffset = 0;
2429 member->memberOffset = 0;
2430 if(targetBits < sizeof(void *) * 8)
2431 member->structAlignment = 0;
2433 else if(targetBits < sizeof(void *) * 8)
2434 _class->structAlignment = 0;
2435 if(!member && ((_class->type == 0 || _class->type == 5) || (_class->type == 1 && _class->memberOffset && _class->memberOffset > _class->base->structSize)))
2436 _class->memberOffset = (_class->base && _class->type == 1) ? _class->base->structSize : 0;
2437 if(!member && _class->destructionWatchOffset)
2438 _class->memberOffset += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2440 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2442 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2444 if(!dataMember->isProperty)
2446 if(dataMember->type == 0 && dataMember->dataTypeString && !dataMember->dataType)
2448 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
2454 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2456 for(dataMember = member ? member->members.first : _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
2458 if(!dataMember->isProperty && (dataMember->type != 0 || dataMember->dataTypeString))
2460 if(!isMember && _class->type == 2 && dataMember->dataType)
2462 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
2466 ComputeTypeSize(dataMember->dataType);
2467 if(bitMember->pos == -1)
2468 bitMember->pos = _class->memberOffset;
2469 if(!bitMember->size)
2470 bitMember->size = dataMember->dataType->size * 8;
2471 _class->memberOffset = bitMember->pos + bitMember->size;
2472 for(d = 0; d < bitMember->size; d++)
2478 bitMember->mask = mask << bitMember->pos;
2480 else if(dataMember->type == 0 && dataMember->dataType)
2485 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)))
2486 ComputeTypeSize(dataMember->dataType);
2487 if(dataMember->dataType->bitFieldCount)
2489 bitFields += dataMember->dataType->bitFieldCount;
2496 int size = (bitFields + 7) / 8;
2500 int __simpleStruct0;
2504 int __simpleStruct0;
2506 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2507 if(member->memberOffset % alignment)
2508 member->memberOffset += alignment - (member->memberOffset % alignment);
2510 dataMember->offset = member->memberOffset;
2511 if(member->type == 1)
2512 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2515 member->memberOffset += size;
2522 int __simpleStruct0;
2524 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2525 if(_class->memberOffset % alignment)
2526 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2528 dataMember->offset = _class->memberOffset;
2529 _class->memberOffset += size;
2533 size = dataMember->dataType->size;
2534 alignment = dataMember->dataType->alignment;
2538 int __simpleStruct0;
2542 int __simpleStruct0;
2544 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2545 if(member->memberOffset % alignment)
2546 member->memberOffset += alignment - (member->memberOffset % alignment);
2548 dataMember->offset = member->memberOffset;
2549 if(member->type == 1)
2550 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2553 member->memberOffset += size;
2560 int __simpleStruct0;
2562 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2563 if(_class->memberOffset % alignment)
2564 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2566 dataMember->offset = _class->memberOffset;
2567 _class->memberOffset += size;
2574 ComputeClassMembers((struct __ecereNameSpace__ecere__com__Class *)dataMember, 1);
2575 alignment = dataMember->structAlignment;
2578 int __simpleStruct0;
2582 int __simpleStruct0;
2584 if(member->memberOffset % alignment)
2585 member->memberOffset += alignment - (member->memberOffset % alignment);
2586 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2588 dataMember->offset = member->memberOffset;
2589 if(member->type == 1)
2590 unionMemberOffset = (__simpleStruct0 = dataMember->memberOffset, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2592 member->memberOffset += dataMember->memberOffset;
2598 int __simpleStruct0;
2600 if(_class->memberOffset % alignment)
2601 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2602 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2604 dataMember->offset = _class->memberOffset;
2605 _class->memberOffset += dataMember->memberOffset;
2613 int size = (bitFields + 7) / 8;
2617 int __simpleStruct0;
2621 int __simpleStruct0;
2623 member->structAlignment = (__simpleStruct0 = member->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2624 if(member->memberOffset % alignment)
2625 member->memberOffset += alignment - (member->memberOffset % alignment);
2627 if(member->type == 1)
2628 unionMemberOffset = (__simpleStruct0 = dataMember->dataType->size, (unionMemberOffset > __simpleStruct0) ? unionMemberOffset : __simpleStruct0);
2631 member->memberOffset += size;
2638 int __simpleStruct0;
2640 _class->structAlignment = (__simpleStruct0 = _class->structAlignment, (__simpleStruct0 > alignment) ? __simpleStruct0 : alignment);
2641 if(_class->memberOffset % alignment)
2642 _class->memberOffset += alignment - (_class->memberOffset % alignment);
2644 _class->memberOffset += size;
2649 if(member && member->type == 1)
2651 member->memberOffset = unionMemberOffset;
2655 if(_class->type != 2)
2659 if(_class->structAlignment)
2661 if(_class->memberOffset % _class->structAlignment)
2662 extra += _class->structAlignment - (_class->memberOffset % _class->structAlignment);
2664 _class->structSize = (_class->base ? (_class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize) : 0) + _class->memberOffset + extra;
2667 struct __ecereNameSpace__ecere__com__Property * prop;
2669 for(prop = _class->membersAndProperties.first; prop; prop = prop->next)
2671 if(prop->isProperty && prop->isWatchable)
2673 prop->watcherOffset = _class->structSize;
2674 _class->structSize += sizeof(struct __ecereNameSpace__ecere__sys__OldList);
2679 struct __ecereNameSpace__ecere__sys__OldLink * derivative;
2681 for(derivative = _class->derivatives.first; derivative; derivative = derivative->next)
2683 struct __ecereNameSpace__ecere__com__Class * deriv = derivative->data;
2685 if(deriv->computeSize)
2687 deriv->offset = _class->structSize;
2688 deriv->memberOffset = 0;
2689 deriv->structSize = deriv->offset;
2690 ComputeClassMembers(deriv, 0);
2698 FinishTemplatesContext(context);
2701 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
2703 struct __ecereNameSpace__ecere__com__NameSpace
2706 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
2707 struct __ecereNameSpace__ecere__com__NameSpace * left;
2708 struct __ecereNameSpace__ecere__com__NameSpace * right;
2710 struct __ecereNameSpace__ecere__com__NameSpace * parent;
2711 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
2712 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
2713 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
2714 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
2715 } __attribute__ ((gcc_struct));
2717 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2719 struct __ecereNameSpace__ecere__com__Module
2721 struct __ecereNameSpace__ecere__com__Instance * application;
2722 struct __ecereNameSpace__ecere__sys__OldList classes;
2723 struct __ecereNameSpace__ecere__sys__OldList defines;
2724 struct __ecereNameSpace__ecere__sys__OldList functions;
2725 struct __ecereNameSpace__ecere__sys__OldList modules;
2726 struct __ecereNameSpace__ecere__com__Instance * prev;
2727 struct __ecereNameSpace__ecere__com__Instance * next;
2733 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
2734 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
2735 } __attribute__ ((gcc_struct));
2737 void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module)
2739 struct __ecereNameSpace__ecere__com__Class * _class;
2740 struct __ecereNameSpace__ecere__sys__OldLink * subModule;
2742 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
2743 ComputeModuleClasses(subModule->data);
2744 for(_class = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->classes.first; _class; _class = _class->next)
2745 ComputeClassMembers(_class, 0);
2748 extern unsigned int inCompiler;
2750 extern void Compiler_Error(const char * format, ...);
2752 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
2754 extern struct Symbol * FindStruct(struct Context * ctx, const char * name);
2756 int ComputeTypeSize(struct Type * type)
2758 unsigned int size = type ? type->size : 0;
2760 if(!size && type && !type->computing)
2762 type->computing = 1;
2766 type->alignment = size = sizeof(char);
2769 type->alignment = size = sizeof(char);
2772 type->alignment = size = sizeof(int);
2775 type->alignment = size = sizeof(long long);
2778 type->alignment = size = targetBits / 8;
2781 type->alignment = size = targetBits / 8;
2784 type->alignment = size = sizeof(long);
2787 type->alignment = size = sizeof(short);
2790 type->alignment = size = sizeof(float);
2793 type->alignment = size = sizeof(double);
2797 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class ? type->__anon1._class->__anon1.registered : (((void *)0));
2799 if(_class && _class->type == 1)
2801 ComputeClassMembers(_class, 0);
2802 type->alignment = _class->structAlignment;
2803 size = _class->structSize;
2804 if(type->alignment && size % type->alignment)
2805 size += type->alignment - (size % type->alignment);
2807 else if(_class && (_class->type == 3 || _class->type == 4 || _class->type == 2))
2809 if(!_class->dataType)
2810 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
2811 size = type->alignment = ComputeTypeSize(_class->dataType);
2814 size = type->alignment = targetBits / 8;
2819 size = type->alignment = targetBits / 8;
2822 if(type->__anon1.__anon4.arraySizeExp)
2824 ProcessExpressionType(type->__anon1.__anon4.arraySizeExp);
2825 ComputeExpression(type->__anon1.__anon4.arraySizeExp);
2826 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)))
2828 struct Location oldLoc = yylloc;
2829 char expression[10240];
2831 expression[0] = '\0';
2832 type->__anon1.__anon4.arraySizeExp->expType = (((void *)0));
2833 yylloc = type->__anon1.__anon4.arraySizeExp->loc;
2835 PrintExpression(type->__anon1.__anon4.arraySizeExp, expression);
2836 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Array size not constant int (%s)\n", (((void *)0))), expression);
2839 GetInt(type->__anon1.__anon4.arraySizeExp, &type->__anon1.__anon4.arraySize);
2841 else if(type->__anon1.__anon4.enumClass)
2843 if(type->__anon1.__anon4.enumClass && type->__anon1.__anon4.enumClass->__anon1.registered && type->__anon1.__anon4.enumClass->__anon1.registered->type == 4)
2845 type->__anon1.__anon4.arraySize = (int)__ecereNameSpace__ecere__com__eClass_GetProperty(type->__anon1.__anon4.enumClass->__anon1.registered, "enumSize");
2848 type->__anon1.__anon4.arraySize = 0;
2852 type->__anon1.__anon4.arraySize = 0;
2854 size = ComputeTypeSize(type->__anon1.type) * type->__anon1.__anon4.arraySize;
2855 if(type->__anon1.type)
2856 type->alignment = type->__anon1.type->alignment;
2860 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
2862 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
2864 if(symbol && symbol->type)
2866 ComputeTypeSize(symbol->type);
2867 size = symbol->type->size;
2872 struct Type * member;
2874 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2876 int __simpleStruct0, __simpleStruct1;
2877 unsigned int addSize = ComputeTypeSize(member);
2879 member->offset = size;
2880 if(member->alignment && size % member->alignment)
2881 member->offset += member->alignment - (size % member->alignment);
2882 size = member->offset;
2883 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2886 if(type->alignment && size % type->alignment)
2887 size += type->alignment - (size % type->alignment);
2893 if(!type->__anon1.__anon1.members.first && type->__anon1.__anon1.enumName)
2895 struct Symbol * symbol = FindStruct(curContext, type->__anon1.__anon1.enumName);
2897 if(symbol && symbol->type)
2899 ComputeTypeSize(symbol->type);
2900 size = symbol->type->size;
2905 struct Type * member;
2907 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
2909 int __simpleStruct0, __simpleStruct1;
2910 unsigned int addSize = ComputeTypeSize(member);
2912 member->offset = size;
2913 if(member->alignment && size % member->alignment)
2914 member->offset += member->alignment - (size % member->alignment);
2915 size = member->offset;
2916 type->alignment = (__simpleStruct0 = type->alignment, __simpleStruct1 = member->alignment, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
2917 size = ((size > addSize) ? size : addSize);
2919 if(type->alignment && size % type->alignment)
2920 size += type->alignment - (size % type->alignment);
2926 struct TemplateParameter * param = type->__anon1.templateParameter;
2927 struct Type * baseType = ProcessTemplateParameterType(param);
2931 size = ComputeTypeSize(baseType);
2932 type->alignment = baseType->alignment;
2935 type->alignment = size = sizeof(uint64);
2940 type->alignment = size = sizeof(enum
2948 type->alignment = size = targetBits / 8;
2953 type->computing = 0;
2958 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
2960 extern struct Identifier * MkIdentifier(const char * string);
2962 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
2964 extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
2966 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
2968 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
2970 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class);
2972 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams);
2974 extern void FreeType(struct Type * type);
2976 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
2978 extern struct Specifier * MkSpecifier(int specifier);
2980 extern struct Declarator * MkDeclaratorArray(struct Declarator * declarator, struct Expression * exp);
2982 extern struct Expression * MkExpConstant(const char * string);
2984 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)
2986 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
2987 unsigned int totalSize = 0;
2988 unsigned int maxSize = 0;
2991 struct __ecereNameSpace__ecere__com__DataMember * member;
2993 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
2997 if(!isMember && _class->base)
2999 maxSize = _class->structSize;
3001 if(_class->type == 1 || _class->type == 5)
3002 AddMembers(declarations, _class->base, 0, &totalSize, topClass, (((void *)0)));
3005 unsigned int baseSize = _class->base->templateClass ? _class->base->templateClass->structSize : _class->base->structSize;
3007 if(maxSize > baseSize)
3008 maxSize -= baseSize;
3014 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
3016 if(!member->isProperty)
3018 switch(member->type)
3022 if(member->dataTypeString)
3024 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * decls = MkList();
3025 struct Declarator * decl;
3027 decl = SpecDeclFromString(member->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier(member->name)));
3028 ListAdd(decls, MkStructDeclarator(decl, (((void *)0))));
3029 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, decls, (((void *)0)))));
3030 if(!member->dataType)
3031 member->dataType = ProcessType(specs, decl);
3032 ReplaceThisClassSpecifiers(specs, topClass);
3034 struct Type * type = ProcessType(specs, decl);
3036 DeclareType(member->dataType, 0, 0);
3039 ComputeTypeSize(member->dataType);
3040 size = member->dataType->size;
3041 alignment = member->dataType->alignment;
3044 if(totalSize % alignment)
3045 totalSize += alignment - (totalSize % alignment);
3054 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * list = MkList();
3057 sprintf(id, "__anon%d", anonID++);
3059 AddMembers(list, (struct __ecereNameSpace__ecere__com__Class *)member, 1, &size, topClass, (((void *)0)));
3060 ListAdd(specs, MkStructOrUnion((member->type == 1) ? 4 : 3, (((void *)0)), list));
3061 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(specs, MkListOne(MkDeclaratorIdentifier(MkIdentifier(id))), (((void *)0)))));
3062 alignment = member->structAlignment;
3065 if(totalSize % alignment)
3066 totalSize += alignment - (totalSize % alignment);
3076 unsigned int __simpleStruct0;
3078 if(topMember && topMember->type == 1)
3079 *retSize = (__simpleStruct0 = *retSize, (__simpleStruct0 > totalSize) ? __simpleStruct0 : totalSize);
3081 *retSize += totalSize;
3083 else if(totalSize < maxSize && _class->type != 1000)
3085 int autoPadding = 0;
3087 if(!isMember && _class->structAlignment && totalSize % _class->structAlignment)
3088 autoPadding = _class->structAlignment - (totalSize % _class->structAlignment);
3089 if(totalSize + autoPadding < maxSize)
3091 char sizeString[50];
3093 sprintf(sizeString, "%d", maxSize - totalSize);
3094 ListAdd(declarations, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(CHAR)), MkListOne(MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__ecere_padding")), MkExpConstant(sizeString))), (((void *)0)))));
3100 FinishTemplatesContext(context);
3101 return topMember ? topMember->memberID : _class->memberID;
3104 static int DeclareMembers(struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember)
3106 struct __ecereNameSpace__ecere__com__DataMember * topMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)_class : (((void *)0));
3107 struct __ecereNameSpace__ecere__com__DataMember * member;
3108 struct Context * context = isMember ? (((void *)0)) : SetupTemplatesContext(_class);
3110 if(!isMember && (_class->type == 1 || _class->type == 5) && _class->base->type != 1000)
3111 DeclareMembers(_class->base, 0);
3112 for(member = isMember ? topMember->members.first : _class->membersAndProperties.first; member; member = member->next)
3114 if(!member->isProperty)
3116 switch(member->type)
3120 if(!member->dataType && member->dataTypeString)
3121 member->dataType = ProcessTypeString(member->dataTypeString, 0);
3122 if(member->dataType)
3123 DeclareType(member->dataType, 0, 0);
3129 DeclareMembers((struct __ecereNameSpace__ecere__com__Class *)member, 1);
3136 FinishTemplatesContext(context);
3137 return topMember ? topMember->memberID : _class->memberID;
3140 extern struct Identifier * GetDeclId(struct Declarator * decl);
3142 static void IdentifyAnonStructs(struct __ecereNameSpace__ecere__sys__OldList * definitions)
3144 struct ClassDef * def;
3147 for(def = (*definitions).first; def; def = def->next)
3151 struct Declaration * decl = def->__anon1.decl;
3153 if(decl && decl->__anon1.__anon1.specifiers)
3155 struct Specifier * spec;
3156 unsigned int isStruct = 0;
3158 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3160 if(spec->type == 3 || spec->type == 4)
3162 if(spec->__anon1.__anon2.definitions)
3163 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3169 struct Declarator * d = (((void *)0));
3171 if(decl->__anon1.__anon1.declarators)
3173 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
3175 struct Identifier * idDecl = GetDeclId(d);
3185 sprintf(id, "__anon%d", anonID++);
3186 if(!decl->__anon1.__anon1.declarators)
3187 decl->__anon1.__anon1.declarators = MkList();
3188 ListAdd(decl->__anon1.__anon1.declarators, MkDeclaratorIdentifier(MkIdentifier(id)));
3196 extern struct Symbol * FindClass(const char * name);
3198 extern char * strchr(const char * , int);
3200 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
3202 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
3204 extern void FreeClassDef(struct ClassDef * def);
3206 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
3208 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
3210 extern void DeclareClass(struct Symbol * classSym, const char * className);
3212 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move(struct __ecereNameSpace__ecere__sys__OldList * this, void * item, void * prevItem);
3214 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
3216 void DeclareStruct(const char * name, unsigned int skipNoHead)
3218 struct External * external = (((void *)0));
3219 struct Symbol * classSym = FindClass(name);
3221 if(!inCompiler || !classSym)
3223 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3 || classSym->__anon1.registered->type == 4))
3225 if(classSym->__anon1.registered && classSym->imported && !classSym->declaredStructSym)
3227 struct Declaration * decl;
3228 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3229 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0));
3230 char structName[1024];
3231 struct Specifier * spec = (((void *)0));
3233 external = (classSym->__anon1.registered && classSym->__anon1.registered->type == 1) ? classSym->__anon2.__anon1.pointerExternal : classSym->__anon2.__anon1.structExternal;
3234 classSym->declaring++;
3235 if(strchr(classSym->string, '<'))
3237 if(classSym->__anon1.registered->templateClass)
3239 DeclareStruct(classSym->__anon1.registered->templateClass->fullName, skipNoHead);
3240 classSym->declaring--;
3244 DeclareMembers(classSym->__anon1.registered, 0);
3245 structName[0] = (char)0;
3246 FullClassNameCat(structName, name, 0);
3247 if(external && external->__anon1.declaration && external->__anon1.declaration->__anon1.__anon1.specifiers)
3249 for(spec = (*external->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3251 if(spec->type == 3 || spec->type == 4)
3255 if(!skipNoHead && (!spec || !spec->__anon1.__anon2.definitions))
3257 unsigned int addedPadding = 0;
3259 classSym->declaredStructSym = 1;
3260 declarations = MkList();
3261 AddMembers(declarations, classSym->__anon1.registered, 0, (((void *)0)), classSym->__anon1.registered, &addedPadding);
3262 if(!(*declarations).count || ((*declarations).count == 1 && addedPadding))
3264 FreeList(declarations, (void *)(FreeClassDef));
3265 declarations = (((void *)0));
3268 if(skipNoHead || declarations)
3273 spec->__anon1.__anon2.definitions = declarations;
3274 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3276 if(classSym->__anon2.__anon1.structExternal)
3277 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3278 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3279 classSym->id = curExternal->symbol->idCode;
3280 classSym->idCode = curExternal->symbol->idCode;
3286 external = MkExternalDeclaration((((void *)0)));
3287 specifiers = MkList();
3288 declarators = MkList();
3289 ListAdd(specifiers, MkStructOrUnion(3, MkIdentifier(structName), declarations));
3290 external->__anon1.declaration = decl = MkDeclaration(specifiers, declarators);
3291 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
3292 decl->symbol->__anon2.__anon1.pointerExternal = external;
3293 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3295 char className[1024];
3297 strcpy(className, "__ecereClass_");
3298 FullClassNameCat(className, classSym->string, 1);
3299 DeclareClass(classSym, className);
3300 external->symbol = classSym;
3301 classSym->__anon2.__anon1.pointerExternal = external;
3302 classSym->id = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3303 classSym->idCode = (curExternal && curExternal->symbol) ? curExternal->symbol->idCode : 0;
3307 char className[1024];
3309 strcpy(className, "__ecereClass_");
3310 FullClassNameCat(className, classSym->string, 1);
3311 classSym->__anon2.__anon1.structExternal = external;
3312 DeclareClass(classSym, className);
3313 external->symbol = classSym;
3315 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
3318 classSym->declaring--;
3322 if(classSym->__anon2.__anon1.structExternal && classSym->__anon2.__anon1.structExternal->__anon1.declaration && classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers)
3324 struct Specifier * spec;
3326 for(spec = (*classSym->__anon2.__anon1.structExternal->__anon1.declaration->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
3328 IdentifyAnonStructs(spec->__anon1.__anon2.definitions);
3331 if(curExternal && curExternal->symbol && curExternal->symbol->idCode < classSym->id)
3333 classSym->declaring++;
3335 if(classSym->__anon1.registered)
3336 DeclareMembers(classSym->__anon1.registered, 0);
3338 if(classSym->__anon1.registered && (classSym->__anon1.registered->type == 1 || classSym->__anon1.registered->type == 5))
3340 if(classSym->__anon2.__anon1.structExternal)
3341 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.structExternal, curExternal->prev);
3342 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), classSym->__anon2.__anon1.pointerExternal, curExternal->prev);
3343 classSym->id = curExternal->symbol->idCode;
3344 classSym->idCode = curExternal->symbol->idCode;
3346 classSym->declaring--;
3351 extern struct ModuleImport * FindModule(struct __ecereNameSpace__ecere__com__Instance * moduleToFind);
3353 extern struct ModuleImport * mainModule;
3355 extern struct Specifier * MkSpecifierName(const char * name);
3357 extern struct Declarator * MkDeclaratorBrackets(struct Declarator * declarator);
3359 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
3361 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
3363 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
3365 extern void FreeDeclarator(struct Declarator * decl);
3367 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
3369 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
3371 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
3373 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
3375 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyImport;
3377 struct PropertyImport
3379 struct PropertyImport * prev;
3380 struct PropertyImport * next;
3382 unsigned int isVirtual;
3383 unsigned int hasSet;
3384 unsigned int hasGet;
3385 } __attribute__ ((gcc_struct));
3387 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
3389 void DeclareProperty(struct __ecereNameSpace__ecere__com__Property * prop, char * setName, char * getName)
3391 struct Symbol * symbol = prop->symbol;
3393 strcpy(setName, "__ecereProp_");
3394 FullClassNameCat(setName, prop->_class->fullName, 0);
3395 strcat(setName, "_Set_");
3396 FullClassNameCat(setName, prop->name, 1);
3397 strcpy(getName, "__ecereProp_");
3398 FullClassNameCat(getName, prop->_class->fullName, 0);
3399 strcat(getName, "_Get_");
3400 FullClassNameCat(getName, prop->name, 1);
3401 if(prop->_class->type == 1)
3402 DeclareStruct(prop->_class->fullName, 0);
3403 if(!symbol || curExternal->symbol->idCode < symbol->id)
3405 unsigned int imported = 0;
3406 unsigned int dllImport = 0;
3408 if(!symbol || symbol->_import)
3412 struct Symbol * classSym;
3414 if(!prop->_class->symbol)
3415 prop->_class->symbol = FindClass(prop->_class->fullName);
3416 classSym = prop->_class->symbol;
3417 if(classSym && !classSym->_import)
3419 struct ModuleImport * module;
3421 if(prop->_class->module)
3422 module = FindModule(prop->_class->module);
3424 module = mainModule;
3425 classSym->_import = __extension__ ({
3426 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
3428 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->_class->fullName), __ecereInstance1->isRemote = prop->_class->isRemote, __ecereInstance1;
3430 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
3432 symbol = prop->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
3433 symbol->_import = (struct ClassImport *)__extension__ ({
3434 struct PropertyImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyImport);
3436 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->isVirtual = 0, __ecereInstance1->hasSet = prop->Set ? 1 : 0, __ecereInstance1->hasGet = prop->Get ? 1 : 0, __ecereInstance1;
3439 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->properties, symbol->_import);
3442 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)
3447 struct Context * context = SetupTemplatesContext(prop->_class);
3449 symbol->type = ProcessTypeString(prop->dataTypeString, 0);
3450 FinishTemplatesContext(context);
3454 if(!symbol->__anon2.__anon2.externalGet || symbol->__anon2.__anon2.externalGet->type == 0)
3456 struct Declaration * decl;
3457 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3458 struct Declarator * d;
3459 struct __ecereNameSpace__ecere__sys__OldList * params;
3460 struct Specifier * spec;
3461 struct External * external;
3462 struct Declarator * typeDecl;
3463 unsigned int simple = 0;
3465 specifiers = MkList();
3466 declarators = MkList();
3468 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3469 d = MkDeclaratorIdentifier(MkIdentifier(getName));
3471 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3473 struct Context * context = SetupTemplatesContext(prop->_class);
3475 typeDecl = SpecDeclFromString(prop->dataTypeString, specifiers, (((void *)0)));
3476 FinishTemplatesContext(context);
3478 for(spec = (*specifiers).first; spec; spec = spec->next)
3482 if((!typeDecl || typeDecl->type == 1))
3484 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3486 symbol->_class = classSym->__anon1.registered;
3487 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3489 DeclareStruct(spec->__anon1.__anon1.name, 0);
3496 d = PlugDeclarator(typeDecl, d);
3499 ListAdd(params, MkTypeName(specifiers, PlugDeclarator(typeDecl, MkDeclaratorIdentifier(MkIdentifier("value")))));
3500 specifiers = MkList();
3502 d = MkDeclaratorFunction(d, params);
3504 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3505 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3506 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3508 ListAdd(specifiers, MkSpecifier(VOID));
3509 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3510 decl = MkDeclaration(specifiers, declarators);
3511 external = MkExternalDeclaration(decl);
3512 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3513 external->symbol = symbol;
3514 symbol->__anon2.__anon2.externalGet = external;
3515 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3517 FreeDeclarator(typeDecl);
3521 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalGet, curExternal->prev);
3526 if(!symbol->__anon2.__anon2.externalSet || symbol->__anon2.__anon2.externalSet->type == 0)
3528 struct Declaration * decl;
3529 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
3530 struct Declarator * d;
3531 struct __ecereNameSpace__ecere__sys__OldList * params;
3532 struct Specifier * spec;
3533 struct External * external;
3534 struct Declarator * typeDecl;
3536 declarators = MkList();
3538 if(!prop->conversion || prop->_class->type == 1)
3540 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName(prop->_class->fullName)), MkDeclaratorIdentifier(MkIdentifier("this"))));
3542 specifiers = MkList();
3544 struct Context * context = SetupTemplatesContext(prop->_class);
3546 typeDecl = d = SpecDeclFromString(prop->dataTypeString, specifiers, MkDeclaratorIdentifier(MkIdentifier("value")));
3547 FinishTemplatesContext(context);
3549 if(!strcmp(prop->_class->base->fullName, "eda::Row") || !strcmp(prop->_class->base->fullName, "eda::Id"))
3550 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(CONST));
3551 ListAdd(params, MkTypeName(specifiers, d));
3552 d = MkDeclaratorIdentifier(MkIdentifier(setName));
3554 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
3555 d = MkDeclaratorFunction(d, params);
3556 for(spec = (*specifiers).first; spec; spec = spec->next)
3560 if((!typeDecl || typeDecl->type == 1))
3562 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
3564 symbol->_class = classSym->__anon1.registered;
3565 if(classSym->__anon1.registered && classSym->__anon1.registered->type == 1)
3566 DeclareStruct(spec->__anon1.__anon1.name, 0);
3570 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
3571 specifiers = MkList();
3573 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3574 else if(prop->_class->symbol && ((struct Symbol *)prop->_class->symbol)->isStatic)
3575 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3576 if(!prop->conversion || prop->_class->type == 1)
3577 ListAdd(specifiers, MkSpecifier(VOID));
3579 ListAdd(specifiers, MkSpecifierName(prop->_class->fullName));
3580 decl = MkDeclaration(specifiers, declarators);
3581 external = MkExternalDeclaration(decl);
3582 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3583 external->symbol = symbol;
3584 symbol->__anon2.__anon2.externalSet = external;
3585 ReplaceThisClassSpecifiers(specifiers, prop->_class);
3589 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalSet, curExternal->prev);
3592 if(!symbol->__anon2.__anon2.externalPtr)
3594 struct Declaration * decl;
3595 struct External * external;
3596 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
3597 char propName[1024];
3600 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(EXTERN));
3603 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
3604 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
3606 ListAdd(specifiers, MkSpecifierName("Property"));
3607 strcpy(propName, "__ecereProp_");
3608 FullClassNameCat(propName, prop->_class->fullName, 0);
3609 strcat(propName, "_");
3610 FullClassNameCat(propName, prop->name, 1);
3612 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
3614 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
3617 strcpy(propName, "__ecerePropM_");
3618 FullClassNameCat(propName, prop->_class->fullName, 0);
3619 strcat(propName, "_");
3620 FullClassNameCat(propName, prop->name, 1);
3621 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(propName)), (((void *)0))));
3623 decl = MkDeclaration(specifiers, list);
3625 external = MkExternalDeclaration(decl);
3626 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
3627 external->symbol = symbol;
3628 symbol->__anon2.__anon2.externalPtr = external;
3632 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon2.externalPtr, curExternal->prev);
3634 symbol->id = curExternal->symbol->idCode;
3638 struct Type * Dereference(struct Type * source)
3640 struct Type * type = (((void *)0));
3644 if(source->kind == 13 || source->kind == 12)
3646 type = source->__anon1.type;
3647 source->__anon1.type->refCount++;
3649 else if(source->kind == 8 && !strcmp(source->__anon1._class->string, "String"))
3651 type = __extension__ ({
3652 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
3654 __ecereInstance1->kind = 1, __ecereInstance1->refCount = 1, __ecereInstance1;
3657 else if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 5)
3663 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot dereference type\n", (((void *)0))));
3668 static struct Type * Reference(struct Type * source)
3670 struct Type * type = (((void *)0));
3674 type = __extension__ ({
3675 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
3677 __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = source, __ecereInstance1->refCount = 1, __ecereInstance1;
3684 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);
3686 extern void * memcpy(void * , const void * , size_t size);
3688 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method);
3690 extern void FreeExpression(struct Expression * exp);
3692 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
3694 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);
3696 static void ProcessInitializer(struct Initializer * init, struct Type * type);
3698 extern struct Type * MkClassType(const char * name);
3700 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);
3702 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)
3704 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
3705 unsigned int found = 0;
3706 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
3707 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
3708 unsigned int freeType = 0;
3710 yylloc = member->loc;
3715 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, curClass, curMember, subMemberStack, subMemberStackPos);
3719 dataMember = *curMember;
3725 struct __ecereNameSpace__ecere__com__DataMember * thisMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
3726 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
3727 int _subMemberStackPos = 0;
3730 thisMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, ident->string, privateModule, _subMemberStack, &_subMemberStackPos);
3733 dataMember = thisMember;
3734 if(curMember && thisMember->memberAccess == 1)
3736 *curMember = thisMember;
3737 *curClass = thisMember->_class;
3738 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
3739 *subMemberStackPos = _subMemberStackPos;
3745 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, ident->string, privateModule);
3746 if(method && method->type == 1)
3749 method = (((void *)0));
3754 struct Type * type = (((void *)0));
3758 if(!dataMember->dataType && dataMember->dataTypeString)
3760 struct Context * context = SetupTemplatesContext(_class);
3762 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
3763 FinishTemplatesContext(context);
3765 type = dataMember->dataType;
3769 if(!method->dataType)
3770 ProcessMethodType(method);
3771 type = method->dataType;
3773 if(ident && ident->next)
3775 for(ident = ident->next; ident && type; ident = ident->next)
3779 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)__ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
3781 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(type->__anon1._class->__anon1.registered, ident->string, privateModule, (((void *)0)), (((void *)0)));
3783 type = dataMember->dataType;
3785 else if(type->kind == 9 || type->kind == 10)
3787 struct Type * memberType;
3789 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
3791 if(!strcmp(memberType->name, ident->string))
3800 if(type && type->kind == 20 && type->__anon1.templateParameter->type == 0 && _class->templateArgs)
3803 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
3804 struct __ecereNameSpace__ecere__com__Class * sClass;
3806 for(sClass = _class; sClass; sClass = sClass->base)
3809 if(sClass->templateClass)
3810 sClass = sClass->templateClass;
3811 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
3813 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
3815 for(sClass = sClass->base; sClass; sClass = sClass->base)
3817 if(sClass->templateClass)
3818 sClass = sClass->templateClass;
3819 id += sClass->templateParams.count;
3830 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
3832 if(arg.__anon1.__anon1.dataTypeString)
3834 unsigned int constant = type->constant;
3836 type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
3837 if(type->kind == 8 && constant)
3839 else if(type->kind == 13)
3841 struct Type * t = type->__anon1.type;
3843 while(t->kind == 13)
3844 t = t->__anon1.type;
3846 t->constant = constant;
3849 if(type && _class->templateClass)
3850 type->passAsTemplate = 1;
3857 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered && strchr(type->__anon1._class->__anon1.registered->fullName, '<'))
3859 struct __ecereNameSpace__ecere__com__Class * expClass = type->__anon1._class->__anon1.registered;
3860 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
3863 char templateString[1024];
3864 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
3866 sprintf(templateString, "%s<", expClass->templateClass->fullName);
3867 for(cClass = expClass; cClass; cClass = cClass->base)
3871 if(cClass->templateClass)
3872 cClass = cClass->templateClass;
3873 for(param = cClass->templateParams.first; param; param = param->next)
3876 struct __ecereNameSpace__ecere__com__Class * sClass;
3877 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
3879 for(sClass = cClass->base; sClass; sClass = sClass->base)
3881 if(sClass->templateClass)
3882 sClass = sClass->templateClass;
3883 id += sClass->templateParams.count;
3885 arg = expClass->templateArgs[id];
3886 for(sClass = _class; sClass; sClass = sClass->base)
3888 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
3890 struct __ecereNameSpace__ecere__com__Class * nextClass;
3892 if(sClass->templateClass)
3893 sClass = sClass->templateClass;
3894 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
3896 if(nextClass->templateClass)
3897 nextClass = nextClass->templateClass;
3898 p += nextClass->templateParams.count;
3900 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
3902 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
3904 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3906 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
3907 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
3921 char expString[1024];
3922 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
3923 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
3924 struct Expression * exp;
3925 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
3927 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
3928 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3929 ProcessExpressionType(exp);
3930 ComputeExpression(exp);
3931 expString[0] = '\0';
3932 PrintExpression(exp, expString);
3933 strcat(argument, expString);
3934 FreeExpression(exp);
3939 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
3944 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
3945 strcat(argument, arg.__anon1.__anon1.dataTypeString);
3952 strcat(templateString, ", ");
3953 if(lastParam != p - 1)
3955 strcat(templateString, param->name);
3956 strcat(templateString, " = ");
3958 strcat(templateString, argument);
3967 int len = strlen(templateString);
3969 if(templateString[len - 1] == '<')
3973 if(templateString[len - 1] == '>')
3974 templateString[len++] = ' ';
3975 templateString[len++] = '>';
3977 templateString[len++] = '\0';
3980 struct Context * context = SetupTemplatesContext(_class);
3984 type = ProcessTypeString(templateString, 0);
3986 FinishTemplatesContext(context);
3989 if(method && member->initializer && member->initializer->type == 0 && member->initializer->__anon1.exp)
3991 ProcessExpressionType(member->initializer->__anon1.exp);
3992 if(!member->initializer->__anon1.exp->expType)
3996 char expString[10240];
3998 expString[0] = '\0';
3999 PrintExpression(member->initializer->__anon1.exp, expString);
4000 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
4001 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved symbol used as an instance method %s\n", (((void *)0))), expString);
4004 else if(!MatchTypes(member->initializer->__anon1.exp->expType, type, (((void *)0)), (((void *)0)), _class, 1, 1, 0, 0, 1))
4006 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible instance method %s\n", (((void *)0))), ident->string);
4009 else if(member->initializer)
4011 ProcessInitializer(member->initializer, type);
4018 if(_class && _class->type == 3)
4020 if(member->initializer)
4022 struct Type * type = MkClassType(_class->fullName);
4024 ProcessInitializer(member->initializer, type);
4030 if(member->initializer)
4032 ProcessInitializer(member->initializer, (((void *)0)));
4038 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
4042 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), ident->string, _class->fullName);
4044 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, ident->string, "int", 0, 0, 1);
4048 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many initializers for instantiation of class %s\n", (((void *)0))), _class->fullName);
4053 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);
4055 extern void FreeSpecifier(struct Specifier * spec);
4057 static void ProcessFunction(struct FunctionDefinition * function);
4059 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
4061 extern struct Specifier * CopySpecifier(struct Specifier * spec);
4063 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
4065 extern void FreeClassFunction(struct ClassFunction * func);
4067 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
4069 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
4071 void ProcessInstantiationType(struct Instantiation * inst)
4076 struct MembersInit * members;
4077 struct Symbol * classSym;
4078 struct __ecereNameSpace__ecere__com__Class * _class;
4080 classSym = inst->_class->__anon1.__anon1.symbol;
4081 _class = classSym ? classSym->__anon1.registered : (((void *)0));
4082 if(!_class || _class->type != 5)
4083 DeclareStruct(inst->_class->__anon1.__anon1.name, 0);
4084 afterExternal = afterExternal ? afterExternal : curExternal;
4086 ProcessExpressionType(inst->exp);
4087 inst->isConstant = 1;
4090 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
4091 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
4092 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
4093 int subMemberStackPos = 0;
4095 for(members = (*inst->members).first; members; members = members->next)
4097 switch(members->type)
4102 static unsigned int instMethodID = 0;
4103 struct External * external = curExternal;
4104 struct Context * context = curContext;
4105 struct Declarator * declarator = members->__anon1.function->declarator;
4106 struct Identifier * nameID = GetDeclId(declarator);
4107 char * unmangled = nameID ? nameID->string : (((void *)0));
4108 struct Expression * exp;
4109 struct External * createdExternal = (((void *)0));
4115 strcpy(name, "__ecereInstMeth_");
4116 FullClassNameCat(name, _class ? _class->fullName : "_UNKNOWNCLASS", 0);
4118 strcat(name, nameID->string);
4120 sprintf(number, "_%08d", instMethodID++);
4121 strcat(name, number);
4122 nameID->string = __ecereNameSpace__ecere__sys__CopyString(name);
4126 struct Symbol * symbol = declarator->symbol;
4127 struct __ecereNameSpace__ecere__com__Method * method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, unmangled, privateModule);
4129 if(method && method->type == 1)
4131 symbol->__anon1.method = method;
4132 ProcessMethodType(method);
4133 if(!symbol->type->__anon1.__anon2.thisClass)
4135 if(method->dataType->__anon1.__anon2.thisClass && currentClass && __ecereNameSpace__ecere__com__eClass_IsDerived(currentClass, method->dataType->__anon1.__anon2.thisClass->__anon1.registered))
4137 if(!currentClass->symbol)
4138 currentClass->symbol = FindClass(currentClass->fullName);
4139 symbol->type->__anon1.__anon2.thisClass = currentClass->symbol;
4144 _class->symbol = FindClass(_class->fullName);
4145 symbol->type->__anon1.__anon2.thisClass = _class->symbol;
4148 DeclareType(symbol->type, 1, 1);
4152 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find virtual method %s in class %s\n", (((void *)0))), unmangled, classSym->string);
4155 createdExternal = ProcessClassFunction(classSym ? classSym->__anon1.registered : (((void *)0)), members->__anon1.function, ast, afterExternal, 1);
4158 FreeSpecifier(nameID->_class);
4159 nameID->_class = (((void *)0));
4163 struct External * oldExternal = curExternal;
4165 declarator->symbol->id = declarator->symbol->idCode = curExternal->symbol->idCode;
4167 struct External * externalDecl;
4169 externalDecl = MkExternalDeclaration((((void *)0)));
4170 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), oldExternal->prev, externalDecl);
4171 if(createdExternal->__anon1.function)
4173 ProcessFunction(createdExternal->__anon1.function);
4175 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(CopyDeclarator(declarator), (((void *)0)))));
4177 externalDecl->__anon1.declaration = decl;
4178 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
4179 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4180 declarator->symbol->__anon2.__anon1.pointerExternal = externalDecl;
4187 curExternal = declarator->symbol->__anon2.__anon1.pointerExternal;
4188 ProcessFunction((struct FunctionDefinition *)members->__anon1.function);
4190 curExternal = external;
4191 curContext = context;
4194 FreeClassFunction(members->__anon1.function);
4195 exp = QMkExpId(name);
4197 members->__anon1.dataMembers = MkListOne(MkMemberInit(MkListOne(MkIdentifier(unmangled)), MkInitializerAssignment(exp)));
4198 (__ecereNameSpace__ecere__com__eSystem_Delete(unmangled), unmangled = 0);
4204 if(members->__anon1.dataMembers && classSym)
4206 struct MemberInit * member;
4207 struct Location oldyyloc = yylloc;
4209 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
4211 ProcessMemberInitData(member, classSym->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
4212 if(member->initializer && !member->initializer->isConstant)
4213 inst->isConstant = 0;
4225 static void DeclareType(struct Type * type, unsigned int declarePointers, unsigned int declareParams)
4229 if(type->kind == 11)
4231 struct Type * param;
4235 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
4236 DeclareType(param, declarePointers, 1);
4238 DeclareType(type->__anon1.__anon2.returnType, declarePointers, 1);
4240 else if(type->kind == 13 && declarePointers)
4241 DeclareType(type->__anon1.type, declarePointers, 0);
4242 else if(type->kind == 8)
4244 if(type->__anon1._class->__anon1.registered && (type->__anon1._class->__anon1.registered->type == 1 || type->__anon1._class->__anon1.registered->type == 5) && !type->__anon1._class->declaring)
4245 DeclareStruct(type->__anon1._class->__anon1.registered->fullName, type->__anon1._class->__anon1.registered->type == 5);
4247 else if(type->kind == 9 || type->kind == 10)
4249 struct Type * member;
4251 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
4252 DeclareType(member, 0, 0);
4254 else if(type->kind == 12)
4255 DeclareType(type->__anon1.__anon4.arrayType, declarePointers, 0);
4259 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
4261 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param)
4263 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = (((void *)0));
4265 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
4266 struct __ecereNameSpace__ecere__com__Class * sClass;
4268 for(sClass = _class; sClass; sClass = sClass->base)
4271 if(sClass->templateClass)
4272 sClass = sClass->templateClass;
4273 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
4275 if(curParam->type == 0 && !strcmp(param->identifier->string, curParam->name))
4277 for(sClass = sClass->base; sClass; sClass = sClass->base)
4279 if(sClass->templateClass)
4280 sClass = sClass->templateClass;
4281 id += sClass->templateParams.count;
4292 arg = &_class->templateArgs[id];
4293 if(arg && param->type == 0)
4294 (*arg).__anon1.__anon1.dataTypeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, (*arg).__anon1.__anon1.dataTypeString);
4299 extern struct Context * PushContext(void);
4301 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplatedType;
4303 struct TemplatedType
4306 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4307 struct __ecereNameSpace__ecere__sys__BTNode * left;
4308 struct __ecereNameSpace__ecere__sys__BTNode * right;
4310 struct TemplateParameter * param;
4311 } __attribute__ ((gcc_struct));
4313 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
4315 struct Context * SetupTemplatesContext(struct __ecereNameSpace__ecere__com__Class * _class)
4317 struct Context * context = PushContext();
4319 context->templateTypesOnly = 1;
4320 if(_class->symbol && ((struct Symbol *)_class->symbol)->templateParams)
4322 struct TemplateParameter * param = (*((struct Symbol *)_class->symbol)->templateParams).first;
4324 for(; param; param = param->next)
4326 if(param->type == 0 && param->identifier)
4328 struct TemplatedType * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType), type->key = (uintptr_t)param->identifier->string, type->param = param, type);
4330 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4336 struct __ecereNameSpace__ecere__com__Class * sClass;
4338 for(sClass = _class; sClass; sClass = sClass->base)
4340 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * p;
4342 for(p = sClass->templateParams.first; p; p = p->next)
4346 struct TemplateParameter * param = p->param;
4347 struct TemplatedType * type;
4351 p->param = param = __extension__ ({
4352 struct TemplateParameter * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplateParameter);
4354 __ecereInstance1->identifier = MkIdentifier(p->name), __ecereInstance1->type = p->type, __ecereInstance1->dataTypeString = p->__anon1.dataTypeString, __ecereInstance1;
4357 type = __extension__ ({
4358 struct TemplatedType * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TemplatedType);
4360 __ecereInstance1->key = (uintptr_t)p->name, __ecereInstance1->param = param, __ecereInstance1;
4362 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&curContext->templateTypes, (struct __ecereNameSpace__ecere__sys__BTNode *)type);
4370 extern void PopContext(struct Context * ctx);
4372 extern void FreeContext(struct Context * context);
4374 void FinishTemplatesContext(struct Context * context)
4376 PopContext(context);
4377 FreeContext(context);
4378 ((context ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)context) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(context)) : 0), context = 0);
4381 void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method)
4383 if(!method->dataType)
4385 struct Context * context = SetupTemplatesContext(method->_class);
4387 method->dataType = ProcessTypeString(method->dataTypeString, 0);
4388 FinishTemplatesContext(context);
4389 if(method->type != 1 && method->dataType)
4391 if(!method->dataType->__anon1.__anon2.thisClass && !method->dataType->__anon1.__anon2.staticMethod)
4393 if(!method->_class->symbol)
4394 method->_class->symbol = FindClass(method->_class->fullName);
4395 method->dataType->__anon1.__anon2.thisClass = method->_class->symbol;
4401 void ProcessPropertyType(struct __ecereNameSpace__ecere__com__Property * prop)
4405 struct Context * context = SetupTemplatesContext(prop->_class);
4407 prop->dataType = ProcessTypeString(prop->dataTypeString, 0);
4408 FinishTemplatesContext(context);
4412 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
4414 extern void FreeTypeName(struct TypeName * typeName);
4416 static void ProcessDeclarator(struct Declarator * decl);
4418 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
4420 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodImport;
4424 struct MethodImport * prev;
4425 struct MethodImport * next;
4427 unsigned int isVirtual;
4428 } __attribute__ ((gcc_struct));
4430 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
4432 void DeclareMethod(struct __ecereNameSpace__ecere__com__Method * method, const char * name)
4434 struct Symbol * symbol = method->symbol;
4436 if(!symbol || (!symbol->__anon2.__anon1.pointerExternal && method->type == 1) || symbol->id > (curExternal ? curExternal->symbol->idCode : -1))
4438 unsigned int dllImport = 0;
4440 if(!method->dataType)
4441 method->dataType = ProcessTypeString(method->dataTypeString, 0);
4442 if(!symbol || symbol->_import || method->type == 1)
4444 if(!symbol || method->type == 1)
4446 struct Symbol * classSym;
4448 if(!method->_class->symbol)
4449 method->_class->symbol = FindClass(method->_class->fullName);
4450 classSym = method->_class->symbol;
4451 if(!classSym->_import)
4453 struct ModuleImport * module;
4455 if(method->_class->module && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)method->_class->module + structSize_Instance)))->name)
4456 module = FindModule(method->_class->module);
4458 module = mainModule;
4459 classSym->_import = __extension__ ({
4460 struct ClassImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassImport);
4462 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->_class->fullName), __ecereInstance1->isRemote = method->_class->isRemote, __ecereInstance1;
4464 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->classes, classSym->_import);
4468 symbol = method->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4470 if(!symbol->_import)
4472 symbol->_import = (struct ClassImport *)__extension__ ({
4473 struct MethodImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodImport);
4475 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
4477 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classSym->_import->methods, symbol->_import);
4481 symbol->type = method->dataType;
4483 symbol->type->refCount++;
4486 if(!method->dataType->dllExport)
4488 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)
4492 if(method->type != 1 && method->dataType)
4493 DeclareType(method->dataType, 1, 1);
4494 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4496 struct Declaration * decl;
4497 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4498 struct Declarator * d;
4499 struct Declarator * funcDecl;
4500 struct External * external;
4502 specifiers = MkList();
4503 declarators = MkList();
4505 ListAdd(specifiers, MkSpecifier(EXTERN));
4506 else if(method->_class->symbol && ((struct Symbol *)method->_class->symbol)->isStatic)
4507 ListAdd(specifiers, MkSpecifier(STATIC));
4508 if(method->type == 1)
4510 ListAdd(specifiers, MkSpecifier(INT));
4511 d = MkDeclaratorIdentifier(MkIdentifier(name));
4515 d = MkDeclaratorIdentifier(MkIdentifier(name));
4517 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4519 struct Context * context = SetupTemplatesContext(method->_class);
4521 d = SpecDeclFromString(method->dataTypeString, specifiers, d);
4522 FinishTemplatesContext(context);
4524 funcDecl = GetFuncDecl(d);
4527 struct Specifier * spec, * next;
4529 for(spec = (*specifiers).first; spec; spec = next)
4534 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4535 FreeSpecifier(spec);
4539 if(method->dataType && !method->dataType->__anon1.__anon2.staticMethod)
4541 if(funcDecl && funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count)
4543 struct __ecereNameSpace__ecere__com__Class * _class = method->dataType->__anon1.__anon2.thisClass ? method->dataType->__anon1.__anon2.thisClass->__anon1.registered : method->_class;
4544 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")));
4545 struct TypeName * firstParam = ((struct TypeName *)(*funcDecl->__anon1.function.parameters).first);
4546 struct Specifier * firstSpec = firstParam->qualifiers ? (*firstParam->qualifiers).first : (((void *)0));
4548 if(firstSpec && firstSpec->type == 0 && firstSpec->__anon1.specifier == VOID && !firstParam->declarator)
4550 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
4552 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
4553 FreeTypeName(param);
4555 if(!funcDecl->__anon1.function.parameters)
4556 funcDecl->__anon1.function.parameters = MkList();
4557 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
4561 ProcessDeclarator(d);
4562 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4563 decl = MkDeclaration(specifiers, declarators);
4564 ReplaceThisClassSpecifiers(specifiers, method->_class);
4565 if(symbol->__anon2.__anon1.pointerExternal)
4567 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4570 *functionSymbol = *symbol;
4571 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4572 if(functionSymbol->type)
4573 functionSymbol->type->refCount++;
4575 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4576 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4578 external = MkExternalDeclaration(decl);
4580 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
4581 external->symbol = symbol;
4582 symbol->__anon2.__anon1.pointerExternal = external;
4586 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4588 symbol->id = curExternal ? curExternal->symbol->idCode : (((int)0x7fffffff));
4592 char * ReplaceThisClass(struct __ecereNameSpace__ecere__com__Class * _class)
4594 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4596 unsigned int first = 1;
4598 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4600 char className[1024];
4602 strcpy(className, _class->fullName);
4603 for(param = _class->templateParams.first; param; param = param->next)
4607 strcat(className, "<");
4609 strcat(className, ", ");
4610 if(lastParam + 1 != p)
4612 strcat(className, param->name);
4613 strcat(className, " = ");
4615 strcat(className, param->name);
4623 int len = strlen(className);
4625 if(className[len - 1] == '>')
4626 className[len++] = ' ';
4627 className[len++] = '>';
4628 className[len++] = '\0';
4630 return __ecereNameSpace__ecere__sys__CopyString(className);
4633 return __ecereNameSpace__ecere__sys__CopyString(_class->fullName);
4636 struct Type * ReplaceThisClassType(struct __ecereNameSpace__ecere__com__Class * _class)
4640 if(thisClassParams && _class->templateParams.count && !_class->templateClass)
4642 unsigned int first = 1;
4644 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
4646 char className[1024];
4648 strcpy(className, _class->fullName);
4649 for(param = _class->templateParams.first; param; param = param->next)
4653 strcat(className, "<");
4655 strcat(className, ", ");
4656 if(lastParam + 1 != p)
4658 strcat(className, param->name);
4659 strcat(className, " = ");
4661 strcat(className, param->name);
4669 int len = strlen(className);
4671 if(className[len - 1] == '>')
4672 className[len++] = ' ';
4673 className[len++] = '>';
4674 className[len++] = '\0';
4676 type = MkClassType(className);
4680 type = MkClassType(_class->fullName);
4685 void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class)
4687 if(specs != (((void *)0)) && _class)
4689 struct Specifier * spec;
4691 for(spec = specs->first; spec; spec = spec->next)
4693 if(spec->type == 0 && spec->__anon1.specifier == THISCLASS)
4696 spec->__anon1.__anon1.name = ReplaceThisClass(_class);
4697 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
4703 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
4705 struct __ecereNameSpace__ecere__com__GlobalFunction
4707 struct __ecereNameSpace__ecere__com__GlobalFunction * prev;
4708 struct __ecereNameSpace__ecere__com__GlobalFunction * next;
4711 struct __ecereNameSpace__ecere__com__Instance * module;
4712 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
4713 const char * dataTypeString;
4714 struct Type * dataType;
4716 } __attribute__ ((gcc_struct));
4718 extern struct Context * globalContext;
4720 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionImport;
4722 struct FunctionImport
4724 struct FunctionImport * prev;
4725 struct FunctionImport * next;
4727 } __attribute__ ((gcc_struct));
4729 unsigned int DeclareFunction(struct __ecereNameSpace__ecere__com__GlobalFunction * function, char * name)
4731 struct Symbol * symbol = function->symbol;
4733 if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
4735 unsigned int imported = 0;
4736 unsigned int dllImport = 0;
4738 if(!function->dataType)
4740 function->dataType = ProcessTypeString(function->dataTypeString, 0);
4741 if(!function->dataType->__anon1.__anon2.thisClass)
4742 function->dataType->__anon1.__anon2.staticMethod = 1;
4748 struct ModuleImport * module = FindModule(function->module);
4750 symbol = function->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4753 if(!function->dataType->dllExport)
4755 symbol->_import = (struct ClassImport *)__extension__ ({
4756 struct FunctionImport * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionImport);
4758 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->name), __ecereInstance1;
4760 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&module->functions, symbol->_import);
4764 symbol->type = ProcessTypeString(function->dataTypeString, 0);
4765 if(!symbol->type->__anon1.__anon2.thisClass)
4766 symbol->type->__anon1.__anon2.staticMethod = 1;
4769 imported = symbol->_import ? 1 : 0;
4770 if(imported && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1)
4773 DeclareType(function->dataType, 1, 1);
4776 if(!symbol->__anon2.__anon1.pointerExternal || symbol->__anon2.__anon1.pointerExternal->type == 0)
4778 struct Declaration * decl;
4779 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4780 struct Declarator * d;
4781 struct Declarator * funcDecl;
4782 struct External * external;
4784 specifiers = MkList();
4785 declarators = MkList();
4786 ListAdd(specifiers, MkSpecifier(EXTERN));
4787 d = MkDeclaratorIdentifier(MkIdentifier(imported ? name : function->name));
4789 d = MkDeclaratorBrackets(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d));
4790 d = SpecDeclFromString(function->dataTypeString, specifiers, d);
4791 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType == 1)
4793 struct Specifier * spec;
4795 for(spec = (*specifiers).first; spec; spec = spec->next)
4796 if(spec->type == 5 && spec->__anon1.__anon1.extDecl && spec->__anon1.__anon1.extDecl->type == 0 && !strcmp(spec->__anon1.__anon1.extDecl->__anon1.s, "dllexport"))
4798 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*specifiers), spec);
4799 FreeSpecifier(spec);
4803 funcDecl = GetFuncDecl(d);
4804 if(funcDecl && !funcDecl->__anon1.function.parameters)
4806 funcDecl->__anon1.function.parameters = MkList();
4807 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
4809 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4811 struct Context * oldCtx = curContext;
4813 curContext = globalContext;
4814 decl = MkDeclaration(specifiers, declarators);
4815 curContext = oldCtx;
4817 if(symbol->__anon2.__anon1.pointerExternal)
4819 struct Symbol * functionSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4822 *functionSymbol = *symbol;
4823 functionSymbol->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
4824 if(functionSymbol->type)
4825 functionSymbol->type->refCount++;
4827 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), functionSymbol);
4828 symbol->__anon2.__anon1.pointerExternal->symbol = functionSymbol;
4830 external = MkExternalDeclaration(decl);
4832 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
4833 external->symbol = symbol;
4834 symbol->__anon2.__anon1.pointerExternal = external;
4838 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4841 symbol->id = curExternal->symbol->idCode;
4844 return (symbol && symbol->_import && function->module != privateModule && ((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1) ? 1 : 0;
4847 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_GlobalData;
4852 struct __ecereNameSpace__ecere__sys__BTNode * parent;
4853 struct __ecereNameSpace__ecere__sys__BTNode * left;
4854 struct __ecereNameSpace__ecere__sys__BTNode * right;
4856 struct __ecereNameSpace__ecere__com__Instance * module;
4857 char * dataTypeString;
4858 struct Type * dataType;
4861 } __attribute__ ((gcc_struct));
4863 void DeclareGlobalData(struct GlobalData * data)
4865 struct Symbol * symbol = data->symbol;
4867 if(curExternal && (!symbol || symbol->id > curExternal->symbol->idCode))
4872 symbol = data->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
4875 data->dataType = ProcessTypeString(data->dataTypeString, 0);
4876 DeclareType(data->dataType, 1, 1);
4879 if(!symbol->__anon2.__anon1.pointerExternal)
4881 struct Declaration * decl;
4882 struct __ecereNameSpace__ecere__sys__OldList * specifiers, * declarators;
4883 struct Declarator * d;
4884 struct External * external;
4886 specifiers = MkList();
4887 declarators = MkList();
4888 ListAdd(specifiers, MkSpecifier(EXTERN));
4889 d = MkDeclaratorIdentifier(MkIdentifier(data->fullName));
4890 d = SpecDeclFromString(data->dataTypeString, specifiers, d);
4891 ListAdd(declarators, MkInitDeclarator(d, (((void *)0))));
4892 decl = MkDeclaration(specifiers, declarators);
4893 external = MkExternalDeclaration(decl);
4895 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, external);
4896 external->symbol = symbol;
4897 symbol->__anon2.__anon1.pointerExternal = external;
4901 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
4904 symbol->id = curExternal->symbol->idCode;
4911 struct Conversion * prev, * next;
4912 struct __ecereNameSpace__ecere__com__Property * convert;
4914 struct Type * resultType;
4915 } __attribute__ ((gcc_struct));
4917 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Conversion;
4919 extern void Compiler_Warning(const char * format, ...);
4921 static unsigned int CheckConstCompatibility(struct Type * source, struct Type * dest, unsigned int warn)
4923 unsigned int status = 1;
4925 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))
4927 struct __ecereNameSpace__ecere__com__Class * sourceClass = source->kind == 8 ? source->__anon1._class->__anon1.registered : (((void *)0));
4928 struct __ecereNameSpace__ecere__com__Class * destClass = dest->kind == 8 ? dest->__anon1._class->__anon1.registered : (((void *)0));
4930 if((!sourceClass || (sourceClass && sourceClass->type == 0 && !sourceClass->structSize)) && (!destClass || (destClass && destClass->type == 0 && !destClass->structSize)))
4932 struct Type * sourceType = source, * destType = dest;
4934 while((sourceType->kind == 13 || sourceType->kind == 12) && sourceType->__anon1.type)
4935 sourceType = sourceType->__anon1.type;
4936 while((destType->kind == 13 || destType->kind == 12) && destType->__anon1.type)
4937 destType = destType->__anon1.type;
4938 if(!destType->constant && sourceType->constant)
4942 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "discarding const qualifier\n", (((void *)0))));
4949 extern void CopyTypeInto(struct Type * type, struct Type * src);
4951 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
4953 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)
4958 CheckConstCompatibility(source, dest, 1);
4959 if(source->kind == 20 && dest->kind != 20)
4961 struct Type * type = ProcessTemplateParameterType(source->__anon1.templateParameter);
4966 if(dest->kind == 20 && source->kind != 20)
4968 struct Type * type = ProcessTemplateParameterType(dest->__anon1.templateParameter);
4973 if(dest->classObjectType == 2 && dest->kind != 11)
4975 if(source->classObjectType != 3)
4979 if((dest->__anon1._class && strcmp(dest->__anon1._class->string, "class")) || (source->__anon1._class && strcmp(source->__anon1._class->string, "class")))
4987 if(source->kind != 11 && source->classObjectType == 3)
4989 if(dest->kind != 11 && dest->classObjectType == 3 && source->classObjectType != 2)
4992 if((dest->kind == 9 && source->kind == 9) || (dest->kind == 10 && source->kind == 10))
4994 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))
4997 if(dest->kind == 14 && source->kind != 0)
4999 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))
5001 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))
5003 if(((source->kind == 8 && dest->kind == 8) || (source->kind == 19 && dest->kind == 19)) && source->__anon1._class)
5005 if(source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
5007 if(conversions != (((void *)0)))
5009 if(source->__anon1._class->__anon1.registered == dest->__anon1._class->__anon1.registered)
5014 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
5016 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
5018 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base->type != 1000; destBase = destBase->base)
5020 if(sourceBase == destBase)
5024 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))
5028 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))
5030 if(__ecereNameSpace__ecere__com__eClass_IsDerived(dest->__anon1._class->__anon1.registered, source->__anon1._class->__anon1.registered))
5037 if(source->kind == 19 && dest->kind == 8 && dest->__anon1._class && !strcmp(dest->__anon1._class->string, "ecere::com::Class"))
5041 if(source->kind == 8)
5043 struct __ecereNameSpace__ecere__com__Class * _class;
5045 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5047 struct __ecereNameSpace__ecere__com__Property * convert;
5049 for(convert = _class->conversions.first; convert; convert = convert->next)
5051 if(convert->memberAccess == 1 || _class->module == privateModule)
5053 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5055 if(!convert->dataType)
5056 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
5057 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))
5059 if(!conversions && !convert->Get)
5061 else if(conversions != (((void *)0)))
5063 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))
5067 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
5069 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5080 struct __ecereNameSpace__ecere__com__Class * _class;
5082 for(_class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5084 struct __ecereNameSpace__ecere__com__Property * convert;
5086 for(convert = _class->conversions.first; convert; convert = convert->next)
5088 if(convert->memberAccess == 1 || _class->module == privateModule)
5090 struct Type * constType = (((void *)0));
5091 unsigned int success = 0;
5093 if(!convert->dataType)
5094 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
5095 if(warnConst && convert->dataType->kind == 13 && convert->dataType->__anon1.type && dest->constant)
5097 struct Type * ptrType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5099 constType = __extension__ ({
5100 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5102 __ecereInstance1->kind = 13, __ecereInstance1->refCount = 1, __ecereInstance1->__anon1.type = ptrType, __ecereInstance1;
5104 CopyTypeInto(ptrType, convert->dataType->__anon1.type);
5105 ptrType->constant = 1;
5107 if((constType || convert->dataType != dest) && MatchTypes(source, constType ? constType : convert->dataType, conversions, (((void *)0)), (((void *)0)), 1, 0, 0, 1, warnConst))
5109 if(!conversions && !convert->Set)
5111 else if(conversions != (((void *)0)))
5113 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))
5117 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv);
5119 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, conv);
5125 FreeType(constType);
5131 if(enumBaseType && dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5133 if(!dest->__anon1._class->__anon1.registered->dataType)
5134 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
5135 if(dest->__anon1._class->__anon1.registered->dataType->kind == 8 || source->truth || dest->truth)
5137 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))
5144 if(source->kind == 8)
5146 struct __ecereNameSpace__ecere__com__Class * _class;
5148 for(_class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0)); _class; _class = _class->base)
5150 struct __ecereNameSpace__ecere__com__Property * convert;
5152 for(convert = _class->conversions.first; convert; convert = convert->next)
5154 if(convert->memberAccess == 1 || _class->module == privateModule)
5156 struct Conversion * after = (conversions != (((void *)0))) ? conversions->last : (((void *)0));
5158 if(!convert->dataType)
5159 convert->dataType = ProcessTypeString(convert->dataTypeString, 0);
5160 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))
5162 if(!conversions && !convert->Get)
5164 else if(conversions != (((void *)0)))
5166 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))
5170 struct Conversion * conv = (conv = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Conversion), conv->convert = convert, conv->isGet = 1, conv);
5172 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(conversions, after, conv);
5180 if(enumBaseType && source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 4)
5182 if(!source->__anon1._class->__anon1.registered->dataType)
5183 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
5184 if(!isConversionExploration || source->__anon1._class->__anon1.registered->dataType->kind == 8 || !strcmp(source->__anon1._class->__anon1.registered->name, "String"))
5186 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))
5188 else if(MatchTypes(dest, source->__anon1._class->__anon1.registered->dataType, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, warnConst))
5194 if(source->kind == 8 || source->kind == 19)
5196 else if(dest->kind == source->kind && (dest->kind != 9 && dest->kind != 10 && dest->kind != 11 && dest->kind != 12 && dest->kind != 13 && dest->kind != 16))
5198 else if(dest->kind == 7 && source->kind == 6)
5200 else if(dest->kind == 2 && (source->kind == 1 || source->kind == 24))
5202 else if(dest->kind == 3 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 23))
5204 else if(dest->kind == 4 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 22 || source->kind == 23))
5206 else if(dest->kind == 22 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 23 || source->kind == 4))
5208 else if(dest->kind == 23 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 4 || source->kind == 22))
5210 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))
5212 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))
5214 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)))
5216 struct Type * paramSource, * paramDest;
5218 if(dest->kind == 16)
5219 owningClassDest = dest->__anon1.__anon3.methodClass ? dest->__anon1.__anon3.methodClass : dest->__anon1.__anon3.method->_class;
5220 if(source->kind == 16)
5221 owningClassSource = source->__anon1.__anon3.methodClass ? source->__anon1.__anon3.methodClass : source->__anon1.__anon3.method->_class;
5222 if(dest->kind == 13 && dest->__anon1.type->kind == 11)
5223 dest = dest->__anon1.type;
5224 if(source->kind == 13 && source->__anon1.type->kind == 11)
5225 source = source->__anon1.type;
5226 if(dest->kind == 16)
5227 dest = dest->__anon1.__anon3.method->dataType;
5228 if(source->kind == 16)
5229 source = source->__anon1.__anon3.method->dataType;
5230 paramSource = source->__anon1.__anon2.params.first;
5231 if(paramSource && paramSource->kind == 0)
5232 paramSource = (((void *)0));
5233 paramDest = dest->__anon1.__anon2.params.first;
5234 if(paramDest && paramDest->kind == 0)
5235 paramDest = (((void *)0));
5236 if((dest->__anon1.__anon2.staticMethod || (!dest->__anon1.__anon2.thisClass && !owningClassDest)) && !(source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5238 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))))
5240 if(paramDest && paramDest->kind == 8)
5241 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), paramDest->__anon1._class->string);
5243 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class should not take an object\n", (((void *)0))));
5246 paramDest = paramDest->next;
5248 else if(!dest->__anon1.__anon2.staticMethod && (dest->__anon1.__anon2.thisClass || owningClassDest))
5250 if((source->__anon1.__anon2.staticMethod || (!source->__anon1.__anon2.thisClass && !owningClassSource)))
5252 if(dest->__anon1.__anon2.thisClass)
5254 if(!paramSource || paramSource->kind != 8 || !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, dest->__anon1.__anon2.thisClass->__anon1.registered))
5256 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5262 if(!paramSource || paramSource->kind != 8 || (owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(paramSource->__anon1._class->__anon1.registered, owningClassDest)))
5265 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), owningClassDest->fullName);
5267 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "overriding class expected to be derived from method class\n", (((void *)0))));
5271 paramSource = paramSource->next;
5275 if(dest->__anon1.__anon2.thisClass)
5277 if(!__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass ? source->__anon1.__anon2.thisClass->__anon1.registered : owningClassSource, dest->__anon1.__anon2.thisClass->__anon1.registered))
5279 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "method class must be derived from %s\n", (((void *)0))), dest->__anon1.__anon2.thisClass->string);
5285 if(source->__anon1.__anon2.thisClass && source->__anon1.__anon2.thisClass->__anon1.registered && owningClassDest && !__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1.__anon2.thisClass->__anon1.registered, owningClassDest))
5287 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s expected to be derived from method class\n", (((void *)0))), source->__anon1.__anon2.thisClass->__anon1.registered->fullName);
5293 if(!MatchTypes(source->__anon1.__anon2.returnType, dest->__anon1.__anon2.returnType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5295 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible return type for function\n", (((void *)0))));
5299 CheckConstCompatibility(dest->__anon1.__anon2.returnType, source->__anon1.__anon2.returnType, 1);
5300 for(; paramDest; paramDest = paramDest->next)
5304 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "not enough parameters\n", (((void *)0))));
5308 struct Type * paramDestType = paramDest;
5309 struct Type * paramSourceType = paramSource;
5310 struct Type * type = paramDestType;
5312 if(paramDest->kind == 20 && paramDest->__anon1.templateParameter->type == 0 && owningClassSource && paramSource->kind != 20)
5315 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
5316 struct __ecereNameSpace__ecere__com__Class * sClass;
5318 for(sClass = owningClassSource; sClass; sClass = sClass->base)
5321 if(sClass->templateClass)
5322 sClass = sClass->templateClass;
5323 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
5325 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
5327 for(sClass = sClass->base; sClass; sClass = sClass->base)
5329 if(sClass->templateClass)
5330 sClass = sClass->templateClass;
5331 id += sClass->templateParams.count;
5342 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = owningClassSource->templateArgs[id];
5344 paramDestType = type = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
5347 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)))
5352 PrintType(paramDest, type, 0, 1);
5353 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible parameter %s (expected %s)\n", (((void *)0))), paramSource->name, type);
5354 if(paramDestType != paramDest)
5355 FreeType(paramDestType);
5358 if(paramDestType != paramDest)
5359 FreeType(paramDestType);
5361 paramSource = paramSource->next;
5365 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "too many parameters\n", (((void *)0))));
5370 else if((dest->kind == 11 || (dest->kind == 13 && dest->__anon1.type->kind == 11) || dest->kind == 16) && (source->kind == 13 && source->__anon1.type->kind == 0))
5374 else if((dest->kind == 13 || dest->kind == 12) && (source->kind == 12 || source->kind == 13))
5376 if(!(dest->__anon1.type && dest->__anon1.type->kind == 13 && source->__anon1.type->kind == 8 && source->__anon1.type->__anon1._class && source->__anon1.type->__anon1._class->__anon1.registered && (source->__anon1.type->__anon1._class->__anon1.registered->type != 0 && source->__anon1.type->__anon1._class->__anon1.registered->type != 5) && !source->__anon1.type->byReference))
5378 ComputeTypeSize(source->__anon1.type);
5379 ComputeTypeSize(dest->__anon1.type);
5380 if(source->__anon1.type->size == dest->__anon1.type->size && MatchTypes(source->__anon1.type, dest->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5388 static void FreeConvert(struct Conversion * convert)
5390 if(convert->resultType)
5391 FreeType(convert->resultType);
5394 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BTNamedLink;
5396 struct __ecereNameSpace__ecere__com__BTNamedLink
5399 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
5400 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
5401 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
5404 } __attribute__ ((gcc_struct));
5406 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__EnumClassData;
5408 struct __ecereNameSpace__ecere__com__EnumClassData
5410 struct __ecereNameSpace__ecere__sys__OldList values;
5412 } __attribute__ ((gcc_struct));
5414 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
5416 struct __ecereNameSpace__ecere__sys__NamedLink64
5418 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
5419 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
5422 } __attribute__ ((gcc_struct));
5424 extern void FreeExpContents(struct Expression * exp);
5426 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
5428 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
5430 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
5432 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
5434 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
5436 unsigned int MatchWithEnums_NameSpace(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5438 struct __ecereNameSpace__ecere__com__BTNamedLink * link;
5440 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)))
5442 struct __ecereNameSpace__ecere__com__Class * _class = link->data;
5444 if(_class->type == 4)
5446 struct __ecereNameSpace__ecere__sys__OldList converts =
5450 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5454 _class->symbol = FindClass(_class->fullName);
5455 type->__anon1._class = _class->symbol;
5456 if(MatchTypes(type, dest, &converts, (((void *)0)), (((void *)0)), dest->kind != 8 || !dest->__anon1._class || strcmp(dest->__anon1._class->string, "bool"), 0, 0, 0, 0))
5458 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
5459 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5463 struct __ecereNameSpace__ecere__com__Class * baseClass;
5465 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
5467 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
5469 for(value = e->values.first; value; value = value->next)
5471 if(!strcmp(value->name, string))
5476 FreeExpContents(sourceExp);
5477 FreeType(sourceExp->expType);
5478 sourceExp->isConstant = 1;
5479 sourceExp->expType = MkClassType(baseClass->fullName);
5483 sourceExp->type = 2;
5484 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "short") || !strcmp(baseClass->dataTypeString, "char"))
5485 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
5487 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64XLL" : "0x%llXLL"), value->data);
5488 sourceExp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
5490 while(converts.first)
5492 struct Conversion * convert = converts.first;
5494 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&converts, convert);
5495 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(conversions, convert);
5497 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5504 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
5505 ((type ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)type) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(type)) : 0), type = 0);
5508 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)))
5509 if(MatchWithEnums_NameSpace(nameSpace, sourceExp, dest, string, conversions))
5514 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SubModule;
5516 struct __ecereNameSpace__ecere__com__SubModule
5518 struct __ecereNameSpace__ecere__com__SubModule * prev;
5519 struct __ecereNameSpace__ecere__com__SubModule * next;
5520 struct __ecereNameSpace__ecere__com__Instance * module;
5522 } __attribute__ ((gcc_struct));
5524 unsigned int ModuleVisibility(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor)
5526 struct __ecereNameSpace__ecere__com__SubModule * subModule;
5528 if(searchFor == searchIn)
5530 for(subModule = ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->modules.first; subModule; subModule = subModule->next)
5532 if(subModule->importMode == 1 || searchIn == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)searchIn + structSize_Instance)))->application)
5534 if(ModuleVisibility(subModule->module, searchFor))
5541 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
5543 struct __ecereNameSpace__ecere__com__Application
5546 const char * * argv;
5548 unsigned int isGUIApp;
5549 struct __ecereNameSpace__ecere__sys__OldList allModules;
5550 char * parsedCommand;
5551 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
5552 } __attribute__ ((gcc_struct));
5554 unsigned int MatchWithEnums_Module(struct __ecereNameSpace__ecere__com__Instance * mainModule, struct Expression * sourceExp, struct Type * dest, char * string, struct __ecereNameSpace__ecere__sys__OldList * conversions)
5556 struct __ecereNameSpace__ecere__com__Instance * module;
5558 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))
5560 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))
5562 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))
5564 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)
5566 if(ModuleVisibility(mainModule, module) && MatchWithEnums_NameSpace(&((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->publicNameSpace, sourceExp, dest, string, conversions))
5572 extern struct Expression * CopyExpression(struct Expression * exp);
5574 extern unsigned long strtoul(const char * nptr, char * * endptr, int base);
5576 void ReadString(char * output, char * string);
5578 extern struct Specifier * MkEnum(struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * list);
5580 extern struct TypeName * QMkClass(const char * spec, struct Declarator * decl);
5582 extern struct Expression * MkExpBrackets(struct __ecereNameSpace__ecere__sys__OldList * expressions);
5584 unsigned int MatchTypeExpression(struct Expression * sourceExp, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, unsigned int skipUnitBla, unsigned int warnConst)
5586 struct Type * source;
5587 struct Type * realDest = dest;
5588 struct Type * backupSourceExpType = (((void *)0));
5589 struct Expression * computedExp = sourceExp;
5592 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)
5594 computedExp = CopyExpression(sourceExp);
5595 ComputeExpression(computedExp);
5597 source = sourceExp->expType;
5598 if(dest->kind == 13 && sourceExp->type == 2 && !strtoul(sourceExp->__anon1.__anon1.constant, (((void *)0)), 0))
5600 if(computedExp != sourceExp)
5602 FreeExpression(computedExp);
5603 computedExp = sourceExp;
5608 if(!skipUnitBla && source && dest && source->kind == 8 && dest->kind == 8)
5610 if(source->__anon1._class && source->__anon1._class->__anon1.registered && source->__anon1._class->__anon1.registered->type == 3)
5612 struct __ecereNameSpace__ecere__com__Class * sourceBase, * destBase;
5614 for(sourceBase = source->__anon1._class->__anon1.registered; sourceBase && sourceBase->base && sourceBase->base->type != 1000; sourceBase = sourceBase->base)
5616 for(destBase = dest->__anon1._class->__anon1.registered; destBase && destBase->base && destBase->base->type != 1000; destBase = destBase->base)
5618 if(sourceBase == destBase)
5620 if(computedExp != sourceExp)
5622 FreeExpression(computedExp);
5623 computedExp = sourceExp;
5632 struct __ecereNameSpace__ecere__sys__OldList * specs;
5633 unsigned int flag = 0;
5634 long long value = (((int)0x7fffffff));
5637 if(computedExp->type == 2)
5639 if(source->isSigned)
5640 value = strtoll(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5642 value = strtoull(computedExp->__anon1.__anon1.constant, (((void *)0)), 0);
5644 else if(computedExp->type == 4 && sourceExp->__anon1.op.op == '-' && !computedExp->__anon1.op.exp1 && computedExp->__anon1.op.exp2 && computedExp->__anon1.op.exp2->type == 2)
5646 if(source->isSigned)
5647 value = -strtoll(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5649 value = -strtoull(computedExp->__anon1.op.exp2->__anon1.__anon1.constant, (((void *)0)), 0);
5651 if(computedExp != sourceExp)
5653 FreeExpression(computedExp);
5654 computedExp = sourceExp;
5656 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"))
5659 source = __extension__ ({
5660 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5662 __ecereInstance1->kind = 3, __ecereInstance1->isSigned = 0, __ecereInstance1->refCount = 1, __ecereInstance1;
5667 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5669 if(_class && _class->type == 3)
5671 if(source->kind != 8)
5673 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5674 struct Type * tempDest, * tempSource;
5676 for(; _class->base->type != 1000; _class = _class->base)
5679 tempDest = tempType;
5682 _class->symbol = FindClass(_class->fullName);
5683 tempType->__anon1._class = _class->symbol;
5684 tempType->truth = dest->truth;
5685 if(tempType->__anon1._class)
5686 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
5687 backupSourceExpType = sourceExp->expType;
5688 sourceExp->expType = dest;
5691 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5694 if(_class && _class->type == 2 && source->kind != 8)
5696 if(!dest->__anon1._class->__anon1.registered->dataType)
5697 dest->__anon1._class->__anon1.registered->dataType = ProcessTypeString(dest->__anon1._class->__anon1.registered->dataTypeString, 0);
5698 if(MatchTypes(source, dest->__anon1._class->__anon1.registered->dataType, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5701 FreeType(sourceExp->expType);
5702 source = sourceExp->expType = MkClassType(dest->__anon1._class->string);
5706 if(_class && !strcmp(_class->fullName, "ecere::com::Class") && source->kind == 13 && source->__anon1.type && source->__anon1.type->kind == 1 && sourceExp->type == 3)
5708 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
5709 struct Declarator * decl;
5712 ReadString(string, sourceExp->__anon1.__anon2.string);
5713 decl = SpecDeclFromString(string, specs, (((void *)0)));
5714 FreeExpContents(sourceExp);
5715 FreeType(sourceExp->expType);
5716 sourceExp->type = 24;
5717 sourceExp->__anon1._classExp.specifiers = specs;
5718 sourceExp->__anon1._classExp.decl = decl;
5719 sourceExp->expType = dest;
5723 if(backupSourceExpType)
5724 FreeType(backupSourceExpType);
5728 else if(source->kind == 8)
5730 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class ? source->__anon1._class->__anon1.registered : (((void *)0));
5732 if(_class && (_class->type == 3 || _class->type == 2))
5736 struct Type * tempType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
5737 struct Type * tempDest, * tempSource;
5739 if(!source->__anon1._class->__anon1.registered->dataType)
5740 source->__anon1._class->__anon1.registered->dataType = ProcessTypeString(source->__anon1._class->__anon1.registered->dataTypeString, 0);
5741 for(; _class->base->type != 1000; _class = _class->base)
5744 tempSource = tempType;
5746 tempType->__anon1._class = FindClass(_class->fullName);
5747 tempType->truth = source->truth;
5748 tempType->classObjectType = source->classObjectType;
5749 if(tempType->__anon1._class)
5750 MatchTypes(tempSource, tempDest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
5751 if(conversions && conversions->last)
5753 ((struct Conversion *)conversions->last)->resultType = dest;
5756 FreeType(sourceExp->expType);
5757 sourceExp->expType = MkClassType(_class->fullName);
5758 sourceExp->expType->truth = source->truth;
5759 sourceExp->expType->classObjectType = source->classObjectType;
5760 if(!sourceExp->destType)
5762 FreeType(sourceExp->destType);
5763 sourceExp->destType = sourceExp->expType;
5764 if(sourceExp->expType)
5765 sourceExp->expType->refCount++;
5767 if(!_class->dataType)
5768 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
5770 dest = MkClassType(source->__anon1._class->string);
5771 dest->truth = source->truth;
5772 dest->classObjectType = source->classObjectType;
5774 source = _class->dataType;
5776 ((tempType ? (__ecereClass_Type->Destructor ? __ecereClass_Type->Destructor((void *)tempType) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(tempType)) : 0), tempType = 0);
5782 if(MatchTypes(source, dest, conversions, (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst))
5791 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class ? dest->__anon1._class->__anon1.registered : (((void *)0));
5792 unsigned int fittingValue = 0;
5794 if(_class && _class->type == 4)
5796 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
5797 struct __ecereNameSpace__ecere__com__EnumClassData * c = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
5799 if(c && value >= 0 && value <= c->largest)
5802 if(_class && !dest->truth && (_class->type == 3 || fittingValue || (_class->type != 1 && !value && source->kind == 3) || _class->type == 2))
5804 if(_class->type == 0 || _class->type == 5)
5806 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5808 *newExp = *sourceExp;
5809 if(sourceExp->destType)
5810 sourceExp->destType->refCount++;
5811 if(sourceExp->expType)
5812 sourceExp->expType->refCount++;
5813 sourceExp->type = 11;
5814 sourceExp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
5815 sourceExp->__anon1.cast.exp = newExp;
5816 FreeType(sourceExp->expType);
5817 sourceExp->expType = (((void *)0));
5818 ProcessExpressionType(sourceExp);
5821 FreeType(sourceExp->expType);
5822 sourceExp->expType = dest;
5827 if(backupSourceExpType)
5828 FreeType(backupSourceExpType);
5831 if(!_class->dataType)
5832 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
5834 dest = _class->dataType;
5837 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))
5839 specs = MkListOne(MkSpecifier(DOUBLE));
5841 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))
5843 specs = MkListOne(MkSpecifier(FLOAT));
5845 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))
5849 ListAdd(specs, MkSpecifier(UNSIGNED));
5850 ListAdd(specs, MkSpecifier(INT64));
5852 else if(dest->kind == 3 && (source->kind == 3 || source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 6 || source->kind == 7))
5856 ListAdd(specs, MkSpecifier(UNSIGNED));
5857 ListAdd(specs, MkSpecifier(INT));
5859 else if(dest->kind == 2 && (source->kind == 2 || source->kind == 1 || source->kind == 24 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5863 ListAdd(specs, MkSpecifier(UNSIGNED));
5864 ListAdd(specs, MkSpecifier(SHORT));
5866 else if(dest->kind == 1 && (source->kind == 1 || source->kind == 24 || source->kind == 2 || source->kind == 3 || source->kind == 6 || source->kind == 7))
5870 ListAdd(specs, MkSpecifier(UNSIGNED));
5871 ListAdd(specs, MkSpecifier(CHAR));
5877 if(backupSourceExpType)
5879 if(sourceExp->expType)
5880 FreeType(sourceExp->expType);
5881 sourceExp->expType = backupSourceExpType;
5886 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))
5888 specs = MkListOne(MkSpecifier(DOUBLE));
5890 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))
5892 specs = MkListOne(MkSpecifier(FLOAT));
5894 else if(dest->kind == 24 && (source->kind == 24 || source->kind == 1 || source->kind == 15 || source->kind == 2 || source->kind == 3) && (value == 1 || value == 0))
5897 ListAdd(specs, MkSpecifier(BOOL));
5899 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)))
5903 ListAdd(specs, MkSpecifier(UNSIGNED));
5904 ListAdd(specs, MkSpecifier(CHAR));
5906 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)))))
5910 ListAdd(specs, MkSpecifier(UNSIGNED));
5911 ListAdd(specs, MkSpecifier(SHORT));
5913 else if(dest->kind == 3 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3))
5917 ListAdd(specs, MkSpecifier(UNSIGNED));
5918 ListAdd(specs, MkSpecifier(INT));
5920 else if(dest->kind == 4 && (source->kind == 15 || source->kind == 2 || source->kind == 24 || source->kind == 1 || source->kind == 3 || source->kind == 4))
5924 ListAdd(specs, MkSpecifier(UNSIGNED));
5925 ListAdd(specs, MkSpecifier(INT64));
5927 else if(dest->kind == 15 && (source->kind == 4 || source->kind == 3 || source->kind == 2 || source->kind == 24 || source->kind == 1))
5929 specs = MkListOne(MkEnum(MkIdentifier(dest->__anon1.__anon1.enumName), (((void *)0))));
5935 if(backupSourceExpType)
5937 if(sourceExp->expType)
5938 FreeType(sourceExp->expType);
5939 sourceExp->expType = backupSourceExpType;
5943 if(!flag && !sourceExp->opDestType)
5945 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
5947 *newExp = *sourceExp;
5948 newExp->prev = (((void *)0));
5949 newExp->next = (((void *)0));
5950 if(sourceExp->destType)
5951 sourceExp->destType->refCount++;
5952 if(sourceExp->expType)
5953 sourceExp->expType->refCount++;
5954 sourceExp->type = 11;
5955 if(realDest->kind == 8)
5957 sourceExp->__anon1.cast.typeName = QMkClass(realDest->__anon1._class->string, (((void *)0)));
5958 FreeList(specs, (void *)(FreeSpecifier));
5961 sourceExp->__anon1.cast.typeName = MkTypeName(specs, (((void *)0)));
5962 if(newExp->type == 4)
5964 sourceExp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
5967 sourceExp->__anon1.cast.exp = newExp;
5968 FreeType(sourceExp->expType);
5969 sourceExp->expType = (((void *)0));
5970 ProcessExpressionType(sourceExp);
5973 FreeList(specs, (void *)(FreeSpecifier));
5976 if(backupSourceExpType)
5977 FreeType(backupSourceExpType);
5982 if(computedExp != sourceExp)
5984 FreeExpression(computedExp);
5985 computedExp = sourceExp;
5987 while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->__anon1.list)
5988 sourceExp = (*sourceExp->__anon1.list).last;
5989 if(sourceExp->type == 0)
5991 struct Identifier * id = sourceExp->__anon1.__anon1.identifier;
5995 if(dest->__anon1._class && dest->__anon1._class->__anon1.registered && dest->__anon1._class->__anon1.registered->type == 4)
5997 struct __ecereNameSpace__ecere__com__Class * _class = dest->__anon1._class->__anon1.registered;
5998 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
6002 for(; _class && _class->type == 4; _class = _class->base)
6004 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
6005 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
6007 for(value = e->values.first; value; value = value->next)
6009 if(!strcmp(value->name, id->string))
6014 FreeExpContents(sourceExp);
6015 FreeType(sourceExp->expType);
6016 sourceExp->isConstant = 1;
6017 sourceExp->expType = MkClassType(_class->fullName);
6019 sourceExp->type = 2;
6020 if(_class->dataTypeString && (!strcmp(_class->dataTypeString, "int") || !strcmp(_class->dataTypeString, "int64") || !strcmp(_class->dataTypeString, "short") || !strcmp(_class->dataTypeString, "char")))
6021 sourceExp->__anon1.__anon1.constant = PrintInt64(value->data);
6023 sourceExp->__anon1.__anon1.constant = PrintUInt64(value->data);
6032 if(dest->classObjectType != 2 && dest->kind == 8 && MatchWithEnums_Module(privateModule, sourceExp, dest, id->string, conversions))
6043 static unsigned int IntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6045 int value2 = op2->__anon1.i;
6048 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i + value2));
6051 exp->expType = op1->type;
6053 op1->type->refCount++;
6058 static unsigned int UIntAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6060 unsigned int value2 = op2->__anon1.ui;
6063 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui + value2));
6066 exp->expType = op1->type;
6068 op1->type->refCount++;
6073 static unsigned int Int64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6075 long long value2 = op2->__anon1.i64;
6078 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 + value2));
6081 exp->expType = op1->type;
6083 op1->type->refCount++;
6088 static unsigned int UInt64Add(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6090 uint64 value2 = op2->__anon1.ui64;
6093 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 + value2));
6096 exp->expType = op1->type;
6098 op1->type->refCount++;
6103 static unsigned int ShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6105 short value2 = op2->__anon1.s;
6108 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s + value2));
6111 exp->expType = op1->type;
6113 op1->type->refCount++;
6118 static unsigned int UShortAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6120 unsigned short value2 = op2->__anon1.us;
6123 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us + value2));
6126 exp->expType = op1->type;
6128 op1->type->refCount++;
6133 static unsigned int CharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6135 char value2 = op2->__anon1.c;
6138 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c + value2));
6141 exp->expType = op1->type;
6143 op1->type->refCount++;
6148 static unsigned int UCharAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6150 unsigned char value2 = op2->__anon1.uc;
6153 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc + value2));
6156 exp->expType = op1->type;
6158 op1->type->refCount++;
6163 static unsigned int FloatAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6165 float value2 = op2->__anon1.f;
6168 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f + value2));
6171 exp->expType = op1->type;
6173 op1->type->refCount++;
6178 static unsigned int DoubleAdd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6180 double value2 = op2->__anon1.d;
6183 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d + value2));
6186 exp->expType = op1->type;
6188 op1->type->refCount++;
6193 static unsigned int IntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6195 int value2 = op2->__anon1.i;
6198 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i - value2));
6201 exp->expType = op1->type;
6203 op1->type->refCount++;
6208 static unsigned int UIntSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6210 unsigned int value2 = op2->__anon1.ui;
6213 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui - value2));
6216 exp->expType = op1->type;
6218 op1->type->refCount++;
6223 static unsigned int Int64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6225 long long value2 = op2->__anon1.i64;
6228 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 - value2));
6231 exp->expType = op1->type;
6233 op1->type->refCount++;
6238 static unsigned int UInt64Sub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6240 uint64 value2 = op2->__anon1.ui64;
6243 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 - value2));
6246 exp->expType = op1->type;
6248 op1->type->refCount++;
6253 static unsigned int ShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6255 short value2 = op2->__anon1.s;
6258 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s - value2));
6261 exp->expType = op1->type;
6263 op1->type->refCount++;
6268 static unsigned int UShortSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6270 unsigned short value2 = op2->__anon1.us;
6273 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us - value2));
6276 exp->expType = op1->type;
6278 op1->type->refCount++;
6283 static unsigned int CharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6285 char value2 = op2->__anon1.c;
6288 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c - value2));
6291 exp->expType = op1->type;
6293 op1->type->refCount++;
6298 static unsigned int UCharSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6300 unsigned char value2 = op2->__anon1.uc;
6303 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc - value2));
6306 exp->expType = op1->type;
6308 op1->type->refCount++;
6313 static unsigned int FloatSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6315 float value2 = op2->__anon1.f;
6318 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f - value2));
6321 exp->expType = op1->type;
6323 op1->type->refCount++;
6328 static unsigned int DoubleSub(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6330 double value2 = op2->__anon1.d;
6333 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d - value2));
6336 exp->expType = op1->type;
6338 op1->type->refCount++;
6343 static unsigned int IntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6345 int value2 = op2->__anon1.i;
6348 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i * value2));
6351 exp->expType = op1->type;
6353 op1->type->refCount++;
6358 static unsigned int UIntMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6360 unsigned int value2 = op2->__anon1.ui;
6363 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui * value2));
6366 exp->expType = op1->type;
6368 op1->type->refCount++;
6373 static unsigned int Int64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6375 long long value2 = op2->__anon1.i64;
6378 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 * value2));
6381 exp->expType = op1->type;
6383 op1->type->refCount++;
6388 static unsigned int UInt64Mul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6390 uint64 value2 = op2->__anon1.ui64;
6393 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 * value2));
6396 exp->expType = op1->type;
6398 op1->type->refCount++;
6403 static unsigned int ShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6405 short value2 = op2->__anon1.s;
6408 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s * value2));
6411 exp->expType = op1->type;
6413 op1->type->refCount++;
6418 static unsigned int UShortMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6420 unsigned short value2 = op2->__anon1.us;
6423 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us * value2));
6426 exp->expType = op1->type;
6428 op1->type->refCount++;
6433 static unsigned int CharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6435 char value2 = op2->__anon1.c;
6438 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c * value2));
6441 exp->expType = op1->type;
6443 op1->type->refCount++;
6448 static unsigned int UCharMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6450 unsigned char value2 = op2->__anon1.uc;
6453 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc * value2));
6456 exp->expType = op1->type;
6458 op1->type->refCount++;
6463 static unsigned int FloatMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6465 float value2 = op2->__anon1.f;
6468 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f * value2));
6471 exp->expType = op1->type;
6473 op1->type->refCount++;
6478 static unsigned int DoubleMul(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6480 double value2 = op2->__anon1.d;
6483 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d * value2));
6486 exp->expType = op1->type;
6488 op1->type->refCount++;
6493 static unsigned int IntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6495 int value2 = op2->__anon1.i;
6498 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i / value2) : 0);
6501 exp->expType = op1->type;
6503 op1->type->refCount++;
6508 static unsigned int UIntDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6510 unsigned int value2 = op2->__anon1.ui;
6513 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui / value2) : 0);
6516 exp->expType = op1->type;
6518 op1->type->refCount++;
6523 static unsigned int Int64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6525 long long value2 = op2->__anon1.i64;
6528 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 / value2) : 0);
6531 exp->expType = op1->type;
6533 op1->type->refCount++;
6538 static unsigned int UInt64Div(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6540 uint64 value2 = op2->__anon1.ui64;
6543 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 / value2) : 0);
6546 exp->expType = op1->type;
6548 op1->type->refCount++;
6553 static unsigned int ShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6555 short value2 = op2->__anon1.s;
6558 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s / value2) : (short)0);
6561 exp->expType = op1->type;
6563 op1->type->refCount++;
6568 static unsigned int UShortDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6570 unsigned short value2 = op2->__anon1.us;
6573 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us / value2) : (unsigned short)0);
6576 exp->expType = op1->type;
6578 op1->type->refCount++;
6583 static unsigned int CharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6585 char value2 = op2->__anon1.c;
6588 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c / value2) : (char)0);
6591 exp->expType = op1->type;
6593 op1->type->refCount++;
6598 static unsigned int UCharDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6600 unsigned char value2 = op2->__anon1.uc;
6603 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc / value2) : (unsigned char)0);
6606 exp->expType = op1->type;
6608 op1->type->refCount++;
6613 static unsigned int FloatDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6615 float value2 = op2->__anon1.f;
6618 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f / value2);
6621 exp->expType = op1->type;
6623 op1->type->refCount++;
6628 static unsigned int DoubleDiv(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6630 double value2 = op2->__anon1.d;
6633 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d / value2);
6636 exp->expType = op1->type;
6638 op1->type->refCount++;
6643 static unsigned int IntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6645 int value2 = op2->__anon1.i;
6648 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i % value2) : 0);
6651 exp->expType = op1->type;
6653 op1->type->refCount++;
6658 static unsigned int UIntMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6660 unsigned int value2 = op2->__anon1.ui;
6663 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui % value2) : 0);
6666 exp->expType = op1->type;
6668 op1->type->refCount++;
6673 static unsigned int Int64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6675 long long value2 = op2->__anon1.i64;
6678 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 % value2) : 0);
6681 exp->expType = op1->type;
6683 op1->type->refCount++;
6688 static unsigned int UInt64Mod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6690 uint64 value2 = op2->__anon1.ui64;
6693 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 % value2) : 0);
6696 exp->expType = op1->type;
6698 op1->type->refCount++;
6703 static unsigned int ShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6705 short value2 = op2->__anon1.s;
6708 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s % value2) : (short)0);
6711 exp->expType = op1->type;
6713 op1->type->refCount++;
6718 static unsigned int UShortMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6720 unsigned short value2 = op2->__anon1.us;
6723 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us % value2) : (unsigned short)0);
6726 exp->expType = op1->type;
6728 op1->type->refCount++;
6733 static unsigned int CharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6735 char value2 = op2->__anon1.c;
6738 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c % value2) : (char)0);
6741 exp->expType = op1->type;
6743 op1->type->refCount++;
6748 static unsigned int UCharMod(struct Expression * exp, struct Operand * op1, struct Operand * op2)
6750 unsigned char value2 = op2->__anon1.uc;
6753 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc % value2) : (unsigned char)0);
6756 exp->expType = op1->type;
6758 op1->type->refCount++;
6763 static unsigned int IntNeg(struct Expression * exp, struct Operand * op1)
6766 exp->__anon1.__anon2.string = PrintInt((-op1->__anon1.i));
6769 exp->expType = op1->type;
6771 op1->type->refCount++;
6776 static unsigned int UIntNeg(struct Expression * exp, struct Operand * op1)
6779 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(-op1->__anon1.ui));
6782 exp->expType = op1->type;
6784 op1->type->refCount++;
6789 static unsigned int Int64Neg(struct Expression * exp, struct Operand * op1)
6792 exp->__anon1.__anon2.string = PrintInt64((-op1->__anon1.i64));
6795 exp->expType = op1->type;
6797 op1->type->refCount++;
6802 static unsigned int UInt64Neg(struct Expression * exp, struct Operand * op1)
6805 exp->__anon1.__anon2.string = PrintUInt64((uint64)(-op1->__anon1.ui64));
6808 exp->expType = op1->type;
6810 op1->type->refCount++;
6815 static unsigned int ShortNeg(struct Expression * exp, struct Operand * op1)
6818 exp->__anon1.__anon2.string = PrintShort((-op1->__anon1.s));
6821 exp->expType = op1->type;
6823 op1->type->refCount++;
6828 static unsigned int UShortNeg(struct Expression * exp, struct Operand * op1)
6831 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(-op1->__anon1.us));
6834 exp->expType = op1->type;
6836 op1->type->refCount++;
6841 static unsigned int CharNeg(struct Expression * exp, struct Operand * op1)
6844 exp->__anon1.__anon2.string = PrintChar((-op1->__anon1.c));
6847 exp->expType = op1->type;
6849 op1->type->refCount++;
6854 static unsigned int UCharNeg(struct Expression * exp, struct Operand * op1)
6857 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(-op1->__anon1.uc));
6860 exp->expType = op1->type;
6862 op1->type->refCount++;
6867 static unsigned int FloatNeg(struct Expression * exp, struct Operand * op1)
6870 exp->__anon1.__anon2.string = PrintFloat((float)(-op1->__anon1.f));
6873 exp->expType = op1->type;
6875 op1->type->refCount++;
6880 static unsigned int DoubleNeg(struct Expression * exp, struct Operand * op1)
6883 exp->__anon1.__anon2.string = PrintDouble((double)(-op1->__anon1.d));
6886 exp->expType = op1->type;
6888 op1->type->refCount++;
6893 static unsigned int IntInc(struct Expression * exp, struct Operand * op1)
6896 exp->__anon1.__anon2.string = PrintInt((++op1->__anon1.i));
6899 exp->expType = op1->type;
6901 op1->type->refCount++;
6906 static unsigned int UIntInc(struct Expression * exp, struct Operand * op1)
6909 exp->__anon1.__anon2.string = PrintUInt((++op1->__anon1.ui));
6912 exp->expType = op1->type;
6914 op1->type->refCount++;
6919 static unsigned int Int64Inc(struct Expression * exp, struct Operand * op1)
6922 exp->__anon1.__anon2.string = PrintInt64((++op1->__anon1.i64));
6925 exp->expType = op1->type;
6927 op1->type->refCount++;
6932 static unsigned int UInt64Inc(struct Expression * exp, struct Operand * op1)
6935 exp->__anon1.__anon2.string = PrintUInt64((++op1->__anon1.ui64));
6938 exp->expType = op1->type;
6940 op1->type->refCount++;
6945 static unsigned int ShortInc(struct Expression * exp, struct Operand * op1)
6948 exp->__anon1.__anon2.string = PrintShort((++op1->__anon1.s));
6951 exp->expType = op1->type;
6953 op1->type->refCount++;
6958 static unsigned int UShortInc(struct Expression * exp, struct Operand * op1)
6961 exp->__anon1.__anon2.string = PrintUShort((++op1->__anon1.us));
6964 exp->expType = op1->type;
6966 op1->type->refCount++;
6971 static unsigned int CharInc(struct Expression * exp, struct Operand * op1)
6974 exp->__anon1.__anon2.string = PrintChar((++op1->__anon1.c));
6977 exp->expType = op1->type;
6979 op1->type->refCount++;
6984 static unsigned int UCharInc(struct Expression * exp, struct Operand * op1)
6987 exp->__anon1.__anon2.string = PrintUChar((++op1->__anon1.uc));
6990 exp->expType = op1->type;
6992 op1->type->refCount++;
6997 static unsigned int FloatInc(struct Expression * exp, struct Operand * op1)
7000 exp->__anon1.__anon2.string = PrintFloat((float)(++op1->__anon1.f));
7003 exp->expType = op1->type;
7005 op1->type->refCount++;
7010 static unsigned int DoubleInc(struct Expression * exp, struct Operand * op1)
7013 exp->__anon1.__anon2.string = PrintDouble((double)(++op1->__anon1.d));
7016 exp->expType = op1->type;
7018 op1->type->refCount++;
7023 static unsigned int IntDec(struct Expression * exp, struct Operand * op1)
7026 exp->__anon1.__anon2.string = PrintInt((--op1->__anon1.i));
7029 exp->expType = op1->type;
7031 op1->type->refCount++;
7036 static unsigned int UIntDec(struct Expression * exp, struct Operand * op1)
7039 exp->__anon1.__anon2.string = PrintUInt((--op1->__anon1.ui));
7042 exp->expType = op1->type;
7044 op1->type->refCount++;
7049 static unsigned int Int64Dec(struct Expression * exp, struct Operand * op1)
7052 exp->__anon1.__anon2.string = PrintInt64((--op1->__anon1.i64));
7055 exp->expType = op1->type;
7057 op1->type->refCount++;
7062 static unsigned int UInt64Dec(struct Expression * exp, struct Operand * op1)
7065 exp->__anon1.__anon2.string = PrintUInt64((--op1->__anon1.ui64));
7068 exp->expType = op1->type;
7070 op1->type->refCount++;
7075 static unsigned int ShortDec(struct Expression * exp, struct Operand * op1)
7078 exp->__anon1.__anon2.string = PrintShort((--op1->__anon1.s));
7081 exp->expType = op1->type;
7083 op1->type->refCount++;
7088 static unsigned int UShortDec(struct Expression * exp, struct Operand * op1)
7091 exp->__anon1.__anon2.string = PrintUShort((--op1->__anon1.us));
7094 exp->expType = op1->type;
7096 op1->type->refCount++;
7101 static unsigned int CharDec(struct Expression * exp, struct Operand * op1)
7104 exp->__anon1.__anon2.string = PrintChar((--op1->__anon1.c));
7107 exp->expType = op1->type;
7109 op1->type->refCount++;
7114 static unsigned int UCharDec(struct Expression * exp, struct Operand * op1)
7117 exp->__anon1.__anon2.string = PrintUChar((--op1->__anon1.uc));
7120 exp->expType = op1->type;
7122 op1->type->refCount++;
7127 static unsigned int FloatDec(struct Expression * exp, struct Operand * op1)
7130 exp->__anon1.__anon2.string = PrintFloat((float)(--op1->__anon1.f));
7133 exp->expType = op1->type;
7135 op1->type->refCount++;
7140 static unsigned int DoubleDec(struct Expression * exp, struct Operand * op1)
7143 exp->__anon1.__anon2.string = PrintDouble((double)(--op1->__anon1.d));
7146 exp->expType = op1->type;
7148 op1->type->refCount++;
7153 static unsigned int IntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7155 int value2 = op2->__anon1.i;
7158 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i = value2));
7161 exp->expType = op1->type;
7163 op1->type->refCount++;
7168 static unsigned int UIntAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7170 unsigned int value2 = op2->__anon1.ui;
7173 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui = value2));
7176 exp->expType = op1->type;
7178 op1->type->refCount++;
7183 static unsigned int Int64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7185 long long value2 = op2->__anon1.i64;
7188 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 = value2));
7191 exp->expType = op1->type;
7193 op1->type->refCount++;
7198 static unsigned int UInt64Asign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7200 uint64 value2 = op2->__anon1.ui64;
7203 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 = value2));
7206 exp->expType = op1->type;
7208 op1->type->refCount++;
7213 static unsigned int ShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7215 short value2 = op2->__anon1.s;
7218 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s = value2));
7221 exp->expType = op1->type;
7223 op1->type->refCount++;
7228 static unsigned int UShortAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7230 unsigned short value2 = op2->__anon1.us;
7233 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us = value2));
7236 exp->expType = op1->type;
7238 op1->type->refCount++;
7243 static unsigned int CharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7245 char value2 = op2->__anon1.c;
7248 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c = value2));
7251 exp->expType = op1->type;
7253 op1->type->refCount++;
7258 static unsigned int UCharAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7260 unsigned char value2 = op2->__anon1.uc;
7263 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc = value2));
7266 exp->expType = op1->type;
7268 op1->type->refCount++;
7273 static unsigned int FloatAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7275 float value2 = op2->__anon1.f;
7278 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f = value2));
7281 exp->expType = op1->type;
7283 op1->type->refCount++;
7288 static unsigned int DoubleAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7290 double value2 = op2->__anon1.d;
7293 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d = value2));
7296 exp->expType = op1->type;
7298 op1->type->refCount++;
7303 static unsigned int IntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7305 int value2 = op2->__anon1.i;
7308 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i += value2));
7311 exp->expType = op1->type;
7313 op1->type->refCount++;
7318 static unsigned int UIntAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7320 unsigned int value2 = op2->__anon1.ui;
7323 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui += value2));
7326 exp->expType = op1->type;
7328 op1->type->refCount++;
7333 static unsigned int Int64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7335 long long value2 = op2->__anon1.i64;
7338 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 += value2));
7341 exp->expType = op1->type;
7343 op1->type->refCount++;
7348 static unsigned int UInt64AddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7350 uint64 value2 = op2->__anon1.ui64;
7353 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 += value2));
7356 exp->expType = op1->type;
7358 op1->type->refCount++;
7363 static unsigned int ShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7365 short value2 = op2->__anon1.s;
7368 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s += value2));
7371 exp->expType = op1->type;
7373 op1->type->refCount++;
7378 static unsigned int UShortAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7380 unsigned short value2 = op2->__anon1.us;
7383 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us += value2));
7386 exp->expType = op1->type;
7388 op1->type->refCount++;
7393 static unsigned int CharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7395 char value2 = op2->__anon1.c;
7398 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c += value2));
7401 exp->expType = op1->type;
7403 op1->type->refCount++;
7408 static unsigned int UCharAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7410 unsigned char value2 = op2->__anon1.uc;
7413 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc += value2));
7416 exp->expType = op1->type;
7418 op1->type->refCount++;
7423 static unsigned int FloatAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7425 float value2 = op2->__anon1.f;
7428 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f += value2));
7431 exp->expType = op1->type;
7433 op1->type->refCount++;
7438 static unsigned int DoubleAddAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7440 double value2 = op2->__anon1.d;
7443 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d += value2));
7446 exp->expType = op1->type;
7448 op1->type->refCount++;
7453 static unsigned int IntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7455 int value2 = op2->__anon1.i;
7458 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i -= value2));
7461 exp->expType = op1->type;
7463 op1->type->refCount++;
7468 static unsigned int UIntSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7470 unsigned int value2 = op2->__anon1.ui;
7473 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui -= value2));
7476 exp->expType = op1->type;
7478 op1->type->refCount++;
7483 static unsigned int Int64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7485 long long value2 = op2->__anon1.i64;
7488 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 -= value2));
7491 exp->expType = op1->type;
7493 op1->type->refCount++;
7498 static unsigned int UInt64SubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7500 uint64 value2 = op2->__anon1.ui64;
7503 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 -= value2));
7506 exp->expType = op1->type;
7508 op1->type->refCount++;
7513 static unsigned int ShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7515 short value2 = op2->__anon1.s;
7518 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s -= value2));
7521 exp->expType = op1->type;
7523 op1->type->refCount++;
7528 static unsigned int UShortSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7530 unsigned short value2 = op2->__anon1.us;
7533 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us -= value2));
7536 exp->expType = op1->type;
7538 op1->type->refCount++;
7543 static unsigned int CharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7545 char value2 = op2->__anon1.c;
7548 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c -= value2));
7551 exp->expType = op1->type;
7553 op1->type->refCount++;
7558 static unsigned int UCharSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7560 unsigned char value2 = op2->__anon1.uc;
7563 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc -= value2));
7566 exp->expType = op1->type;
7568 op1->type->refCount++;
7573 static unsigned int FloatSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7575 float value2 = op2->__anon1.f;
7578 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f -= value2));
7581 exp->expType = op1->type;
7583 op1->type->refCount++;
7588 static unsigned int DoubleSubAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7590 double value2 = op2->__anon1.d;
7593 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d -= value2));
7596 exp->expType = op1->type;
7598 op1->type->refCount++;
7603 static unsigned int IntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7605 int value2 = op2->__anon1.i;
7608 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i *= value2));
7611 exp->expType = op1->type;
7613 op1->type->refCount++;
7618 static unsigned int UIntMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7620 unsigned int value2 = op2->__anon1.ui;
7623 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui *= value2));
7626 exp->expType = op1->type;
7628 op1->type->refCount++;
7633 static unsigned int Int64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7635 long long value2 = op2->__anon1.i64;
7638 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 *= value2));
7641 exp->expType = op1->type;
7643 op1->type->refCount++;
7648 static unsigned int UInt64MulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7650 uint64 value2 = op2->__anon1.ui64;
7653 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 *= value2));
7656 exp->expType = op1->type;
7658 op1->type->refCount++;
7663 static unsigned int ShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7665 short value2 = op2->__anon1.s;
7668 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s *= value2));
7671 exp->expType = op1->type;
7673 op1->type->refCount++;
7678 static unsigned int UShortMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7680 unsigned short value2 = op2->__anon1.us;
7683 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us *= value2));
7686 exp->expType = op1->type;
7688 op1->type->refCount++;
7693 static unsigned int CharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7695 char value2 = op2->__anon1.c;
7698 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c *= value2));
7701 exp->expType = op1->type;
7703 op1->type->refCount++;
7708 static unsigned int UCharMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7710 unsigned char value2 = op2->__anon1.uc;
7713 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc *= value2));
7716 exp->expType = op1->type;
7718 op1->type->refCount++;
7723 static unsigned int FloatMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7725 float value2 = op2->__anon1.f;
7728 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f *= value2));
7731 exp->expType = op1->type;
7733 op1->type->refCount++;
7738 static unsigned int DoubleMulAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7740 double value2 = op2->__anon1.d;
7743 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d *= value2));
7746 exp->expType = op1->type;
7748 op1->type->refCount++;
7753 static unsigned int IntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7755 int value2 = op2->__anon1.i;
7758 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i /= value2) : 0);
7761 exp->expType = op1->type;
7763 op1->type->refCount++;
7768 static unsigned int UIntDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7770 unsigned int value2 = op2->__anon1.ui;
7773 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui /= value2) : 0);
7776 exp->expType = op1->type;
7778 op1->type->refCount++;
7783 static unsigned int Int64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7785 long long value2 = op2->__anon1.i64;
7788 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 /= value2) : 0);
7791 exp->expType = op1->type;
7793 op1->type->refCount++;
7798 static unsigned int UInt64DivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7800 uint64 value2 = op2->__anon1.ui64;
7803 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 /= value2) : 0);
7806 exp->expType = op1->type;
7808 op1->type->refCount++;
7813 static unsigned int ShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7815 short value2 = op2->__anon1.s;
7818 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s /= value2) : (short)0);
7821 exp->expType = op1->type;
7823 op1->type->refCount++;
7828 static unsigned int UShortDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7830 unsigned short value2 = op2->__anon1.us;
7833 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us /= value2) : (unsigned short)0);
7836 exp->expType = op1->type;
7838 op1->type->refCount++;
7843 static unsigned int CharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7845 char value2 = op2->__anon1.c;
7848 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c /= value2) : (char)0);
7851 exp->expType = op1->type;
7853 op1->type->refCount++;
7858 static unsigned int UCharDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7860 unsigned char value2 = op2->__anon1.uc;
7863 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc /= value2) : (unsigned char)0);
7866 exp->expType = op1->type;
7868 op1->type->refCount++;
7873 static unsigned int FloatDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7875 float value2 = op2->__anon1.f;
7878 exp->__anon1.__anon2.string = PrintFloat(op1->__anon1.f /= value2);
7881 exp->expType = op1->type;
7883 op1->type->refCount++;
7888 static unsigned int DoubleDivAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7890 double value2 = op2->__anon1.d;
7893 exp->__anon1.__anon2.string = PrintDouble(op1->__anon1.d /= value2);
7896 exp->expType = op1->type;
7898 op1->type->refCount++;
7903 static unsigned int IntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7905 int value2 = op2->__anon1.i;
7908 exp->__anon1.__anon2.string = PrintInt(value2 ? (op1->__anon1.i %= value2) : 0);
7911 exp->expType = op1->type;
7913 op1->type->refCount++;
7918 static unsigned int UIntModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7920 unsigned int value2 = op2->__anon1.ui;
7923 exp->__anon1.__anon2.string = PrintUInt(value2 ? (op1->__anon1.ui %= value2) : 0);
7926 exp->expType = op1->type;
7928 op1->type->refCount++;
7933 static unsigned int Int64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7935 long long value2 = op2->__anon1.i64;
7938 exp->__anon1.__anon2.string = PrintInt64(value2 ? (op1->__anon1.i64 %= value2) : 0);
7941 exp->expType = op1->type;
7943 op1->type->refCount++;
7948 static unsigned int UInt64ModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7950 uint64 value2 = op2->__anon1.ui64;
7953 exp->__anon1.__anon2.string = PrintUInt64(value2 ? (op1->__anon1.ui64 %= value2) : 0);
7956 exp->expType = op1->type;
7958 op1->type->refCount++;
7963 static unsigned int ShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7965 short value2 = op2->__anon1.s;
7968 exp->__anon1.__anon2.string = PrintShort(value2 ? (op1->__anon1.s %= value2) : (short)0);
7971 exp->expType = op1->type;
7973 op1->type->refCount++;
7978 static unsigned int UShortModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7980 unsigned short value2 = op2->__anon1.us;
7983 exp->__anon1.__anon2.string = PrintUShort(value2 ? (op1->__anon1.us %= value2) : (unsigned short)0);
7986 exp->expType = op1->type;
7988 op1->type->refCount++;
7993 static unsigned int CharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
7995 char value2 = op2->__anon1.c;
7998 exp->__anon1.__anon2.string = PrintChar(value2 ? (op1->__anon1.c %= value2) : (char)0);
8001 exp->expType = op1->type;
8003 op1->type->refCount++;
8008 static unsigned int UCharModAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8010 unsigned char value2 = op2->__anon1.uc;
8013 exp->__anon1.__anon2.string = PrintUChar(value2 ? (op1->__anon1.uc %= value2) : (unsigned char)0);
8016 exp->expType = op1->type;
8018 op1->type->refCount++;
8023 static unsigned int IntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8025 int value2 = op2->__anon1.i;
8028 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i & value2));
8031 exp->expType = op1->type;
8033 op1->type->refCount++;
8038 static unsigned int UIntBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8040 unsigned int value2 = op2->__anon1.ui;
8043 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui & value2));
8046 exp->expType = op1->type;
8048 op1->type->refCount++;
8053 static unsigned int Int64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8055 long long value2 = op2->__anon1.i64;
8058 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 & value2));
8061 exp->expType = op1->type;
8063 op1->type->refCount++;
8068 static unsigned int UInt64BitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8070 uint64 value2 = op2->__anon1.ui64;
8073 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 & value2));
8076 exp->expType = op1->type;
8078 op1->type->refCount++;
8083 static unsigned int ShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8085 short value2 = op2->__anon1.s;
8088 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s & value2));
8091 exp->expType = op1->type;
8093 op1->type->refCount++;
8098 static unsigned int UShortBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8100 unsigned short value2 = op2->__anon1.us;
8103 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us & value2));
8106 exp->expType = op1->type;
8108 op1->type->refCount++;
8113 static unsigned int CharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8115 char value2 = op2->__anon1.c;
8118 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c & value2));
8121 exp->expType = op1->type;
8123 op1->type->refCount++;
8128 static unsigned int UCharBitAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8130 unsigned char value2 = op2->__anon1.uc;
8133 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc & value2));
8136 exp->expType = op1->type;
8138 op1->type->refCount++;
8143 static unsigned int IntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8145 int value2 = op2->__anon1.i;
8148 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i | value2));
8151 exp->expType = op1->type;
8153 op1->type->refCount++;
8158 static unsigned int UIntBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8160 unsigned int value2 = op2->__anon1.ui;
8163 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui | value2));
8166 exp->expType = op1->type;
8168 op1->type->refCount++;
8173 static unsigned int Int64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8175 long long value2 = op2->__anon1.i64;
8178 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 | value2));
8181 exp->expType = op1->type;
8183 op1->type->refCount++;
8188 static unsigned int UInt64BitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8190 uint64 value2 = op2->__anon1.ui64;
8193 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 | value2));
8196 exp->expType = op1->type;
8198 op1->type->refCount++;
8203 static unsigned int ShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8205 short value2 = op2->__anon1.s;
8208 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s | value2));
8211 exp->expType = op1->type;
8213 op1->type->refCount++;
8218 static unsigned int UShortBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8220 unsigned short value2 = op2->__anon1.us;
8223 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us | value2));
8226 exp->expType = op1->type;
8228 op1->type->refCount++;
8233 static unsigned int CharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8235 char value2 = op2->__anon1.c;
8238 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c | value2));
8241 exp->expType = op1->type;
8243 op1->type->refCount++;
8248 static unsigned int UCharBitOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8250 unsigned char value2 = op2->__anon1.uc;
8253 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc | value2));
8256 exp->expType = op1->type;
8258 op1->type->refCount++;
8263 static unsigned int IntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8265 int value2 = op2->__anon1.i;
8268 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^ value2));
8271 exp->expType = op1->type;
8273 op1->type->refCount++;
8278 static unsigned int UIntBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8280 unsigned int value2 = op2->__anon1.ui;
8283 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^ value2));
8286 exp->expType = op1->type;
8288 op1->type->refCount++;
8293 static unsigned int Int64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8295 long long value2 = op2->__anon1.i64;
8298 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^ value2));
8301 exp->expType = op1->type;
8303 op1->type->refCount++;
8308 static unsigned int UInt64BitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8310 uint64 value2 = op2->__anon1.ui64;
8313 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^ value2));
8316 exp->expType = op1->type;
8318 op1->type->refCount++;
8323 static unsigned int ShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8325 short value2 = op2->__anon1.s;
8328 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^ value2));
8331 exp->expType = op1->type;
8333 op1->type->refCount++;
8338 static unsigned int UShortBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8340 unsigned short value2 = op2->__anon1.us;
8343 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^ value2));
8346 exp->expType = op1->type;
8348 op1->type->refCount++;
8353 static unsigned int CharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8355 char value2 = op2->__anon1.c;
8358 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^ value2));
8361 exp->expType = op1->type;
8363 op1->type->refCount++;
8368 static unsigned int UCharBitXor(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8370 unsigned char value2 = op2->__anon1.uc;
8373 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^ value2));
8376 exp->expType = op1->type;
8378 op1->type->refCount++;
8383 static unsigned int IntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8385 int value2 = op2->__anon1.i;
8388 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i << value2));
8391 exp->expType = op1->type;
8393 op1->type->refCount++;
8398 static unsigned int UIntLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8400 unsigned int value2 = op2->__anon1.ui;
8403 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui << value2));
8406 exp->expType = op1->type;
8408 op1->type->refCount++;
8413 static unsigned int Int64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8415 long long value2 = op2->__anon1.i64;
8418 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 << value2));
8421 exp->expType = op1->type;
8423 op1->type->refCount++;
8428 static unsigned int UInt64LShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8430 uint64 value2 = op2->__anon1.ui64;
8433 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 << value2));
8436 exp->expType = op1->type;
8438 op1->type->refCount++;
8443 static unsigned int ShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8445 short value2 = op2->__anon1.s;
8448 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s << value2));
8451 exp->expType = op1->type;
8453 op1->type->refCount++;
8458 static unsigned int UShortLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8460 unsigned short value2 = op2->__anon1.us;
8463 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us << value2));
8466 exp->expType = op1->type;
8468 op1->type->refCount++;
8473 static unsigned int CharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8475 char value2 = op2->__anon1.c;
8478 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c << value2));
8481 exp->expType = op1->type;
8483 op1->type->refCount++;
8488 static unsigned int UCharLShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8490 unsigned char value2 = op2->__anon1.uc;
8493 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc << value2));
8496 exp->expType = op1->type;
8498 op1->type->refCount++;
8503 static unsigned int IntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8505 int value2 = op2->__anon1.i;
8508 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >> value2));
8511 exp->expType = op1->type;
8513 op1->type->refCount++;
8518 static unsigned int UIntRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8520 unsigned int value2 = op2->__anon1.ui;
8523 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >> value2));
8526 exp->expType = op1->type;
8528 op1->type->refCount++;
8533 static unsigned int Int64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8535 long long value2 = op2->__anon1.i64;
8538 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >> value2));
8541 exp->expType = op1->type;
8543 op1->type->refCount++;
8548 static unsigned int UInt64RShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8550 uint64 value2 = op2->__anon1.ui64;
8553 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >> value2));
8556 exp->expType = op1->type;
8558 op1->type->refCount++;
8563 static unsigned int ShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8565 short value2 = op2->__anon1.s;
8568 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >> value2));
8571 exp->expType = op1->type;
8573 op1->type->refCount++;
8578 static unsigned int UShortRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8580 unsigned short value2 = op2->__anon1.us;
8583 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >> value2));
8586 exp->expType = op1->type;
8588 op1->type->refCount++;
8593 static unsigned int CharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8595 char value2 = op2->__anon1.c;
8598 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >> value2));
8601 exp->expType = op1->type;
8603 op1->type->refCount++;
8608 static unsigned int UCharRShift(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8610 unsigned char value2 = op2->__anon1.uc;
8613 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >> value2));
8616 exp->expType = op1->type;
8618 op1->type->refCount++;
8623 static unsigned int IntBitNot(struct Expression * exp, struct Operand * op1)
8626 exp->__anon1.__anon2.string = PrintInt((~op1->__anon1.i));
8629 exp->expType = op1->type;
8631 op1->type->refCount++;
8636 static unsigned int UIntBitNot(struct Expression * exp, struct Operand * op1)
8639 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(~op1->__anon1.ui));
8642 exp->expType = op1->type;
8644 op1->type->refCount++;
8649 static unsigned int Int64BitNot(struct Expression * exp, struct Operand * op1)
8652 exp->__anon1.__anon2.string = PrintInt64((long long)(~op1->__anon1.i64));
8655 exp->expType = op1->type;
8657 op1->type->refCount++;
8662 static unsigned int UInt64BitNot(struct Expression * exp, struct Operand * op1)
8665 exp->__anon1.__anon2.string = PrintUInt64((uint64)(~op1->__anon1.ui64));
8668 exp->expType = op1->type;
8670 op1->type->refCount++;
8675 static unsigned int ShortBitNot(struct Expression * exp, struct Operand * op1)
8678 exp->__anon1.__anon2.string = PrintShort((short)(~op1->__anon1.s));
8681 exp->expType = op1->type;
8683 op1->type->refCount++;
8688 static unsigned int UShortBitNot(struct Expression * exp, struct Operand * op1)
8691 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(~op1->__anon1.us));
8694 exp->expType = op1->type;
8696 op1->type->refCount++;
8701 static unsigned int CharBitNot(struct Expression * exp, struct Operand * op1)
8704 exp->__anon1.__anon2.string = PrintChar((char)(~op1->__anon1.c));
8707 exp->expType = op1->type;
8709 op1->type->refCount++;
8714 static unsigned int UCharBitNot(struct Expression * exp, struct Operand * op1)
8717 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(~op1->__anon1.uc));
8720 exp->expType = op1->type;
8722 op1->type->refCount++;
8727 static unsigned int IntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8729 int value2 = op2->__anon1.i;
8732 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i &= value2));
8735 exp->expType = op1->type;
8737 op1->type->refCount++;
8742 static unsigned int UIntAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8744 unsigned int value2 = op2->__anon1.ui;
8747 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui &= value2));
8750 exp->expType = op1->type;
8752 op1->type->refCount++;
8757 static unsigned int Int64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8759 long long value2 = op2->__anon1.i64;
8762 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 &= value2));
8765 exp->expType = op1->type;
8767 op1->type->refCount++;
8772 static unsigned int UInt64AndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8774 uint64 value2 = op2->__anon1.ui64;
8777 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 &= value2));
8780 exp->expType = op1->type;
8782 op1->type->refCount++;
8787 static unsigned int ShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8789 short value2 = op2->__anon1.s;
8792 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s &= value2));
8795 exp->expType = op1->type;
8797 op1->type->refCount++;
8802 static unsigned int UShortAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8804 unsigned short value2 = op2->__anon1.us;
8807 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us &= value2));
8810 exp->expType = op1->type;
8812 op1->type->refCount++;
8817 static unsigned int CharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8819 char value2 = op2->__anon1.c;
8822 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c &= value2));
8825 exp->expType = op1->type;
8827 op1->type->refCount++;
8832 static unsigned int UCharAndAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8834 unsigned char value2 = op2->__anon1.uc;
8837 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc &= value2));
8840 exp->expType = op1->type;
8842 op1->type->refCount++;
8847 static unsigned int IntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8849 int value2 = op2->__anon1.i;
8852 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i |= value2));
8855 exp->expType = op1->type;
8857 op1->type->refCount++;
8862 static unsigned int UIntOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8864 unsigned int value2 = op2->__anon1.ui;
8867 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui |= value2));
8870 exp->expType = op1->type;
8872 op1->type->refCount++;
8877 static unsigned int Int64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8879 long long value2 = op2->__anon1.i64;
8882 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 |= value2));
8885 exp->expType = op1->type;
8887 op1->type->refCount++;
8892 static unsigned int UInt64OrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8894 uint64 value2 = op2->__anon1.ui64;
8897 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 |= value2));
8900 exp->expType = op1->type;
8902 op1->type->refCount++;
8907 static unsigned int ShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8909 short value2 = op2->__anon1.s;
8912 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s |= value2));
8915 exp->expType = op1->type;
8917 op1->type->refCount++;
8922 static unsigned int UShortOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8924 unsigned short value2 = op2->__anon1.us;
8927 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us |= value2));
8930 exp->expType = op1->type;
8932 op1->type->refCount++;
8937 static unsigned int CharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8939 char value2 = op2->__anon1.c;
8942 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c |= value2));
8945 exp->expType = op1->type;
8947 op1->type->refCount++;
8952 static unsigned int UCharOrAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8954 unsigned char value2 = op2->__anon1.uc;
8957 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc |= value2));
8960 exp->expType = op1->type;
8962 op1->type->refCount++;
8967 static unsigned int IntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8969 int value2 = op2->__anon1.i;
8972 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i ^= value2));
8975 exp->expType = op1->type;
8977 op1->type->refCount++;
8982 static unsigned int UIntXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8984 unsigned int value2 = op2->__anon1.ui;
8987 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui ^= value2));
8990 exp->expType = op1->type;
8992 op1->type->refCount++;
8997 static unsigned int Int64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
8999 long long value2 = op2->__anon1.i64;
9002 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 ^= value2));
9005 exp->expType = op1->type;
9007 op1->type->refCount++;
9012 static unsigned int UInt64XorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9014 uint64 value2 = op2->__anon1.ui64;
9017 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 ^= value2));
9020 exp->expType = op1->type;
9022 op1->type->refCount++;
9027 static unsigned int ShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9029 short value2 = op2->__anon1.s;
9032 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s ^= value2));
9035 exp->expType = op1->type;
9037 op1->type->refCount++;
9042 static unsigned int UShortXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9044 unsigned short value2 = op2->__anon1.us;
9047 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us ^= value2));
9050 exp->expType = op1->type;
9052 op1->type->refCount++;
9057 static unsigned int CharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9059 char value2 = op2->__anon1.c;
9062 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c ^= value2));
9065 exp->expType = op1->type;
9067 op1->type->refCount++;
9072 static unsigned int UCharXorAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9074 unsigned char value2 = op2->__anon1.uc;
9077 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc ^= value2));
9080 exp->expType = op1->type;
9082 op1->type->refCount++;
9087 static unsigned int IntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9089 int value2 = op2->__anon1.i;
9092 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i <<= value2));
9095 exp->expType = op1->type;
9097 op1->type->refCount++;
9102 static unsigned int UIntLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9104 unsigned int value2 = op2->__anon1.ui;
9107 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui <<= value2));
9110 exp->expType = op1->type;
9112 op1->type->refCount++;
9117 static unsigned int Int64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9119 long long value2 = op2->__anon1.i64;
9122 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 <<= value2));
9125 exp->expType = op1->type;
9127 op1->type->refCount++;
9132 static unsigned int UInt64LShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9134 uint64 value2 = op2->__anon1.ui64;
9137 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 <<= value2));
9140 exp->expType = op1->type;
9142 op1->type->refCount++;
9147 static unsigned int ShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9149 short value2 = op2->__anon1.s;
9152 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s <<= value2));
9155 exp->expType = op1->type;
9157 op1->type->refCount++;
9162 static unsigned int UShortLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9164 unsigned short value2 = op2->__anon1.us;
9167 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us <<= value2));
9170 exp->expType = op1->type;
9172 op1->type->refCount++;
9177 static unsigned int CharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9179 char value2 = op2->__anon1.c;
9182 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c <<= value2));
9185 exp->expType = op1->type;
9187 op1->type->refCount++;
9192 static unsigned int UCharLShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9194 unsigned char value2 = op2->__anon1.uc;
9197 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc <<= value2));
9200 exp->expType = op1->type;
9202 op1->type->refCount++;
9207 static unsigned int IntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9209 int value2 = op2->__anon1.i;
9212 exp->__anon1.__anon2.string = PrintInt((op1->__anon1.i >>= value2));
9215 exp->expType = op1->type;
9217 op1->type->refCount++;
9222 static unsigned int UIntRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9224 unsigned int value2 = op2->__anon1.ui;
9227 exp->__anon1.__anon2.string = PrintUInt((op1->__anon1.ui >>= value2));
9230 exp->expType = op1->type;
9232 op1->type->refCount++;
9237 static unsigned int Int64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9239 long long value2 = op2->__anon1.i64;
9242 exp->__anon1.__anon2.string = PrintInt64((op1->__anon1.i64 >>= value2));
9245 exp->expType = op1->type;
9247 op1->type->refCount++;
9252 static unsigned int UInt64RShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9254 uint64 value2 = op2->__anon1.ui64;
9257 exp->__anon1.__anon2.string = PrintUInt64((op1->__anon1.ui64 >>= value2));
9260 exp->expType = op1->type;
9262 op1->type->refCount++;
9267 static unsigned int ShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9269 short value2 = op2->__anon1.s;
9272 exp->__anon1.__anon2.string = PrintShort((op1->__anon1.s >>= value2));
9275 exp->expType = op1->type;
9277 op1->type->refCount++;
9282 static unsigned int UShortRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9284 unsigned short value2 = op2->__anon1.us;
9287 exp->__anon1.__anon2.string = PrintUShort((op1->__anon1.us >>= value2));
9290 exp->expType = op1->type;
9292 op1->type->refCount++;
9297 static unsigned int CharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9299 char value2 = op2->__anon1.c;
9302 exp->__anon1.__anon2.string = PrintChar((op1->__anon1.c >>= value2));
9305 exp->expType = op1->type;
9307 op1->type->refCount++;
9312 static unsigned int UCharRShiftAsign(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9314 unsigned char value2 = op2->__anon1.uc;
9317 exp->__anon1.__anon2.string = PrintUChar((op1->__anon1.uc >>= value2));
9320 exp->expType = op1->type;
9322 op1->type->refCount++;
9327 static unsigned int IntNot(struct Expression * exp, struct Operand * op1)
9330 exp->__anon1.__anon2.string = PrintInt((int)(!op1->__anon1.i));
9333 exp->expType = op1->type;
9335 op1->type->refCount++;
9340 static unsigned int UIntNot(struct Expression * exp, struct Operand * op1)
9343 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(!op1->__anon1.ui));
9346 exp->expType = op1->type;
9348 op1->type->refCount++;
9353 static unsigned int Int64Not(struct Expression * exp, struct Operand * op1)
9356 exp->__anon1.__anon2.string = PrintInt64((long long)(!op1->__anon1.i64));
9359 exp->expType = op1->type;
9361 op1->type->refCount++;
9366 static unsigned int UInt64Not(struct Expression * exp, struct Operand * op1)
9369 exp->__anon1.__anon2.string = PrintUInt64((uint64)(!op1->__anon1.ui64));
9372 exp->expType = op1->type;
9374 op1->type->refCount++;
9379 static unsigned int ShortNot(struct Expression * exp, struct Operand * op1)
9382 exp->__anon1.__anon2.string = PrintShort((short)(!op1->__anon1.s));
9385 exp->expType = op1->type;
9387 op1->type->refCount++;
9392 static unsigned int UShortNot(struct Expression * exp, struct Operand * op1)
9395 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(!op1->__anon1.us));
9398 exp->expType = op1->type;
9400 op1->type->refCount++;
9405 static unsigned int CharNot(struct Expression * exp, struct Operand * op1)
9408 exp->__anon1.__anon2.string = PrintChar((char)(!op1->__anon1.c));
9411 exp->expType = op1->type;
9413 op1->type->refCount++;
9418 static unsigned int UCharNot(struct Expression * exp, struct Operand * op1)
9421 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(!op1->__anon1.uc));
9424 exp->expType = op1->type;
9426 op1->type->refCount++;
9431 static unsigned int IntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9433 int value2 = op2->__anon1.i;
9436 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i == value2));
9439 exp->expType = op1->type;
9441 op1->type->refCount++;
9446 static unsigned int UIntEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9448 unsigned int value2 = op2->__anon1.ui;
9451 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui == value2));
9454 exp->expType = op1->type;
9456 op1->type->refCount++;
9461 static unsigned int Int64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9463 long long value2 = op2->__anon1.i64;
9466 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 == value2));
9469 exp->expType = op1->type;
9471 op1->type->refCount++;
9476 static unsigned int UInt64Equ(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9478 uint64 value2 = op2->__anon1.ui64;
9481 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 == value2));
9484 exp->expType = op1->type;
9486 op1->type->refCount++;
9491 static unsigned int ShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9493 short value2 = op2->__anon1.s;
9496 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s == value2));
9499 exp->expType = op1->type;
9501 op1->type->refCount++;
9506 static unsigned int UShortEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9508 unsigned short value2 = op2->__anon1.us;
9511 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us == value2));
9514 exp->expType = op1->type;
9516 op1->type->refCount++;
9521 static unsigned int CharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9523 char value2 = op2->__anon1.c;
9526 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c == value2));
9529 exp->expType = op1->type;
9531 op1->type->refCount++;
9536 static unsigned int UCharEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9538 unsigned char value2 = op2->__anon1.uc;
9541 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc == value2));
9544 exp->expType = op1->type;
9546 op1->type->refCount++;
9551 static unsigned int FloatEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9553 float value2 = op2->__anon1.f;
9556 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f == value2));
9559 exp->expType = op1->type;
9561 op1->type->refCount++;
9566 static unsigned int DoubleEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9568 double value2 = op2->__anon1.d;
9571 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d == value2));
9574 exp->expType = op1->type;
9576 op1->type->refCount++;
9581 static unsigned int IntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9583 int value2 = op2->__anon1.i;
9586 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i != value2));
9589 exp->expType = op1->type;
9591 op1->type->refCount++;
9596 static unsigned int UIntNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9598 unsigned int value2 = op2->__anon1.ui;
9601 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui != value2));
9604 exp->expType = op1->type;
9606 op1->type->refCount++;
9611 static unsigned int Int64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9613 long long value2 = op2->__anon1.i64;
9616 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 != value2));
9619 exp->expType = op1->type;
9621 op1->type->refCount++;
9626 static unsigned int UInt64Nqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9628 uint64 value2 = op2->__anon1.ui64;
9631 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 != value2));
9634 exp->expType = op1->type;
9636 op1->type->refCount++;
9641 static unsigned int ShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9643 short value2 = op2->__anon1.s;
9646 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s != value2));
9649 exp->expType = op1->type;
9651 op1->type->refCount++;
9656 static unsigned int UShortNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9658 unsigned short value2 = op2->__anon1.us;
9661 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us != value2));
9664 exp->expType = op1->type;
9666 op1->type->refCount++;
9671 static unsigned int CharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9673 char value2 = op2->__anon1.c;
9676 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c != value2));
9679 exp->expType = op1->type;
9681 op1->type->refCount++;
9686 static unsigned int UCharNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9688 unsigned char value2 = op2->__anon1.uc;
9691 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc != value2));
9694 exp->expType = op1->type;
9696 op1->type->refCount++;
9701 static unsigned int FloatNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9703 float value2 = op2->__anon1.f;
9706 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f != value2));
9709 exp->expType = op1->type;
9711 op1->type->refCount++;
9716 static unsigned int DoubleNqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9718 double value2 = op2->__anon1.d;
9721 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d != value2));
9724 exp->expType = op1->type;
9726 op1->type->refCount++;
9731 static unsigned int IntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9733 int value2 = op2->__anon1.i;
9736 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i && value2));
9739 exp->expType = op1->type;
9741 op1->type->refCount++;
9746 static unsigned int UIntAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9748 unsigned int value2 = op2->__anon1.ui;
9751 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui && value2));
9754 exp->expType = op1->type;
9756 op1->type->refCount++;
9761 static unsigned int Int64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9763 long long value2 = op2->__anon1.i64;
9766 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 && value2));
9769 exp->expType = op1->type;
9771 op1->type->refCount++;
9776 static unsigned int UInt64And(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9778 uint64 value2 = op2->__anon1.ui64;
9781 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 && value2));
9784 exp->expType = op1->type;
9786 op1->type->refCount++;
9791 static unsigned int ShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9793 short value2 = op2->__anon1.s;
9796 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s && value2));
9799 exp->expType = op1->type;
9801 op1->type->refCount++;
9806 static unsigned int UShortAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9808 unsigned short value2 = op2->__anon1.us;
9811 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us && value2));
9814 exp->expType = op1->type;
9816 op1->type->refCount++;
9821 static unsigned int CharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9823 char value2 = op2->__anon1.c;
9826 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c && value2));
9829 exp->expType = op1->type;
9831 op1->type->refCount++;
9836 static unsigned int UCharAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9838 unsigned char value2 = op2->__anon1.uc;
9841 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc && value2));
9844 exp->expType = op1->type;
9846 op1->type->refCount++;
9851 static unsigned int FloatAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9853 float value2 = op2->__anon1.f;
9856 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f && value2));
9859 exp->expType = op1->type;
9861 op1->type->refCount++;
9866 static unsigned int DoubleAnd(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9868 double value2 = op2->__anon1.d;
9871 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d && value2));
9874 exp->expType = op1->type;
9876 op1->type->refCount++;
9881 static unsigned int IntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9883 int value2 = op2->__anon1.i;
9886 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i || value2));
9889 exp->expType = op1->type;
9891 op1->type->refCount++;
9896 static unsigned int UIntOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9898 unsigned int value2 = op2->__anon1.ui;
9901 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui || value2));
9904 exp->expType = op1->type;
9906 op1->type->refCount++;
9911 static unsigned int Int64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9913 long long value2 = op2->__anon1.i64;
9916 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 || value2));
9919 exp->expType = op1->type;
9921 op1->type->refCount++;
9926 static unsigned int UInt64Or(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9928 uint64 value2 = op2->__anon1.ui64;
9931 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 || value2));
9934 exp->expType = op1->type;
9936 op1->type->refCount++;
9941 static unsigned int ShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9943 short value2 = op2->__anon1.s;
9946 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s || value2));
9949 exp->expType = op1->type;
9951 op1->type->refCount++;
9956 static unsigned int UShortOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9958 unsigned short value2 = op2->__anon1.us;
9961 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us || value2));
9964 exp->expType = op1->type;
9966 op1->type->refCount++;
9971 static unsigned int CharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9973 char value2 = op2->__anon1.c;
9976 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c || value2));
9979 exp->expType = op1->type;
9981 op1->type->refCount++;
9986 static unsigned int UCharOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
9988 unsigned char value2 = op2->__anon1.uc;
9991 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc || value2));
9994 exp->expType = op1->type;
9996 op1->type->refCount++;
10001 static unsigned int FloatOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10003 float value2 = op2->__anon1.f;
10006 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f || value2));
10009 exp->expType = op1->type;
10011 op1->type->refCount++;
10016 static unsigned int DoubleOr(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10018 double value2 = op2->__anon1.d;
10021 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d || value2));
10024 exp->expType = op1->type;
10026 op1->type->refCount++;
10031 static unsigned int IntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10033 int value2 = op2->__anon1.i;
10036 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i > value2));
10039 exp->expType = op1->type;
10041 op1->type->refCount++;
10046 static unsigned int UIntGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10048 unsigned int value2 = op2->__anon1.ui;
10051 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui > value2));
10054 exp->expType = op1->type;
10056 op1->type->refCount++;
10061 static unsigned int Int64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10063 long long value2 = op2->__anon1.i64;
10066 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 > value2));
10069 exp->expType = op1->type;
10071 op1->type->refCount++;
10076 static unsigned int UInt64Grt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10078 uint64 value2 = op2->__anon1.ui64;
10081 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 > value2));
10084 exp->expType = op1->type;
10086 op1->type->refCount++;
10091 static unsigned int ShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10093 short value2 = op2->__anon1.s;
10096 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s > value2));
10099 exp->expType = op1->type;
10101 op1->type->refCount++;
10106 static unsigned int UShortGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10108 unsigned short value2 = op2->__anon1.us;
10111 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us > value2));
10114 exp->expType = op1->type;
10116 op1->type->refCount++;
10121 static unsigned int CharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10123 char value2 = op2->__anon1.c;
10126 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c > value2));
10129 exp->expType = op1->type;
10131 op1->type->refCount++;
10136 static unsigned int UCharGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10138 unsigned char value2 = op2->__anon1.uc;
10141 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc > value2));
10144 exp->expType = op1->type;
10146 op1->type->refCount++;
10151 static unsigned int FloatGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10153 float value2 = op2->__anon1.f;
10156 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f > value2));
10159 exp->expType = op1->type;
10161 op1->type->refCount++;
10166 static unsigned int DoubleGrt(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10168 double value2 = op2->__anon1.d;
10171 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d > value2));
10174 exp->expType = op1->type;
10176 op1->type->refCount++;
10181 static unsigned int IntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10183 int value2 = op2->__anon1.i;
10186 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i < value2));
10189 exp->expType = op1->type;
10191 op1->type->refCount++;
10196 static unsigned int UIntSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10198 unsigned int value2 = op2->__anon1.ui;
10201 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui < value2));
10204 exp->expType = op1->type;
10206 op1->type->refCount++;
10211 static unsigned int Int64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10213 long long value2 = op2->__anon1.i64;
10216 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 < value2));
10219 exp->expType = op1->type;
10221 op1->type->refCount++;
10226 static unsigned int UInt64Sma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10228 uint64 value2 = op2->__anon1.ui64;
10231 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 < value2));
10234 exp->expType = op1->type;
10236 op1->type->refCount++;
10241 static unsigned int ShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10243 short value2 = op2->__anon1.s;
10246 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s < value2));
10249 exp->expType = op1->type;
10251 op1->type->refCount++;
10256 static unsigned int UShortSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10258 unsigned short value2 = op2->__anon1.us;
10261 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us < value2));
10264 exp->expType = op1->type;
10266 op1->type->refCount++;
10271 static unsigned int CharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10273 char value2 = op2->__anon1.c;
10276 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c < value2));
10279 exp->expType = op1->type;
10281 op1->type->refCount++;
10286 static unsigned int UCharSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10288 unsigned char value2 = op2->__anon1.uc;
10291 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc < value2));
10294 exp->expType = op1->type;
10296 op1->type->refCount++;
10301 static unsigned int FloatSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10303 float value2 = op2->__anon1.f;
10306 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f < value2));
10309 exp->expType = op1->type;
10311 op1->type->refCount++;
10316 static unsigned int DoubleSma(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10318 double value2 = op2->__anon1.d;
10321 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d < value2));
10324 exp->expType = op1->type;
10326 op1->type->refCount++;
10331 static unsigned int IntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10333 int value2 = op2->__anon1.i;
10336 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i >= value2));
10339 exp->expType = op1->type;
10341 op1->type->refCount++;
10346 static unsigned int UIntGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10348 unsigned int value2 = op2->__anon1.ui;
10351 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui >= value2));
10354 exp->expType = op1->type;
10356 op1->type->refCount++;
10361 static unsigned int Int64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10363 long long value2 = op2->__anon1.i64;
10366 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 >= value2));
10369 exp->expType = op1->type;
10371 op1->type->refCount++;
10376 static unsigned int UInt64GrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10378 uint64 value2 = op2->__anon1.ui64;
10381 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 >= value2));
10384 exp->expType = op1->type;
10386 op1->type->refCount++;
10391 static unsigned int ShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10393 short value2 = op2->__anon1.s;
10396 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s >= value2));
10399 exp->expType = op1->type;
10401 op1->type->refCount++;
10406 static unsigned int UShortGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10408 unsigned short value2 = op2->__anon1.us;
10411 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us >= value2));
10414 exp->expType = op1->type;
10416 op1->type->refCount++;
10421 static unsigned int CharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10423 char value2 = op2->__anon1.c;
10426 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c >= value2));
10429 exp->expType = op1->type;
10431 op1->type->refCount++;
10436 static unsigned int UCharGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10438 unsigned char value2 = op2->__anon1.uc;
10441 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc >= value2));
10444 exp->expType = op1->type;
10446 op1->type->refCount++;
10451 static unsigned int FloatGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10453 float value2 = op2->__anon1.f;
10456 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f >= value2));
10459 exp->expType = op1->type;
10461 op1->type->refCount++;
10466 static unsigned int DoubleGrtEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10468 double value2 = op2->__anon1.d;
10471 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d >= value2));
10474 exp->expType = op1->type;
10476 op1->type->refCount++;
10481 static unsigned int IntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10483 int value2 = op2->__anon1.i;
10486 exp->__anon1.__anon2.string = PrintInt((int)(op1->__anon1.i <= value2));
10489 exp->expType = op1->type;
10491 op1->type->refCount++;
10496 static unsigned int UIntSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10498 unsigned int value2 = op2->__anon1.ui;
10501 exp->__anon1.__anon2.string = PrintUInt((unsigned int)(op1->__anon1.ui <= value2));
10504 exp->expType = op1->type;
10506 op1->type->refCount++;
10511 static unsigned int Int64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10513 long long value2 = op2->__anon1.i64;
10516 exp->__anon1.__anon2.string = PrintInt64((long long)(op1->__anon1.i64 <= value2));
10519 exp->expType = op1->type;
10521 op1->type->refCount++;
10526 static unsigned int UInt64SmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10528 uint64 value2 = op2->__anon1.ui64;
10531 exp->__anon1.__anon2.string = PrintUInt64((uint64)(op1->__anon1.ui64 <= value2));
10534 exp->expType = op1->type;
10536 op1->type->refCount++;
10541 static unsigned int ShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10543 short value2 = op2->__anon1.s;
10546 exp->__anon1.__anon2.string = PrintShort((short)(op1->__anon1.s <= value2));
10549 exp->expType = op1->type;
10551 op1->type->refCount++;
10556 static unsigned int UShortSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10558 unsigned short value2 = op2->__anon1.us;
10561 exp->__anon1.__anon2.string = PrintUShort((unsigned short)(op1->__anon1.us <= value2));
10564 exp->expType = op1->type;
10566 op1->type->refCount++;
10571 static unsigned int CharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10573 char value2 = op2->__anon1.c;
10576 exp->__anon1.__anon2.string = PrintChar((char)(op1->__anon1.c <= value2));
10579 exp->expType = op1->type;
10581 op1->type->refCount++;
10586 static unsigned int UCharSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10588 unsigned char value2 = op2->__anon1.uc;
10591 exp->__anon1.__anon2.string = PrintUChar((unsigned char)(op1->__anon1.uc <= value2));
10594 exp->expType = op1->type;
10596 op1->type->refCount++;
10601 static unsigned int FloatSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10603 float value2 = op2->__anon1.f;
10606 exp->__anon1.__anon2.string = PrintFloat((float)(op1->__anon1.f <= value2));
10609 exp->expType = op1->type;
10611 op1->type->refCount++;
10616 static unsigned int DoubleSmaEqu(struct Expression * exp, struct Operand * op1, struct Operand * op2)
10618 double value2 = op2->__anon1.d;
10621 exp->__anon1.__anon2.string = PrintDouble((double)(op1->__anon1.d <= value2));
10624 exp->expType = op1->type;
10626 op1->type->refCount++;
10631 static unsigned int IntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10634 exp->__anon1.__anon2.string = PrintInt(op1->__anon1.i ? op2->__anon1.i : op3->__anon1.i);
10637 exp->expType = op1->type;
10639 op1->type->refCount++;
10644 static unsigned int UIntCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10647 exp->__anon1.__anon2.string = PrintUInt(op1->__anon1.ui ? op2->__anon1.ui : op3->__anon1.ui);
10650 exp->expType = op1->type;
10652 op1->type->refCount++;
10657 static unsigned int Int64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10660 exp->__anon1.__anon2.string = PrintInt64(op1->__anon1.i64 ? op2->__anon1.i64 : op3->__anon1.i64);
10663 exp->expType = op1->type;
10665 op1->type->refCount++;
10670 static unsigned int UInt64Cond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10673 exp->__anon1.__anon2.string = PrintUInt64(op1->__anon1.ui64 ? op2->__anon1.ui64 : op3->__anon1.ui64);
10676 exp->expType = op1->type;
10678 op1->type->refCount++;
10683 static unsigned int ShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10686 exp->__anon1.__anon2.string = PrintShort(op1->__anon1.s ? op2->__anon1.s : op3->__anon1.s);
10689 exp->expType = op1->type;
10691 op1->type->refCount++;
10696 static unsigned int UShortCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10699 exp->__anon1.__anon2.string = PrintUShort(op1->__anon1.us ? op2->__anon1.us : op3->__anon1.us);
10702 exp->expType = op1->type;
10704 op1->type->refCount++;
10709 static unsigned int CharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10712 exp->__anon1.__anon2.string = PrintChar(op1->__anon1.c ? op2->__anon1.c : op3->__anon1.c);
10715 exp->expType = op1->type;
10717 op1->type->refCount++;
10722 static unsigned int UCharCond(struct Expression * exp, struct Operand * op1, struct Operand * op2, struct Operand * op3)
10725 exp->__anon1.__anon2.string = PrintUChar(op1->__anon1.uc ? op2->__anon1.uc : op3->__anon1.uc);
10728 exp->expType = op1->type;
10730 op1->type->refCount++;
10735 struct OpTable intOps =
10737 (void *)(IntAdd), (void *)(IntSub), (void *)(IntMul), (void *)(IntDiv), (void *)(IntMod), (void *)(IntNeg), (void *)(IntInc), (void *)(IntDec), (void *)(IntAsign), (void *)(IntAddAsign), (void *)(IntSubAsign), (void *)(IntMulAsign), (void *)(IntDivAsign), (void *)(IntModAsign), (void *)(IntBitAnd), (void *)(IntBitOr), (void *)(IntBitXor), (void *)(IntLShift), (void *)(IntRShift), (void *)(IntBitNot), (void *)(IntAndAsign), (void *)(IntOrAsign), (void *)(IntXorAsign), (void *)(IntLShiftAsign), (void *)(IntRShiftAsign), (void *)(IntNot), (void *)(IntEqu), (void *)(IntNqu), (void *)(IntAnd), (void *)(IntOr), (void *)(IntGrt), (void *)(IntSma), (void *)(IntGrtEqu), (void *)(IntSmaEqu), (void *)(IntCond)
10740 struct OpTable uintOps =
10742 (void *)(UIntAdd), (void *)(UIntSub), (void *)(UIntMul), (void *)(UIntDiv), (void *)(UIntMod), (void *)(UIntNeg), (void *)(UIntInc), (void *)(UIntDec), (void *)(UIntAsign), (void *)(UIntAddAsign), (void *)(UIntSubAsign), (void *)(UIntMulAsign), (void *)(UIntDivAsign), (void *)(UIntModAsign), (void *)(UIntBitAnd), (void *)(UIntBitOr), (void *)(UIntBitXor), (void *)(UIntLShift), (void *)(UIntRShift), (void *)(UIntBitNot), (void *)(UIntAndAsign), (void *)(UIntOrAsign), (void *)(UIntXorAsign), (void *)(UIntLShiftAsign), (void *)(UIntRShiftAsign), (void *)(UIntNot), (void *)(UIntEqu), (void *)(UIntNqu), (void *)(UIntAnd), (void *)(UIntOr), (void *)(UIntGrt), (void *)(UIntSma), (void *)(UIntGrtEqu), (void *)(UIntSmaEqu), (void *)(UIntCond)
10745 struct OpTable int64Ops =
10747 (void *)(Int64Add), (void *)(Int64Sub), (void *)(Int64Mul), (void *)(Int64Div), (void *)(Int64Mod), (void *)(Int64Neg), (void *)(Int64Inc), (void *)(Int64Dec), (void *)(Int64Asign), (void *)(Int64AddAsign), (void *)(Int64SubAsign), (void *)(Int64MulAsign), (void *)(Int64DivAsign), (void *)(Int64ModAsign), (void *)(Int64BitAnd), (void *)(Int64BitOr), (void *)(Int64BitXor), (void *)(Int64LShift), (void *)(Int64RShift), (void *)(Int64BitNot), (void *)(Int64AndAsign), (void *)(Int64OrAsign), (void *)(Int64XorAsign), (void *)(Int64LShiftAsign), (void *)(Int64RShiftAsign), (void *)(Int64Not), (void *)(Int64Equ), (void *)(Int64Nqu), (void *)(Int64And), (void *)(Int64Or), (void *)(Int64Grt), (void *)(Int64Sma), (void *)(Int64GrtEqu), (void *)(Int64SmaEqu), (void *)(Int64Cond)
10750 struct OpTable uint64Ops =
10752 (void *)(UInt64Add), (void *)(UInt64Sub), (void *)(UInt64Mul), (void *)(UInt64Div), (void *)(UInt64Mod), (void *)(UInt64Neg), (void *)(UInt64Inc), (void *)(UInt64Dec), (void *)(UInt64Asign), (void *)(UInt64AddAsign), (void *)(UInt64SubAsign), (void *)(UInt64MulAsign), (void *)(UInt64DivAsign), (void *)(UInt64ModAsign), (void *)(UInt64BitAnd), (void *)(UInt64BitOr), (void *)(UInt64BitXor), (void *)(UInt64LShift), (void *)(UInt64RShift), (void *)(UInt64BitNot), (void *)(UInt64AndAsign), (void *)(UInt64OrAsign), (void *)(UInt64XorAsign), (void *)(UInt64LShiftAsign), (void *)(UInt64RShiftAsign), (void *)(UInt64Not), (void *)(UInt64Equ), (void *)(UInt64Nqu), (void *)(UInt64And), (void *)(UInt64Or), (void *)(UInt64Grt), (void *)(UInt64Sma), (void *)(UInt64GrtEqu), (void *)(UInt64SmaEqu), (void *)(UInt64Cond)
10755 struct OpTable shortOps =
10757 (void *)(ShortAdd), (void *)(ShortSub), (void *)(ShortMul), (void *)(ShortDiv), (void *)(ShortMod), (void *)(ShortNeg), (void *)(ShortInc), (void *)(ShortDec), (void *)(ShortAsign), (void *)(ShortAddAsign), (void *)(ShortSubAsign), (void *)(ShortMulAsign), (void *)(ShortDivAsign), (void *)(ShortModAsign), (void *)(ShortBitAnd), (void *)(ShortBitOr), (void *)(ShortBitXor), (void *)(ShortLShift), (void *)(ShortRShift), (void *)(ShortBitNot), (void *)(ShortAndAsign), (void *)(ShortOrAsign), (void *)(ShortXorAsign), (void *)(ShortLShiftAsign), (void *)(ShortRShiftAsign), (void *)(ShortNot), (void *)(ShortEqu), (void *)(ShortNqu), (void *)(ShortAnd), (void *)(ShortOr), (void *)(ShortGrt), (void *)(ShortSma), (void *)(ShortGrtEqu), (void *)(ShortSmaEqu), (void *)(ShortCond)
10760 struct OpTable ushortOps =
10762 (void *)(UShortAdd), (void *)(UShortSub), (void *)(UShortMul), (void *)(UShortDiv), (void *)(UShortMod), (void *)(UShortNeg), (void *)(UShortInc), (void *)(UShortDec), (void *)(UShortAsign), (void *)(UShortAddAsign), (void *)(UShortSubAsign), (void *)(UShortMulAsign), (void *)(UShortDivAsign), (void *)(UShortModAsign), (void *)(UShortBitAnd), (void *)(UShortBitOr), (void *)(UShortBitXor), (void *)(UShortLShift), (void *)(UShortRShift), (void *)(UShortBitNot), (void *)(UShortAndAsign), (void *)(UShortOrAsign), (void *)(UShortXorAsign), (void *)(UShortLShiftAsign), (void *)(UShortRShiftAsign), (void *)(UShortNot), (void *)(UShortEqu), (void *)(UShortNqu), (void *)(UShortAnd), (void *)(UShortOr), (void *)(UShortGrt), (void *)(UShortSma), (void *)(UShortGrtEqu), (void *)(UShortSmaEqu), (void *)(UShortCond)
10765 struct OpTable floatOps =
10767 (void *)(FloatAdd), (void *)(FloatSub), (void *)(FloatMul), (void *)(FloatDiv), (((void *)0)), (void *)(FloatNeg), (void *)(FloatInc), (void *)(FloatDec), (void *)(FloatAsign), (void *)(FloatAddAsign), (void *)(FloatSubAsign), (void *)(FloatMulAsign), (void *)(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)), (void *)(FloatEqu), (void *)(FloatNqu), (void *)(FloatAnd), (void *)(FloatOr), (void *)(FloatGrt), (void *)(FloatSma), (void *)(FloatGrtEqu), (void *)(FloatSmaEqu)
10770 struct OpTable doubleOps =
10772 (void *)(DoubleAdd), (void *)(DoubleSub), (void *)(DoubleMul), (void *)(DoubleDiv), (((void *)0)), (void *)(DoubleNeg), (void *)(DoubleInc), (void *)(DoubleDec), (void *)(DoubleAsign), (void *)(DoubleAddAsign), (void *)(DoubleSubAsign), (void *)(DoubleMulAsign), (void *)(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)), (void *)(DoubleEqu), (void *)(DoubleNqu), (void *)(DoubleAnd), (void *)(DoubleOr), (void *)(DoubleGrt), (void *)(DoubleSma), (void *)(DoubleGrtEqu), (void *)(DoubleSmaEqu)
10775 struct OpTable charOps =
10777 (void *)(CharAdd), (void *)(CharSub), (void *)(CharMul), (void *)(CharDiv), (void *)(CharMod), (void *)(CharNeg), (void *)(CharInc), (void *)(CharDec), (void *)(CharAsign), (void *)(CharAddAsign), (void *)(CharSubAsign), (void *)(CharMulAsign), (void *)(CharDivAsign), (void *)(CharModAsign), (void *)(CharBitAnd), (void *)(CharBitOr), (void *)(CharBitXor), (void *)(CharLShift), (void *)(CharRShift), (void *)(CharBitNot), (void *)(CharAndAsign), (void *)(CharOrAsign), (void *)(CharXorAsign), (void *)(CharLShiftAsign), (void *)(CharRShiftAsign), (void *)(CharNot), (void *)(CharEqu), (void *)(CharNqu), (void *)(CharAnd), (void *)(CharOr), (void *)(CharGrt), (void *)(CharSma), (void *)(CharGrtEqu), (void *)(CharSmaEqu), (void *)(CharCond)
10780 struct OpTable ucharOps =
10782 (void *)(UCharAdd), (void *)(UCharSub), (void *)(UCharMul), (void *)(UCharDiv), (void *)(UCharMod), (void *)(UCharNeg), (void *)(UCharInc), (void *)(UCharDec), (void *)(UCharAsign), (void *)(UCharAddAsign), (void *)(UCharSubAsign), (void *)(UCharMulAsign), (void *)(UCharDivAsign), (void *)(UCharModAsign), (void *)(UCharBitAnd), (void *)(UCharBitOr), (void *)(UCharBitXor), (void *)(UCharLShift), (void *)(UCharRShift), (void *)(UCharBitNot), (void *)(UCharAndAsign), (void *)(UCharOrAsign), (void *)(UCharXorAsign), (void *)(UCharLShiftAsign), (void *)(UCharRShiftAsign), (void *)(UCharNot), (void *)(UCharEqu), (void *)(UCharNqu), (void *)(UCharAnd), (void *)(UCharOr), (void *)(UCharGrt), (void *)(UCharSma), (void *)(UCharGrtEqu), (void *)(UCharSmaEqu), (void *)(UCharCond)
10785 void ReadString(char * output, char * string)
10787 int len = strlen(string);
10789 unsigned int quoted = 0, escaped = 0;
10791 for(c = 0; c < len; c++)
10793 char ch = string[c];
10851 int UnescapeString(char * d, char * s, int len)
10856 while(j < len && (ch = s[j]))
10861 switch((ch = s[++j]))
10907 char * OffsetEscapedString(char * s, int len, int offset)
10912 while(j < len && k < offset && (ch = s[j]))
10918 return (k == offset) ? s + j : (((void *)0));
10921 extern long long __ecereNameSpace__ecere__com___strtoi64(const char * string, const char * * endString, int base);
10923 extern uint64 __ecereNameSpace__ecere__com___strtoui64(const char * string, const char * * endString, int base);
10925 extern double strtod(const char * , char * * );
10927 extern float (* __ecereMethod_float_inf)(void);
10929 extern float (* __ecereMethod_float_nan)(void);
10931 extern double (* __ecereMethod_double_inf)(void);
10933 extern double (* __ecereMethod_double_nan)(void);
10935 struct Operand GetOperand(struct Expression * exp)
10937 struct Operand op =
10944 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
10947 struct Type * type = exp->expType;
10951 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))
10953 if(!type->__anon1._class->__anon1.registered->dataType)
10954 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
10955 type = type->__anon1._class->__anon1.registered->dataType;
10957 if(exp->type == 3 && op.kind == 13)
10959 op.__anon1.ui64 = (uint64)(uintptr_t)exp->__anon1.__anon2.string;
10961 op.ops = uint64Ops;
10963 else if(exp->isConstant && exp->type == 2)
10965 op.kind = type->kind;
10972 if(exp->__anon1.__anon1.constant[0] == '\'')
10974 op.__anon1.c = exp->__anon1.__anon1.constant[1];
10977 else if(type->isSigned)
10979 op.__anon1.c = (char)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10984 op.__anon1.uc = (unsigned char)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10992 op.__anon1.s = (short)strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10997 op.__anon1.us = (unsigned short)strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
10998 op.ops = ushortOps;
11005 op.__anon1.i = strtol(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11010 op.__anon1.ui = strtoul(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11018 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11023 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11024 op.ops = uint64Ops;
11031 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11036 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11037 op.ops = uint64Ops;
11044 op.__anon1.i64 = __ecereNameSpace__ecere__com___strtoi64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11049 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11050 op.ops = uint64Ops;
11055 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11056 op.__anon1.f = __ecereMethod_float_inf();
11057 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11058 op.__anon1.f = -__ecereMethod_float_inf();
11059 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11060 op.__anon1.f = __ecereMethod_float_nan();
11061 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11062 op.__anon1.f = -__ecereMethod_float_nan();
11064 op.__anon1.f = (float)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11068 if(!strcmp(exp->__anon1.__anon1.constant, "inf"))
11069 op.__anon1.d = __ecereMethod_double_inf();
11070 else if(!strcmp(exp->__anon1.__anon1.constant, "-inf"))
11071 op.__anon1.d = -__ecereMethod_double_inf();
11072 else if(!strcmp(exp->__anon1.__anon1.constant, "nan"))
11073 op.__anon1.d = __ecereMethod_double_nan();
11074 else if(!strcmp(exp->__anon1.__anon1.constant, "-nan"))
11075 op.__anon1.d = -__ecereMethod_double_nan();
11077 op.__anon1.d = (double)strtod(exp->__anon1.__anon1.constant, (((void *)0)));
11078 op.ops = doubleOps;
11083 op.__anon1.ui64 = __ecereNameSpace__ecere__com___strtoui64(exp->__anon1.__anon1.constant, (((void *)0)), 0);
11085 op.ops = uint64Ops;
11093 static long long GetEnumValue(struct __ecereNameSpace__ecere__com__Class * _class, void * ptr)
11097 switch(_class->typeSize)
11100 if(!strcmp(_class->dataTypeString, "uint64"))
11101 v = (long long)*(uint64 *)ptr;
11103 v = *(long long *)ptr;
11106 if(!strcmp(_class->dataTypeString, "uint"))
11107 v = (long long)*(unsigned int *)ptr;
11109 v = (long long)*(int *)ptr;
11112 if(!strcmp(_class->dataTypeString, "uint16"))
11113 v = (long long)*(unsigned short *)ptr;
11115 v = (long long)*(short *)ptr;
11118 if(!strcmp(_class->dataTypeString, "byte"))
11119 v = (long long)*(unsigned char *)ptr;
11121 v = (long long)*(char *)ptr;
11127 int __ecereVMethodID_class_OnGetString;
11129 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_int;
11131 static __attribute__((unused)) void UnusedFunction()
11135 ((const char * (*)(struct __ecereNameSpace__ecere__com__Class *, const void *, char * tempString, void * fieldData, unsigned int * needClass))__ecereClass_int->_vTbl[__ecereVMethodID_class_OnGetString])(__ecereClass_int, (void *)&a, 0, 0, 0);
11138 extern int __ecereVMethodID_class_OnGetString;
11140 static void PopulateInstanceProcessMember(struct Instantiation * inst, struct __ecereNameSpace__ecere__sys__OldList * memberList, struct __ecereNameSpace__ecere__com__DataMember * parentDataMember, unsigned int offset)
11142 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11144 for(dataMember = parentDataMember->members.first; dataMember; dataMember = dataMember->next)
11146 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11147 PopulateInstanceProcessMember(inst, memberList, dataMember, offset + dataMember->offset);
11150 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11151 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11152 struct Type * type;
11153 void * ptr = inst->data + dataMember->offset + offset;
11154 char * result = (((void *)0));
11156 exp->loc = member->loc = inst->loc;
11157 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11158 if(!dataMember->dataType)
11159 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11160 type = dataMember->dataType;
11161 if(type->kind == 8)
11163 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11165 if(_class->type == 4)
11167 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11171 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11172 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
11174 for(item = e->values.first; item; item = item->next)
11176 if(item->data == GetEnumValue(_class, ptr))
11178 result = item->name;
11184 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11186 exp->destType = MkClassType(_class->fullName);
11187 ProcessExpressionType(exp);
11191 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11193 if(!_class->dataType)
11194 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11195 type = _class->dataType;
11204 FreeExpContents(exp);
11205 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11211 FreeExpContents(exp);
11212 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11218 FreeExpContents(exp);
11219 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11225 FreeExpContents(exp);
11226 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11232 FreeExpContents(exp);
11233 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11239 FreeExpContents(exp);
11240 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11245 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11248 ListAdd(memberList, member);
11250 if(parentDataMember->type == 1)
11255 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
11257 void PopulateInstance(struct Instantiation * inst)
11259 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
11260 struct __ecereNameSpace__ecere__com__Class * _class = classSym->__anon1.registered;
11261 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
11262 struct __ecereNameSpace__ecere__sys__OldList * memberList = MkList();
11265 inst->members = MkListOne(MkMembersInitList(memberList));
11267 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*inst->members), MkMembersInitList(memberList));
11268 for(dataMember = _class->membersAndProperties.first; dataMember; dataMember = dataMember->next)
11270 if(!dataMember->isProperty)
11272 if(!dataMember->name && (dataMember->type == 2 || dataMember->type == 1))
11273 PopulateInstanceProcessMember(inst, memberList, dataMember, dataMember->offset);
11276 struct Expression * exp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
11277 struct MemberInit * member = MkMemberInit(MkListOne(MkIdentifier(dataMember->name)), MkInitializerAssignment(exp));
11278 struct Type * type;
11279 void * ptr = inst->data + dataMember->offset;
11280 char * result = (((void *)0));
11282 exp->loc = member->loc = inst->loc;
11283 ((struct Identifier *)(*member->identifiers).first)->loc = inst->loc;
11284 if(!dataMember->dataType)
11285 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11286 type = dataMember->dataType;
11287 if(type->kind == 8)
11289 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11291 if(_class->type == 4)
11293 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
11297 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
11298 struct __ecereNameSpace__ecere__sys__NamedLink64 * item;
11300 for(item = e->values.first; item; item = item->next)
11302 if(item->data == GetEnumValue(_class, ptr))
11304 result = item->name;
11311 exp->__anon1.__anon1.identifier = MkIdentifier(result);
11313 exp->destType = MkClassType(_class->fullName);
11314 ProcessExpressionType(exp);
11317 if(_class->type == 4 || _class->type == 3 || _class->type == 2)
11319 if(!_class->dataType)
11320 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11321 type = _class->dataType;
11330 exp->__anon1.__anon1.constant = PrintFloat(*(float *)ptr);
11336 exp->__anon1.__anon1.constant = PrintDouble(*(double *)ptr);
11342 exp->__anon1.__anon1.constant = PrintInt(*(int *)ptr);
11348 exp->__anon1.__anon1.constant = PrintInt64(*(long long *)ptr);
11354 exp->__anon1.__anon1.constant = PrintInt64((long long)*(intptr_t *)ptr);
11359 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unhandled type populating instance\n", (((void *)0))));
11362 ListAdd(memberList, member);
11368 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);
11370 extern void FreeInstance(struct Instantiation * inst);
11372 void ComputeInstantiation(struct Expression * exp)
11374 struct Instantiation * inst = exp->__anon1.instance;
11375 struct MembersInit * members;
11376 struct Symbol * classSym = inst->_class ? inst->_class->__anon1.__anon1.symbol : (((void *)0));
11377 struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->__anon1.registered : (((void *)0));
11378 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
11379 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
11380 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
11381 int subMemberStackPos = 0;
11384 if(_class && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11388 if(_class->type == 0 || _class->type == 5)
11390 inst->data = (unsigned char *)__ecereNameSpace__ecere__com__eInstance_New(_class);
11391 if(_class->type == 0)
11392 ((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)inst->data))->_refCount++;
11395 inst->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
11399 for(members = (*inst->members).first; members; members = members->next)
11401 switch(members->type)
11405 if(members->__anon1.dataMembers)
11407 struct MemberInit * member;
11409 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
11411 struct Identifier * ident = member->identifiers ? (*member->identifiers).first : (((void *)0));
11412 unsigned int found = 0;
11413 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
11414 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
11415 unsigned int dataMemberOffset;
11419 __ecereNameSpace__ecere__com__eClass_FindNextMember(_class, &curClass, &curMember, subMemberStack, &subMemberStackPos);
11422 if(curMember->isProperty)
11423 prop = (struct __ecereNameSpace__ecere__com__Property *)curMember;
11426 dataMember = curMember;
11427 __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, dataMember->name, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11428 if(_class->type == 0)
11429 dataMemberOffset += _class->base->structSize;
11436 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, ident->string, privateModule);
11440 if(prop->memberAccess == 1)
11442 curMember = (struct __ecereNameSpace__ecere__com__DataMember *)prop;
11443 curClass = prop->_class;
11448 struct __ecereNameSpace__ecere__com__DataMember * _subMemberStack[256];
11449 int _subMemberStackPos = 0;
11451 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(_class, ident->string, &dataMemberOffset, privateModule, _subMemberStack, &_subMemberStackPos);
11455 if(dataMember->memberAccess == 1)
11457 curMember = dataMember;
11458 curClass = dataMember->_class;
11459 memcpy(subMemberStack, _subMemberStack, sizeof(struct __ecereNameSpace__ecere__com__DataMember *) * _subMemberStackPos);
11460 subMemberStackPos = _subMemberStackPos;
11465 if(found && member->initializer && member->initializer->type == 0)
11467 struct Expression * value = member->initializer->__anon1.exp;
11468 struct Type * type = (((void *)0));
11469 unsigned int deepMember = 0;
11473 type = prop->dataType;
11475 else if(dataMember)
11477 if(!dataMember->dataType)
11478 dataMember->dataType = ProcessTypeString(dataMember->dataTypeString, 0);
11479 type = dataMember->dataType;
11481 if(ident && ident->next)
11484 for(ident = ident->next; ident && type; ident = ident->next)
11486 if(type->kind == 8)
11488 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(type->__anon1._class->__anon1.registered, ident->string, privateModule);
11490 type = prop->dataType;
11493 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMemberAndOffset(type->__anon1._class->__anon1.registered, ident->string, &dataMemberOffset, privateModule, (((void *)0)), (((void *)0)));
11495 type = dataMember->dataType;
11498 else if(type->kind == 9 || type->kind == 10)
11500 struct Type * memberType;
11502 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
11504 if(!strcmp(memberType->name, ident->string))
11515 FreeType(value->destType);
11516 value->destType = type;
11519 ComputeExpression(value);
11521 if(!deepMember && type && value && (_class->type == 1 || _class->type == 0 || _class->type == 5))
11523 if(type->kind == 8)
11525 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11527 if(_class->type == 2 || _class->type == 3 || _class->type == 4)
11529 if(!_class->dataType)
11530 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11531 type = _class->dataType;
11536 void * ptr = inst->data + dataMemberOffset;
11538 if(value->type == 2)
11544 GetInt(value, (int *)ptr);
11549 GetInt64(value, (long long *)ptr);
11554 GetIntPtr(value, (intptr_t *)ptr);
11559 GetIntSize(value, (ssize_t *)ptr);
11564 GetFloat(value, (float *)ptr);
11569 GetDouble(value, (double *)ptr);
11574 else if(value->type == 1)
11576 if(type->kind == 8)
11578 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11580 if(_class->type == 1)
11582 ComputeTypeSize(type);
11583 if(value->__anon1.instance->data)
11584 memcpy(ptr, value->__anon1.instance->data, type->size);
11591 if(value->type == 1 && value->__anon1.instance->data)
11593 if(type->kind == 8)
11595 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11597 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)))
11599 void (* Set)(void *, void *) = (void *)prop->Set;
11601 Set(inst->data, value->__anon1.instance->data);
11602 PopulateInstance(inst);
11606 else if(value->type == 2)
11612 void (* Set)(void *, double) = (void *)prop->Set;
11614 Set(inst->data, strtod(value->__anon1.__anon1.constant, (((void *)0))));
11619 void (* Set)(void *, float) = (void *)prop->Set;
11621 Set(inst->data, (float)(strtod(value->__anon1.__anon1.constant, (((void *)0)))));
11626 void (* Set)(void *, int) = (void *)prop->Set;
11628 Set(inst->data, strtol(value->__anon1.__anon1.constant, (((void *)0)), 0));
11633 void (* Set)(void *, long long) = (void *)prop->Set;
11635 Set(inst->data, __ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11640 void (* Set)(void *, intptr_t) = (void *)prop->Set;
11642 Set(inst->data, (intptr_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11647 void (* Set)(void *, ssize_t) = (void *)prop->Set;
11649 Set(inst->data, (ssize_t)__ecereNameSpace__ecere__com___strtoi64(value->__anon1.__anon1.constant, (((void *)0)), 0));
11654 else if(value->type == 3)
11658 ReadString(temp, value->__anon1.__anon2.string);
11659 ((void (*)(void *, void *))(void *)prop->Set)(inst->data, temp);
11663 else if(!deepMember && type && _class->type == 3)
11667 if(value->type == 2)
11669 if(type->kind == 8)
11671 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
11673 if(_class->type == 3)
11675 if(!_class->dataType)
11676 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
11677 type = _class->dataType;
11685 float (* Set)(float) = (void *)prop->Set;
11687 GetFloat(member->initializer->__anon1.exp, &fValue);
11688 exp->__anon1.__anon1.constant = PrintFloat(Set(fValue));
11695 double (* Set)(double) = (void *)prop->Set;
11697 GetDouble(member->initializer->__anon1.exp, &dValue);
11698 exp->__anon1.__anon1.constant = PrintDouble(Set(dValue));
11706 else if(!deepMember && type && _class->type == 2)
11710 if(value->type == 1 && value->__anon1.instance->data)
11712 unsigned int (* Set)(void *) = (void *)prop->Set;
11714 bits = Set(value->__anon1.instance->data);
11716 else if(value->type == 2)
11720 else if(dataMember)
11722 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)dataMember;
11723 struct Type * type;
11726 bits = (bits & ~bitMember->mask);
11727 if(!bitMember->dataType)
11728 bitMember->dataType = ProcessTypeString(bitMember->dataTypeString, 0);
11729 type = bitMember->dataType;
11730 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
11732 if(!type->__anon1._class->__anon1.registered->dataType)
11733 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
11734 type = type->__anon1._class->__anon1.registered->dataType;
11743 type->isSigned ? GetChar(value, (char *)&v) : GetUChar(value, &v);
11751 type->isSigned ? GetShort(value, (short *)&v) : GetUShort(value, &v);
11760 type->isSigned ? GetInt(value, (int *)&v) : GetUInt(value, &v);
11768 type->isSigned ? GetInt64(value, (long long *)&v) : GetUInt64(value, &v);
11776 type->isSigned ? GetIntPtr(value, (intptr_t *)&v) : GetUIntPtr(value, &v);
11784 type->isSigned ? GetIntSize(value, (ssize_t *)&v) : GetUIntSize(value, &v);
11789 bits |= part << bitMember->pos;
11795 if(_class && _class->type == 3)
11797 ComputeExpression(member->initializer->__anon1.exp);
11798 exp->__anon1.__anon1.constant = member->initializer->__anon1.exp->__anon1.__anon1.constant;
11800 member->initializer->__anon1.exp->__anon1.__anon1.constant = (((void *)0));
11810 if(_class && _class->type == 2)
11812 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
11817 FreeInstance(inst);
11821 static unsigned int Promote(struct Operand * op, int kind, unsigned int isSigned)
11823 unsigned int result = 0;
11828 if(op->kind == 1 || op->kind == 15 || op->kind == 24)
11829 result = isSigned ? GetOpShort(op, &op->__anon1.s) : GetOpUShort(op, &op->__anon1.us);
11833 if(op->kind == 1 || op->kind == 2 || op->kind == 15 || op->kind == 24)
11834 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11837 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)
11838 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11841 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)
11842 result = GetOpFloat(op, &op->__anon1.f);
11845 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)
11846 result = GetOpDouble(op, &op->__anon1.d);
11849 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)
11850 result = GetOpUInt64(op, &op->__anon1.ui64);
11853 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)
11854 result = isSigned ? GetOpInt(op, &op->__anon1.i) : GetOpUInt(op, &op->__anon1.ui);
11857 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11858 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11861 if(op->kind == 1 || op->kind == 2 || op->kind == 3 || op->kind == 5 || op->kind == 15 || op->kind == 24)
11862 result = isSigned ? GetOpInt64(op, &op->__anon1.i64) : GetOpUInt64(op, &op->__anon1.ui64);
11868 void CallOperator(struct Expression * exp, struct Expression * exp1, struct Expression * exp2, struct Operand * op1, struct Operand * op2)
11870 if(exp->__anon1.op.op == SIZEOF)
11872 FreeExpContents(exp);
11874 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(op1->type));
11878 if(!exp->__anon1.op.exp1)
11880 switch(exp->__anon1.op.op)
11884 struct Expression * exp2 = exp->__anon1.op.exp2;
11886 exp->__anon1.op.exp2 = (((void *)0));
11887 FreeExpContents(exp);
11888 FreeType(exp->expType);
11889 FreeType(exp->destType);
11891 ((exp2 ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)exp2) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(exp2)) : 0), exp2 = 0);
11897 FreeExpContents(exp);
11898 op1->ops.Neg(exp, op1);
11902 if(op1->ops.BitNot)
11904 FreeExpContents(exp);
11905 op1->ops.BitNot(exp, op1);
11911 FreeExpContents(exp);
11912 op1->ops.Not(exp, op1);
11919 if(op1 && op2 && op1->type && op2->type && op1->kind != op2->kind)
11921 if(Promote(op2, op1->kind, op1->type->isSigned))
11922 op2->kind = op1->kind, op2->ops = op1->ops;
11923 else if(Promote(op1, op2->kind, op2->type->isSigned))
11924 op1->kind = op2->kind, op1->ops = op2->ops;
11926 switch(exp->__anon1.op.op)
11931 FreeExpContents(exp);
11932 op1->ops.Add(exp, op1, op2);
11938 FreeExpContents(exp);
11939 op1->ops.Sub(exp, op1, op2);
11945 FreeExpContents(exp);
11946 op1->ops.Mul(exp, op1, op2);
11952 FreeExpContents(exp);
11953 op1->ops.Div(exp, op1, op2);
11959 FreeExpContents(exp);
11960 op1->ops.Mod(exp, op1, op2);
11964 if(exp->__anon1.op.exp2)
11966 if(op1->ops.BitAnd)
11968 FreeExpContents(exp);
11969 op1->ops.BitAnd(exp, op1, op2);
11976 FreeExpContents(exp);
11977 op1->ops.BitOr(exp, op1, op2);
11981 if(op1->ops.BitXor)
11983 FreeExpContents(exp);
11984 op1->ops.BitXor(exp, op1, op2);
11988 if(op1->ops.LShift)
11990 FreeExpContents(exp);
11991 op1->ops.LShift(exp, op1, op2);
11995 if(op1->ops.RShift)
11997 FreeExpContents(exp);
11998 op1->ops.RShift(exp, op1, op2);
12004 FreeExpContents(exp);
12005 op1->ops.Equ(exp, op1, op2);
12011 FreeExpContents(exp);
12012 op1->ops.Nqu(exp, op1, op2);
12018 FreeExpContents(exp);
12019 op1->ops.And(exp, op1, op2);
12025 FreeExpContents(exp);
12026 op1->ops.Or(exp, op1, op2);
12032 FreeExpContents(exp);
12033 op1->ops.Grt(exp, op1, op2);
12039 FreeExpContents(exp);
12040 op1->ops.Sma(exp, op1, op2);
12044 if(op1->ops.GrtEqu)
12046 FreeExpContents(exp);
12047 op1->ops.GrtEqu(exp, op1, op2);
12051 if(op1->ops.SmaEqu)
12053 FreeExpContents(exp);
12054 op1->ops.SmaEqu(exp, op1, op2);
12062 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
12064 extern struct Expression * MkExpIdentifier(struct Identifier * id);
12066 void ComputeExpression(struct Expression * exp)
12072 ComputeInstantiation(exp);
12077 struct Expression * exp1, * exp2 = (((void *)0));
12078 struct Operand op1 =
12085 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12088 struct Operand op2 =
12095 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12099 if(exp->__anon1.op.exp2)
12101 struct Expression * e = exp->__anon1.op.exp2;
12103 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
12105 if(e->type == 5 || e->type == 32 || e->type == 23)
12108 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
12110 e = (*e->__anon1.list).last;
12113 if(exp->__anon1.op.op == 261 && e && e->expType)
12115 if(e->type == 3 && e->__anon1.__anon2.string)
12117 char * string = e->__anon1.__anon2.string;
12118 int len = strlen(string);
12119 char * tmp = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (len - 2 + 1));
12121 len = UnescapeString(tmp, string + 1, len - 2);
12122 (__ecereNameSpace__ecere__com__eSystem_Delete(tmp), tmp = 0);
12123 FreeExpContents(exp);
12125 exp->__anon1.__anon1.constant = PrintUInt(len + 1);
12129 struct Type * type = e->expType;
12132 FreeExpContents(exp);
12134 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12140 ComputeExpression(exp->__anon1.op.exp2);
12142 if(exp->__anon1.op.exp1)
12144 ComputeExpression(exp->__anon1.op.exp1);
12145 exp1 = exp->__anon1.op.exp1;
12146 exp2 = exp->__anon1.op.exp2;
12147 op1 = GetOperand(exp1);
12149 op1.type->refCount++;
12152 op2 = GetOperand(exp2);
12154 op2.type->refCount++;
12159 exp1 = exp->__anon1.op.exp2;
12160 op1 = GetOperand(exp1);
12162 op1.type->refCount++;
12164 CallOperator(exp, exp1, exp2, &op1, &op2);
12166 FreeType(op1.type);
12168 FreeType(op2.type);
12174 struct Expression * e, * n;
12176 for(e = (*exp->__anon1.list).first; e; e = n)
12181 struct __ecereNameSpace__ecere__sys__OldList * list = exp->__anon1.list;
12182 struct Expression * prev = exp->prev;
12183 struct Expression * next = exp->next;
12185 ComputeExpression(e);
12186 FreeType(exp->expType);
12187 FreeType(exp->destType);
12191 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
12192 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
12203 struct Expression * memberExp = exp->__anon1.member.exp;
12204 struct Identifier * memberID = exp->__anon1.member.member;
12205 struct Type * type;
12207 ComputeExpression(exp->__anon1.member.exp);
12208 type = exp->__anon1.member.exp->expType;
12211 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)));
12212 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
12213 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
12214 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
12216 if(type->kind == 19 && exp->__anon1.member.exp->type == 24)
12217 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
12221 struct Symbol * classSym;
12224 PrintTypeNoConst(type, string, 0, 1);
12225 classSym = FindClass(string);
12226 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12228 if(exp->__anon1.member.member)
12230 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, exp->__anon1.member.member->string, privateModule);
12232 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, exp->__anon1.member.member->string, privateModule, (((void *)0)), (((void *)0)));
12234 if(!prop && !member && _class && exp->__anon1.member.member)
12236 struct Symbol * classSym = FindClass(exp->__anon1.member.member->string);
12238 convertTo = _class;
12239 _class = classSym ? classSym->__anon1.registered : (((void *)0));
12240 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, convertTo->fullName, privateModule);
12246 struct Type * type = prop->dataType;
12248 if(_class->type == 3)
12250 if(type->kind == 8)
12252 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12254 if(_class->type == 3)
12256 if(!_class->dataType)
12257 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12258 type = _class->dataType;
12266 float (* Get)(float) = (void *)prop->Get;
12268 GetFloat(exp->__anon1.member.exp, &value);
12269 exp->__anon1.__anon1.constant = PrintFloat(Get ? Get(value) : value);
12276 double (* Get)(double);
12278 GetDouble(exp->__anon1.member.exp, &value);
12280 Get = (void *)prop->Set;
12282 Get = (void *)prop->Get;
12283 exp->__anon1.__anon1.constant = PrintDouble(Get ? Get(value) : value);
12293 struct Expression * value = exp->__anon1.member.exp;
12294 struct Type * type;
12296 if(!prop->dataType)
12297 ProcessPropertyType(prop);
12298 type = prop->dataType;
12302 else if(_class->type == 1)
12308 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12310 if(propertyClass->type == 1 && value->type == 1)
12312 void (* Set)(void *, void *) = (void *)prop->Set;
12314 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12315 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12316 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12317 exp->__anon1.instance->loc = exp->loc;
12319 Set(exp->__anon1.instance->data, value->__anon1.instance->data);
12320 PopulateInstance(exp->__anon1.instance);
12327 void (* Set)(void *, int) = (void *)prop->Set;
12329 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12330 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12331 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12332 exp->__anon1.instance->loc = exp->loc;
12334 GetInt(value, &intValue);
12335 Set(exp->__anon1.instance->data, intValue);
12336 PopulateInstance(exp->__anon1.instance);
12341 long long intValue;
12342 void (* Set)(void *, long long) = (void *)prop->Set;
12344 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12345 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12346 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12347 exp->__anon1.instance->loc = exp->loc;
12349 GetInt64(value, &intValue);
12350 Set(exp->__anon1.instance->data, intValue);
12351 PopulateInstance(exp->__anon1.instance);
12357 void (* Set)(void *, intptr_t) = (void *)prop->Set;
12359 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12360 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12361 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12362 exp->__anon1.instance->loc = exp->loc;
12364 GetIntPtr(value, &intValue);
12365 Set(exp->__anon1.instance->data, intValue);
12366 PopulateInstance(exp->__anon1.instance);
12372 void (* Set)(void *, ssize_t) = (void *)prop->Set;
12374 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12375 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12376 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12377 exp->__anon1.instance->loc = exp->loc;
12379 GetIntSize(value, &intValue);
12380 Set(exp->__anon1.instance->data, intValue);
12381 PopulateInstance(exp->__anon1.instance);
12387 void (* Set)(void *, float) = (void *)prop->Set;
12389 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12390 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12391 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12392 exp->__anon1.instance->loc = exp->loc;
12394 GetFloat(value, &floatValue);
12395 Set(exp->__anon1.instance->data, floatValue);
12396 PopulateInstance(exp->__anon1.instance);
12401 double doubleValue;
12402 void (* Set)(void *, double) = (void *)prop->Set;
12404 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12405 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12406 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12407 exp->__anon1.instance->loc = exp->loc;
12409 GetDouble(value, &doubleValue);
12410 Set(exp->__anon1.instance->data, doubleValue);
12411 PopulateInstance(exp->__anon1.instance);
12416 else if(_class->type == 2)
12422 struct __ecereNameSpace__ecere__com__Class * propertyClass = type->__anon1._class->__anon1.registered;
12424 if(propertyClass->type == 1 && value->__anon1.instance->data)
12426 unsigned int (* Set)(void *) = (void *)prop->Set;
12427 unsigned int bits = Set(value->__anon1.instance->data);
12429 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12433 else if(_class->type == 2)
12435 unsigned int value;
12436 unsigned int (* Set)(unsigned int) = (void *)prop->Set;
12439 GetUInt(exp->__anon1.member.exp, &value);
12441 exp->__anon1.__anon1.constant = PrintHexUInt(bits);
12450 if(_class->type == 2)
12452 unsigned int value;
12454 GetUInt(exp->__anon1.member.exp, &value);
12459 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12461 if(_class->type == 1)
12463 void (* Get)(unsigned int, 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);
12473 else if(_class->type == 2)
12475 unsigned int (* Get)(unsigned int) = (void *)prop->Get;
12476 uint64 bits = Get(value);
12478 exp->__anon1.__anon1.constant = PrintHexUInt64(bits);
12485 else if(_class->type == 1)
12487 unsigned char * value = (exp->__anon1.member.exp->type == 1) ? exp->__anon1.member.exp->__anon1.instance->data : (((void *)0));
12493 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12495 if(_class->type == 1 && value)
12497 void (* Get)(void *, void *) = (void *)prop->Get;
12499 exp->__anon1.instance = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
12500 exp->__anon1.instance->data = __ecereNameSpace__ecere__com__eSystem_New0(sizeof(unsigned char) * (_class->structSize));
12501 exp->__anon1.instance->_class = MkSpecifierName(_class->fullName);
12502 exp->__anon1.instance->loc = exp->loc;
12504 Get(value, exp->__anon1.instance->data);
12505 PopulateInstance(exp->__anon1.instance);
12516 exp->isConstant = 0;
12525 FreeExpression(memberExp);
12526 FreeIdentifier(memberID);
12532 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
12534 FreeExpContents(exp);
12535 exp->__anon1.__anon1.constant = PrintUInt(ComputeTypeSize(type));
12542 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
12544 if(classSym && classSym->__anon1.registered)
12546 if(classSym->__anon1.registered->fixed)
12548 FreeSpecifier(exp->__anon1._class);
12549 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
12554 char className[1024];
12556 strcpy(className, "__ecereClass_");
12557 FullClassNameCat(className, classSym->string, 1);
12558 DeclareClass(classSym, className);
12559 FreeExpContents(exp);
12561 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
12562 exp->__anon1.member.member = MkIdentifier("structSize");
12569 struct Type * type;
12570 struct Expression * e = exp;
12572 if(exp->type == 11)
12574 if(exp->__anon1.cast.exp)
12575 ComputeExpression(exp->__anon1.cast.exp);
12576 e = exp->__anon1.cast.exp;
12578 if(e && exp->expType)
12580 type = exp->expType;
12581 if(type->kind == 8)
12583 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1._class->__anon1.registered;
12585 if(_class && (_class->type == 3 || _class->type == 2))
12587 if(!_class->dataType)
12588 _class->dataType = ProcessTypeString(_class->dataTypeString, 0);
12589 type = _class->dataType;
12598 char value = (char)0;
12600 if(GetChar(e, &value))
12602 FreeExpContents(exp);
12603 exp->__anon1.__anon1.constant = PrintChar(value);
12609 unsigned char value = (unsigned char)0;
12611 if(GetUChar(e, &value))
12613 FreeExpContents(exp);
12614 exp->__anon1.__anon1.constant = PrintUChar(value);
12622 short value = (short)0;
12624 if(GetShort(e, &value))
12626 FreeExpContents(exp);
12627 exp->__anon1.__anon1.constant = PrintShort(value);
12633 unsigned short value = (unsigned short)0;
12635 if(GetUShort(e, &value))
12637 FreeExpContents(exp);
12638 exp->__anon1.__anon1.constant = PrintUShort(value);
12648 if(GetInt(e, &value))
12650 FreeExpContents(exp);
12651 exp->__anon1.__anon1.constant = PrintInt(value);
12657 unsigned int value = 0;
12659 if(GetUInt(e, &value))
12661 FreeExpContents(exp);
12662 exp->__anon1.__anon1.constant = PrintUInt(value);
12670 long long value = 0;
12672 if(GetInt64(e, &value))
12674 FreeExpContents(exp);
12675 exp->__anon1.__anon1.constant = PrintInt64(value);
12683 if(GetUInt64(e, &value))
12685 FreeExpContents(exp);
12686 exp->__anon1.__anon1.constant = PrintUInt64(value);
12694 intptr_t value = 0;
12696 if(GetIntPtr(e, &value))
12698 FreeExpContents(exp);
12699 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12705 uintptr_t value = 0;
12707 if(GetUIntPtr(e, &value))
12709 FreeExpContents(exp);
12710 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12720 if(GetIntSize(e, &value))
12722 FreeExpContents(exp);
12723 exp->__anon1.__anon1.constant = PrintInt64((long long)value);
12731 if(GetUIntSize(e, &value))
12733 FreeExpContents(exp);
12734 exp->__anon1.__anon1.constant = PrintUInt64((uint64)value);
12743 if(GetFloat(e, &value))
12745 FreeExpContents(exp);
12746 exp->__anon1.__anon1.constant = PrintFloat(value);
12755 if(GetDouble(e, &value))
12757 FreeExpContents(exp);
12758 exp->__anon1.__anon1.constant = PrintDouble(value);
12769 struct Operand op1 =
12776 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12779 struct Operand op2 =
12786 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12789 struct Operand op3 =
12796 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12800 if(exp->__anon1.cond.exp)
12801 ComputeExpression((*exp->__anon1.cond.exp).last);
12802 if(exp->__anon1.cond.elseExp)
12803 ComputeExpression(exp->__anon1.cond.elseExp);
12804 if(exp->__anon1.cond.cond)
12805 ComputeExpression(exp->__anon1.cond.cond);
12806 op1 = GetOperand(exp->__anon1.cond.cond);
12808 op1.type->refCount++;
12809 op2 = GetOperand((*exp->__anon1.cond.exp).last);
12811 op2.type->refCount++;
12812 op3 = GetOperand(exp->__anon1.cond.elseExp);
12814 op3.type->refCount++;
12817 FreeExpContents(exp);
12818 op1.ops.Cond(exp, &op1, &op2, &op3);
12821 FreeType(op1.type);
12823 FreeType(op2.type);
12825 FreeType(op3.type);
12831 void ApplyAnyObjectLogic(struct Expression * e);
12833 static unsigned int CheckExpressionType(struct Expression * exp, struct Type * destType, unsigned int skipUnitBla, unsigned int warnConst)
12835 unsigned int result = 1;
12839 struct __ecereNameSpace__ecere__sys__OldList converts =
12843 struct Conversion * convert;
12845 if(destType->kind == 0)
12847 if(!MatchTypeExpression(exp, destType, &converts, skipUnitBla, warnConst))
12851 for(convert = converts.first; convert; convert = convert->next)
12853 unsigned int empty = !(convert->isGet ? (void *)convert->convert->Get : (void *)convert->convert->Set);
12857 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12858 int objectType = exp->expType ? exp->expType->classObjectType : 0;
12861 newExp->prev = (((void *)0));
12862 newExp->next = (((void *)0));
12863 newExp->destType = (((void *)0));
12867 exp->addedThis = 1;
12868 exp->__anon1.member.exp = newExp;
12869 FreeType(exp->__anon1.member.exp->expType);
12870 exp->__anon1.member.exp->expType = MkClassType(convert->convert->_class->fullName);
12871 exp->__anon1.member.exp->expType->classObjectType = objectType;
12872 exp->__anon1.member.member = MkIdentifier(convert->convert->dataTypeString);
12873 exp->__anon1.member.memberType = 1;
12874 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12877 exp->expType->refCount++;
12878 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12884 exp->addedThis = 1;
12885 exp->__anon1.member.exp = newExp;
12886 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)
12888 newExp->byReference = 1;
12890 FreeType(exp->__anon1.member.exp->expType);
12891 exp->__anon1.member.exp->expType = (((void *)0));
12892 if(convert->convert->dataType)
12894 exp->__anon1.member.exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
12895 CopyTypeInto(exp->__anon1.member.exp->expType, convert->convert->dataType);
12896 exp->__anon1.member.exp->expType->refCount = 1;
12897 exp->__anon1.member.exp->expType->classObjectType = objectType;
12898 ApplyAnyObjectLogic(exp->__anon1.member.exp);
12900 exp->__anon1.member.member = MkIdentifier(convert->convert->_class->fullName);
12901 exp->__anon1.member.memberType = 4;
12902 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12904 if(convert->resultType)
12905 convert->resultType->refCount++;
12911 FreeType(exp->expType);
12914 exp->expType = convert->resultType ? convert->resultType : convert->convert->dataType;
12915 if(exp->destType->casted)
12918 exp->expType->refCount++;
12922 exp->expType = convert->resultType ? convert->resultType : MkClassType(convert->convert->_class->fullName);
12923 if(exp->destType->casted)
12925 if(convert->resultType)
12926 convert->resultType->refCount++;
12930 if(exp->isConstant && inCompiler)
12931 ComputeExpression(exp);
12932 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&converts, (void *)(FreeConvert));
12934 if(!result && exp->expType && converts.count)
12936 result = MatchTypes(exp->expType, exp->destType, (((void *)0)), (((void *)0)), (((void *)0)), 1, 1, 0, 0, warnConst);
12938 if(!result && exp->expType && exp->destType)
12940 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))
12947 extern struct Expression * GetNonBracketsExp(struct Expression * exp);
12949 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
12951 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
12953 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
12955 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
12957 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
12959 void CheckTemplateTypes(struct Expression * exp)
12961 struct Expression * nbExp = GetNonBracketsExp(exp);
12963 if(exp->destType && exp->destType->passAsTemplate && exp->expType && exp->expType->kind != 20 && !exp->expType->passAsTemplate && (nbExp == exp || nbExp->type != 11))
12965 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
12966 struct Context * context;
12970 exp->destType->refCount++;
12972 exp->expType->refCount++;
12973 newExp->prev = (((void *)0));
12974 newExp->next = (((void *)0));
12975 switch(exp->expType->kind)
12978 if(exp->destType->classObjectType)
12981 exp->destType->refCount--;
12983 exp->expType->refCount--;
12984 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
12988 struct __ecereNameSpace__ecere__sys__OldList * specs;
12989 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
12990 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
12992 context = PushContext();
12993 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
12994 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
12995 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
12997 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
12998 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
12999 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
13000 exp->__anon1.compound->__anon1.compound.context = context;
13001 PopContext(context);
13006 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifierName("uint64")), (((void *)0)));
13007 if(__ecereProp_Type_Get_isPointerType(exp->expType))
13008 exp->__anon1.cast.exp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), MkExpBrackets(MkListOne(newExp)));
13010 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
13015 else if(exp->expType && exp->expType->passAsTemplate && exp->destType && ((unsigned int)((exp->usage & 0x1) >> 0)) && exp->destType->kind != 20 && !exp->destType->passAsTemplate)
13017 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13018 struct Context * context;
13022 exp->destType->refCount++;
13024 exp->expType->refCount++;
13025 newExp->prev = (((void *)0));
13026 newExp->next = (((void *)0));
13027 switch(exp->expType->kind)
13030 if(exp->destType->classObjectType)
13033 exp->destType->refCount--;
13035 exp->expType->refCount--;
13036 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13040 struct __ecereNameSpace__ecere__sys__OldList * specs;
13041 struct __ecereNameSpace__ecere__sys__OldList * unionDefs = MkList();
13042 struct __ecereNameSpace__ecere__sys__OldList * statements = MkList();
13044 context = PushContext();
13045 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
13046 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
13047 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
13049 exp->__anon1.compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
13050 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
13051 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
13052 exp->__anon1.compound->__anon1.compound.context = context;
13053 PopContext(context);
13058 if(exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->type == 1)
13061 if(__ecereProp_Type_Get_isPointerType(exp->expType))
13062 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
13063 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)));
13064 ProcessExpressionType((*exp->__anon1.list).first);
13070 if(__ecereProp_Type_Get_isPointerType(exp->expType))
13072 exp->needTemplateCast = 2;
13073 newExp->needCast = 1;
13074 newExp->needTemplateCast = 2;
13075 newExp = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), newExp);
13077 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(exp->expType->__anon1._class->string)), (((void *)0))), newExp));
13078 exp->needTemplateCast = 2;
13079 newExp->needCast = 1;
13080 newExp->needTemplateCast = 2;
13081 ProcessExpressionType((*exp->__anon1.list).first);
13087 if(exp->expType->kind == 20)
13089 struct Type * type = ProcessTemplateParameterType(exp->expType->__anon1.templateParameter);
13093 FreeType(exp->destType);
13094 FreeType(exp->expType);
13095 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13099 if(newExp->type == 8 && newExp->__anon1.member.memberType == 3)
13102 exp->__anon1.op.op = '*';
13103 exp->__anon1.op.exp1 = (((void *)0));
13104 exp->__anon1.op.exp2 = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uint64")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '&', newExp))));
13108 char typeString[1024];
13109 struct Declarator * decl;
13110 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13112 typeString[0] = '\0';
13113 PrintType(exp->expType, typeString, 0, 0);
13114 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13116 exp->__anon1.cast.typeName = MkTypeName(specs, decl);
13117 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(newExp));
13118 exp->__anon1.cast.exp->needCast = 1;
13126 extern int strncmp(const char * , const char * , size_t n);
13128 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindPrefix(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
13130 static struct Symbol * ScanWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * nameSpace, const char * name)
13132 int nsLen = strlen(nameSpace);
13133 struct Symbol * symbol;
13135 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)))
13137 char * s = symbol->string;
13139 if(!strncmp(s, nameSpace, nsLen))
13144 for(c = strlen(s) - 1; c >= 0; c--)
13147 namePart = s + c + 1;
13148 if(!strcmp(namePart, name))
13156 return (((void *)0));
13159 static struct Symbol * FindWithNameSpace(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, const char * name)
13162 char nameSpace[1024];
13163 const char * namePart;
13164 unsigned int gotColon = 0;
13166 nameSpace[0] = '\0';
13167 for(c = strlen(name) - 1; c >= 0; c--)
13173 namePart = name + c + 1;
13174 while(c >= 0 && name[c] == ':')
13178 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, name);
13182 memcpy(nameSpace, name, c + 1);
13183 nameSpace[c + 1] = (char)0;
13184 return ScanWithNameSpace(tree, nameSpace, namePart);
13188 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13194 struct Symbol * symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(tree, namePart);
13198 return ScanWithNameSpace(tree, "", namePart);
13200 return (((void *)0));
13203 static void ProcessDeclaration(struct Declaration * decl);
13205 struct Symbol * FindSymbol(const char * name, struct Context * startContext, struct Context * endContext, unsigned int isStruct, unsigned int globalNameSpace)
13207 struct Context * ctx;
13208 struct Symbol * symbol = (((void *)0));
13210 for(ctx = startContext; ctx && !symbol; ctx = ctx->parent)
13212 if(ctx == globalContext && !globalNameSpace && ctx->hasNameSpace)
13214 symbol = (((void *)0));
13217 char curName[1024];
13219 strcpy(curName, thisNameSpace);
13220 strcat(curName, "::");
13221 strcat(curName, name);
13222 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, curName);
13225 symbol = FindWithNameSpace(isStruct ? &ctx->structSymbols : &ctx->symbols, name);
13228 symbol = (struct Symbol *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((isStruct ? &ctx->structSymbols : &ctx->symbols), name);
13229 if(symbol || ctx == endContext)
13232 if(inCompiler && curExternal && symbol && ctx == globalContext && curExternal->symbol && symbol->id > curExternal->symbol->idCode && symbol->__anon2.__anon1.pointerExternal)
13234 if(symbol->__anon2.__anon1.pointerExternal->type == 0)
13236 struct FunctionDefinition * function = symbol->__anon2.__anon1.pointerExternal->__anon1.function;
13237 struct Context * tmpContext = curContext;
13239 curContext = (((void *)0));
13240 symbol->__anon2.__anon1.pointerExternal = MkExternalDeclaration(MkDeclaration(CopyList(function->specifiers, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(CopyDeclarator(function->declarator), (((void *)0))))));
13241 curContext = tmpContext;
13242 symbol->__anon2.__anon1.pointerExternal->symbol = symbol;
13243 DeclareType(symbol->type, 1, 1);
13244 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, symbol->__anon2.__anon1.pointerExternal);
13245 symbol->id = curExternal->symbol->idCode;
13247 else if(symbol->__anon2.__anon1.pointerExternal->type == 1 && curExternal->symbol->idCode < symbol->__anon2.__anon1.pointerExternal->symbol->id)
13249 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Move((&*ast), symbol->__anon2.__anon1.pointerExternal, curExternal->prev);
13250 symbol->id = curExternal->symbol->idCode;
13256 static void GetTypeSpecs(struct Type * type, struct __ecereNameSpace__ecere__sys__OldList * specs)
13258 if(!type->isSigned && type->kind != 22 && type->kind != 23)
13259 ListAdd(specs, MkSpecifier(UNSIGNED));
13264 if(type->__anon1._class->__anon1.registered)
13266 if(!type->__anon1._class->__anon1.registered->dataType)
13267 type->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type->__anon1._class->__anon1.registered->dataTypeString, 0);
13268 GetTypeSpecs(type->__anon1._class->__anon1.registered->dataType, specs);
13273 ListAdd(specs, MkSpecifier(DOUBLE));
13276 ListAdd(specs, MkSpecifier(FLOAT));
13279 ListAdd(specs, MkSpecifier(CHAR));
13282 ListAdd(specs, MkSpecifier(_BOOL));
13285 ListAdd(specs, MkSpecifier(SHORT));
13288 ListAdd(specs, MkSpecifier(INT64));
13291 ListAdd(specs, MkSpecifierName(type->isSigned ? "intptr" : "uintptr"));
13294 ListAdd(specs, MkSpecifierName(type->isSigned ? "intsize" : "uintsize"));
13298 ListAdd(specs, MkSpecifier(INT));
13303 static void PrintArraySize(struct Type * arrayType, char * string)
13309 if(arrayType->__anon1.__anon4.enumClass)
13310 strcat(size, arrayType->__anon1.__anon4.enumClass->string);
13311 else if(arrayType->__anon1.__anon4.arraySizeExp)
13312 PrintExpression(arrayType->__anon1.__anon4.arraySizeExp, size);
13314 strcat(string, size);
13317 static void PrintTypeSpecs(struct Type * type, char * string, unsigned int fullName, unsigned int printConst)
13321 if(printConst && type->constant)
13322 strcat(string, "const ");
13327 struct Symbol * c = type->__anon1._class;
13329 if(type->classObjectType == 2)
13330 strcat(string, "typed_object");
13331 else if(type->classObjectType == 3)
13332 strcat(string, "any_object");
13336 strcat(string, (fullName || !c->__anon1.registered) ? c->string : c->__anon1.registered->name);
13338 if(type->byReference)
13339 strcat(string, " &");
13343 strcat(string, "void");
13346 strcat(string, type->isSigned ? "int" : "uint");
13349 strcat(string, type->isSigned ? "int64" : "uint64");
13352 strcat(string, type->isSigned ? "intptr" : "uintptr");
13355 strcat(string, type->isSigned ? "intsize" : "uintsize");
13358 strcat(string, type->isSigned ? "char" : "byte");
13361 strcat(string, "_Bool");
13364 strcat(string, type->isSigned ? "short" : "uint16");
13367 strcat(string, "float");
13370 strcat(string, "double");
13373 if(type->__anon1.__anon1.enumName)
13375 strcat(string, "struct ");
13376 strcat(string, type->__anon1.__anon1.enumName);
13378 else if(type->typeName)
13379 strcat(string, type->typeName);
13382 struct Type * member;
13384 strcat(string, "struct { ");
13385 for(member = type->__anon1.__anon1.members.first; member; member = member->next)
13387 PrintType(member, string, 1, fullName);
13388 strcat(string, "; ");
13390 strcat(string, "}");
13394 if(type->__anon1.__anon1.enumName)
13396 strcat(string, "union ");
13397 strcat(string, type->__anon1.__anon1.enumName);
13399 else if(type->typeName)
13400 strcat(string, type->typeName);
13403 strcat(string, "union ");
13404 strcat(string, "(unnamed)");
13408 if(type->__anon1.__anon1.enumName)
13410 strcat(string, "enum ");
13411 strcat(string, type->__anon1.__anon1.enumName);
13413 else if(type->typeName)
13414 strcat(string, type->typeName);
13416 strcat(string, "int");
13419 strcat(string, "...");
13422 strcat(string, "subclass(");
13423 strcat(string, type->__anon1._class ? type->__anon1._class->string : "int");
13424 strcat(string, ")");
13427 strcat(string, type->__anon1.templateParameter->identifier->string);
13430 strcat(string, "thisclass");
13433 strcat(string, "__builtin_va_list");
13439 extern char * __ecereNameSpace__ecere__sys__RSearchString(const char * buffer, const char * subStr, int maxLen, unsigned int matchCase, unsigned int matchWord);
13441 static void PrintName(struct Type * type, char * string, unsigned int fullName)
13443 if(type->name && type->name[0])
13446 strcat(string, type->name);
13449 char * name = __ecereNameSpace__ecere__sys__RSearchString(type->name, "::", strlen(type->name), 1, 0);
13455 strcat(string, name);
13460 static void PrintAttribs(struct Type * type, char * string)
13464 if(type->dllExport)
13465 strcat(string, "dllexport ");
13466 if(type->attrStdcall)
13467 strcat(string, "stdcall ");
13471 static void PrePrintType(struct Type * type, char * string, unsigned int fullName, struct Type * parentType, unsigned int printConst)
13473 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13475 if((type->kind == 11 || type->kind == 16) && (!parentType || parentType->kind != 13))
13476 PrintAttribs(type, string);
13477 if(printConst && type->constant && (type->kind == 11 || type->kind == 16))
13478 strcat(string, " const");
13479 PrePrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName, type, printConst);
13480 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13481 strcat(string, " (");
13482 if(type->kind == 13)
13484 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16)
13485 PrintAttribs(type->__anon1.type, string);
13487 if(type->kind == 13)
13489 if(type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16 || type->__anon1.type->kind == 12)
13490 strcat(string, "*");
13492 strcat(string, " *");
13494 if(printConst && type->constant && type->kind == 13)
13495 strcat(string, " const");
13498 PrintTypeSpecs(type, string, fullName, printConst);
13501 static void PostPrintType(struct Type * type, char * string, unsigned int fullName)
13503 if(type->kind == 13 && (type->__anon1.type->kind == 12 || type->__anon1.type->kind == 11 || type->__anon1.type->kind == 16))
13504 strcat(string, ")");
13505 if(type->kind == 12)
13506 PrintArraySize(type, string);
13507 else if(type->kind == 11)
13509 struct Type * param;
13511 strcat(string, "(");
13512 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
13514 PrintType(param, string, 1, fullName);
13516 strcat(string, ", ");
13518 strcat(string, ")");
13520 if(type->kind == 12 || type->kind == 13 || type->kind == 11 || type->kind == 16)
13521 PostPrintType(type->kind == 16 ? type->__anon1.__anon3.method->dataType : type->__anon1.type, string, fullName);
13524 static void _PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName, unsigned int printConst)
13526 PrePrintType(type, string, fullName, (((void *)0)), printConst);
13527 if(type->__anon1.__anon2.thisClass || (printName && type->name && type->name[0]))
13528 strcat(string, " ");
13529 if((type->__anon1.__anon2.thisClass || type->__anon1.__anon2.staticMethod))
13531 struct Symbol * _class = type->__anon1.__anon2.thisClass;
13533 if((type->classObjectType == 2 || type->classObjectType == 1) || (_class && !strcmp(_class->string, "class")))
13535 if(type->classObjectType == 1)
13536 strcat(string, "class");
13538 strcat(string, type->byReference ? "typed_object&" : "typed_object");
13540 else if(_class && _class->string)
13542 char * s = _class->string;
13548 char * name = __ecereNameSpace__ecere__sys__RSearchString(s, "::", strlen(s), 1, 0);
13554 strcat(string, name);
13557 strcat(string, "::");
13559 if(printName && type->name)
13560 PrintName(type, string, fullName);
13561 PostPrintType(type, string, fullName);
13562 if(type->bitFieldCount)
13566 sprintf(count, ":%d", type->bitFieldCount);
13567 strcat(string, count);
13571 void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13573 _PrintType(type, string, printName, fullName, 1);
13576 void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName)
13578 _PrintType(type, string, printName, fullName, 0);
13581 static struct Type * FindMember(struct Type * type, char * string)
13583 struct Type * memberType;
13585 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13587 if(!memberType->name)
13589 struct Type * subType = FindMember(memberType, string);
13594 else if(!strcmp(memberType->name, string))
13597 return (((void *)0));
13600 struct Type * FindMemberAndOffset(struct Type * type, char * string, unsigned int * offset)
13602 struct Type * memberType;
13604 for(memberType = type->__anon1.__anon1.members.first; memberType; memberType = memberType->next)
13606 if(!memberType->name)
13608 struct Type * subType = FindMember(memberType, string);
13612 *offset += memberType->offset;
13616 else if(!strcmp(memberType->name, string))
13618 *offset += memberType->offset;
13622 return (((void *)0));
13625 extern unsigned int parseError;
13627 unsigned int GetParseError()
13632 extern struct __ecereNameSpace__ecere__com__Instance * fileInput;
13634 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
13636 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
13638 struct Expression * ParseExpressionString(char * expression)
13641 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
13642 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
13643 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13645 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13646 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, expression, 1, strlen(expression));
13647 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
13648 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
13650 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
13651 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
13653 parsedExpression = (((void *)0));
13655 expression_yyparse();
13656 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
13657 return parsedExpression;
13660 extern char * QMkString(const char * source);
13662 static unsigned int ResolveIdWithClass(struct Expression * exp, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int skipIDClassCheck)
13664 struct Identifier * id = exp->__anon1.__anon1.identifier;
13665 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
13666 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
13667 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
13668 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
13670 if(_class && _class->type == 4)
13672 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (((void *)0));
13673 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
13677 struct __ecereNameSpace__ecere__com__Class * baseClass;
13679 for(baseClass = _class; baseClass && baseClass->type == 4; baseClass = baseClass->base)
13681 struct __ecereNameSpace__ecere__com__EnumClassData * e = (baseClass ? ((void *)(((char *)baseClass->data) + enumClass->offsetClass)) : (((void *)0)));
13683 for(value = e->values.first; value; value = value->next)
13685 if(!strcmp(value->name, id->string))
13690 char constant[256];
13692 FreeExpContents(exp);
13694 exp->isConstant = 1;
13695 if(!strcmp(baseClass->dataTypeString, "int") || !strcmp(baseClass->dataTypeString, "int64") || !strcmp(baseClass->dataTypeString, "char") || !strcmp(baseClass->dataTypeString, "short"))
13696 sprintf(constant, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
13698 sprintf(constant, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), value->data);
13699 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13700 exp->expType = MkClassType(baseClass->fullName);
13708 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule)))
13710 ProcessMethodType(method);
13711 exp->expType = __extension__ ({
13712 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13714 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1->__anon1.__anon3.methodClass = (skipIDClassCheck || (id && id->_class)) ? _class : (((void *)0)), __ecereInstance1;
13718 else if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule)))
13720 if(!prop->dataType)
13721 ProcessPropertyType(prop);
13722 exp->expType = prop->dataType;
13724 prop->dataType->refCount++;
13727 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)))))
13729 if(!member->dataType)
13730 member->dataType = ProcessTypeString(member->dataTypeString, 0);
13731 exp->expType = member->dataType;
13732 if(member->dataType)
13733 member->dataType->refCount++;
13736 else if((classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(_class, id->string)))
13738 if(!classProp->dataType)
13739 classProp->dataType = ProcessTypeString(classProp->dataTypeString, 0);
13740 if(classProp->constant)
13742 FreeExpContents(exp);
13743 exp->isConstant = 1;
13744 if(classProp->dataType->kind == 13 && classProp->dataType->__anon1.type->kind == 1)
13747 exp->__anon1.__anon1.constant = QMkString((char *)(uintptr_t)classProp->Get(_class));
13751 char constant[256];
13754 sprintf(constant, "%d", (int)classProp->Get(_class));
13755 exp->__anon1.__anon1.constant = __ecereNameSpace__ecere__sys__CopyString(constant);
13761 exp->expType = classProp->dataType;
13762 if(classProp->dataType)
13763 classProp->dataType->refCount++;
13769 static struct GlobalData * ScanGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace, char * name)
13771 struct __ecereNameSpace__ecere__sys__BinaryTree * tree = &nameSpace->functions;
13772 struct GlobalData * data = (struct GlobalData *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString((&*tree), name);
13773 struct __ecereNameSpace__ecere__com__NameSpace * child;
13777 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)))
13779 data = ScanGlobalData(child, name);
13787 extern struct __ecereNameSpace__ecere__com__NameSpace * globalData;
13789 extern char * strncpy(char * , const char * , size_t n);
13791 static struct GlobalData * FindGlobalData(char * name)
13794 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
13796 nameSpace = globalData;
13797 for(c = 0; name[c]; c++)
13799 if(name[c] == '.' || (name[c] == ':' && name[c + 1] == ':'))
13801 struct __ecereNameSpace__ecere__com__NameSpace * newSpace;
13802 char * spaceName = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (c - start + 1));
13804 strncpy(spaceName, name + start, c - start);
13805 spaceName[c - start] = '\0';
13806 newSpace = (struct __ecereNameSpace__ecere__com__NameSpace *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&(*nameSpace).nameSpaces, spaceName);
13807 (__ecereNameSpace__ecere__com__eSystem_Delete(spaceName), spaceName = 0);
13809 return (((void *)0));
13810 nameSpace = newSpace;
13818 return ScanGlobalData(nameSpace, name + start);
13820 return (((void *)0));
13823 static int definedExpStackPos;
13825 static void * definedExpStack[512];
13827 void ReplaceExpContents(struct Expression * checkedExp, struct Expression * newExp)
13829 struct Expression * prev = checkedExp->prev, * next = checkedExp->next;
13831 FreeExpContents(checkedExp);
13832 FreeType(checkedExp->expType);
13833 FreeType(checkedExp->destType);
13834 *checkedExp = *newExp;
13835 ((newExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)newExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(newExp)) : 0), newExp = 0);
13836 checkedExp->prev = prev;
13837 checkedExp->next = next;
13840 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
13842 extern int printf(const char * , ...);
13844 void __ecereMethod_Expression_Clear();
13846 void ApplyAnyObjectLogic(struct Expression * e)
13848 struct Type * destType = e->destType;
13850 if(destType && (destType->classObjectType == 3))
13852 if(e && e->expType)
13854 struct Type * type = e->expType;
13855 struct __ecereNameSpace__ecere__com__Class * _class = (((void *)0));
13857 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
13859 _class = type->__anon1._class->__anon1.registered;
13861 else if(type->kind == 19)
13863 _class = FindClass("ecere::com::Class")->__anon1.registered;
13867 char string[1024] = "";
13868 struct Symbol * classSym;
13870 PrintTypeNoConst(type, string, 0, 1);
13871 classSym = FindClass(string);
13873 _class = classSym->__anon1.registered;
13875 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)))
13877 if(!_class || strcmp(_class->fullName, "char *"))
13879 struct Expression * checkedExp = e, * newExp;
13881 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13883 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13885 if(checkedExp->type == 23)
13887 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13890 checkedExp = (*checkedExp->__anon1.list).last;
13892 else if(checkedExp->type == 11)
13893 checkedExp = checkedExp->__anon1.cast.exp;
13895 if(checkedExp && checkedExp->type == 4 && checkedExp->__anon1.op.op == '*' && !checkedExp->__anon1.op.exp1)
13897 newExp = checkedExp->__anon1.op.exp2;
13898 checkedExp->__anon1.op.exp2 = (((void *)0));
13899 FreeExpContents(checkedExp);
13900 if(e->expType && e->expType->passAsTemplate)
13904 ComputeTypeSize(e->expType);
13905 sprintf(size, "%d", e->expType->size);
13906 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))))));
13908 ReplaceExpContents(checkedExp, newExp);
13909 e->byReference = 1;
13911 else if(!e->byReference || (_class && _class->type == 5))
13913 struct Expression * checkedExp;
13916 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;
13918 if(_class && _class->type != 5 && _class->type != 0 && _class->type != 1 && !hasAddress)
13920 struct Context * context = PushContext();
13921 struct Declarator * decl;
13922 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
13923 char typeString[1024];
13924 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13926 typeString[0] = '\0';
13928 newExp->prev = (((void *)0));
13929 newExp->next = (((void *)0));
13930 newExp->expType = (((void *)0));
13931 PrintTypeNoConst(e->expType, typeString, 0, 1);
13932 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
13933 newExp->destType = ProcessType(specs, decl);
13934 curContext = context;
13938 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
13941 sprintf(name, "__internalValue%03X", internalValueCounter++);
13942 if(!curCompound->__anon1.compound.declarations)
13943 curCompound->__anon1.compound.declarations = MkList();
13944 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))))));
13945 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', newExp))));
13946 ListAdd(stmts, MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier(name)))));
13947 e->__anon1.compound = MkCompoundStmt((((void *)0)), stmts);
13950 printf("libec: compiler error, curCompound is null in ApplyAnyObjectLogic\n");
13952 struct Type * type = e->destType;
13954 e->destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
13955 CopyTypeInto(e->destType, type);
13956 e->destType->refCount = 1;
13957 e->destType->classObjectType = 0;
13960 e->__anon1.compound->__anon1.compound.context = context;
13961 PopContext(context);
13962 curContext = context->parent;
13966 while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->__anon1.list) || checkedExp->type == 11)
13968 if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
13970 if(checkedExp->type == 23)
13972 checkedExp = (*((struct Statement *)(*checkedExp->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
13975 checkedExp = (*checkedExp->__anon1.list).last;
13977 else if(checkedExp->type == 11)
13978 checkedExp = checkedExp->__anon1.cast.exp;
13981 struct Expression * operand = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
13983 *operand = *checkedExp;
13984 __ecereMethod_Expression_Clear(checkedExp);
13985 checkedExp->destType = ProcessTypeString("void *", 0);
13986 checkedExp->expType = checkedExp->destType;
13987 checkedExp->destType->refCount++;
13988 checkedExp->type = 4;
13989 checkedExp->__anon1.op.op = '&';
13990 checkedExp->__anon1.op.exp1 = (((void *)0));
13991 checkedExp->__anon1.op.exp2 = operand;
14000 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))))
14002 if(e->expType->classObjectType && destType && destType->classObjectType)
14008 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14011 thisExp->prev = (((void *)0));
14012 thisExp->next = (((void *)0));
14013 __ecereMethod_Expression_Clear(e);
14015 e->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', thisExp->type == 0 ? thisExp : MkExpBrackets(MkListOne(thisExp))));
14016 if(thisExp->expType->kind == 8 && thisExp->expType->__anon1._class && thisExp->expType->__anon1._class->__anon1.registered && thisExp->expType->__anon1._class->__anon1.registered->type == 5)
14017 ((struct Expression *)(*e->__anon1.list).first)->byReference = 1;
14019 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14020 CopyTypeInto(e->expType, thisExp->expType);
14021 e->expType->byReference = 0;
14022 e->expType->refCount = 1;
14023 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))
14025 e->expType->classObjectType = 0;
14030 else if(destType && e->expType && (e->expType->classObjectType == 3 || e->expType->classObjectType == 2) && !destType->classObjectType && destType->kind != 0)
14032 if(destType->kind == 14)
14034 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Unspecified type\n", (((void *)0))));
14036 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))
14038 unsigned int byReference = e->expType->byReference;
14039 struct Expression * thisExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
14040 struct Declarator * decl;
14041 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
14042 char typeString[1024];
14043 struct Type * type;
14044 int backupClassObjectType;
14045 unsigned int backupByReference;
14047 if(e->expType->kind == 8 && e->expType->__anon1._class && e->expType->__anon1._class->__anon1.registered && strcmp(e->expType->__anon1._class->__anon1.registered->name, "class"))
14051 backupClassObjectType = type->classObjectType;
14052 backupByReference = type->byReference;
14053 type->classObjectType = 0;
14054 type->byReference = 0;
14055 typeString[0] = '\0';
14056 PrintType(type, typeString, 0, 1);
14057 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
14058 type->classObjectType = backupClassObjectType;
14059 type->byReference = backupByReference;
14061 thisExp->prev = (((void *)0));
14062 thisExp->next = (((void *)0));
14063 __ecereMethod_Expression_Clear(e);
14064 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)))
14067 e->__anon1.op.op = '*';
14068 e->__anon1.op.exp1 = (((void *)0));
14069 e->__anon1.op.exp2 = MkExpCast(MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl)), thisExp);
14070 e->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14071 CopyTypeInto(e->expType, type);
14072 e->expType->byReference = 0;
14073 e->expType->refCount = 1;
14078 e->__anon1.cast.typeName = MkTypeName(specs, decl);
14079 e->__anon1.cast.exp = thisExp;
14080 e->byReference = 1;
14084 e->destType = destType;
14085 destType->refCount++;
14090 void ApplyLocation(struct Expression * exp, struct Location * loc)
14096 if(exp->__anon1.op.exp1)
14097 ApplyLocation(exp->__anon1.op.exp1, loc);
14098 if(exp->__anon1.op.exp2)
14099 ApplyLocation(exp->__anon1.op.exp2, loc);
14102 if(exp->__anon1.list)
14104 struct Expression * e;
14106 for(e = (*exp->__anon1.list).first; e; e = e->next)
14107 ApplyLocation(e, loc);
14111 if(exp->__anon1.index.index)
14113 struct Expression * e;
14115 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
14116 ApplyLocation(e, loc);
14118 if(exp->__anon1.index.exp)
14119 ApplyLocation(exp->__anon1.index.exp, loc);
14122 if(exp->__anon1.call.arguments)
14124 struct Expression * arg;
14126 for(arg = (*exp->__anon1.call.arguments).first; arg; arg = arg->next)
14127 ApplyLocation(arg, loc);
14129 if(exp->__anon1.call.exp)
14130 ApplyLocation(exp->__anon1.call.exp, loc);
14134 if(exp->__anon1.member.exp)
14135 ApplyLocation(exp->__anon1.member.exp, loc);
14138 if(exp->__anon1.cast.exp)
14139 ApplyLocation(exp->__anon1.cast.exp, loc);
14142 if(exp->__anon1.cond.exp)
14144 struct Expression * e;
14146 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
14147 ApplyLocation(e, loc);
14149 if(exp->__anon1.cond.cond)
14150 ApplyLocation(exp->__anon1.cond.cond, loc);
14151 if(exp->__anon1.cond.elseExp)
14152 ApplyLocation(exp->__anon1.cond.elseExp, loc);
14155 if(exp->__anon1.vaArg.exp)
14156 ApplyLocation(exp->__anon1.vaArg.exp, loc);
14163 extern char * strstr(const char * , const char * );
14165 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DefinedExpression;
14167 struct __ecereNameSpace__ecere__com__DefinedExpression
14169 struct __ecereNameSpace__ecere__com__DefinedExpression * prev;
14170 struct __ecereNameSpace__ecere__com__DefinedExpression * next;
14172 const char * value;
14173 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
14174 } __attribute__ ((gcc_struct));
14176 extern struct __ecereNameSpace__ecere__com__DefinedExpression * __ecereNameSpace__ecere__com__eSystem_FindDefine(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14178 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_FindFunction(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
14180 extern unsigned int __ecereNameSpace__ecere__sys__UTF8GetChar(const char * string, int * numBytes);
14182 extern struct Expression * GetTemplateArgExp(struct TemplateParameter * param, struct __ecereNameSpace__ecere__com__Class * curClass, unsigned int pointer);
14184 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
14186 extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
14188 static void ProcessStatement(struct Statement * stmt);
14190 extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
14192 extern struct Initializer * MkInitializerList(struct __ecereNameSpace__ecere__sys__OldList * list);
14194 extern char * __ecereNameSpace__ecere__com__PrintString(struct __ecereNameSpace__ecere__com__Class * class, const void * object, ...);
14196 extern const char * sourceFile;
14198 extern unsigned int IsVoidPtrCast(struct TypeName * typeName);
14200 extern struct Expression * MoveExpContents(struct Expression * exp);
14202 unsigned int __ecereProp_Type_Get_specConst(struct Type * this);
14204 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_specConst;
14206 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
14208 void ProcessExpressionType(struct Expression * exp)
14210 unsigned int unresolved = 0;
14211 struct Location oldyylloc = yylloc;
14212 unsigned int notByReference = 0;
14214 if(!exp || exp->expType)
14221 struct Identifier * id = exp->__anon1.__anon1.identifier;
14223 if(!id || !topContext)
14225 if(id->_class && id->_class->__anon1.__anon1.name)
14227 id->classSym = id->_class->__anon1.__anon1.symbol;
14229 if(!strcmp(id->string, "__runtimePlatform"))
14231 exp->expType = ProcessTypeString("ecere::com::Platform", 1);
14234 else if(strstr(id->string, "__ecereClass") == id->string)
14236 exp->expType = ProcessTypeString("ecere::com::Class", 1);
14239 else if(id->_class && (id->classSym || (id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))))
14241 ReplaceClassMembers(exp, thisClass);
14244 ProcessExpressionType(exp);
14247 if(id->classSym && ResolveIdWithClass(exp, id->classSym->__anon1.registered, 0))
14252 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14256 if(exp->destType && CheckExpressionType(exp, exp->destType, 0, 0))
14262 ReplaceClassMembers(exp, thisClass ? thisClass : currentClass);
14265 ProcessExpressionType(exp);
14269 else if(currentClass && !id->_class)
14271 if(ResolveIdWithClass(exp, currentClass, 1))
14274 symbol = FindSymbol(id->string, topContext->parent, globalContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14279 struct Type * type = symbol->type;
14280 struct __ecereNameSpace__ecere__com__Class * _class = (type && type->kind == 8 && type->__anon1._class) ? type->__anon1._class->__anon1.registered : (((void *)0));
14282 if(_class && !strcmp(id->string, "this") && !type->classObjectType)
14284 struct Context * context = SetupTemplatesContext(_class);
14286 type = ReplaceThisClassType(_class);
14287 FinishTemplatesContext(context);
14289 type->refCount = 0;
14291 FreeSpecifier(id->_class);
14292 id->_class = (((void *)0));
14293 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14294 id->string = __ecereNameSpace__ecere__sys__CopyString(symbol->string);
14295 id->classSym = (((void *)0));
14296 exp->expType = type;
14299 if(type && (type->kind == 15))
14300 exp->isConstant = 1;
14301 if(symbol->isParam || !strcmp(id->string, "this"))
14303 if(_class && _class->type == 1 && !type->declaredWithStruct)
14304 exp->byReference = 1;
14306 if(symbol->isIterator)
14308 if(symbol->isIterator == 3)
14311 exp->__anon1.list = MkListOne(MkExpOp((((void *)0)), '*', MkExpIdentifier(exp->__anon1.__anon1.identifier)));
14312 ((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2->expType = exp->expType;
14313 exp->expType = (((void *)0));
14314 ProcessExpressionType(exp);
14316 else if(symbol->isIterator != 4)
14319 exp->__anon1.member.exp = MkExpIdentifier(exp->__anon1.__anon1.identifier);
14320 exp->__anon1.member.exp->expType = exp->expType;
14321 exp->__anon1.member.member = MkIdentifier("data");
14322 exp->expType = (((void *)0));
14323 ProcessExpressionType(exp);
14330 struct __ecereNameSpace__ecere__com__DefinedExpression * definedExp = (((void *)0));
14332 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14336 strcpy(name, thisNameSpace);
14337 strcat(name, "::");
14338 strcat(name, id->string);
14339 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, name);
14342 definedExp = __ecereNameSpace__ecere__com__eSystem_FindDefine(privateModule, id->string);
14347 for(c = 0; c < definedExpStackPos; c++)
14348 if(definedExpStack[c] == definedExp)
14350 if(c == definedExpStackPos && c < sizeof (definedExpStack) / sizeof(void *))
14352 struct Location backupYylloc = yylloc;
14353 struct __ecereNameSpace__ecere__com__Instance * backInput = fileInput;
14355 definedExpStack[definedExpStackPos++] = definedExp;
14356 fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
14357 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
14358 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14360 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14361 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, definedExp->value, 1, strlen(definedExp->value));
14362 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
14363 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
14365 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
14366 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
14368 parsedExpression = (((void *)0));
14370 expression_yyparse();
14371 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
14373 fileInput = backInput;
14374 yylloc = backupYylloc;
14375 if(parsedExpression)
14377 FreeIdentifier(id);
14379 exp->__anon1.list = MkListOne(parsedExpression);
14380 ApplyLocation(parsedExpression, &yylloc);
14381 ProcessExpressionType(exp);
14382 definedExpStackPos--;
14385 definedExpStackPos--;
14391 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Recursion in defined expression %s\n", (((void *)0))), id->string);
14397 struct GlobalData * data = (((void *)0));
14399 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14403 strcpy(name, thisNameSpace);
14404 strcat(name, "::");
14405 strcat(name, id->string);
14406 data = FindGlobalData(name);
14409 data = FindGlobalData(id->string);
14412 DeclareGlobalData(data);
14413 exp->expType = data->dataType;
14415 data->dataType->refCount++;
14416 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14417 id->string = __ecereNameSpace__ecere__sys__CopyString(data->fullName);
14418 FreeSpecifier(id->_class);
14419 id->_class = (((void *)0));
14424 struct __ecereNameSpace__ecere__com__GlobalFunction * function = (((void *)0));
14426 if(thisNameSpace && !(id->_class && !id->_class->__anon1.__anon1.name))
14430 strcpy(name, thisNameSpace);
14431 strcat(name, "::");
14432 strcat(name, id->string);
14433 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, name);
14436 function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, id->string);
14441 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14442 id->string = __ecereNameSpace__ecere__sys__CopyString(function->name);
14444 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
14445 strcpy(name, "__ecereFunction_");
14446 FullClassNameCat(name, id->string, 0);
14447 if(DeclareFunction(function, name))
14449 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
14450 id->string = __ecereNameSpace__ecere__sys__CopyString(name);
14452 exp->expType = function->dataType;
14453 if(function->dataType)
14454 function->dataType->refCount++;
14455 FreeSpecifier(id->_class);
14456 id->_class = (((void *)0));
14468 if(!exp->__anon1.instance->_class)
14470 if(exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class)
14472 exp->__anon1.instance->_class = MkSpecifierName(exp->destType->__anon1._class->string);
14475 ProcessInstantiationType(exp->__anon1.instance);
14476 exp->isConstant = exp->__anon1.instance->isConstant;
14477 if(exp->__anon1.instance->_class)
14479 exp->expType = MkClassType(exp->__anon1.instance->_class->__anon1.__anon1.name);
14487 char * constant = exp->__anon1.__anon1.constant;
14488 struct Type * type = (type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), type->refCount = 1, type->constant = 1, type);
14490 exp->expType = type;
14491 if(constant[0] == '\'')
14493 if((int)((unsigned char *)constant)[1] > 127)
14496 unsigned int ch = __ecereNameSpace__ecere__sys__UTF8GetChar(constant + 1, &nb);
14500 (__ecereNameSpace__ecere__com__eSystem_Delete(constant), constant = 0);
14501 exp->__anon1.__anon1.constant = PrintUInt(ch);
14503 type->__anon1._class = FindClass("unichar");
14504 type->isSigned = 0;
14509 type->isSigned = 1;
14514 char * dot = strchr(constant, '.');
14515 unsigned int isHex = (constant[0] == '0' && (constant[1] == 'x' || constant[1] == 'X'));
14520 exponent = strchr(constant, 'p');
14522 exponent = strchr(constant, 'P');
14526 exponent = strchr(constant, 'e');
14528 exponent = strchr(constant, 'E');
14530 if(dot || exponent)
14532 if(strchr(constant, 'f') || strchr(constant, 'F'))
14536 type->isSigned = 1;
14540 unsigned int isSigned = constant[0] == '-';
14541 char * endP = (((void *)0));
14542 long long i64 = strtoll(constant, &endP, 0);
14543 uint64 ui64 = strtoull(constant, &endP, 0);
14544 unsigned int is64Bit = endP && (!strcmp(endP, "LL") || !strcmp(endP, "ll"));
14548 if(i64 < (((int)0x80000000)))
14553 if(ui64 > (((int)0x7fffffff)))
14555 if(ui64 > (0xffffffff))
14558 if(ui64 <= (((long long)0x7fffffffffffffffLL)) && (constant[0] != '0' || !constant[1]))
14562 else if(constant[0] != '0' || !constant[1])
14565 type->kind = is64Bit ? 4 : 3;
14566 type->isSigned = isSigned;
14569 exp->isConstant = 1;
14570 if(exp->destType && exp->destType->kind == 7)
14572 else if(exp->destType && exp->destType->kind == 6)
14574 else if(exp->destType && exp->destType->kind == 4)
14581 exp->isConstant = 1;
14582 exp->expType = __extension__ ({
14583 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14585 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
14586 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14588 __ecereInstance1->refCount = 1, __ecereInstance1->kind = exp->__anon1.__anon2.wideString ? 2 : 1, __ecereInstance1->constant = 1, __ecereInstance1->isSigned = exp->__anon1.__anon2.wideString ? 0 : 1, __ecereInstance1;
14589 }), __ecereInstance2;
14595 ProcessExpressionType(exp->__anon1._new.size);
14596 exp->expType = __extension__ ({
14597 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14599 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._new.typeName->qualifiers, exp->__anon1._new.typeName->declarator), __ecereInstance1;
14601 DeclareType(exp->expType->__anon1.type, 0, 0);
14605 ProcessExpressionType(exp->__anon1._renew.size);
14606 ProcessExpressionType(exp->__anon1._renew.exp);
14607 exp->expType = __extension__ ({
14608 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14610 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = ProcessType(exp->__anon1._renew.typeName->qualifiers, exp->__anon1._renew.typeName->declarator), __ecereInstance1;
14612 DeclareType(exp->expType->__anon1.type, 0, 0);
14616 unsigned int assign = 0, boolResult = 0, boolOps = 0;
14617 struct Type * type1 = (((void *)0)), * type2 = (((void *)0));
14618 unsigned int useDestType = 0, useSideType = 0;
14619 struct Location oldyylloc = yylloc;
14620 unsigned int useSideUnit = 0;
14621 struct __ecereNameSpace__ecere__com__Class * destClass = (exp->destType && exp->destType->kind == 8 && exp->destType->__anon1._class) ? exp->destType->__anon1._class->__anon1.registered : (((void *)0));
14622 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
14624 switch(exp->__anon1.op.op)
14678 if(exp->__anon1.op.exp1)
14685 if(exp->__anon1.op.op == '&')
14687 if(!exp->__anon1.op.exp1 && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->type == 0 && exp->__anon1.op.exp2->__anon1.__anon1.identifier)
14689 struct Identifier * id = exp->__anon1.op.exp2->__anon1.__anon1.identifier;
14690 struct Symbol * symbol = FindSymbol(id->string, curContext, topContext, 0, id->_class && id->_class->__anon1.__anon1.name == (((void *)0)));
14692 if(symbol && symbol->isIterator == 2)
14695 exp->__anon1.member.exp = exp->__anon1.op.exp2;
14696 exp->__anon1.member.member = MkIdentifier("key");
14697 exp->expType = (((void *)0));
14698 exp->__anon1.op.exp2->expType = symbol->type;
14699 symbol->type->refCount++;
14700 ProcessExpressionType(exp);
14706 if(exp->__anon1.op.exp1)
14708 if(exp->__anon1.op.exp2 && useSideUnit && useDestType && destClass && destClass->type == 3 && destClass->base->type != 3)
14710 if(destClass && useDestType && ((destClass->type == 3 && useSideUnit) || destClass->type == 4 || destClass->type == 2))
14712 if(exp->__anon1.op.exp1->destType)
14713 FreeType(exp->__anon1.op.exp1->destType);
14714 exp->__anon1.op.exp1->destType = exp->destType;
14715 exp->__anon1.op.exp1->opDestType = 1;
14717 exp->destType->refCount++;
14721 if(exp->__anon1.op.exp1->destType)
14722 FreeType(exp->__anon1.op.exp1->destType);
14723 exp->__anon1.op.exp1->destType = dummy;
14726 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14727 exp->__anon1.op.exp1->destType->count++;
14728 ProcessExpressionType(exp->__anon1.op.exp1);
14729 if(exp->__anon1.op.exp1->destType && exp->__anon1.op.op != '=')
14730 exp->__anon1.op.exp1->destType->count--;
14731 exp->__anon1.op.exp1->opDestType = 0;
14732 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)
14734 exp->__anon1.op.exp2 = MkExpConstant("1");
14735 exp->__anon1.op.op = exp->__anon1.op.op == INC_OP ? ADD_ASSIGN : SUB_ASSIGN;
14738 if(exp->__anon1.op.exp1->destType == dummy)
14741 exp->__anon1.op.exp1->destType = (((void *)0));
14743 type1 = exp->__anon1.op.exp1->expType;
14745 if(exp->__anon1.op.exp2)
14747 char expString[10240];
14749 expString[0] = '\0';
14750 if(exp->__anon1.op.exp2->type == 1 && !exp->__anon1.op.exp2->__anon1.instance->_class)
14752 if(exp->__anon1.op.exp1)
14754 exp->__anon1.op.exp2->destType = exp->__anon1.op.exp1->expType;
14755 if(exp->__anon1.op.exp1->expType)
14756 exp->__anon1.op.exp1->expType->refCount++;
14760 exp->__anon1.op.exp2->destType = exp->destType;
14761 if(!exp->__anon1.op.exp1 || exp->__anon1.op.op != '&')
14762 exp->__anon1.op.exp2->opDestType = 1;
14764 exp->destType->refCount++;
14768 exp->expType = type1;
14773 PrintExpression(exp->__anon1.op.exp2, expString);
14774 if(type1 && type1->kind == 13)
14776 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)
14777 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "operator %s illegal on pointer\n", (((void *)0))), exp->__anon1.op.op);
14778 else if(exp->__anon1.op.op == '=')
14780 if(exp->__anon1.op.exp2->destType)
14781 FreeType(exp->__anon1.op.exp2->destType);
14782 exp->__anon1.op.exp2->destType = type1;
14789 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)
14793 if(exp->__anon1.op.exp2->destType)
14794 FreeType(exp->__anon1.op.exp2->destType);
14795 exp->__anon1.op.exp2->destType = type1;
14802 exp->expType = type1;
14804 else if(destClass && ((destClass->type == 3 && useDestType && useSideUnit) || (destClass->type == 4 && useDestType)))
14806 if(exp->__anon1.op.exp2->destType)
14807 FreeType(exp->__anon1.op.exp2->destType);
14808 exp->__anon1.op.exp2->destType = exp->destType;
14809 if(exp->__anon1.op.op != '&')
14810 exp->__anon1.op.exp2->opDestType = 1;
14812 exp->destType->refCount++;
14816 if(exp->__anon1.op.exp2->destType)
14817 FreeType(exp->__anon1.op.exp2->destType);
14818 exp->__anon1.op.exp2->destType = dummy;
14821 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))
14823 FreeType(exp->__anon1.op.exp2->destType);
14824 exp->__anon1.op.exp2->destType = type1;
14827 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14828 exp->__anon1.op.exp2->destType->count++;
14829 if(exp->__anon1.op.op == SIZEOF)
14831 struct Expression * e = exp->__anon1.op.exp2;
14833 while((e->type == 5 || e->type == 32 || e->type == 23) && e->__anon1.list)
14835 if(e->type == 5 || e->type == 32 || e->type == 23)
14838 e = (*((struct Statement *)(*e->__anon1.compound->__anon1.compound.statements).last)->__anon1.expressions).last;
14840 e = (*e->__anon1.list).last;
14843 if(e->type == 11 && e->__anon1.cast.exp)
14844 e->__anon1.cast.exp->needCast = 1;
14846 ProcessExpressionType(exp->__anon1.op.exp2);
14847 exp->__anon1.op.exp2->opDestType = 0;
14848 if(exp->__anon1.op.exp2->destType && exp->__anon1.op.op != '=')
14849 exp->__anon1.op.exp2->destType->count--;
14850 if(assign && type1 && type1->kind == 13 && exp->__anon1.op.exp2->expType)
14852 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)
14854 if(exp->__anon1.op.op != '=' && type1->__anon1.type->kind == 0)
14855 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
14857 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)))
14859 if(exp->__anon1.op.op == ADD_ASSIGN)
14860 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14862 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))
14864 if(exp->__anon1.op.op == ADD_ASSIGN)
14865 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
14867 else if(inCompiler)
14869 char type1String[1024];
14870 char type2String[1024];
14872 type1String[0] = '\0';
14873 type2String[0] = '\0';
14874 PrintType(exp->__anon1.op.exp2->expType, type1String, 0, 1);
14875 PrintType(type1, type2String, 0, 1);
14876 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
14877 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1String, type2String);
14880 if(exp->__anon1.op.exp2->destType == dummy)
14883 exp->__anon1.op.exp2->destType = (((void *)0));
14885 if(exp->__anon1.op.op == '-' && !exp->__anon1.op.exp1 && exp->__anon1.op.exp2->expType && !exp->__anon1.op.exp2->expType->isSigned)
14887 type2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14888 type2->refCount = 1;
14889 CopyTypeInto(type2, exp->__anon1.op.exp2->expType);
14890 type2->isSigned = 1;
14892 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))
14894 type2 = __extension__ ({
14895 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14897 __ecereInstance1->kind = 3, __ecereInstance1;
14899 type2->refCount = 1;
14900 type2->isSigned = 1;
14904 type2 = exp->__anon1.op.exp2->expType;
14910 if(exp->__anon1.op.op == SIZEOF)
14912 exp->expType = __extension__ ({
14913 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
14915 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
14917 exp->isConstant = 1;
14919 else if(exp->__anon1.op.op == '*' && !exp->__anon1.op.exp1)
14921 exp->expType = Dereference(type2);
14922 if(type2 && type2->kind == 8)
14923 notByReference = 1;
14925 else if(exp->__anon1.op.op == '&' && !exp->__anon1.op.exp1)
14926 exp->expType = Reference(type2);
14931 if(exp->__anon1.op.exp1)
14933 if(exp->__anon1.op.exp1->destType)
14934 FreeType(exp->__anon1.op.exp1->destType);
14935 exp->__anon1.op.exp1->destType = MkClassType("bool");
14936 exp->__anon1.op.exp1->destType->truth = 1;
14937 if(!exp->__anon1.op.exp1->expType)
14938 ProcessExpressionType(exp->__anon1.op.exp1);
14940 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
14941 FreeType(exp->__anon1.op.exp1->expType);
14942 exp->__anon1.op.exp1->expType = MkClassType("bool");
14943 exp->__anon1.op.exp1->expType->truth = 1;
14945 if(exp->__anon1.op.exp2)
14947 if(exp->__anon1.op.exp2->destType)
14948 FreeType(exp->__anon1.op.exp2->destType);
14949 exp->__anon1.op.exp2->destType = MkClassType("bool");
14950 exp->__anon1.op.exp2->destType->truth = 1;
14951 if(!exp->__anon1.op.exp2->expType)
14952 ProcessExpressionType(exp->__anon1.op.exp2);
14954 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
14955 FreeType(exp->__anon1.op.exp2->expType);
14956 exp->__anon1.op.exp2->expType = MkClassType("bool");
14957 exp->__anon1.op.exp2->expType->truth = 1;
14960 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")))))
14962 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"))))
14964 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)))
14966 struct Type * intType;
14968 if(!type1->__anon1._class->__anon1.registered->dataType)
14969 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
14970 if(!type2->__anon1._class->__anon1.registered->dataType)
14971 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
14972 intType = ProcessTypeString((type1->__anon1._class->__anon1.registered->dataType->kind == 4 || type2->__anon1._class->__anon1.registered->dataType->kind == 4) ? "int64" : "int", 0);
14973 if(exp->__anon1.op.exp1->destType)
14974 FreeType(exp->__anon1.op.exp1->destType);
14975 if(exp->__anon1.op.exp2->destType)
14976 FreeType(exp->__anon1.op.exp2->destType);
14977 exp->__anon1.op.exp1->destType = intType;
14978 exp->__anon1.op.exp2->destType = intType;
14979 intType->refCount++;
14983 if(exp->__anon1.op.exp2->destType)
14984 FreeType(exp->__anon1.op.exp2->destType);
14985 exp->__anon1.op.exp2->destType = type1;
14987 if(exp->__anon1.op.exp1->destType)
14988 FreeType(exp->__anon1.op.exp1->destType);
14989 exp->__anon1.op.exp1->destType = type2;
14992 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)
14993 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);
14994 if(type1->kind == 13 && type1->__anon1.type->kind == 20 && type2->kind != 13)
14996 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
15000 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
15002 exp->__anon1.op.exp1 = MkExpBrackets(MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName("byte")), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp->__anon1.op.exp1)));
15003 ProcessExpressionType(exp->__anon1.op.exp1);
15004 if(type2->kind != 13)
15006 ProcessExpressionType(classExp);
15007 exp->__anon1.op.exp2 = MkExpBrackets(MkListOne(MkExpOp(exp->__anon1.op.exp2, '*', MkExpMember(classExp, MkIdentifier("typeSize")))));
15008 if(!exp->__anon1.op.exp2->expType)
15012 type2 = exp->__anon1.op.exp2->expType = ProcessTypeString("int", 0);
15015 ProcessExpressionType(exp->__anon1.op.exp2);
15019 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)))
15021 if(type1->kind != 8 && type1->__anon1.type->kind == 0)
15022 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
15023 exp->expType = type1;
15027 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)))
15029 if(type2->kind != 8 && type2->__anon1.type->kind == 0)
15030 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "void *: unknown size\n", (((void *)0))));
15031 exp->expType = type2;
15035 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))
15037 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "different levels of indirection\n", (((void *)0))));
15041 unsigned int success = 0;
15043 if(type1->kind == 13 && type2->kind == 13)
15045 if(exp->__anon1.op.op == '+')
15046 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "cannot add two pointers\n", (((void *)0))));
15047 else if(exp->__anon1.op.op == '-')
15049 if(MatchTypes(type1->__anon1.type, type2->__anon1.type, (((void *)0)), (((void *)0)), (((void *)0)), 0, 0, 0, 0, 0))
15051 exp->expType = __extension__ ({
15052 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15054 __ecereInstance1->kind = 3, __ecereInstance1->refCount = 1, __ecereInstance1;
15057 if(type1->__anon1.type->kind == 20)
15059 struct Expression * argExp = GetTemplateArgExp(type1->__anon1.type->__anon1.templateParameter, thisClass, 1);
15063 struct Expression * classExp = MkExpMember(argExp, MkIdentifier("dataTypeClass"));
15065 ProcessExpressionType(classExp);
15067 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"))));
15068 ProcessExpressionType(((struct Expression *)(*exp->__anon1.list).first)->__anon1.op.exp2);
15076 if(!success && exp->__anon1.op.exp1->type == 2)
15078 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15081 FreeType(exp->expType);
15082 exp->expType = exp->__anon1.op.exp1->destType;
15083 if(exp->__anon1.op.exp1->destType)
15084 exp->__anon1.op.exp1->destType->refCount++;
15087 else if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
15090 FreeType(exp->expType);
15091 exp->expType = exp->__anon1.op.exp2->destType;
15092 if(exp->__anon1.op.exp2->destType)
15093 exp->__anon1.op.exp2->destType->refCount++;
15099 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
15102 FreeType(exp->expType);
15103 exp->expType = exp->__anon1.op.exp2->destType;
15104 if(exp->__anon1.op.exp2->destType)
15105 exp->__anon1.op.exp2->destType->refCount++;
15108 else if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15111 FreeType(exp->expType);
15112 exp->expType = exp->__anon1.op.exp1->destType;
15113 if(exp->__anon1.op.exp1->destType)
15114 exp->__anon1.op.exp1->destType->refCount++;
15120 char expString1[10240];
15121 char expString2[10240];
15125 expString1[0] = '\0';
15126 expString2[0] = '\0';
15131 PrintExpression(exp->__anon1.op.exp1, expString1);
15132 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15133 PrintExpression(exp->__anon1.op.exp2, expString2);
15134 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15135 PrintType(exp->__anon1.op.exp1->expType, type1, 0, 1);
15136 PrintType(exp->__anon1.op.exp2->expType, type2, 0, 1);
15138 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1, expString2, type2);
15142 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)
15144 if(exp->__anon1.op.exp1->destType)
15145 FreeType(exp->__anon1.op.exp1->destType);
15146 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15147 if(type2->__anon1._class->__anon1.registered->dataType)
15148 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15149 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
15150 exp->expType = type2;
15154 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)
15156 if(exp->__anon1.op.exp2->destType)
15157 FreeType(exp->__anon1.op.exp2->destType);
15158 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15159 if(type1->__anon1._class->__anon1.registered->dataType)
15160 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15161 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
15162 exp->expType = type1;
15168 unsigned int valid = 0;
15170 if(!boolResult && useSideUnit && type1 && type1->kind == 8 && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3 && type2 && type2->kind != 8)
15172 if(exp->__anon1.op.exp2->destType)
15173 FreeType(exp->__anon1.op.exp2->destType);
15174 if(!type1->__anon1._class->__anon1.registered->dataType)
15175 type1->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type1->__anon1._class->__anon1.registered->dataTypeString, 0);
15176 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15177 exp->__anon1.op.exp2->destType->refCount++;
15178 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
15181 type2 = exp->__anon1.op.exp2->destType;
15184 exp->expType = type2;
15187 if(!boolResult && useSideUnit && type2 && type2->kind == 8 && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3 && type1 && type1->kind != 8)
15189 if(exp->__anon1.op.exp1->destType)
15190 FreeType(exp->__anon1.op.exp1->destType);
15191 if(!type2->__anon1._class->__anon1.registered->dataType)
15192 type2->__anon1._class->__anon1.registered->dataType = ProcessTypeString(type2->__anon1._class->__anon1.registered->dataTypeString, 0);
15193 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15194 exp->__anon1.op.exp1->destType->refCount++;
15195 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
15196 type1 = exp->__anon1.op.exp1->destType;
15197 exp->expType = type1;
15200 if(!boolResult || exp->__anon1.op.op == '>' || exp->__anon1.op.op == '<' || exp->__anon1.op.op == GE_OP || exp->__anon1.op.op == LE_OP)
15202 unsigned int op1IsEnum = type1 && type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4;
15203 unsigned int op2IsEnum = type2 && type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4;
15205 if(exp->__anon1.op.op == '*' || exp->__anon1.op.op == '/' || exp->__anon1.op.op == '-' || exp->__anon1.op.op == '|' || exp->__anon1.op.op == '^')
15207 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15209 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
15212 FreeType(exp->expType);
15213 exp->expType = exp->__anon1.op.exp2->expType;
15214 if(exp->__anon1.op.exp2->expType)
15215 exp->__anon1.op.exp2->expType->refCount++;
15219 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15221 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
15224 FreeType(exp->expType);
15225 exp->expType = exp->__anon1.op.exp1->expType;
15226 if(exp->__anon1.op.exp1->expType)
15227 exp->__anon1.op.exp1->expType->refCount++;
15234 if(op1IsEnum && exp->__anon1.op.exp2->expType)
15236 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp2->expType, 0, 0))
15239 FreeType(exp->expType);
15240 exp->expType = exp->__anon1.op.exp1->expType;
15241 if(exp->__anon1.op.exp1->expType)
15242 exp->__anon1.op.exp1->expType->refCount++;
15246 else if(op2IsEnum && exp->__anon1.op.exp1->expType)
15248 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp1->expType, 0, 0))
15251 FreeType(exp->expType);
15252 exp->expType = exp->__anon1.op.exp2->expType;
15253 if(exp->__anon1.op.exp2->expType)
15254 exp->__anon1.op.exp2->expType->refCount++;
15262 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))
15264 if(exp->__anon1.op.exp1->destType)
15265 FreeType(exp->__anon1.op.exp1->destType);
15266 exp->__anon1.op.exp1->destType = type2;
15268 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15271 FreeType(exp->expType);
15272 exp->expType = exp->__anon1.op.exp1->destType;
15273 if(exp->__anon1.op.exp1->destType)
15274 exp->__anon1.op.exp1->destType->refCount++;
15279 if(exp->__anon1.op.exp2->destType)
15280 FreeType(exp->__anon1.op.exp2->destType);
15281 exp->__anon1.op.exp2->destType = type1;
15283 if(CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0))
15286 FreeType(exp->expType);
15287 exp->expType = exp->__anon1.op.exp2->destType;
15288 if(exp->__anon1.op.exp2->destType)
15289 exp->__anon1.op.exp2->destType->refCount++;
15291 else if(type1 && type2)
15293 char expString1[10240];
15294 char expString2[10240];
15295 char type1String[1024];
15296 char type2String[1024];
15298 expString1[0] = '\0';
15299 expString2[0] = '\0';
15300 type1String[0] = '\0';
15301 type2String[0] = '\0';
15304 PrintExpression(exp->__anon1.op.exp1, expString1);
15305 __ecereNameSpace__ecere__sys__ChangeCh(expString1, '\n', ' ');
15306 PrintExpression(exp->__anon1.op.exp2, expString2);
15307 __ecereNameSpace__ecere__sys__ChangeCh(expString2, '\n', ' ');
15308 PrintType(exp->__anon1.op.exp1->expType, type1String, 0, 1);
15309 PrintType(exp->__anon1.op.exp2->expType, type2String, 0, 1);
15311 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expressions %s (%s) and %s (%s)\n", (((void *)0))), expString1, type1String, expString2, type2String);
15312 if(type1->kind == 8 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 4)
15314 exp->expType = exp->__anon1.op.exp1->expType;
15315 if(exp->__anon1.op.exp1->expType)
15316 exp->__anon1.op.exp1->expType->refCount++;
15318 else if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15320 exp->expType = exp->__anon1.op.exp2->expType;
15321 if(exp->__anon1.op.exp2->expType)
15322 exp->__anon1.op.exp2->expType->refCount++;
15330 if(type2->kind == 8 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 4)
15332 struct Type * oldType = exp->__anon1.op.exp1->expType;
15334 exp->__anon1.op.exp1->expType = (((void *)0));
15335 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15338 exp->__anon1.op.exp1->expType = oldType;
15340 if(exp->__anon1.op.exp1->destType)
15341 FreeType(exp->__anon1.op.exp1->destType);
15342 exp->__anon1.op.exp1->destType = type2;
15344 if(CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0))
15347 FreeType(exp->expType);
15348 exp->expType = exp->__anon1.op.exp1->destType;
15349 if(exp->__anon1.op.exp1->destType)
15350 exp->__anon1.op.exp1->destType->refCount++;
15354 else if(type2 && (!type1 || (type2->kind == 8 && type1->kind != 8)))
15356 if(type1 && type2->__anon1._class && type2->__anon1._class->__anon1.registered && type2->__anon1._class->__anon1.registered->type == 3)
15358 if(exp->__anon1.op.exp1->destType)
15359 FreeType(exp->__anon1.op.exp1->destType);
15360 exp->__anon1.op.exp1->destType = type2->__anon1._class->__anon1.registered->dataType;
15361 if(type2->__anon1._class->__anon1.registered->dataType)
15362 type2->__anon1._class->__anon1.registered->dataType->refCount++;
15363 CheckExpressionType(exp->__anon1.op.exp1, exp->__anon1.op.exp1->destType, 0, 0);
15365 if(exp->__anon1.op.op == '!')
15367 exp->expType = MkClassType("bool");
15368 exp->expType->truth = 1;
15372 exp->expType = type2;
15377 else if(type1 && (!type2 || (type1->kind == 8 && type2->kind != 8)))
15379 if(type2 && type1->__anon1._class && type1->__anon1._class->__anon1.registered && type1->__anon1._class->__anon1.registered->type == 3)
15381 if(exp->__anon1.op.exp2->destType)
15382 FreeType(exp->__anon1.op.exp2->destType);
15383 exp->__anon1.op.exp2->destType = type1->__anon1._class->__anon1.registered->dataType;
15384 if(type1->__anon1._class->__anon1.registered->dataType)
15385 type1->__anon1._class->__anon1.registered->dataType->refCount++;
15386 CheckExpressionType(exp->__anon1.op.exp2, exp->__anon1.op.exp2->destType, 0, 0);
15388 exp->expType = type1;
15394 if(exp->__anon1.op.exp1 && !exp->__anon1.op.exp1->expType)
15396 char expString[10000];
15398 expString[0] = '\0';
15401 PrintExpression(exp->__anon1.op.exp1, expString);
15402 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15405 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15407 if(exp->__anon1.op.exp2 && !exp->__anon1.op.exp2->expType)
15409 char expString[10240];
15411 expString[0] = '\0';
15414 PrintExpression(exp->__anon1.op.exp2, expString);
15415 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
15418 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
15422 FreeType(exp->expType);
15423 exp->expType = MkClassType("bool");
15424 exp->expType->truth = 1;
15426 if(exp->__anon1.op.op != SIZEOF)
15427 exp->isConstant = (!exp->__anon1.op.exp1 || exp->__anon1.op.exp1->isConstant) && (!exp->__anon1.op.exp2 || exp->__anon1.op.exp2->isConstant);
15428 if(exp->__anon1.op.op == SIZEOF && exp->__anon1.op.exp2->expType)
15430 DeclareType(exp->__anon1.op.exp2->expType, 0, 0);
15432 if(exp->__anon1.op.op == DELETE && exp->__anon1.op.exp2 && exp->__anon1.op.exp2->expType && __ecereProp_Type_Get_specConst(exp->__anon1.op.exp2->expType))
15433 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "deleting const qualified object\n", (((void *)0))));
15434 yylloc = oldyylloc;
15443 struct Expression * e;
15445 exp->isConstant = 1;
15446 for(e = (*exp->__anon1.list).first; e; e = e->next)
15448 unsigned int inced = 0;
15452 FreeType(e->destType);
15453 e->opDestType = exp->opDestType;
15454 e->destType = exp->destType;
15457 exp->destType->refCount++;
15458 e->destType->count++;
15462 ProcessExpressionType(e);
15464 exp->destType->count--;
15465 if(!exp->expType && !e->next)
15467 exp->expType = e->expType;
15469 e->expType->refCount++;
15472 exp->isConstant = 0;
15474 e = (*exp->__anon1.list).first;
15475 if(!e->next && e->type == 8)
15477 struct Expression * next = exp->next, * prev = exp->prev;
15479 FreeType(exp->expType);
15480 FreeType(exp->destType);
15481 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
15485 ((e ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)e) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(e)) : 0), e = 0);
15486 ProcessExpressionType(exp);
15492 struct Expression * e;
15494 exp->isConstant = 1;
15495 ProcessExpressionType(exp->__anon1.index.exp);
15496 if(!exp->__anon1.index.exp->isConstant)
15497 exp->isConstant = 0;
15498 if(exp->__anon1.index.exp->expType)
15500 struct Type * source = exp->__anon1.index.exp->expType;
15502 if(source->kind == 8 && source->__anon1._class && source->__anon1._class->__anon1.registered)
15504 struct __ecereNameSpace__ecere__com__Class * _class = source->__anon1._class->__anon1.registered;
15505 struct __ecereNameSpace__ecere__com__Class * c = _class->templateClass ? _class->templateClass : _class;
15507 if(_class != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(c, containerClass) && _class->templateArgs)
15509 exp->expType = ProcessTypeString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, 0);
15510 if(exp->__anon1.index.index && (*exp->__anon1.index.index).last)
15512 struct Type * type = ProcessTypeString(_class->templateArgs[1].__anon1.__anon1.dataTypeString, 0);
15514 if(type->kind == 8)
15515 type->constant = 1;
15516 else if(type->kind == 13)
15518 struct Type * t = type;
15520 while(t->kind == 13)
15521 t = t->__anon1.type;
15524 ((struct Expression *)(*exp->__anon1.index.index).last)->destType = type;
15529 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
15531 if(!e->next && exp->__anon1.index.exp->expType && exp->__anon1.index.exp->expType->kind == 12 && exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass)
15534 FreeType(e->destType);
15535 e->destType = MkClassType(exp->__anon1.index.exp->expType->__anon1.__anon4.enumClass->string);
15537 ProcessExpressionType(e);
15542 exp->isConstant = 0;
15545 exp->expType = Dereference(exp->__anon1.index.exp->expType);
15547 DeclareType(exp->expType, 0, 0);
15552 struct Expression * e;
15553 struct Type * functionType;
15554 struct Type * methodType = (((void *)0));
15560 PrintExpression(exp->__anon1.call.exp, name);
15561 if(exp->__anon1.call.exp->expType && !exp->__anon1.call.exp->expType->__anon1.__anon2.returnType)
15563 PrintExpression(exp->__anon1.call.exp, name);
15566 if(exp->__anon1.call.exp->type == 0)
15568 struct Expression * idExp = exp->__anon1.call.exp;
15569 struct Identifier * id = idExp->__anon1.__anon1.identifier;
15571 if(!strcmp(id->string, "__builtin_frame_address"))
15573 exp->expType = ProcessTypeString("void *", 1);
15574 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15575 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15578 else if(!strcmp(id->string, "__ENDIAN_PAD"))
15580 exp->expType = ProcessTypeString("int", 1);
15581 if(exp->__anon1.call.arguments && (*exp->__anon1.call.arguments).first)
15582 ProcessExpressionType((*exp->__anon1.call.arguments).first);
15585 else if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min") || !strcmp(id->string, "Sgn") || !strcmp(id->string, "Abs"))
15587 struct Expression * a = (((void *)0));
15588 struct Expression * b = (((void *)0));
15589 struct Expression * tempExp1 = (((void *)0)), * tempExp2 = (((void *)0));
15591 if((!strcmp(id->string, "Max") || !strcmp(id->string, "Min")) && (*exp->__anon1.call.arguments).count == 2)
15593 a = (*exp->__anon1.call.arguments).first;
15594 b = (*exp->__anon1.call.arguments).last;
15598 else if((*exp->__anon1.call.arguments).count == 1)
15600 a = (*exp->__anon1.call.arguments).first;
15605 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*exp->__anon1.call.arguments));
15606 idExp->__anon1.__anon1.identifier = (((void *)0));
15607 FreeExpContents(exp);
15608 ProcessExpressionType(a);
15610 ProcessExpressionType(b);
15612 exp->__anon1.list = MkList();
15613 if(a->expType && (!b || b->expType))
15615 if((!a->isConstant && a->type != 0) || (b && !b->isConstant && b->type != 0))
15619 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15620 struct __ecereNameSpace__ecere__sys__OldList * decls = MkList();
15621 struct Declaration * decl;
15622 char temp1[1024], temp2[1024];
15624 GetTypeSpecs(a->expType, specs);
15625 if(a && !a->isConstant && a->type != 0)
15627 sprintf(temp1, "__simpleStruct%d", curContext->simpleID++);
15628 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp1)), (((void *)0))));
15629 tempExp1 = QMkExpId(temp1);
15630 tempExp1->expType = a->expType;
15632 a->expType->refCount++;
15633 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp1), '=', a));
15635 if(b && !b->isConstant && b->type != 0)
15637 sprintf(temp2, "__simpleStruct%d", curContext->simpleID++);
15638 ListAdd(decls, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(temp2)), (((void *)0))));
15639 tempExp2 = QMkExpId(temp2);
15640 tempExp2->expType = b->expType;
15642 b->expType->refCount++;
15643 ListAdd(exp->__anon1.list, MkExpOp(CopyExpression(tempExp2), '=', b));
15645 decl = MkDeclaration(specs, decls);
15646 if(!curCompound->__anon1.compound.declarations)
15647 curCompound->__anon1.compound.declarations = MkList();
15648 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*curCompound->__anon1.compound.declarations), (((void *)0)), decl);
15652 if(!strcmp(id->string, "Max") || !strcmp(id->string, "Min"))
15654 int op = (!strcmp(id->string, "Max")) ? '>' : '<';
15656 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), op, CopyExpression(tempExp2)))), MkListOne(CopyExpression(tempExp1)), CopyExpression(tempExp2)));
15657 exp->expType = a->expType;
15659 a->expType->refCount++;
15661 else if(!strcmp(id->string, "Abs"))
15663 ListAdd(exp->__anon1.list, MkExpCondition(MkExpBrackets(MkListOne(MkExpOp(CopyExpression(tempExp1), '<', MkExpConstant("0")))), MkListOne(MkExpOp((((void *)0)), '-', CopyExpression(tempExp1))), CopyExpression(tempExp1)));
15664 exp->expType = a->expType;
15666 a->expType->refCount++;
15668 else if(!strcmp(id->string, "Sgn"))
15670 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"))))));
15671 exp->expType = ProcessTypeString("int", 0);
15673 FreeExpression(tempExp1);
15675 FreeExpression(tempExp2);
15676 FreeIdentifier(id);
15682 struct Type * dummy = (dummy = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dummy->count = 1, dummy->refCount = 1, dummy);
15684 if(!exp->__anon1.call.exp->destType)
15686 exp->__anon1.call.exp->destType = dummy;
15689 ProcessExpressionType(exp->__anon1.call.exp);
15690 if(exp->__anon1.call.exp->destType == dummy)
15693 exp->__anon1.call.exp->destType = (((void *)0));
15697 functionType = exp->__anon1.call.exp->expType;
15698 if(functionType && functionType->kind == 16)
15700 methodType = functionType;
15701 functionType = methodType->__anon1.__anon3.method->dataType;
15702 if(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass)
15704 char typeString[1024];
15706 typeString[0] = '\0';
15708 struct Symbol * back = functionType->__anon1.__anon2.thisClass;
15710 functionType->__anon1.__anon2.thisClass = (((void *)0));
15711 PrintType(functionType, typeString, 1, 1);
15712 functionType->__anon1.__anon2.thisClass = back;
15714 if(strstr(typeString, "thisclass"))
15716 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
15717 struct Declarator * decl;
15720 struct Context * context = SetupTemplatesContext(exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15722 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
15723 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))
15724 thisClassParams = 0;
15725 ReplaceThisClassSpecifiers(specs, exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass);
15727 struct __ecereNameSpace__ecere__com__Class * backupThisClass = thisClass;
15729 thisClass = exp->__anon1.call.exp->expType->__anon1.__anon3.usedClass;
15730 ProcessDeclarator(decl);
15731 thisClass = backupThisClass;
15733 thisClassParams = 1;
15734 functionType = ProcessType(specs, decl);
15735 functionType->refCount = 0;
15736 FinishTemplatesContext(context);
15738 FreeList(specs, (void *)(FreeSpecifier));
15739 FreeDeclarator(decl);
15743 if(functionType && functionType->kind == 13 && functionType->__anon1.type && functionType->__anon1.type->kind == 11)
15745 struct Type * type = functionType->__anon1.type;
15747 if(!functionType->refCount)
15749 functionType->__anon1.type = (((void *)0));
15750 FreeType(functionType);
15752 functionType = type;
15754 if(functionType && functionType->kind != 11)
15756 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "called object %s is not a function\n", (((void *)0))), name);
15758 else if(functionType)
15760 unsigned int emptyParams = 0, noParams = 0;
15761 struct Expression * e = exp->__anon1.call.arguments ? (*exp->__anon1.call.arguments).first : (((void *)0));
15762 struct Type * type = functionType->__anon1.__anon2.params.first;
15763 struct Expression * memberExp = (exp->__anon1.call.exp->type == 8) ? exp->__anon1.call.exp : (((void *)0));
15765 struct Location oldyylloc = yylloc;
15769 if(functionType->extraParam && e && functionType->__anon1.__anon2.thisClass)
15771 e->destType = MkClassType(functionType->__anon1.__anon2.thisClass->string);
15774 if(!functionType->__anon1.__anon2.staticMethod && !functionType->extraParam)
15776 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)
15778 type = MkClassType(memberExp->__anon1.member.exp->expType->__anon1._class->string);
15781 e->destType = type;
15783 type = functionType->__anon1.__anon2.params.first;
15786 type->refCount = 0;
15788 else if(!memberExp && (functionType->__anon1.__anon2.thisClass || (methodType && methodType->__anon1.__anon3.methodClass)))
15790 type = MkClassType(functionType->__anon1.__anon2.thisClass ? functionType->__anon1.__anon2.thisClass->string : (methodType ? methodType->__anon1.__anon3.methodClass->fullName : (((void *)0))));
15791 type->byReference = functionType->byReference;
15792 type->typedByReference = functionType->typedByReference;
15795 if(e->next && type->kind == 8 && (functionType && functionType->__anon1.__anon2.thisClass) && functionType->classObjectType == 2)
15797 e->destType = type;
15799 type = functionType->__anon1.__anon2.params.first;
15802 type->refCount = 0;
15805 if(type && type->kind == 0)
15808 if(!type->refCount)
15810 type = (((void *)0));
15812 for(; e; e = e->next)
15814 if(!type && !emptyParams)
15817 if(methodType && methodType->__anon1.__anon3.methodClass)
15818 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);
15820 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);
15823 if(methodType && type && type->kind == 20 && type->__anon1.templateParameter->type == 0)
15825 struct Type * templatedType = (((void *)0));
15826 struct __ecereNameSpace__ecere__com__Class * _class = methodType->__anon1.__anon3.usedClass;
15827 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
15830 if(_class && _class->templateArgs)
15832 struct __ecereNameSpace__ecere__com__Class * sClass;
15834 for(sClass = _class; sClass; sClass = sClass->base)
15836 if(sClass->templateClass)
15837 sClass = sClass->templateClass;
15839 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
15841 if(curParam->type == 0 && !strcmp(type->__anon1.templateParameter->identifier->string, curParam->name))
15843 struct __ecereNameSpace__ecere__com__Class * nextClass;
15845 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
15847 if(nextClass->templateClass)
15848 nextClass = nextClass->templateClass;
15849 id += nextClass->templateParams.count;
15859 if(curParam && _class->templateArgs[id].__anon1.__anon1.dataTypeString)
15861 unsigned int constant = type->constant;
15862 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = _class->templateArgs[id];
15865 struct Context * context = SetupTemplatesContext(_class);
15867 templatedType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
15868 FinishTemplatesContext(context);
15870 if(templatedType->kind == 8 && constant)
15871 templatedType->constant = 1;
15872 else if(templatedType->kind == 13)
15874 struct Type * t = templatedType->__anon1.type;
15876 while(t->kind == 13)
15877 t = t->__anon1.type;
15879 t->constant = constant;
15881 e->destType = templatedType;
15884 templatedType->passAsTemplate = 1;
15889 e->destType = type;
15896 if(type && type->kind == 14 && type->prev && type->prev->kind == 8 && type->prev->classObjectType)
15898 e->destType = type->prev;
15899 e->destType->refCount++;
15903 e->destType = type;
15908 if(type && type->kind != 14)
15910 struct Type * next = type->next;
15912 if(!type->refCount)
15917 if(type && type->kind != 14)
15919 if(methodType && methodType->__anon1.__anon3.methodClass)
15920 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);
15922 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);
15924 yylloc = oldyylloc;
15925 if(type && !type->refCount)
15930 functionType = __extension__ ({
15931 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15933 __ecereInstance1->refCount = 0, __ecereInstance1->kind = 11, __ecereInstance1;
15935 if(exp->__anon1.call.exp->type == 0)
15937 char * string = exp->__anon1.call.exp->__anon1.__anon1.identifier->string;
15941 struct Symbol * symbol;
15942 struct Location oldyylloc = yylloc;
15944 yylloc = exp->__anon1.call.exp->__anon1.__anon1.identifier->loc;
15945 if(strstr(string, "__builtin_") == string)
15949 functionType->__anon1.__anon2.returnType = exp->destType;
15950 exp->destType->refCount++;
15954 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "%s undefined; assuming extern returning int\n", (((void *)0))), string);
15955 symbol = __extension__ ({
15956 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
15958 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = ProcessTypeString("int()", 1), __ecereInstance1;
15960 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
15961 if(strstr(symbol->string, "::"))
15962 globalContext->hasNameSpace = 1;
15963 yylloc = oldyylloc;
15966 else if(exp->__anon1.call.exp->type == 8)
15970 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "callable object undefined; extern assuming returning int\n", (((void *)0))));
15971 if(!functionType->__anon1.__anon2.returnType)
15973 functionType->__anon1.__anon2.returnType = __extension__ ({
15974 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
15976 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 3, __ecereInstance1;
15980 if(functionType && functionType->kind == 11)
15982 exp->expType = functionType->__anon1.__anon2.returnType;
15983 if(functionType->__anon1.__anon2.returnType)
15984 functionType->__anon1.__anon2.returnType->refCount++;
15985 if(!functionType->refCount)
15986 FreeType(functionType);
15988 if(exp->__anon1.call.arguments)
15990 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
15991 ProcessExpressionType(e);
15997 struct Type * type;
15998 struct Location oldyylloc = yylloc;
15999 unsigned int thisPtr;
16000 struct Expression * checkExp = exp->__anon1.member.exp;
16004 if(checkExp->type == 11)
16005 checkExp = checkExp->__anon1.cast.exp;
16006 else if(checkExp->type == 5)
16007 checkExp = checkExp->__anon1.list ? (*checkExp->__anon1.list).first : (((void *)0));
16011 thisPtr = (checkExp && checkExp->type == 0 && !strcmp(checkExp->__anon1.__anon1.identifier->string, "this"));
16012 exp->thisPtr = thisPtr;
16013 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
16015 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
16017 ProcessExpressionType(exp->__anon1.member.exp);
16018 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)
16020 exp->isConstant = 0;
16023 exp->isConstant = exp->__anon1.member.exp->isConstant;
16024 type = exp->__anon1.member.exp->expType;
16026 if(type && (type->kind == 20))
16028 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
16029 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param = (((void *)0));
16033 for(param = _class->templateParams.first; param; param = param->next)
16035 if(param->type == 1 && exp->__anon1.member.member && exp->__anon1.member.member->string && !strcmp(param->name, exp->__anon1.member.member->string))
16039 if(param && param->defaultArg.__anon1.__anon2.__anon1.member)
16041 struct Expression * argExp = GetTemplateArgExpByName(param->name, thisClass, 1);
16045 struct Expression * expMember = exp->__anon1.member.exp;
16046 struct Declarator * decl;
16047 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16048 char thisClassTypeString[1024];
16050 FreeIdentifier(exp->__anon1.member.member);
16051 ProcessExpressionType(argExp);
16053 char * colon = strstr(param->defaultArg.__anon1.__anon2.memberString, "::");
16057 memcpy(thisClassTypeString, param->defaultArg.__anon1.__anon2.memberString, colon - param->defaultArg.__anon1.__anon2.memberString);
16058 thisClassTypeString[colon - param->defaultArg.__anon1.__anon2.memberString] = '\0';
16061 strcpy(thisClassTypeString, _class->fullName);
16063 decl = SpecDeclFromString(param->defaultArg.__anon1.__anon2.__anon1.member->dataTypeString, specs, (((void *)0)));
16064 exp->expType = ProcessType(specs, decl);
16065 if(exp->expType->kind == 8 && exp->expType->__anon1._class && exp->expType->__anon1._class->__anon1.registered && exp->expType->__anon1._class->__anon1.registered->templateClass)
16067 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
16068 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
16069 int paramCount = 0;
16070 int lastParam = -1;
16071 char templateString[1024];
16072 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
16074 sprintf(templateString, "%s<", expClass->templateClass->fullName);
16075 for(cClass = expClass; cClass; cClass = cClass->base)
16079 for(param = cClass->templateParams.first; param; param = param->next)
16082 struct __ecereNameSpace__ecere__com__Class * sClass;
16083 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
16085 for(sClass = cClass->base; sClass; sClass = sClass->base)
16086 id += sClass->templateParams.count;
16087 arg = expClass->templateArgs[id];
16088 for(sClass = _class; sClass; sClass = sClass->base)
16090 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * cParam;
16092 struct __ecereNameSpace__ecere__com__Class * nextClass;
16094 for(nextClass = sClass->base; nextClass; nextClass = nextClass->base)
16095 p += nextClass->templateParams.count;
16096 for(cParam = sClass->templateParams.first; cParam; cParam = cParam->next, p++)
16098 if(cParam->type == 0 && arg.__anon1.__anon1.dataTypeString && !strcmp(cParam->name, arg.__anon1.__anon1.dataTypeString))
16100 if(_class->templateArgs && arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16102 arg.__anon1.__anon1.dataTypeString = _class->templateArgs[p].__anon1.__anon1.dataTypeString;
16103 arg.__anon1.__anon1.dataTypeClass = _class->templateArgs[p].__anon1.__anon1.dataTypeClass;
16110 char argument[256];
16112 argument[0] = '\0';
16113 switch(param->type)
16117 char expString[1024];
16118 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16119 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16120 struct Expression * exp;
16121 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16123 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16124 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16125 ProcessExpressionType(exp);
16126 ComputeExpression(exp);
16127 expString[0] = '\0';
16128 PrintExpression(exp, expString);
16129 strcat(argument, expString);
16130 FreeExpression(exp);
16135 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16140 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16142 if(!strcmp(arg.__anon1.__anon1.dataTypeString, "thisclass"))
16143 strcat(argument, thisClassTypeString);
16145 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16153 strcat(templateString, ", ");
16154 if(lastParam != p - 1)
16156 strcat(templateString, param->name);
16157 strcat(templateString, " = ");
16159 strcat(templateString, argument);
16168 int len = strlen(templateString);
16170 if(templateString[len - 1] == '>')
16171 templateString[len++] = ' ';
16172 templateString[len++] = '>';
16173 templateString[len++] = '\0';
16176 struct Context * context = SetupTemplatesContext(_class);
16178 FreeType(exp->expType);
16179 exp->expType = ProcessTypeString(templateString, 0);
16180 FinishTemplatesContext(context);
16183 if(!__ecereProp_Type_Get_isPointerType(expMember->expType))
16184 expMember = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), expMember);
16186 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")))))))));
16189 else if(type->__anon1.templateParameter && type->__anon1.templateParameter->type == 0 && (type->__anon1.templateParameter->__anon1.dataType || type->__anon1.templateParameter->dataTypeString))
16191 type = ProcessTemplateParameterType(type->__anon1.templateParameter);
16194 if(type && (type->kind == 20))
16196 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)))
16198 struct Identifier * id = exp->__anon1.member.member;
16199 int typeKind = type->kind;
16200 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));
16202 if(typeKind == 19 && exp->__anon1.member.exp->type == 24)
16204 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
16209 if(typeKind == 3 || typeKind == 15)
16210 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "int");
16213 if(type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
16215 _class = type->__anon1._class->__anon1.registered;
16217 else if((type->kind == 12 || type->kind == 13) && type->__anon1.type && type->__anon1.type->kind == 1)
16219 _class = FindClass("char *")->__anon1.registered;
16221 else if(type->kind == 13)
16223 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "uintptr");
16224 FreeType(exp->expType);
16225 exp->expType = ProcessTypeString("uintptr", 0);
16226 exp->byReference = 1;
16230 char string[1024] = "";
16231 struct Symbol * classSym;
16233 PrintTypeNoConst(type, string, 0, 1);
16234 classSym = FindClass(string);
16236 _class = classSym->__anon1.registered;
16242 struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
16243 struct __ecereNameSpace__ecere__com__Method * method = (((void *)0));
16244 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
16245 struct __ecereNameSpace__ecere__com__Property * revConvert = (((void *)0));
16246 struct __ecereNameSpace__ecere__com__ClassProperty * classProp = (((void *)0));
16248 if(id && id->_class && id->_class->__anon1.__anon1.name && !strcmp(id->_class->__anon1.__anon1.name, "property"))
16249 exp->__anon1.member.memberType = 1;
16250 if(id && id->_class && type->__anon1._class && !__ecereNameSpace__ecere__com__eClass_IsDerived(type->__anon1._class->__anon1.registered, _class))
16251 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "invalid class specifier %s for object of class %s\n", (((void *)0))), _class->fullName, type->__anon1._class->string);
16254 if((exp->__anon1.member.memberType == 0 && thisPtr) || exp->__anon1.member.memberType == 3)
16256 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16257 if(member && member->_class != (_class->templateClass ? _class->templateClass : _class) && exp->__anon1.member.memberType != 3)
16259 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16261 member = (((void *)0));
16263 if(!member && !prop)
16264 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16265 if((member && member->_class == (_class->templateClass ? _class->templateClass : _class)) || (prop && prop->_class == (_class->templateClass ? _class->templateClass : _class)))
16266 exp->__anon1.member.thisPtr = 1;
16270 unsigned int useMemberForNonConst = 0;
16274 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, (((void *)0)));
16275 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);
16276 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16277 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, (((void *)0)), (((void *)0)), (((void *)0)));
16279 if((!prop || useMemberForNonConst) && !member)
16281 method = useMemberForNonConst ? (((void *)0)) : __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, (((void *)0)));
16284 prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, id->string, privateModule);
16285 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);
16286 if(useMemberForNonConst || !id->_class || !id->_class->__anon1.__anon1.name || strcmp(id->_class->__anon1.__anon1.name, "property"))
16287 member = __ecereNameSpace__ecere__com__eClass_FindDataMember(_class, id->string, privateModule, (((void *)0)), (((void *)0)));
16292 if(useMemberForNonConst || (member->_class != prop->_class && !id->_class && __ecereNameSpace__ecere__com__eClass_IsDerived(member->_class, prop->_class)))
16293 prop = (((void *)0));
16295 member = (((void *)0));
16299 if(!prop && !member && !method)
16300 method = __ecereNameSpace__ecere__com__eClass_FindMethod(_class, id->string, privateModule);
16301 if(!prop && !member && !method)
16305 classProp = __ecereNameSpace__ecere__com__eClass_FindClassProperty(type->__anon1._class->__anon1.registered, exp->__anon1.member.member->string);
16308 exp->__anon1.member.memberType = 5;
16309 exp->expType = ProcessTypeString(classProp->dataTypeString, 0);
16313 char structName[1024];
16314 struct Identifier * id = exp->__anon1.member.member;
16315 struct Expression * classExp = exp->__anon1.member.exp;
16318 FreeType(classExp->expType);
16319 classExp->expType = ProcessTypeString("ecere::com::Class", 0);
16320 strcpy(structName, "__ecereClassData_");
16321 FullClassNameCat(structName, type->__anon1._class->string, 0);
16323 exp->__anon1.member.member = id;
16324 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"))))))));
16326 ProcessExpressionType(exp);
16332 struct Symbol * classSym = FindClass(id->string);
16336 struct __ecereNameSpace__ecere__com__Class * convertClass = classSym->__anon1.registered;
16339 revConvert = __ecereNameSpace__ecere__com__eClass_FindProperty(convertClass, _class->fullName, privateModule);
16343 if(exp->__anon1.member.exp->destType)
16344 FreeType(exp->__anon1.member.exp->destType);
16346 if(method && !method->_class->symbol)
16347 method->_class->symbol = FindClass(method->_class->fullName);
16348 if(prop && !prop->_class->symbol)
16349 prop->_class->symbol = FindClass(prop->_class->fullName);
16350 exp->__anon1.member.exp->destType = __extension__ ({
16351 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16353 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 8, __ecereInstance1->__anon1._class = prop ? prop->_class->symbol : method ? method->_class->symbol : _class->symbol, __ecereInstance1;
16358 exp->__anon1.member.memberType = 1;
16359 if(!prop->dataType)
16360 ProcessPropertyType(prop);
16361 exp->expType = prop->dataType;
16362 if(!strcmp(_class->base->fullName, "eda::Row") && !exp->expType->constant && !exp->destType)
16364 struct Type * type = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16366 CopyTypeInto(type, exp->expType);
16367 type->refCount = 1;
16368 type->constant = 1;
16369 exp->expType = type;
16371 else if(prop->dataType)
16372 prop->dataType->refCount++;
16376 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16378 FreeExpContents(exp);
16380 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16381 ProcessExpressionType(exp);
16384 exp->__anon1.member.memberType = 3;
16385 DeclareStruct(_class->fullName, 0);
16386 if(!member->dataType)
16388 struct Context * context = SetupTemplatesContext(_class);
16390 member->dataType = ProcessTypeString(member->dataTypeString, 0);
16391 FinishTemplatesContext(context);
16393 exp->expType = member->dataType;
16394 if(member->dataType)
16395 member->dataType->refCount++;
16397 else if(revConvert)
16399 exp->__anon1.member.memberType = 4;
16400 exp->expType = MkClassType(revConvert->_class->fullName);
16405 exp->__anon1.member.memberType = 2;
16407 if(!method->dataType)
16408 ProcessMethodType(method);
16409 exp->expType = __extension__ ({
16410 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16412 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 16, __ecereInstance1->__anon1.__anon3.method = method, __ecereInstance1;
16414 exp->expType->__anon1.__anon3.methodClass = (id && id->_class) ? _class : (((void *)0));
16415 exp->expType->__anon1.__anon3.usedClass = _class;
16417 else if(!classProp)
16419 if(exp->__anon1.member.exp->expType->classObjectType == 2 && !strcmp(exp->__anon1.member.member->string, "_class"))
16421 FreeExpContents(exp);
16423 exp->__anon1.__anon1.identifier = MkIdentifier("class");
16424 FreeType(exp->expType);
16425 exp->expType = MkClassType("ecere::com::Class");
16428 yylloc = exp->__anon1.member.member->loc;
16429 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't find member %s in class %s\n", (((void *)0))), id->string, _class->fullName);
16431 __ecereNameSpace__ecere__com__eClass_AddDataMember(_class, id->string, "int", 0, 0, 1);
16433 if(_class && exp->expType)
16435 struct __ecereNameSpace__ecere__com__Class * tClass;
16437 tClass = type->__anon1._class && type->__anon1._class->__anon1.registered ? type->__anon1._class->__anon1.registered : _class;
16438 while(tClass && !tClass->templateClass)
16439 tClass = tClass->base;
16440 if(tClass && exp->expType->kind == 20 && exp->expType->__anon1.templateParameter->type == 0)
16443 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16444 struct __ecereNameSpace__ecere__com__Class * sClass;
16446 for(sClass = tClass; sClass; sClass = sClass->base)
16449 if(sClass->templateClass)
16450 sClass = sClass->templateClass;
16451 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16453 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.templateParameter->identifier->string, curParam->name))
16455 for(sClass = sClass->base; sClass; sClass = sClass->base)
16456 id += sClass->templateParams.count;
16464 if(curParam && tClass->templateArgs[id].__anon1.__anon1.dataTypeString)
16466 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16467 struct Context * context = SetupTemplatesContext(tClass);
16468 unsigned int constant = exp->expType->constant;
16470 FreeType(exp->expType);
16471 exp->expType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16472 if(exp->expType->kind == 8 && constant)
16473 exp->expType->constant = 1;
16474 else if(exp->expType->kind == 13)
16476 struct Type * t = exp->expType->__anon1.type;
16478 while(t->kind == 13)
16479 t = t->__anon1.type;
16481 t->constant = constant;
16485 if(exp->expType->kind == 21)
16487 FreeType(exp->expType);
16488 exp->expType = ReplaceThisClassType(_class);
16490 if(tClass->templateClass && (exp->expType->kind != 20 || (!exp->expType->__anon1.templateParameter || (!exp->expType->__anon1.templateParameter->dataTypeString && !exp->expType->__anon1.templateParameter->__anon1.dataType))))
16491 exp->expType->passAsTemplate = 1;
16494 exp->destType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16495 if(exp->destType->kind == 8 && constant)
16496 exp->destType->constant = 1;
16497 else if(exp->destType->kind == 13)
16499 struct Type * t = exp->destType->__anon1.type;
16501 while(t->kind == 13)
16502 t = t->__anon1.type;
16504 t->constant = constant;
16506 if(exp->destType->kind == 21)
16508 FreeType(exp->destType);
16509 exp->destType = ReplaceThisClassType(_class);
16513 FinishTemplatesContext(context);
16516 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)
16519 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * curParam = (((void *)0));
16520 struct __ecereNameSpace__ecere__com__Class * sClass;
16522 for(sClass = tClass; sClass; sClass = sClass->base)
16525 if(sClass->templateClass)
16526 sClass = sClass->templateClass;
16527 for(curParam = sClass->templateParams.first; curParam; curParam = curParam->next)
16529 if(curParam->type == 0 && !strcmp(exp->expType->__anon1.type->__anon1.templateParameter->identifier->string, curParam->name))
16531 for(sClass = sClass->base; sClass; sClass = sClass->base)
16532 id += sClass->templateParams.count;
16542 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg = tClass->templateArgs[id];
16543 struct Context * context = SetupTemplatesContext(tClass);
16544 struct Type * basicType;
16546 basicType = ProcessTypeString(arg.__anon1.__anon1.dataTypeString, 0);
16549 if(basicType->kind == 21)
16551 FreeType(basicType);
16552 basicType = ReplaceThisClassType(_class);
16554 FreeType(exp->expType);
16555 exp->expType = __extension__ ({
16556 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16558 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->__anon1.type = basicType, __ecereInstance1;
16562 exp->destType = exp->expType;
16563 exp->destType->refCount++;
16566 struct Expression * newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
16567 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16568 struct Declarator * decl;
16570 decl = SpecDeclFromString(arg.__anon1.__anon1.dataTypeString, specs, (((void *)0)));
16573 exp->destType->refCount++;
16575 exp->expType->refCount++;
16577 exp->__anon1.cast.typeName = MkTypeName(specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl));
16578 exp->__anon1.cast.exp = newExp;
16581 FinishTemplatesContext(context);
16584 else if(tClass && exp->expType->kind == 8 && exp->expType->__anon1._class && strchr(exp->expType->__anon1._class->string, '<'))
16586 struct __ecereNameSpace__ecere__com__Class * expClass = exp->expType->__anon1._class->__anon1.registered;
16590 struct __ecereNameSpace__ecere__com__Class * cClass = (((void *)0));
16592 int paramCount = 0;
16593 int lastParam = -1;
16594 char templateString[1024];
16595 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
16597 sprintf(templateString, "%s<", expClass->templateClass->fullName);
16598 while(cClass != expClass)
16600 struct __ecereNameSpace__ecere__com__Class * sClass;
16602 for(sClass = expClass; sClass && sClass->base != cClass; sClass = sClass->base)
16605 for(param = cClass->templateParams.first; param; param = param->next)
16607 struct __ecereNameSpace__ecere__com__Class * cClassCur = (((void *)0));
16609 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * paramCur = (((void *)0));
16610 struct __ecereNameSpace__ecere__com__ClassTemplateArgument arg;
16612 while(cClassCur != tClass && !paramCur)
16614 struct __ecereNameSpace__ecere__com__Class * sClassCur;
16616 for(sClassCur = tClass; sClassCur && sClassCur->base != cClassCur; sClassCur = sClassCur->base)
16618 cClassCur = sClassCur;
16619 for(paramCur = cClassCur->templateParams.first; paramCur; paramCur = paramCur->next)
16621 if(!strcmp(paramCur->name, param->name))
16628 if(paramCur && paramCur->type == 0)
16629 arg = tClass->templateArgs[cp];
16631 arg = expClass->templateArgs[p];
16633 char argument[256];
16635 argument[0] = '\0';
16636 switch(param->type)
16640 char expString[1024];
16641 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
16642 struct Declarator * decl = SpecDeclFromString(param->__anon1.dataTypeString, specs, (((void *)0)));
16643 struct Expression * exp;
16644 char * string = PrintHexUInt64(arg.__anon1.expression.__anon1.ui64);
16646 exp = MkExpCast(MkTypeName(specs, decl), MkExpConstant(string));
16647 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
16648 ProcessExpressionType(exp);
16649 ComputeExpression(exp);
16650 expString[0] = '\0';
16651 PrintExpression(exp, expString);
16652 strcat(argument, expString);
16653 FreeExpression(exp);
16658 strcat(argument, arg.__anon1.__anon2.__anon1.member->name);
16663 if(arg.__anon1.__anon1.dataTypeString && (!param->defaultArg.__anon1.__anon1.dataTypeString || strcmp(arg.__anon1.__anon1.dataTypeString, param->defaultArg.__anon1.__anon1.dataTypeString)))
16664 strcat(argument, arg.__anon1.__anon1.dataTypeString);
16671 strcat(templateString, ", ");
16672 if(lastParam != p - 1)
16674 strcat(templateString, param->name);
16675 strcat(templateString, " = ");
16677 strcat(templateString, argument);
16686 int len = strlen(templateString);
16688 if(templateString[len - 1] == '>')
16689 templateString[len++] = ' ';
16690 templateString[len++] = '>';
16691 templateString[len++] = '\0';
16693 FreeType(exp->expType);
16695 struct Context * context = SetupTemplatesContext(tClass);
16697 exp->expType = ProcessTypeString(templateString, 0);
16698 FinishTemplatesContext(context);
16705 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)");
16707 else if(type && (type->kind == 9 || type->kind == 10))
16709 struct Type * memberType = exp->__anon1.member.member ? FindMember(type, exp->__anon1.member.member->string) : (((void *)0));
16713 exp->expType = memberType;
16715 memberType->refCount++;
16720 char expString[10240];
16722 expString[0] = '\0';
16725 PrintExpression(exp, expString);
16726 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
16728 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "member operator on non-structure type expression %s\n", (((void *)0))), expString);
16730 if(exp->expType && exp->expType->kind == 21 && (!exp->destType || exp->destType->kind != 21))
16732 if(type && (type->kind == 8 || type->kind == 19 || type->kind == 3 || type->kind == 15))
16734 struct Identifier * id = exp->__anon1.member.member;
16735 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));
16739 FreeType(exp->expType);
16740 exp->expType = ReplaceThisClassType(_class);
16744 yylloc = oldyylloc;
16749 struct Type * destType = exp->destType;
16751 if(exp->__anon1.member.member && exp->__anon1.member.member->_class && exp->__anon1.member.member->_class->__anon1.__anon1.name)
16753 exp->__anon1.member.member->classSym = exp->__anon1.member.member->_class->__anon1.__anon1.symbol;
16755 exp->__anon1.member.exp = MkExpBrackets(MkListOne(MkExpOp((((void *)0)), '*', exp->__anon1.member.exp)));
16759 ProcessExpressionType(exp);
16766 struct Symbol * classSym = exp->__anon1._class->__anon1.__anon1.symbol;
16768 if(classSym && classSym->__anon1.registered)
16770 if(classSym->__anon1.registered->type == 5)
16775 DeclareStruct(classSym->string, 0);
16776 FreeSpecifier(exp->__anon1._class);
16778 FullClassNameCat(name, classSym->string, 0);
16779 exp->__anon1.typeName = MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(name), (((void *)0)))), (((void *)0)));
16783 if(classSym->__anon1.registered->fixed)
16785 FreeSpecifier(exp->__anon1._class);
16786 exp->__anon1.__anon1.constant = PrintUInt(classSym->__anon1.registered->templateClass ? classSym->__anon1.registered->templateClass->structSize : classSym->__anon1.registered->structSize);
16791 char className[1024];
16793 strcpy(className, "__ecereClass_");
16794 FullClassNameCat(className, classSym->string, 1);
16795 DeclareClass(classSym, className);
16796 FreeExpContents(exp);
16798 exp->__anon1.member.exp = MkExpIdentifier(MkIdentifier(className));
16799 exp->__anon1.member.member = MkIdentifier("structSize");
16803 exp->expType = __extension__ ({
16804 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16806 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16812 struct Type * type = ProcessType(exp->__anon1.typeName->qualifiers, exp->__anon1.typeName->declarator);
16814 exp->expType = __extension__ ({
16815 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
16817 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 23, __ecereInstance1;
16819 exp->isConstant = 1;
16820 DeclareType(type, 0, 0);
16826 struct Type * type = ProcessType(exp->__anon1.cast.typeName->qualifiers, exp->__anon1.cast.typeName->declarator);
16829 FreeType(exp->__anon1.cast.exp->destType);
16830 exp->__anon1.cast.exp->destType = type;
16833 ProcessExpressionType(exp->__anon1.cast.exp);
16836 exp->expType = type;
16837 if(!exp->__anon1.cast.exp->needCast && !NeedCast(exp->__anon1.cast.exp->expType, type))
16839 void * prev = exp->prev, * next = exp->next;
16840 struct Type * expType = exp->__anon1.cast.exp->destType;
16841 struct Expression * castExp = exp->__anon1.cast.exp;
16842 struct Type * destType = exp->destType;
16845 expType->refCount++;
16846 FreeType(exp->expType);
16847 FreeTypeName(exp->__anon1.cast.typeName);
16849 FreeType(exp->expType);
16850 FreeType(exp->destType);
16851 exp->expType = expType;
16852 exp->destType = destType;
16853 ((castExp ? (__ecereClass_Expression->Destructor ? __ecereClass_Expression->Destructor((void *)castExp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(castExp)) : 0), castExp = 0);
16859 exp->isConstant = exp->__anon1.cast.exp->isConstant;
16865 struct Type * type = ProcessType(exp->__anon1.initializer.typeName->qualifiers, exp->__anon1.initializer.typeName->declarator);
16867 exp->expType = type;
16872 struct Type * type = ProcessType(exp->__anon1.vaArg.typeName->qualifiers, exp->__anon1.vaArg.typeName->declarator);
16874 ProcessExpressionType(exp->__anon1.vaArg.exp);
16875 exp->expType = type;
16880 struct Expression * e;
16882 exp->isConstant = 1;
16883 FreeType(exp->__anon1.cond.cond->destType);
16884 exp->__anon1.cond.cond->destType = MkClassType("bool");
16885 exp->__anon1.cond.cond->destType->truth = 1;
16886 ProcessExpressionType(exp->__anon1.cond.cond);
16887 if(!exp->__anon1.cond.cond->isConstant)
16888 exp->isConstant = 0;
16889 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
16893 FreeType(e->destType);
16894 e->destType = exp->destType;
16896 e->destType->refCount++;
16898 ProcessExpressionType(e);
16901 exp->expType = e->expType;
16903 e->expType->refCount++;
16906 exp->isConstant = 0;
16908 FreeType(exp->__anon1.cond.elseExp->destType);
16909 exp->__anon1.cond.elseExp->destType = exp->destType ? exp->destType : exp->expType;
16910 if(exp->__anon1.cond.elseExp->destType)
16911 exp->__anon1.cond.elseExp->destType->refCount++;
16912 ProcessExpressionType(exp->__anon1.cond.elseExp);
16913 if(!exp->__anon1.cond.elseExp->isConstant)
16914 exp->isConstant = 0;
16919 if(exp->__anon1.compound && exp->__anon1.compound->__anon1.compound.statements && (*exp->__anon1.compound->__anon1.compound.statements).last)
16921 struct Statement * last = (*exp->__anon1.compound->__anon1.compound.statements).last;
16923 if(last->type == 3 && last->__anon1.expressions && (*last->__anon1.expressions).last)
16925 ((struct Expression *)(*last->__anon1.expressions).last)->destType = exp->destType;
16927 exp->destType->refCount++;
16929 ProcessStatement(exp->__anon1.compound);
16930 exp->expType = (last->__anon1.expressions && (*last->__anon1.expressions).last) ? ((struct Expression *)(*last->__anon1.expressions).last)->expType : (((void *)0));
16932 exp->expType->refCount++;
16938 struct Specifier * spec = (*exp->__anon1._classExp.specifiers).first;
16940 if(spec && spec->type == 1)
16942 exp->expType = MkClassType(spec->__anon1.__anon1.name);
16943 exp->expType->kind = 19;
16944 exp->byReference = 1;
16948 exp->expType = MkClassType("ecere::com::Class");
16949 exp->byReference = 1;
16955 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
16959 struct Identifier * id = exp->__anon1.classData.id;
16960 char structName[1024];
16961 struct Expression * classExp;
16963 strcpy(structName, "__ecereClassData_");
16964 FullClassNameCat(structName, _class->fullName, 0);
16966 exp->__anon1.member.member = id;
16967 if(curCompound && FindSymbol("this", curContext, curCompound->__anon1.compound.context, 0, 0))
16968 classExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), MkIdentifier("_class"));
16970 classExp = MkExpIdentifier(MkIdentifier("class"));
16971 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"))))))));
16972 ProcessExpressionType(exp);
16979 struct Type * type = (((void *)0));
16980 const char * typeString = (((void *)0));
16981 char typeStringBuf[1024];
16983 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))
16985 struct __ecereNameSpace__ecere__com__Class * templateClass = exp->destType->__anon1._class->__anon1.registered;
16987 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
16989 else if(exp->__anon1.list)
16991 struct Expression * e;
16993 for(e = (*exp->__anon1.list).first; e; e = e->next)
16995 ProcessExpressionType(e);
17005 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
17009 e->expType = (((void *)0));
17010 e = (*exp->__anon1.list).first;
17011 ProcessExpressionType(e);
17014 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
17016 FreeType(e->expType);
17017 e->expType = (((void *)0));
17019 type = (((void *)0));
17027 FreeType(e->expType);
17028 e->expType = (((void *)0));
17034 typeStringBuf[0] = '\0';
17035 PrintTypeNoConst(type, typeStringBuf, 0, 1);
17036 typeString = typeStringBuf;
17038 type = (((void *)0));
17043 char templateString[1024];
17044 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
17045 struct __ecereNameSpace__ecere__sys__OldList * structInitializers = MkList();
17046 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17047 struct Expression * expExt;
17048 struct Declarator * decl = SpecDeclFromString(typeString, specs, (((void *)0)));
17050 sprintf(templateString, "Container<%s>", typeString);
17051 if(exp->__anon1.list)
17053 struct Expression * e;
17055 type = ProcessTypeString(typeString, 0);
17056 while((e = (*exp->__anon1.list).first))
17058 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->__anon1.list), e);
17059 e->destType = type;
17061 ProcessExpressionType(e);
17062 ListAdd(initializers, MkInitializerAssignment(e));
17065 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->__anon1.list), exp->__anon1.list = 0);
17067 DeclareStruct("ecere::com::BuiltInContainer", 0);
17068 ListAdd(structInitializers, MkInitializerAssignment(MkExpMember(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkIdentifier("_vTbl"))));
17069 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17070 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0)))));
17071 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17072 ListAdd(structInitializers, MkInitializerAssignment(MkExpConstant("0")));
17073 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17074 ListAdd(structInitializers, MkInitializerAssignment(MkExpExtensionInitializer(MkTypeName(specs, MkDeclaratorArray(decl, (((void *)0)))), MkInitializerList(initializers))));
17075 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17076 ListAdd(structInitializers, MkInitializerAssignment(__extension__ ({
17077 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
17079 __ecereInstance1->type = 2, __ecereInstance1->__anon1.__anon1.constant = __ecereNameSpace__ecere__com__PrintString(__ecereClass_int, (void *)&(*initializers).count, (void *)0), __ecereInstance1;
17081 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17082 ListAdd(structInitializers, MkInitializerAssignment(MkExpClass(CopyList(specs, (void *)(CopySpecifier)), CopyDeclarator(decl))));
17083 ProcessExpressionType(((struct Initializer *)(*structInitializers).last)->__anon1.exp);
17084 exp->expType = ProcessTypeString(templateString, 0);
17086 exp->__anon1.list = MkListOne(MkExpCast(MkTypeName(MkListOne(MkSpecifierName(templateString)), (((void *)0))), MkExpOp((((void *)0)), '&', expExt = MkExpExtensionInitializer(MkTypeName(MkListOne(MkSpecifierName("BuiltInContainer")), (((void *)0))), MkInitializerList(structInitializers)))));
17087 ProcessExpressionType(expExt);
17091 exp->expType = ProcessTypeString("Container", 0);
17092 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
17097 if(exp->expType && exp->expType->kind == 21 && thisClass && (!exp->destType || exp->destType->kind != 21))
17099 FreeType(exp->expType);
17100 exp->expType = ReplaceThisClassType(thisClass);
17102 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)
17104 struct Symbol * symbol = FindSymbol(exp->expType->__anon1.__anon1.enumName, curContext, globalContext, 1, 0);
17108 if(exp->expType->kind != 15)
17110 struct Type * member;
17111 char * enumName = __ecereNameSpace__ecere__sys__CopyString(exp->expType->__anon1.__anon1.enumName);
17113 FreeType(exp->expType);
17114 exp->expType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
17115 exp->expType->kind = symbol->type->kind;
17116 exp->expType->refCount++;
17117 exp->expType->__anon1.__anon1.enumName = enumName;
17118 exp->expType->__anon1.__anon1.members = symbol->type->__anon1.__anon1.members;
17119 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17120 member->refCount++;
17124 struct __ecereNameSpace__ecere__sys__NamedLink64 * member;
17126 for(member = symbol->type->__anon1.__anon1.members.first; member; member = member->next)
17128 struct __ecereNameSpace__ecere__sys__NamedLink64 * value = (value = __ecereNameSpace__ecere__com__eSystem_New0(structSize_NamedLink64), value->name = __ecereNameSpace__ecere__sys__CopyString(member->name), value);
17130 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&exp->expType->__anon1.__anon1.members, value);
17136 if(exp->destType && (exp->destType->kind == 18))
17138 else if(exp->destType && !exp->destType->keepCast)
17140 if(!exp->needTemplateCast && exp->expType && (exp->expType->kind == 20 || exp->expType->passAsTemplate))
17141 exp->needTemplateCast = 1;
17142 if(exp->destType->kind == 0)
17144 else if(!CheckExpressionType(exp, exp->destType, 0, !exp->destType->casted))
17146 if(!exp->destType->count || unresolved)
17151 if(exp->destType->kind != 14)
17158 char expString[10240];
17160 expString[0] = '\0';
17161 PrintType(exp->destType, type2, 0, 1);
17164 PrintExpression(exp, expString);
17165 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17168 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s; expected %s\n", (((void *)0))), expString, type2);
17169 else if(exp->type != 16)
17170 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s; expected %s\n", (((void *)0))), expString, type2);
17175 char expString[10240];
17177 expString[0] = '\0';
17180 PrintExpression(exp, expString);
17181 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17184 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), expString);
17185 else if(exp->type != 16)
17186 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17198 PrintType(exp->expType, type1, 0, 1);
17199 PrintType(exp->destType, type2, 0, 1);
17201 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)))
17205 char expString[10240];
17207 expString[0] = '\0';
17210 PrintExpression(exp, expString);
17211 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17213 if(!sourceFile || (!strstr(sourceFile, "src\\lexer.ec") && !strstr(sourceFile, "src/lexer.ec") && !strstr(sourceFile, "src\\grammar.ec") && !strstr(sourceFile, "src/grammar.ec") && !strstr(sourceFile, "src\\type.ec") && !strstr(sourceFile, "src/type.ec") && !strstr(sourceFile, "src\\expression.ec") && !strstr(sourceFile, "src/expression.ec")))
17214 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "incompatible expression %s (%s); expected %s\n", (((void *)0))), expString, type1, type2);
17215 FreeType(exp->expType);
17216 exp->destType->refCount++;
17217 exp->expType = exp->destType;
17222 else if(exp->destType && exp->destType->kind == 13 && exp->destType->__anon1.type && exp->destType->__anon1.type->kind == 11 && exp->expType && (exp->expType->kind == 11 || exp->expType->kind == 16))
17224 struct Expression * nbExp = GetNonBracketsExp(exp);
17226 if(nbExp->type != 11 || !IsVoidPtrCast(nbExp->__anon1.cast.typeName))
17228 struct Expression * e = MoveExpContents(exp);
17230 exp->__anon1.cast.exp = MkExpBrackets(MkListOne(e));
17232 exp->__anon1.cast.exp->destType = exp->destType;
17234 exp->destType->refCount++;
17235 exp->__anon1.cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0))));
17239 else if(unresolved)
17241 if(exp->__anon1.__anon1.identifier->_class && exp->__anon1.__anon1.identifier->_class->__anon1.__anon1.name)
17242 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);
17243 else if(exp->__anon1.__anon1.identifier->string && exp->__anon1.__anon1.identifier->string[0])
17244 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "unresolved identifier %s\n", (((void *)0))), exp->__anon1.__anon1.identifier->string);
17246 else if(!exp->expType && exp->type != 16)
17248 char expString[10240];
17250 expString[0] = '\0';
17253 PrintExpression(exp, expString);
17254 __ecereNameSpace__ecere__sys__ChangeCh(expString, '\n', ' ');
17256 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "couldn't determine type of %s\n", (((void *)0))), expString);
17259 ApplyAnyObjectLogic(exp);
17260 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)))
17262 exp->byReference = 1;
17264 yylloc = oldyylloc;
17267 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)
17271 *curMember = (*curMember)->next;
17272 if(subMemberStackPos && *subMemberStackPos > 0 && subMemberStack[*subMemberStackPos - 1]->type == 1)
17274 *curMember = subMemberStack[--(*subMemberStackPos)];
17275 *curMember = (*curMember)->next;
17277 while((*curMember) && (*curMember)->isProperty)
17278 *curMember = (*curMember)->next;
17279 if(subMemberStackPos)
17281 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17283 subMemberStack[(*subMemberStackPos)++] = *curMember;
17284 *curMember = (*curMember)->members.first;
17285 while(*curMember && (*curMember)->isProperty)
17286 *curMember = (*curMember)->next;
17294 if(subMemberStackPos && *subMemberStackPos)
17296 *curMember = subMemberStack[--(*subMemberStackPos)];
17297 *curMember = (*curMember)->next;
17301 struct __ecereNameSpace__ecere__com__Class * lastCurClass = *curClass;
17303 if(*curClass == _class)
17305 for(*curClass = _class; (*curClass)->base != lastCurClass && (*curClass)->base->type != 1000; *curClass = (*curClass)->base)
17307 *curMember = (*curClass)->membersAndProperties.first;
17309 while((*curMember) && (*curMember)->isProperty)
17310 *curMember = (*curMember)->next;
17311 if(subMemberStackPos)
17313 while((*curMember) && !(*curMember)->isProperty && !(*curMember)->name && ((*curMember)->type == 2 || (*curMember)->type == 1))
17315 subMemberStack[(*subMemberStackPos)++] = *curMember;
17316 *curMember = (*curMember)->members.first;
17317 while(*curMember && (*curMember)->isProperty)
17318 *curMember = (*curMember)->next;
17325 static void ProcessInitializer(struct Initializer * init, struct Type * type)
17330 if(!init->__anon1.exp || init->__anon1.exp->type != 1 || !init->__anon1.exp->__anon1.instance || init->__anon1.exp->__anon1.instance->_class || !type || type->kind == 8)
17332 if(init->__anon1.exp && !init->__anon1.exp->destType)
17334 FreeType(init->__anon1.exp->destType);
17335 init->__anon1.exp->destType = type;
17339 if(init->__anon1.exp)
17341 ProcessExpressionType(init->__anon1.exp);
17342 init->isConstant = init->__anon1.exp->isConstant;
17348 struct Expression * exp = init->__anon1.exp;
17349 struct Instantiation * inst = exp->__anon1.instance;
17350 struct MembersInit * members;
17353 init->__anon1.list = MkList();
17356 for(members = (*inst->members).first; members; members = members->next)
17358 if(members->type == 0)
17360 struct MemberInit * member;
17362 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
17364 ListAdd(init->__anon1.list, member->initializer);
17365 member->initializer = (((void *)0));
17370 FreeExpression(exp);
17374 struct Initializer * i;
17375 struct Type * initializerType = (((void *)0));
17376 struct __ecereNameSpace__ecere__com__Class * curClass = (((void *)0));
17377 struct __ecereNameSpace__ecere__com__DataMember * curMember = (((void *)0));
17378 struct __ecereNameSpace__ecere__com__DataMember * subMemberStack[256];
17379 int subMemberStackPos = 0;
17381 if(type && type->kind == 12)
17382 initializerType = Dereference(type);
17383 else if(type && (type->kind == 9 || type->kind == 10))
17384 initializerType = type->__anon1.__anon1.members.first;
17385 for(i = (*init->__anon1.list).first; i; i = i->next)
17387 if(type && type->kind == 8 && type->__anon1._class && type->__anon1._class->__anon1.registered)
17389 FindNextDataMember(type->__anon1._class->__anon1.registered, &curClass, &curMember, subMemberStack, &subMemberStackPos);
17392 if(!curMember->dataType)
17393 curMember->dataType = ProcessTypeString(curMember->dataTypeString, 0);
17394 initializerType = curMember->dataType;
17397 ProcessInitializer(i, initializerType);
17398 if(initializerType && type && (type->kind == 9 || type->kind == 10))
17399 initializerType = initializerType->next;
17401 init->isConstant = 0;
17403 if(type && type->kind == 12)
17404 FreeType(initializerType);
17405 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))
17407 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Assigning list initializer to non list\n", (((void *)0))));
17414 extern struct Symbol * FindType(struct Context * ctx, const char * name);
17416 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol);
17418 static void ProcessSpecifier(struct Specifier * spec, unsigned int declareStruct)
17424 if(spec->__anon1.specifier == THISCLASS)
17429 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17430 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17431 ProcessSpecifier(spec, declareStruct);
17438 struct Symbol * symbol = FindType(curContext, spec->__anon1.__anon1.name);
17441 DeclareType(symbol->type, 1, 1);
17442 else if((symbol = spec->__anon1.__anon1.symbol) && symbol->__anon1.registered && symbol->__anon1.registered->type == 1 && declareStruct)
17443 DeclareStruct(spec->__anon1.__anon1.name, 0);
17448 struct Enumerator * e;
17450 if(spec->__anon1.__anon2.list)
17452 for(e = (*spec->__anon1.__anon2.list).first; e; e = e->next)
17455 ProcessExpressionType(e->exp);
17463 if(spec->__anon1.__anon2.definitions)
17465 struct Symbol * symbol = spec->__anon1.__anon2.id ? FindClass(spec->__anon1.__anon2.id->string) : (((void *)0));
17467 ProcessClass(spec->__anon1.__anon2.definitions, symbol);
17474 static void ProcessDeclarator(struct Declarator * decl)
17479 if(decl->__anon1.identifier->classSym)
17481 FreeSpecifier(decl->__anon1.identifier->_class);
17482 decl->__anon1.identifier->_class = (((void *)0));
17486 if(decl->__anon1.array.exp)
17487 ProcessExpressionType(decl->__anon1.array.exp);
17494 if(decl->declarator)
17495 ProcessDeclarator(decl->declarator);
17496 if(decl->type == 4)
17498 struct Identifier * id = GetDeclId(decl);
17500 if(id && id->_class)
17502 struct TypeName * param = (param = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName), param->qualifiers = MkListOne(id->_class), param->declarator = (((void *)0)), param);
17504 if(!decl->__anon1.function.parameters)
17505 decl->__anon1.function.parameters = MkList();
17506 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), (((void *)0)), param);
17507 id->_class = (((void *)0));
17509 if(decl->__anon1.function.parameters)
17511 struct TypeName * param;
17513 for(param = (*decl->__anon1.function.parameters).first; param; param = param->next)
17515 if(param->qualifiers && (*param->qualifiers).first)
17517 struct Specifier * spec = (*param->qualifiers).first;
17519 if(spec && spec->__anon1.specifier == TYPED_OBJECT)
17521 struct Declarator * d = param->declarator;
17522 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);
17525 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*newParam->qualifiers), (((void *)0)), MkSpecifier(CONST));
17526 FreeList(param->qualifiers, (void *)(FreeSpecifier));
17527 param->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
17528 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class")));
17529 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*decl->__anon1.function.parameters), param, newParam);
17532 else if(spec && spec->__anon1.specifier == ANY_OBJECT)
17534 struct Declarator * d = param->declarator;
17536 FreeList(param->qualifiers, (void *)(FreeSpecifier));
17537 param->qualifiers = MkListOne(MkSpecifier(VOID));
17539 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*param->qualifiers), (((void *)0)), MkSpecifier(CONST));
17540 param->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), d);
17542 else if(spec->__anon1.specifier == THISCLASS)
17547 spec->__anon1.__anon1.name = ReplaceThisClass(thisClass);
17548 spec->__anon1.__anon1.symbol = FindClass(spec->__anon1.__anon1.name);
17549 ProcessSpecifier(spec, 0);
17553 if(param->declarator)
17554 ProcessDeclarator(param->declarator);
17562 extern struct Identifier * CopyIdentifier(struct Identifier * id);
17564 extern void FreeInitDeclarator(struct InitDeclarator * decl);
17566 static void ProcessDeclaration(struct Declaration * decl)
17568 yylloc = decl->loc;
17573 unsigned int declareStruct = 0;
17575 if(decl->__anon1.__anon1.declarators)
17577 struct InitDeclarator * d;
17579 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17581 struct Type * type, * subType;
17583 ProcessDeclarator(d->declarator);
17584 type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17587 ProcessInitializer(d->initializer, type);
17588 if((*decl->__anon1.__anon1.declarators).count == 1 && d->initializer->type == 0 && d->initializer->__anon1.exp->type == 1)
17590 if(type->kind == 8 && type->__anon1._class == d->initializer->__anon1.exp->expType->__anon1._class)
17592 struct Instantiation * inst = d->initializer->__anon1.exp->__anon1.instance;
17594 inst->exp = MkExpIdentifier(CopyIdentifier(GetDeclId(d->declarator)));
17595 d->initializer->__anon1.exp->__anon1.instance = (((void *)0));
17596 if(decl->__anon1.__anon1.specifiers)
17597 FreeList(decl->__anon1.__anon1.specifiers, (void *)(FreeSpecifier));
17598 FreeList(decl->__anon1.__anon1.declarators, (void *)(FreeInitDeclarator));
17601 decl->__anon1.inst = inst;
17605 for(subType = type; subType; )
17607 if(subType->kind == 8)
17612 else if(subType->kind == 13)
17614 else if(subType->kind == 12)
17615 subType = subType->__anon1.__anon4.arrayType;
17624 if(decl->__anon1.__anon1.specifiers)
17626 struct Specifier * s;
17628 for(s = (*decl->__anon1.__anon1.specifiers).first; s; s = s->next)
17630 ProcessSpecifier(s, declareStruct);
17637 ProcessInstantiationType(decl->__anon1.inst);
17642 struct Specifier * spec;
17643 struct Declarator * d;
17644 unsigned int declareStruct = 0;
17646 if(decl->__anon1.__anon1.declarators)
17648 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
17650 struct Type * type = ProcessType(decl->__anon1.__anon1.specifiers, d->declarator);
17651 struct Type * subType;
17653 ProcessDeclarator(d);
17654 for(subType = type; subType; )
17656 if(subType->kind == 8)
17661 else if(subType->kind == 13)
17663 else if(subType->kind == 12)
17664 subType = subType->__anon1.__anon4.arrayType;
17671 if(decl->__anon1.__anon1.specifiers)
17673 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
17674 ProcessSpecifier(spec, declareStruct);
17681 static struct FunctionDefinition * curFunction;
17683 static void CreateFireWatcher(struct __ecereNameSpace__ecere__com__Property * prop, struct Expression * object, struct Statement * stmt)
17685 char propName[1024], propNameM[1024];
17686 char getName[1024], setName[1024];
17687 struct __ecereNameSpace__ecere__sys__OldList * args;
17689 DeclareProperty(prop, setName, getName);
17690 strcpy(propName, "__ecereProp_");
17691 FullClassNameCat(propName, prop->_class->fullName, 0);
17692 strcat(propName, "_");
17693 FullClassNameCat(propName, prop->name, 1);
17694 strcpy(propNameM, "__ecerePropM_");
17695 FullClassNameCat(propNameM, prop->_class->fullName, 0);
17696 strcat(propNameM, "_");
17697 FullClassNameCat(propNameM, prop->name, 1);
17698 if(prop->isWatchable)
17701 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17702 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17703 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17705 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17706 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17707 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireWatchers")), args));
17711 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17712 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
17713 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17715 ListAdd(args, object ? CopyExpression(object) : MkExpIdentifier(MkIdentifier("this")));
17716 ListAdd(args, MkExpIdentifier(MkIdentifier(propNameM)));
17717 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_FireSelfWatchers")), args));
17719 if(curFunction->propSet && !strcmp(curFunction->propSet->string, prop->name) && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
17720 curFunction->propSet->fireWatchersDone = 1;
17723 extern struct Declaration * MkDeclarationInst(struct Instantiation * inst);
17725 extern struct Instantiation * MkInstantiationNamed(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
17727 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
17729 extern struct Statement * MkForStmt(struct Statement * init, struct Statement * check, struct __ecereNameSpace__ecere__sys__OldList * inc, struct Statement * statement);
17731 extern struct Statement * MkWhileStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement);
17733 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
17735 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
17737 extern void FreePropertyWatch(struct PropertyWatch * watcher);
17739 static void ProcessStatement(struct Statement * stmt)
17741 yylloc = stmt->loc;
17745 ProcessStatement(stmt->__anon1.labeled.stmt);
17748 if(stmt->__anon1.caseStmt.exp)
17750 FreeType(stmt->__anon1.caseStmt.exp->destType);
17751 stmt->__anon1.caseStmt.exp->destType = curSwitchType;
17753 curSwitchType->refCount++;
17754 ProcessExpressionType(stmt->__anon1.caseStmt.exp);
17755 ComputeExpression(stmt->__anon1.caseStmt.exp);
17757 if(stmt->__anon1.caseStmt.stmt)
17758 ProcessStatement(stmt->__anon1.caseStmt.stmt);
17762 if(stmt->__anon1.compound.context)
17764 struct Declaration * decl;
17765 struct Statement * s;
17766 struct Statement * prevCompound = curCompound;
17767 struct Context * prevContext = curContext;
17769 if(!stmt->__anon1.compound.isSwitch)
17770 curCompound = stmt;
17771 curContext = stmt->__anon1.compound.context;
17772 if(stmt->__anon1.compound.declarations)
17774 for(decl = (*stmt->__anon1.compound.declarations).first; decl; decl = decl->next)
17775 ProcessDeclaration(decl);
17777 if(stmt->__anon1.compound.statements)
17779 for(s = (*stmt->__anon1.compound.statements).first; s; s = s->next)
17780 ProcessStatement(s);
17782 curContext = prevContext;
17783 curCompound = prevCompound;
17789 struct Expression * exp;
17791 if(stmt->__anon1.expressions)
17793 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
17794 ProcessExpressionType(exp);
17800 struct Expression * exp;
17802 FreeType(((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType);
17803 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType = MkClassType("bool");
17804 ((struct Expression *)(*stmt->__anon1.ifStmt.exp).last)->destType->truth = 1;
17805 for(exp = (*stmt->__anon1.ifStmt.exp).first; exp; exp = exp->next)
17807 ProcessExpressionType(exp);
17809 if(stmt->__anon1.ifStmt.stmt)
17810 ProcessStatement(stmt->__anon1.ifStmt.stmt);
17811 if(stmt->__anon1.ifStmt.elseStmt)
17812 ProcessStatement(stmt->__anon1.ifStmt.elseStmt);
17817 struct Type * oldSwitchType = curSwitchType;
17819 if(stmt->__anon1.switchStmt.exp)
17821 struct Expression * exp;
17823 for(exp = (*stmt->__anon1.switchStmt.exp).first; exp; exp = exp->next)
17827 ProcessExpressionType(exp);
17830 curSwitchType = exp->expType;
17833 ProcessStatement(stmt->__anon1.switchStmt.stmt);
17834 curSwitchType = oldSwitchType;
17839 if(stmt->__anon1.whileStmt.exp)
17841 struct Expression * exp;
17843 FreeType(((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType);
17844 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType = MkClassType("bool");
17845 ((struct Expression *)(*stmt->__anon1.whileStmt.exp).last)->destType->truth = 1;
17846 for(exp = (*stmt->__anon1.whileStmt.exp).first; exp; exp = exp->next)
17848 ProcessExpressionType(exp);
17851 if(stmt->__anon1.whileStmt.stmt)
17852 ProcessStatement(stmt->__anon1.whileStmt.stmt);
17857 if(stmt->__anon1.doWhile.exp)
17859 struct Expression * exp;
17861 if((*stmt->__anon1.doWhile.exp).last)
17863 FreeType(((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType);
17864 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType = MkClassType("bool");
17865 ((struct Expression *)(*stmt->__anon1.doWhile.exp).last)->destType->truth = 1;
17867 for(exp = (*stmt->__anon1.doWhile.exp).first; exp; exp = exp->next)
17869 ProcessExpressionType(exp);
17872 if(stmt->__anon1.doWhile.stmt)
17873 ProcessStatement(stmt->__anon1.doWhile.stmt);
17878 struct Expression * exp;
17880 if(stmt->__anon1.forStmt.init)
17881 ProcessStatement(stmt->__anon1.forStmt.init);
17882 if(stmt->__anon1.forStmt.check && stmt->__anon1.forStmt.check->__anon1.expressions)
17884 FreeType(((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType);
17885 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType = MkClassType("bool");
17886 ((struct Expression *)(*stmt->__anon1.forStmt.check->__anon1.expressions).last)->destType->truth = 1;
17888 if(stmt->__anon1.forStmt.check)
17889 ProcessStatement(stmt->__anon1.forStmt.check);
17890 if(stmt->__anon1.forStmt.increment)
17892 for(exp = (*stmt->__anon1.forStmt.increment).first; exp; exp = exp->next)
17893 ProcessExpressionType(exp);
17895 if(stmt->__anon1.forStmt.stmt)
17896 ProcessStatement(stmt->__anon1.forStmt.stmt);
17901 struct Identifier * id = stmt->__anon1.forEachStmt.id;
17902 struct __ecereNameSpace__ecere__sys__OldList * exp = stmt->__anon1.forEachStmt.exp;
17903 struct __ecereNameSpace__ecere__sys__OldList * filter = stmt->__anon1.forEachStmt.filter;
17904 struct Statement * block = stmt->__anon1.forEachStmt.stmt;
17905 char iteratorType[1024];
17906 struct Type * source;
17907 struct Expression * e;
17908 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));
17909 struct Expression * arrayExp;
17910 const char * typeString = (((void *)0));
17911 int builtinCount = 0;
17913 for(e = exp ? (*exp).first : (((void *)0)); e; e = e->next)
17917 FreeType(e->destType);
17918 e->destType = ProcessTypeString("Container", 0);
17920 if(!isBuiltin || e->next)
17921 ProcessExpressionType(e);
17923 source = (exp && (*exp).last) ? ((struct Expression *)(*exp).last)->expType : (((void *)0));
17924 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)))
17926 struct __ecereNameSpace__ecere__com__Class * _class = source ? source->__anon1._class->__anon1.registered : (((void *)0));
17927 struct Symbol * symbol;
17928 struct Expression * expIt = (((void *)0));
17929 unsigned int isMap = 0, isArray = 0, isLinkList = 0, isList = 0, isCustomAVLTree = 0;
17930 struct __ecereNameSpace__ecere__com__Class * arrayClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Array");
17931 struct __ecereNameSpace__ecere__com__Class * linkListClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "LinkList");
17932 struct __ecereNameSpace__ecere__com__Class * customAVLTreeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "CustomAVLTree");
17935 stmt->__anon1.compound.context = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
17936 stmt->__anon1.compound.context->parent = curContext;
17937 curContext = stmt->__anon1.compound.context;
17938 if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, customAVLTreeClass))
17940 struct __ecereNameSpace__ecere__com__Class * mapClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "Map");
17942 isCustomAVLTree = 1;
17943 if(__ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, mapClass))
17946 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, arrayClass))
17948 else if(source && __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, linkListClass))
17950 struct __ecereNameSpace__ecere__com__Class * listClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "List");
17953 isList = __ecereNameSpace__ecere__com__eClass_IsDerived(source->__anon1._class->__anon1.registered, listClass);
17957 struct Declarator * decl;
17958 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
17960 decl = SpecDeclFromString(_class->templateArgs[2].__anon1.__anon1.dataTypeString, specs, MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(id)));
17961 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
17962 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), MkInitializerAssignment(MkExpBrackets(exp))))));
17966 struct Type * type = (((void *)0));
17967 char typeStringBuf[1024];
17969 arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->__anon1.cast.exp;
17970 if(((struct Expression *)(*exp).last)->type == 11)
17972 struct TypeName * typeName = ((struct Expression *)(*exp).last)->__anon1.cast.typeName;
17975 arrayExp->destType = ProcessType(typeName->qualifiers, typeName->declarator);
17977 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)
17979 struct __ecereNameSpace__ecere__com__Class * templateClass = arrayExp->destType->__anon1._class->__anon1.registered;
17981 typeString = templateClass->templateArgs[2].__anon1.__anon1.dataTypeString;
17983 else if(arrayExp->__anon1.list)
17985 struct Expression * e;
17987 for(e = (*arrayExp->__anon1.list).first; e; e = e->next)
17989 ProcessExpressionType(e);
17999 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18003 e->expType = (((void *)0));
18004 e = (*arrayExp->__anon1.list).first;
18005 ProcessExpressionType(e);
18008 if(!MatchTypeExpression(e, type, (((void *)0)), 0, 1))
18010 FreeType(e->expType);
18011 e->expType = (((void *)0));
18013 type = (((void *)0));
18021 FreeType(e->expType);
18022 e->expType = (((void *)0));
18028 typeStringBuf[0] = '\0';
18029 PrintType(type, typeStringBuf, 0, 1);
18030 typeString = typeStringBuf;
18036 struct __ecereNameSpace__ecere__sys__OldList * initializers = MkList();
18037 struct Declarator * decl;
18038 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18040 if(arrayExp->__anon1.list)
18042 struct Expression * e;
18044 builtinCount = (*arrayExp->__anon1.list).count;
18045 type = ProcessTypeString(typeString, 0);
18046 while((e = (*arrayExp->__anon1.list).first))
18048 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*arrayExp->__anon1.list), e);
18049 e->destType = type;
18051 ProcessExpressionType(e);
18052 ListAdd(initializers, MkInitializerAssignment(e));
18055 (__ecereNameSpace__ecere__com__eSystem_Delete(arrayExp->__anon1.list), arrayExp->__anon1.list = 0);
18057 decl = SpecDeclFromString(typeString, specs, MkDeclaratorIdentifier(id));
18058 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(CopyList(specs, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), decl), (((void *)0))))));
18059 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(specs, MkListOne(MkInitDeclarator(PlugDeclarator(decl, MkDeclaratorArray(MkDeclaratorIdentifier(MkIdentifier("__internalArray")), (((void *)0)))), MkInitializerList(initializers)))));
18060 FreeList(exp, (void *)(FreeExpression));
18064 arrayExp->expType = ProcessTypeString("Container", 0);
18065 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't determine type of array elements\n", (((void *)0))));
18068 else if(isLinkList && !isList)
18070 struct Declarator * decl;
18071 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18073 decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, MkDeclaratorIdentifier(id));
18074 stmt->__anon1.compound.declarations = MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(decl, (((void *)0))))));
18075 ListAdd(stmt->__anon1.compound.declarations, MkDeclaration(MkListOne(MkSpecifierName(source->__anon1._class->__anon1.registered->fullName)), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internalLinkList")), MkInitializerAssignment(MkExpBrackets(exp))))));
18077 else if(_class->templateArgs)
18080 sprintf(iteratorType, "MapIterator<%s, %s >", _class->templateArgs[5].__anon1.__anon1.dataTypeString, _class->templateArgs[6].__anon1.__anon1.dataTypeString);
18082 sprintf(iteratorType, "Iterator<%s, %s >", _class->templateArgs[2].__anon1.__anon1.dataTypeString, _class->templateArgs[1].__anon1.__anon1.dataTypeString);
18083 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)))))))));
18085 symbol = FindSymbol(id->string, curContext, curContext, 0, 0);
18088 switch(block->type)
18091 if(block->__anon1.compound.context)
18092 block->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18095 if(block->__anon1.ifStmt.stmt && block->__anon1.ifStmt.stmt->type == 2 && block->__anon1.ifStmt.stmt->__anon1.compound.context)
18096 block->__anon1.ifStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18097 if(block->__anon1.ifStmt.elseStmt && block->__anon1.ifStmt.elseStmt->type == 2 && block->__anon1.ifStmt.elseStmt->__anon1.compound.context)
18098 block->__anon1.ifStmt.elseStmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18101 if(block->__anon1.switchStmt.stmt && block->__anon1.switchStmt.stmt->type == 2 && block->__anon1.switchStmt.stmt->__anon1.compound.context)
18102 block->__anon1.switchStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18105 if(block->__anon1.whileStmt.stmt && block->__anon1.whileStmt.stmt->type == 2 && block->__anon1.whileStmt.stmt->__anon1.compound.context)
18106 block->__anon1.whileStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18109 if(block->__anon1.doWhile.stmt && block->__anon1.doWhile.stmt->type == 2 && block->__anon1.doWhile.stmt->__anon1.compound.context)
18110 block->__anon1.doWhile.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18113 if(block->__anon1.forStmt.stmt && block->__anon1.forStmt.stmt->type == 2 && block->__anon1.forStmt.stmt->__anon1.compound.context)
18114 block->__anon1.forStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18117 if(block->__anon1.forEachStmt.stmt && block->__anon1.forEachStmt.stmt->type == 2 && block->__anon1.forEachStmt.stmt->__anon1.compound.context)
18118 block->__anon1.forEachStmt.stmt->__anon1.compound.context->parent = stmt->__anon1.compound.context;
18124 block = MkIfStmt(filter, block, (((void *)0)));
18128 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));
18129 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18130 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18131 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18137 sprintf(count, "%d", builtinCount);
18138 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));
18139 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18140 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18141 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18143 else if(isLinkList && !isList)
18145 struct __ecereNameSpace__ecere__com__Class * typeClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, _class->templateArgs[3].__anon1.__anon1.dataTypeString);
18146 struct __ecereNameSpace__ecere__com__Class * listItemClass = __ecereNameSpace__ecere__com__eSystem_FindClass(_class->module, "ListItem");
18148 if(typeClass && __ecereNameSpace__ecere__com__eClass_IsDerived(typeClass, listItemClass) && _class->templateArgs[5].__anon1.__anon1.dataTypeString && !strcmp(_class->templateArgs[5].__anon1.__anon1.dataTypeString, "LT::link"))
18150 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));
18154 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
18155 struct Declarator * decl = SpecDeclFromString(_class->templateArgs[3].__anon1.__anon1.dataTypeString, specs, (((void *)0)));
18157 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));
18159 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.init);
18160 ProcessStatement(((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.check);
18161 ProcessExpressionType((*((struct Statement *)(*stmt->__anon1.compound.statements).first)->__anon1.forStmt.increment).first);
18165 stmt->__anon1.compound.statements = MkListOne(MkWhileStmt(MkListOne(MkExpCall(MkExpMember(expIt = MkExpIdentifier(CopyIdentifier(id)), MkIdentifier("Next")), (((void *)0)))), block));
18167 ProcessExpressionType(expIt);
18168 if((*stmt->__anon1.compound.declarations).first)
18169 ProcessDeclaration((*stmt->__anon1.compound.declarations).first);
18171 symbol->isIterator = isMap ? 2 : ((isArray || isBuiltin) ? 3 : (isLinkList ? (isList ? 5 : 4) : (isCustomAVLTree ? 6 : 1)));
18172 ProcessStatement(stmt);
18173 curContext = stmt->__anon1.compound.context->parent;
18178 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Expression is not a container\n", (((void *)0))));
18190 struct Expression * exp;
18192 if(stmt->__anon1.expressions)
18194 for(exp = (*stmt->__anon1.expressions).first; exp; exp = exp->next)
18198 if(curFunction && !curFunction->type)
18199 curFunction->type = ProcessType(curFunction->specifiers, curFunction->declarator);
18200 FreeType(exp->destType);
18201 exp->destType = (curFunction && curFunction->type && curFunction->type->kind == 11) ? curFunction->type->__anon1.__anon2.returnType : (((void *)0));
18203 exp->destType->refCount++;
18205 ProcessExpressionType(exp);
18212 ProcessDeclaration(stmt->__anon1.decl);
18217 struct AsmField * field;
18219 if(stmt->__anon1.asmStmt.inputFields)
18221 for(field = (*stmt->__anon1.asmStmt.inputFields).first; field; field = field->next)
18222 if(field->expression)
18223 ProcessExpressionType(field->expression);
18225 if(stmt->__anon1.asmStmt.outputFields)
18227 for(field = (*stmt->__anon1.asmStmt.outputFields).first; field; field = field->next)
18228 if(field->expression)
18229 ProcessExpressionType(field->expression);
18231 if(stmt->__anon1.asmStmt.clobberedFields)
18233 for(field = (*stmt->__anon1.asmStmt.clobberedFields).first; field; field = field->next)
18235 if(field->expression)
18236 ProcessExpressionType(field->expression);
18243 struct PropertyWatch * propWatch;
18244 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18245 struct Expression * object = stmt->__anon1._watch.object;
18246 struct Expression * watcher = stmt->__anon1._watch.watcher;
18249 ProcessExpressionType(watcher);
18251 ProcessExpressionType(object);
18254 if(watcher || thisClass)
18256 struct External * external = curExternal;
18257 struct Context * context = curContext;
18260 stmt->__anon1.expressions = MkList();
18261 curExternal = external->prev;
18262 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18264 struct ClassFunction * func;
18265 char watcherName[1024];
18266 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;
18267 struct External * createdExternal;
18268 struct External * externalDecl = MkExternalDeclaration((((void *)0)));
18270 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal->prev, externalDecl);
18271 sprintf(watcherName, "__ecerePropertyWatcher_%d", propWatcherID++);
18272 if(propWatch->deleteWatch)
18273 strcat(watcherName, "_delete");
18276 struct Identifier * propID;
18278 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18280 strcat(watcherName, "_");
18281 strcat(watcherName, propID->string);
18284 if(object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class && object->expType->__anon1._class->__anon1.registered)
18286 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)));
18287 ProcessClassFunctionBody(func, propWatch->compound);
18288 propWatch->compound = (((void *)0));
18289 createdExternal = ProcessClassFunction(watcherClass, func, ast, curExternal, 1);
18290 createdExternal->symbol->idCode = external->symbol->idCode;
18291 curExternal = createdExternal;
18292 ProcessFunction(createdExternal->__anon1.function);
18294 struct Declaration * decl = MkDeclaration(CopyList(createdExternal->__anon1.function->specifiers, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(CopyDeclarator(createdExternal->__anon1.function->declarator), (((void *)0)))));
18296 externalDecl->__anon1.declaration = decl;
18297 if(decl->symbol && !decl->symbol->__anon2.__anon1.pointerExternal)
18298 decl->symbol->__anon2.__anon1.pointerExternal = externalDecl;
18300 if(propWatch->deleteWatch)
18302 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18304 ListAdd(args, CopyExpression(object));
18305 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18306 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
18307 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_WatchDestruction")), args));
18311 struct __ecereNameSpace__ecere__com__Class * _class = object->expType->__anon1._class->__anon1.registered;
18312 struct Identifier * propID;
18314 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
18316 char propName[1024];
18317 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18321 char getName[1024], setName[1024];
18322 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18324 DeclareProperty(prop, setName, getName);
18325 strcpy(propName, "__ecereProp_");
18326 FullClassNameCat(propName, prop->_class->fullName, 0);
18327 strcat(propName, "_");
18328 FullClassNameCat(propName, prop->name, 1);
18329 ListAdd(args, CopyExpression(object));
18330 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18331 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18332 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(watcherName))));
18333 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_Watch")), args));
18336 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18341 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid watched object\n", (((void *)0))));
18343 curExternal = external;
18344 curContext = context;
18346 FreeExpression(watcher);
18348 FreeExpression(object);
18349 FreeList(watches, (void *)(FreePropertyWatch));
18352 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a _class\n", (((void *)0))));
18356 for(propWatch = (*watches).first; propWatch; propWatch = propWatch->next)
18358 ProcessStatement(propWatch->compound);
18365 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18366 struct Expression * object = stmt->__anon1._watch.object;
18367 struct __ecereNameSpace__ecere__com__Class * _class;
18370 ProcessExpressionType(object);
18373 _class = object ? ((object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0))) : thisClass;
18376 struct Identifier * propID;
18379 stmt->__anon1.expressions = MkList();
18380 if(!watches && curFunction->propSet && (!object || (object->type == 0 && !strcmp(object->__anon1.__anon1.identifier->string, "this"))))
18382 watches = MkListOne(MkIdentifier(curFunction->propSet->string));
18389 for(propID = (*watches).first; propID; propID = propID->next)
18391 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18395 CreateFireWatcher(prop, object, stmt);
18398 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18403 struct __ecereNameSpace__ecere__com__Property * prop;
18404 struct __ecereNameSpace__ecere__com__Class * base;
18406 for(base = _class; base; base = base->base)
18408 for(prop = base->membersAndProperties.first; prop; prop = prop->next)
18410 if(prop->isProperty && prop->isWatchable)
18412 CreateFireWatcher(prop, object, stmt);
18418 FreeExpression(object);
18419 FreeList(watches, (void *)(FreeIdentifier));
18422 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18428 struct __ecereNameSpace__ecere__sys__OldList * watches = stmt->__anon1._watch.watches;
18429 struct Expression * object = stmt->__anon1._watch.object;
18430 struct Expression * watcher = stmt->__anon1._watch.watcher;
18431 struct __ecereNameSpace__ecere__com__Class * _class;
18434 ProcessExpressionType(object);
18436 ProcessExpressionType(watcher);
18439 _class = (object && object->expType && object->expType->kind == 8 && object->expType->__anon1._class) ? object->expType->__anon1._class->__anon1.registered : (((void *)0));
18440 if(watcher || thisClass)
18444 struct Identifier * propID;
18447 stmt->__anon1.expressions = MkList();
18450 struct __ecereNameSpace__ecere__sys__OldList * args;
18453 ListAdd(args, CopyExpression(object));
18454 ListAdd(args, MkExpConstant("0"));
18455 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18456 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18460 for(propID = (*watches).first; propID; propID = propID->next)
18462 char propName[1024];
18463 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(_class, propID->string, privateModule);
18467 char getName[1024], setName[1024];
18468 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
18470 DeclareProperty(prop, setName, getName);
18471 strcpy(propName, "__ecereProp_");
18472 FullClassNameCat(propName, prop->_class->fullName, 0);
18473 strcat(propName, "_");
18474 FullClassNameCat(propName, prop->name, 1);
18475 ListAdd(args, CopyExpression(object));
18476 ListAdd(args, MkExpIdentifier(MkIdentifier(propName)));
18477 ListAdd(args, watcher ? CopyExpression(watcher) : MkExpIdentifier(MkIdentifier("this")));
18478 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_StopWatching")), args));
18481 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, _class->fullName);
18485 FreeExpression(object);
18487 FreeExpression(watcher);
18488 FreeList(watches, (void *)(FreeIdentifier));
18491 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Invalid object specified and not inside a class\n", (((void *)0))));
18494 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "No observer specified and not inside a class\n", (((void *)0))));
18501 extern struct Expression * QBrackets(struct Expression * exp);
18503 extern struct TypeName * QMkType(const char * spec, struct Declarator * decl);
18505 extern struct Declarator * QMkPtrDecl(const char * id);
18507 extern struct Expression * MkExpPointer(struct Expression * expression, struct Identifier * member);
18509 extern struct Expression * QMkExpCond(struct Expression * cond, struct Expression * exp, struct Expression * elseExp);
18511 extern struct Statement * MkFireWatchersStmt(struct Expression * object, struct __ecereNameSpace__ecere__sys__OldList * watches);
18513 static void ProcessFunction(struct FunctionDefinition * function)
18515 struct Identifier * id = GetDeclId(function->declarator);
18516 struct Symbol * symbol = function->declarator ? function->declarator->symbol : (((void *)0));
18517 struct Type * type = symbol ? symbol->type : (((void *)0));
18518 struct __ecereNameSpace__ecere__com__Class * oldThisClass = thisClass;
18519 struct Context * oldTopContext = topContext;
18521 yylloc = function->loc;
18522 if(type && type->__anon1.__anon2.thisClass)
18524 struct Symbol * classSym = type->__anon1.__anon2.thisClass;
18525 struct __ecereNameSpace__ecere__com__Class * _class = type->__anon1.__anon2.thisClass->__anon1.registered;
18526 char className[1024];
18527 char structName[1024];
18528 struct Declarator * funcDecl;
18529 struct Symbol * thisSymbol;
18530 unsigned int typedObject = 0;
18532 if(_class && !_class->base)
18534 _class = currentClass;
18535 if(_class && !_class->symbol)
18536 _class->symbol = FindClass(_class->fullName);
18537 classSym = _class ? _class->symbol : (((void *)0));
18540 thisClass = _class;
18541 if(inCompiler && _class)
18543 if(type->kind == 11)
18545 if(symbol->type->__anon1.__anon2.params.count == 1 && ((struct Type *)symbol->type->__anon1.__anon2.params.first)->kind == 0)
18547 struct Type * param = symbol->type->__anon1.__anon2.params.first;
18549 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(&symbol->type->__anon1.__anon2.params, param);
18552 if(type->classObjectType != 1)
18554 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(&symbol->type->__anon1.__anon2.params, (((void *)0)), MkClassType(_class->fullName));
18555 symbol->type->__anon1.__anon2.staticMethod = 1;
18556 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
18557 symbol->type->extraParam = 0;
18560 strcpy(className, "__ecereClass_");
18561 FullClassNameCat(className, _class->fullName, 1);
18562 structName[0] = (char)0;
18563 FullClassNameCat(structName, _class->fullName, 0);
18564 funcDecl = GetFuncDecl(function->declarator);
18567 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18569 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18571 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18573 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18574 FreeTypeName(param);
18577 if(!function->propertyNoThis)
18579 struct TypeName * thisParam = (((void *)0));
18581 if(type->classObjectType != 1)
18583 thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18584 if(!funcDecl->__anon1.function.parameters)
18585 funcDecl->__anon1.function.parameters = MkList();
18586 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18590 if(type->classObjectType != 1)
18592 if(type->byReference || _class->type == 3 || _class->type == 1000 || _class->type == 4 || _class->type == 2)
18593 thisParam->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), thisParam->declarator);
18595 thisParam = __extension__ ({
18596 struct TypeName * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
18598 __ecereInstance1->declarator = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier("class"))), __ecereInstance1->qualifiers = MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0)))), __ecereInstance1;
18600 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18604 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18606 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18608 funcDecl = GetFuncDecl(initDecl->declarator);
18611 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).count == 1)
18613 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
18615 if(param->qualifiers && (*param->qualifiers).count == 1 && ((struct Specifier *)(*param->qualifiers).first)->__anon1.specifier == VOID && !param->declarator)
18617 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*funcDecl->__anon1.function.parameters), param);
18618 FreeTypeName(param);
18621 if(type->classObjectType != 1)
18623 if((_class->type != 2 && _class->type != 3 && _class->type != 4) || function != (struct FunctionDefinition *)symbol->__anon2.__anon2.externalSet)
18625 struct TypeName * thisParam = QMkClass(_class->fullName, MkDeclaratorIdentifier(MkIdentifier("this")));
18627 if(!funcDecl->__anon1.function.parameters)
18628 funcDecl->__anon1.function.parameters = MkList();
18629 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*funcDecl->__anon1.function.parameters), (((void *)0)), thisParam);
18637 if(type->classObjectType != 1)
18639 thisSymbol = __extension__ ({
18640 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18642 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("this"), __ecereInstance1->type = classSym ? MkClassType(classSym->string) : (((void *)0)), __ecereInstance1;
18644 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&function->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18645 if(typedObject && thisSymbol->type)
18647 thisSymbol->type->classObjectType = 2;
18648 thisSymbol->type->byReference = type->byReference;
18649 thisSymbol->type->typedByReference = type->byReference;
18653 if(inCompiler && _class && (_class->type == 0) && type->classObjectType != 1)
18655 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
18658 struct __ecereNameSpace__ecere__com__Class * base;
18660 for(base = _class; base && base->type != 1000; base = base->next)
18662 for(member = base->membersAndProperties.first; member; member = member->next)
18663 if(!member->isProperty)
18669 for(member = _class->membersAndProperties.first; member; member = member->next)
18670 if(!member->isProperty)
18674 char pointerName[1024];
18675 struct Declaration * decl;
18676 struct Initializer * initializer;
18677 struct Expression * exp, * bytePtr;
18679 strcpy(pointerName, "__ecerePointer_");
18680 FullClassNameCat(pointerName, _class->fullName, 0);
18682 char className[1024];
18684 strcpy(className, "__ecereClass_");
18685 FullClassNameCat(className, classSym->string, 1);
18686 DeclareClass(classSym, className);
18688 bytePtr = QBrackets(MkExpCast(QMkType("char", QMkPtrDecl((((void *)0)))), QMkExpId("this")));
18693 sprintf(string, "%d", _class->offset);
18694 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpConstant(string)));
18698 exp = QBrackets(MkExpOp(bytePtr, '+', MkExpPointer(QMkExpId(className), MkIdentifier("offset"))));
18700 exp = QBrackets(QMkExpCond(QMkExpId("this"), exp, MkExpConstant("0")));
18701 exp->expType = __extension__ ({
18702 struct Type * __ecereInstance2 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18704 __ecereInstance2->refCount = 1, __ecereInstance2->kind = 13, __ecereInstance2->__anon1.type = __extension__ ({
18705 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
18707 __ecereInstance1->refCount = 1, __ecereInstance1->kind = 0, __ecereInstance1;
18708 }), __ecereInstance2;
18712 yylloc = function->body->loc;
18713 initializer = MkInitializerAssignment(MkExpCast(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0)))), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), exp));
18715 struct Context * prevContext = curContext;
18716 struct __ecereNameSpace__ecere__sys__OldList * list;
18718 curContext = function->body->__anon1.compound.context;
18719 decl = MkDeclaration((list = MkListOne(MkStructOrUnion(3, MkIdentifier(structName), (((void *)0))))), MkListOne(MkInitDeclarator(QMkPtrDecl(pointerName), initializer)));
18720 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*list), (((void *)0)), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
18721 curContext = prevContext;
18723 decl->symbol = (((void *)0));
18724 if(!function->body->__anon1.compound.declarations)
18725 function->body->__anon1.compound.declarations = MkList();
18726 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*function->body->__anon1.compound.declarations), (((void *)0)), decl);
18732 thisClass = (((void *)0));
18735 FreeSpecifier(id->_class);
18736 id->_class = (((void *)0));
18737 if(symbol && symbol->__anon2.__anon1.pointerExternal && symbol->__anon2.__anon1.pointerExternal->type == 1)
18739 struct InitDeclarator * initDecl = (*symbol->__anon2.__anon1.pointerExternal->__anon1.declaration->__anon1.__anon1.declarators).first;
18741 id = GetDeclId(initDecl->declarator);
18742 FreeSpecifier(id->_class);
18743 id->_class = (((void *)0));
18747 topContext = function->body->__anon1.compound.context;
18749 struct FunctionDefinition * oldFunction = curFunction;
18751 curFunction = function;
18753 ProcessStatement(function->body);
18754 if(inCompiler && function->propSet && !function->propSet->fireWatchersDone)
18756 struct Statement * prevCompound = curCompound;
18757 struct Context * prevContext = curContext;
18758 struct Statement * fireWatchers = MkFireWatchersStmt((((void *)0)), (((void *)0)));
18760 if(!function->body->__anon1.compound.statements)
18761 function->body->__anon1.compound.statements = MkList();
18762 ListAdd(function->body->__anon1.compound.statements, fireWatchers);
18763 curCompound = function->body;
18764 curContext = function->body->__anon1.compound.context;
18765 ProcessStatement(fireWatchers);
18766 curContext = prevContext;
18767 curCompound = prevCompound;
18769 curFunction = oldFunction;
18771 if(function->declarator)
18773 ProcessDeclarator(function->declarator);
18775 topContext = oldTopContext;
18776 thisClass = oldThisClass;
18779 extern void FreeSymbol(struct Symbol * symbol);
18781 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
18783 static void ProcessClass(struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol)
18785 struct ClassDef * def;
18786 struct External * external = curExternal;
18787 struct __ecereNameSpace__ecere__com__Class * regClass = symbol ? symbol->__anon1.registered : (((void *)0));
18789 for(def = definitions->first; def; def = def->next)
18793 if(def->__anon1.function->declarator)
18794 curExternal = def->__anon1.function->declarator->symbol->__anon2.__anon1.pointerExternal;
18796 curExternal = external;
18797 ProcessFunction((struct FunctionDefinition *)def->__anon1.function);
18799 else if(def->type == 2)
18801 if(def->__anon1.decl->type == 2)
18803 thisClass = regClass;
18804 ProcessInstantiationType(def->__anon1.decl->__anon1.inst);
18805 thisClass = (((void *)0));
18809 struct __ecereNameSpace__ecere__com__Class * backThisClass = thisClass;
18812 thisClass = regClass;
18813 ProcessDeclaration(def->__anon1.decl);
18814 thisClass = backThisClass;
18817 else if(def->type == 1 && def->__anon1.defProperties)
18819 struct MemberInit * defProperty;
18820 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);
18822 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18823 for(defProperty = (*def->__anon1.defProperties).first; defProperty; defProperty = defProperty->next)
18825 thisClass = regClass;
18826 ProcessMemberInitData(defProperty, regClass, (((void *)0)), (((void *)0)), (((void *)0)), (((void *)0)));
18827 thisClass = (((void *)0));
18829 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18830 FreeSymbol(thisSymbol);
18832 else if(def->type == 3 && def->__anon1.propertyDef)
18834 struct PropertyDef * prop = def->__anon1.propertyDef;
18836 thisClass = regClass;
18841 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18843 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->setStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18845 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalSet : (((void *)0));
18846 ProcessStatement(prop->setStmt);
18852 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18854 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->getStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18856 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalGet : (((void *)0));
18857 ProcessStatement(prop->getStmt);
18859 if(prop->issetStmt)
18863 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
18865 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&prop->issetStmt->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18867 curExternal = prop->symbol ? prop->symbol->__anon2.__anon2.externalIsSet : (((void *)0));
18868 ProcessStatement(prop->issetStmt);
18870 thisClass = (((void *)0));
18872 else if(def->type == 4 && def->__anon1.propertyWatch)
18874 struct PropertyWatch * propertyWatch = def->__anon1.propertyWatch;
18876 thisClass = regClass;
18877 if(propertyWatch->compound)
18879 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);
18881 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&propertyWatch->compound->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
18882 curExternal = (((void *)0));
18883 ProcessStatement(propertyWatch->compound);
18885 thisClass = (((void *)0));
18890 void DeclareFunctionUtil(const char * s)
18892 struct __ecereNameSpace__ecere__com__GlobalFunction * function = __ecereNameSpace__ecere__com__eSystem_FindFunction(privateModule, s);
18899 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)function->module + structSize_Instance)))->importType != 1 && (!function->dataType || !function->dataType->dllExport))
18900 strcpy(name, "__ecereFunction_");
18901 FullClassNameCat(name, s, 0);
18902 DeclareFunction(function, name);
18906 extern struct __ecereNameSpace__ecere__com__Instance * GetPrivateModule(void);
18908 extern unsigned int memoryGuard;
18910 void ComputeDataTypes()
18912 struct External * external;
18913 struct External * temp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_External);
18914 struct External * after = (((void *)0));
18916 currentClass = (((void *)0));
18917 containerClass = __ecereNameSpace__ecere__com__eSystem_FindClass(GetPrivateModule(), "Container");
18918 for(external = (*ast).first; external; external = external->next)
18920 if(external->type == 1)
18922 struct Declaration * decl = external->__anon1.declaration;
18926 struct __ecereNameSpace__ecere__sys__OldList * decls = decl->__anon1.__anon1.declarators;
18930 struct InitDeclarator * initDecl = (*decls).first;
18934 struct Declarator * declarator = initDecl->declarator;
18936 if(declarator && declarator->type == 1)
18938 struct Identifier * id = declarator->__anon1.identifier;
18940 if(id && id->string)
18942 if(!strcmp(id->string, "uintptr_t") || !strcmp(id->string, "intptr_t") || !strcmp(id->string, "size_t") || !strcmp(id->string, "ssize_t"))
18944 external->symbol->id = -1001, external->symbol->idCode = -1001;
18955 struct External * e = MkExternalDeclaration(MkDeclaration(MkListOne(MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Instance"), (((void *)0)))), (((void *)0))));
18957 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, e);
18960 temp->symbol = __extension__ ({
18961 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
18963 __ecereInstance1->id = -1000, __ecereInstance1->idCode = -1000, __ecereInstance1;
18965 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), after, temp);
18966 curExternal = temp;
18967 DeclareFunctionUtil("eSystem_New");
18968 DeclareFunctionUtil("eSystem_New0");
18969 DeclareFunctionUtil("eSystem_Renew");
18970 DeclareFunctionUtil("eSystem_Renew0");
18971 DeclareFunctionUtil("eSystem_Delete");
18972 DeclareFunctionUtil("eClass_GetProperty");
18973 DeclareFunctionUtil("eClass_SetProperty");
18974 DeclareFunctionUtil("eInstance_FireSelfWatchers");
18975 DeclareFunctionUtil("eInstance_SetMethod");
18976 DeclareFunctionUtil("eInstance_IncRef");
18977 DeclareFunctionUtil("eInstance_StopWatching");
18978 DeclareFunctionUtil("eInstance_Watch");
18979 DeclareFunctionUtil("eInstance_FireWatchers");
18982 DeclareFunctionUtil("MemoryGuard_PushLoc");
18983 DeclareFunctionUtil("MemoryGuard_PopLoc");
18985 DeclareStruct("ecere::com::Class", 0);
18986 DeclareStruct("ecere::com::Instance", 0);
18987 DeclareStruct("ecere::com::Property", 0);
18988 DeclareStruct("ecere::com::DataMember", 0);
18989 DeclareStruct("ecere::com::Method", 0);
18990 DeclareStruct("ecere::com::SerialBuffer", 0);
18991 DeclareStruct("ecere::com::ClassTemplateArgument", 0);
18992 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), temp);
18993 for(external = (*ast).first; external; external = external->next)
18995 afterExternal = curExternal = external;
18996 if(external->type == 0)
18998 currentClass = external->__anon1.function->_class;
18999 ProcessFunction(external->__anon1.function);
19001 else if(external->type == 1)
19003 currentClass = (((void *)0));
19004 if(external->__anon1.declaration)
19005 ProcessDeclaration(external->__anon1.declaration);
19007 else if(external->type == 2)
19009 struct ClassDefinition * _class = external->__anon1._class;
19011 currentClass = external->symbol->__anon1.registered;
19012 if(_class->definitions)
19014 ProcessClass(_class->definitions, _class->symbol);
19018 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
19019 ((external ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)external) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(external)) : 0), external = 0);
19022 else if(external->type == 4)
19024 thisNameSpace = external->__anon1.id->string;
19027 currentClass = (((void *)0));
19028 thisNameSpace = (((void *)0));
19029 curExternal = (((void *)0));
19030 ((temp->symbol ? (__ecereClass_Symbol->Destructor ? __ecereClass_Symbol->Destructor((void *)temp->symbol) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp->symbol)) : 0), temp->symbol = 0);
19031 ((temp ? (__ecereClass_External->Destructor ? __ecereClass_External->Destructor((void *)temp) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(temp)) : 0), temp = 0);
19034 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);
19036 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);
19038 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
19040 void __ecereRegisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)
19042 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
19044 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetYydebug", "void SetYydebug(bool b)", SetYydebug, module, 1);
19045 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetThisClass", "void SetThisClass(ecere::com::Class c)", SetThisClass, module, 1);
19046 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetThisClass", "ecere::com::Class GetThisClass(void)", GetThisClass, module, 1);
19047 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintExpression", "void PrintExpression(Expression exp, char * string)", PrintExpression, module, 1);
19048 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessTemplateParameterType", "Type ProcessTemplateParameterType(TemplateParameter param)", ProcessTemplateParameterType, module, 2);
19049 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("NeedCast", "bool NeedCast(Type type1, Type type2)", NeedCast, module, 2);
19050 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt", "char * PrintInt(int64 result)", PrintInt, module, 1);
19051 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt", "char * PrintUInt(uint64 result)", PrintUInt, module, 1);
19052 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintInt64", "char * PrintInt64(int64 result)", PrintInt64, module, 1);
19053 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUInt64", "char * PrintUInt64(uint64 result)", PrintUInt64, module, 1);
19054 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt", "char * PrintHexUInt(uint64 result)", PrintHexUInt, module, 1);
19055 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintHexUInt64", "char * PrintHexUInt64(uint64 result)", PrintHexUInt64, module, 1);
19056 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintShort", "char * PrintShort(short result)", PrintShort, module, 1);
19057 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUShort", "char * PrintUShort(uint16 result)", PrintUShort, module, 1);
19058 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintChar", "char * PrintChar(char result)", PrintChar, module, 1);
19059 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintUChar", "char * PrintUChar(byte result)", PrintUChar, module, 1);
19060 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintFloat", "char * PrintFloat(float result)", PrintFloat, module, 1);
19061 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintDouble", "char * PrintDouble(double result)", PrintDouble, module, 1);
19062 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt", "bool GetOpInt(Operand op2, int * value2)", GetOpInt, module, 1);
19063 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt", "bool GetInt(Expression exp, int * value2)", GetInt, module, 1);
19064 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt", "bool GetOpUInt(Operand op2, uint * value2)", GetOpUInt, module, 1);
19065 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt", "bool GetUInt(Expression exp, uint * value2)", GetUInt, module, 1);
19066 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpInt64", "bool GetOpInt64(Operand op2, int64 * value2)", GetOpInt64, module, 1);
19067 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetInt64", "bool GetInt64(Expression exp, int64 * value2)", GetInt64, module, 1);
19068 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUInt64", "bool GetOpUInt64(Operand op2, uint64 * value2)", GetOpUInt64, module, 1);
19069 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUInt64", "bool GetUInt64(Expression exp, uint64 * value2)", GetUInt64, module, 1);
19070 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntPtr", "bool GetOpIntPtr(Operand op2, intptr * value2)", GetOpIntPtr, module, 1);
19071 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntPtr", "bool GetIntPtr(Expression exp, intptr * value2)", GetIntPtr, module, 1);
19072 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntPtr", "bool GetOpUIntPtr(Operand op2, uintptr * value2)", GetOpUIntPtr, module, 1);
19073 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntPtr", "bool GetUIntPtr(Expression exp, uintptr * value2)", GetUIntPtr, module, 1);
19074 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpIntSize", "bool GetOpIntSize(Operand op2, intsize * value2)", GetOpIntSize, module, 1);
19075 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetIntSize", "bool GetIntSize(Expression exp, intsize * value2)", GetIntSize, module, 1);
19076 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUIntSize", "bool GetOpUIntSize(Operand op2, uintsize * value2)", GetOpUIntSize, module, 1);
19077 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUIntSize", "bool GetUIntSize(Expression exp, uintsize * value2)", GetUIntSize, module, 1);
19078 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpShort", "bool GetOpShort(Operand op2, short * value2)", GetOpShort, module, 1);
19079 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetShort", "bool GetShort(Expression exp, short * value2)", GetShort, module, 1);
19080 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUShort", "bool GetOpUShort(Operand op2, uint16 * value2)", GetOpUShort, module, 1);
19081 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUShort", "bool GetUShort(Expression exp, uint16 * value2)", GetUShort, module, 1);
19082 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpChar", "bool GetOpChar(Operand op2, char * value2)", GetOpChar, module, 1);
19083 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetChar", "bool GetChar(Expression exp, char * value2)", GetChar, module, 1);
19084 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpUChar", "bool GetOpUChar(Operand op2, byte * value2)", GetOpUChar, module, 1);
19085 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetUChar", "bool GetUChar(Expression exp, byte * value2)", GetUChar, module, 1);
19086 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpFloat", "bool GetOpFloat(Operand op2, float * value2)", GetOpFloat, module, 1);
19087 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetFloat", "bool GetFloat(Expression exp, float * value2)", GetFloat, module, 1);
19088 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOpDouble", "bool GetOpDouble(Operand op2, double * value2)", GetOpDouble, module, 1);
19089 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetDouble", "bool GetDouble(Expression exp, double * value2)", GetDouble, module, 1);
19090 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeClassMembers", "void ComputeClassMembers(ecere::com::Class _class, bool isMember)", ComputeClassMembers, module, 2);
19091 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeModuleClasses", "void ComputeModuleClasses(ecere::com::Module module)", ComputeModuleClasses, module, 1);
19092 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeTypeSize", "int ComputeTypeSize(Type type)", ComputeTypeSize, module, 1);
19093 __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);
19094 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareStruct", "void DeclareStruct(const char * name, bool skipNoHead)", DeclareStruct, module, 2);
19095 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareProperty", "void DeclareProperty(ecere::com::Property prop, char * setName, char * getName)", DeclareProperty, module, 2);
19096 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("Dereference", "Type Dereference(Type source)", Dereference, module, 1);
19097 __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);
19098 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessInstantiationType", "void ProcessInstantiationType(Instantiation inst)", ProcessInstantiationType, module, 2);
19099 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindTemplateArg", "ecere::com::ClassTemplateArgument * FindTemplateArg(ecere::com::Class _class, TemplateParameter param)", FindTemplateArg, module, 2);
19100 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetupTemplatesContext", "Context SetupTemplatesContext(ecere::com::Class _class)", SetupTemplatesContext, module, 1);
19101 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FinishTemplatesContext", "void FinishTemplatesContext(Context context)", FinishTemplatesContext, module, 1);
19102 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessMethodType", "void ProcessMethodType(ecere::com::Method method)", ProcessMethodType, module, 1);
19103 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessPropertyType", "void ProcessPropertyType(ecere::com::Property prop)", ProcessPropertyType, module, 1);
19104 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareMethod", "void DeclareMethod(ecere::com::Method method, const char * name)", DeclareMethod, module, 1);
19105 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClass", "char * ReplaceThisClass(ecere::com::Class _class)", ReplaceThisClass, module, 2);
19106 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassType", "Type ReplaceThisClassType(ecere::com::Class _class)", ReplaceThisClassType, module, 2);
19107 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceThisClassSpecifiers", "void ReplaceThisClassSpecifiers(ecere::sys::OldList specs, ecere::com::Class _class)", ReplaceThisClassSpecifiers, module, 2);
19108 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunction", "bool DeclareFunction(ecere::com::GlobalFunction function, char * name)", DeclareFunction, module, 2);
19109 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareGlobalData", "void DeclareGlobalData(GlobalData data)", DeclareGlobalData, module, 2);
19110 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Conversion", 0, sizeof(struct Conversion), 0, (void *)0, (void *)0, module, 2, 1);
19111 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
19112 __ecereClass_Conversion = class;
19113 __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);
19114 __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);
19115 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ModuleVisibility", "bool ModuleVisibility(ecere::com::Module searchIn, ecere::com::Module searchFor)", ModuleVisibility, module, 1);
19116 __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);
19117 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("MatchTypeExpression", "bool MatchTypeExpression(Expression sourceExp, Type dest, ecere::sys::OldList conversions, bool skipUnitBla, bool warnConst)", MatchTypeExpression, module, 2);
19118 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReadString", "void ReadString(char * output, char * string)", ReadString, module, 1);
19119 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("UnescapeString", "int UnescapeString(char * d, char * s, int len)", UnescapeString, module, 1);
19120 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OffsetEscapedString", "char * OffsetEscapedString(char * s, int len, int offset)", OffsetEscapedString, module, 1);
19121 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetOperand", "Operand GetOperand(Expression exp)", GetOperand, module, 1);
19122 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PopulateInstance", "void PopulateInstance(Instantiation inst)", PopulateInstance, module, 1);
19123 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeInstantiation", "void ComputeInstantiation(Expression exp)", ComputeInstantiation, module, 1);
19124 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CallOperator", "void CallOperator(Expression exp, Expression exp1, Expression exp2, Operand op1, Operand op2)", CallOperator, module, 1);
19125 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeExpression", "void ComputeExpression(Expression exp)", ComputeExpression, module, 1);
19126 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CheckTemplateTypes", "void CheckTemplateTypes(Expression exp)", CheckTemplateTypes, module, 1);
19127 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindSymbol", "Symbol FindSymbol(const char * name, Context startContext, Context endContext, bool isStruct, bool globalNameSpace)", FindSymbol, module, 1);
19128 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintType", "void PrintType(Type type, char * string, bool printName, bool fullName)", PrintType, module, 1);
19129 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrintTypeNoConst", "void PrintTypeNoConst(Type type, char * string, bool printName, bool fullName)", PrintTypeNoConst, module, 1);
19130 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FindMemberAndOffset", "Type FindMemberAndOffset(Type type, char * string, uint * offset)", FindMemberAndOffset, module, 1);
19131 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetParseError", "bool GetParseError(void)", GetParseError, module, 1);
19132 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ParseExpressionString", "Expression ParseExpressionString(char * expression)", ParseExpressionString, module, 1);
19133 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ReplaceExpContents", "void ReplaceExpContents(Expression checkedExp, Expression newExp)", ReplaceExpContents, module, 1);
19134 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyAnyObjectLogic", "void ApplyAnyObjectLogic(Expression e)", ApplyAnyObjectLogic, module, 1);
19135 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ApplyLocation", "void ApplyLocation(Expression exp, Location loc)", ApplyLocation, module, 1);
19136 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessExpressionType", "void ProcessExpressionType(Expression exp)", ProcessExpressionType, module, 1);
19137 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("DeclareFunctionUtil", "void DeclareFunctionUtil(const String s)", DeclareFunctionUtil, module, 1);
19138 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ComputeDataTypes", "void ComputeDataTypes(void)", ComputeDataTypes, module, 1);
19141 void __ecereUnregisterModule_pass15(struct __ecereNameSpace__ecere__com__Instance * module)