1 /* Code generated from eC source file: ecp.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_OldList (_64BIT ? 32 : 20)
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;
162 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
164 struct ClassDefinition
166 struct ClassDefinition * prev;
167 struct ClassDefinition * next;
169 struct Specifier * _class;
170 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
171 struct __ecereNameSpace__ecere__sys__OldList * definitions;
172 struct Symbol * symbol;
173 struct Location blockStart;
174 struct Location nameLoc;
177 unsigned int deleteWatchable;
178 } __attribute__ ((gcc_struct));
180 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
184 struct Context * parent;
185 struct __ecereNameSpace__ecere__sys__BinaryTree types;
186 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
187 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
188 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
191 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
192 struct ClassDefinition * classDef;
193 unsigned int templateTypesOnly;
194 unsigned int hasNameSpace;
195 } __attribute__ ((gcc_struct));
197 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
201 struct Instantiation * prev;
202 struct Instantiation * next;
204 struct Specifier * _class;
205 struct Expression * exp;
206 struct __ecereNameSpace__ecere__sys__OldList * members;
207 struct Symbol * symbol;
208 unsigned int fullSet;
209 unsigned int isConstant;
210 unsigned char * data;
211 struct Location nameLoc;
212 struct Location insideLoc;
214 } __attribute__ ((gcc_struct));
216 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
220 struct Declaration * prev;
221 struct Declaration * next;
228 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
229 struct __ecereNameSpace__ecere__sys__OldList * declarators;
230 } __attribute__ ((gcc_struct)) __anon1;
231 struct Instantiation * inst;
234 struct Identifier * id;
235 struct Expression * exp;
236 } __attribute__ ((gcc_struct)) __anon2;
237 } __attribute__ ((gcc_struct)) __anon1;
238 struct Specifier * extStorage;
239 struct Symbol * symbol;
241 } __attribute__ ((gcc_struct));
243 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
247 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
251 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
255 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
257 struct __ecereNameSpace__ecere__com__DataValue
272 } __attribute__ ((gcc_struct)) __anon1;
273 } __attribute__ ((gcc_struct));
275 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
279 struct Expression * prev;
280 struct Expression * next;
288 struct Identifier * identifier;
289 } __attribute__ ((gcc_struct)) __anon1;
290 struct Statement * compound;
291 struct Instantiation * instance;
295 unsigned int intlString;
296 unsigned int wideString;
297 } __attribute__ ((gcc_struct)) __anon2;
298 struct __ecereNameSpace__ecere__sys__OldList * list;
301 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
302 struct Declarator * decl;
303 } __attribute__ ((gcc_struct)) _classExp;
306 struct Identifier * id;
307 } __attribute__ ((gcc_struct)) classData;
310 struct Expression * exp;
311 struct __ecereNameSpace__ecere__sys__OldList * arguments;
312 struct Location argLoc;
313 } __attribute__ ((gcc_struct)) call;
316 struct Expression * exp;
317 struct __ecereNameSpace__ecere__sys__OldList * index;
318 } __attribute__ ((gcc_struct)) index;
321 struct Expression * exp;
322 struct Identifier * member;
324 unsigned int thisPtr;
325 } __attribute__ ((gcc_struct)) member;
329 struct Expression * exp1;
330 struct Expression * exp2;
331 } __attribute__ ((gcc_struct)) op;
332 struct TypeName * typeName;
333 struct Specifier * _class;
336 struct TypeName * typeName;
337 struct Expression * exp;
338 } __attribute__ ((gcc_struct)) cast;
341 struct Expression * cond;
342 struct __ecereNameSpace__ecere__sys__OldList * exp;
343 struct Expression * elseExp;
344 } __attribute__ ((gcc_struct)) cond;
347 struct TypeName * typeName;
348 struct Expression * size;
349 } __attribute__ ((gcc_struct)) _new;
352 struct TypeName * typeName;
353 struct Expression * size;
354 struct Expression * exp;
355 } __attribute__ ((gcc_struct)) _renew;
359 struct Identifier * id;
360 } __attribute__ ((gcc_struct)) db;
363 struct Expression * ds;
364 struct Expression * name;
365 } __attribute__ ((gcc_struct)) dbopen;
368 struct TypeName * typeName;
369 struct Initializer * initializer;
370 } __attribute__ ((gcc_struct)) initializer;
373 struct Expression * exp;
374 struct TypeName * typeName;
375 } __attribute__ ((gcc_struct)) vaArg;
376 } __attribute__ ((gcc_struct)) __anon1;
377 unsigned int debugValue;
378 struct __ecereNameSpace__ecere__com__DataValue val;
380 unsigned int hasAddress;
381 struct Type * expType;
382 struct Type * destType;
385 unsigned int byReference;
386 unsigned int isConstant;
387 unsigned int addedThis;
388 unsigned int needCast;
389 unsigned int thisPtr;
390 unsigned int opDestType;
391 unsigned int needTemplateCast;
392 } __attribute__ ((gcc_struct));
394 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
396 struct TemplateDatatype
398 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
399 struct Declarator * decl;
400 } __attribute__ ((gcc_struct));
402 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
404 struct TemplateArgument
406 struct TemplateArgument * prev;
407 struct TemplateArgument * next;
409 struct Identifier * name;
413 struct Expression * expression;
414 struct Identifier * identifier;
415 struct TemplateDatatype * templateDatatype;
416 } __attribute__ ((gcc_struct)) __anon1;
417 } __attribute__ ((gcc_struct));
419 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
421 struct TemplateParameter
423 struct TemplateParameter * prev;
424 struct TemplateParameter * next;
427 struct Identifier * identifier;
430 struct TemplateDatatype * dataType;
432 } __attribute__ ((gcc_struct)) __anon1;
433 struct TemplateArgument * defaultArgument;
434 const char * dataTypeString;
435 struct Type * baseType;
436 } __attribute__ ((gcc_struct));
438 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
442 struct Specifier * prev;
443 struct Specifier * next;
451 struct ExtDecl * extDecl;
453 struct Symbol * symbol;
454 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
455 } __attribute__ ((gcc_struct)) __anon1;
458 struct Identifier * id;
459 struct __ecereNameSpace__ecere__sys__OldList * list;
460 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
461 struct __ecereNameSpace__ecere__sys__OldList * definitions;
462 unsigned int addNameSpace;
463 struct Context * ctx;
464 struct ExtDecl * extDeclStruct;
465 } __attribute__ ((gcc_struct)) __anon2;
466 struct Expression * expression;
467 struct Specifier * _class;
468 struct TemplateParameter * templateParameter;
469 } __attribute__ ((gcc_struct)) __anon1;
470 } __attribute__ ((gcc_struct));
472 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
476 struct Identifier * prev;
477 struct Identifier * next;
479 struct Symbol * classSym;
480 struct Specifier * _class;
482 struct Identifier * badID;
483 } __attribute__ ((gcc_struct));
485 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
489 struct Declarator * prev;
490 struct Declarator * next;
493 struct Symbol * symbol;
494 struct Declarator * declarator;
497 struct Identifier * identifier;
500 struct Expression * exp;
501 struct Expression * posExp;
502 struct Attrib * attrib;
503 } __attribute__ ((gcc_struct)) structDecl;
506 struct Expression * exp;
507 struct Specifier * enumClass;
508 } __attribute__ ((gcc_struct)) array;
511 struct __ecereNameSpace__ecere__sys__OldList * parameters;
512 } __attribute__ ((gcc_struct)) function;
515 struct __ecereNameSpace__ecere__com__Instance * pointer;
516 } __attribute__ ((gcc_struct)) pointer;
519 struct ExtDecl * extended;
520 } __attribute__ ((gcc_struct)) extended;
521 } __attribute__ ((gcc_struct)) __anon1;
522 } __attribute__ ((gcc_struct));
524 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
526 struct FunctionDefinition
528 struct FunctionDefinition * prev;
529 struct FunctionDefinition * next;
531 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
532 struct Declarator * declarator;
533 struct __ecereNameSpace__ecere__sys__OldList * declarations;
534 struct Statement * body;
535 struct __ecereNameSpace__ecere__com__Class * _class;
536 struct __ecereNameSpace__ecere__sys__OldList attached;
539 struct Symbol * propSet;
541 unsigned int propertyNoThis;
542 } __attribute__ ((gcc_struct));
544 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
548 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
552 struct External * prev;
553 struct External * next;
556 struct Symbol * symbol;
559 struct FunctionDefinition * function;
560 struct ClassDefinition * _class;
561 struct Declaration * declaration;
563 struct Identifier * id;
564 struct DBTableDef * table;
565 } __attribute__ ((gcc_struct)) __anon1;
567 } __attribute__ ((gcc_struct));
569 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
573 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
577 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
582 struct Symbol * parent;
583 struct Symbol * left;
584 struct Symbol * right;
589 struct __ecereNameSpace__ecere__com__Method * method;
590 struct __ecereNameSpace__ecere__com__Property * _property;
591 struct __ecereNameSpace__ecere__com__Class * registered;
592 } __attribute__ ((gcc_struct)) __anon1;
599 struct External * pointerExternal;
600 struct External * structExternal;
601 } __attribute__ ((gcc_struct)) __anon1;
604 struct External * externalGet;
605 struct External * externalSet;
606 struct External * externalPtr;
607 struct External * externalIsSet;
608 } __attribute__ ((gcc_struct)) __anon2;
611 struct External * methodExternal;
612 struct External * methodCodeExternal;
613 } __attribute__ ((gcc_struct)) __anon3;
614 } __attribute__ ((gcc_struct)) __anon2;
615 unsigned int imported;
616 unsigned int declaredStructSym;
617 struct __ecereNameSpace__ecere__com__Class * _class;
618 unsigned int declaredStruct;
619 unsigned int needConstructor;
620 unsigned int needDestructor;
621 char * constructorName;
624 char * destructorName;
625 struct ModuleImport * module;
626 struct ClassImport * _import;
627 struct Location nameLoc;
628 unsigned int isParam;
629 unsigned int isRemote;
630 unsigned int isStruct;
631 unsigned int fireWatchersDone;
633 unsigned int classData;
634 unsigned int isStatic;
636 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
637 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
638 struct Context * ctx;
640 struct Expression * propCategory;
641 } __attribute__ ((gcc_struct));
643 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
652 struct Symbol * _class;
655 struct __ecereNameSpace__ecere__sys__OldList members;
657 } __attribute__ ((gcc_struct)) __anon1;
660 struct Type * returnType;
661 struct __ecereNameSpace__ecere__sys__OldList params;
662 struct Symbol * thisClass;
663 unsigned int staticMethod;
664 struct TemplateParameter * thisClassTemplate;
665 } __attribute__ ((gcc_struct)) __anon2;
668 struct __ecereNameSpace__ecere__com__Method * method;
669 struct __ecereNameSpace__ecere__com__Class * methodClass;
670 struct __ecereNameSpace__ecere__com__Class * usedClass;
671 } __attribute__ ((gcc_struct)) __anon3;
674 struct Type * arrayType;
676 struct Expression * arraySizeExp;
677 unsigned int freeExp;
678 struct Symbol * enumClass;
679 } __attribute__ ((gcc_struct)) __anon4;
681 struct TemplateParameter * templateParameter;
682 } __attribute__ ((gcc_struct)) __anon1;
692 unsigned int isSigned : 1;
693 unsigned int constant : 1;
694 unsigned int truth : 1;
695 unsigned int byReference : 1;
696 unsigned int extraParam : 1;
697 unsigned int directClassAccess : 1;
698 unsigned int computing : 1;
699 unsigned int keepCast : 1;
700 unsigned int passAsTemplate : 1;
701 unsigned int dllExport : 1;
702 unsigned int attrStdcall : 1;
703 unsigned int declaredWithStruct : 1;
704 unsigned int typedByReference : 1;
705 unsigned int casted : 1;
706 } __attribute__ ((gcc_struct));
708 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
710 struct __ecereNameSpace__ecere__com__Class
712 struct __ecereNameSpace__ecere__com__Class * prev;
713 struct __ecereNameSpace__ecere__com__Class * next;
719 unsigned int (* Constructor)(void * );
720 void (* Destructor)(void * );
723 struct __ecereNameSpace__ecere__com__Class * base;
724 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
725 struct __ecereNameSpace__ecere__sys__BinaryTree members;
726 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
727 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
728 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
729 struct __ecereNameSpace__ecere__sys__OldList derivatives;
733 struct __ecereNameSpace__ecere__com__Instance * module;
734 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
735 const char * dataTypeString;
736 struct Type * dataType;
738 int defaultAlignment;
739 void (* Initialize)();
741 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
742 const char * designerClass;
743 unsigned int noExpansion;
744 const char * defaultProperty;
745 unsigned int comRedefinition;
748 unsigned int internalDecl;
750 unsigned int computeSize;
752 int destructionWatchOffset;
754 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
755 int inheritanceAccess;
756 const char * fullName;
758 struct __ecereNameSpace__ecere__sys__OldList conversions;
759 struct __ecereNameSpace__ecere__sys__OldList templateParams;
760 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
761 struct __ecereNameSpace__ecere__com__Class * templateClass;
762 struct __ecereNameSpace__ecere__sys__OldList templatized;
764 unsigned int isInstanceClass;
765 unsigned int byValueSystemClass;
766 } __attribute__ ((gcc_struct));
768 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
770 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
772 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
774 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
776 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
778 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);
780 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
782 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
784 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
786 struct __ecereNameSpace__ecere__com__Instance
789 struct __ecereNameSpace__ecere__com__Class * _class;
791 } __attribute__ ((gcc_struct));
793 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
795 struct __ecereNameSpace__ecere__com__DataMember
797 struct __ecereNameSpace__ecere__com__DataMember * prev;
798 struct __ecereNameSpace__ecere__com__DataMember * next;
800 unsigned int isProperty;
803 struct __ecereNameSpace__ecere__com__Class * _class;
804 const char * dataTypeString;
805 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
806 struct Type * dataType;
810 struct __ecereNameSpace__ecere__sys__OldList members;
811 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
814 } __attribute__ ((gcc_struct));
816 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
818 struct __ecereNameSpace__ecere__com__SerialBuffer
820 unsigned char * _buffer;
824 } __attribute__ ((gcc_struct));
826 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
828 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
834 const char * dataTypeString;
835 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
836 } __attribute__ ((gcc_struct)) __anon1;
837 struct __ecereNameSpace__ecere__com__DataValue expression;
840 const char * memberString;
843 struct __ecereNameSpace__ecere__com__DataMember * member;
844 struct __ecereNameSpace__ecere__com__Property * prop;
845 struct __ecereNameSpace__ecere__com__Method * method;
846 } __attribute__ ((gcc_struct)) __anon1;
847 } __attribute__ ((gcc_struct)) __anon2;
848 } __attribute__ ((gcc_struct)) __anon1;
849 } __attribute__ ((gcc_struct));
853 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
856 typedef union YYSTYPE
861 struct Identifier * id;
862 struct Expression * exp;
863 struct Specifier * specifier;
864 struct __ecereNameSpace__ecere__sys__OldList * list;
865 struct Enumerator * enumerator;
866 struct Declarator * declarator;
867 struct __ecereNameSpace__ecere__com__Instance * pointer;
868 struct Initializer * initializer;
869 struct InitDeclarator * initDeclarator;
870 struct TypeName * typeName;
871 struct Declaration * declaration;
872 struct Statement * stmt;
873 struct FunctionDefinition * function;
874 struct External * external;
875 struct Context * context;
876 struct __ecereNameSpace__ecere__com__Instance * asmField;
877 struct Attrib * attrib;
878 struct ExtDecl * extDecl;
879 struct Attribute * attribute;
880 struct Instantiation * instance;
881 struct MembersInit * membersInit;
882 struct MemberInit * memberInit;
883 struct ClassFunction * classFunction;
884 struct ClassDefinition * _class;
885 struct ClassDef * classDef;
886 struct PropertyDef * prop;
888 struct Symbol * symbol;
889 struct PropertyWatch * propertyWatch;
890 struct TemplateParameter * templateParameter;
891 struct TemplateArgument * templateArgument;
892 struct TemplateDatatype * templateDatatype;
893 struct __ecereNameSpace__ecere__com__Instance * dbtableEntry;
894 struct __ecereNameSpace__ecere__com__Instance * dbindexItem;
895 struct DBTableDef * dbtableDef;
896 } __attribute__ ((gcc_struct)) YYSTYPE;
898 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
902 struct Enumerator * prev;
903 struct Enumerator * next;
905 struct Identifier * id;
906 struct Expression * exp;
907 } __attribute__ ((gcc_struct));
909 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
911 struct InitDeclarator
913 struct InitDeclarator * prev;
914 struct InitDeclarator * next;
916 struct Declarator * declarator;
917 struct Initializer * initializer;
918 } __attribute__ ((gcc_struct));
920 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
924 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
928 struct ClassFunction * prev;
929 struct ClassFunction * next;
931 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
932 struct Declarator * declarator;
933 struct __ecereNameSpace__ecere__sys__OldList * declarations;
934 struct Statement * body;
935 struct __ecereNameSpace__ecere__com__Class * _class;
936 struct __ecereNameSpace__ecere__sys__OldList attached;
939 struct Symbol * propSet;
940 unsigned int isVirtual;
941 unsigned int isConstructor;
942 unsigned int isDestructor;
943 unsigned int dontMangle;
946 } __attribute__ ((gcc_struct));
948 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
952 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
956 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
960 struct PropertyDef * prev;
961 struct PropertyDef * next;
963 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
964 struct Declarator * declarator;
965 struct Identifier * id;
966 struct Statement * getStmt;
967 struct Statement * setStmt;
968 struct Statement * issetStmt;
969 struct Symbol * symbol;
970 struct Expression * category;
973 unsigned int conversion : 1;
974 unsigned int isWatchable : 1;
975 unsigned int isDBProp : 1;
976 } __attribute__ ((gcc_struct)) __anon1;
977 } __attribute__ ((gcc_struct));
979 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
981 struct PropertyWatch;
983 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
987 struct ClassDef * prev;
988 struct ClassDef * next;
993 struct Declaration * decl;
994 struct ClassFunction * function;
995 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
996 struct PropertyDef * propertyDef;
997 struct PropertyWatch * propertyWatch;
999 struct Identifier * defaultProperty;
1002 struct Identifier * id;
1003 struct Initializer * initializer;
1004 } __attribute__ ((gcc_struct)) __anon1;
1005 } __attribute__ ((gcc_struct)) __anon1;
1008 } __attribute__ ((gcc_struct));
1010 extern YYSTYPE yylval;
1012 extern struct Location yylloc;
1014 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Definition;
1018 struct Definition * prev;
1019 struct Definition * next;
1022 } __attribute__ ((gcc_struct));
1026 struct Definition * prev;
1027 struct Definition * next;
1031 struct __ecereNameSpace__ecere__sys__OldList propertiesAndMembers;
1032 struct __ecereNameSpace__ecere__sys__OldList classProperties;
1033 struct __ecereNameSpace__ecere__sys__OldList methods;
1034 unsigned int isRemote;
1035 unsigned int isWatchable;
1037 unsigned int isStatic;
1038 unsigned int noExpansion;
1039 } __attribute__ ((gcc_struct));
1041 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefine;
1045 struct Definition * prev;
1046 struct Definition * next;
1049 struct Expression * exp;
1050 } __attribute__ ((gcc_struct));
1052 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Define;
1054 struct FunctionDefine
1056 struct Definition * prev;
1057 struct Definition * next;
1061 } __attribute__ ((gcc_struct));
1063 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefine;
1067 struct Definition * prev;
1068 struct Definition * next;
1072 } __attribute__ ((gcc_struct));
1074 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_DataDefine;
1078 struct MethodDefine * prev, * next;
1082 unsigned int isVirtual;
1083 } __attribute__ ((gcc_struct));
1085 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodDefine;
1087 struct PropertyDefine
1089 struct PropertyDefine * prev, * next;
1093 unsigned int isWatchable;
1095 unsigned int isVirtual;
1096 unsigned int hasSet, hasGet;
1097 } __attribute__ ((gcc_struct));
1099 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDefine;
1101 struct DataMemberDefine
1103 struct DataMemberDefine * prev, * next;
1107 struct __ecereNameSpace__ecere__sys__OldList dataMembers;
1108 struct __ecereNameSpace__ecere__sys__OldList classProperties;
1112 } __attribute__ ((gcc_struct));
1114 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_DataMemberDefine;
1116 void FreeMethodDefine(struct MethodDefine * method)
1118 (__ecereNameSpace__ecere__com__eSystem_Delete(method->name), method->name = 0);
1119 (__ecereNameSpace__ecere__com__eSystem_Delete(method->type), method->type = 0);
1122 void FreeDataMemberDefine(struct DataMemberDefine * dataMember)
1124 (__ecereNameSpace__ecere__com__eSystem_Delete(dataMember->name), dataMember->name = 0);
1125 (__ecereNameSpace__ecere__com__eSystem_Delete(dataMember->type), dataMember->type = 0);
1128 void FreeDataDefine(struct DataDefine * data)
1130 (__ecereNameSpace__ecere__com__eSystem_Delete(data->name), data->name = 0);
1131 (__ecereNameSpace__ecere__com__eSystem_Delete(data->dataType), data->dataType = 0);
1134 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
1136 void FreeDefinition(struct Definition * definition)
1138 (__ecereNameSpace__ecere__com__eSystem_Delete(definition->name), definition->name = 0);
1139 switch(definition->type)
1143 struct ClassDefine * classDefine = (struct ClassDefine *)definition;
1145 (__ecereNameSpace__ecere__com__eSystem_Delete(classDefine->base), classDefine->base = 0);
1146 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&classDefine->methods, (void *)(FreeMethodDefine));
1147 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&classDefine->propertiesAndMembers, (void *)(FreeDataMemberDefine));
1151 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct FunctionDefine *)definition)->dataType), ((struct FunctionDefine *)definition)->dataType = 0);
1154 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct DataDefine *)definition)->dataType), ((struct DataDefine *)definition)->dataType = 0);
1161 static unsigned int globalInstance = 0;
1163 static struct Context * globalContext;
1165 static struct __ecereNameSpace__ecere__sys__OldList defines, imports, precompDefines;
1167 static struct __ecereNameSpace__ecere__com__Instance * privateModule;
1169 struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols =
1171 0, 0, 0, (unsigned int)(uintptr_t)&((struct Symbol *)(void * )0)->left, 0
1174 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
1176 struct __ecereNameSpace__ecere__com__NameSpace
1179 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1180 struct __ecereNameSpace__ecere__com__NameSpace * left;
1181 struct __ecereNameSpace__ecere__com__NameSpace * right;
1183 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1184 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1185 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1186 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1187 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1188 } __attribute__ ((gcc_struct));
1190 static struct __ecereNameSpace__ecere__com__NameSpace globalData;
1192 extern struct Identifier * GetDeclId(struct Declarator * decl);
1194 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
1196 extern void ProcessExpressionType(struct Expression * exp);
1198 extern void ComputeExpression(struct Expression * exp);
1200 extern int strtol(const char * , char * * , int base);
1202 extern void FreeExpression(struct Expression * exp);
1204 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1206 extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1208 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
1210 struct __ecereNameSpace__ecere__com__BitMember
1212 struct __ecereNameSpace__ecere__com__BitMember * prev;
1213 struct __ecereNameSpace__ecere__com__BitMember * next;
1215 unsigned int isProperty;
1218 struct __ecereNameSpace__ecere__com__Class * _class;
1219 const char * dataTypeString;
1220 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1221 struct Type * dataType;
1226 } __attribute__ ((gcc_struct));
1228 extern struct __ecereNameSpace__ecere__com__BitMember * __ecereNameSpace__ecere__com__eClass_AddBitMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, int bitSize, int bitPos, int declMode);
1230 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_AddDataMember(struct __ecereNameSpace__ecere__com__DataMember * member, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode);
1232 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);
1234 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_New(int type, int declMode);
1236 extern unsigned int __ecereNameSpace__ecere__com__eMember_AddMember(struct __ecereNameSpace__ecere__com__DataMember * addTo, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
1238 extern unsigned int __ecereNameSpace__ecere__com__eClass_AddMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
1240 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
1242 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1244 extern char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1246 extern struct __ecereNameSpace__ecere__com__Property * __ecereNameSpace__ecere__com__eClass_AddProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * dataType, void * setStmt, void * getStmt, int declMode);
1248 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassProperty;
1250 struct __ecereNameSpace__ecere__com__ClassProperty
1253 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1254 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1255 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1257 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1258 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1259 const char * dataTypeString;
1260 struct Type * dataType;
1261 unsigned int constant;
1262 } __attribute__ ((gcc_struct));
1264 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_AddClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * dataType, void * setStmt, void * getStmt);
1266 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);
1268 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);
1270 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
1272 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
1274 static void AddDefinitions(struct ClassDefine * classDefine, struct DataMemberDefine * parentMemberDefine, struct __ecereNameSpace__ecere__com__Class * regClass, struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__sys__OldList * definitions)
1276 if(definitions != (((void *)0)))
1278 struct ClassDef * def;
1280 for(def = definitions->first; def; def = def->next)
1284 struct Declaration * decl = def->__anon1.decl;
1285 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
1286 struct Type * dataType;
1287 struct DataMemberDefine * dataMemberDefine;
1291 struct Declarator * d;
1293 if(decl->__anon1.__anon1.declarators)
1295 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1297 struct Identifier * declId = GetDeclId(d);
1301 dataMemberDefine = __extension__ ({
1302 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
1304 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(declId->string), __ecereInstance1;
1306 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
1307 if(regClass && regClass->type == 2)
1309 struct Expression * sizeExp = d->__anon1.structDecl.exp, * posExp = d->__anon1.structDecl.posExp;
1310 int bitSize = 0, bitPos = -1;
1311 char dataTypeString[1024];
1313 dataTypeString[0] = '\0';
1316 ProcessExpressionType(sizeExp);
1317 ComputeExpression(sizeExp);
1318 if(sizeExp->isConstant)
1319 bitSize = strtol(sizeExp->__anon1.__anon1.constant, (((void *)0)), 0);
1320 FreeExpression(sizeExp);
1324 ProcessExpressionType(posExp);
1325 ComputeExpression(posExp);
1326 if(posExp->isConstant)
1327 bitPos = strtol(posExp->__anon1.__anon1.constant, (((void *)0)), 0);
1328 FreeExpression(posExp);
1330 d->__anon1.structDecl.exp = (((void *)0));
1331 d->__anon1.structDecl.posExp = (((void *)0));
1332 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1333 PrintType(dataType, dataTypeString, 0, 1);
1335 struct __ecereNameSpace__ecere__com__BitMember * member = __ecereNameSpace__ecere__com__eClass_AddBitMember(regClass, declId->string, dataTypeString, 0, 0, def->memberAccess);
1337 member->size = bitSize;
1338 member->pos = bitPos;
1339 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)member;
1342 dataMember->dataType = dataType;
1343 dataMemberDefine->size = bitSize;
1344 dataMemberDefine->bitPos = bitPos;
1345 dataMemberDefine->type = __ecereNameSpace__ecere__sys__CopyString(dataTypeString);
1350 char typeString[1024];
1352 typeString[0] = '\0';
1353 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1354 PrintType(dataType, typeString, 0, 1);
1356 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, declId->string, typeString, 0, 0, def->memberAccess);
1358 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, declId->string, typeString, 0, 0, def->memberAccess);
1360 dataMember->dataType = dataType;
1361 dataMemberDefine->type = __ecereNameSpace__ecere__sys__CopyString(typeString);
1364 dataMemberDefine->memberAccess = def->memberAccess;
1368 else if(decl->__anon1.__anon1.specifiers)
1370 struct Specifier * spec;
1372 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
1374 if(spec->type == 3 || spec->type == 4)
1376 if(spec->__anon1.__anon2.definitions && !spec->__anon1.__anon2.id)
1378 struct __ecereNameSpace__ecere__com__DataMember * dataMember = __ecereNameSpace__ecere__com__eMember_New((spec->type == 4) ? 1 : 2, def->memberAccess);
1380 dataMemberDefine = __extension__ ({
1381 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
1383 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = (spec->type == 4) ? 1 : 2, __ecereInstance1;
1385 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
1386 AddDefinitions((((void *)0)), dataMemberDefine, (((void *)0)), dataMember, spec->__anon1.__anon2.definitions);
1388 __ecereNameSpace__ecere__com__eMember_AddMember(member, dataMember);
1390 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, dataMember);
1392 else if(spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id && (*spec->__anon1.__anon2.definitions).count)
1395 struct Identifier * id = spec->__anon1.__anon2.id;
1396 char typeString[1024];
1398 typeString[0] = '\0';
1399 spec->__anon1.__anon2.id = (((void *)0));
1400 decl->__anon1.__anon1.declarators = MkListOne(MkDeclaratorIdentifier(id));
1401 dataType = ProcessType(decl->__anon1.__anon1.specifiers, (((void *)0)));
1402 PrintType(dataType, typeString, 0, 1);
1404 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, id->string, typeString, 0, 0, def->memberAccess);
1406 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, id->string, typeString, 0, 0, def->memberAccess);
1408 dataMember->dataType = dataType;
1415 else if(decl->type == 2)
1417 struct Instantiation * inst = decl->__anon1.inst;
1418 struct Expression * exp = inst->exp;
1423 char * string = exp->__anon1.__anon1.identifier->string;
1426 struct Type * dataType = (dataType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dataType->kind = 8, dataType->__anon1._class = inst->_class->__anon1.__anon1.symbol, dataType->refCount = 1, dataType);
1429 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1431 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1433 dataMember->dataType = dataType;
1435 dataMemberDefine = __extension__ ({
1436 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
1438 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(string), __ecereInstance1->type = __ecereNameSpace__ecere__sys__CopyString(inst->_class->__anon1.__anon1.name), __ecereInstance1;
1440 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
1445 else if(def->type == 3 && def->__anon1.propertyDef)
1447 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1450 struct __ecereNameSpace__ecere__com__Property * prop;
1451 struct PropertyDefine * propDefine;
1454 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1456 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, propertyDef->__anon1.conversion ? (((void *)0)) : propertyDef->id->string, dataTypeString, propertyDef->setStmt, propertyDef->getStmt, def->memberAccess);
1459 prop->IsSet = (void *)propertyDef->issetStmt;
1462 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1466 prop->symbol = __extension__ ({
1467 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1469 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(propertyDef->symbol->string), __ecereInstance1->id = propertyDef->symbol->id, __ecereInstance1->type = propertyDef->symbol->type, __ecereInstance1;
1471 if(propertyDef->symbol->type)
1472 propertyDef->symbol->type->refCount++;
1473 propDefine = __extension__ ({
1474 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
1476 __ecereInstance1->isProperty = 1, __ecereInstance1->name = prop->conversion ? (((void *)0)) : __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->type = __ecereNameSpace__ecere__sys__CopyString(prop->dataTypeString), __ecereInstance1->isVirtual = 0, __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1->hasSet = propertyDef->setStmt ? 1 : 0, __ecereInstance1->hasGet = propertyDef->getStmt ? 1 : 0, __ecereInstance1->isWatchable = propertyDef->__anon1.isWatchable, __ecereInstance1;
1478 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, propDefine);
1482 else if(def->type == 10 && def->__anon1.propertyDef)
1484 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1487 struct __ecereNameSpace__ecere__com__ClassProperty * prop;
1488 struct PropertyDefine * propDefine;
1491 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1493 prop = __ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, propertyDef->id->string, dataTypeString, propertyDef->setStmt, propertyDef->getStmt);
1494 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1498 propDefine = __extension__ ({
1499 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
1501 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->type = __ecereNameSpace__ecere__sys__CopyString(prop->dataTypeString), __ecereInstance1->hasSet = propertyDef->setStmt ? 1 : 0, __ecereInstance1->hasGet = propertyDef->getStmt ? 1 : 0, __ecereInstance1;
1503 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->classProperties, propDefine);
1507 else if(def->type == 7)
1510 classDefine->fixed = 1;
1512 else if(def->type == 6)
1515 classDefine->noExpansion = 1;
1517 else if(def->type == 13)
1519 struct __ecereNameSpace__ecere__com__DataMember * member;
1520 struct __ecereNameSpace__ecere__com__Property * prop;
1522 if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(regClass, def->__anon1.__anon1.id->string, privateModule)))
1524 struct PropertyDefine * propDefine;
1526 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, def->__anon1.__anon1.id->string, (((void *)0)), (((void *)0)), (((void *)0)), def->memberAccess);
1529 propDefine = __extension__ ({
1530 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
1532 __ecereInstance1->isProperty = 1, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
1534 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, propDefine);
1537 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(regClass, def->__anon1.__anon1.id->string, privateModule, (((void *)0)), (((void *)0)))))
1539 struct DataMemberDefine * dataMemberDefine;
1541 member = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, def->__anon1.__anon1.id->string, (((void *)0)), 0, 0, def->memberAccess);
1542 dataMemberDefine = __extension__ ({
1543 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
1545 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(def->__anon1.__anon1.id->string), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
1547 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
1554 extern void FreeType(struct Type * type);
1556 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);
1558 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode);
1560 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode);
1562 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);
1564 extern char * strcpy(char * , const char * );
1566 extern char * strcat(char * , const char * );
1568 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_OpTable;
1572 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1573 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1574 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1575 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1576 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1577 unsigned int (* Neg)(struct Expression *, struct Operand *);
1578 unsigned int (* Inc)(struct Expression *, struct Operand *);
1579 unsigned int (* Dec)(struct Expression *, struct Operand *);
1580 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1581 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1582 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1583 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1584 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1585 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1586 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1587 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1588 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1589 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1590 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1591 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1592 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1593 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1594 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1595 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1596 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1597 unsigned int (* Not)(struct Expression *, struct Operand *);
1598 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1599 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1600 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1601 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1602 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1603 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1604 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1605 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1606 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1607 } __attribute__ ((gcc_struct));
1609 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Operand;
1615 unsigned int ptrSize;
1628 } __attribute__ ((gcc_struct)) __anon1;
1630 } __attribute__ ((gcc_struct));
1632 extern struct Operand GetOperand(struct Expression * exp);
1634 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateParameter;
1636 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
1638 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
1639 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
1644 const char * dataTypeString;
1646 } __attribute__ ((gcc_struct)) __anon1;
1647 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
1649 } __attribute__ ((gcc_struct));
1651 extern struct __ecereNameSpace__ecere__com__ClassTemplateParameter * __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, int type, const void * info, struct __ecereNameSpace__ecere__com__ClassTemplateArgument * defaultArg);
1653 static void ProcessClass(int classType, struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol, struct __ecereNameSpace__ecere__sys__OldList * baseSpecs, struct __ecereNameSpace__ecere__sys__OldList * enumValues, unsigned int isWatchable, int declMode)
1655 struct __ecereNameSpace__ecere__com__Class * regClass;
1656 struct ClassDef * def;
1657 struct ClassDefine * classDefine;
1658 char baseName[1024];
1659 unsigned int unitType = 0;
1660 unsigned int wouldBeEnum = 0;
1661 int inheritanceAccess = 1;
1664 if(baseSpecs != (((void *)0)))
1666 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
1668 PrintType(baseType, baseName, 0, 1);
1669 if(baseType->kind == 8)
1671 if(baseType->__anon1._class->__anon1.registered && classType == 0)
1673 if(baseType->__anon1._class->__anon1.registered->type == 3)
1675 else if(baseType->__anon1._class->__anon1.registered->type == 2)
1677 else if(baseType->__anon1._class->__anon1.registered->type == 5)
1679 else if(baseType->__anon1._class->__anon1.registered->type == 4)
1685 else if(baseType->kind == 9 || baseType->kind == 10)
1693 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
1694 inheritanceAccess = 2;
1700 if(definitions != (((void *)0)))
1702 for(def = definitions->first; def; def = def->next)
1706 struct Declaration * decl = def->__anon1.decl;
1715 if(decl->__anon1.__anon1.declarators)
1717 struct Declarator * d;
1719 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1721 if(d->__anon1.structDecl.exp)
1735 if(classType == 0 && wouldBeEnum)
1737 regClass = symbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_RegisterClass((classType == 6) ? 1 : classType, symbol->string, baseName[0] ? baseName : (((void *)0)), 0, 0, (((void *)0)), (((void *)0)), privateModule, 1, inheritanceAccess);
1739 regClass->symbol = symbol;
1740 classDefine = __extension__ ({
1741 struct ClassDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassDefine);
1743 __ecereInstance1->type = 1, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(symbol->string), __ecereInstance1->base = baseName[0] ? __ecereNameSpace__ecere__sys__CopyString(baseName) : (((void *)0)), __ecereInstance1->isStatic = declMode == 3, __ecereInstance1->isRemote = symbol->isRemote, __ecereInstance1->isWatchable = isWatchable, __ecereInstance1;
1745 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, classDefine);
1748 struct __ecereNameSpace__ecere__com__DataMember * unionMember = __ecereNameSpace__ecere__com__eMember_New(1, 1);
1749 struct DataMemberDefine * unionDefine;
1751 unionDefine = __extension__ ({
1752 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
1754 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 1, __ecereInstance1;
1756 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, unionDefine);
1757 AddDefinitions(classDefine, unionDefine, regClass, unionMember, definitions);
1758 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, unionMember);
1761 AddDefinitions(classDefine, (struct DataMemberDefine *)classDefine, regClass, (((void *)0)), definitions);
1762 if(definitions != (((void *)0)))
1764 for(def = definitions->first; def; def = def->next)
1768 struct ClassFunction * func = def->__anon1.function;
1770 if(!func->dontMangle && func->declarator)
1772 struct Identifier * id = GetDeclId(func->declarator);
1773 struct __ecereNameSpace__ecere__com__Method * method;
1774 struct MethodDefine * methodDefine;
1777 char * dataTypeString = StringFromSpecDecl(func->specifiers, func->declarator);
1780 method = __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(regClass, id->string, dataTypeString, func->declarator->symbol, def->memberAccess);
1782 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, id->string, dataTypeString, func->declarator->symbol, def->memberAccess);
1783 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1787 method->symbol = __extension__ ({
1788 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1790 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(func->declarator->symbol->string), __ecereInstance1->id = func->declarator->symbol->id, __ecereInstance1->type = func->declarator->symbol->type, __ecereInstance1;
1792 if(func->declarator->symbol->type)
1793 func->declarator->symbol->type->refCount++;
1794 ((struct Symbol *)method->symbol)->__anon1.method = method;
1795 func->declarator->symbol = (((void *)0));
1796 if(method->type != 1 || method->_class == regClass)
1798 methodDefine = __extension__ ({
1799 struct MethodDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodDefine);
1801 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->type = __ecereNameSpace__ecere__sys__CopyString(method->dataTypeString), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1->isVirtual = method->type == 1, __ecereInstance1;
1803 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->methods, methodDefine);
1808 else if(def->type == 13)
1810 struct __ecereNameSpace__ecere__com__Method * method;
1812 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(regClass, def->__anon1.__anon1.id->string, privateModule)))
1814 struct MethodDefine * methodDefine;
1816 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, def->__anon1.__anon1.id->string, (((void *)0)), (((void *)0)), def->memberAccess);
1817 methodDefine = __extension__ ({
1818 struct MethodDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodDefine);
1820 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
1822 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->methods, methodDefine);
1827 if(regClass && symbol->templateParams)
1829 struct TemplateParameter * param;
1831 for(param = (*symbol->templateParams).first; param; param = param->next)
1833 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg =
1844 if(param->defaultArgument)
1849 defaultArg.__anon1.__anon1.dataTypeString = StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl);
1853 char memberString[1024];
1855 memberString[0] = '\0';
1856 if(param->defaultArgument->__anon1.identifier->_class && param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
1858 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
1859 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
1861 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
1865 strcat(memberString, "::");
1867 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
1868 defaultArg.__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(memberString);
1875 ProcessExpressionType(param->defaultArgument->__anon1.expression);
1876 ComputeExpression(param->defaultArgument->__anon1.expression);
1877 op = GetOperand(param->defaultArgument->__anon1.expression);
1878 defaultArg.__anon1.expression.__anon1.ui64 = op.__anon1.ui64;
1883 if(param->type == 1)
1885 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, (void *)(uintptr_t)param->__anon1.memberType, &defaultArg);
1889 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
1891 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, typeString, &defaultArg);
1897 extern void SetParsingType(unsigned int b);
1899 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
1901 struct __ecereNameSpace__ecere__sys__NamedLink64
1903 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1904 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1907 } __attribute__ ((gcc_struct));
1909 extern int strcmp(const char * , const char * );
1911 extern void FreeExpContents(struct Expression * exp);
1913 extern char * PrintInt64(long long result);
1915 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
1917 extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string, long long value);
1919 extern void PrintExpression(struct Expression * exp, char * string);
1921 extern int printf(const char * , ...);
1923 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
1925 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
1927 extern long long __ecereNameSpace__ecere__com__eEnum_AddValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string);
1929 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
1931 struct __ecereNameSpace__ecere__com__Application
1934 const char * * argv;
1936 unsigned int isGUIApp;
1937 struct __ecereNameSpace__ecere__sys__OldList allModules;
1938 char * parsedCommand;
1939 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
1940 } __attribute__ ((gcc_struct));
1942 static void ProcessClassEnumValues(int classType, struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol, struct __ecereNameSpace__ecere__sys__OldList * baseSpecs, struct __ecereNameSpace__ecere__sys__OldList * enumValues)
1944 struct __ecereNameSpace__ecere__com__Class * regClass = symbol->__anon1.registered;
1946 if(regClass && enumValues)
1948 struct Enumerator * e;
1950 for(e = enumValues->first; e; e = e->next)
1954 struct Type * destType = (destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), destType->kind = 4, destType->refCount = 1, destType);
1956 e->exp->destType = destType;
1958 ProcessExpressionType(e->exp);
1960 if(!e->exp->expType)
1963 destType->__anon1._class = symbol;
1964 ProcessExpressionType(e->exp);
1966 if(e->exp->isConstant)
1968 if(e->exp->type == 0 && e->exp->expType && e->exp->__anon1.__anon1.identifier && e->exp->__anon1.__anon1.identifier->string && e->exp->expType->kind == 15)
1970 struct __ecereNameSpace__ecere__sys__NamedLink64 * l;
1971 char * string = e->exp->__anon1.__anon1.identifier->string;
1973 for(l = e->exp->expType->__anon1.__anon1.members.first; l; l = l->next)
1975 if(!strcmp(l->name, string))
1979 FreeExpContents(e->exp);
1981 e->exp->__anon1.__anon1.constant = PrintInt64(l->data);
1982 FreeType(e->exp->expType);
1983 e->exp->expType = ProcessTypeString("int64", 0);
1990 ComputeExpression(e->exp);
1992 if(e->exp->isConstant && e->exp->type == 2)
1994 struct Operand op = GetOperand(e->exp);
2000 value = op.type->isSigned ? (long long)op.__anon1.c : (long long)op.__anon1.uc;
2003 value = op.type->isSigned ? (long long)op.__anon1.s : (long long)op.__anon1.us;
2006 value = op.type->isSigned ? op.__anon1.i64 : (long long)op.__anon1.ui64;
2010 value = op.type->isSigned ? (long long)op.__anon1.i : (int)op.__anon1.ui;
2012 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(regClass, e->id->string, value);
2016 char expString[8192];
2018 expString[0] = (char)0;
2019 PrintExpression(e->exp, expString);
2020 printf(__ecereNameSpace__ecere__GetTranslatedString("ecp", "error: could not resolve value %s for enum %s in precompiler\n", (((void *)0))), expString, regClass->name);
2021 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Instance *)__thisModule) + structSize_Module)))->exitCode = 1;
2022 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2026 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2031 extern struct __ecereNameSpace__ecere__sys__OldList * GetAST(void);
2033 extern struct Symbol * FindClass(const char * name);
2035 extern void SetCurrentNameSpace(const char * s);
2037 extern void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module);
2039 void PreCompPreProcessClassDefinitions()
2041 struct __ecereNameSpace__ecere__sys__OldList * ast = GetAST();
2042 struct External * external, * next;
2044 for(external = (*ast).first; external; external = next)
2046 next = external->next;
2047 if(external->type == 2)
2049 struct ClassDefinition * _class = external->__anon1._class;
2051 if(_class->declMode == 1 || _class->declMode == 2 || _class->declMode == 3)
2053 if(_class->definitions)
2055 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), _class->deleteWatchable, _class->declMode);
2059 else if(external->type == 1)
2061 struct Declaration * declaration = external->__anon1.declaration;
2063 if(declaration->type == 1)
2065 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2 || external->__anon1.declaration->declMode == 3)
2067 if(declaration->__anon1.__anon1.specifiers)
2069 struct Specifier * specifier;
2071 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
2073 if((specifier->type == 2 || specifier->type == 3 || specifier->type == 4) && specifier->__anon1.__anon2.id && specifier->__anon1.__anon2.id->string && (declaration->declMode || specifier->__anon1.__anon2.baseSpecs || (specifier->type == 2 && specifier->__anon1.__anon2.definitions)))
2075 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
2081 if(specifier->type == 2)
2083 else if(specifier->type == 4)
2087 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, 0, external->__anon1.declaration->declMode);
2092 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2094 if(declaration->__anon1.__anon1.declarators)
2096 struct InitDeclarator * d;
2098 for(d = (*declaration->__anon1.__anon1.declarators).first; d; d = d->next)
2102 struct Symbol * symbol = d->declarator->symbol;
2106 struct DataDefine * dataDefine;
2107 char typeString[1024];
2109 typeString[0] = '\0';
2110 PrintType(symbol->type, typeString, 0, 1);
2111 dataDefine = __extension__ ({
2112 struct DataDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataDefine);
2114 __ecereInstance1->type = 4, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2116 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, dataDefine);
2124 else if(declaration->type == 2)
2126 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2128 struct Symbol * symbol = declaration->__anon1.inst->symbol;
2132 struct DataDefine * dataDefine;
2133 char typeString[1024];
2135 typeString[0] = '\0';
2136 PrintType(symbol->type, typeString, 0, 1);
2137 dataDefine = __extension__ ({
2138 struct DataDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataDefine);
2140 __ecereInstance1->type = 4, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2142 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, dataDefine);
2147 else if(declaration->type == 3)
2149 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2151 struct Define * definition = (definition = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Define), definition->type = 2, definition->name = __ecereNameSpace__ecere__sys__CopyString(declaration->__anon1.__anon2.id->string), definition->exp = declaration->__anon1.__anon2.exp, definition);
2153 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, definition);
2157 else if(external->type == 0 && (external->__anon1.function->declMode == 1 || external->__anon1.function->declMode == 2))
2159 struct FunctionDefinition * function = external->__anon1.function;
2160 struct FunctionDefine * functionDefine;
2161 char typeString[1024];
2163 typeString[0] = '\0';
2164 PrintType(function->declarator->symbol->type, typeString, 1, 1);
2165 functionDefine = __extension__ ({
2166 struct FunctionDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionDefine);
2168 __ecereInstance1->type = 3, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->declarator->symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2170 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, functionDefine);
2172 else if(external->type == 4)
2174 SetCurrentNameSpace(external->__anon1.id->string);
2177 ComputeModuleClasses(privateModule);
2178 for(external = (*ast).first; external; external = next)
2180 next = external->next;
2181 if(external->type == 1 && (external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2))
2183 struct Declaration * declaration = external->__anon1.declaration;
2185 if(declaration->type == 1)
2187 if(declaration->__anon1.__anon1.specifiers)
2189 struct Specifier * specifier;
2191 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
2193 if((specifier->type == 2) && specifier->__anon1.__anon2.id && specifier->__anon1.__anon2.id->string && (declaration->declMode || specifier->__anon1.__anon2.baseSpecs || (specifier->type == 2 && specifier->__anon1.__anon2.definitions)))
2195 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
2199 ProcessClassEnumValues(4, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list);
2209 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, const char * format, ...);
2211 static void OutputDataMembers(struct ClassDefine * classDefine, struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2213 if(classDefine->propertiesAndMembers.first)
2215 struct DataMemberDefine * member = classDefine->propertiesAndMembers.first;
2218 for(member = classDefine->propertiesAndMembers.first; member; member = member->next)
2220 if(member->isProperty == 1)
2222 struct PropertyDefine * prop = (struct PropertyDefine *)member;
2227 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2228 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Properties]\n");
2231 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->name);
2233 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Conversion]\n");
2234 if(prop->memberAccess == 1)
2235 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
2237 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
2239 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Virtual]\n");
2241 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Set]\n");
2243 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Get]\n");
2244 if(prop->isWatchable)
2245 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Watchable]\n");
2246 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2247 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->type ? prop->type : "");
2254 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2255 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Data Members]\n");
2257 if(member->memberType == 0)
2259 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", member->name);
2260 if(member->memberAccess == 1)
2261 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
2263 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
2264 if(_class && _class->type == 2)
2268 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Size]\n");
2269 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %d\n", member->size);
2271 if(member->bitPos != -1)
2273 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Pos]\n");
2274 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %d\n", member->bitPos);
2277 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2278 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", member->type ? member->type : "");
2282 if(member->memberAccess == 1)
2283 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
2285 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
2286 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, (member->memberType == 1) ? " [Union]\n" : " [Struct]\n");
2287 OutputDataMembers((struct ClassDefine *)member, (((void *)0)), f);
2290 last = member->isProperty;
2292 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2294 if(classDefine->classProperties.first)
2296 struct PropertyDefine * prop = classDefine->propertiesAndMembers.first;
2298 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Class Properties]\n");
2299 for(prop = classDefine->classProperties.first; prop; prop = prop->next)
2302 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->name);
2304 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Set]\n");
2306 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Get]\n");
2307 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2308 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->type ? prop->type : "");
2310 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2314 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__FileOpen(const char * fileName, int mode);
2316 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ImportedModule;
2318 struct ImportedModule
2320 struct ImportedModule * prev;
2321 struct ImportedModule * next;
2325 unsigned int globalInstance;
2326 unsigned int dllOnly;
2328 } __attribute__ ((gcc_struct));
2330 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
2332 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
2334 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__EnumClassData;
2336 struct __ecereNameSpace__ecere__com__EnumClassData
2338 struct __ecereNameSpace__ecere__sys__OldList values;
2340 } __attribute__ ((gcc_struct));
2342 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
2344 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
2346 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
2348 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2350 static void OutputSymbols(const char * fileName)
2352 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__sys__FileOpen(fileName, 2);
2356 int lastType = (int)-1;
2357 struct Definition * definition;
2360 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Global Instance]\n");
2361 for(definition = precompDefines.first; definition; definition = definition->next)
2363 if(definition->type != lastType)
2365 if(lastType != (int)-1)
2366 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2367 if(definition->type == 0)
2368 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Imported Modules]\n");
2369 else if(definition->type == 1)
2370 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Classes]\n");
2371 else if(definition->type == 2)
2372 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Expressions]\n");
2373 else if(definition->type == 3)
2374 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Functions]\n");
2375 else if(definition->type == 4)
2376 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Data]\n");
2377 lastType = definition->type;
2379 if(definition->type == 0)
2381 struct ImportedModule * module = (struct ImportedModule *)definition;
2383 if(module->importType == 1)
2384 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Static]\n");
2385 else if(module->importType == 2)
2386 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Remote]\n");
2387 if(module->importAccess == 2)
2388 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
2389 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", module->name);
2391 else if(definition->type == 1)
2393 struct __ecereNameSpace__ecere__com__Class * _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, definition->name);
2394 struct ClassDefine * classDefine = (struct ClassDefine *)definition;
2396 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", definition->name);
2397 if(classDefine->isStatic)
2398 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Static]\n");
2399 if(classDefine->fixed)
2400 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Fixed]\n");
2401 if(classDefine->noExpansion)
2402 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [No Expansion]\n");
2403 if(classDefine->isRemote)
2404 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Remote]\n");
2405 if(classDefine->isWatchable)
2406 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Watchable]\n");
2407 if(_class->type == 4)
2408 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Enum]\n");
2409 else if(_class->type == 2)
2410 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Bit]\n");
2411 else if(_class->type == 1)
2412 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Struct]\n");
2413 else if(_class->type == 3)
2414 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Unit]\n");
2415 else if(_class->type == 5)
2416 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [NoHead]\n");
2417 if(_class->inheritanceAccess == 2)
2418 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private Base]\n");
2420 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Base]\n");
2421 if(classDefine->base)
2422 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", classDefine->base);
2424 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [None]\n");
2425 if(_class->templateParams.count)
2427 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
2428 struct TemplateParameter * tp;
2430 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Template Parameters]\n");
2431 for(tp = (*((struct Symbol *)_class->symbol)->templateParams).first, param = _class->templateParams.first; param && tp; param = param->next, tp = tp->next)
2433 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->name);
2437 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2438 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->__anon1.dataTypeString ? param->__anon1.dataTypeString : "[None]");
2439 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->defaultArg.__anon1.__anon1.dataTypeString ? param->defaultArg.__anon1.__anon1.dataTypeString : "[None]");
2442 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Expression]\n");
2443 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->__anon1.dataTypeString ? param->__anon1.dataTypeString : "[None]");
2444 if(tp->defaultArgument && tp->defaultArgument->__anon1.expression)
2449 PrintExpression(tp->defaultArgument->__anon1.expression, temp);
2450 __ecereNameSpace__ecere__sys__ChangeCh(temp, '\n', ' ');
2451 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
2452 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
2453 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
2455 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
2456 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, temp);
2457 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
2458 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
2460 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
2461 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2464 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [None]\n");
2467 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Identifier]\n");
2468 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", (param->__anon1.memberType == 0) ? "[Data member]" : ((param->__anon1.memberType == 1) ? "[Method]" : "[Property]"));
2469 if(tp->defaultArgument && tp->defaultArgument->__anon1.identifier)
2471 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
2472 if(tp->defaultArgument->__anon1.identifier->_class && tp->defaultArgument->__anon1.identifier->_class->type == 1 && tp->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
2474 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s::", tp->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
2476 else if(tp->defaultArgument->__anon1.identifier->_class && tp->defaultArgument->__anon1.identifier->_class->type == 8 && tp->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier)
2478 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s::", tp->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
2480 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s\n", tp->defaultArgument->__anon1.identifier->string);
2484 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [None]\n");
2489 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2491 if(!classDefine->isStatic)
2493 if(classDefine->methods.first)
2495 struct MethodDefine * method;
2497 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Methods]\n");
2498 for(method = classDefine->methods.first; method; method = method->next)
2500 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", method->name);
2501 if(method->memberAccess == 1)
2502 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
2504 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
2505 if(method->isVirtual)
2506 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Virtual]\n");
2507 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2508 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", method->type ? method->type : "");
2510 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2512 OutputDataMembers(classDefine, _class, f);
2513 if(_class->type == 4)
2515 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
2516 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
2517 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
2519 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Enum Values]\n");
2520 for(value = e->values.first; value; value = value->next)
2522 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s = ", value->name);
2523 if(!strcmp(_class->dataTypeString, "uint64") && *(uint64 *)&value->data > (((long long)0x7fffffffffffffffLL)))
2524 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), *(uint64 *)&value->data);
2526 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
2527 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
2529 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2533 else if(definition->type == 2)
2535 struct Define * defineDefine = (struct Define *)definition;
2537 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", definition->name);
2538 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Value]\n");
2539 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
2540 OutputExpression(defineDefine->exp, f);
2541 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
2543 else if(definition->type == 3)
2545 struct FunctionDefine * functionDefine = (struct FunctionDefine *)definition;
2547 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", functionDefine->name);
2548 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2549 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", functionDefine->dataType);
2551 else if(definition->type == 4)
2553 struct DataDefine * dataDefine = (struct DataDefine *)definition;
2555 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", dataDefine->name);
2556 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2557 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", dataDefine->dataType);
2560 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2561 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2565 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_PrecompApp;
2567 extern int GetHostBits(void);
2569 extern size_t strlen(const char * );
2571 extern char * PassArg(char * output, const char * input);
2573 extern const char * GetOutputFile(void);
2575 extern void SetOutputFile(const char * s);
2577 extern const char * GetSourceFile(void);
2579 extern void SetSourceFile(const char * s);
2581 extern void SetSymbolsDir(const char * s);
2583 extern void SetDefaultNameSpace(const char * s);
2585 extern void SetStrictNameSpaces(unsigned int b);
2587 extern void SetI18nModuleName(const char * s);
2589 extern const char * GetSymbolsDir(void);
2591 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, const char * addedPath);
2593 extern char * __ecereNameSpace__ecere__sys__ChangeExtension(const char * string, const char * ext, char * output);
2595 extern void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace);
2597 extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * list);
2599 extern void SetGlobalContext(struct Context * context);
2601 extern void SetCurrentContext(struct Context * context);
2603 extern void SetTopContext(struct Context * context);
2605 extern void SetDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
2607 extern void SetImports(struct __ecereNameSpace__ecere__sys__OldList * list);
2609 extern void SetInPreCompiler(unsigned int b);
2611 extern void SetPrecompDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
2613 extern void SetTargetPlatform(int platform);
2615 extern void SetTargetBits(int bits);
2617 extern void SetEchoOn(unsigned int b);
2619 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
2621 extern void SetPrivateModule(struct __ecereNameSpace__ecere__com__Instance * module);
2623 extern unsigned int __ecereNameSpace__ecere__sys__FileExists(const char * fileName);
2625 extern unsigned int __ecereNameSpace__ecere__sys__DeleteFile(const char * fileName);
2627 extern int snprintf(char * , size_t, const char * , ...);
2629 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine);
2631 extern void SetFileInput(struct __ecereNameSpace__ecere__com__Instance * file);
2633 extern void SetMainModule(struct ModuleImport * moduleImport);
2635 extern void resetScanner(void);
2637 extern void ParseEc(void);
2639 extern void SetYydebug(unsigned int b);
2641 extern void ProcessDBTableDefinitions(void);
2643 extern void FreeASTTree(struct __ecereNameSpace__ecere__sys__OldList * ast);
2645 extern void FreeContext(struct Context * context);
2647 extern void FreeExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols);
2649 extern void FreeModuleDefine(struct Definition * def);
2651 extern void FreeModuleImport(struct ModuleImport * imp);
2653 extern void FreeTypeData(struct __ecereNameSpace__ecere__com__Instance * privateModule);
2655 extern void FreeIncludeFiles(void);
2657 extern void FreeGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * globalDataList);
2659 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2661 const char * __ecereProp___ecereNameSpace__ecere__com__Platform_Get_char__PTR_(int this);
2663 int __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(const char * value);
2665 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
2667 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
2669 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
2671 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
2673 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2675 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
2677 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode();
2679 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2681 void __ecereMethod_PrecompApp_Main(struct __ecereNameSpace__ecere__com__Instance * this)
2684 unsigned int valid = 1;
2685 char defaultSymFile[797];
2686 char * cppCommand = (((void *)0));
2687 char * cppOptions = (((void *)0));
2688 int cppOptionsLen = 0;
2689 int targetPlatform = __runtimePlatform;
2690 int targetBits = GetHostBits();
2692 for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc; c++)
2694 const char * arg = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c];
2698 if(!strcmp(arg + 1, "m32") || !strcmp(arg + 1, "m64"))
2700 int newLen = cppOptionsLen + 1 + strlen(arg);
2702 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (newLen + 1));
2703 cppOptions[cppOptionsLen] = ' ';
2704 strcpy(cppOptions + cppOptionsLen + 1, arg);
2705 cppOptionsLen = newLen;
2706 targetBits = !strcmp(arg + 1, "m32") ? 32 : 64;
2708 else if(!strcmp(arg + 1, "t32") || !strcmp(arg + 1, "t64"))
2710 targetBits = !strcmp(arg + 1, "t32") ? 32 : 64;
2712 else if(arg[1] == 'D' || arg[1] == 'I')
2715 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
2717 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2718 buf = cppOptions + cppOptionsLen;
2721 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
2723 else if(!strcmp(arg + 1, "t"))
2725 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2726 targetPlatform = __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c]);
2730 else if(!strcmp(arg + 1, "cpp"))
2732 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2733 cppCommand = __ecereNameSpace__ecere__sys__CopyString(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c]);
2737 else if(!strcmp(arg + 1, "o"))
2739 if(!GetOutputFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2741 SetOutputFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
2747 else if(!strcmp(arg + 1, "c"))
2749 if(!GetSourceFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2751 SetSourceFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
2757 else if(!strcmp(arg + 1, "isystem") || !strcmp(arg + 1, "isysroot"))
2759 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2762 const char * arg1 = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[++c];
2763 int size = cppOptionsLen + 1 + strlen(arg) * 2 + strlen(arg1) * 2 + 1;
2765 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2766 buf = cppOptions + cppOptionsLen;
2768 buf = PassArg(buf, arg);
2770 buf = PassArg(buf, arg1);
2771 cppOptionsLen = buf - cppOptions;
2776 else if(!strcmp(arg + 1, "fno-diagnostics-show-caret"))
2779 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
2781 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2782 buf = cppOptions + cppOptionsLen;
2785 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
2787 else if(!strcmp(arg + 1, "symbols"))
2789 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2791 SetSymbolsDir(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
2797 else if(!strcmp(arg + 1, "defaultns"))
2799 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2801 SetDefaultNameSpace(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
2807 else if(!strcmp(arg + 1, "strictns"))
2809 SetStrictNameSpaces(1);
2811 else if(!strcmp(arg + 1, "module"))
2813 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2815 SetI18nModuleName(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
2828 cppCommand = __ecereNameSpace__ecere__sys__CopyString("gcc");
2829 if(!GetSourceFile())
2831 else if(!GetOutputFile())
2833 strcpy(defaultSymFile, GetSymbolsDir());
2834 __ecereNameSpace__ecere__sys__PathCat(defaultSymFile, GetSourceFile());
2835 __ecereNameSpace__ecere__sys__ChangeExtension(defaultSymFile, "sym", defaultSymFile);
2836 SetOutputFile(defaultSymFile);
2841 printf("%s", __ecereNameSpace__ecere__GetTranslatedString("ecp", "Syntax:\n ecp [-t <target platform>] [-cpp <c preprocessor>] [-o <output>] [-symbols <outputdir>] [-I<includedir>]* [-isystem <sysincludedir>]* [-D<definition>]* -c <input>\n", (((void *)0))));
2845 struct __ecereNameSpace__ecere__com__Instance * cppOutput;
2848 SetGlobalData(&globalData);
2849 SetExcludedSymbols(&_excludedSymbols);
2850 SetGlobalContext(globalContext);
2851 SetCurrentContext(globalContext);
2852 SetTopContext(globalContext);
2853 SetDefines(&defines);
2854 SetImports(&imports);
2855 SetInPreCompiler(1);
2856 SetPrecompDefines(&precompDefines);
2857 SetTargetPlatform(targetPlatform);
2858 SetTargetBits(targetBits);
2860 privateModule = (struct __ecereNameSpace__ecere__com__Instance *)__ecereNameSpace__ecere__com____ecere_COM_Initialize((unsigned int)(1 | (targetBits == sizeof(uintptr_t) * 8 ? (unsigned int)0 : targetBits == 64 ? 2 : targetBits == 32 ? 4 : (unsigned int)0) | 8), 1, (((void *)0)));
2861 SetPrivateModule(privateModule);
2862 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2863 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2865 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
2867 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2868 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2870 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint64"), __ecereInstance1->type = ProcessTypeString("unsigned int64", 0), __ecereInstance1;
2872 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2873 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2875 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint32"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
2877 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2878 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2880 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint16"), __ecereInstance1->type = ProcessTypeString("unsigned short", 0), __ecereInstance1;
2882 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2883 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2885 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("byte"), __ecereInstance1->type = ProcessTypeString("unsigned char", 0), __ecereInstance1;
2887 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2888 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2890 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("intptr_t"), __ecereInstance1->type = ProcessTypeString("intptr", 0), __ecereInstance1;
2892 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2893 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2895 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uintptr_t"), __ecereInstance1->type = ProcessTypeString("uintptr", 0), __ecereInstance1;
2897 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2898 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2900 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("ssize_t"), __ecereInstance1->type = ProcessTypeString("intsize", 0), __ecereInstance1;
2902 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2903 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2905 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("size_t"), __ecereInstance1->type = ProcessTypeString("uintsize", 0), __ecereInstance1;
2908 const char * outputFilePath = GetOutputFile();
2910 if(__ecereNameSpace__ecere__sys__FileExists(outputFilePath))
2911 __ecereNameSpace__ecere__sys__DeleteFile(outputFilePath);
2913 snprintf(command, sizeof (command), "%s%s -x c -E \"%s\"", cppCommand, cppOptions ? cppOptions : "", GetSourceFile());
2914 command[sizeof (command) - 1] = (char)0;
2915 if((cppOutput = __ecereNameSpace__ecere__sys__DualPipeOpen((((unsigned int)(1))), command)))
2918 struct __ecereNameSpace__ecere__sys__OldList * ast;
2919 struct __ecereNameSpace__ecere__com__Instance * fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2920 struct ModuleImport * mainModule = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ModuleImport);
2922 SetFileInput(fileInput);
2923 SetMainModule(mainModule);
2924 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&imports, mainModule);
2926 for(; !((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
2927 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
2929 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
2930 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof])(cppOutput); )
2933 int count = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
2934 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
2936 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
2937 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(cppOutput, junk, 1, 4096);
2939 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
2940 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
2942 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
2943 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, junk, 1, count);
2945 exitCode = __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode(cppOutput);
2946 (__ecereNameSpace__ecere__com__eInstance_DecRef(cppOutput), cppOutput = 0);
2947 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
2948 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
2950 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
2951 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
2953 SetCurrentNameSpace((((void *)0)));
2955 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
2956 SetFileInput((((void *)0)));
2962 ProcessDBTableDefinitions();
2963 PreCompPreProcessClassDefinitions();
2965 if(!((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->exitCode)
2966 OutputSymbols(GetOutputFile());
2969 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->exitCode = exitCode;
2975 FreeContext(globalContext);
2976 FreeExcludedSymbols(&_excludedSymbols);
2977 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&defines, (void *)(FreeModuleDefine));
2978 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&imports, (void *)(FreeModuleImport));
2979 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&precompDefines, (void *)(FreeDefinition));
2980 FreeTypeData(privateModule);
2982 FreeGlobalData(&globalData);
2983 (__ecereNameSpace__ecere__com__eInstance_DecRef(privateModule), privateModule = 0);
2985 (__ecereNameSpace__ecere__com__eSystem_Delete(cppCommand), cppCommand = 0);
2986 (__ecereNameSpace__ecere__com__eSystem_Delete(cppOptions), cppOptions = 0);
2987 SetSymbolsDir((((void *)0)));
2990 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2992 struct __ecereNameSpace__ecere__com__Module
2994 struct __ecereNameSpace__ecere__com__Instance * application;
2995 struct __ecereNameSpace__ecere__sys__OldList classes;
2996 struct __ecereNameSpace__ecere__sys__OldList defines;
2997 struct __ecereNameSpace__ecere__sys__OldList functions;
2998 struct __ecereNameSpace__ecere__sys__OldList modules;
2999 struct __ecereNameSpace__ecere__com__Instance * prev;
3000 struct __ecereNameSpace__ecere__com__Instance * next;
3006 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
3007 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
3008 } __attribute__ ((gcc_struct));
3010 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
3012 struct __ecereNameSpace__ecere__com__GlobalFunction;
3014 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);
3016 void __ecereRegisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module)
3018 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
3020 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ClassDefine", "Definition", sizeof(struct ClassDefine), 0, (void *)0, (void *)0, module, 2, 1);
3021 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3022 __ecereClass_ClassDefine = class;
3023 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "base", "char *", arch_PointerSize, arch_PointerSize, 1);
3024 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "propertiesAndMembers", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
3025 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "classProperties", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
3026 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "methods", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
3027 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isRemote", "bool", 4, 4, 1);
3028 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isWatchable", "bool", 4, 4, 1);
3029 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "fixed", "bool", 4, 4, 1);
3030 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isStatic", "bool", 4, 4, 1);
3031 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "noExpansion", "bool", 4, 4, 1);
3032 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Define", "Definition", sizeof(struct Define), 0, (void *)0, (void *)0, module, 2, 1);
3033 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3034 __ecereClass_Define = class;
3035 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "exp", "Expression", arch_PointerSize, arch_PointerSize, 1);
3036 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "FunctionDefine", "Definition", sizeof(struct FunctionDefine), 0, (void *)0, (void *)0, module, 2, 1);
3037 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3038 __ecereClass_FunctionDefine = class;
3039 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "char *", arch_PointerSize, arch_PointerSize, 1);
3040 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "DataDefine", "Definition", sizeof(struct DataDefine), 0, (void *)0, (void *)0, module, 2, 1);
3041 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3042 __ecereClass_DataDefine = class;
3043 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "char *", arch_PointerSize, arch_PointerSize, 1);
3044 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "MethodDefine", 0, sizeof(struct MethodDefine), 0, (void *)0, (void *)0, module, 2, 1);
3045 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3046 __ecereClass_MethodDefine = class;
3047 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "PropertyDefine", 0, sizeof(struct PropertyDefine), 0, (void *)0, (void *)0, module, 2, 1);
3048 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3049 __ecereClass_PropertyDefine = class;
3050 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "DataMemberDefine", 0, sizeof(struct DataMemberDefine), 0, (void *)0, (void *)0, module, 2, 1);
3051 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3052 __ecereClass_DataMemberDefine = class;
3053 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeMethodDefine", "void FreeMethodDefine(MethodDefine method)", FreeMethodDefine, module, 2);
3054 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDataMemberDefine", "void FreeDataMemberDefine(DataMemberDefine dataMember)", FreeDataMemberDefine, module, 2);
3055 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDataDefine", "void FreeDataDefine(DataDefine data)", FreeDataDefine, module, 2);
3056 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDefinition", "void FreeDefinition(Definition definition)", FreeDefinition, module, 2);
3057 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PreCompPreProcessClassDefinitions", "void PreCompPreProcessClassDefinitions(void)", PreCompPreProcessClassDefinitions, module, 2);
3058 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "PrecompApp", "ecere::com::Application", 0, 0, (void *)0, (void *)0, module, 2, 1);
3059 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3060 __ecereClass_PrecompApp = class;
3061 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Main", 0, __ecereMethod_PrecompApp_Main, 1);
3064 void __ecereUnregisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module)
3069 int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * a, const char * b);
3071 void __ecereCreateModuleInstances_ecp()
3073 globalContext = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
3074 (globalData.classes.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.defines.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.functions.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString, globalData.nameSpaces.CompareKey = (void *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString);
3077 void __ecereDestroyModuleInstances_ecp()
3079 ((globalContext ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)globalContext) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(globalContext)) : 0), globalContext = 0);