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>
42 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366, BOOL = 367, _BOOL = 368, _COMPLEX = 369, _IMAGINARY = 370, RESTRICT = 371, THREAD = 372, WIDE_STRING_LITERAL = 373
45 static unsigned int globalInstance = 0;
47 static struct Context * globalContext;
49 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
51 struct __ecereNameSpace__ecere__sys__BTNode;
53 struct __ecereNameSpace__ecere__sys__OldList
60 } __attribute__ ((gcc_struct));
62 struct __ecereNameSpace__ecere__com__DataValue
77 } __attribute__ ((gcc_struct)) __anon1;
78 } __attribute__ ((gcc_struct));
80 struct __ecereNameSpace__ecere__com__SerialBuffer
82 unsigned char * _buffer;
86 } __attribute__ ((gcc_struct));
88 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
90 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
92 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
94 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
96 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
114 struct PropertyWatch;
124 } __attribute__ ((gcc_struct));
130 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
132 extern int strtol(const char * , char * * , int base);
134 extern char * strcpy(char * , const char * );
136 extern char * strcat(char * , const char * );
138 extern void SetParsingType(unsigned int b);
140 extern int strcmp(const char * , const char * );
142 extern char * PrintInt64(long long result);
144 extern int printf(const char * , ...);
146 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
148 struct __ecereNameSpace__ecere__com__LinkList
153 } __attribute__ ((gcc_struct));
155 extern void SetCurrentNameSpace(const char * s);
157 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
159 extern int GetHostBits(void);
161 extern size_t strlen(const char * );
163 extern char * PassArg(char * output, const char * input);
165 extern const char * GetOutputFile(void);
167 extern void SetOutputFile(const char * s);
169 extern const char * GetSourceFile(void);
171 extern void SetSourceFile(const char * s);
173 extern void SetSymbolsDir(const char * s);
175 extern void SetDefaultNameSpace(const char * s);
177 extern void SetStrictNameSpaces(unsigned int b);
179 extern void SetI18nModuleName(const char * s);
181 extern const char * GetSymbolsDir(void);
183 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, const char * addedPath);
185 extern char * __ecereNameSpace__ecere__sys__ChangeExtension(const char * string, const char * ext, char * output);
187 extern void SetInPreCompiler(unsigned int b);
189 extern void SetTargetPlatform(int platform);
191 extern void SetTargetBits(int bits);
193 extern void SetEchoOn(unsigned int b);
195 extern unsigned int __ecereNameSpace__ecere__sys__FileExists(const char * fileName);
197 extern unsigned int __ecereNameSpace__ecere__sys__DeleteFile(const char * fileName);
199 extern int snprintf(char * , size_t, const char * , ...);
201 extern void resetScanner(void);
203 extern void ParseEc(void);
205 extern void SetYydebug(unsigned int b);
207 extern void ProcessDBTableDefinitions(void);
209 extern void FreeIncludeFiles(void);
211 struct __ecereNameSpace__ecere__com__GlobalFunction;
213 const char * __ecereProp___ecereNameSpace__ecere__com__Platform_Get_char__PTR_(int this);
215 int __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(const char * value);
217 static struct __ecereNameSpace__ecere__sys__OldList defines, imports, precompDefines;
219 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
221 extern struct __ecereNameSpace__ecere__sys__OldList * GetAST(void);
223 struct __ecereNameSpace__ecere__com__EnumClassData
225 struct __ecereNameSpace__ecere__sys__OldList values;
227 } __attribute__ ((gcc_struct));
229 extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * list);
231 extern void SetDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
233 extern void SetImports(struct __ecereNameSpace__ecere__sys__OldList * list);
235 extern void SetPrecompDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
237 extern void FreeASTTree(struct __ecereNameSpace__ecere__sys__OldList * ast);
239 extern void FreeExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols);
241 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
243 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
247 struct CodePosition start;
248 struct CodePosition end;
249 } __attribute__ ((gcc_struct));
251 extern void SetMainModule(struct ModuleImport * moduleImport);
253 extern void FreeModuleImport(struct ModuleImport * imp);
255 extern struct Location yylloc;
261 struct Definition * prev;
262 struct Definition * next;
266 struct __ecereNameSpace__ecere__sys__OldList propertiesAndMembers;
267 struct __ecereNameSpace__ecere__sys__OldList classProperties;
268 struct __ecereNameSpace__ecere__sys__OldList methods;
269 unsigned int isRemote;
270 unsigned int isWatchable;
272 unsigned int isStatic;
273 unsigned int noExpansion;
274 } __attribute__ ((gcc_struct));
276 struct FunctionDefine
278 struct Definition * prev;
279 struct Definition * next;
283 } __attribute__ ((gcc_struct));
287 struct Definition * prev;
288 struct Definition * next;
292 } __attribute__ ((gcc_struct));
296 struct Definition * prev;
297 struct Definition * next;
300 } __attribute__ ((gcc_struct));
302 extern void FreeModuleDefine(struct Definition * def);
304 void FreeDataDefine(struct DataDefine * data)
306 (__ecereNameSpace__ecere__com__eSystem_Delete(data->name), data->name = 0);
307 (__ecereNameSpace__ecere__com__eSystem_Delete(data->dataType), data->dataType = 0);
314 struct MethodDefine * prev, * next;
318 unsigned int isVirtual;
319 } __attribute__ ((gcc_struct));
321 void FreeMethodDefine(struct MethodDefine * method)
323 (__ecereNameSpace__ecere__com__eSystem_Delete(method->name), method->name = 0);
324 (__ecereNameSpace__ecere__com__eSystem_Delete(method->type), method->type = 0);
327 struct PropertyDefine;
329 struct PropertyDefine
331 struct PropertyDefine * prev, * next;
335 unsigned int isWatchable;
337 unsigned int isVirtual;
338 unsigned int hasSet, hasGet;
339 } __attribute__ ((gcc_struct));
341 struct __ecereNameSpace__ecere__com__Class;
343 struct __ecereNameSpace__ecere__com__Instance
346 struct __ecereNameSpace__ecere__com__Class * _class;
348 } __attribute__ ((gcc_struct));
350 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
352 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
354 extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string, long long value);
356 extern long long __ecereNameSpace__ecere__com__eEnum_AddValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string);
358 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
360 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
362 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
364 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__FileOpen(const char * fileName, int mode);
366 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine);
368 extern void SetFileInput(struct __ecereNameSpace__ecere__com__Instance * file);
370 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, const char * format, ...);
372 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
374 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
376 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
378 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
380 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
382 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode();
384 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
386 struct __ecereNameSpace__ecere__com__Property;
388 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
390 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);
392 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
394 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
396 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);
400 extern char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
402 struct TemplateDatatype
404 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
405 struct Declarator * decl;
406 } __attribute__ ((gcc_struct));
412 struct Definition * prev;
413 struct Definition * next;
416 struct Expression * exp;
417 } __attribute__ ((gcc_struct));
419 extern void ProcessExpressionType(struct Expression * exp);
421 extern void ComputeExpression(struct Expression * exp);
423 extern void FreeExpression(struct Expression * exp);
425 extern void FreeExpContents(struct Expression * exp);
427 extern void PrintExpression(struct Expression * exp, char * string);
429 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
433 struct __ecereNameSpace__ecere__com__Property
435 struct __ecereNameSpace__ecere__com__Property * prev;
436 struct __ecereNameSpace__ecere__com__Property * next;
438 unsigned int isProperty;
441 struct __ecereNameSpace__ecere__com__Class * _class;
442 const char * dataTypeString;
443 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
444 struct Type * dataType;
445 void (* Set)(void * , int);
446 int (* Get)(void * );
447 unsigned int (* IsSet)(void * );
451 unsigned int conversion;
452 unsigned int watcherOffset;
453 const char * category;
454 unsigned int compiled;
455 unsigned int selfWatchable;
456 unsigned int isWatchable;
457 } __attribute__ ((gcc_struct));
459 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
461 extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
463 extern void FreeType(struct Type * type);
465 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
467 struct __ecereNameSpace__ecere__com__DataMember;
469 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);
471 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);
473 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_New(int type, int declMode);
475 extern unsigned int __ecereNameSpace__ecere__com__eMember_AddMember(struct __ecereNameSpace__ecere__com__DataMember * addTo, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
477 extern unsigned int __ecereNameSpace__ecere__com__eClass_AddMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
479 struct __ecereNameSpace__ecere__sys__NamedLink64;
481 struct __ecereNameSpace__ecere__sys__NamedLink64
483 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
484 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
487 } __attribute__ ((gcc_struct));
491 extern struct Symbol * FindClass(const char * name);
493 struct ImportedModule;
495 struct ImportedModule
497 struct ImportedModule * prev;
498 struct ImportedModule * next;
502 unsigned int globalInstance;
503 unsigned int dllOnly;
505 } __attribute__ ((gcc_struct));
507 struct __ecereNameSpace__ecere__com__NameSpace;
509 extern void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace);
513 extern void SetGlobalContext(struct Context * context);
515 extern void SetCurrentContext(struct Context * context);
517 extern void SetTopContext(struct Context * context);
519 extern void FreeContext(struct Context * context);
521 struct __ecereNameSpace__ecere__sys__BinaryTree;
523 struct __ecereNameSpace__ecere__sys__BinaryTree
525 struct __ecereNameSpace__ecere__sys__BTNode * root;
527 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
528 void (* FreeKey)(void * key);
529 } __attribute__ ((gcc_struct));
531 struct __ecereNameSpace__ecere__com__NameSpace
534 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
535 struct __ecereNameSpace__ecere__com__NameSpace * left;
536 struct __ecereNameSpace__ecere__com__NameSpace * right;
538 struct __ecereNameSpace__ecere__com__NameSpace * parent;
539 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
540 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
541 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
542 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
543 } __attribute__ ((gcc_struct));
545 struct __ecereNameSpace__ecere__com__DataMember
547 struct __ecereNameSpace__ecere__com__DataMember * prev;
548 struct __ecereNameSpace__ecere__com__DataMember * next;
550 unsigned int isProperty;
553 struct __ecereNameSpace__ecere__com__Class * _class;
554 const char * dataTypeString;
555 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
556 struct Type * dataType;
560 struct __ecereNameSpace__ecere__sys__OldList members;
561 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
563 short structAlignment;
564 short pointerAlignment;
565 } __attribute__ ((gcc_struct));
567 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
569 int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * a, const char * b);
571 struct __ecereNameSpace__ecere__com__Application
576 unsigned int isGUIApp;
577 struct __ecereNameSpace__ecere__sys__OldList allModules;
578 char * parsedCommand;
579 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
580 } __attribute__ ((gcc_struct));
582 static struct __ecereNameSpace__ecere__com__NameSpace globalData;
584 extern void FreeGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * globalDataList);
586 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
588 struct DataMemberDefine;
590 struct DataMemberDefine
592 struct DataMemberDefine * prev, * next;
596 struct __ecereNameSpace__ecere__sys__OldList dataMembers;
597 struct __ecereNameSpace__ecere__sys__OldList classProperties;
601 } __attribute__ ((gcc_struct));
603 void FreeDataMemberDefine(struct DataMemberDefine * dataMember)
605 (__ecereNameSpace__ecere__com__eSystem_Delete(dataMember->name), dataMember->name = 0);
606 (__ecereNameSpace__ecere__com__eSystem_Delete(dataMember->type), dataMember->type = 0);
609 void FreeDefinition(struct Definition * definition)
611 (__ecereNameSpace__ecere__com__eSystem_Delete(definition->name), definition->name = 0);
612 switch(definition->type)
616 struct ClassDefine * classDefine = (struct ClassDefine *)definition;
618 (__ecereNameSpace__ecere__com__eSystem_Delete(classDefine->base), classDefine->base = 0);
619 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&classDefine->methods, (void *)(FreeMethodDefine));
620 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&classDefine->propertiesAndMembers, (void *)(FreeDataMemberDefine));
624 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct FunctionDefine *)definition)->dataType), ((struct FunctionDefine *)definition)->dataType = 0);
627 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct DataDefine *)definition)->dataType), ((struct DataDefine *)definition)->dataType = 0);
636 struct __ecereNameSpace__ecere__com__BitMember;
638 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);
640 struct __ecereNameSpace__ecere__com__BitMember
642 struct __ecereNameSpace__ecere__com__BitMember * prev;
643 struct __ecereNameSpace__ecere__com__BitMember * next;
645 unsigned int isProperty;
648 struct __ecereNameSpace__ecere__com__Class * _class;
649 const char * dataTypeString;
650 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
651 struct Type * dataType;
656 } __attribute__ ((gcc_struct));
658 struct __ecereNameSpace__ecere__com__ClassProperty;
660 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);
662 struct __ecereNameSpace__ecere__com__ClassProperty
665 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
666 struct __ecereNameSpace__ecere__com__ClassProperty * left;
667 struct __ecereNameSpace__ecere__com__ClassProperty * right;
669 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
670 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
671 const char * dataTypeString;
672 struct Type * dataType;
673 unsigned int constant;
674 } __attribute__ ((gcc_struct));
676 struct __ecereNameSpace__ecere__com__Method;
678 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
684 const char * dataTypeString;
685 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
686 } __attribute__ ((gcc_struct)) __anon1;
687 struct __ecereNameSpace__ecere__com__DataValue expression;
690 const char * memberString;
693 struct __ecereNameSpace__ecere__com__DataMember * member;
694 struct __ecereNameSpace__ecere__com__Property * prop;
695 struct __ecereNameSpace__ecere__com__Method * method;
696 } __attribute__ ((gcc_struct)) __anon1;
697 } __attribute__ ((gcc_struct)) __anon2;
698 } __attribute__ ((gcc_struct)) __anon1;
699 } __attribute__ ((gcc_struct));
701 struct __ecereNameSpace__ecere__com__Method
704 struct __ecereNameSpace__ecere__com__Method * parent;
705 struct __ecereNameSpace__ecere__com__Method * left;
706 struct __ecereNameSpace__ecere__com__Method * right;
711 struct __ecereNameSpace__ecere__com__Class * _class;
713 const char * dataTypeString;
714 struct Type * dataType;
716 } __attribute__ ((gcc_struct));
718 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);
720 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);
722 struct __ecereNameSpace__ecere__com__Module;
724 struct __ecereNameSpace__ecere__com__Module
726 struct __ecereNameSpace__ecere__com__Instance * application;
727 struct __ecereNameSpace__ecere__sys__OldList classes;
728 struct __ecereNameSpace__ecere__sys__OldList defines;
729 struct __ecereNameSpace__ecere__sys__OldList functions;
730 struct __ecereNameSpace__ecere__sys__OldList modules;
731 struct __ecereNameSpace__ecere__com__Instance * prev;
732 struct __ecereNameSpace__ecere__com__Instance * next;
738 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
739 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
740 } __attribute__ ((gcc_struct));
742 struct __ecereNameSpace__ecere__com__Class
744 struct __ecereNameSpace__ecere__com__Class * prev;
745 struct __ecereNameSpace__ecere__com__Class * next;
751 unsigned int (* Constructor)(void * );
752 void (* Destructor)(void * );
755 struct __ecereNameSpace__ecere__com__Class * base;
756 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
757 struct __ecereNameSpace__ecere__sys__BinaryTree members;
758 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
759 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
760 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
761 struct __ecereNameSpace__ecere__sys__OldList derivatives;
765 struct __ecereNameSpace__ecere__com__Instance * module;
766 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
767 const char * dataTypeString;
768 struct Type * dataType;
770 int defaultAlignment;
771 void (* Initialize)();
773 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
774 const char * designerClass;
775 unsigned int noExpansion;
776 const char * defaultProperty;
777 unsigned int comRedefinition;
780 unsigned int internalDecl;
782 unsigned int computeSize;
783 short structAlignment;
784 short pointerAlignment;
785 int destructionWatchOffset;
787 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
788 int inheritanceAccess;
789 const char * fullName;
791 struct __ecereNameSpace__ecere__sys__OldList conversions;
792 struct __ecereNameSpace__ecere__sys__OldList templateParams;
793 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
794 struct __ecereNameSpace__ecere__com__Class * templateClass;
795 struct __ecereNameSpace__ecere__sys__OldList templatized;
797 unsigned int isInstanceClass;
798 unsigned int byValueSystemClass;
799 } __attribute__ ((gcc_struct));
801 static struct __ecereNameSpace__ecere__com__Instance * privateModule;
803 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);
805 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);
807 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);
809 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);
811 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
813 extern void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module);
815 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
817 extern void SetPrivateModule(struct __ecereNameSpace__ecere__com__Instance * module);
819 extern void FreeTypeData(struct __ecereNameSpace__ecere__com__Instance * privateModule);
821 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);
823 void __ecereUnregisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module)
828 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefine;
830 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Define;
832 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefine;
834 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_DataDefine;
836 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodDefine;
838 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDefine;
840 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_DataMemberDefine;
842 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_PrecompApp;
844 static void OutputDataMembers(struct ClassDefine * classDefine, struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Instance * f)
846 if(classDefine->propertiesAndMembers.first)
848 struct DataMemberDefine * member = classDefine->propertiesAndMembers.first;
851 for(member = classDefine->propertiesAndMembers.first; member; member = member->next)
853 if(member->isProperty == 1)
855 struct PropertyDefine * prop = (struct PropertyDefine *)member;
860 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
861 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Properties]\n");
864 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->name);
866 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Conversion]\n");
867 if(prop->memberAccess == 1)
868 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
870 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
872 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Virtual]\n");
874 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Set]\n");
876 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Get]\n");
877 if(prop->isWatchable)
878 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Watchable]\n");
879 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
880 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->type ? prop->type : "");
887 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
888 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Data Members]\n");
890 if(member->memberType == 0)
892 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", member->name);
893 if(member->memberAccess == 1)
894 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
896 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
897 if(_class && _class->type == 2)
901 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Size]\n");
902 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %d\n", member->size);
904 if(member->bitPos != -1)
906 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Pos]\n");
907 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %d\n", member->bitPos);
910 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
911 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", member->type ? member->type : "");
915 if(member->memberAccess == 1)
916 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
918 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
919 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, (member->memberType == 1) ? " [Union]\n" : " [Struct]\n");
920 OutputDataMembers((struct ClassDefine *)member, (((void *)0)), f);
923 last = member->isProperty;
925 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
927 if(classDefine->classProperties.first)
929 struct PropertyDefine * prop = classDefine->propertiesAndMembers.first;
931 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Class Properties]\n");
932 for(prop = classDefine->classProperties.first; prop; prop = prop->next)
935 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->name);
937 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Set]\n");
939 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Get]\n");
940 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
941 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->type ? prop->type : "");
943 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
947 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
949 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
951 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
953 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
955 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
957 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
959 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
961 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
963 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
965 void __ecereCreateModuleInstances_ecp()
967 globalContext = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
968 (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);
971 void __ecereDestroyModuleInstances_ecp()
973 ((globalContext ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)globalContext) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(globalContext)) : 0), globalContext = 0);
978 extern struct Identifier * GetDeclId(struct Declarator * decl);
980 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
982 struct InitDeclarator;
984 struct InitDeclarator
986 struct InitDeclarator * prev;
987 struct InitDeclarator * next;
989 struct Declarator * declarator;
990 struct Initializer * initializer;
991 } __attribute__ ((gcc_struct));
997 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
998 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
999 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
1000 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
1001 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1002 unsigned int (* Neg)(struct Expression *, struct Operand *);
1003 unsigned int (* Inc)(struct Expression *, struct Operand *);
1004 unsigned int (* Dec)(struct Expression *, struct Operand *);
1005 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1006 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1007 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1008 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1009 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1010 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1011 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1012 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1013 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1014 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1015 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1016 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1017 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1018 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1019 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1020 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1021 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1022 unsigned int (* Not)(struct Expression *, struct Operand *);
1023 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1024 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1025 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1026 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1027 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1028 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1029 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1030 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1031 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1032 } __attribute__ ((gcc_struct));
1038 unsigned int ptrSize;
1051 } __attribute__ ((gcc_struct)) __anon1;
1053 } __attribute__ ((gcc_struct));
1055 extern struct Operand GetOperand(struct Expression * exp);
1057 struct Instantiation;
1059 struct ClassFunction;
1061 struct ClassFunction
1063 struct ClassFunction * prev;
1064 struct ClassFunction * next;
1065 struct Location loc;
1066 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1067 struct Declarator * declarator;
1068 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1069 struct Statement * body;
1070 struct __ecereNameSpace__ecere__com__Class * _class;
1071 struct __ecereNameSpace__ecere__sys__OldList attached;
1074 struct Symbol * propSet;
1075 unsigned int isVirtual;
1076 unsigned int isConstructor;
1077 unsigned int isDestructor;
1078 unsigned int dontMangle;
1081 } __attribute__ ((gcc_struct));
1083 struct ClassDefinition;
1087 struct Context * parent;
1088 struct __ecereNameSpace__ecere__sys__BinaryTree types;
1089 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1090 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
1091 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
1094 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
1095 struct ClassDefinition * classDef;
1096 unsigned int templateTypesOnly;
1097 unsigned int hasNameSpace;
1098 } __attribute__ ((gcc_struct));
1100 struct FunctionDefinition;
1102 struct FunctionDefinition
1104 struct FunctionDefinition * prev;
1105 struct FunctionDefinition * next;
1106 struct Location loc;
1107 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1108 struct Declarator * declarator;
1109 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1110 struct Statement * body;
1111 struct __ecereNameSpace__ecere__com__Class * _class;
1112 struct __ecereNameSpace__ecere__sys__OldList attached;
1115 struct Symbol * propSet;
1117 unsigned int propertyNoThis;
1118 } __attribute__ ((gcc_struct));
1125 struct Symbol * parent;
1126 struct Symbol * left;
1127 struct Symbol * right;
1132 struct __ecereNameSpace__ecere__com__Method * method;
1133 struct __ecereNameSpace__ecere__com__Property * _property;
1134 struct __ecereNameSpace__ecere__com__Class * registered;
1135 } __attribute__ ((gcc_struct)) __anon1;
1136 unsigned int notYetDeclared;
1141 struct External * pointerExternal;
1142 struct External * structExternal;
1143 } __attribute__ ((gcc_struct)) __anon1;
1146 struct External * externalGet;
1147 struct External * externalSet;
1148 struct External * externalPtr;
1149 struct External * externalIsSet;
1150 } __attribute__ ((gcc_struct)) __anon2;
1153 struct External * methodExternal;
1154 struct External * methodCodeExternal;
1155 } __attribute__ ((gcc_struct)) __anon3;
1156 } __attribute__ ((gcc_struct)) __anon2;
1157 unsigned int imported;
1158 unsigned int declaredStructSym;
1159 struct __ecereNameSpace__ecere__com__Class * _class;
1160 unsigned int declaredStruct;
1161 unsigned int needConstructor;
1162 unsigned int needDestructor;
1163 char * constructorName;
1166 char * destructorName;
1167 struct ModuleImport * module;
1168 struct ClassImport * _import;
1169 struct Location nameLoc;
1170 unsigned int isParam;
1171 unsigned int isRemote;
1172 unsigned int isStruct;
1173 unsigned int fireWatchersDone;
1175 unsigned int classData;
1176 unsigned int isStatic;
1178 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
1179 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1180 struct Context * ctx;
1182 struct Expression * propCategory;
1183 unsigned int mustRegister;
1184 } __attribute__ ((gcc_struct));
1186 struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols =
1188 0, 0, 0, (unsigned int)(uintptr_t)&((struct Symbol *)(void * )0)->left, 0
1191 struct TemplateParameter;
1200 struct Symbol * _class;
1203 struct __ecereNameSpace__ecere__sys__OldList members;
1205 } __attribute__ ((gcc_struct)) __anon1;
1208 struct Type * returnType;
1209 struct __ecereNameSpace__ecere__sys__OldList params;
1210 struct Symbol * thisClass;
1211 unsigned int staticMethod;
1212 struct TemplateParameter * thisClassTemplate;
1213 } __attribute__ ((gcc_struct)) __anon2;
1216 struct __ecereNameSpace__ecere__com__Method * method;
1217 struct __ecereNameSpace__ecere__com__Class * methodClass;
1218 struct __ecereNameSpace__ecere__com__Class * usedClass;
1219 } __attribute__ ((gcc_struct)) __anon3;
1222 struct Type * arrayType;
1224 struct Expression * arraySizeExp;
1225 unsigned int freeExp;
1226 struct Symbol * enumClass;
1227 } __attribute__ ((gcc_struct)) __anon4;
1229 struct TemplateParameter * templateParameter;
1230 } __attribute__ ((gcc_struct)) __anon1;
1235 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1236 int classObjectType;
1238 unsigned int offset;
1241 unsigned int isSigned : 1;
1242 unsigned int constant : 1;
1243 unsigned int truth : 1;
1244 unsigned int byReference : 1;
1245 unsigned int extraParam : 1;
1246 unsigned int directClassAccess : 1;
1247 unsigned int computing : 1;
1248 unsigned int keepCast : 1;
1249 unsigned int passAsTemplate : 1;
1250 unsigned int dllExport : 1;
1251 unsigned int attrStdcall : 1;
1252 unsigned int declaredWithStruct : 1;
1253 unsigned int typedByReference : 1;
1254 unsigned int casted : 1;
1255 unsigned int pointerAlignment : 1;
1256 unsigned int isLong : 1;
1257 } __attribute__ ((gcc_struct));
1259 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
1261 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);
1263 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
1265 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
1266 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
1271 const char * dataTypeString;
1273 } __attribute__ ((gcc_struct)) __anon1;
1274 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
1276 } __attribute__ ((gcc_struct));
1278 void __ecereMethod_PrecompApp_Main(struct __ecereNameSpace__ecere__com__Instance * this);
1284 struct Declarator * prev;
1285 struct Declarator * next;
1286 struct Location loc;
1288 struct Symbol * symbol;
1289 struct Declarator * declarator;
1292 struct Identifier * identifier;
1295 struct Expression * exp;
1296 struct Expression * posExp;
1297 struct Attrib * attrib;
1298 } __attribute__ ((gcc_struct)) structDecl;
1301 struct Expression * exp;
1302 struct Specifier * enumClass;
1303 } __attribute__ ((gcc_struct)) array;
1306 struct __ecereNameSpace__ecere__sys__OldList * parameters;
1307 } __attribute__ ((gcc_struct)) function;
1310 struct __ecereNameSpace__ecere__com__Instance * pointer;
1311 } __attribute__ ((gcc_struct)) pointer;
1314 struct ExtDecl * extended;
1315 } __attribute__ ((gcc_struct)) extended;
1316 } __attribute__ ((gcc_struct)) __anon1;
1317 } __attribute__ ((gcc_struct));
1321 struct Identifier * prev;
1322 struct Identifier * next;
1323 struct Location loc;
1324 struct Symbol * classSym;
1325 struct Specifier * _class;
1327 struct Identifier * badID;
1328 } __attribute__ ((gcc_struct));
1332 struct Expression * prev;
1333 struct Expression * next;
1334 struct Location loc;
1341 struct Identifier * identifier;
1342 } __attribute__ ((gcc_struct)) __anon1;
1343 struct Statement * compound;
1344 struct Instantiation * instance;
1348 unsigned int intlString;
1349 unsigned int wideString;
1350 } __attribute__ ((gcc_struct)) __anon2;
1351 struct __ecereNameSpace__ecere__sys__OldList * list;
1354 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1355 struct Declarator * decl;
1356 } __attribute__ ((gcc_struct)) _classExp;
1359 struct Identifier * id;
1360 } __attribute__ ((gcc_struct)) classData;
1363 struct Expression * exp;
1364 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1365 struct Location argLoc;
1366 } __attribute__ ((gcc_struct)) call;
1369 struct Expression * exp;
1370 struct __ecereNameSpace__ecere__sys__OldList * index;
1371 } __attribute__ ((gcc_struct)) index;
1374 struct Expression * exp;
1375 struct Identifier * member;
1377 unsigned int thisPtr;
1378 } __attribute__ ((gcc_struct)) member;
1382 struct Expression * exp1;
1383 struct Expression * exp2;
1384 } __attribute__ ((gcc_struct)) op;
1385 struct TypeName * typeName;
1386 struct Specifier * _class;
1389 struct TypeName * typeName;
1390 struct Expression * exp;
1391 } __attribute__ ((gcc_struct)) cast;
1394 struct Expression * cond;
1395 struct __ecereNameSpace__ecere__sys__OldList * exp;
1396 struct Expression * elseExp;
1397 } __attribute__ ((gcc_struct)) cond;
1400 struct TypeName * typeName;
1401 struct Expression * size;
1402 } __attribute__ ((gcc_struct)) _new;
1405 struct TypeName * typeName;
1406 struct Expression * size;
1407 struct Expression * exp;
1408 } __attribute__ ((gcc_struct)) _renew;
1412 struct Identifier * id;
1413 } __attribute__ ((gcc_struct)) db;
1416 struct Expression * ds;
1417 struct Expression * name;
1418 } __attribute__ ((gcc_struct)) dbopen;
1421 struct TypeName * typeName;
1422 struct Initializer * initializer;
1423 } __attribute__ ((gcc_struct)) initializer;
1426 struct Expression * exp;
1427 struct TypeName * typeName;
1428 } __attribute__ ((gcc_struct)) vaArg;
1429 } __attribute__ ((gcc_struct)) __anon1;
1430 unsigned int debugValue;
1431 struct __ecereNameSpace__ecere__com__DataValue val;
1433 unsigned int hasAddress;
1434 struct Type * expType;
1435 struct Type * destType;
1438 unsigned int byReference;
1439 unsigned int isConstant;
1440 unsigned int addedThis;
1441 unsigned int needCast;
1442 unsigned int thisPtr;
1443 unsigned int opDestType;
1444 unsigned int needTemplateCast;
1445 } __attribute__ ((gcc_struct));
1449 struct Specifier * prev;
1450 struct Specifier * next;
1451 struct Location loc;
1458 struct ExtDecl * extDecl;
1460 struct Symbol * symbol;
1461 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1462 struct Specifier * nsSpec;
1463 } __attribute__ ((gcc_struct)) __anon1;
1466 struct Identifier * id;
1467 struct __ecereNameSpace__ecere__sys__OldList * list;
1468 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1469 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1470 unsigned int addNameSpace;
1471 struct Context * ctx;
1472 struct ExtDecl * extDeclStruct;
1473 } __attribute__ ((gcc_struct)) __anon2;
1474 struct Expression * expression;
1475 struct Specifier * _class;
1476 struct TemplateParameter * templateParameter;
1477 } __attribute__ ((gcc_struct)) __anon1;
1478 } __attribute__ ((gcc_struct));
1480 struct Instantiation
1482 struct Instantiation * prev;
1483 struct Instantiation * next;
1484 struct Location loc;
1485 struct Specifier * _class;
1486 struct Expression * exp;
1487 struct __ecereNameSpace__ecere__sys__OldList * members;
1488 struct Symbol * symbol;
1489 unsigned int fullSet;
1490 unsigned int isConstant;
1491 unsigned char * data;
1492 struct Location nameLoc;
1493 struct Location insideLoc;
1495 } __attribute__ ((gcc_struct));
1497 struct ClassDefinition
1499 struct ClassDefinition * prev;
1500 struct ClassDefinition * next;
1501 struct Location loc;
1502 struct Specifier * _class;
1503 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1504 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1505 struct Symbol * symbol;
1506 struct Location blockStart;
1507 struct Location nameLoc;
1509 unsigned int deleteWatchable;
1510 } __attribute__ ((gcc_struct));
1516 struct PropertyDef * prev;
1517 struct PropertyDef * next;
1518 struct Location loc;
1519 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1520 struct Declarator * declarator;
1521 struct Identifier * id;
1522 struct Statement * getStmt;
1523 struct Statement * setStmt;
1524 struct Statement * issetStmt;
1525 struct Symbol * symbol;
1526 struct Expression * category;
1529 unsigned int conversion : 1;
1530 unsigned int isWatchable : 1;
1531 unsigned int isDBProp : 1;
1532 } __attribute__ ((gcc_struct)) __anon1;
1533 } __attribute__ ((gcc_struct));
1535 struct TemplateArgument;
1537 struct TemplateParameter
1539 struct TemplateParameter * prev;
1540 struct TemplateParameter * next;
1541 struct Location loc;
1543 struct Identifier * identifier;
1546 struct TemplateDatatype * dataType;
1548 } __attribute__ ((gcc_struct)) __anon1;
1549 struct TemplateArgument * defaultArgument;
1550 const char * dataTypeString;
1551 struct Type * baseType;
1552 } __attribute__ ((gcc_struct));
1554 struct TemplateArgument
1556 struct TemplateArgument * prev;
1557 struct TemplateArgument * next;
1558 struct Location loc;
1559 struct Identifier * name;
1563 struct Expression * expression;
1564 struct Identifier * identifier;
1565 struct TemplateDatatype * templateDatatype;
1566 } __attribute__ ((gcc_struct)) __anon1;
1567 } __attribute__ ((gcc_struct));
1569 static void OutputSymbols(const char * fileName)
1571 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__sys__FileOpen(fileName, 2);
1575 int lastType = (int)-1;
1576 struct Definition * definition;
1579 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Global Instance]\n");
1580 for(definition = precompDefines.first; definition; definition = definition->next)
1582 if(definition->type != lastType)
1584 if(lastType != (int)-1)
1585 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
1586 if(definition->type == 0)
1587 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Imported Modules]\n");
1588 else if(definition->type == 1)
1589 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Classes]\n");
1590 else if(definition->type == 2)
1591 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Expressions]\n");
1592 else if(definition->type == 3)
1593 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Functions]\n");
1594 else if(definition->type == 4)
1595 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Data]\n");
1596 lastType = definition->type;
1598 if(definition->type == 0)
1600 struct ImportedModule * module = (struct ImportedModule *)definition;
1602 if(module->importType == 1)
1603 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Static]\n");
1604 else if(module->importType == 2)
1605 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Remote]\n");
1606 if(module->importAccess == 2)
1607 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
1608 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", module->name);
1610 else if(definition->type == 1)
1612 struct __ecereNameSpace__ecere__com__Class * _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, definition->name);
1613 struct ClassDefine * classDefine = (struct ClassDefine *)definition;
1615 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", definition->name);
1616 if(classDefine->isStatic)
1617 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Static]\n");
1618 if(classDefine->fixed)
1619 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Fixed]\n");
1620 if(classDefine->noExpansion)
1621 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [No Expansion]\n");
1622 if(classDefine->isRemote)
1623 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Remote]\n");
1624 if(classDefine->isWatchable)
1625 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Watchable]\n");
1626 if(_class->type == 4)
1627 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Enum]\n");
1628 else if(_class->type == 2)
1629 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Bit]\n");
1630 else if(_class->type == 1)
1631 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Struct]\n");
1632 else if(_class->type == 3)
1633 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Unit]\n");
1634 else if(_class->type == 5)
1635 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [NoHead]\n");
1636 if(_class->inheritanceAccess == 2)
1637 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private Base]\n");
1639 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Base]\n");
1640 if(classDefine->base)
1641 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", classDefine->base);
1643 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [None]\n");
1644 if(_class->templateParams.count)
1646 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
1647 struct TemplateParameter * tp;
1649 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Template Parameters]\n");
1650 for(tp = (*((struct Symbol *)_class->symbol)->templateParams).first, param = _class->templateParams.first; param && tp; param = param->next, tp = tp->next)
1652 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->name);
1656 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
1657 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->__anon1.dataTypeString ? param->__anon1.dataTypeString : "[None]");
1658 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->defaultArg.__anon1.__anon1.dataTypeString ? param->defaultArg.__anon1.__anon1.dataTypeString : "[None]");
1661 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Expression]\n");
1662 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", param->__anon1.dataTypeString ? param->__anon1.dataTypeString : "[None]");
1663 if(tp->defaultArgument && tp->defaultArgument->__anon1.expression)
1668 PrintExpression(tp->defaultArgument->__anon1.expression, temp);
1669 __ecereNameSpace__ecere__sys__ChangeCh(temp, '\n', ' ');
1670 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
1671 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
1672 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1674 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
1675 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, temp);
1676 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))__extension__ ({
1677 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1679 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
1680 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1683 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [None]\n");
1686 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Identifier]\n");
1687 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", (param->__anon1.memberType == 0) ? "[Data member]" : ((param->__anon1.memberType == 1) ? "[Method]" : "[Property]"));
1688 if(tp->defaultArgument && tp->defaultArgument->__anon1.identifier)
1690 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
1691 if(tp->defaultArgument->__anon1.identifier->_class && tp->defaultArgument->__anon1.identifier->_class->type == 1 && tp->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
1693 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s::", tp->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
1695 else if(tp->defaultArgument->__anon1.identifier->_class && tp->defaultArgument->__anon1.identifier->_class->type == 8 && tp->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier)
1697 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s::", tp->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
1699 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s\n", tp->defaultArgument->__anon1.identifier->string);
1703 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [None]\n");
1708 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
1710 if(!classDefine->isStatic)
1712 if(classDefine->methods.first)
1714 struct MethodDefine * method;
1716 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Defined Methods]\n");
1717 for(method = classDefine->methods.first; method; method = method->next)
1719 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", method->name);
1720 if(method->memberAccess == 1)
1721 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
1723 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
1724 if(method->isVirtual)
1725 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Virtual]\n");
1726 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
1727 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", method->type ? method->type : "");
1729 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
1731 OutputDataMembers(classDefine, _class, f);
1732 if(_class->type == 4)
1734 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
1735 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
1736 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
1738 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Enum Values]\n");
1739 for(value = e->values.first; value; value = value->next)
1741 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s = ", value->name);
1742 if(_class->dataTypeString && !strcmp(_class->dataTypeString, "uint64") && *(uint64 *)&value->data > (((long long)0x7fffffffffffffffLL)))
1743 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), *(uint64 *)&value->data);
1745 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
1746 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
1748 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
1752 else if(definition->type == 2)
1754 struct Define * defineDefine = (struct Define *)definition;
1756 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", definition->name);
1757 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Value]\n");
1758 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " ");
1759 OutputExpression(defineDefine->exp, f);
1760 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
1762 else if(definition->type == 3)
1764 struct FunctionDefine * functionDefine = (struct FunctionDefine *)definition;
1766 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", functionDefine->name);
1767 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
1768 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", functionDefine->dataType);
1770 else if(definition->type == 4)
1772 struct DataDefine * dataDefine = (struct DataDefine *)definition;
1774 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", dataDefine->name);
1775 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Type]\n");
1776 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", dataDefine->dataType);
1779 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
1780 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
1788 struct Enumerator * prev;
1789 struct Enumerator * next;
1790 struct Location loc;
1791 struct Identifier * id;
1792 struct Expression * exp;
1793 } __attribute__ ((gcc_struct));
1795 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)
1797 struct __ecereNameSpace__ecere__com__Class * regClass = symbol->__anon1.registered;
1799 if(regClass && enumValues)
1801 struct Enumerator * e;
1803 for(e = enumValues->first; e; e = e->next)
1807 struct Type * destType = (destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), destType->kind = 4, destType->refCount = 1, destType);
1809 e->exp->destType = destType;
1811 ProcessExpressionType(e->exp);
1813 if(!e->exp->expType)
1816 destType->__anon1._class = symbol;
1817 ProcessExpressionType(e->exp);
1819 if(e->exp->isConstant)
1821 if(e->exp->type == 0 && e->exp->expType && e->exp->__anon1.__anon1.identifier && e->exp->__anon1.__anon1.identifier->string && e->exp->expType->kind == 15)
1823 struct __ecereNameSpace__ecere__sys__NamedLink64 * l;
1824 char * string = e->exp->__anon1.__anon1.identifier->string;
1826 for(l = e->exp->expType->__anon1.__anon1.members.first; l; l = l->next)
1828 if(!strcmp(l->name, string))
1832 FreeExpContents(e->exp);
1834 e->exp->__anon1.__anon1.constant = PrintInt64(l->data);
1835 FreeType(e->exp->expType);
1836 e->exp->expType = ProcessTypeString("int64", 0);
1843 ComputeExpression(e->exp);
1845 if(e->exp->isConstant && e->exp->type == 2)
1847 struct Operand op = GetOperand(e->exp);
1853 value = op.type->isSigned ? (long long)op.__anon1.c : (long long)op.__anon1.uc;
1856 value = op.type->isSigned ? (long long)op.__anon1.s : (long long)op.__anon1.us;
1859 value = op.type->isSigned ? op.__anon1.i64 : (long long)op.__anon1.ui64;
1863 value = op.type->isSigned ? (long long)op.__anon1.i : (int)op.__anon1.ui;
1865 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(regClass, e->id->string, value);
1869 char expString[8192];
1871 expString[0] = (char)0;
1872 PrintExpression(e->exp, expString);
1873 printf(__ecereNameSpace__ecere__GetTranslatedString("ecp", "error: could not resolve value %s for enum %s in precompiler\n", (((void *)0))), expString, regClass->name);
1874 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Instance *)__thisModule) + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode = 1;
1875 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
1879 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
1886 typedef union YYSTYPE
1891 struct Identifier * id;
1892 struct Expression * exp;
1893 struct Specifier * specifier;
1894 struct __ecereNameSpace__ecere__sys__OldList * list;
1895 struct Enumerator * enumerator;
1896 struct Declarator * declarator;
1897 struct __ecereNameSpace__ecere__com__Instance * pointer;
1898 struct Initializer * initializer;
1899 struct InitDeclarator * initDeclarator;
1900 struct TypeName * typeName;
1901 struct Declaration * declaration;
1902 struct Statement * stmt;
1903 struct FunctionDefinition * function;
1904 struct External * external;
1905 struct Context * context;
1906 struct __ecereNameSpace__ecere__com__Instance * asmField;
1907 struct Attrib * attrib;
1908 struct ExtDecl * extDecl;
1909 struct Attribute * attribute;
1910 struct Instantiation * instance;
1911 struct MembersInit * membersInit;
1912 struct MemberInit * memberInit;
1913 struct ClassFunction * classFunction;
1914 struct ClassDefinition * _class;
1915 struct ClassDef * classDef;
1916 struct PropertyDef * prop;
1918 struct Symbol * symbol;
1919 struct PropertyWatch * propertyWatch;
1920 struct TemplateParameter * templateParameter;
1921 struct TemplateArgument * templateArgument;
1922 struct TemplateDatatype * templateDatatype;
1923 struct __ecereNameSpace__ecere__com__Instance * dbtableEntry;
1924 struct __ecereNameSpace__ecere__com__Instance * dbindexItem;
1925 struct DBTableDef * dbtableDef;
1926 } __attribute__ ((gcc_struct)) YYSTYPE;
1928 extern YYSTYPE yylval;
1932 struct ClassDef * prev;
1933 struct ClassDef * next;
1934 struct Location loc;
1938 struct Declaration * decl;
1939 struct ClassFunction * function;
1940 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1941 struct PropertyDef * propertyDef;
1942 struct PropertyWatch * propertyWatch;
1944 struct Identifier * defaultProperty;
1947 struct Identifier * id;
1948 struct Initializer * initializer;
1949 } __attribute__ ((gcc_struct)) __anon1;
1950 } __attribute__ ((gcc_struct)) __anon1;
1953 } __attribute__ ((gcc_struct));
1957 struct Declaration * prev;
1958 struct Declaration * next;
1959 struct Location loc;
1965 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1966 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1967 } __attribute__ ((gcc_struct)) __anon1;
1968 struct Instantiation * inst;
1971 struct Identifier * id;
1972 struct Expression * exp;
1973 } __attribute__ ((gcc_struct)) __anon2;
1974 } __attribute__ ((gcc_struct)) __anon1;
1975 struct Specifier * extStorage;
1976 struct Symbol * symbol;
1978 } __attribute__ ((gcc_struct));
1982 struct External * prev;
1983 struct External * next;
1984 struct Location loc;
1986 struct Symbol * symbol;
1989 struct FunctionDefinition * function;
1990 struct ClassDefinition * _class;
1991 struct Declaration * declaration;
1992 char * importString;
1993 struct Identifier * id;
1994 struct DBTableDef * table;
1995 } __attribute__ ((gcc_struct)) __anon1;
1997 struct External * fwdDecl;
1998 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1999 struct __ecereNameSpace__ecere__com__Instance * incoming;
2000 int nonBreakableIncoming;
2001 } __attribute__ ((gcc_struct));
2003 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)
2005 if(definitions != (((void *)0)))
2007 struct ClassDef * def;
2009 for(def = definitions->first; def; def = def->next)
2013 struct Declaration * decl = def->__anon1.decl;
2014 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2015 struct Type * dataType;
2016 struct DataMemberDefine * dataMemberDefine;
2020 struct Declarator * d;
2022 if(decl->__anon1.__anon1.declarators)
2024 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
2026 struct Identifier * declId = GetDeclId(d);
2030 dataMemberDefine = __extension__ ({
2031 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
2033 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(declId->string), __ecereInstance1;
2035 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
2036 if(regClass && regClass->type == 2)
2038 struct Expression * sizeExp = d->__anon1.structDecl.exp, * posExp = d->__anon1.structDecl.posExp;
2039 int bitSize = 0, bitPos = -1;
2040 char dataTypeString[1024];
2042 dataTypeString[0] = '\0';
2045 ProcessExpressionType(sizeExp);
2046 ComputeExpression(sizeExp);
2047 if(sizeExp->isConstant)
2048 bitSize = strtol(sizeExp->__anon1.__anon1.constant, (((void *)0)), 0);
2049 FreeExpression(sizeExp);
2053 ProcessExpressionType(posExp);
2054 ComputeExpression(posExp);
2055 if(posExp->isConstant)
2056 bitPos = strtol(posExp->__anon1.__anon1.constant, (((void *)0)), 0);
2057 FreeExpression(posExp);
2059 d->__anon1.structDecl.exp = (((void *)0));
2060 d->__anon1.structDecl.posExp = (((void *)0));
2061 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
2062 PrintType(dataType, dataTypeString, 0, 1);
2064 struct __ecereNameSpace__ecere__com__BitMember * member = __ecereNameSpace__ecere__com__eClass_AddBitMember(regClass, declId->string, dataTypeString, 0, 0, def->memberAccess);
2066 member->size = bitSize;
2067 member->pos = bitPos;
2068 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)member;
2071 dataMember->dataType = dataType;
2072 dataMemberDefine->size = bitSize;
2073 dataMemberDefine->bitPos = bitPos;
2074 dataMemberDefine->type = __ecereNameSpace__ecere__sys__CopyString(dataTypeString);
2079 char typeString[1024];
2081 typeString[0] = '\0';
2082 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
2083 PrintType(dataType, typeString, 0, 1);
2085 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, declId->string, typeString, 0, 0, def->memberAccess);
2087 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, declId->string, typeString, 0, 0, def->memberAccess);
2089 dataMember->dataType = dataType;
2090 dataMemberDefine->type = __ecereNameSpace__ecere__sys__CopyString(typeString);
2093 dataMemberDefine->memberAccess = def->memberAccess;
2097 else if(decl->__anon1.__anon1.specifiers)
2099 struct Specifier * spec;
2101 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
2103 if(spec->type == 3 || spec->type == 4)
2105 if(spec->__anon1.__anon2.definitions && !spec->__anon1.__anon2.id)
2107 struct __ecereNameSpace__ecere__com__DataMember * dataMember = __ecereNameSpace__ecere__com__eMember_New((spec->type == 4) ? 1 : 2, def->memberAccess);
2109 dataMemberDefine = __extension__ ({
2110 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
2112 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = (spec->type == 4) ? 1 : 2, __ecereInstance1;
2114 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
2115 AddDefinitions((((void *)0)), dataMemberDefine, (((void *)0)), dataMember, spec->__anon1.__anon2.definitions);
2117 __ecereNameSpace__ecere__com__eMember_AddMember(member, dataMember);
2119 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, dataMember);
2121 else if(spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id && (*spec->__anon1.__anon2.definitions).count)
2124 struct Identifier * id = spec->__anon1.__anon2.id;
2125 char typeString[1024];
2127 typeString[0] = '\0';
2128 spec->__anon1.__anon2.id = (((void *)0));
2129 decl->__anon1.__anon1.declarators = MkListOne(MkDeclaratorIdentifier(id));
2130 dataType = ProcessType(decl->__anon1.__anon1.specifiers, (((void *)0)));
2131 PrintType(dataType, typeString, 0, 1);
2133 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, id->string, typeString, 0, 0, def->memberAccess);
2135 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, id->string, typeString, 0, 0, def->memberAccess);
2137 dataMember->dataType = dataType;
2144 else if(decl->type == 2)
2146 struct Instantiation * inst = decl->__anon1.inst;
2147 struct Expression * exp = inst->exp;
2152 char * string = exp->__anon1.__anon1.identifier->string;
2155 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);
2158 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
2160 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
2162 dataMember->dataType = dataType;
2164 dataMemberDefine = __extension__ ({
2165 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
2167 __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;
2169 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
2174 else if(def->type == 3 && def->__anon1.propertyDef)
2176 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
2179 struct __ecereNameSpace__ecere__com__Property * prop;
2180 struct PropertyDefine * propDefine;
2183 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
2185 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, propertyDef->__anon1.conversion ? (((void *)0)) : propertyDef->id->string, dataTypeString, propertyDef->setStmt, propertyDef->getStmt, def->memberAccess);
2188 prop->IsSet = (void *)propertyDef->issetStmt;
2191 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
2195 prop->symbol = __extension__ ({
2196 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2198 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(propertyDef->symbol->string), __ecereInstance1->type = propertyDef->symbol->type, __ecereInstance1;
2200 if(propertyDef->symbol->type)
2201 propertyDef->symbol->type->refCount++;
2202 propDefine = __extension__ ({
2203 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
2205 __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;
2207 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, propDefine);
2211 else if(def->type == 10 && def->__anon1.propertyDef)
2213 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
2216 struct __ecereNameSpace__ecere__com__ClassProperty * prop;
2217 struct PropertyDefine * propDefine;
2220 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
2222 prop = __ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, propertyDef->id->string, dataTypeString, propertyDef->setStmt, propertyDef->getStmt);
2223 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
2227 propDefine = __extension__ ({
2228 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
2230 __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;
2232 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->classProperties, propDefine);
2236 else if(def->type == 7)
2239 classDefine->fixed = 1;
2241 else if(def->type == 6)
2244 classDefine->noExpansion = 1;
2246 else if(def->type == 13)
2248 struct __ecereNameSpace__ecere__com__DataMember * member;
2249 struct __ecereNameSpace__ecere__com__Property * prop;
2251 if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(regClass, def->__anon1.__anon1.id->string, privateModule)))
2253 struct PropertyDefine * propDefine;
2255 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, def->__anon1.__anon1.id->string, (((void *)0)), (((void *)0)), (((void *)0)), def->memberAccess);
2258 propDefine = __extension__ ({
2259 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
2261 __ecereInstance1->isProperty = 1, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
2263 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, propDefine);
2266 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(regClass, def->__anon1.__anon1.id->string, privateModule, (((void *)0)), (((void *)0)))))
2268 struct DataMemberDefine * dataMemberDefine;
2270 member = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, def->__anon1.__anon1.id->string, (((void *)0)), 0, 0, def->memberAccess);
2271 dataMemberDefine = __extension__ ({
2272 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
2274 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(def->__anon1.__anon1.id->string), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
2276 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
2283 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)
2285 struct __ecereNameSpace__ecere__com__Class * regClass;
2286 struct ClassDef * def;
2287 struct ClassDefine * classDefine;
2288 char baseName[1024];
2289 unsigned int unitType = 0;
2290 unsigned int wouldBeEnum = 0;
2291 int inheritanceAccess = 1;
2294 if(baseSpecs != (((void *)0)))
2296 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
2298 PrintType(baseType, baseName, 0, 1);
2299 if(baseType->kind == 8)
2301 if(baseType->__anon1._class->__anon1.registered && classType == 0)
2303 if(baseType->__anon1._class->__anon1.registered->type == 3)
2305 else if(baseType->__anon1._class->__anon1.registered->type == 2)
2307 else if(baseType->__anon1._class->__anon1.registered->type == 5)
2309 else if(baseType->__anon1._class->__anon1.registered->type == 4)
2315 else if(baseType->kind == 9 || baseType->kind == 10)
2323 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
2324 inheritanceAccess = 2;
2330 if(definitions != (((void *)0)))
2332 for(def = definitions->first; def; def = def->next)
2336 struct Declaration * decl = def->__anon1.decl;
2345 if(decl->__anon1.__anon1.declarators)
2347 struct Declarator * d;
2349 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
2351 if(d->__anon1.structDecl.exp)
2365 if(classType == 0 && wouldBeEnum)
2367 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);
2369 regClass->symbol = symbol;
2370 classDefine = __extension__ ({
2371 struct ClassDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassDefine);
2373 __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;
2375 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, classDefine);
2378 struct __ecereNameSpace__ecere__com__DataMember * unionMember = __ecereNameSpace__ecere__com__eMember_New(1, 1);
2379 struct DataMemberDefine * unionDefine;
2381 unionDefine = __extension__ ({
2382 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
2384 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 1, __ecereInstance1;
2386 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, unionDefine);
2387 AddDefinitions(classDefine, unionDefine, regClass, unionMember, definitions);
2388 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, unionMember);
2391 AddDefinitions(classDefine, (struct DataMemberDefine *)classDefine, regClass, (((void *)0)), definitions);
2392 if(definitions != (((void *)0)))
2394 for(def = definitions->first; def; def = def->next)
2398 struct ClassFunction * func = def->__anon1.function;
2400 if(!func->dontMangle && func->declarator)
2402 struct Identifier * id = GetDeclId(func->declarator);
2403 struct __ecereNameSpace__ecere__com__Method * method;
2404 struct MethodDefine * methodDefine;
2407 char * dataTypeString = StringFromSpecDecl(func->specifiers, func->declarator);
2410 method = __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(regClass, id->string, dataTypeString, func->declarator->symbol, def->memberAccess);
2412 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, id->string, dataTypeString, func->declarator->symbol, def->memberAccess);
2413 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
2417 method->symbol = __extension__ ({
2418 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2420 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(func->declarator->symbol->string), __ecereInstance1->type = func->declarator->symbol->type, __ecereInstance1;
2422 if(func->declarator->symbol->type)
2423 func->declarator->symbol->type->refCount++;
2424 ((struct Symbol *)method->symbol)->__anon1.method = method;
2425 func->declarator->symbol = (((void *)0));
2426 if(method->type != 1 || method->_class == regClass)
2428 methodDefine = __extension__ ({
2429 struct MethodDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodDefine);
2431 __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;
2433 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->methods, methodDefine);
2438 else if(def->type == 13)
2440 struct __ecereNameSpace__ecere__com__Method * method;
2442 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(regClass, def->__anon1.__anon1.id->string, privateModule)))
2444 struct MethodDefine * methodDefine;
2446 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, def->__anon1.__anon1.id->string, (((void *)0)), (((void *)0)), def->memberAccess);
2447 methodDefine = __extension__ ({
2448 struct MethodDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodDefine);
2450 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
2452 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->methods, methodDefine);
2457 if(regClass && symbol->templateParams)
2459 struct TemplateParameter * param;
2461 for(param = (*symbol->templateParams).first; param; param = param->next)
2463 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg =
2474 if(param->defaultArgument)
2479 defaultArg.__anon1.__anon1.dataTypeString = StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl);
2483 char memberString[1024];
2485 memberString[0] = '\0';
2486 if(param->defaultArgument->__anon1.identifier->_class && param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
2488 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
2489 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
2491 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
2495 strcat(memberString, "::");
2497 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
2498 defaultArg.__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(memberString);
2505 ProcessExpressionType(param->defaultArgument->__anon1.expression);
2506 ComputeExpression(param->defaultArgument->__anon1.expression);
2507 op = GetOperand(param->defaultArgument->__anon1.expression);
2508 defaultArg.__anon1.expression.__anon1.ui64 = op.__anon1.ui64;
2513 if(param->type == 1)
2515 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, (void *)(uintptr_t)param->__anon1.memberType, &defaultArg);
2519 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
2521 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, typeString, &defaultArg);
2527 void PreCompPreProcessClassDefinitions()
2529 struct __ecereNameSpace__ecere__sys__OldList * ast = GetAST();
2530 struct External * external, * next;
2532 for(external = (*ast).first; external; external = next)
2534 next = external->next;
2535 if(external->type == 2)
2537 struct ClassDefinition * _class = external->__anon1._class;
2539 if(_class->declMode == 1 || _class->declMode == 2 || _class->declMode == 3)
2541 if(_class->definitions)
2543 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), _class->deleteWatchable, _class->declMode);
2547 else if(external->type == 1)
2549 struct Declaration * declaration = external->__anon1.declaration;
2551 if(declaration->type == 1)
2553 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2 || external->__anon1.declaration->declMode == 3)
2555 if(declaration->__anon1.__anon1.specifiers)
2557 struct Specifier * specifier;
2559 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
2561 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)))
2563 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
2569 if(specifier->type == 2)
2571 else if(specifier->type == 4)
2575 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, 0, external->__anon1.declaration->declMode);
2580 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2582 if(declaration->__anon1.__anon1.declarators)
2584 struct InitDeclarator * d;
2586 for(d = (*declaration->__anon1.__anon1.declarators).first; d; d = d->next)
2590 struct Symbol * symbol = d->declarator->symbol;
2594 struct DataDefine * dataDefine;
2595 char typeString[1024];
2597 typeString[0] = '\0';
2598 PrintType(symbol->type, typeString, 0, 1);
2599 dataDefine = __extension__ ({
2600 struct DataDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataDefine);
2602 __ecereInstance1->type = 4, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2604 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, dataDefine);
2612 else if(declaration->type == 2)
2614 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2616 struct Symbol * symbol = declaration->__anon1.inst->symbol;
2620 struct DataDefine * dataDefine;
2621 char typeString[1024];
2623 typeString[0] = '\0';
2624 PrintType(symbol->type, typeString, 0, 1);
2625 dataDefine = __extension__ ({
2626 struct DataDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataDefine);
2628 __ecereInstance1->type = 4, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2630 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, dataDefine);
2635 else if(declaration->type == 3)
2637 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2639 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);
2641 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, definition);
2645 else if(external->type == 0 && (external->__anon1.function->declMode == 1 || external->__anon1.function->declMode == 2))
2647 struct FunctionDefinition * function = external->__anon1.function;
2648 struct FunctionDefine * functionDefine;
2649 char typeString[1024];
2651 typeString[0] = '\0';
2652 PrintType(function->declarator->symbol->type, typeString, 1, 1);
2653 functionDefine = __extension__ ({
2654 struct FunctionDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionDefine);
2656 __ecereInstance1->type = 3, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->declarator->symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2658 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, functionDefine);
2660 else if(external->type == 4)
2662 SetCurrentNameSpace(external->__anon1.id->string);
2665 ComputeModuleClasses(privateModule);
2666 for(external = (*ast).first; external; external = next)
2668 next = external->next;
2669 if(external->type == 1 && (external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2))
2671 struct Declaration * declaration = external->__anon1.declaration;
2673 if(declaration->type == 1)
2675 if(declaration->__anon1.__anon1.specifiers)
2677 struct Specifier * specifier;
2679 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
2681 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)))
2683 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
2687 ProcessClassEnumValues(4, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list);
2697 void __ecereMethod_PrecompApp_Main(struct __ecereNameSpace__ecere__com__Instance * this)
2700 unsigned int valid = 1;
2701 char defaultSymFile[797];
2702 char * cppCommand = (((void *)0));
2703 char * cppOptions = (((void *)0));
2704 int cppOptionsLen = 0;
2705 int targetPlatform = __runtimePlatform;
2706 int targetBits = GetHostBits();
2708 for(c = 1; c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc; c++)
2710 const char * arg = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c];
2714 if(!strcmp(arg + 1, "m32") || !strcmp(arg + 1, "m64"))
2716 int newLen = cppOptionsLen + 1 + strlen(arg);
2718 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (newLen + 1));
2719 cppOptions[cppOptionsLen] = ' ';
2720 strcpy(cppOptions + cppOptionsLen + 1, arg);
2721 cppOptionsLen = newLen;
2722 targetBits = !strcmp(arg + 1, "m32") ? 32 : 64;
2724 else if(!strcmp(arg + 1, "t32") || !strcmp(arg + 1, "t64"))
2726 targetBits = !strcmp(arg + 1, "t32") ? 32 : 64;
2728 else if(arg[1] == 'D' || arg[1] == 'I')
2731 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
2733 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2734 buf = cppOptions + cppOptionsLen;
2737 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
2739 else if(!strcmp(arg + 1, "t"))
2741 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2742 targetPlatform = __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c]);
2746 else if(!strcmp(arg + 1, "cpp"))
2748 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2749 cppCommand = __ecereNameSpace__ecere__sys__CopyString(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c]);
2753 else if(!strcmp(arg + 1, "o"))
2755 if(!GetOutputFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2757 SetOutputFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
2763 else if(!strcmp(arg + 1, "c"))
2765 if(!GetSourceFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2767 SetSourceFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
2773 else if(!strcmp(arg + 1, "isystem") || !strcmp(arg + 1, "isysroot"))
2775 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2778 const char * arg1 = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[++c];
2779 int size = cppOptionsLen + 1 + strlen(arg) * 2 + strlen(arg1) * 2 + 1;
2781 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2782 buf = cppOptions + cppOptionsLen;
2784 buf = PassArg(buf, arg);
2786 buf = PassArg(buf, arg1);
2787 cppOptionsLen = buf - cppOptions;
2792 else if(!strcmp(arg + 1, "fno-diagnostics-show-caret"))
2795 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
2797 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2798 buf = cppOptions + cppOptionsLen;
2801 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
2803 else if(!strcmp(arg + 1, "symbols"))
2805 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2807 SetSymbolsDir(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
2813 else if(!strcmp(arg + 1, "defaultns"))
2815 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2817 SetDefaultNameSpace(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
2823 else if(!strcmp(arg + 1, "strictns"))
2825 SetStrictNameSpaces(1);
2827 else if(!strcmp(arg + 1, "module"))
2829 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2831 SetI18nModuleName(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
2844 cppCommand = __ecereNameSpace__ecere__sys__CopyString("gcc");
2845 if(!GetSourceFile())
2847 else if(!GetOutputFile())
2849 strcpy(defaultSymFile, GetSymbolsDir());
2850 __ecereNameSpace__ecere__sys__PathCat(defaultSymFile, GetSourceFile());
2851 __ecereNameSpace__ecere__sys__ChangeExtension(defaultSymFile, "sym", defaultSymFile);
2852 SetOutputFile(defaultSymFile);
2857 printf("%s", __ecereNameSpace__ecere__GetTranslatedString("ecp", "Syntax:\n ecp [-t <target platform>] [-cpp <c preprocessor>] [-o <output>] [-symbols <outputdir>] [-I<includedir>]* [-isystem <sysincludedir>]* [-D<definition>]* -c <input>\n", (((void *)0))));
2861 struct __ecereNameSpace__ecere__com__Instance * cppOutput;
2864 SetGlobalData(&globalData);
2865 SetExcludedSymbols(&_excludedSymbols);
2866 SetGlobalContext(globalContext);
2867 SetCurrentContext(globalContext);
2868 SetTopContext(globalContext);
2869 SetDefines(&defines);
2870 SetImports(&imports);
2871 SetInPreCompiler(1);
2872 SetPrecompDefines(&precompDefines);
2873 SetTargetPlatform(targetPlatform);
2874 SetTargetBits(targetBits);
2876 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)));
2877 SetPrivateModule(privateModule);
2878 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2879 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2881 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
2883 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2884 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2886 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint64"), __ecereInstance1->type = ProcessTypeString("unsigned int64", 0), __ecereInstance1;
2888 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2889 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2891 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint32"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
2893 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2894 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2896 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint16"), __ecereInstance1->type = ProcessTypeString("unsigned short", 0), __ecereInstance1;
2898 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2899 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2901 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("byte"), __ecereInstance1->type = ProcessTypeString("unsigned char", 0), __ecereInstance1;
2903 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2904 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2906 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("intptr_t"), __ecereInstance1->type = ProcessTypeString("intptr", 0), __ecereInstance1;
2908 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2909 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2911 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uintptr_t"), __ecereInstance1->type = ProcessTypeString("uintptr", 0), __ecereInstance1;
2913 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2914 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2916 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("ssize_t"), __ecereInstance1->type = ProcessTypeString("intsize", 0), __ecereInstance1;
2918 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2919 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2921 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("size_t"), __ecereInstance1->type = ProcessTypeString("uintsize", 0), __ecereInstance1;
2924 const char * outputFilePath = GetOutputFile();
2926 if(__ecereNameSpace__ecere__sys__FileExists(outputFilePath))
2927 __ecereNameSpace__ecere__sys__DeleteFile(outputFilePath);
2929 snprintf(command, sizeof (command), "%s%s -x c -E \"%s\"", cppCommand, cppOptions ? cppOptions : "", GetSourceFile());
2930 command[sizeof (command) - 1] = (char)0;
2931 if((cppOutput = __ecereNameSpace__ecere__sys__DualPipeOpen((((unsigned int)(1))), command)))
2934 struct __ecereNameSpace__ecere__sys__OldList * ast;
2935 struct __ecereNameSpace__ecere__com__Instance * fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2936 struct ModuleImport * mainModule = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ModuleImport);
2938 SetFileInput(fileInput);
2939 SetMainModule(mainModule);
2940 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&imports, mainModule);
2942 for(; !((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
2943 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
2945 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
2946 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof])(cppOutput); )
2949 int count = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
2950 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
2952 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
2953 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(cppOutput, junk, 1, 4096);
2955 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
2956 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
2958 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
2959 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, junk, 1, count);
2961 exitCode = __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode(cppOutput);
2962 (__ecereNameSpace__ecere__com__eInstance_DecRef(cppOutput), cppOutput = 0);
2963 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
2964 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
2966 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
2967 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
2969 SetCurrentNameSpace((((void *)0)));
2971 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
2972 SetFileInput((((void *)0)));
2978 ProcessDBTableDefinitions();
2979 PreCompPreProcessClassDefinitions();
2981 if(!((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode)
2982 OutputSymbols(GetOutputFile());
2985 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode = exitCode;
2991 FreeContext(globalContext);
2992 FreeExcludedSymbols(&_excludedSymbols);
2993 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&defines, (void *)(FreeModuleDefine));
2994 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&imports, (void *)(FreeModuleImport));
2995 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&precompDefines, (void *)(FreeDefinition));
2996 FreeTypeData(privateModule);
2998 FreeGlobalData(&globalData);
2999 (__ecereNameSpace__ecere__com__eInstance_DecRef(privateModule), privateModule = 0);
3001 (__ecereNameSpace__ecere__com__eSystem_Delete(cppCommand), cppCommand = 0);
3002 (__ecereNameSpace__ecere__com__eSystem_Delete(cppOptions), cppOptions = 0);
3003 SetSymbolsDir((((void *)0)));
3006 void __ecereRegisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module)
3008 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
3010 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ClassDefine", "Definition", sizeof(struct ClassDefine), 0, (void *)0, (void *)0, module, 2, 1);
3011 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
3012 __ecereClass_ClassDefine = class;
3013 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "base", "char *", sizeof(void *), 0xF000F000, 1);
3014 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "propertiesAndMembers", "ecere::sys::OldList", sizeof(struct __ecereNameSpace__ecere__sys__OldList), 0xF000F000, 1);
3015 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "classProperties", "ecere::sys::OldList", sizeof(struct __ecereNameSpace__ecere__sys__OldList), 0xF000F000, 1);
3016 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "methods", "ecere::sys::OldList", sizeof(struct __ecereNameSpace__ecere__sys__OldList), 0xF000F000, 1);
3017 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isRemote", "bool", 4, 4, 1);
3018 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isWatchable", "bool", 4, 4, 1);
3019 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "fixed", "bool", 4, 4, 1);
3020 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isStatic", "bool", 4, 4, 1);
3021 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "noExpansion", "bool", 4, 4, 1);
3022 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Define", "Definition", sizeof(struct Define), 0, (void *)0, (void *)0, module, 2, 1);
3023 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
3024 __ecereClass_Define = class;
3025 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "exp", "Expression", sizeof(void *), 0xF000F000, 1);
3026 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "FunctionDefine", "Definition", sizeof(struct FunctionDefine), 0, (void *)0, (void *)0, module, 2, 1);
3027 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
3028 __ecereClass_FunctionDefine = class;
3029 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "char *", sizeof(void *), 0xF000F000, 1);
3030 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "DataDefine", "Definition", sizeof(struct DataDefine), 0, (void *)0, (void *)0, module, 2, 1);
3031 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
3032 __ecereClass_DataDefine = class;
3033 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "char *", sizeof(void *), 0xF000F000, 1);
3034 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "MethodDefine", 0, sizeof(struct MethodDefine), 0, (void *)0, (void *)0, module, 2, 1);
3035 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
3036 __ecereClass_MethodDefine = class;
3037 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "PropertyDefine", 0, sizeof(struct PropertyDefine), 0, (void *)0, (void *)0, module, 2, 1);
3038 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
3039 __ecereClass_PropertyDefine = class;
3040 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "DataMemberDefine", 0, sizeof(struct DataMemberDefine), 0, (void *)0, (void *)0, module, 2, 1);
3041 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
3042 __ecereClass_DataMemberDefine = class;
3043 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeMethodDefine", "void FreeMethodDefine(MethodDefine method)", FreeMethodDefine, module, 2);
3044 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDataMemberDefine", "void FreeDataMemberDefine(DataMemberDefine dataMember)", FreeDataMemberDefine, module, 2);
3045 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDataDefine", "void FreeDataDefine(DataDefine data)", FreeDataDefine, module, 2);
3046 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDefinition", "void FreeDefinition(Definition definition)", FreeDefinition, module, 2);
3047 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PreCompPreProcessClassDefinitions", "void PreCompPreProcessClassDefinitions(void)", PreCompPreProcessClassDefinitions, module, 2);
3048 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "PrecompApp", "ecere::com::Application", 0, 0, (void *)0, (void *)0, module, 2, 1);
3049 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
3050 __ecereClass_PrecompApp = class;
3051 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Main", 0, __ecereMethod_PrecompApp_Main, 1);