1 /* Code generated from eC source file: ecc.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 # if defined(__GNUC__) || defined(__TINYC__)
40 # define stdcall __attribute__((__stdcall__))
42 # define stdcall __stdcall
48 #include <sys/types.h>
49 static struct Context * globalContext;
51 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
53 struct __ecereNameSpace__ecere__sys__OldList
60 } __attribute__ ((gcc_struct));
64 struct __ecereNameSpace__ecere__com__DataValue
79 } __attribute__ ((gcc_struct)) __anon1;
80 } __attribute__ ((gcc_struct));
82 struct __ecereNameSpace__ecere__com__SerialBuffer
84 unsigned char * _buffer;
88 } __attribute__ ((gcc_struct));
90 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
92 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
94 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
96 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
98 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
108 } __attribute__ ((gcc_struct));
112 extern int GetHostBits(void);
114 extern void SetSymbolsDir(const char * s);
116 extern int strcmp(const char * , const char * );
118 extern size_t strlen(const char * );
120 extern char * strcpy(char * , const char * );
122 extern char * PassArg(char * output, const char * input);
124 extern void SetBuildingEcereCom(unsigned int b);
126 extern void SetBuildingEcereComModule(unsigned int b);
128 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
130 extern const char * GetOutputFile(void);
132 extern void SetOutputFile(const char * s);
134 extern const char * GetSourceFile(void);
136 extern void SetSourceFile(const char * s);
138 extern void SetI18nModuleName(const char * s);
140 extern void SetMemoryGuard(unsigned int b);
142 extern void SetDefaultNameSpace(const char * s);
144 extern void SetStrictNameSpaces(unsigned int b);
146 extern void SetOutputLineNumbers(unsigned int value);
148 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, const char * addedPath);
150 extern char * __ecereNameSpace__ecere__sys__ChangeExtension(const char * string, const char * ext, char * output);
152 extern int printf(const char * , ...);
154 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
156 extern void SetInCompiler(unsigned int b);
158 extern void SetTargetPlatform(int platform);
160 extern void SetTargetBits(int bits);
162 extern void SetEchoOn(unsigned int b);
164 struct ClassDefinition;
166 extern int snprintf(char * , size_t, const char * , ...);
168 extern char * __ecereNameSpace__ecere__sys__GetLastDirectory(const char * string, char * output);
170 extern unsigned int __ecereNameSpace__ecere__sys__StripExtension(char * string);
172 extern void resetScanner(void);
174 extern const char * GetSymbolsDir(void);
176 extern unsigned int LoadSymbols(const char * fileName, int importType, unsigned int loadDllOnly);
178 extern int strcasecmp(const char * , const char * );
180 extern unsigned int GetEcereImported(void);
182 extern unsigned int GetBuildingEcereCom(void);
184 extern void ParseEc(void);
186 extern void CheckDataRedefinitions(void);
188 extern void SetYydebug(unsigned int b);
190 extern void SetCurrentNameSpace(const char * s);
192 extern void SetDeclMode(int accessMode);
194 extern void ProcessDBTableDefinitions(void);
196 extern void PrePreProcessClassDefinitions(void);
198 extern void PreProcessClassDefinitions(void);
200 extern void ProcessClassDefinitions(void);
202 extern void ComputeDataTypes(void);
204 extern void ProcessInstantiations(void);
206 extern void ProcessMemberAccess(void);
208 extern void ProcessInstanceDeclarations(void);
212 extern void FreeIncludeFiles(void);
214 extern void OutputIntlStrings(void);
216 const char * __ecereProp___ecereNameSpace__ecere__com__Platform_Get_char__PTR_(int this);
218 int __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(const char * value);
220 static struct __ecereNameSpace__ecere__sys__OldList defines, imports;
222 extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * list);
224 extern void SetDefines(struct __ecereNameSpace__ecere__sys__OldList * list);
226 extern void SetImports(struct __ecereNameSpace__ecere__sys__OldList * list);
228 extern struct __ecereNameSpace__ecere__sys__OldList * GetAST(void);
230 extern void FreeASTTree(struct __ecereNameSpace__ecere__sys__OldList * ast);
232 extern void FreeExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols);
234 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
236 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_AddName(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
238 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
240 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (* freeFn)(void * ));
242 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
246 struct CodePosition start;
247 struct CodePosition end;
248 } __attribute__ ((gcc_struct));
250 extern void FreeModuleDefine(struct Definition * def);
254 static struct ModuleImport * mainModule;
258 struct ModuleImport * prev;
259 struct ModuleImport * next;
261 struct __ecereNameSpace__ecere__sys__OldList classes;
262 struct __ecereNameSpace__ecere__sys__OldList functions;
265 } __attribute__ ((gcc_struct));
267 extern void SetMainModule(struct ModuleImport * moduleImport);
269 extern void FreeModuleImport(struct ModuleImport * imp);
271 struct __ecereNameSpace__ecere__sys__BTNode;
273 struct __ecereNameSpace__ecere__sys__BTNode
276 struct __ecereNameSpace__ecere__sys__BTNode * parent;
277 struct __ecereNameSpace__ecere__sys__BTNode * left;
278 struct __ecereNameSpace__ecere__sys__BTNode * right;
280 } __attribute__ ((gcc_struct));
282 struct __ecereNameSpace__ecere__com__Class;
284 struct __ecereNameSpace__ecere__com__Instance
287 struct __ecereNameSpace__ecere__com__Class * _class;
289 } __attribute__ ((gcc_struct));
291 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
293 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
295 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
297 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
299 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
301 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__FileOpen(const char * fileName, int mode);
303 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char * commandLine);
305 extern void SetFileInput(struct __ecereNameSpace__ecere__com__Instance * file);
307 extern void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f);
309 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, const char * format, ...);
311 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
313 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
315 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
317 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
319 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode();
321 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
323 struct __ecereNameSpace__ecere__com__Property;
325 struct __ecereNameSpace__ecere__com__Property
327 struct __ecereNameSpace__ecere__com__Property * prev;
328 struct __ecereNameSpace__ecere__com__Property * next;
330 unsigned int isProperty;
333 struct __ecereNameSpace__ecere__com__Class * _class;
334 const char * dataTypeString;
335 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
336 struct Type * dataType;
337 void (* Set)(void * , int);
338 int (* Get)(void * );
339 unsigned int (* IsSet)(void * );
343 unsigned int conversion;
344 unsigned int watcherOffset;
345 const char * category;
346 unsigned int compiled;
347 unsigned int selfWatchable;
348 unsigned int isWatchable;
349 } __attribute__ ((gcc_struct));
351 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
353 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);
355 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
357 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
359 struct FunctionImport;
361 struct FunctionImport
363 struct FunctionImport * prev;
364 struct FunctionImport * next;
366 } __attribute__ ((gcc_struct));
372 struct MethodImport * prev;
373 struct MethodImport * next;
375 unsigned int isVirtual;
376 } __attribute__ ((gcc_struct));
378 struct PropertyImport;
380 struct PropertyImport
382 struct PropertyImport * prev;
383 struct PropertyImport * next;
385 unsigned int isVirtual;
388 } __attribute__ ((gcc_struct));
390 struct __ecereNameSpace__ecere__com__NameSpace;
392 extern void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * nameSpace);
396 extern void SetGlobalContext(struct Context * context);
398 extern void SetCurrentContext(struct Context * context);
400 extern void SetTopContext(struct Context * context);
402 extern void FreeContext(struct Context * context);
404 struct ImportedModule;
406 struct ImportedModule
408 struct ImportedModule * prev;
409 struct ImportedModule * next;
413 unsigned int globalInstance;
414 unsigned int dllOnly;
416 } __attribute__ ((gcc_struct));
422 struct ClassImport * prev;
423 struct ClassImport * next;
425 struct __ecereNameSpace__ecere__sys__OldList methods;
426 struct __ecereNameSpace__ecere__sys__OldList properties;
429 } __attribute__ ((gcc_struct));
431 static void OutputImports(char * fileName)
433 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__sys__FileOpen(fileName, 2);
439 struct ModuleImport * module;
441 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Imported Modules]\n");
442 for(module = imports.first; module; module = module->next)
444 struct ClassImport * _class;
445 struct FunctionImport * function;
448 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", module->name);
450 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [This]\n");
451 if(module->importType == 1)
452 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Static]\n");
453 else if(module->importType == 2)
454 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Remote]\n");
455 if(module->importAccess == 2)
456 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Private]\n");
458 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Public]\n");
459 if(module->classes.first)
461 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Imported Classes]\n");
462 for(_class = module->classes.first; _class; _class = _class->next)
464 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", _class->name);
467 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Instantiated]\n");
471 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Remote]\n");
473 if(_class->methods.first)
475 struct MethodImport * method;
477 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Imported Methods]\n");
478 for(method = _class->methods.first; method; method = method->next)
480 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", method->name);
481 if(method->isVirtual)
482 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Virtual]\n");
484 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
486 if(_class->properties.first)
488 struct PropertyImport * prop;
490 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Imported Properties]\n");
491 for(prop = _class->properties.first; prop; prop = prop->next)
493 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", prop->name);
495 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Virtual]\n");
497 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Set]\n");
499 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Get]\n");
501 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
504 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
506 if(module->functions.first)
508 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " [Imported Functions]\n");
509 for(function = module->functions.first; function; function = function->next)
511 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " %s\n", function->name);
513 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
516 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " .\n");
519 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
522 struct __ecereNameSpace__ecere__sys__BinaryTree;
524 struct __ecereNameSpace__ecere__sys__BinaryTree
526 struct __ecereNameSpace__ecere__sys__BTNode * root;
528 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
529 void (* FreeKey)(void * key);
530 } __attribute__ ((gcc_struct));
532 struct __ecereNameSpace__ecere__com__NameSpace
535 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
536 struct __ecereNameSpace__ecere__com__NameSpace * left;
537 struct __ecereNameSpace__ecere__com__NameSpace * right;
539 struct __ecereNameSpace__ecere__com__NameSpace * parent;
540 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
541 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
542 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
543 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
544 } __attribute__ ((gcc_struct));
548 struct Context * parent;
549 struct __ecereNameSpace__ecere__sys__BinaryTree types;
550 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
551 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
552 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
555 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
556 struct ClassDefinition * classDef;
557 unsigned int templateTypesOnly;
558 unsigned int hasNameSpace;
559 } __attribute__ ((gcc_struct));
561 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
563 int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * a, const char * b);
565 struct __ecereNameSpace__ecere__com__Application
570 unsigned int isGUIApp;
571 struct __ecereNameSpace__ecere__sys__OldList allModules;
572 char * parsedCommand;
573 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
574 } __attribute__ ((gcc_struct));
576 static struct __ecereNameSpace__ecere__com__NameSpace globalData;
578 extern void FreeGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * globalDataList);
580 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char * argv[]);
582 struct __ecereNameSpace__ecere__com__Method;
584 struct __ecereNameSpace__ecere__com__Method
587 struct __ecereNameSpace__ecere__com__Method * parent;
588 struct __ecereNameSpace__ecere__com__Method * left;
589 struct __ecereNameSpace__ecere__com__Method * right;
594 struct __ecereNameSpace__ecere__com__Class * _class;
596 const char * dataTypeString;
597 struct Type * dataType;
599 } __attribute__ ((gcc_struct));
601 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);
603 struct __ecereNameSpace__ecere__com__Module;
605 struct __ecereNameSpace__ecere__com__Module
607 struct __ecereNameSpace__ecere__com__Instance * application;
608 struct __ecereNameSpace__ecere__sys__OldList classes;
609 struct __ecereNameSpace__ecere__sys__OldList defines;
610 struct __ecereNameSpace__ecere__sys__OldList functions;
611 struct __ecereNameSpace__ecere__sys__OldList modules;
612 struct __ecereNameSpace__ecere__com__Instance * prev;
613 struct __ecereNameSpace__ecere__com__Instance * next;
619 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
620 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
621 } __attribute__ ((gcc_struct));
623 static struct __ecereNameSpace__ecere__com__Instance * privateModule;
625 extern void SetPrivateModule(struct __ecereNameSpace__ecere__com__Instance * module);
630 struct __ecereNameSpace__ecere__sys__BTNode * parent;
631 struct __ecereNameSpace__ecere__sys__BTNode * left;
632 struct __ecereNameSpace__ecere__sys__BTNode * right;
634 struct __ecereNameSpace__ecere__com__Instance * module;
635 char * dataTypeString;
636 struct Type * dataType;
639 char __ecere_padding[40];
640 } __attribute__ ((gcc_struct));
642 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com__eModule_LoadStrict(struct __ecereNameSpace__ecere__com__Instance * fromModule, const char * name, int importAccess);
644 extern void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module);
646 extern void FreeTypeData(struct __ecereNameSpace__ecere__com__Instance * privateModule);
648 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);
650 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
652 void __ecereUnregisterModule_ecc(struct __ecereNameSpace__ecere__com__Instance * module)
657 struct __ecereNameSpace__ecere__com__DataMember;
659 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
665 const char * dataTypeString;
666 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
667 } __attribute__ ((gcc_struct)) __anon1;
668 struct __ecereNameSpace__ecere__com__DataValue expression;
671 const char * memberString;
674 struct __ecereNameSpace__ecere__com__DataMember * member;
675 struct __ecereNameSpace__ecere__com__Property * prop;
676 struct __ecereNameSpace__ecere__com__Method * method;
677 } __attribute__ ((gcc_struct)) __anon1;
678 } __attribute__ ((gcc_struct)) __anon2;
679 } __attribute__ ((gcc_struct)) __anon1;
680 } __attribute__ ((gcc_struct));
682 struct __ecereNameSpace__ecere__com__DataMember
684 struct __ecereNameSpace__ecere__com__DataMember * prev;
685 struct __ecereNameSpace__ecere__com__DataMember * next;
687 unsigned int isProperty;
690 struct __ecereNameSpace__ecere__com__Class * _class;
691 const char * dataTypeString;
692 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
693 struct Type * dataType;
697 struct __ecereNameSpace__ecere__sys__OldList members;
698 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
700 short structAlignment;
701 short pointerAlignment;
702 } __attribute__ ((gcc_struct));
704 struct __ecereNameSpace__ecere__com__Class
706 struct __ecereNameSpace__ecere__com__Class * prev;
707 struct __ecereNameSpace__ecere__com__Class * next;
713 unsigned int (* Constructor)(void * );
714 void (* Destructor)(void * );
717 struct __ecereNameSpace__ecere__com__Class * base;
718 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
719 struct __ecereNameSpace__ecere__sys__BinaryTree members;
720 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
721 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
722 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
723 struct __ecereNameSpace__ecere__sys__OldList derivatives;
727 struct __ecereNameSpace__ecere__com__Instance * module;
728 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
729 const char * dataTypeString;
730 struct Type * dataType;
732 int defaultAlignment;
733 void (* Initialize)();
735 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
736 const char * designerClass;
737 unsigned int noExpansion;
738 const char * defaultProperty;
739 unsigned int comRedefinition;
742 unsigned int internalDecl;
744 unsigned int computeSize;
745 short structAlignment;
746 short pointerAlignment;
747 int destructionWatchOffset;
749 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
750 int inheritanceAccess;
751 const char * fullName;
753 struct __ecereNameSpace__ecere__sys__OldList conversions;
754 struct __ecereNameSpace__ecere__sys__OldList templateParams;
755 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
756 struct __ecereNameSpace__ecere__com__Class * templateClass;
757 struct __ecereNameSpace__ecere__sys__OldList templatized;
759 unsigned int isInstanceClass;
760 unsigned int byValueSystemClass;
761 } __attribute__ ((gcc_struct));
763 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_CompilerApp;
765 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
767 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_GlobalData;
769 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
771 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
773 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ImportedModule;
775 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
777 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
779 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
781 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
783 void __ecereCreateModuleInstances_ecc()
785 globalContext = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
786 (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);
789 void __ecereDestroyModuleInstances_ecc()
791 ((globalContext ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)globalContext) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(globalContext)) : 0), globalContext = 0);
799 struct Symbol * parent;
800 struct Symbol * left;
801 struct Symbol * right;
806 struct __ecereNameSpace__ecere__com__Method * method;
807 struct __ecereNameSpace__ecere__com__Property * _property;
808 struct __ecereNameSpace__ecere__com__Class * registered;
809 } __attribute__ ((gcc_struct)) __anon1;
810 unsigned int notYetDeclared;
815 struct External * pointerExternal;
816 struct External * structExternal;
817 } __attribute__ ((gcc_struct)) __anon1;
820 struct External * externalGet;
821 struct External * externalSet;
822 struct External * externalPtr;
823 struct External * externalIsSet;
824 } __attribute__ ((gcc_struct)) __anon2;
827 struct External * methodExternal;
828 struct External * methodCodeExternal;
829 } __attribute__ ((gcc_struct)) __anon3;
830 } __attribute__ ((gcc_struct)) __anon2;
831 unsigned int imported;
832 unsigned int declaredStructSym;
833 struct __ecereNameSpace__ecere__com__Class * _class;
834 unsigned int declaredStruct;
835 unsigned int needConstructor;
836 unsigned int needDestructor;
837 char * constructorName;
840 char * destructorName;
841 struct ModuleImport * module;
842 struct ClassImport * _import;
843 struct Location nameLoc;
844 unsigned int isParam;
845 unsigned int isRemote;
846 unsigned int isStruct;
847 unsigned int fireWatchersDone;
849 unsigned int classData;
850 unsigned int isStatic;
852 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
853 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
854 struct Context * ctx;
856 struct Expression * propCategory;
857 unsigned int mustRegister;
858 } __attribute__ ((gcc_struct));
860 struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols =
862 0, 0, 0, (unsigned int)(uintptr_t)&((struct Symbol *)(void * )0)->left, 0
865 void __ecereMethod_CompilerApp_Main(struct __ecereNameSpace__ecere__com__Instance * this)
867 char * cppCommand = (((void *)0));
868 char * cppOptions = (((void *)0));
869 int cppOptionsLen = 0;
871 unsigned int valid = 1;
872 char defaultOutputFile[797];
873 unsigned int buildingBootStrap = 0;
874 int targetPlatform = __runtimePlatform;
875 int targetBits = GetHostBits();
878 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++)
880 const char * arg = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c];
884 if(!strcmp(arg + 1, "m32") || !strcmp(arg + 1, "m64"))
886 int newLen = cppOptionsLen + 1 + strlen(arg);
888 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (newLen + 1));
889 cppOptions[cppOptionsLen] = ' ';
890 strcpy(cppOptions + cppOptionsLen + 1, arg);
891 cppOptionsLen = newLen;
892 targetBits = !strcmp(arg + 1, "m32") ? 32 : 64;
894 else if(!strcmp(arg + 1, "t32") || !strcmp(arg + 1, "t64"))
896 targetBits = !strcmp(arg + 1, "t32") ? 32 : 64;
898 else if(arg[1] == 'D' || arg[1] == 'I')
901 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
903 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
904 buf = cppOptions + cppOptionsLen;
907 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
910 if(!strcmp(arg, "-DBUILDING_ECERE_COM"))
911 SetBuildingEcereCom(1);
912 else if(!strcmp(arg, "-DECERE_COM_MODULE"))
913 SetBuildingEcereComModule(1);
914 else if(!strcmp(arg, "-DECERE_BOOTSTRAP"))
915 buildingBootStrap = 1;
918 else if(!strcmp(arg + 1, "t"))
920 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
921 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]);
925 else if(!strcmp(arg + 1, "cpp"))
927 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
928 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]);
932 else if(!strcmp(arg + 1, "o"))
934 if(!GetOutputFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
936 SetOutputFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
942 else if(!strcmp(arg + 1, "c"))
944 if(!GetSourceFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
946 SetSourceFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
952 else if(!strcmp(arg + 1, "isystem") || !strcmp(arg + 1, "isysroot"))
954 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
957 const char * arg1 = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[++c];
958 int size = cppOptionsLen + 1 + strlen(arg) * 2 + strlen(arg1) * 2 + 1;
960 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
961 buf = cppOptions + cppOptionsLen;
963 buf = PassArg(buf, arg);
965 buf = PassArg(buf, arg1);
966 cppOptionsLen = buf - cppOptions;
971 else if(!strcmp(arg + 1, "fno-diagnostics-show-caret"))
974 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
976 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
977 buf = cppOptions + cppOptionsLen;
980 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
982 else if(!strcmp(arg + 1, "symbols"))
984 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
986 SetSymbolsDir(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
992 else if(!strcmp(arg + 1, "module"))
994 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
996 SetI18nModuleName(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
1002 else if(!strcmp(arg + 1, "memguard"))
1006 else if(!strcmp(arg + 1, "defaultns"))
1008 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
1010 SetDefaultNameSpace(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
1016 else if(!strcmp(arg + 1, "strictns"))
1018 SetStrictNameSpaces(1);
1020 else if(!strcmp(arg + 1, "nolinenumbers"))
1022 SetOutputLineNumbers(0);
1031 cppCommand = __ecereNameSpace__ecere__sys__CopyString("gcc");
1032 if(!GetSourceFile())
1034 else if(!GetOutputFile())
1036 strcpy(defaultOutputFile, "");
1037 __ecereNameSpace__ecere__sys__PathCat(defaultOutputFile, GetSourceFile());
1038 __ecereNameSpace__ecere__sys__ChangeExtension(defaultOutputFile, "c", defaultOutputFile);
1039 SetOutputFile(defaultOutputFile);
1044 printf("%s", __ecereNameSpace__ecere__GetTranslatedString("ecc", "Syntax:\n ecc [-t <target platform>] [-cpp <c preprocessor>] [-o <output>] [-module <module>] [-symbols <outputdir>] [-I<includedir>]* [-isystem <sysincludedir>]* [-D<definition>]* -c <input>\n", (((void *)0))));
1048 struct __ecereNameSpace__ecere__com__Instance * cppOutput;
1051 SetGlobalData(&globalData);
1052 SetExcludedSymbols(&_excludedSymbols);
1053 SetGlobalContext(globalContext);
1054 SetCurrentContext(globalContext);
1055 SetTopContext(globalContext);
1056 SetDefines(&defines);
1057 SetImports(&imports);
1059 SetTargetPlatform(targetPlatform);
1060 SetTargetBits(targetBits);
1062 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)));
1063 SetPrivateModule(privateModule);
1064 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1065 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1067 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
1069 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1070 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1072 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint64"), __ecereInstance1->type = ProcessTypeString("unsigned int64", 0), __ecereInstance1;
1074 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1075 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1077 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint32"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
1079 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1080 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1082 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint16"), __ecereInstance1->type = ProcessTypeString("unsigned short", 0), __ecereInstance1;
1084 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1085 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1087 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("byte"), __ecereInstance1->type = ProcessTypeString("unsigned char", 0), __ecereInstance1;
1089 if(buildingBootStrap)
1091 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1092 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1094 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("intptr_t"), __ecereInstance1->type = ProcessTypeString("intptr", 0), __ecereInstance1;
1096 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1097 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1099 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uintptr_t"), __ecereInstance1->type = ProcessTypeString("uintptr", 0), __ecereInstance1;
1101 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1102 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1104 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("ssize_t"), __ecereInstance1->type = ProcessTypeString("intsize", 0), __ecereInstance1;
1106 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
1107 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1109 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("size_t"), __ecereInstance1->type = ProcessTypeString("uintsize", 0), __ecereInstance1;
1113 struct GlobalData * data = (data = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_GlobalData), data->fullName = __ecereNameSpace__ecere__sys__CopyString("__thisModule"), data->dataTypeString = __ecereNameSpace__ecere__sys__CopyString("Module"), data->module = privateModule, data);
1115 data->key = (uintptr_t)data->fullName;
1116 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalData.functions, (struct __ecereNameSpace__ecere__sys__BTNode *)data);
1118 snprintf(command, sizeof (command), "%s%s -x c -E %s\"%s\"", cppCommand, cppOptions ? cppOptions : "", buildingBootStrap ? "" : "-include stdint.h -include sys/types.h ", GetSourceFile());
1119 command[sizeof (command) - 1] = (char)0;
1120 if((cppOutput = __ecereNameSpace__ecere__sys__DualPipeOpen((((unsigned int)(1))), command)))
1123 struct ImportedModule * module;
1124 char sourceFileName[274];
1125 char mainModuleName[274];
1127 struct __ecereNameSpace__ecere__sys__OldList * ast;
1128 struct __ecereNameSpace__ecere__com__Instance * fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
1130 SetFileInput(fileInput);
1131 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&imports, (mainModule = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ModuleImport)));
1132 SetMainModule(mainModule);
1133 __ecereNameSpace__ecere__sys__GetLastDirectory(GetSourceFile(), sourceFileName);
1134 strcpy(mainModuleName, sourceFileName);
1135 __ecereNameSpace__ecere__sys__StripExtension(mainModuleName);
1136 module = __extension__ ({
1137 struct ImportedModule * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ImportedModule);
1139 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(mainModuleName), __ecereInstance1->type = 0, __ecereInstance1;
1141 __ecereMethod___ecereNameSpace__ecere__sys__OldList_AddName(&defines, module);
1143 while(!((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
1144 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
1146 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
1147 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof])(cppOutput))
1150 int count = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))__extension__ ({
1151 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
1153 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
1154 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(cppOutput, junk, 1, 4096);
1156 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void * buffer, unsigned int size, unsigned int count))__extension__ ({
1157 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
1159 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1160 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, junk, 1, count);
1162 exitCode = __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode(cppOutput);
1163 (__ecereNameSpace__ecere__com__eInstance_DecRef(cppOutput), cppOutput = 0);
1164 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
1165 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
1167 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
1168 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
1171 char symLocation[797];
1172 struct ImportedModule * module, * next;
1174 strcpy(symFile, sourceFileName);
1175 __ecereNameSpace__ecere__sys__ChangeExtension(symFile, "sym", symFile);
1176 strcpy(symLocation, GetSymbolsDir());
1177 __ecereNameSpace__ecere__sys__PathCat(symLocation, symFile);
1178 LoadSymbols(symLocation, 3, 0);
1179 for(module = defines.first; module; module = next)
1181 next = module->next;
1182 if(module->type == 0 && (strcasecmp)(module->name, mainModuleName))
1184 (__ecereNameSpace__ecere__com__eSystem_Delete(module->name), module->name = 0);
1185 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Delete(&defines, module);
1188 if(!GetEcereImported() && !GetBuildingEcereCom())
1189 __ecereNameSpace__ecere__com__eModule_LoadStrict(privateModule, "ecereCOM", 1);
1192 CheckDataRedefinitions();
1194 SetCurrentNameSpace((((void *)0)));
1195 SetDefaultNameSpace((((void *)0)));
1197 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
1198 SetFileInput((((void *)0)));
1202 ProcessDBTableDefinitions();
1203 PrePreProcessClassDefinitions();
1204 ComputeModuleClasses(privateModule);
1205 PreProcessClassDefinitions();
1206 ComputeModuleClasses(privateModule);
1207 ProcessClassDefinitions();
1209 ProcessInstantiations();
1210 ProcessMemberAccess();
1211 ProcessInstanceDeclarations();
1212 strcpy(impFile, GetSymbolsDir());
1213 __ecereNameSpace__ecere__sys__PathCat(impFile, sourceFileName);
1214 __ecereNameSpace__ecere__sys__ChangeExtension(impFile, "imp", impFile);
1216 OutputImports(impFile);
1217 if(!((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode)
1219 struct __ecereNameSpace__ecere__com__Instance * output = __ecereNameSpace__ecere__sys__FileOpen(GetOutputFile(), 2);
1223 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "/* Code generated from eC source file: %s */\n", sourceFileName);
1224 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#if defined(_WIN32)\n");
1225 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __runtimePlatform 1\n");
1226 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#elif defined(__APPLE__)\n");
1227 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __runtimePlatform 3\n");
1228 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#else\n");
1229 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __runtimePlatform 2\n");
1230 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1231 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#if defined(__GNUC__)\n");
1232 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef long long int64;\n");
1233 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef unsigned long long uint64;\n");
1234 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#ifndef _WIN32\n");
1235 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __declspec(x)\n");
1236 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1237 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#elif defined(__TINYC__)\n");
1238 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#include <stdarg.h>\n");
1239 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __builtin_va_list va_list\n");
1240 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __builtin_va_start va_start\n");
1241 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __builtin_va_end va_end\n");
1242 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#ifdef _WIN32\n");
1243 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define strcasecmp stricmp\n");
1244 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define strncasecmp strnicmp\n");
1245 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __declspec(x) __attribute__((x))\n");
1246 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#else\n");
1247 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __declspec(x)\n");
1248 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1249 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef long long int64;\n");
1250 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef unsigned long long uint64;\n");
1251 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#else\n");
1252 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef __int64 int64;\n");
1253 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "typedef unsigned __int64 uint64;\n");
1254 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1255 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#ifdef __BIG_ENDIAN__\n");
1256 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __ENDIAN_PAD(x) (8 - (x))\n");
1257 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#else\n");
1258 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#define __ENDIAN_PAD(x) 0\n");
1259 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1260 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#if defined(_WIN32)\n");
1261 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# if defined(__GNUC__) || defined(__TINYC__)\n");
1262 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# define stdcall __attribute__((__stdcall__))\n");
1263 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# else\n");
1264 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# define stdcall __stdcall\n");
1265 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# endif\n");
1266 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#else\n");
1267 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "# define stdcall\n");
1268 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#endif\n");
1269 if(buildingBootStrap)
1271 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#include <stdint.h>\n");
1272 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(output, "#include <sys/types.h>\n");
1275 OutputTree(ast, output);
1276 (__ecereNameSpace__ecere__com__eInstance_DecRef(output), output = 0);
1281 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode = exitCode;
1287 FreeContext(globalContext);
1288 FreeExcludedSymbols(&_excludedSymbols);
1289 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&defines, (void *)(FreeModuleDefine));
1290 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&imports, (void *)(FreeModuleImport));
1291 FreeTypeData(privateModule);
1293 FreeGlobalData(&globalData);
1294 (__ecereNameSpace__ecere__com__eInstance_DecRef(privateModule), privateModule = 0);
1296 (__ecereNameSpace__ecere__com__eSystem_Delete(cppCommand), cppCommand = 0);
1297 (__ecereNameSpace__ecere__com__eSystem_Delete(cppOptions), cppOptions = 0);
1298 SetSymbolsDir((((void *)0)));
1299 OutputIntlStrings();
1302 void __ecereRegisterModule_ecc(struct __ecereNameSpace__ecere__com__Instance * module)
1304 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
1306 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "CompilerApp", "ecere::com::Application", 0, 0, (void *)0, (void *)0, module, 2, 1);
1307 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)
1308 __ecereClass_CompilerApp = class;
1309 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Main", 0, __ecereMethod_CompilerApp_Main, 1);