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 } __attribute__ ((gcc_struct)) __anon2;
297 struct __ecereNameSpace__ecere__sys__OldList * list;
300 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
301 struct Declarator * decl;
302 } __attribute__ ((gcc_struct)) _classExp;
305 struct Identifier * id;
306 } __attribute__ ((gcc_struct)) classData;
309 struct Expression * exp;
310 struct __ecereNameSpace__ecere__sys__OldList * arguments;
311 struct Location argLoc;
312 } __attribute__ ((gcc_struct)) call;
315 struct Expression * exp;
316 struct __ecereNameSpace__ecere__sys__OldList * index;
317 } __attribute__ ((gcc_struct)) index;
320 struct Expression * exp;
321 struct Identifier * member;
323 unsigned int thisPtr;
324 } __attribute__ ((gcc_struct)) member;
328 struct Expression * exp1;
329 struct Expression * exp2;
330 } __attribute__ ((gcc_struct)) op;
331 struct TypeName * typeName;
332 struct Specifier * _class;
335 struct TypeName * typeName;
336 struct Expression * exp;
337 } __attribute__ ((gcc_struct)) cast;
340 struct Expression * cond;
341 struct __ecereNameSpace__ecere__sys__OldList * exp;
342 struct Expression * elseExp;
343 } __attribute__ ((gcc_struct)) cond;
346 struct TypeName * typeName;
347 struct Expression * size;
348 } __attribute__ ((gcc_struct)) _new;
351 struct TypeName * typeName;
352 struct Expression * size;
353 struct Expression * exp;
354 } __attribute__ ((gcc_struct)) _renew;
358 struct Identifier * id;
359 } __attribute__ ((gcc_struct)) db;
362 struct Expression * ds;
363 struct Expression * name;
364 } __attribute__ ((gcc_struct)) dbopen;
367 struct TypeName * typeName;
368 struct Initializer * initializer;
369 } __attribute__ ((gcc_struct)) initializer;
372 struct Expression * exp;
373 struct TypeName * typeName;
374 } __attribute__ ((gcc_struct)) vaArg;
375 } __attribute__ ((gcc_struct)) __anon1;
376 unsigned int debugValue;
377 struct __ecereNameSpace__ecere__com__DataValue val;
379 unsigned int hasAddress;
380 struct Type * expType;
381 struct Type * destType;
384 unsigned int byReference;
385 unsigned int isConstant;
386 unsigned int addedThis;
387 unsigned int needCast;
388 unsigned int thisPtr;
389 unsigned int opDestType;
390 unsigned int needTemplateCast;
391 } __attribute__ ((gcc_struct));
393 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
395 struct TemplateDatatype
397 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
398 struct Declarator * decl;
399 } __attribute__ ((gcc_struct));
401 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
403 struct TemplateArgument
405 struct TemplateArgument * prev;
406 struct TemplateArgument * next;
408 struct Identifier * name;
412 struct Expression * expression;
413 struct Identifier * identifier;
414 struct TemplateDatatype * templateDatatype;
415 } __attribute__ ((gcc_struct)) __anon1;
416 } __attribute__ ((gcc_struct));
418 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
420 struct TemplateParameter
422 struct TemplateParameter * prev;
423 struct TemplateParameter * next;
426 struct Identifier * identifier;
429 struct TemplateDatatype * dataType;
431 } __attribute__ ((gcc_struct)) __anon1;
432 struct TemplateArgument * defaultArgument;
433 const char * dataTypeString;
434 struct Type * baseType;
435 } __attribute__ ((gcc_struct));
437 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
441 struct Specifier * prev;
442 struct Specifier * next;
450 struct ExtDecl * extDecl;
452 struct Symbol * symbol;
453 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
454 } __attribute__ ((gcc_struct)) __anon1;
457 struct Identifier * id;
458 struct __ecereNameSpace__ecere__sys__OldList * list;
459 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
460 struct __ecereNameSpace__ecere__sys__OldList * definitions;
461 unsigned int addNameSpace;
462 struct Context * ctx;
463 struct ExtDecl * extDeclStruct;
464 } __attribute__ ((gcc_struct)) __anon2;
465 struct Expression * expression;
466 struct Specifier * _class;
467 struct TemplateParameter * templateParameter;
468 } __attribute__ ((gcc_struct)) __anon1;
469 } __attribute__ ((gcc_struct));
471 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
475 struct Identifier * prev;
476 struct Identifier * next;
478 struct Symbol * classSym;
479 struct Specifier * _class;
481 struct Identifier * badID;
482 } __attribute__ ((gcc_struct));
484 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
488 struct Declarator * prev;
489 struct Declarator * next;
492 struct Symbol * symbol;
493 struct Declarator * declarator;
496 struct Identifier * identifier;
499 struct Expression * exp;
500 struct Expression * posExp;
501 struct Attrib * attrib;
502 } __attribute__ ((gcc_struct)) structDecl;
505 struct Expression * exp;
506 struct Specifier * enumClass;
507 } __attribute__ ((gcc_struct)) array;
510 struct __ecereNameSpace__ecere__sys__OldList * parameters;
511 } __attribute__ ((gcc_struct)) function;
514 struct __ecereNameSpace__ecere__com__Instance * pointer;
515 } __attribute__ ((gcc_struct)) pointer;
518 struct ExtDecl * extended;
519 } __attribute__ ((gcc_struct)) extended;
520 } __attribute__ ((gcc_struct)) __anon1;
521 } __attribute__ ((gcc_struct));
523 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
525 struct FunctionDefinition
527 struct FunctionDefinition * prev;
528 struct FunctionDefinition * next;
530 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
531 struct Declarator * declarator;
532 struct __ecereNameSpace__ecere__sys__OldList * declarations;
533 struct Statement * body;
534 struct __ecereNameSpace__ecere__com__Class * _class;
535 struct __ecereNameSpace__ecere__sys__OldList attached;
538 struct Symbol * propSet;
540 unsigned int propertyNoThis;
541 } __attribute__ ((gcc_struct));
543 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
547 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
551 struct External * prev;
552 struct External * next;
555 struct Symbol * symbol;
558 struct FunctionDefinition * function;
559 struct ClassDefinition * _class;
560 struct Declaration * declaration;
562 struct Identifier * id;
563 struct DBTableDef * table;
564 } __attribute__ ((gcc_struct)) __anon1;
566 } __attribute__ ((gcc_struct));
568 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
572 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
576 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
581 struct Symbol * parent;
582 struct Symbol * left;
583 struct Symbol * right;
588 struct __ecereNameSpace__ecere__com__Method * method;
589 struct __ecereNameSpace__ecere__com__Property * _property;
590 struct __ecereNameSpace__ecere__com__Class * registered;
591 } __attribute__ ((gcc_struct)) __anon1;
598 struct External * pointerExternal;
599 struct External * structExternal;
600 } __attribute__ ((gcc_struct)) __anon1;
603 struct External * externalGet;
604 struct External * externalSet;
605 struct External * externalPtr;
606 struct External * externalIsSet;
607 } __attribute__ ((gcc_struct)) __anon2;
610 struct External * methodExternal;
611 struct External * methodCodeExternal;
612 } __attribute__ ((gcc_struct)) __anon3;
613 } __attribute__ ((gcc_struct)) __anon2;
614 unsigned int imported;
615 unsigned int declaredStructSym;
616 struct __ecereNameSpace__ecere__com__Class * _class;
617 unsigned int declaredStruct;
618 unsigned int needConstructor;
619 unsigned int needDestructor;
620 char * constructorName;
623 char * destructorName;
624 struct ModuleImport * module;
625 struct ClassImport * _import;
626 struct Location nameLoc;
627 unsigned int isParam;
628 unsigned int isRemote;
629 unsigned int isStruct;
630 unsigned int fireWatchersDone;
632 unsigned int classData;
633 unsigned int isStatic;
635 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
636 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
637 struct Context * ctx;
639 struct Expression * propCategory;
640 } __attribute__ ((gcc_struct));
642 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
651 struct Symbol * _class;
654 struct __ecereNameSpace__ecere__sys__OldList members;
656 } __attribute__ ((gcc_struct)) __anon1;
659 struct Type * returnType;
660 struct __ecereNameSpace__ecere__sys__OldList params;
661 struct Symbol * thisClass;
662 unsigned int staticMethod;
663 struct TemplateParameter * thisClassTemplate;
664 } __attribute__ ((gcc_struct)) __anon2;
667 struct __ecereNameSpace__ecere__com__Method * method;
668 struct __ecereNameSpace__ecere__com__Class * methodClass;
669 struct __ecereNameSpace__ecere__com__Class * usedClass;
670 } __attribute__ ((gcc_struct)) __anon3;
673 struct Type * arrayType;
675 struct Expression * arraySizeExp;
676 unsigned int freeExp;
677 struct Symbol * enumClass;
678 } __attribute__ ((gcc_struct)) __anon4;
680 struct TemplateParameter * templateParameter;
681 } __attribute__ ((gcc_struct)) __anon1;
691 unsigned int isSigned : 1;
692 unsigned int constant : 1;
693 unsigned int truth : 1;
694 unsigned int byReference : 1;
695 unsigned int extraParam : 1;
696 unsigned int directClassAccess : 1;
697 unsigned int computing : 1;
698 unsigned int keepCast : 1;
699 unsigned int passAsTemplate : 1;
700 unsigned int dllExport : 1;
701 unsigned int attrStdcall : 1;
702 unsigned int declaredWithStruct : 1;
703 unsigned int typedByReference : 1;
704 unsigned int casted : 1;
705 } __attribute__ ((gcc_struct));
707 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
709 struct __ecereNameSpace__ecere__com__Class
711 struct __ecereNameSpace__ecere__com__Class * prev;
712 struct __ecereNameSpace__ecere__com__Class * next;
718 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
719 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
722 struct __ecereNameSpace__ecere__com__Class * base;
723 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
724 struct __ecereNameSpace__ecere__sys__BinaryTree members;
725 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
726 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
727 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
728 struct __ecereNameSpace__ecere__sys__OldList derivatives;
732 struct __ecereNameSpace__ecere__com__Instance * module;
733 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
734 const char * dataTypeString;
735 struct Type * dataType;
737 int defaultAlignment;
738 void (* Initialize)();
740 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
741 const char * designerClass;
742 unsigned int noExpansion;
743 const char * defaultProperty;
744 unsigned int comRedefinition;
747 unsigned int internalDecl;
749 unsigned int computeSize;
751 int destructionWatchOffset;
753 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
754 int inheritanceAccess;
755 const char * fullName;
757 struct __ecereNameSpace__ecere__sys__OldList conversions;
758 struct __ecereNameSpace__ecere__sys__OldList templateParams;
759 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
760 struct __ecereNameSpace__ecere__com__Class * templateClass;
761 struct __ecereNameSpace__ecere__sys__OldList templatized;
763 unsigned int isInstanceClass;
764 unsigned int byValueSystemClass;
765 } __attribute__ ((gcc_struct));
767 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
769 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
771 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
773 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
775 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
777 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);
779 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
781 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
783 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
785 struct __ecereNameSpace__ecere__com__Instance
788 struct __ecereNameSpace__ecere__com__Class * _class;
790 } __attribute__ ((gcc_struct));
792 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
794 struct __ecereNameSpace__ecere__com__DataMember
796 struct __ecereNameSpace__ecere__com__DataMember * prev;
797 struct __ecereNameSpace__ecere__com__DataMember * next;
799 unsigned int isProperty;
802 struct __ecereNameSpace__ecere__com__Class * _class;
803 const char * dataTypeString;
804 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
805 struct Type * dataType;
809 struct __ecereNameSpace__ecere__sys__OldList members;
810 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
813 } __attribute__ ((gcc_struct));
815 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
817 struct __ecereNameSpace__ecere__com__SerialBuffer
819 unsigned char * _buffer;
823 } __attribute__ ((gcc_struct));
825 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
827 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
833 const char * dataTypeString;
834 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
835 } __attribute__ ((gcc_struct)) __anon1;
836 struct __ecereNameSpace__ecere__com__DataValue expression;
839 const char * memberString;
842 struct __ecereNameSpace__ecere__com__DataMember * member;
843 struct __ecereNameSpace__ecere__com__Property * prop;
844 struct __ecereNameSpace__ecere__com__Method * method;
845 } __attribute__ ((gcc_struct)) __anon1;
846 } __attribute__ ((gcc_struct)) __anon2;
847 } __attribute__ ((gcc_struct)) __anon1;
848 } __attribute__ ((gcc_struct));
852 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
855 typedef union YYSTYPE
860 struct Identifier * id;
861 struct Expression * exp;
862 struct Specifier * specifier;
863 struct __ecereNameSpace__ecere__sys__OldList * list;
864 struct Enumerator * enumerator;
865 struct Declarator * declarator;
866 struct __ecereNameSpace__ecere__com__Instance * pointer;
867 struct Initializer * initializer;
868 struct InitDeclarator * initDeclarator;
869 struct TypeName * typeName;
870 struct Declaration * declaration;
871 struct Statement * stmt;
872 struct FunctionDefinition * function;
873 struct External * external;
874 struct Context * context;
875 struct __ecereNameSpace__ecere__com__Instance * asmField;
876 struct Attrib * attrib;
877 struct ExtDecl * extDecl;
878 struct Attribute * attribute;
879 struct Instantiation * instance;
880 struct MembersInit * membersInit;
881 struct MemberInit * memberInit;
882 struct ClassFunction * classFunction;
883 struct ClassDefinition * _class;
884 struct ClassDef * classDef;
885 struct PropertyDef * prop;
887 struct Symbol * symbol;
888 struct PropertyWatch * propertyWatch;
889 struct TemplateParameter * templateParameter;
890 struct TemplateArgument * templateArgument;
891 struct TemplateDatatype * templateDatatype;
892 struct __ecereNameSpace__ecere__com__Instance * dbtableEntry;
893 struct __ecereNameSpace__ecere__com__Instance * dbindexItem;
894 struct DBTableDef * dbtableDef;
895 } __attribute__ ((gcc_struct)) YYSTYPE;
897 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
901 struct Enumerator * prev;
902 struct Enumerator * next;
904 struct Identifier * id;
905 struct Expression * exp;
906 } __attribute__ ((gcc_struct));
908 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
910 struct InitDeclarator
912 struct InitDeclarator * prev;
913 struct InitDeclarator * next;
915 struct Declarator * declarator;
916 struct Initializer * initializer;
917 } __attribute__ ((gcc_struct));
919 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
923 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
927 struct ClassFunction * prev;
928 struct ClassFunction * next;
930 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
931 struct Declarator * declarator;
932 struct __ecereNameSpace__ecere__sys__OldList * declarations;
933 struct Statement * body;
934 struct __ecereNameSpace__ecere__com__Class * _class;
935 struct __ecereNameSpace__ecere__sys__OldList attached;
938 struct Symbol * propSet;
939 unsigned int isVirtual;
940 unsigned int isConstructor;
941 unsigned int isDestructor;
942 unsigned int dontMangle;
945 } __attribute__ ((gcc_struct));
947 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
951 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
955 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
959 struct PropertyDef * prev;
960 struct PropertyDef * next;
962 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
963 struct Declarator * declarator;
964 struct Identifier * id;
965 struct Statement * getStmt;
966 struct Statement * setStmt;
967 struct Statement * issetStmt;
968 struct Symbol * symbol;
969 struct Expression * category;
972 unsigned int conversion : 1;
973 unsigned int isWatchable : 1;
974 unsigned int isDBProp : 1;
975 } __attribute__ ((gcc_struct)) __anon1;
976 } __attribute__ ((gcc_struct));
978 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
980 struct PropertyWatch;
982 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
986 struct ClassDef * prev;
987 struct ClassDef * next;
992 struct Declaration * decl;
993 struct ClassFunction * function;
994 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
995 struct PropertyDef * propertyDef;
996 struct PropertyWatch * propertyWatch;
998 struct Identifier * defaultProperty;
1001 struct Identifier * id;
1002 struct Initializer * initializer;
1003 } __attribute__ ((gcc_struct)) __anon1;
1004 } __attribute__ ((gcc_struct)) __anon1;
1007 } __attribute__ ((gcc_struct));
1009 extern YYSTYPE yylval;
1011 extern struct Location yylloc;
1013 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Definition;
1017 struct Definition * prev;
1018 struct Definition * next;
1021 } __attribute__ ((gcc_struct));
1025 struct Definition * prev;
1026 struct Definition * next;
1030 struct __ecereNameSpace__ecere__sys__OldList propertiesAndMembers;
1031 struct __ecereNameSpace__ecere__sys__OldList classProperties;
1032 struct __ecereNameSpace__ecere__sys__OldList methods;
1033 unsigned int isRemote;
1034 unsigned int isWatchable;
1036 unsigned int isStatic;
1037 unsigned int noExpansion;
1038 } __attribute__ ((gcc_struct));
1040 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefine;
1044 struct Definition * prev;
1045 struct Definition * next;
1048 struct Expression * exp;
1049 } __attribute__ ((gcc_struct));
1051 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Define;
1053 struct FunctionDefine
1055 struct Definition * prev;
1056 struct Definition * next;
1060 } __attribute__ ((gcc_struct));
1062 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefine;
1066 struct Definition * prev;
1067 struct Definition * next;
1071 } __attribute__ ((gcc_struct));
1073 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_DataDefine;
1077 struct MethodDefine * prev, * next;
1081 unsigned int isVirtual;
1082 } __attribute__ ((gcc_struct));
1084 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodDefine;
1086 struct PropertyDefine
1088 struct PropertyDefine * prev, * next;
1092 unsigned int isWatchable;
1094 unsigned int isVirtual;
1095 unsigned int hasSet, hasGet;
1096 } __attribute__ ((gcc_struct));
1098 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDefine;
1100 struct DataMemberDefine
1102 struct DataMemberDefine * prev, * next;
1106 struct __ecereNameSpace__ecere__sys__OldList dataMembers;
1107 struct __ecereNameSpace__ecere__sys__OldList classProperties;
1111 } __attribute__ ((gcc_struct));
1113 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_DataMemberDefine;
1115 void FreeMethodDefine(struct MethodDefine * method)
1117 (__ecereNameSpace__ecere__com__eSystem_Delete(method->name), method->name = 0);
1118 (__ecereNameSpace__ecere__com__eSystem_Delete(method->type), method->type = 0);
1121 void FreeDataMemberDefine(struct DataMemberDefine * dataMember)
1123 (__ecereNameSpace__ecere__com__eSystem_Delete(dataMember->name), dataMember->name = 0);
1124 (__ecereNameSpace__ecere__com__eSystem_Delete(dataMember->type), dataMember->type = 0);
1127 void FreeDataDefine(struct DataDefine * data)
1129 (__ecereNameSpace__ecere__com__eSystem_Delete(data->name), data->name = 0);
1130 (__ecereNameSpace__ecere__com__eSystem_Delete(data->dataType), data->dataType = 0);
1133 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
1135 void FreeDefinition(struct Definition * definition)
1137 (__ecereNameSpace__ecere__com__eSystem_Delete(definition->name), definition->name = 0);
1138 switch(definition->type)
1142 struct ClassDefine * classDefine = (struct ClassDefine *)definition;
1144 (__ecereNameSpace__ecere__com__eSystem_Delete(classDefine->base), classDefine->base = 0);
1145 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&classDefine->methods, FreeMethodDefine);
1146 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&classDefine->propertiesAndMembers, FreeDataMemberDefine);
1150 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct FunctionDefine *)definition)->dataType), ((struct FunctionDefine *)definition)->dataType = 0);
1153 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct DataDefine *)definition)->dataType), ((struct DataDefine *)definition)->dataType = 0);
1160 static unsigned int globalInstance = 0;
1162 static struct Context * globalContext;
1164 static struct __ecereNameSpace__ecere__sys__OldList defines, imports, precompDefines;
1166 static struct __ecereNameSpace__ecere__com__Instance * privateModule;
1168 struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols =
1170 0, 0, 0, (unsigned int)(uintptr_t)&((struct Symbol *)(void * )0)->left, 0
1173 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__NameSpace;
1175 struct __ecereNameSpace__ecere__com__NameSpace
1178 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1179 struct __ecereNameSpace__ecere__com__NameSpace * left;
1180 struct __ecereNameSpace__ecere__com__NameSpace * right;
1182 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1183 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1184 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1185 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1186 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1187 } __attribute__ ((gcc_struct));
1189 static struct __ecereNameSpace__ecere__com__NameSpace globalData;
1191 extern struct Identifier * GetDeclId(struct Declarator * decl);
1193 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
1195 extern void ProcessExpressionType(struct Expression * exp);
1197 extern void ComputeExpression(struct Expression * exp);
1199 extern int strtol(const char * , char * * , int base);
1201 extern void FreeExpression(struct Expression * exp);
1203 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1205 extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1207 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__BitMember;
1209 struct __ecereNameSpace__ecere__com__BitMember
1211 struct __ecereNameSpace__ecere__com__BitMember * prev;
1212 struct __ecereNameSpace__ecere__com__BitMember * next;
1214 unsigned int isProperty;
1217 struct __ecereNameSpace__ecere__com__Class * _class;
1218 const char * dataTypeString;
1219 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1220 struct Type * dataType;
1225 } __attribute__ ((gcc_struct));
1227 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);
1229 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);
1231 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);
1233 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_New(int type, int declMode);
1235 extern unsigned int __ecereNameSpace__ecere__com__eMember_AddMember(struct __ecereNameSpace__ecere__com__DataMember * addTo, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
1237 extern unsigned int __ecereNameSpace__ecere__com__eClass_AddMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
1239 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
1241 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1243 extern char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
1245 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);
1247 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassProperty;
1249 struct __ecereNameSpace__ecere__com__ClassProperty
1252 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1253 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1254 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1256 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1257 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1258 const char * dataTypeString;
1259 struct Type * dataType;
1260 unsigned int constant;
1261 } __attribute__ ((gcc_struct));
1263 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);
1265 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);
1267 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);
1269 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
1271 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
1273 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)
1275 if(definitions != (((void *)0)))
1277 struct ClassDef * def;
1279 for(def = definitions->first; def; def = def->next)
1283 struct Declaration * decl = def->__anon1.decl;
1284 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
1285 struct Type * dataType;
1286 struct DataMemberDefine * dataMemberDefine;
1290 struct Declarator * d;
1292 if(decl->__anon1.__anon1.declarators)
1294 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1296 struct Identifier * declId = GetDeclId(d);
1300 dataMemberDefine = __extension__ ({
1301 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
1303 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(declId->string), __ecereInstance1;
1305 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
1306 if(regClass && regClass->type == 2)
1308 struct Expression * sizeExp = d->__anon1.structDecl.exp, * posExp = d->__anon1.structDecl.posExp;
1309 int bitSize = 0, bitPos = -1;
1310 char dataTypeString[1024];
1312 dataTypeString[0] = '\0';
1315 ProcessExpressionType(sizeExp);
1316 ComputeExpression(sizeExp);
1317 if(sizeExp->isConstant)
1318 bitSize = strtol(sizeExp->__anon1.__anon1.constant, (((void *)0)), 0);
1319 FreeExpression(sizeExp);
1323 ProcessExpressionType(posExp);
1324 ComputeExpression(posExp);
1325 if(posExp->isConstant)
1326 bitPos = strtol(posExp->__anon1.__anon1.constant, (((void *)0)), 0);
1327 FreeExpression(posExp);
1329 d->__anon1.structDecl.exp = (((void *)0));
1330 d->__anon1.structDecl.posExp = (((void *)0));
1331 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1332 PrintType(dataType, dataTypeString, 0, 1);
1334 struct __ecereNameSpace__ecere__com__BitMember * member = __ecereNameSpace__ecere__com__eClass_AddBitMember(regClass, declId->string, dataTypeString, 0, 0, def->memberAccess);
1336 member->size = bitSize;
1337 member->pos = bitPos;
1338 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)member;
1341 dataMember->dataType = dataType;
1342 dataMemberDefine->size = bitSize;
1343 dataMemberDefine->bitPos = bitPos;
1344 dataMemberDefine->type = __ecereNameSpace__ecere__sys__CopyString(dataTypeString);
1349 char typeString[1024];
1351 typeString[0] = '\0';
1352 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1353 PrintType(dataType, typeString, 0, 1);
1355 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, declId->string, typeString, 0, 0, def->memberAccess);
1357 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, declId->string, typeString, 0, 0, def->memberAccess);
1359 dataMember->dataType = dataType;
1360 dataMemberDefine->type = __ecereNameSpace__ecere__sys__CopyString(typeString);
1363 dataMemberDefine->memberAccess = def->memberAccess;
1367 else if(decl->__anon1.__anon1.specifiers)
1369 struct Specifier * spec;
1371 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
1373 if(spec->type == 3 || spec->type == 4)
1375 if(spec->__anon1.__anon2.definitions && !spec->__anon1.__anon2.id)
1377 struct __ecereNameSpace__ecere__com__DataMember * dataMember = __ecereNameSpace__ecere__com__eMember_New((spec->type == 4) ? 1 : 2, def->memberAccess);
1379 dataMemberDefine = __extension__ ({
1380 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
1382 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = (spec->type == 4) ? 1 : 2, __ecereInstance1;
1384 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
1385 AddDefinitions((((void *)0)), dataMemberDefine, (((void *)0)), dataMember, spec->__anon1.__anon2.definitions);
1387 __ecereNameSpace__ecere__com__eMember_AddMember(member, dataMember);
1389 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, dataMember);
1391 else if(spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id && (*spec->__anon1.__anon2.definitions).count)
1394 struct Identifier * id = spec->__anon1.__anon2.id;
1395 char typeString[1024];
1397 typeString[0] = '\0';
1398 spec->__anon1.__anon2.id = (((void *)0));
1399 decl->__anon1.__anon1.declarators = MkListOne(MkDeclaratorIdentifier(id));
1400 dataType = ProcessType(decl->__anon1.__anon1.specifiers, (((void *)0)));
1401 PrintType(dataType, typeString, 0, 1);
1403 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, id->string, typeString, 0, 0, def->memberAccess);
1405 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, id->string, typeString, 0, 0, def->memberAccess);
1407 dataMember->dataType = dataType;
1414 else if(decl->type == 2)
1416 struct Instantiation * inst = decl->__anon1.inst;
1417 struct Expression * exp = inst->exp;
1422 char * string = exp->__anon1.__anon1.identifier->string;
1425 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);
1428 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1430 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1432 dataMember->dataType = dataType;
1434 dataMemberDefine = __extension__ ({
1435 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
1437 __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;
1439 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
1444 else if(def->type == 3 && def->__anon1.propertyDef)
1446 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1449 struct __ecereNameSpace__ecere__com__Property * prop;
1450 struct PropertyDefine * propDefine;
1453 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1455 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, propertyDef->__anon1.conversion ? (((void *)0)) : propertyDef->id->string, dataTypeString, propertyDef->setStmt, propertyDef->getStmt, def->memberAccess);
1458 prop->IsSet = (void *)propertyDef->issetStmt;
1461 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1465 prop->symbol = __extension__ ({
1466 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1468 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(propertyDef->symbol->string), __ecereInstance1->id = propertyDef->symbol->id, __ecereInstance1->type = propertyDef->symbol->type, __ecereInstance1;
1470 if(propertyDef->symbol->type)
1471 propertyDef->symbol->type->refCount++;
1472 propDefine = __extension__ ({
1473 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
1475 __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;
1477 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, propDefine);
1481 else if(def->type == 10 && def->__anon1.propertyDef)
1483 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1486 struct __ecereNameSpace__ecere__com__ClassProperty * prop;
1487 struct PropertyDefine * propDefine;
1490 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1492 prop = __ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, propertyDef->id->string, dataTypeString, propertyDef->setStmt, propertyDef->getStmt);
1493 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1497 propDefine = __extension__ ({
1498 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
1500 __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;
1502 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->classProperties, propDefine);
1506 else if(def->type == 7)
1509 classDefine->fixed = 1;
1511 else if(def->type == 6)
1514 classDefine->noExpansion = 1;
1516 else if(def->type == 13)
1518 struct __ecereNameSpace__ecere__com__DataMember * member;
1519 struct __ecereNameSpace__ecere__com__Property * prop;
1521 if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(regClass, def->__anon1.__anon1.id->string, privateModule)))
1523 struct PropertyDefine * propDefine;
1525 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, def->__anon1.__anon1.id->string, (((void *)0)), (((void *)0)), (((void *)0)), def->memberAccess);
1528 propDefine = __extension__ ({
1529 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
1531 __ecereInstance1->isProperty = 1, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
1533 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, propDefine);
1536 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(regClass, def->__anon1.__anon1.id->string, privateModule, (((void *)0)), (((void *)0)))))
1538 struct DataMemberDefine * dataMemberDefine;
1540 member = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, def->__anon1.__anon1.id->string, (((void *)0)), 0, 0, def->memberAccess);
1541 dataMemberDefine = __extension__ ({
1542 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
1544 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(def->__anon1.__anon1.id->string), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
1546 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
1553 extern void FreeType(struct Type * type);
1555 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);
1557 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);
1559 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);
1561 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);
1563 extern char * strcpy(char * , const char * );
1565 extern char * strcat(char * , const char * );
1567 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_OpTable;
1571 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
1572 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
1573 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1574 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1575 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1576 unsigned int (* Neg)(struct Expression *, struct Operand *);
1577 unsigned int (* Inc)(struct Expression *, struct Operand *);
1578 unsigned int (* Dec)(struct Expression *, struct Operand *);
1579 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1580 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1581 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1582 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1583 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1584 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1585 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1586 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1587 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1588 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1589 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1590 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1591 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1592 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1593 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1594 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1595 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1596 unsigned int (* Not)(struct Expression *, struct Operand *);
1597 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1598 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1599 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1600 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1601 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1602 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1603 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1604 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1605 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1606 } __attribute__ ((gcc_struct));
1608 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Operand;
1614 unsigned int ptrSize;
1627 } __attribute__ ((gcc_struct)) __anon1;
1629 } __attribute__ ((gcc_struct));
1631 extern struct Operand GetOperand(struct Expression * exp);
1633 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateParameter;
1635 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
1637 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
1638 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
1643 const char * dataTypeString;
1645 } __attribute__ ((gcc_struct)) __anon1;
1646 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
1648 } __attribute__ ((gcc_struct));
1650 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);
1652 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)
1654 struct __ecereNameSpace__ecere__com__Class * regClass;
1655 struct ClassDef * def;
1656 struct ClassDefine * classDefine;
1657 char baseName[1024];
1658 unsigned int unitType = 0;
1659 unsigned int wouldBeEnum = 0;
1660 int inheritanceAccess = 1;
1663 if(baseSpecs != (((void *)0)))
1665 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
1667 PrintType(baseType, baseName, 0, 1);
1668 if(baseType->kind == 8)
1670 if(baseType->__anon1._class->__anon1.registered && classType == 0)
1672 if(baseType->__anon1._class->__anon1.registered->type == 3)
1674 else if(baseType->__anon1._class->__anon1.registered->type == 2)
1676 else if(baseType->__anon1._class->__anon1.registered->type == 5)
1678 else if(baseType->__anon1._class->__anon1.registered->type == 4)
1684 else if(baseType->kind == 9 || baseType->kind == 10)
1692 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
1693 inheritanceAccess = 2;
1699 if(definitions != (((void *)0)))
1701 for(def = definitions->first; def; def = def->next)
1705 struct Declaration * decl = def->__anon1.decl;
1714 if(decl->__anon1.__anon1.declarators)
1716 struct Declarator * d;
1718 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1720 if(d->__anon1.structDecl.exp)
1734 if(classType == 0 && wouldBeEnum)
1736 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);
1738 regClass->symbol = symbol;
1739 classDefine = __extension__ ({
1740 struct ClassDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassDefine);
1742 __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;
1744 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, classDefine);
1747 struct __ecereNameSpace__ecere__com__DataMember * unionMember = __ecereNameSpace__ecere__com__eMember_New(1, 1);
1748 struct DataMemberDefine * unionDefine;
1750 unionDefine = __extension__ ({
1751 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
1753 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 1, __ecereInstance1;
1755 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, unionDefine);
1756 AddDefinitions(classDefine, unionDefine, regClass, unionMember, definitions);
1757 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, unionMember);
1760 AddDefinitions(classDefine, (struct DataMemberDefine *)classDefine, regClass, (((void *)0)), definitions);
1761 if(definitions != (((void *)0)))
1763 for(def = definitions->first; def; def = def->next)
1767 struct ClassFunction * func = def->__anon1.function;
1769 if(!func->dontMangle && func->declarator)
1771 struct Identifier * id = GetDeclId(func->declarator);
1772 struct __ecereNameSpace__ecere__com__Method * method;
1773 struct MethodDefine * methodDefine;
1776 char * dataTypeString = StringFromSpecDecl(func->specifiers, func->declarator);
1779 method = __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(regClass, id->string, dataTypeString, func->declarator->symbol, def->memberAccess);
1781 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, id->string, dataTypeString, func->declarator->symbol, def->memberAccess);
1782 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1786 method->symbol = __extension__ ({
1787 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1789 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(func->declarator->symbol->string), __ecereInstance1->id = func->declarator->symbol->id, __ecereInstance1->type = func->declarator->symbol->type, __ecereInstance1;
1791 if(func->declarator->symbol->type)
1792 func->declarator->symbol->type->refCount++;
1793 ((struct Symbol *)method->symbol)->__anon1.method = method;
1794 func->declarator->symbol = (((void *)0));
1795 if(method->type != 1 || method->_class == regClass)
1797 methodDefine = __extension__ ({
1798 struct MethodDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodDefine);
1800 __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;
1802 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->methods, methodDefine);
1807 else if(def->type == 13)
1809 struct __ecereNameSpace__ecere__com__Method * method;
1811 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(regClass, def->__anon1.__anon1.id->string, privateModule)))
1813 struct MethodDefine * methodDefine;
1815 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, def->__anon1.__anon1.id->string, (((void *)0)), (((void *)0)), def->memberAccess);
1816 methodDefine = __extension__ ({
1817 struct MethodDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodDefine);
1819 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
1821 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->methods, methodDefine);
1826 if(regClass && symbol->templateParams)
1828 struct TemplateParameter * param;
1830 for(param = (*symbol->templateParams).first; param; param = param->next)
1832 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg =
1843 if(param->defaultArgument)
1848 defaultArg.__anon1.__anon1.dataTypeString = StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl);
1852 char memberString[1024];
1854 memberString[0] = '\0';
1855 if(param->defaultArgument->__anon1.identifier->_class && param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
1857 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
1858 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
1860 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
1864 strcat(memberString, "::");
1866 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
1867 defaultArg.__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(memberString);
1874 ProcessExpressionType(param->defaultArgument->__anon1.expression);
1875 ComputeExpression(param->defaultArgument->__anon1.expression);
1876 op = GetOperand(param->defaultArgument->__anon1.expression);
1877 defaultArg.__anon1.expression.__anon1.ui64 = op.__anon1.ui64;
1882 if(param->type == 1)
1884 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, (void *)(uintptr_t)param->__anon1.memberType, &defaultArg);
1888 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
1890 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, typeString, &defaultArg);
1896 extern void SetParsingType(unsigned int b);
1898 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__NamedLink64;
1900 struct __ecereNameSpace__ecere__sys__NamedLink64
1902 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
1903 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
1906 } __attribute__ ((gcc_struct));
1908 extern int strcmp(const char * , const char * );
1910 extern void FreeExpContents(struct Expression * exp);
1912 extern char * PrintInt64(long long result);
1914 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
1916 extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string, long long value);
1918 extern void PrintExpression(struct Expression * exp, char * string);
1920 extern int printf(const char * , ...);
1922 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
1924 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
1926 extern long long __ecereNameSpace__ecere__com__eEnum_AddValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string);
1928 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
1930 struct __ecereNameSpace__ecere__com__Application
1933 const char * * argv;
1935 unsigned int isGUIApp;
1936 struct __ecereNameSpace__ecere__sys__OldList allModules;
1937 char * parsedCommand;
1938 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
1939 } __attribute__ ((gcc_struct));
1941 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)
1943 struct __ecereNameSpace__ecere__com__Class * regClass = symbol->__anon1.registered;
1945 if(regClass && enumValues)
1947 struct Enumerator * e;
1949 for(e = enumValues->first; e; e = e->next)
1953 struct Type * destType = (destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), destType->kind = 4, destType->refCount = 1, destType);
1955 e->exp->destType = destType;
1957 ProcessExpressionType(e->exp);
1959 if(!e->exp->expType)
1962 destType->__anon1._class = symbol;
1963 ProcessExpressionType(e->exp);
1965 if(e->exp->isConstant)
1967 if(e->exp->type == 0 && e->exp->expType && e->exp->__anon1.__anon1.identifier && e->exp->__anon1.__anon1.identifier->string && e->exp->expType->kind == 15)
1969 struct __ecereNameSpace__ecere__sys__NamedLink64 * l;
1970 char * string = e->exp->__anon1.__anon1.identifier->string;
1972 for(l = e->exp->expType->__anon1.__anon1.members.first; l; l = l->next)
1974 if(!strcmp(l->name, string))
1978 FreeExpContents(e->exp);
1980 e->exp->__anon1.__anon1.constant = PrintInt64(l->data);
1981 FreeType(e->exp->expType);
1982 e->exp->expType = ProcessTypeString("int64", 0);
1989 ComputeExpression(e->exp);
1991 if(e->exp->isConstant && e->exp->type == 2)
1993 struct Operand op = GetOperand(e->exp);
1999 value = op.type->isSigned ? (long long)op.__anon1.c : (long long)op.__anon1.uc;
2002 value = op.type->isSigned ? (long long)op.__anon1.s : (long long)op.__anon1.us;
2005 value = op.type->isSigned ? op.__anon1.i64 : (long long)op.__anon1.ui64;
2009 value = op.type->isSigned ? (long long)op.__anon1.i : (int)op.__anon1.ui;
2011 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(regClass, e->id->string, value);
2015 char expString[8192];
2017 expString[0] = (char)0;
2018 PrintExpression(e->exp, expString);
2019 printf(__ecereNameSpace__ecere__GetTranslatedString("ecp", "error: could not resolve value %s for enum %s in precompiler\n", (((void *)0))), expString, regClass->name);
2020 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Instance *)__thisModule) + structSize_Module)))->exitCode = 1;
2021 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2025 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2030 extern struct __ecereNameSpace__ecere__sys__OldList * GetAST(void);
2032 extern struct Symbol * FindClass(const char * name);
2034 extern void SetCurrentNameSpace(const char * s);
2036 extern void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module);
2038 void PreCompPreProcessClassDefinitions()
2040 struct __ecereNameSpace__ecere__sys__OldList * ast = GetAST();
2041 struct External * external, * next;
2043 for(external = (*ast).first; external; external = next)
2045 next = external->next;
2046 if(external->type == 2)
2048 struct ClassDefinition * _class = external->__anon1._class;
2050 if(_class->declMode == 1 || _class->declMode == 2 || _class->declMode == 3)
2052 if(_class->definitions)
2054 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), _class->deleteWatchable, _class->declMode);
2058 else if(external->type == 1)
2060 struct Declaration * declaration = external->__anon1.declaration;
2062 if(declaration->type == 1)
2064 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2 || external->__anon1.declaration->declMode == 3)
2066 if(declaration->__anon1.__anon1.specifiers)
2068 struct Specifier * specifier;
2070 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
2072 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)))
2074 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
2080 if(specifier->type == 2)
2082 else if(specifier->type == 4)
2086 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, 0, external->__anon1.declaration->declMode);
2091 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2093 if(declaration->__anon1.__anon1.declarators)
2095 struct InitDeclarator * d;
2097 for(d = (*declaration->__anon1.__anon1.declarators).first; d; d = d->next)
2101 struct Symbol * symbol = d->declarator->symbol;
2105 struct DataDefine * dataDefine;
2106 char typeString[1024];
2108 typeString[0] = '\0';
2109 PrintType(symbol->type, typeString, 0, 1);
2110 dataDefine = __extension__ ({
2111 struct DataDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataDefine);
2113 __ecereInstance1->type = 4, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2115 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, dataDefine);
2123 else if(declaration->type == 2)
2125 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2127 struct Symbol * symbol = declaration->__anon1.inst->symbol;
2131 struct DataDefine * dataDefine;
2132 char typeString[1024];
2134 typeString[0] = '\0';
2135 PrintType(symbol->type, typeString, 0, 1);
2136 dataDefine = __extension__ ({
2137 struct DataDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataDefine);
2139 __ecereInstance1->type = 4, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2141 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, dataDefine);
2146 else if(declaration->type == 3)
2148 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2150 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);
2152 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, definition);
2156 else if(external->type == 0 && (external->__anon1.function->declMode == 1 || external->__anon1.function->declMode == 2))
2158 struct FunctionDefinition * function = external->__anon1.function;
2159 struct FunctionDefine * functionDefine;
2160 char typeString[1024];
2162 typeString[0] = '\0';
2163 PrintType(function->declarator->symbol->type, typeString, 1, 1);
2164 functionDefine = __extension__ ({
2165 struct FunctionDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionDefine);
2167 __ecereInstance1->type = 3, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->declarator->symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2169 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, functionDefine);
2171 else if(external->type == 4)
2173 SetCurrentNameSpace(external->__anon1.id->string);
2176 ComputeModuleClasses(privateModule);
2177 for(external = (*ast).first; external; external = next)
2179 next = external->next;
2180 if(external->type == 1 && (external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2))
2182 struct Declaration * declaration = external->__anon1.declaration;
2184 if(declaration->type == 1)
2186 if(declaration->__anon1.__anon1.specifiers)
2188 struct Specifier * specifier;
2190 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
2192 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)))
2194 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
2198 ProcessClassEnumValues(4, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list);
2208 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, const char * format, ...);
2210 static void OutputDataMembers(struct ClassDefine * classDefine, struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2212 if(classDefine->propertiesAndMembers.first)
2214 struct DataMemberDefine * member = classDefine->propertiesAndMembers.first;
2217 for(member = classDefine->propertiesAndMembers.first; member; member = member->next)
2219 if(member->isProperty == 1)
2221 struct PropertyDefine * prop = (struct PropertyDefine *)member;
2226 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2227 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Properties]\n");
2230 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->name);
2232 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Conversion]\n");
2233 if(prop->memberAccess == 1)
2234 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
2236 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
2238 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Virtual]\n");
2240 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Set]\n");
2242 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Get]\n");
2243 if(prop->isWatchable)
2244 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Watchable]\n");
2245 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2246 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->type ? prop->type : "");
2253 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2254 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Data Members]\n");
2256 if(member->memberType == 0)
2258 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", member->name);
2259 if(member->memberAccess == 1)
2260 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
2262 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
2263 if(_class && _class->type == 2)
2267 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Size]\n");
2268 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %d\n", member->size);
2270 if(member->bitPos != -1)
2272 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Pos]\n");
2273 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %d\n", member->bitPos);
2276 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2277 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", member->type ? member->type : "");
2281 if(member->memberAccess == 1)
2282 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
2284 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
2285 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, (member->memberType == 1) ? " [Union]\n" : " [Struct]\n");
2286 OutputDataMembers((struct ClassDefine *)member, (((void *)0)), f);
2289 last = member->isProperty;
2291 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2293 if(classDefine->classProperties.first)
2295 struct PropertyDefine * prop = classDefine->propertiesAndMembers.first;
2297 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Class Properties]\n");
2298 for(prop = classDefine->classProperties.first; prop; prop = prop->next)
2301 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->name);
2303 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Set]\n");
2305 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Get]\n");
2306 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2307 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->type ? prop->type : "");
2309 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2313 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__FileOpen(const char * fileName, int mode);
2315 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ImportedModule;
2317 struct ImportedModule
2319 struct ImportedModule * prev;
2320 struct ImportedModule * next;
2324 unsigned int globalInstance;
2325 unsigned int dllOnly;
2327 } __attribute__ ((gcc_struct));
2329 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
2331 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
2333 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__EnumClassData;
2335 struct __ecereNameSpace__ecere__com__EnumClassData
2337 struct __ecereNameSpace__ecere__sys__OldList values;
2339 } __attribute__ ((gcc_struct));
2341 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
2343 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
2345 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
2347 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2349 static void OutputSymbols(const char * fileName)
2351 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__sys__FileOpen(fileName, 2);
2355 int lastType = (int)-1;
2356 struct Definition * definition;
2359 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Global Instance]\n");
2360 for(definition = precompDefines.first; definition; definition = definition->next)
2362 if(definition->type != lastType)
2364 if(lastType != (int)-1)
2365 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2366 if(definition->type == 0)
2367 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Imported Modules]\n");
2368 else if(definition->type == 1)
2369 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Classes]\n");
2370 else if(definition->type == 2)
2371 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Expressions]\n");
2372 else if(definition->type == 3)
2373 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Functions]\n");
2374 else if(definition->type == 4)
2375 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Data]\n");
2376 lastType = definition->type;
2378 if(definition->type == 0)
2380 struct ImportedModule * module = (struct ImportedModule *)definition;
2382 if(module->importType == 1)
2383 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Static]\n");
2384 else if(module->importType == 2)
2385 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Remote]\n");
2386 if(module->importAccess == 2)
2387 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
2388 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", module->name);
2390 else if(definition->type == 1)
2392 struct __ecereNameSpace__ecere__com__Class * _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, definition->name);
2393 struct ClassDefine * classDefine = (struct ClassDefine *)definition;
2395 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", definition->name);
2396 if(classDefine->isStatic)
2397 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Static]\n");
2398 if(classDefine->fixed)
2399 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Fixed]\n");
2400 if(classDefine->noExpansion)
2401 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [No Expansion]\n");
2402 if(classDefine->isRemote)
2403 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Remote]\n");
2404 if(classDefine->isWatchable)
2405 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Watchable]\n");
2406 if(_class->type == 4)
2407 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Enum]\n");
2408 else if(_class->type == 2)
2409 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Bit]\n");
2410 else if(_class->type == 1)
2411 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Struct]\n");
2412 else if(_class->type == 3)
2413 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Unit]\n");
2414 else if(_class->type == 5)
2415 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [NoHead]\n");
2416 if(_class->inheritanceAccess == 2)
2417 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private Base]\n");
2419 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Base]\n");
2420 if(classDefine->base)
2421 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", classDefine->base);
2423 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [None]\n");
2424 if(_class->templateParams.count)
2426 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
2427 struct TemplateParameter * tp;
2429 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Template Parameters]\n");
2430 for(tp = (*((struct Symbol *)_class->symbol)->templateParams).first, param = _class->templateParams.first; param && tp; param = param->next, tp = tp->next)
2432 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->name);
2436 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2437 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->__anon1.dataTypeString ? param->__anon1.dataTypeString : "[None]");
2438 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->defaultArg.__anon1.__anon1.dataTypeString ? param->defaultArg.__anon1.__anon1.dataTypeString : "[None]");
2441 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Expression]\n");
2442 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->__anon1.dataTypeString ? param->__anon1.dataTypeString : "[None]");
2443 if(tp->defaultArgument && tp->defaultArgument->__anon1.expression)
2448 PrintExpression(tp->defaultArgument->__anon1.expression, temp);
2449 __ecereNameSpace__ecere__sys__ChangeCh(temp, '\n', ' ');
2450 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
2451 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
2452 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
2454 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
2455 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, temp);
2456 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
2457 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
2459 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
2460 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2463 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [None]\n");
2466 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Identifier]\n");
2467 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", (param->__anon1.memberType == 0) ? "[Data member]" : ((param->__anon1.memberType == 1) ? "[Method]" : "[Property]"));
2468 if(tp->defaultArgument && tp->defaultArgument->__anon1.identifier)
2470 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
2471 if(tp->defaultArgument->__anon1.identifier->_class && tp->defaultArgument->__anon1.identifier->_class->type == 1 && tp->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
2473 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s::", tp->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
2475 else if(tp->defaultArgument->__anon1.identifier->_class && tp->defaultArgument->__anon1.identifier->_class->type == 8 && tp->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier)
2477 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s::", tp->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
2479 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s\n", tp->defaultArgument->__anon1.identifier->string);
2483 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [None]\n");
2488 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2490 if(!classDefine->isStatic)
2492 if(classDefine->methods.first)
2494 struct MethodDefine * method;
2496 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Methods]\n");
2497 for(method = classDefine->methods.first; method; method = method->next)
2499 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", method->name);
2500 if(method->memberAccess == 1)
2501 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
2503 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
2504 if(method->isVirtual)
2505 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Virtual]\n");
2506 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2507 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", method->type ? method->type : "");
2509 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2511 OutputDataMembers(classDefine, _class, f);
2512 if(_class->type == 4)
2514 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
2515 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
2516 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
2518 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Enum Values]\n");
2519 for(value = e->values.first; value; value = value->next)
2521 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s = ", value->name);
2522 if(!strcmp(_class->dataTypeString, "uint64") && *(uint64 *)&value->data > (((long long)0x7fffffffffffffffLL)))
2523 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), *(uint64 *)&value->data);
2525 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
2526 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
2528 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2532 else if(definition->type == 2)
2534 struct Define * defineDefine = (struct Define *)definition;
2536 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", definition->name);
2537 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Value]\n");
2538 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
2539 OutputExpression(defineDefine->exp, f);
2540 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
2542 else if(definition->type == 3)
2544 struct FunctionDefine * functionDefine = (struct FunctionDefine *)definition;
2546 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", functionDefine->name);
2547 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2548 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", functionDefine->dataType);
2550 else if(definition->type == 4)
2552 struct DataDefine * dataDefine = (struct DataDefine *)definition;
2554 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", dataDefine->name);
2555 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
2556 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", dataDefine->dataType);
2559 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
2560 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2564 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_PrecompApp;
2566 extern int GetHostBits(void);
2568 extern size_t strlen(const char * );
2570 extern char * PassArg(char * output, const char * input);
2572 extern const char * GetOutputFile(void);
2574 extern void SetOutputFile(const char * s);
2576 extern const char * GetSourceFile(void);
2578 extern void SetSourceFile(const char * s);
2580 extern void SetSymbolsDir(const char * s);
2582 extern void SetDefaultNameSpace(const char * s);
2584 extern void SetStrictNameSpaces(unsigned int b);
2586 extern void SetI18nModuleName(const char * s);
2588 extern const char * GetSymbolsDir(void);
2590 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, const char * addedPath);
2592 extern char * __ecereNameSpace__ecere__sys__ChangeExtension(const char * string, const char * ext, char * output);
2594 extern void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace);
2596 extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * list);
2598 extern void SetGlobalContext(struct Context * context);
2600 extern void SetCurrentContext(struct Context * context);
2602 extern void SetTopContext(struct Context * context);
2604 extern void SetDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
2606 extern void SetImports(struct __ecereNameSpace__ecere__sys__OldList * list);
2608 extern void SetInPreCompiler(unsigned int b);
2610 extern void SetPrecompDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
2612 extern void SetTargetPlatform(int platform);
2614 extern void SetTargetBits(int bits);
2616 extern void SetEchoOn(unsigned int b);
2618 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
2620 extern void SetPrivateModule(struct __ecereNameSpace__ecere__com__Instance * module);
2622 extern unsigned int __ecereNameSpace__ecere__sys__FileExists(const char * fileName);
2624 extern unsigned int __ecereNameSpace__ecere__sys__DeleteFile(const char * fileName);
2626 extern int snprintf(char * , size_t, const char * , ...);
2628 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine);
2630 extern void SetFileInput(struct __ecereNameSpace__ecere__com__Instance * file);
2632 extern void SetMainModule(struct ModuleImport * moduleImport);
2634 extern void resetScanner(void);
2636 extern void ParseEc(void);
2638 extern void SetYydebug(unsigned int b);
2640 extern void ProcessDBTableDefinitions(void);
2642 extern void FreeASTTree(struct __ecereNameSpace__ecere__sys__OldList * ast);
2644 extern void FreeContext(struct Context * context);
2646 extern void FreeExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols);
2648 extern void FreeModuleDefine(struct Definition * def);
2650 extern void FreeModuleImport(struct ModuleImport * imp);
2652 extern void FreeTypeData(struct __ecereNameSpace__ecere__com__Instance * privateModule);
2654 extern void FreeIncludeFiles(void);
2656 extern void FreeGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * globalDataList);
2658 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2660 const char * __ecereProp___ecereNameSpace__ecere__com__Platform_Get_char__PTR_(int this);
2662 int __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(const char * value);
2664 extern struct __ecereNameSpace__ecere__com__Property ** __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
2666 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
2668 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
2670 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
2672 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2674 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
2676 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode();
2678 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2680 void __ecereMethod_PrecompApp_Main(struct __ecereNameSpace__ecere__com__Instance * this)
2683 unsigned int valid = 1;
2684 char defaultSymFile[797];
2685 char * cppCommand = (((void *)0));
2686 char * cppOptions = (((void *)0));
2687 int cppOptionsLen = 0;
2688 int targetPlatform = __runtimePlatform;
2689 int targetBits = GetHostBits();
2691 for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc; c++)
2693 const char * arg = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c];
2697 if(!strcmp(arg + 1, "m32") || !strcmp(arg + 1, "m64"))
2699 int newLen = cppOptionsLen + 1 + strlen(arg);
2701 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (newLen + 1));
2702 cppOptions[cppOptionsLen] = ' ';
2703 strcpy(cppOptions + cppOptionsLen + 1, arg);
2704 cppOptionsLen = newLen;
2705 targetBits = !strcmp(arg + 1, "m32") ? 32 : 64;
2707 else if(!strcmp(arg + 1, "t32") || !strcmp(arg + 1, "t64"))
2709 targetBits = !strcmp(arg + 1, "t32") ? 32 : 64;
2711 else if(arg[1] == 'D' || arg[1] == 'I')
2714 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
2716 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2717 buf = cppOptions + cppOptionsLen;
2720 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
2722 else if(!strcmp(arg + 1, "t"))
2724 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2725 targetPlatform = __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c]);
2729 else if(!strcmp(arg + 1, "cpp"))
2731 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2732 cppCommand = __ecereNameSpace__ecere__sys__CopyString(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c]);
2736 else if(!strcmp(arg + 1, "o"))
2738 if(!GetOutputFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2740 SetOutputFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
2746 else if(!strcmp(arg + 1, "c"))
2748 if(!GetSourceFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2750 SetSourceFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
2756 else if(!strcmp(arg + 1, "isystem") || !strcmp(arg + 1, "isysroot"))
2758 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2761 const char * arg1 = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[++c];
2762 int size = cppOptionsLen + 1 + strlen(arg) * 2 + strlen(arg1) * 2 + 1;
2764 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2765 buf = cppOptions + cppOptionsLen;
2767 buf = PassArg(buf, arg);
2769 buf = PassArg(buf, arg1);
2770 cppOptionsLen = buf - cppOptions;
2775 else if(!strcmp(arg + 1, "fno-diagnostics-show-caret"))
2778 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
2780 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2781 buf = cppOptions + cppOptionsLen;
2784 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
2786 else if(!strcmp(arg + 1, "symbols"))
2788 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2790 SetSymbolsDir(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
2796 else if(!strcmp(arg + 1, "defaultns"))
2798 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2800 SetDefaultNameSpace(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
2806 else if(!strcmp(arg + 1, "strictns"))
2808 SetStrictNameSpaces(1);
2810 else if(!strcmp(arg + 1, "module"))
2812 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argc)
2814 SetI18nModuleName(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->argv[c + 1]);
2827 cppCommand = __ecereNameSpace__ecere__sys__CopyString("gcc");
2828 if(!GetSourceFile())
2830 else if(!GetOutputFile())
2832 strcpy(defaultSymFile, GetSymbolsDir());
2833 __ecereNameSpace__ecere__sys__PathCat(defaultSymFile, GetSourceFile());
2834 __ecereNameSpace__ecere__sys__ChangeExtension(defaultSymFile, "sym", defaultSymFile);
2835 SetOutputFile(defaultSymFile);
2840 printf(__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))));
2844 struct __ecereNameSpace__ecere__com__Instance * cppOutput;
2847 SetGlobalData(&globalData);
2848 SetExcludedSymbols(&_excludedSymbols);
2849 SetGlobalContext(globalContext);
2850 SetCurrentContext(globalContext);
2851 SetTopContext(globalContext);
2852 SetDefines(&defines);
2853 SetImports(&imports);
2854 SetInPreCompiler(1);
2855 SetPrecompDefines(&precompDefines);
2856 SetTargetPlatform(targetPlatform);
2857 SetTargetBits(targetBits);
2859 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)));
2860 SetPrivateModule(privateModule);
2861 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2862 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2864 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
2866 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2867 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2869 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint64"), __ecereInstance1->type = ProcessTypeString("unsigned int64", 0), __ecereInstance1;
2871 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2872 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2874 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint32"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
2876 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2877 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2879 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint16"), __ecereInstance1->type = ProcessTypeString("unsigned short", 0), __ecereInstance1;
2881 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2882 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2884 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("byte"), __ecereInstance1->type = ProcessTypeString("unsigned char", 0), __ecereInstance1;
2886 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2887 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2889 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("intptr_t"), __ecereInstance1->type = ProcessTypeString("intptr", 0), __ecereInstance1;
2891 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2892 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2894 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uintptr_t"), __ecereInstance1->type = ProcessTypeString("uintptr", 0), __ecereInstance1;
2896 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2897 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2899 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("ssize_t"), __ecereInstance1->type = ProcessTypeString("intsize", 0), __ecereInstance1;
2901 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2902 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2904 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("size_t"), __ecereInstance1->type = ProcessTypeString("uintsize", 0), __ecereInstance1;
2907 const char * outputFilePath = GetOutputFile();
2909 if(__ecereNameSpace__ecere__sys__FileExists(outputFilePath))
2910 __ecereNameSpace__ecere__sys__DeleteFile(outputFilePath);
2912 snprintf(command, sizeof (command), "%s%s -x c -E \"%s\"", cppCommand, cppOptions ? cppOptions : "", GetSourceFile());
2913 command[sizeof (command) - 1] = (char)0;
2914 if((cppOutput = __ecereNameSpace__ecere__sys__DualPipeOpen((((unsigned int)(1))), command)))
2917 struct __ecereNameSpace__ecere__sys__OldList * ast;
2918 struct __ecereNameSpace__ecere__com__Instance * fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2919 struct ModuleImport * mainModule = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ModuleImport);
2921 SetFileInput(fileInput);
2922 SetMainModule(mainModule);
2923 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&imports, mainModule);
2925 for(; !((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
2926 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
2928 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
2929 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof])(cppOutput); )
2932 int count = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
2933 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
2935 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
2936 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(cppOutput, junk, 1, 4096);
2938 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
2939 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
2941 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
2942 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, junk, 1, count);
2944 exitCode = __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode(cppOutput);
2945 (__ecereNameSpace__ecere__com__eInstance_DecRef(cppOutput), cppOutput = 0);
2946 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
2947 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
2949 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
2950 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
2952 SetCurrentNameSpace((((void *)0)));
2954 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
2955 SetFileInput((((void *)0)));
2961 ProcessDBTableDefinitions();
2962 PreCompPreProcessClassDefinitions();
2964 if(!((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->exitCode)
2965 OutputSymbols(GetOutputFile());
2968 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + structSize_Module)))->exitCode = exitCode;
2974 FreeContext(globalContext);
2975 FreeExcludedSymbols(&_excludedSymbols);
2976 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&defines, FreeModuleDefine);
2977 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&imports, FreeModuleImport);
2978 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&precompDefines, FreeDefinition);
2979 FreeTypeData(privateModule);
2981 FreeGlobalData(&globalData);
2982 (__ecereNameSpace__ecere__com__eInstance_DecRef(privateModule), privateModule = 0);
2984 (__ecereNameSpace__ecere__com__eSystem_Delete(cppCommand), cppCommand = 0);
2985 (__ecereNameSpace__ecere__com__eSystem_Delete(cppOptions), cppOptions = 0);
2986 SetSymbolsDir((((void *)0)));
2989 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2991 struct __ecereNameSpace__ecere__com__Module
2993 struct __ecereNameSpace__ecere__com__Instance * application;
2994 struct __ecereNameSpace__ecere__sys__OldList classes;
2995 struct __ecereNameSpace__ecere__sys__OldList defines;
2996 struct __ecereNameSpace__ecere__sys__OldList functions;
2997 struct __ecereNameSpace__ecere__sys__OldList modules;
2998 struct __ecereNameSpace__ecere__com__Instance * prev;
2999 struct __ecereNameSpace__ecere__com__Instance * next;
3005 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
3006 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
3007 } __attribute__ ((gcc_struct));
3009 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
3011 struct __ecereNameSpace__ecere__com__GlobalFunction;
3013 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);
3015 void __ecereRegisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module)
3017 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
3019 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ClassDefine", "Definition", sizeof(struct ClassDefine), 0, 0, 0, module, 2, 1);
3020 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3021 __ecereClass_ClassDefine = class;
3022 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "base", "char *", arch_PointerSize, arch_PointerSize, 1);
3023 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "propertiesAndMembers", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
3024 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "classProperties", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
3025 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "methods", "ecere::sys::OldList", structSize_OldList, arch_PointerSize, 1);
3026 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isRemote", "bool", 4, 4, 1);
3027 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isWatchable", "bool", 4, 4, 1);
3028 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "fixed", "bool", 4, 4, 1);
3029 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isStatic", "bool", 4, 4, 1);
3030 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "noExpansion", "bool", 4, 4, 1);
3031 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Define", "Definition", sizeof(struct Define), 0, 0, 0, module, 2, 1);
3032 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3033 __ecereClass_Define = class;
3034 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "exp", "Expression", arch_PointerSize, arch_PointerSize, 1);
3035 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "FunctionDefine", "Definition", sizeof(struct FunctionDefine), 0, 0, 0, module, 2, 1);
3036 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3037 __ecereClass_FunctionDefine = class;
3038 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "char *", arch_PointerSize, arch_PointerSize, 1);
3039 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "DataDefine", "Definition", sizeof(struct DataDefine), 0, 0, 0, module, 2, 1);
3040 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3041 __ecereClass_DataDefine = class;
3042 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "char *", arch_PointerSize, arch_PointerSize, 1);
3043 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "MethodDefine", 0, sizeof(struct MethodDefine), 0, 0, 0, module, 2, 1);
3044 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3045 __ecereClass_MethodDefine = class;
3046 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "PropertyDefine", 0, sizeof(struct PropertyDefine), 0, 0, 0, module, 2, 1);
3047 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3048 __ecereClass_PropertyDefine = class;
3049 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "DataMemberDefine", 0, sizeof(struct DataMemberDefine), 0, 0, 0, module, 2, 1);
3050 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3051 __ecereClass_DataMemberDefine = class;
3052 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeMethodDefine", "void FreeMethodDefine(MethodDefine method)", FreeMethodDefine, module, 2);
3053 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDataMemberDefine", "void FreeDataMemberDefine(DataMemberDefine dataMember)", FreeDataMemberDefine, module, 2);
3054 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDataDefine", "void FreeDataDefine(DataDefine data)", FreeDataDefine, module, 2);
3055 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDefinition", "void FreeDefinition(Definition definition)", FreeDefinition, module, 2);
3056 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PreCompPreProcessClassDefinitions", "void PreCompPreProcessClassDefinitions(void)", PreCompPreProcessClassDefinitions, module, 2);
3057 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "PrecompApp", "ecere::com::Application", 0, 0, 0, 0, module, 2, 1);
3058 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
3059 __ecereClass_PrecompApp = class;
3060 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Main", 0, __ecereMethod_PrecompApp_Main, 1);
3063 void __ecereUnregisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module)
3068 int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * a, const char * b);
3070 void __ecereCreateModuleInstances_ecp()
3072 globalContext = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
3073 (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);
3076 void __ecereDestroyModuleInstances_ecp()
3078 ((globalContext ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)globalContext) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(globalContext)) : 0), globalContext = 0);