compiler/libec: Fix for thisclass related warnings in Map.ec
[sdk] / compiler / bootstrap / ecp / bootstrap / ecp.c
1 /* Code generated from eC source file: ecp.ec */
2 #if defined(_WIN32)
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
6 #else
7 #define __runtimePlatform 2
8 #endif
9 #if defined(__GNUC__)
10 typedef long long int64;
11 typedef unsigned long long uint64;
12 #ifndef _WIN32
13 #define __declspec(x)
14 #endif
15 #elif defined(__TINYC__)
16 #include <stdarg.h>
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
20 #ifdef _WIN32
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
24 #else
25 #define __declspec(x)
26 #endif
27 typedef long long int64;
28 typedef unsigned long long uint64;
29 #else
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
32 #endif
33 #ifdef __BIG_ENDIAN__
34 #define __ENDIAN_PAD(x) (8 - (x))
35 #else
36 #define __ENDIAN_PAD(x) 0
37 #endif
38 #include <stdint.h>
39 #include <sys/types.h>
40 enum yytokentype
41 {
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
43 };
44
45 static unsigned int globalInstance = 0;
46
47 static struct Context * globalContext;
48
49 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Platform_char__PTR_;
50
51 struct __ecereNameSpace__ecere__sys__BTNode;
52
53 struct __ecereNameSpace__ecere__sys__OldList
54 {
55 void *  first;
56 void *  last;
57 int count;
58 unsigned int offset;
59 unsigned int circ;
60 } __attribute__ ((gcc_struct));
61
62 struct __ecereNameSpace__ecere__com__DataValue
63 {
64 union
65 {
66 char c;
67 unsigned char uc;
68 short s;
69 unsigned short us;
70 int i;
71 unsigned int ui;
72 void *  p;
73 float f;
74 double d;
75 long long i64;
76 uint64 ui64;
77 } __attribute__ ((gcc_struct)) __anon1;
78 } __attribute__ ((gcc_struct));
79
80 struct __ecereNameSpace__ecere__com__SerialBuffer
81 {
82 unsigned char *  _buffer;
83 unsigned int count;
84 unsigned int _size;
85 unsigned int pos;
86 } __attribute__ ((gcc_struct));
87
88 extern void *  __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
89
90 extern void *  __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
91
92 extern void *  __ecereNameSpace__ecere__com__eSystem_Renew(void *  memory, unsigned int size);
93
94 extern void *  __ecereNameSpace__ecere__com__eSystem_Renew0(void *  memory, unsigned int size);
95
96 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void *  memory);
97
98 struct Initializer;
99
100 struct TypeName;
101
102 struct Statement;
103
104 struct Attrib;
105
106 struct ExtDecl;
107
108 struct Attribute;
109
110 struct MembersInit;
111
112 struct MemberInit;
113
114 struct PropertyWatch;
115
116 struct DBTableDef;
117
118 struct CodePosition
119 {
120 int line;
121 int charPos;
122 int pos;
123 int included;
124 } __attribute__ ((gcc_struct));
125
126 struct ModuleImport;
127
128 struct ClassImport;
129
130 extern char *  __ecereNameSpace__ecere__sys__CopyString(const char *  string);
131
132 extern int strtol(const char * , char * * , int base);
133
134 extern char *  strcpy(char * , const char * );
135
136 extern char *  strcat(char * , const char * );
137
138 extern void SetParsingType(unsigned int b);
139
140 extern int strcmp(const char * , const char * );
141
142 extern char *  PrintInt64(long long result);
143
144 extern int printf(const char * , ...);
145
146 extern const char *  __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char *  string, const char *  stringAndContext);
147
148 struct __ecereNameSpace__ecere__com__LinkList
149 {
150 void * first;
151 void * last;
152 int count;
153 } __attribute__ ((gcc_struct));
154
155 extern void SetCurrentNameSpace(const char *  s);
156
157 extern void __ecereNameSpace__ecere__sys__ChangeCh(char *  string, char ch1, char ch2);
158
159 extern int GetHostBits(void);
160
161 extern size_t strlen(const char * );
162
163 extern char *  PassArg(char *  output, const char *  input);
164
165 extern const char *  GetOutputFile(void);
166
167 extern void SetOutputFile(const char *  s);
168
169 extern const char *  GetSourceFile(void);
170
171 extern void SetSourceFile(const char *  s);
172
173 extern void SetSymbolsDir(const char *  s);
174
175 extern void SetDefaultNameSpace(const char *  s);
176
177 extern void SetStrictNameSpaces(unsigned int b);
178
179 extern void SetI18nModuleName(const char *  s);
180
181 extern const char *  GetSymbolsDir(void);
182
183 extern char *  __ecereNameSpace__ecere__sys__PathCat(char *  string, const char *  addedPath);
184
185 extern char *  __ecereNameSpace__ecere__sys__ChangeExtension(const char *  string, const char *  ext, char *  output);
186
187 extern void SetInPreCompiler(unsigned int b);
188
189 extern void SetTargetPlatform(int platform);
190
191 extern void SetTargetBits(int bits);
192
193 extern void SetEchoOn(unsigned int b);
194
195 extern unsigned int __ecereNameSpace__ecere__sys__FileExists(const char *  fileName);
196
197 extern unsigned int __ecereNameSpace__ecere__sys__DeleteFile(const char *  fileName);
198
199 extern int snprintf(char * , size_t, const char * , ...);
200
201 extern void resetScanner(void);
202
203 extern void ParseEc(void);
204
205 extern void SetYydebug(unsigned int b);
206
207 extern void ProcessDBTableDefinitions(void);
208
209 extern void FreeIncludeFiles(void);
210
211 struct __ecereNameSpace__ecere__com__GlobalFunction;
212
213 const char *  __ecereProp___ecereNameSpace__ecere__com__Platform_Get_char__PTR_(int this);
214
215 int __ecereProp___ecereNameSpace__ecere__com__Platform_Set_char__PTR_(const char *  value);
216
217 static struct __ecereNameSpace__ecere__sys__OldList defines, imports, precompDefines;
218
219 extern struct __ecereNameSpace__ecere__sys__OldList *  MkListOne(void *  item);
220
221 extern struct __ecereNameSpace__ecere__sys__OldList *  GetAST(void);
222
223 struct __ecereNameSpace__ecere__com__EnumClassData
224 {
225 struct __ecereNameSpace__ecere__sys__OldList values;
226 long long largest;
227 } __attribute__ ((gcc_struct));
228
229 extern void SetExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList *  list);
230
231 extern void SetDefines(struct __ecereNameSpace__ecere__sys__OldList *  list);
232
233 extern void SetImports(struct __ecereNameSpace__ecere__sys__OldList *  list);
234
235 extern void SetPrecompDefines(struct __ecereNameSpace__ecere__sys__OldList *  list);
236
237 extern void FreeASTTree(struct __ecereNameSpace__ecere__sys__OldList * ast);
238
239 extern void FreeExcludedSymbols(struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols);
240
241 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(struct __ecereNameSpace__ecere__sys__OldList * this, void (*  freeFn)(void * ));
242
243 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void *  item);
244
245 struct Location
246 {
247 struct CodePosition start;
248 struct CodePosition end;
249 } __attribute__ ((gcc_struct));
250
251 extern void SetMainModule(struct ModuleImport * moduleImport);
252
253 extern void FreeModuleImport(struct ModuleImport * imp);
254
255 extern struct Location yylloc;
256
257 struct Definition;
258
259 struct ClassDefine
260 {
261 struct Definition * prev;
262 struct Definition * next;
263 char *  name;
264 int type;
265 char * base;
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;
271 unsigned int fixed;
272 unsigned int isStatic;
273 unsigned int noExpansion;
274 } __attribute__ ((gcc_struct));
275
276 struct FunctionDefine
277 {
278 struct Definition * prev;
279 struct Definition * next;
280 char *  name;
281 int type;
282 char * dataType;
283 } __attribute__ ((gcc_struct));
284
285 struct DataDefine
286 {
287 struct Definition * prev;
288 struct Definition * next;
289 char *  name;
290 int type;
291 char * dataType;
292 } __attribute__ ((gcc_struct));
293
294 struct Definition
295 {
296 struct Definition * prev;
297 struct Definition * next;
298 char *  name;
299 int type;
300 } __attribute__ ((gcc_struct));
301
302 extern void FreeModuleDefine(struct Definition * def);
303
304 void FreeDataDefine(struct DataDefine * data)
305 {
306 (__ecereNameSpace__ecere__com__eSystem_Delete(data->name), data->name = 0);
307 (__ecereNameSpace__ecere__com__eSystem_Delete(data->dataType), data->dataType = 0);
308 }
309
310 struct MethodDefine;
311
312 struct MethodDefine
313 {
314 struct MethodDefine * prev, * next;
315 char * name;
316 int memberAccess;
317 char * type;
318 unsigned int isVirtual;
319 } __attribute__ ((gcc_struct));
320
321 void FreeMethodDefine(struct MethodDefine * method)
322 {
323 (__ecereNameSpace__ecere__com__eSystem_Delete(method->name), method->name = 0);
324 (__ecereNameSpace__ecere__com__eSystem_Delete(method->type), method->type = 0);
325 }
326
327 struct PropertyDefine;
328
329 struct PropertyDefine
330 {
331 struct PropertyDefine * prev, * next;
332 char * name;
333 int isProperty;
334 char * type;
335 unsigned int isWatchable;
336 int memberAccess;
337 unsigned int isVirtual;
338 unsigned int hasSet, hasGet;
339 } __attribute__ ((gcc_struct));
340
341 struct __ecereNameSpace__ecere__com__Class;
342
343 struct __ecereNameSpace__ecere__com__Instance
344 {
345 void * *  _vTbl;
346 struct __ecereNameSpace__ecere__com__Class * _class;
347 int _refCount;
348 } __attribute__ ((gcc_struct));
349
350 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name);
351
352 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, long long value);
353
354 extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, const char *  string, long long value);
355
356 extern long long __ecereNameSpace__ecere__com__eEnum_AddValue(struct __ecereNameSpace__ecere__com__Class * _class, const char *  string);
357
358 extern void *  __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
359
360 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char *  name, void *  function);
361
362 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
363
364 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__FileOpen(const char *  fileName, int mode);
365
366 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__sys__DualPipeOpen(unsigned int mode, const char *  commandLine);
367
368 extern void SetFileInput(struct __ecereNameSpace__ecere__com__Instance * file);
369
370 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, const char *  format, ...);
371
372 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
373
374 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
375
376 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof;
377
378 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
379
380 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Write;
381
382 int __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode();
383
384 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
385
386 struct __ecereNameSpace__ecere__com__Property;
387
388 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
389
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);
391
392 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void *  instance, struct __ecereNameSpace__ecere__com__Property * _property, void *  object, void (*  callback)(void * , void * ));
393
394 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
395
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);
397
398 struct Declarator;
399
400 extern char *  StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
401
402 struct TemplateDatatype
403 {
404 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
405 struct Declarator * decl;
406 } __attribute__ ((gcc_struct));
407
408 struct Expression;
409
410 struct Define
411 {
412 struct Definition * prev;
413 struct Definition * next;
414 char *  name;
415 int type;
416 struct Expression * exp;
417 } __attribute__ ((gcc_struct));
418
419 extern void ProcessExpressionType(struct Expression * exp);
420
421 extern void ComputeExpression(struct Expression * exp);
422
423 extern void FreeExpression(struct Expression * exp);
424
425 extern void FreeExpContents(struct Expression * exp);
426
427 extern void PrintExpression(struct Expression * exp, char *  string);
428
429 extern void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f);
430
431 struct Type;
432
433 struct __ecereNameSpace__ecere__com__Property
434 {
435 struct __ecereNameSpace__ecere__com__Property * prev;
436 struct __ecereNameSpace__ecere__com__Property * next;
437 const char *  name;
438 unsigned int isProperty;
439 int memberAccess;
440 int id;
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 * );
448 void *  data;
449 void *  symbol;
450 int vid;
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));
458
459 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
460
461 extern void PrintType(struct Type * type, char *  string, unsigned int printName, unsigned int fullName);
462
463 extern void FreeType(struct Type * type);
464
465 extern struct Type * ProcessTypeString(const char *  string, unsigned int staticMethod);
466
467 struct __ecereNameSpace__ecere__com__DataMember;
468
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);
470
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);
472
473 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_New(int type, int declMode);
474
475 extern unsigned int __ecereNameSpace__ecere__com__eMember_AddMember(struct __ecereNameSpace__ecere__com__DataMember * addTo, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
476
477 extern unsigned int __ecereNameSpace__ecere__com__eClass_AddMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
478
479 struct __ecereNameSpace__ecere__sys__NamedLink64;
480
481 struct __ecereNameSpace__ecere__sys__NamedLink64
482 {
483 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
484 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
485 char *  name;
486 long long data;
487 } __attribute__ ((gcc_struct));
488
489 struct Symbol;
490
491 extern struct Symbol * FindClass(const char *  name);
492
493 struct ImportedModule;
494
495 struct ImportedModule
496 {
497 struct ImportedModule * prev;
498 struct ImportedModule * next;
499 char *  name;
500 int type;
501 int importType;
502 unsigned int globalInstance;
503 unsigned int dllOnly;
504 int importAccess;
505 } __attribute__ ((gcc_struct));
506
507 struct __ecereNameSpace__ecere__com__NameSpace;
508
509 extern void SetGlobalData(struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace);
510
511 struct Context;
512
513 extern void SetGlobalContext(struct Context * context);
514
515 extern void SetCurrentContext(struct Context * context);
516
517 extern void SetTopContext(struct Context * context);
518
519 extern void FreeContext(struct Context * context);
520
521 struct __ecereNameSpace__ecere__sys__BinaryTree;
522
523 struct __ecereNameSpace__ecere__sys__BinaryTree
524 {
525 struct __ecereNameSpace__ecere__sys__BTNode * root;
526 int count;
527 int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
528 void (*  FreeKey)(void *  key);
529 } __attribute__ ((gcc_struct));
530
531 struct __ecereNameSpace__ecere__com__NameSpace
532 {
533 const char *  name;
534 struct __ecereNameSpace__ecere__com__NameSpace *  btParent;
535 struct __ecereNameSpace__ecere__com__NameSpace *  left;
536 struct __ecereNameSpace__ecere__com__NameSpace *  right;
537 int depth;
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));
544
545 struct __ecereNameSpace__ecere__com__DataMember
546 {
547 struct __ecereNameSpace__ecere__com__DataMember * prev;
548 struct __ecereNameSpace__ecere__com__DataMember * next;
549 const char *  name;
550 unsigned int isProperty;
551 int memberAccess;
552 int id;
553 struct __ecereNameSpace__ecere__com__Class * _class;
554 const char *  dataTypeString;
555 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
556 struct Type * dataType;
557 int type;
558 int offset;
559 int memberID;
560 struct __ecereNameSpace__ecere__sys__OldList members;
561 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
562 int memberOffset;
563 short structAlignment;
564 short pointerAlignment;
565 } __attribute__ ((gcc_struct));
566
567 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
568
569 int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_CompareString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char *  a, const char *  b);
570
571 struct __ecereNameSpace__ecere__com__Application
572 {
573 int argc;
574 const char * *  argv;
575 int exitCode;
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));
581
582 static struct __ecereNameSpace__ecere__com__NameSpace globalData;
583
584 extern void FreeGlobalData(struct __ecereNameSpace__ecere__com__NameSpace * globalDataList);
585
586 extern struct __ecereNameSpace__ecere__com__Instance * __ecereNameSpace__ecere__com____ecere_COM_Initialize(unsigned int guiApp, int argc, char *  argv[]);
587
588 struct DataMemberDefine;
589
590 struct DataMemberDefine
591 {
592 struct DataMemberDefine * prev, * next;
593 char * name;
594 int isProperty;
595 char * type;
596 struct __ecereNameSpace__ecere__sys__OldList dataMembers;
597 struct __ecereNameSpace__ecere__sys__OldList classProperties;
598 int memberAccess;
599 int memberType;
600 int size, bitPos;
601 } __attribute__ ((gcc_struct));
602
603 void FreeDataMemberDefine(struct DataMemberDefine * dataMember)
604 {
605 (__ecereNameSpace__ecere__com__eSystem_Delete(dataMember->name), dataMember->name = 0);
606 (__ecereNameSpace__ecere__com__eSystem_Delete(dataMember->type), dataMember->type = 0);
607 }
608
609 void FreeDefinition(struct Definition * definition)
610 {
611 (__ecereNameSpace__ecere__com__eSystem_Delete(definition->name), definition->name = 0);
612 switch(definition->type)
613 {
614 case 1:
615 {
616 struct ClassDefine * classDefine = (struct ClassDefine *)definition;
617
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));
621 break;
622 }
623 case 3:
624 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct FunctionDefine *)definition)->dataType), ((struct FunctionDefine *)definition)->dataType = 0);
625 break;
626 case 4:
627 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct DataDefine *)definition)->dataType), ((struct DataDefine *)definition)->dataType = 0);
628 break;
629 case 2:
630 break;
631 }
632 }
633
634 struct ClassDef;
635
636 struct __ecereNameSpace__ecere__com__BitMember;
637
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);
639
640 struct __ecereNameSpace__ecere__com__BitMember
641 {
642 struct __ecereNameSpace__ecere__com__BitMember * prev;
643 struct __ecereNameSpace__ecere__com__BitMember * next;
644 const char *  name;
645 unsigned int isProperty;
646 int memberAccess;
647 int id;
648 struct __ecereNameSpace__ecere__com__Class * _class;
649 const char *  dataTypeString;
650 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
651 struct Type * dataType;
652 int type;
653 int size;
654 int pos;
655 uint64 mask;
656 } __attribute__ ((gcc_struct));
657
658 struct __ecereNameSpace__ecere__com__ClassProperty;
659
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);
661
662 struct __ecereNameSpace__ecere__com__ClassProperty
663 {
664 const char *  name;
665 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
666 struct __ecereNameSpace__ecere__com__ClassProperty * left;
667 struct __ecereNameSpace__ecere__com__ClassProperty * right;
668 int depth;
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));
675
676 struct __ecereNameSpace__ecere__com__Method;
677
678 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
679 {
680 union
681 {
682 struct
683 {
684 const char *  dataTypeString;
685 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
686 } __attribute__ ((gcc_struct)) __anon1;
687 struct __ecereNameSpace__ecere__com__DataValue expression;
688 struct
689 {
690 const char *  memberString;
691 union
692 {
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));
700
701 struct __ecereNameSpace__ecere__com__Method
702 {
703 const char *  name;
704 struct __ecereNameSpace__ecere__com__Method * parent;
705 struct __ecereNameSpace__ecere__com__Method * left;
706 struct __ecereNameSpace__ecere__com__Method * right;
707 int depth;
708 int (*  function)();
709 int vid;
710 int type;
711 struct __ecereNameSpace__ecere__com__Class * _class;
712 void *  symbol;
713 const char *  dataTypeString;
714 struct Type * dataType;
715 int memberAccess;
716 } __attribute__ ((gcc_struct));
717
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);
719
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);
721
722 struct __ecereNameSpace__ecere__com__Module;
723
724 struct __ecereNameSpace__ecere__com__Module
725 {
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;
733 const char *  name;
734 void *  library;
735 void *  Unload;
736 int importType;
737 int origImportType;
738 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
739 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
740 } __attribute__ ((gcc_struct));
741
742 struct __ecereNameSpace__ecere__com__Class
743 {
744 struct __ecereNameSpace__ecere__com__Class * prev;
745 struct __ecereNameSpace__ecere__com__Class * next;
746 const char *  name;
747 int offset;
748 int structSize;
749 void * *  _vTbl;
750 int vTblSize;
751 unsigned int (*  Constructor)(void * );
752 void (*  Destructor)(void * );
753 int offsetClass;
754 int sizeClass;
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;
762 int memberID;
763 int startMemberID;
764 int type;
765 struct __ecereNameSpace__ecere__com__Instance * module;
766 struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
767 const char *  dataTypeString;
768 struct Type * dataType;
769 int typeSize;
770 int defaultAlignment;
771 void (*  Initialize)();
772 int memberOffset;
773 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
774 const char *  designerClass;
775 unsigned int noExpansion;
776 const char *  defaultProperty;
777 unsigned int comRedefinition;
778 int count;
779 int isRemote;
780 unsigned int internalDecl;
781 void *  data;
782 unsigned int computeSize;
783 short structAlignment;
784 short pointerAlignment;
785 int destructionWatchOffset;
786 unsigned int fixed;
787 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
788 int inheritanceAccess;
789 const char *  fullName;
790 void *  symbol;
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;
796 int numParams;
797 unsigned int isInstanceClass;
798 unsigned int byValueSystemClass;
799 } __attribute__ ((gcc_struct));
800
801 static struct __ecereNameSpace__ecere__com__Instance * privateModule;
802
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);
804
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);
806
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);
808
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);
810
811 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
812
813 extern void ComputeModuleClasses(struct __ecereNameSpace__ecere__com__Instance * module);
814
815 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char *  name);
816
817 extern void SetPrivateModule(struct __ecereNameSpace__ecere__com__Instance * module);
818
819 extern void FreeTypeData(struct __ecereNameSpace__ecere__com__Instance * privateModule);
820
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);
822
823 void __ecereUnregisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module)
824 {
825
826 }
827
828 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefine;
829
830 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_Define;
831
832 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefine;
833
834 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_DataDefine;
835
836 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_MethodDefine;
837
838 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDefine;
839
840 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_DataMemberDefine;
841
842 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_PrecompApp;
843
844 static void OutputDataMembers(struct ClassDefine * classDefine, struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Instance * f)
845 {
846 if(classDefine->propertiesAndMembers.first)
847 {
848 struct DataMemberDefine * member = classDefine->propertiesAndMembers.first;
849 int last = 0;
850
851 for(member = classDefine->propertiesAndMembers.first; member; member = member->next)
852 {
853 if(member->isProperty == 1)
854 {
855 struct PropertyDefine * prop = (struct PropertyDefine *)member;
856
857 if(last != 1)
858 {
859 if(last)
860 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         .\n");
861 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Defined Properties]\n");
862 }
863 if(prop->name)
864 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         %s\n", prop->name);
865 else
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");
869 else
870 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Private]\n");
871 if(prop->isVirtual)
872 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Virtual]\n");
873 if(prop->hasSet)
874 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Set]\n");
875 if(prop->hasGet)
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 : "");
881 }
882 else
883 {
884 if(last != 3)
885 {
886 if(last)
887 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         .\n");
888 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Defined Data Members]\n");
889 }
890 if(member->memberType == 0)
891 {
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");
895 else
896 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Private]\n");
897 if(_class && _class->type == 2)
898 {
899 if(member->size)
900 {
901 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Size]\n");
902 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               %d\n", member->size);
903 }
904 if(member->bitPos != -1)
905 {
906 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Pos]\n");
907 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               %d\n", member->bitPos);
908 }
909 }
910 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Type]\n");
911 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               %s\n", member->type ? member->type : "");
912 }
913 else
914 {
915 if(member->memberAccess == 1)
916 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Public]\n");
917 else
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);
921 }
922 }
923 last = member->isProperty;
924 }
925 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         .\n");
926 }
927 if(classDefine->classProperties.first)
928 {
929 struct PropertyDefine * prop = classDefine->propertiesAndMembers.first;
930
931 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Defined Class Properties]\n");
932 for(prop = classDefine->classProperties.first; prop; prop = prop->next)
933 {
934 if(prop->name)
935 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         %s\n", prop->name);
936 if(prop->hasSet)
937 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Set]\n");
938 if(prop->hasGet)
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 : "");
942 }
943 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         .\n");
944 }
945 }
946
947 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
948
949 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
950
951 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
952
953 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
954
955 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
956
957 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
958
959 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__File;
960
961 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__DualPipe;
962
963 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
964
965 void __ecereCreateModuleInstances_ecp()
966 {
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);
969 }
970
971 void __ecereDestroyModuleInstances_ecp()
972 {
973 ((globalContext ? (__ecereClass_Context->Destructor ? __ecereClass_Context->Destructor((void *)globalContext) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(globalContext)) : 0), globalContext = 0);
974 }
975
976 struct Identifier;
977
978 extern struct Identifier * GetDeclId(struct Declarator * decl);
979
980 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
981
982 struct InitDeclarator;
983
984 struct InitDeclarator
985 {
986 struct InitDeclarator * prev;
987 struct InitDeclarator * next;
988 struct Location loc;
989 struct Declarator * declarator;
990 struct Initializer * initializer;
991 } __attribute__ ((gcc_struct));
992
993 struct Operand;
994
995 struct OpTable
996 {
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));
1033
1034 struct Operand
1035 {
1036 int kind;
1037 struct Type * type;
1038 unsigned int ptrSize;
1039 union
1040 {
1041 char c;
1042 unsigned char uc;
1043 short s;
1044 unsigned short us;
1045 int i;
1046 unsigned int ui;
1047 float f;
1048 double d;
1049 long long i64;
1050 uint64 ui64;
1051 } __attribute__ ((gcc_struct)) __anon1;
1052 struct OpTable ops;
1053 } __attribute__ ((gcc_struct));
1054
1055 extern struct Operand GetOperand(struct Expression * exp);
1056
1057 struct Instantiation;
1058
1059 struct ClassFunction;
1060
1061 struct ClassFunction
1062 {
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;
1072 int declMode;
1073 struct Type * type;
1074 struct Symbol * propSet;
1075 unsigned int isVirtual;
1076 unsigned int isConstructor;
1077 unsigned int isDestructor;
1078 unsigned int dontMangle;
1079 int id;
1080 int idCode;
1081 } __attribute__ ((gcc_struct));
1082
1083 struct ClassDefinition;
1084
1085 struct Context
1086 {
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;
1092 int nextID;
1093 int simpleID;
1094 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
1095 struct ClassDefinition * classDef;
1096 unsigned int templateTypesOnly;
1097 unsigned int hasNameSpace;
1098 } __attribute__ ((gcc_struct));
1099
1100 struct FunctionDefinition;
1101
1102 struct FunctionDefinition
1103 {
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;
1113 int declMode;
1114 struct Type * type;
1115 struct Symbol * propSet;
1116 int tempCount;
1117 unsigned int propertyNoThis;
1118 } __attribute__ ((gcc_struct));
1119
1120 struct External;
1121
1122 struct Symbol
1123 {
1124 char *  string;
1125 struct Symbol * parent;
1126 struct Symbol * left;
1127 struct Symbol * right;
1128 int depth;
1129 struct Type * type;
1130 union
1131 {
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;
1137 union
1138 {
1139 struct
1140 {
1141 struct External * pointerExternal;
1142 struct External * structExternal;
1143 } __attribute__ ((gcc_struct)) __anon1;
1144 struct
1145 {
1146 struct External * externalGet;
1147 struct External * externalSet;
1148 struct External * externalPtr;
1149 struct External * externalIsSet;
1150 } __attribute__ ((gcc_struct)) __anon2;
1151 struct
1152 {
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;
1164 char *  structName;
1165 char *  className;
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;
1174 int declaring;
1175 unsigned int classData;
1176 unsigned int isStatic;
1177 char *  shortName;
1178 struct __ecereNameSpace__ecere__sys__OldList *  templateParams;
1179 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
1180 struct Context * ctx;
1181 int isIterator;
1182 struct Expression * propCategory;
1183 } __attribute__ ((gcc_struct));
1184
1185 struct __ecereNameSpace__ecere__sys__OldList _excludedSymbols =
1186 {
1187 0, 0, 0, (unsigned int)(uintptr_t)&((struct Symbol *)(void * )0)->left, 0
1188 };
1189
1190 struct TemplateParameter;
1191
1192 struct Type
1193 {
1194 struct Type * prev;
1195 struct Type * next;
1196 int refCount;
1197 union
1198 {
1199 struct Symbol * _class;
1200 struct
1201 {
1202 struct __ecereNameSpace__ecere__sys__OldList members;
1203 char *  enumName;
1204 } __attribute__ ((gcc_struct)) __anon1;
1205 struct
1206 {
1207 struct Type * returnType;
1208 struct __ecereNameSpace__ecere__sys__OldList params;
1209 struct Symbol * thisClass;
1210 unsigned int staticMethod;
1211 struct TemplateParameter * thisClassTemplate;
1212 } __attribute__ ((gcc_struct)) __anon2;
1213 struct
1214 {
1215 struct __ecereNameSpace__ecere__com__Method * method;
1216 struct __ecereNameSpace__ecere__com__Class * methodClass;
1217 struct __ecereNameSpace__ecere__com__Class * usedClass;
1218 } __attribute__ ((gcc_struct)) __anon3;
1219 struct
1220 {
1221 struct Type * arrayType;
1222 int arraySize;
1223 struct Expression * arraySizeExp;
1224 unsigned int freeExp;
1225 struct Symbol * enumClass;
1226 } __attribute__ ((gcc_struct)) __anon4;
1227 struct Type * type;
1228 struct TemplateParameter * templateParameter;
1229 } __attribute__ ((gcc_struct)) __anon1;
1230 int kind;
1231 unsigned int size;
1232 char *  name;
1233 char *  typeName;
1234 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1235 int classObjectType;
1236 int alignment;
1237 unsigned int offset;
1238 int bitFieldCount;
1239 int count;
1240 unsigned int isSigned : 1;
1241 unsigned int constant : 1;
1242 unsigned int truth : 1;
1243 unsigned int byReference : 1;
1244 unsigned int extraParam : 1;
1245 unsigned int directClassAccess : 1;
1246 unsigned int computing : 1;
1247 unsigned int keepCast : 1;
1248 unsigned int passAsTemplate : 1;
1249 unsigned int dllExport : 1;
1250 unsigned int attrStdcall : 1;
1251 unsigned int declaredWithStruct : 1;
1252 unsigned int typedByReference : 1;
1253 unsigned int casted : 1;
1254 unsigned int pointerAlignment : 1;
1255 } __attribute__ ((gcc_struct));
1256
1257 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
1258
1259 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);
1260
1261 struct __ecereNameSpace__ecere__com__ClassTemplateParameter
1262 {
1263 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * prev;
1264 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * next;
1265 const char *  name;
1266 int type;
1267 union
1268 {
1269 const char *  dataTypeString;
1270 int memberType;
1271 } __attribute__ ((gcc_struct)) __anon1;
1272 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg;
1273 void *  param;
1274 } __attribute__ ((gcc_struct));
1275
1276 void __ecereMethod_PrecompApp_Main(struct __ecereNameSpace__ecere__com__Instance *  this);
1277
1278 struct Specifier;
1279
1280 struct Declarator
1281 {
1282 struct Declarator * prev;
1283 struct Declarator * next;
1284 struct Location loc;
1285 int type;
1286 struct Symbol * symbol;
1287 struct Declarator * declarator;
1288 union
1289 {
1290 struct Identifier * identifier;
1291 struct
1292 {
1293 struct Expression * exp;
1294 struct Expression * posExp;
1295 struct Attrib * attrib;
1296 } __attribute__ ((gcc_struct)) structDecl;
1297 struct
1298 {
1299 struct Expression * exp;
1300 struct Specifier * enumClass;
1301 } __attribute__ ((gcc_struct)) array;
1302 struct
1303 {
1304 struct __ecereNameSpace__ecere__sys__OldList * parameters;
1305 } __attribute__ ((gcc_struct)) function;
1306 struct
1307 {
1308 struct __ecereNameSpace__ecere__com__Instance * pointer;
1309 } __attribute__ ((gcc_struct)) pointer;
1310 struct
1311 {
1312 struct ExtDecl * extended;
1313 } __attribute__ ((gcc_struct)) extended;
1314 } __attribute__ ((gcc_struct)) __anon1;
1315 } __attribute__ ((gcc_struct));
1316
1317 struct Identifier
1318 {
1319 struct Identifier * prev;
1320 struct Identifier * next;
1321 struct Location loc;
1322 struct Symbol * classSym;
1323 struct Specifier * _class;
1324 char *  string;
1325 struct Identifier * badID;
1326 } __attribute__ ((gcc_struct));
1327
1328 struct Expression
1329 {
1330 struct Expression * prev;
1331 struct Expression * next;
1332 struct Location loc;
1333 int type;
1334 union
1335 {
1336 struct
1337 {
1338 char *  constant;
1339 struct Identifier * identifier;
1340 } __attribute__ ((gcc_struct)) __anon1;
1341 struct Statement * compound;
1342 struct Instantiation * instance;
1343 struct
1344 {
1345 char *  string;
1346 unsigned int intlString;
1347 unsigned int wideString;
1348 } __attribute__ ((gcc_struct)) __anon2;
1349 struct __ecereNameSpace__ecere__sys__OldList *  list;
1350 struct
1351 {
1352 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1353 struct Declarator * decl;
1354 } __attribute__ ((gcc_struct)) _classExp;
1355 struct
1356 {
1357 struct Identifier * id;
1358 } __attribute__ ((gcc_struct)) classData;
1359 struct
1360 {
1361 struct Expression * exp;
1362 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1363 struct Location argLoc;
1364 } __attribute__ ((gcc_struct)) call;
1365 struct
1366 {
1367 struct Expression * exp;
1368 struct __ecereNameSpace__ecere__sys__OldList * index;
1369 } __attribute__ ((gcc_struct)) index;
1370 struct
1371 {
1372 struct Expression * exp;
1373 struct Identifier * member;
1374 int memberType;
1375 unsigned int thisPtr;
1376 } __attribute__ ((gcc_struct)) member;
1377 struct
1378 {
1379 int op;
1380 struct Expression * exp1;
1381 struct Expression * exp2;
1382 } __attribute__ ((gcc_struct)) op;
1383 struct TypeName * typeName;
1384 struct Specifier * _class;
1385 struct
1386 {
1387 struct TypeName * typeName;
1388 struct Expression * exp;
1389 } __attribute__ ((gcc_struct)) cast;
1390 struct
1391 {
1392 struct Expression * cond;
1393 struct __ecereNameSpace__ecere__sys__OldList * exp;
1394 struct Expression * elseExp;
1395 } __attribute__ ((gcc_struct)) cond;
1396 struct
1397 {
1398 struct TypeName * typeName;
1399 struct Expression * size;
1400 } __attribute__ ((gcc_struct)) _new;
1401 struct
1402 {
1403 struct TypeName * typeName;
1404 struct Expression * size;
1405 struct Expression * exp;
1406 } __attribute__ ((gcc_struct)) _renew;
1407 struct
1408 {
1409 char * table;
1410 struct Identifier * id;
1411 } __attribute__ ((gcc_struct)) db;
1412 struct
1413 {
1414 struct Expression * ds;
1415 struct Expression * name;
1416 } __attribute__ ((gcc_struct)) dbopen;
1417 struct
1418 {
1419 struct TypeName * typeName;
1420 struct Initializer * initializer;
1421 } __attribute__ ((gcc_struct)) initializer;
1422 struct
1423 {
1424 struct Expression * exp;
1425 struct TypeName * typeName;
1426 } __attribute__ ((gcc_struct)) vaArg;
1427 } __attribute__ ((gcc_struct)) __anon1;
1428 unsigned int debugValue;
1429 struct __ecereNameSpace__ecere__com__DataValue val;
1430 uint64 address;
1431 unsigned int hasAddress;
1432 struct Type * expType;
1433 struct Type * destType;
1434 unsigned int usage;
1435 int tempCount;
1436 unsigned int byReference;
1437 unsigned int isConstant;
1438 unsigned int addedThis;
1439 unsigned int needCast;
1440 unsigned int thisPtr;
1441 unsigned int opDestType;
1442 unsigned int needTemplateCast;
1443 } __attribute__ ((gcc_struct));
1444
1445 struct Specifier
1446 {
1447 struct Specifier * prev;
1448 struct Specifier * next;
1449 struct Location loc;
1450 int type;
1451 union
1452 {
1453 int specifier;
1454 struct
1455 {
1456 struct ExtDecl * extDecl;
1457 char *  name;
1458 struct Symbol * symbol;
1459 struct __ecereNameSpace__ecere__sys__OldList *  templateArgs;
1460 } __attribute__ ((gcc_struct)) __anon1;
1461 struct
1462 {
1463 struct Identifier * id;
1464 struct __ecereNameSpace__ecere__sys__OldList *  list;
1465 struct __ecereNameSpace__ecere__sys__OldList *  baseSpecs;
1466 struct __ecereNameSpace__ecere__sys__OldList *  definitions;
1467 unsigned int addNameSpace;
1468 struct Context * ctx;
1469 struct ExtDecl * extDeclStruct;
1470 } __attribute__ ((gcc_struct)) __anon2;
1471 struct Expression * expression;
1472 struct Specifier * _class;
1473 struct TemplateParameter * templateParameter;
1474 } __attribute__ ((gcc_struct)) __anon1;
1475 } __attribute__ ((gcc_struct));
1476
1477 struct Instantiation
1478 {
1479 struct Instantiation * prev;
1480 struct Instantiation * next;
1481 struct Location loc;
1482 struct Specifier * _class;
1483 struct Expression * exp;
1484 struct __ecereNameSpace__ecere__sys__OldList *  members;
1485 struct Symbol * symbol;
1486 unsigned int fullSet;
1487 unsigned int isConstant;
1488 unsigned char *  data;
1489 struct Location nameLoc;
1490 struct Location insideLoc;
1491 unsigned int built;
1492 } __attribute__ ((gcc_struct));
1493
1494 struct ClassDefinition
1495 {
1496 struct ClassDefinition * prev;
1497 struct ClassDefinition * next;
1498 struct Location loc;
1499 struct Specifier * _class;
1500 struct __ecereNameSpace__ecere__sys__OldList *  baseSpecs;
1501 struct __ecereNameSpace__ecere__sys__OldList *  definitions;
1502 struct Symbol * symbol;
1503 struct Location blockStart;
1504 struct Location nameLoc;
1505 int declMode;
1506 unsigned int deleteWatchable;
1507 } __attribute__ ((gcc_struct));
1508
1509 struct PropertyDef;
1510
1511 struct PropertyDef
1512 {
1513 struct PropertyDef * prev;
1514 struct PropertyDef * next;
1515 struct Location loc;
1516 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
1517 struct Declarator * declarator;
1518 struct Identifier * id;
1519 struct Statement * getStmt;
1520 struct Statement * setStmt;
1521 struct Statement * issetStmt;
1522 struct Symbol * symbol;
1523 struct Expression * category;
1524 struct
1525 {
1526 unsigned int conversion : 1;
1527 unsigned int isWatchable : 1;
1528 unsigned int isDBProp : 1;
1529 } __attribute__ ((gcc_struct)) __anon1;
1530 } __attribute__ ((gcc_struct));
1531
1532 struct TemplateArgument;
1533
1534 struct TemplateParameter
1535 {
1536 struct TemplateParameter * prev;
1537 struct TemplateParameter * next;
1538 struct Location loc;
1539 int type;
1540 struct Identifier * identifier;
1541 union
1542 {
1543 struct TemplateDatatype * dataType;
1544 int memberType;
1545 } __attribute__ ((gcc_struct)) __anon1;
1546 struct TemplateArgument * defaultArgument;
1547 const char *  dataTypeString;
1548 struct Type * baseType;
1549 } __attribute__ ((gcc_struct));
1550
1551 struct TemplateArgument
1552 {
1553 struct TemplateArgument * prev;
1554 struct TemplateArgument * next;
1555 struct Location loc;
1556 struct Identifier * name;
1557 int type;
1558 union
1559 {
1560 struct Expression * expression;
1561 struct Identifier * identifier;
1562 struct TemplateDatatype * templateDatatype;
1563 } __attribute__ ((gcc_struct)) __anon1;
1564 } __attribute__ ((gcc_struct));
1565
1566 static void OutputSymbols(const char * fileName)
1567 {
1568 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__sys__FileOpen(fileName, 2);
1569
1570 if(f)
1571 {
1572 int lastType = (int)-1;
1573 struct Definition * definition;
1574
1575 if(globalInstance)
1576 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Global Instance]\n");
1577 for(definition = precompDefines.first; definition; definition = definition->next)
1578 {
1579 if(definition->type != lastType)
1580 {
1581 if(lastType != (int)-1)
1582 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   .\n");
1583 if(definition->type == 0)
1584 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Imported Modules]\n");
1585 else if(definition->type == 1)
1586 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Classes]\n");
1587 else if(definition->type == 2)
1588 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Expressions]\n");
1589 else if(definition->type == 3)
1590 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Functions]\n");
1591 else if(definition->type == 4)
1592 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "[Defined Data]\n");
1593 lastType = definition->type;
1594 }
1595 if(definition->type == 0)
1596 {
1597 struct ImportedModule * module = (struct ImportedModule *)definition;
1598
1599 if(module->importType == 1)
1600 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   [Static]\n");
1601 else if(module->importType == 2)
1602 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   [Remote]\n");
1603 if(module->importAccess == 2)
1604 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   [Private]\n");
1605 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   %s\n", module->name);
1606 }
1607 else if(definition->type == 1)
1608 {
1609 struct __ecereNameSpace__ecere__com__Class * _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, definition->name);
1610 struct ClassDefine * classDefine = (struct ClassDefine *)definition;
1611
1612 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   %s\n", definition->name);
1613 if(classDefine->isStatic)
1614 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Static]\n");
1615 if(classDefine->fixed)
1616 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Fixed]\n");
1617 if(classDefine->noExpansion)
1618 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [No Expansion]\n");
1619 if(classDefine->isRemote)
1620 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Remote]\n");
1621 if(classDefine->isWatchable)
1622 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Watchable]\n");
1623 if(_class->type == 4)
1624 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Enum]\n");
1625 else if(_class->type == 2)
1626 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Bit]\n");
1627 else if(_class->type == 1)
1628 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Struct]\n");
1629 else if(_class->type == 3)
1630 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Unit]\n");
1631 else if(_class->type == 5)
1632 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [NoHead]\n");
1633 if(_class->inheritanceAccess == 2)
1634 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Private Base]\n");
1635 else
1636 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Base]\n");
1637 if(classDefine->base)
1638 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         %s\n", classDefine->base);
1639 else
1640 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         [None]\n");
1641 if(_class->templateParams.count)
1642 {
1643 struct __ecereNameSpace__ecere__com__ClassTemplateParameter * param;
1644 struct TemplateParameter * tp;
1645
1646 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         [Template Parameters]\n");
1647 for(tp = (*((struct Symbol *)_class->symbol)->templateParams).first, param = _class->templateParams.first; param && tp; param = param->next, tp = tp->next)
1648 {
1649 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               %s\n", param->name);
1650 switch(param->type)
1651 {
1652 case 0:
1653 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               [Type]\n");
1654 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               %s\n", param->__anon1.dataTypeString ? param->__anon1.dataTypeString : "[None]");
1655 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               %s\n", param->defaultArg.__anon1.__anon1.dataTypeString ? param->defaultArg.__anon1.__anon1.dataTypeString : "[None]");
1656 break;
1657 case 2:
1658 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               [Expression]\n");
1659 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               %s\n", param->__anon1.dataTypeString ? param->__anon1.dataTypeString : "[None]");
1660 if(tp->defaultArgument && tp->defaultArgument->__anon1.expression)
1661 {
1662 char temp[8192];
1663
1664 temp[0] = (char)0;
1665 PrintExpression(tp->defaultArgument->__anon1.expression, temp);
1666 __ecereNameSpace__ecere__sys__ChangeCh(temp, '\n', ' ');
1667 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               ");
1668 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
1669 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1670
1671 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
1672 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, temp);
1673 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
1674 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
1675
1676 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
1677 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1678 }
1679 else
1680 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               [None]\n");
1681 break;
1682 case 1:
1683 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               [Identifier]\n");
1684 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               %s\n", (param->__anon1.memberType == 0) ? "[Data member]" : ((param->__anon1.memberType == 1) ? "[Method]" : "[Property]"));
1685 if(tp->defaultArgument && tp->defaultArgument->__anon1.identifier)
1686 {
1687 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               ");
1688 if(tp->defaultArgument->__anon1.identifier->_class && tp->defaultArgument->__anon1.identifier->_class->type == 1 && tp->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
1689 {
1690 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s::", tp->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
1691 }
1692 else if(tp->defaultArgument->__anon1.identifier->_class && tp->defaultArgument->__anon1.identifier->_class->type == 8 && tp->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier)
1693 {
1694 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s::", tp->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
1695 }
1696 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%s\n", tp->defaultArgument->__anon1.identifier->string);
1697 }
1698 else
1699 {
1700 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               [None]\n");
1701 }
1702 break;
1703 }
1704 }
1705 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         .\n");
1706 }
1707 if(!classDefine->isStatic)
1708 {
1709 if(classDefine->methods.first)
1710 {
1711 struct MethodDefine * method;
1712
1713 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Defined Methods]\n");
1714 for(method = classDefine->methods.first; method; method = method->next)
1715 {
1716 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         %s\n", method->name);
1717 if(method->memberAccess == 1)
1718 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Public]\n");
1719 else
1720 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Private]\n");
1721 if(method->isVirtual)
1722 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Virtual]\n");
1723 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "            [Type]\n");
1724 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "               %s\n", method->type ? method->type : "");
1725 }
1726 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         .\n");
1727 }
1728 OutputDataMembers(classDefine, _class, f);
1729 if(_class->type == 4)
1730 {
1731 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
1732 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
1733 struct __ecereNameSpace__ecere__com__EnumClassData * e = (_class ? ((void *)(((char *)_class->data) + enumClass->offsetClass)) : (((void *)0)));
1734
1735 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Enum Values]\n");
1736 for(value = e->values.first; value; value = value->next)
1737 {
1738 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         %s = ", value->name);
1739 if(_class->dataTypeString && !strcmp(_class->dataTypeString, "uint64") && *(uint64 *)&value->data > (((long long)0x7fffffffffffffffLL)))
1740 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ((__runtimePlatform == 1) ? "0x%I64X" : "0x%llX"), *(uint64 *)&value->data);
1741 else
1742 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ((__runtimePlatform == 1) ? "%I64d" : "%lld"), value->data);
1743 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
1744 }
1745 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         .\n");
1746 }
1747 }
1748 }
1749 else if(definition->type == 2)
1750 {
1751 struct Define * defineDefine = (struct Define *)definition;
1752
1753 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   %s\n", definition->name);
1754 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Value]\n");
1755 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         ");
1756 OutputExpression(defineDefine->exp, f);
1757 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n");
1758 }
1759 else if(definition->type == 3)
1760 {
1761 struct FunctionDefine * functionDefine = (struct FunctionDefine *)definition;
1762
1763 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   %s\n", functionDefine->name);
1764 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Type]\n");
1765 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         %s\n", functionDefine->dataType);
1766 }
1767 else if(definition->type == 4)
1768 {
1769 struct DataDefine * dataDefine = (struct DataDefine *)definition;
1770
1771 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   %s\n", dataDefine->name);
1772 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "      [Type]\n");
1773 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "         %s\n", dataDefine->dataType);
1774 }
1775 }
1776 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "   .\n");
1777 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
1778 }
1779 }
1780
1781 struct Enumerator;
1782
1783 struct Enumerator
1784 {
1785 struct Enumerator * prev;
1786 struct Enumerator * next;
1787 struct Location loc;
1788 struct Identifier * id;
1789 struct Expression * exp;
1790 } __attribute__ ((gcc_struct));
1791
1792 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)
1793 {
1794 struct __ecereNameSpace__ecere__com__Class * regClass = symbol->__anon1.registered;
1795
1796 if(regClass && enumValues)
1797 {
1798 struct Enumerator * e;
1799
1800 for(e = enumValues->first; e; e = e->next)
1801 {
1802 if(e->exp)
1803 {
1804 struct Type * destType = (destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), destType->kind = 4, destType->refCount = 1, destType);
1805
1806 e->exp->destType = destType;
1807 SetParsingType(1);
1808 ProcessExpressionType(e->exp);
1809 SetParsingType(0);
1810 if(!e->exp->expType)
1811 {
1812 destType->kind = 8;
1813 destType->__anon1._class = symbol;
1814 ProcessExpressionType(e->exp);
1815 }
1816 if(e->exp->isConstant)
1817 {
1818 if(e->exp->type == 0 && e->exp->expType && e->exp->__anon1.__anon1.identifier && e->exp->__anon1.__anon1.identifier->string && e->exp->expType->kind == 15)
1819 {
1820 struct __ecereNameSpace__ecere__sys__NamedLink64 * l;
1821 char * string = e->exp->__anon1.__anon1.identifier->string;
1822
1823 for(l = e->exp->expType->__anon1.__anon1.members.first; l; l = l->next)
1824 {
1825 if(!strcmp(l->name, string))
1826 {
1827 if(l->data)
1828 {
1829 FreeExpContents(e->exp);
1830 e->exp->type = 2;
1831 e->exp->__anon1.__anon1.constant = PrintInt64(l->data);
1832 FreeType(e->exp->expType);
1833 e->exp->expType = ProcessTypeString("int64", 0);
1834 }
1835 break;
1836 }
1837 }
1838 }
1839 else
1840 ComputeExpression(e->exp);
1841 }
1842 if(e->exp->isConstant && e->exp->type == 2)
1843 {
1844 struct Operand op = GetOperand(e->exp);
1845 long long value;
1846
1847 switch(op.kind)
1848 {
1849 case 1:
1850 value = op.type->isSigned ? (long long)op.__anon1.c : (long long)op.__anon1.uc;
1851 break;
1852 case 2:
1853 value = op.type->isSigned ? (long long)op.__anon1.s : (long long)op.__anon1.us;
1854 break;
1855 case 4:
1856 value = op.type->isSigned ? op.__anon1.i64 : (long long)op.__anon1.ui64;
1857 break;
1858 case 3:
1859 default:
1860 value = op.type->isSigned ? (long long)op.__anon1.i : (int)op.__anon1.ui;
1861 }
1862 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(regClass, e->id->string, value);
1863 }
1864 else
1865 {
1866 char expString[8192];
1867
1868 expString[0] = (char)0;
1869 PrintExpression(e->exp, expString);
1870 printf(__ecereNameSpace__ecere__GetTranslatedString("ecp", "error: could not resolve value %s for enum %s in precompiler\n", (((void *)0))), expString, regClass->name);
1871 ((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;
1872 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
1873 }
1874 }
1875 else
1876 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
1877 }
1878 }
1879 }
1880
1881 struct Declaration;
1882
1883 typedef union YYSTYPE
1884 {
1885 int specifierType;
1886 int i;
1887 int declMode;
1888 struct Identifier * id;
1889 struct Expression * exp;
1890 struct Specifier * specifier;
1891 struct __ecereNameSpace__ecere__sys__OldList * list;
1892 struct Enumerator * enumerator;
1893 struct Declarator * declarator;
1894 struct __ecereNameSpace__ecere__com__Instance * pointer;
1895 struct Initializer * initializer;
1896 struct InitDeclarator * initDeclarator;
1897 struct TypeName * typeName;
1898 struct Declaration * declaration;
1899 struct Statement * stmt;
1900 struct FunctionDefinition * function;
1901 struct External * external;
1902 struct Context * context;
1903 struct __ecereNameSpace__ecere__com__Instance * asmField;
1904 struct Attrib * attrib;
1905 struct ExtDecl * extDecl;
1906 struct Attribute * attribute;
1907 struct Instantiation * instance;
1908 struct MembersInit * membersInit;
1909 struct MemberInit * memberInit;
1910 struct ClassFunction * classFunction;
1911 struct ClassDefinition * _class;
1912 struct ClassDef * classDef;
1913 struct PropertyDef * prop;
1914 char * string;
1915 struct Symbol * symbol;
1916 struct PropertyWatch * propertyWatch;
1917 struct TemplateParameter * templateParameter;
1918 struct TemplateArgument * templateArgument;
1919 struct TemplateDatatype * templateDatatype;
1920 struct __ecereNameSpace__ecere__com__Instance * dbtableEntry;
1921 struct __ecereNameSpace__ecere__com__Instance * dbindexItem;
1922 struct DBTableDef * dbtableDef;
1923 } __attribute__ ((gcc_struct)) YYSTYPE;
1924
1925 extern YYSTYPE yylval;
1926
1927 struct ClassDef
1928 {
1929 struct ClassDef * prev;
1930 struct ClassDef * next;
1931 struct Location loc;
1932 int type;
1933 union
1934 {
1935 struct Declaration * decl;
1936 struct ClassFunction * function;
1937 struct __ecereNameSpace__ecere__sys__OldList *  defProperties;
1938 struct PropertyDef * propertyDef;
1939 struct PropertyWatch * propertyWatch;
1940 char *  designer;
1941 struct Identifier * defaultProperty;
1942 struct
1943 {
1944 struct Identifier * id;
1945 struct Initializer * initializer;
1946 } __attribute__ ((gcc_struct)) __anon1;
1947 } __attribute__ ((gcc_struct)) __anon1;
1948 int memberAccess;
1949 void *  object;
1950 } __attribute__ ((gcc_struct));
1951
1952 struct Declaration
1953 {
1954 struct Declaration * prev;
1955 struct Declaration * next;
1956 struct Location loc;
1957 int type;
1958 union
1959 {
1960 struct
1961 {
1962 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
1963 struct __ecereNameSpace__ecere__sys__OldList *  declarators;
1964 } __attribute__ ((gcc_struct)) __anon1;
1965 struct Instantiation * inst;
1966 struct
1967 {
1968 struct Identifier * id;
1969 struct Expression * exp;
1970 } __attribute__ ((gcc_struct)) __anon2;
1971 } __attribute__ ((gcc_struct)) __anon1;
1972 struct Specifier * extStorage;
1973 struct Symbol * symbol;
1974 int declMode;
1975 } __attribute__ ((gcc_struct));
1976
1977 struct External
1978 {
1979 struct External * prev;
1980 struct External * next;
1981 struct Location loc;
1982 int type;
1983 struct Symbol * symbol;
1984 union
1985 {
1986 struct FunctionDefinition * function;
1987 struct ClassDefinition * _class;
1988 struct Declaration * declaration;
1989 char *  importString;
1990 struct Identifier * id;
1991 struct DBTableDef * table;
1992 } __attribute__ ((gcc_struct)) __anon1;
1993 int importType;
1994 struct External * fwdDecl;
1995 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1996 struct __ecereNameSpace__ecere__com__Instance * incoming;
1997 int nonBreakableIncoming;
1998 } __attribute__ ((gcc_struct));
1999
2000 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)
2001 {
2002 if(definitions != (((void *)0)))
2003 {
2004 struct ClassDef * def;
2005
2006 for(def = definitions->first; def; def = def->next)
2007 {
2008 if(def->type == 2)
2009 {
2010 struct Declaration * decl = def->__anon1.decl;
2011 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
2012 struct Type * dataType;
2013 struct DataMemberDefine * dataMemberDefine;
2014
2015 if(decl->type == 0)
2016 {
2017 struct Declarator * d;
2018
2019 if(decl->__anon1.__anon1.declarators)
2020 {
2021 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
2022 {
2023 struct Identifier * declId = GetDeclId(d);
2024
2025 if(declId)
2026 {
2027 dataMemberDefine = __extension__ ({
2028 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
2029
2030 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(declId->string), __ecereInstance1;
2031 });
2032 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
2033 if(regClass && regClass->type == 2)
2034 {
2035 struct Expression * sizeExp = d->__anon1.structDecl.exp, * posExp = d->__anon1.structDecl.posExp;
2036 int bitSize = 0, bitPos = -1;
2037 char dataTypeString[1024];
2038
2039 dataTypeString[0] = '\0';
2040 if(sizeExp)
2041 {
2042 ProcessExpressionType(sizeExp);
2043 ComputeExpression(sizeExp);
2044 if(sizeExp->isConstant)
2045 bitSize = strtol(sizeExp->__anon1.__anon1.constant, (((void *)0)), 0);
2046 FreeExpression(sizeExp);
2047 }
2048 if(posExp)
2049 {
2050 ProcessExpressionType(posExp);
2051 ComputeExpression(posExp);
2052 if(posExp->isConstant)
2053 bitPos = strtol(posExp->__anon1.__anon1.constant, (((void *)0)), 0);
2054 FreeExpression(posExp);
2055 }
2056 d->__anon1.structDecl.exp = (((void *)0));
2057 d->__anon1.structDecl.posExp = (((void *)0));
2058 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
2059 PrintType(dataType, dataTypeString, 0, 1);
2060 {
2061 struct __ecereNameSpace__ecere__com__BitMember * member = __ecereNameSpace__ecere__com__eClass_AddBitMember(regClass, declId->string, dataTypeString, 0, 0, def->memberAccess);
2062
2063 member->size = bitSize;
2064 member->pos = bitPos;
2065 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)member;
2066 }
2067 if(dataMember)
2068 dataMember->dataType = dataType;
2069 dataMemberDefine->size = bitSize;
2070 dataMemberDefine->bitPos = bitPos;
2071 dataMemberDefine->type = __ecereNameSpace__ecere__sys__CopyString(dataTypeString);
2072 }
2073 else
2074 {
2075 {
2076 char typeString[1024];
2077
2078 typeString[0] = '\0';
2079 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
2080 PrintType(dataType, typeString, 0, 1);
2081 if(member)
2082 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, declId->string, typeString, 0, 0, def->memberAccess);
2083 else
2084 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, declId->string, typeString, 0, 0, def->memberAccess);
2085 if(dataMember)
2086 dataMember->dataType = dataType;
2087 dataMemberDefine->type = __ecereNameSpace__ecere__sys__CopyString(typeString);
2088 }
2089 }
2090 dataMemberDefine->memberAccess = def->memberAccess;
2091 }
2092 }
2093 }
2094 else if(decl->__anon1.__anon1.specifiers)
2095 {
2096 struct Specifier * spec;
2097
2098 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
2099 {
2100 if(spec->type == 3 || spec->type == 4)
2101 {
2102 if(spec->__anon1.__anon2.definitions && !spec->__anon1.__anon2.id)
2103 {
2104 struct __ecereNameSpace__ecere__com__DataMember * dataMember = __ecereNameSpace__ecere__com__eMember_New((spec->type == 4) ? 1 : 2, def->memberAccess);
2105
2106 dataMemberDefine = __extension__ ({
2107 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
2108
2109 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = (spec->type == 4) ? 1 : 2, __ecereInstance1;
2110 });
2111 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
2112 AddDefinitions((((void *)0)), dataMemberDefine, (((void *)0)), dataMember, spec->__anon1.__anon2.definitions);
2113 if(member)
2114 __ecereNameSpace__ecere__com__eMember_AddMember(member, dataMember);
2115 else
2116 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, dataMember);
2117 }
2118 else if(spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id && (*spec->__anon1.__anon2.definitions).count)
2119 {
2120 {
2121 struct Identifier * id = spec->__anon1.__anon2.id;
2122 char typeString[1024];
2123
2124 typeString[0] = '\0';
2125 spec->__anon1.__anon2.id = (((void *)0));
2126 decl->__anon1.__anon1.declarators = MkListOne(MkDeclaratorIdentifier(id));
2127 dataType = ProcessType(decl->__anon1.__anon1.specifiers, (((void *)0)));
2128 PrintType(dataType, typeString, 0, 1);
2129 if(member)
2130 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, id->string, typeString, 0, 0, def->memberAccess);
2131 else
2132 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, id->string, typeString, 0, 0, def->memberAccess);
2133 if(dataMember)
2134 dataMember->dataType = dataType;
2135 }
2136 }
2137 }
2138 }
2139 }
2140 }
2141 else if(decl->type == 2)
2142 {
2143 struct Instantiation * inst = decl->__anon1.inst;
2144 struct Expression * exp = inst->exp;
2145
2146 if(exp)
2147 {
2148 {
2149 char * string = exp->__anon1.__anon1.identifier->string;
2150
2151 {
2152 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);
2153
2154 if(member)
2155 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
2156 else
2157 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
2158 if(dataMember)
2159 dataMember->dataType = dataType;
2160 }
2161 dataMemberDefine = __extension__ ({
2162 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
2163
2164 __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;
2165 });
2166 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
2167 }
2168 }
2169 }
2170 }
2171 else if(def->type == 3 && def->__anon1.propertyDef)
2172 {
2173 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
2174
2175 {
2176 struct __ecereNameSpace__ecere__com__Property * prop;
2177 struct PropertyDefine * propDefine;
2178
2179 {
2180 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
2181
2182 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, propertyDef->__anon1.conversion ? (((void *)0)) : propertyDef->id->string, dataTypeString, propertyDef->setStmt, propertyDef->getStmt, def->memberAccess);
2183 if(prop)
2184 {
2185 prop->IsSet = (void *)propertyDef->issetStmt;
2186 prop->compiled = 0;
2187 }
2188 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
2189 }
2190 if(prop)
2191 {
2192 prop->symbol = __extension__ ({
2193 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2194
2195 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(propertyDef->symbol->string), __ecereInstance1->type = propertyDef->symbol->type, __ecereInstance1;
2196 });
2197 if(propertyDef->symbol->type)
2198 propertyDef->symbol->type->refCount++;
2199 propDefine = __extension__ ({
2200 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
2201
2202 __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;
2203 });
2204 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, propDefine);
2205 }
2206 }
2207 }
2208 else if(def->type == 10 && def->__anon1.propertyDef)
2209 {
2210 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
2211
2212 {
2213 struct __ecereNameSpace__ecere__com__ClassProperty * prop;
2214 struct PropertyDefine * propDefine;
2215
2216 {
2217 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
2218
2219 prop = __ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, propertyDef->id->string, dataTypeString, propertyDef->setStmt, propertyDef->getStmt);
2220 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
2221 }
2222 if(prop)
2223 {
2224 propDefine = __extension__ ({
2225 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
2226
2227 __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;
2228 });
2229 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->classProperties, propDefine);
2230 }
2231 }
2232 }
2233 else if(def->type == 7)
2234 {
2235 if(classDefine)
2236 classDefine->fixed = 1;
2237 }
2238 else if(def->type == 6)
2239 {
2240 if(classDefine)
2241 classDefine->noExpansion = 1;
2242 }
2243 else if(def->type == 13)
2244 {
2245 struct __ecereNameSpace__ecere__com__DataMember * member;
2246 struct __ecereNameSpace__ecere__com__Property * prop;
2247
2248 if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(regClass, def->__anon1.__anon1.id->string, privateModule)))
2249 {
2250 struct PropertyDefine * propDefine;
2251
2252 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, def->__anon1.__anon1.id->string, (((void *)0)), (((void *)0)), (((void *)0)), def->memberAccess);
2253 if(prop)
2254 {
2255 propDefine = __extension__ ({
2256 struct PropertyDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_PropertyDefine);
2257
2258 __ecereInstance1->isProperty = 1, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(prop->name), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
2259 });
2260 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, propDefine);
2261 }
2262 }
2263 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(regClass, def->__anon1.__anon1.id->string, privateModule, (((void *)0)), (((void *)0)))))
2264 {
2265 struct DataMemberDefine * dataMemberDefine;
2266
2267 member = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, def->__anon1.__anon1.id->string, (((void *)0)), 0, 0, def->memberAccess);
2268 dataMemberDefine = __extension__ ({
2269 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
2270
2271 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 0, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(def->__anon1.__anon1.id->string), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
2272 });
2273 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&parentMemberDefine->dataMembers, dataMemberDefine);
2274 }
2275 }
2276 }
2277 }
2278 }
2279
2280 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)
2281 {
2282 struct __ecereNameSpace__ecere__com__Class * regClass;
2283 struct ClassDef * def;
2284 struct ClassDefine * classDefine;
2285 char baseName[1024];
2286 unsigned int unitType = 0;
2287 unsigned int wouldBeEnum = 0;
2288 int inheritanceAccess = 1;
2289
2290 baseName[0] = '\0';
2291 if(baseSpecs != (((void *)0)))
2292 {
2293 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
2294
2295 PrintType(baseType, baseName, 0, 1);
2296 if(baseType->kind == 8)
2297 {
2298 if(baseType->__anon1._class->__anon1.registered && classType == 0)
2299 {
2300 if(baseType->__anon1._class->__anon1.registered->type == 3)
2301 classType = 3;
2302 else if(baseType->__anon1._class->__anon1.registered->type == 2)
2303 classType = 2;
2304 else if(baseType->__anon1._class->__anon1.registered->type == 5)
2305 classType = 5;
2306 else if(baseType->__anon1._class->__anon1.registered->type == 4)
2307 {
2308 wouldBeEnum = 1;
2309 }
2310 }
2311 }
2312 else if(baseType->kind == 9 || baseType->kind == 10)
2313 {
2314 classType = 5;
2315 baseName[0] = '\0';
2316 }
2317 else
2318 unitType = 1;
2319 FreeType(baseType);
2320 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
2321 inheritanceAccess = 2;
2322 }
2323 if(classType == 0)
2324 {
2325 if(unitType)
2326 classType = 3;
2327 if(definitions != (((void *)0)))
2328 {
2329 for(def = definitions->first; def; def = def->next)
2330 {
2331 if(def->type == 2)
2332 {
2333 struct Declaration * decl = def->__anon1.decl;
2334
2335 if(decl->type == 0)
2336 {
2337 if(unitType)
2338 {
2339 classType = 2;
2340 break;
2341 }
2342 if(decl->__anon1.__anon1.declarators)
2343 {
2344 struct Declarator * d;
2345
2346 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
2347 {
2348 if(d->__anon1.structDecl.exp)
2349 {
2350 classType = 2;
2351 break;
2352 }
2353 }
2354 if(d)
2355 break;
2356 }
2357 }
2358 }
2359 }
2360 }
2361 }
2362 if(classType == 0 && wouldBeEnum)
2363 classType = 4;
2364 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);
2365 if(regClass)
2366 regClass->symbol = symbol;
2367 classDefine = __extension__ ({
2368 struct ClassDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassDefine);
2369
2370 __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;
2371 });
2372 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, classDefine);
2373 if(classType == 6)
2374 {
2375 struct __ecereNameSpace__ecere__com__DataMember * unionMember = __ecereNameSpace__ecere__com__eMember_New(1, 1);
2376 struct DataMemberDefine * unionDefine;
2377
2378 unionDefine = __extension__ ({
2379 struct DataMemberDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataMemberDefine);
2380
2381 __ecereInstance1->isProperty = 3, __ecereInstance1->memberType = 1, __ecereInstance1;
2382 });
2383 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->propertiesAndMembers, unionDefine);
2384 AddDefinitions(classDefine, unionDefine, regClass, unionMember, definitions);
2385 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, unionMember);
2386 }
2387 else if(regClass)
2388 AddDefinitions(classDefine, (struct DataMemberDefine *)classDefine, regClass, (((void *)0)), definitions);
2389 if(definitions != (((void *)0)))
2390 {
2391 for(def = definitions->first; def; def = def->next)
2392 {
2393 if(def->type == 0)
2394 {
2395 struct ClassFunction * func = def->__anon1.function;
2396
2397 if(!func->dontMangle && func->declarator)
2398 {
2399 struct Identifier * id = GetDeclId(func->declarator);
2400 struct __ecereNameSpace__ecere__com__Method * method;
2401 struct MethodDefine * methodDefine;
2402
2403 {
2404 char * dataTypeString = StringFromSpecDecl(func->specifiers, func->declarator);
2405
2406 if(func->isVirtual)
2407 method = __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(regClass, id->string, dataTypeString, func->declarator->symbol, def->memberAccess);
2408 else
2409 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, id->string, dataTypeString, func->declarator->symbol, def->memberAccess);
2410 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
2411 }
2412 if(method)
2413 {
2414 method->symbol = __extension__ ({
2415 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2416
2417 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(func->declarator->symbol->string), __ecereInstance1->type = func->declarator->symbol->type, __ecereInstance1;
2418 });
2419 if(func->declarator->symbol->type)
2420 func->declarator->symbol->type->refCount++;
2421 ((struct Symbol *)method->symbol)->__anon1.method = method;
2422 func->declarator->symbol = (((void *)0));
2423 if(method->type != 1 || method->_class == regClass)
2424 {
2425 methodDefine = __extension__ ({
2426 struct MethodDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodDefine);
2427
2428 __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;
2429 });
2430 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->methods, methodDefine);
2431 }
2432 }
2433 }
2434 }
2435 else if(def->type == 13)
2436 {
2437 struct __ecereNameSpace__ecere__com__Method * method;
2438
2439 if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(regClass, def->__anon1.__anon1.id->string, privateModule)))
2440 {
2441 struct MethodDefine * methodDefine;
2442
2443 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, def->__anon1.__anon1.id->string, (((void *)0)), (((void *)0)), def->memberAccess);
2444 methodDefine = __extension__ ({
2445 struct MethodDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_MethodDefine);
2446
2447 __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(method->name), __ecereInstance1->memberAccess = def->memberAccess, __ecereInstance1;
2448 });
2449 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&classDefine->methods, methodDefine);
2450 }
2451 }
2452 }
2453 }
2454 if(regClass && symbol->templateParams)
2455 {
2456 struct TemplateParameter * param;
2457
2458 for(param = (*symbol->templateParams).first; param; param = param->next)
2459 {
2460 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg =
2461 {
2462
2463 .__anon1 = {
2464
2465 .__anon1 = {
2466 .dataTypeString = 0
2467 }
2468 }
2469 };
2470
2471 if(param->defaultArgument)
2472 {
2473 switch(param->type)
2474 {
2475 case 0:
2476 defaultArg.__anon1.__anon1.dataTypeString = StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl);
2477 break;
2478 case 1:
2479 {
2480 char memberString[1024];
2481
2482 memberString[0] = '\0';
2483 if(param->defaultArgument->__anon1.identifier->_class && param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
2484 {
2485 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
2486 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
2487 else
2488 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
2489 }
2490 if(memberString[0])
2491 {
2492 strcat(memberString, "::");
2493 }
2494 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
2495 defaultArg.__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(memberString);
2496 break;
2497 }
2498 case 2:
2499 {
2500 struct Operand op;
2501
2502 ProcessExpressionType(param->defaultArgument->__anon1.expression);
2503 ComputeExpression(param->defaultArgument->__anon1.expression);
2504 op = GetOperand(param->defaultArgument->__anon1.expression);
2505 defaultArg.__anon1.expression.__anon1.ui64 = op.__anon1.ui64;
2506 break;
2507 }
2508 }
2509 }
2510 if(param->type == 1)
2511 {
2512 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, (void *)(uintptr_t)param->__anon1.memberType, &defaultArg);
2513 }
2514 else
2515 {
2516 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
2517
2518 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, typeString, &defaultArg);
2519 }
2520 }
2521 }
2522 }
2523
2524 void PreCompPreProcessClassDefinitions()
2525 {
2526 struct __ecereNameSpace__ecere__sys__OldList * ast = GetAST();
2527 struct External * external, * next;
2528
2529 for(external = (*ast).first; external; external = next)
2530 {
2531 next = external->next;
2532 if(external->type == 2)
2533 {
2534 struct ClassDefinition * _class = external->__anon1._class;
2535
2536 if(_class->declMode == 1 || _class->declMode == 2 || _class->declMode == 3)
2537 {
2538 if(_class->definitions)
2539 {
2540 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), _class->deleteWatchable, _class->declMode);
2541 }
2542 }
2543 }
2544 else if(external->type == 1)
2545 {
2546 struct Declaration * declaration = external->__anon1.declaration;
2547
2548 if(declaration->type == 1)
2549 {
2550 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2 || external->__anon1.declaration->declMode == 3)
2551 {
2552 if(declaration->__anon1.__anon1.specifiers)
2553 {
2554 struct Specifier * specifier;
2555
2556 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
2557 {
2558 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)))
2559 {
2560 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
2561
2562 if(symbol)
2563 {
2564 int classType;
2565
2566 if(specifier->type == 2)
2567 classType = 4;
2568 else if(specifier->type == 4)
2569 classType = 6;
2570 else
2571 classType = 1;
2572 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, 0, external->__anon1.declaration->declMode);
2573 }
2574 }
2575 }
2576 }
2577 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2578 {
2579 if(declaration->__anon1.__anon1.declarators)
2580 {
2581 struct InitDeclarator * d;
2582
2583 for(d = (*declaration->__anon1.__anon1.declarators).first; d; d = d->next)
2584 {
2585 if(d->declarator)
2586 {
2587 struct Symbol * symbol = d->declarator->symbol;
2588
2589 if(symbol)
2590 {
2591 struct DataDefine * dataDefine;
2592 char typeString[1024];
2593
2594 typeString[0] = '\0';
2595 PrintType(symbol->type, typeString, 0, 1);
2596 dataDefine = __extension__ ({
2597 struct DataDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataDefine);
2598
2599 __ecereInstance1->type = 4, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2600 });
2601 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, dataDefine);
2602 }
2603 }
2604 }
2605 }
2606 }
2607 }
2608 }
2609 else if(declaration->type == 2)
2610 {
2611 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2612 {
2613 struct Symbol * symbol = declaration->__anon1.inst->symbol;
2614
2615 if(symbol)
2616 {
2617 struct DataDefine * dataDefine;
2618 char typeString[1024];
2619
2620 typeString[0] = '\0';
2621 PrintType(symbol->type, typeString, 0, 1);
2622 dataDefine = __extension__ ({
2623 struct DataDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_DataDefine);
2624
2625 __ecereInstance1->type = 4, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2626 });
2627 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, dataDefine);
2628 }
2629 }
2630 globalInstance = 1;
2631 }
2632 else if(declaration->type == 3)
2633 {
2634 if(external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2)
2635 {
2636 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);
2637
2638 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, definition);
2639 }
2640 }
2641 }
2642 else if(external->type == 0 && (external->__anon1.function->declMode == 1 || external->__anon1.function->declMode == 2))
2643 {
2644 struct FunctionDefinition * function = external->__anon1.function;
2645 struct FunctionDefine * functionDefine;
2646 char typeString[1024];
2647
2648 typeString[0] = '\0';
2649 PrintType(function->declarator->symbol->type, typeString, 1, 1);
2650 functionDefine = __extension__ ({
2651 struct FunctionDefine * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_FunctionDefine);
2652
2653 __ecereInstance1->type = 3, __ecereInstance1->name = __ecereNameSpace__ecere__sys__CopyString(function->declarator->symbol->string), __ecereInstance1->dataType = __ecereNameSpace__ecere__sys__CopyString(typeString), __ecereInstance1;
2654 });
2655 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&precompDefines, functionDefine);
2656 }
2657 else if(external->type == 4)
2658 {
2659 SetCurrentNameSpace(external->__anon1.id->string);
2660 }
2661 }
2662 ComputeModuleClasses(privateModule);
2663 for(external = (*ast).first; external; external = next)
2664 {
2665 next = external->next;
2666 if(external->type == 1 && (external->__anon1.declaration->declMode == 1 || external->__anon1.declaration->declMode == 2))
2667 {
2668 struct Declaration * declaration = external->__anon1.declaration;
2669
2670 if(declaration->type == 1)
2671 {
2672 if(declaration->__anon1.__anon1.specifiers)
2673 {
2674 struct Specifier * specifier;
2675
2676 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
2677 {
2678 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)))
2679 {
2680 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
2681
2682 if(symbol)
2683 {
2684 ProcessClassEnumValues(4, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list);
2685 }
2686 }
2687 }
2688 }
2689 }
2690 }
2691 }
2692 }
2693
2694 void __ecereMethod_PrecompApp_Main(struct __ecereNameSpace__ecere__com__Instance * this)
2695 {
2696 int c;
2697 unsigned int valid = 1;
2698 char defaultSymFile[797];
2699 char * cppCommand = (((void *)0));
2700 char * cppOptions = (((void *)0));
2701 int cppOptionsLen = 0;
2702 int targetPlatform = __runtimePlatform;
2703 int targetBits = GetHostBits();
2704
2705 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++)
2706 {
2707 const char * arg = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c];
2708
2709 if(arg[0] == '-')
2710 {
2711 if(!strcmp(arg + 1, "m32") || !strcmp(arg + 1, "m64"))
2712 {
2713 int newLen = cppOptionsLen + 1 + strlen(arg);
2714
2715 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (newLen + 1));
2716 cppOptions[cppOptionsLen] = ' ';
2717 strcpy(cppOptions + cppOptionsLen + 1, arg);
2718 cppOptionsLen = newLen;
2719 targetBits = !strcmp(arg + 1, "m32") ? 32 : 64;
2720 }
2721 else if(!strcmp(arg + 1, "t32") || !strcmp(arg + 1, "t64"))
2722 {
2723 targetBits = !strcmp(arg + 1, "t32") ? 32 : 64;
2724 }
2725 else if(arg[1] == 'D' || arg[1] == 'I')
2726 {
2727 char * buf;
2728 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
2729
2730 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2731 buf = cppOptions + cppOptionsLen;
2732 *buf++ = ' ';
2733 PassArg(buf, arg);
2734 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
2735 }
2736 else if(!strcmp(arg + 1, "t"))
2737 {
2738 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2739 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]);
2740 else
2741 valid = 0;
2742 }
2743 else if(!strcmp(arg + 1, "cpp"))
2744 {
2745 if(++c < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2746 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]);
2747 else
2748 valid = 0;
2749 }
2750 else if(!strcmp(arg + 1, "o"))
2751 {
2752 if(!GetOutputFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2753 {
2754 SetOutputFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
2755 c++;
2756 }
2757 else
2758 valid = 0;
2759 }
2760 else if(!strcmp(arg + 1, "c"))
2761 {
2762 if(!GetSourceFile() && c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2763 {
2764 SetSourceFile(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
2765 c++;
2766 }
2767 else
2768 valid = 0;
2769 }
2770 else if(!strcmp(arg + 1, "isystem") || !strcmp(arg + 1, "isysroot"))
2771 {
2772 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2773 {
2774 char * buf;
2775 const char * arg1 = ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[++c];
2776 int size = cppOptionsLen + 1 + strlen(arg) * 2 + strlen(arg1) * 2 + 1;
2777
2778 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2779 buf = cppOptions + cppOptionsLen;
2780 *buf++ = ' ';
2781 buf = PassArg(buf, arg);
2782 *buf++ = ' ';
2783 buf = PassArg(buf, arg1);
2784 cppOptionsLen = buf - cppOptions;
2785 }
2786 else
2787 valid = 0;
2788 }
2789 else if(!strcmp(arg + 1, "fno-diagnostics-show-caret"))
2790 {
2791 char * buf;
2792 int size = cppOptionsLen + 1 + strlen(arg) * 2 + 1;
2793
2794 cppOptions = __ecereNameSpace__ecere__com__eSystem_Renew(cppOptions, sizeof(char) * (size));
2795 buf = cppOptions + cppOptionsLen;
2796 *buf++ = ' ';
2797 PassArg(buf, arg);
2798 cppOptionsLen = cppOptionsLen + 1 + strlen(buf);
2799 }
2800 else if(!strcmp(arg + 1, "symbols"))
2801 {
2802 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2803 {
2804 SetSymbolsDir(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
2805 c++;
2806 }
2807 else
2808 valid = 0;
2809 }
2810 else if(!strcmp(arg + 1, "defaultns"))
2811 {
2812 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2813 {
2814 SetDefaultNameSpace(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
2815 c++;
2816 }
2817 else
2818 valid = 0;
2819 }
2820 else if(!strcmp(arg + 1, "strictns"))
2821 {
2822 SetStrictNameSpaces(1);
2823 }
2824 else if(!strcmp(arg + 1, "module"))
2825 {
2826 if(c + 1 < ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argc)
2827 {
2828 SetI18nModuleName(((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->argv[c + 1]);
2829 c++;
2830 }
2831 else
2832 valid = 0;
2833 }
2834 }
2835 else
2836 valid = 0;
2837 }
2838 if(valid)
2839 {
2840 if(!cppCommand)
2841 cppCommand = __ecereNameSpace__ecere__sys__CopyString("gcc");
2842 if(!GetSourceFile())
2843 valid = 0;
2844 else if(!GetOutputFile())
2845 {
2846 strcpy(defaultSymFile, GetSymbolsDir());
2847 __ecereNameSpace__ecere__sys__PathCat(defaultSymFile, GetSourceFile());
2848 __ecereNameSpace__ecere__sys__ChangeExtension(defaultSymFile, "sym", defaultSymFile);
2849 SetOutputFile(defaultSymFile);
2850 }
2851 }
2852 if(!valid)
2853 {
2854 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))));
2855 }
2856 else
2857 {
2858 struct __ecereNameSpace__ecere__com__Instance * cppOutput;
2859 char command[3075];
2860
2861 SetGlobalData(&globalData);
2862 SetExcludedSymbols(&_excludedSymbols);
2863 SetGlobalContext(globalContext);
2864 SetCurrentContext(globalContext);
2865 SetTopContext(globalContext);
2866 SetDefines(&defines);
2867 SetImports(&imports);
2868 SetInPreCompiler(1);
2869 SetPrecompDefines(&precompDefines);
2870 SetTargetPlatform(targetPlatform);
2871 SetTargetBits(targetBits);
2872 SetEchoOn(0);
2873 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)));
2874 SetPrivateModule(privateModule);
2875 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2876 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2877
2878 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
2879 }));
2880 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2881 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2882
2883 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint64"), __ecereInstance1->type = ProcessTypeString("unsigned int64", 0), __ecereInstance1;
2884 }));
2885 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2886 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2887
2888 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint32"), __ecereInstance1->type = ProcessTypeString("unsigned int", 0), __ecereInstance1;
2889 }));
2890 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2891 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2892
2893 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uint16"), __ecereInstance1->type = ProcessTypeString("unsigned short", 0), __ecereInstance1;
2894 }));
2895 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2896 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2897
2898 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("byte"), __ecereInstance1->type = ProcessTypeString("unsigned char", 0), __ecereInstance1;
2899 }));
2900 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2901 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2902
2903 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("intptr_t"), __ecereInstance1->type = ProcessTypeString("intptr", 0), __ecereInstance1;
2904 }));
2905 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2906 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2907
2908 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("uintptr_t"), __ecereInstance1->type = ProcessTypeString("uintptr", 0), __ecereInstance1;
2909 }));
2910 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2911 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2912
2913 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("ssize_t"), __ecereInstance1->type = ProcessTypeString("intsize", 0), __ecereInstance1;
2914 }));
2915 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&globalContext->types, (struct __ecereNameSpace__ecere__sys__BTNode *)__extension__ ({
2916 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2917
2918 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString("size_t"), __ecereInstance1->type = ProcessTypeString("uintsize", 0), __ecereInstance1;
2919 }));
2920 {
2921 const char * outputFilePath = GetOutputFile();
2922
2923 if(__ecereNameSpace__ecere__sys__FileExists(outputFilePath))
2924 __ecereNameSpace__ecere__sys__DeleteFile(outputFilePath);
2925 }
2926 snprintf(command, sizeof (command), "%s%s -x c -E \"%s\"", cppCommand, cppOptions ? cppOptions : "", GetSourceFile());
2927 command[sizeof (command) - 1] = (char)0;
2928 if((cppOutput = __ecereNameSpace__ecere__sys__DualPipeOpen((((unsigned int)(1))), command)))
2929 {
2930 int exitCode;
2931 struct __ecereNameSpace__ecere__sys__OldList * ast;
2932 struct __ecereNameSpace__ecere__com__Instance * fileInput = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2933 struct ModuleImport * mainModule = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ModuleImport);
2934
2935 SetFileInput(fileInput);
2936 SetMainModule(mainModule);
2937 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(&imports, mainModule);
2938 resetScanner();
2939 for(; !((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
2940 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
2941
2942 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
2943 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Eof])(cppOutput); )
2944 {
2945 char junk[4096];
2946 int count = ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void *  buffer, unsigned int size, unsigned int count))__extension__ ({
2947 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = cppOutput;
2948
2949 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__DualPipe->_vTbl;
2950 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(cppOutput, junk, 1, 4096);
2951
2952 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, const void *  buffer, unsigned int size, unsigned int count))__extension__ ({
2953 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
2954
2955 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
2956 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Write])(fileInput, junk, 1, count);
2957 }
2958 exitCode = __ecereMethod___ecereNameSpace__ecere__sys__DualPipe_GetExitCode(cppOutput);
2959 (__ecereNameSpace__ecere__com__eInstance_DecRef(cppOutput), cppOutput = 0);
2960 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))__extension__ ({
2961 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = fileInput;
2962
2963 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__TempFile->_vTbl;
2964 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(fileInput, 0, 0);
2965 ParseEc();
2966 SetCurrentNameSpace((((void *)0)));
2967 SetYydebug(0);
2968 (__ecereNameSpace__ecere__com__eInstance_DecRef(fileInput), fileInput = 0);
2969 SetFileInput((((void *)0)));
2970 ast = GetAST();
2971 if(!exitCode)
2972 {
2973 if(ast)
2974 {
2975 ProcessDBTableDefinitions();
2976 PreCompPreProcessClassDefinitions();
2977 }
2978 if(!((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode)
2979 OutputSymbols(GetOutputFile());
2980 }
2981 else
2982 ((struct __ecereNameSpace__ecere__com__Application *)(((char *)this + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->exitCode = exitCode;
2983 if(ast)
2984 {
2985 FreeASTTree(ast);
2986 }
2987 }
2988 FreeContext(globalContext);
2989 FreeExcludedSymbols(&_excludedSymbols);
2990 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&defines, (void *)(FreeModuleDefine));
2991 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&imports, (void *)(FreeModuleImport));
2992 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Free(&precompDefines, (void *)(FreeDefinition));
2993 FreeTypeData(privateModule);
2994 FreeIncludeFiles();
2995 FreeGlobalData(&globalData);
2996 (__ecereNameSpace__ecere__com__eInstance_DecRef(privateModule), privateModule = 0);
2997 }
2998 (__ecereNameSpace__ecere__com__eSystem_Delete(cppCommand), cppCommand = 0);
2999 (__ecereNameSpace__ecere__com__eSystem_Delete(cppOptions), cppOptions = 0);
3000 SetSymbolsDir((((void *)0)));
3001 }
3002
3003 void __ecereRegisterModule_ecp(struct __ecereNameSpace__ecere__com__Instance * module)
3004 {
3005 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
3006
3007 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "ClassDefine", "Definition", sizeof(struct ClassDefine), 0, (void *)0, (void *)0, module, 2, 1);
3008 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)
3009 __ecereClass_ClassDefine = class;
3010 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "base", "char *", sizeof(void *), 0xF000F000, 1);
3011 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "propertiesAndMembers", "ecere::sys::OldList", sizeof(struct __ecereNameSpace__ecere__sys__OldList), 0xF000F000, 1);
3012 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "classProperties", "ecere::sys::OldList", sizeof(struct __ecereNameSpace__ecere__sys__OldList), 0xF000F000, 1);
3013 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "methods", "ecere::sys::OldList", sizeof(struct __ecereNameSpace__ecere__sys__OldList), 0xF000F000, 1);
3014 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isRemote", "bool", 4, 4, 1);
3015 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isWatchable", "bool", 4, 4, 1);
3016 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "fixed", "bool", 4, 4, 1);
3017 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "isStatic", "bool", 4, 4, 1);
3018 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "noExpansion", "bool", 4, 4, 1);
3019 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "Define", "Definition", sizeof(struct Define), 0, (void *)0, (void *)0, module, 2, 1);
3020 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)
3021 __ecereClass_Define = class;
3022 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "exp", "Expression", sizeof(void *), 0xF000F000, 1);
3023 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "FunctionDefine", "Definition", sizeof(struct FunctionDefine), 0, (void *)0, (void *)0, module, 2, 1);
3024 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)
3025 __ecereClass_FunctionDefine = class;
3026 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "char *", sizeof(void *), 0xF000F000, 1);
3027 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "DataDefine", "Definition", sizeof(struct DataDefine), 0, (void *)0, (void *)0, module, 2, 1);
3028 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)
3029 __ecereClass_DataDefine = class;
3030 __ecereNameSpace__ecere__com__eClass_AddDataMember(class, "dataType", "char *", sizeof(void *), 0xF000F000, 1);
3031 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "MethodDefine", 0, sizeof(struct MethodDefine), 0, (void *)0, (void *)0, module, 2, 1);
3032 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)
3033 __ecereClass_MethodDefine = class;
3034 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "PropertyDefine", 0, sizeof(struct PropertyDefine), 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_PropertyDefine = class;
3037 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(5, "DataMemberDefine", 0, sizeof(struct DataMemberDefine), 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_DataMemberDefine = class;
3040 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeMethodDefine", "void FreeMethodDefine(MethodDefine method)", FreeMethodDefine, module, 2);
3041 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDataMemberDefine", "void FreeDataMemberDefine(DataMemberDefine dataMember)", FreeDataMemberDefine, module, 2);
3042 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDataDefine", "void FreeDataDefine(DataDefine data)", FreeDataDefine, module, 2);
3043 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FreeDefinition", "void FreeDefinition(Definition definition)", FreeDefinition, module, 2);
3044 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PreCompPreProcessClassDefinitions", "void PreCompPreProcessClassDefinitions(void)", PreCompPreProcessClassDefinitions, module, 2);
3045 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "PrecompApp", "ecere::com::Application", 0, 0, (void *)0, (void *)0, module, 2, 1);
3046 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)
3047 __ecereClass_PrecompApp = class;
3048 __ecereNameSpace__ecere__com__eClass_AddMethod(class, "Main", 0, __ecereMethod_PrecompApp_Main, 1);
3049 }
3050