compiler/libec: Fix for thisclass related warnings in Map.ec
[sdk] / compiler / bootstrap / libec / bootstrap / firstPass.c
1 /* Code generated from eC source file: firstPass.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 extern unsigned int inCompiler;
46
47 extern unsigned int buildingECERECOMModule;
48
49 struct __ecereNameSpace__ecere__sys__OldList
50 {
51 void *  first;
52 void *  last;
53 int count;
54 unsigned int offset;
55 unsigned int circ;
56 } __attribute__ ((gcc_struct));
57
58 struct __ecereNameSpace__ecere__sys__BTNode;
59
60 struct __ecereNameSpace__ecere__com__DataValue
61 {
62 union
63 {
64 char c;
65 unsigned char uc;
66 short s;
67 unsigned short us;
68 int i;
69 unsigned int ui;
70 void *  p;
71 float f;
72 double d;
73 long long i64;
74 uint64 ui64;
75 } __attribute__ ((gcc_struct)) __anon1;
76 } __attribute__ ((gcc_struct));
77
78 struct __ecereNameSpace__ecere__com__SerialBuffer
79 {
80 unsigned char *  _buffer;
81 unsigned int count;
82 unsigned int _size;
83 unsigned int pos;
84 } __attribute__ ((gcc_struct));
85
86 extern void *  __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
87
88 extern void *  __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
89
90 extern void *  __ecereNameSpace__ecere__com__eSystem_Renew(void *  memory, unsigned int size);
91
92 extern void *  __ecereNameSpace__ecere__com__eSystem_Renew0(void *  memory, unsigned int size);
93
94 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void *  memory);
95
96 struct Enumerator;
97
98 struct Pointer;
99
100 struct Initializer;
101
102 struct InitDeclarator;
103
104 struct TypeName;
105
106 struct Statement;
107
108 struct FunctionDefinition;
109
110 struct AsmField;
111
112 struct Attrib;
113
114 struct ExtDecl;
115
116 struct Attribute;
117
118 struct MembersInit;
119
120 struct MemberInit;
121
122 struct PropertyWatch;
123
124 struct DBTableEntry;
125
126 struct DBIndexItem;
127
128 struct DBTableDef;
129
130 struct CodePosition
131 {
132 int line;
133 int charPos;
134 int pos;
135 int included;
136 } __attribute__ ((gcc_struct));
137
138 extern int strtol(const char * , char * * , int base);
139
140 extern void Compiler_Error(const char *  format, ...);
141
142 extern const char *  __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char *  string, const char *  stringAndContext);
143
144 extern char *  __ecereNameSpace__ecere__sys__CopyString(const char *  string);
145
146 struct ModuleImport;
147
148 struct ClassImport;
149
150 struct __ecereNameSpace__ecere__com__ClassProperty;
151
152 extern int strcmp(const char * , const char * );
153
154 extern char *  strcpy(char * , const char * );
155
156 extern char *  strcat(char * , const char * );
157
158 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
159
160 struct __ecereNameSpace__ecere__com__LinkList
161 {
162 void * first;
163 void * last;
164 int count;
165 } __attribute__ ((gcc_struct));
166
167 struct __ecereNameSpace__ecere__com__GlobalFunction;
168
169 extern struct __ecereNameSpace__ecere__sys__OldList *  MkListOne(void *  item);
170
171 extern struct __ecereNameSpace__ecere__sys__OldList *  excludedSymbols;
172
173 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (*  FreeFunction)(void * ));
174
175 extern struct __ecereNameSpace__ecere__sys__OldList *  ast;
176
177 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void *  item);
178
179 struct Location
180 {
181 struct CodePosition start;
182 struct CodePosition end;
183 } __attribute__ ((gcc_struct));
184
185 extern struct ModuleImport * mainModule;
186
187 extern struct Location yylloc;
188
189 struct Expression;
190
191 extern void ProcessExpressionType(struct Expression * exp);
192
193 extern void ComputeExpression(struct Expression * exp);
194
195 extern void FreeExpression(struct Expression * exp);
196
197 struct Context;
198
199 extern struct Context * globalContext;
200
201 struct External;
202
203 extern struct External * curExternal;
204
205 struct __ecereNameSpace__ecere__com__Class;
206
207 struct __ecereNameSpace__ecere__com__Instance
208 {
209 void * *  _vTbl;
210 struct __ecereNameSpace__ecere__com__Class * _class;
211 int _refCount;
212 } __attribute__ ((gcc_struct));
213
214 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name);
215
216 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char *  name, long long value);
217
218 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);
219
220 extern void __ecereNameSpace__ecere__com__eClass_DoneAddingTemplateParameters(struct __ecereNameSpace__ecere__com__Class * base);
221
222 extern void *  __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
223
224 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char *  name, void *  function);
225
226 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
227
228 struct __ecereNameSpace__ecere__com__Property;
229
230 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
231
232 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);
233
234 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void *  instance, struct __ecereNameSpace__ecere__com__Property * _property, void *  object, void (*  callback)(void * , void * ));
235
236 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
237
238 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);
239
240 extern void __ecereNameSpace__ecere__com__eProperty_Watchable(struct __ecereNameSpace__ecere__com__Property * _property);
241
242 struct Declarator;
243
244 extern char *  StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
245
246 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
247
248 struct TemplateDatatype
249 {
250 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
251 struct Declarator * decl;
252 } __attribute__ ((gcc_struct));
253
254 struct Type;
255
256 struct __ecereNameSpace__ecere__com__Property
257 {
258 struct __ecereNameSpace__ecere__com__Property * prev;
259 struct __ecereNameSpace__ecere__com__Property * next;
260 const char *  name;
261 unsigned int isProperty;
262 int memberAccess;
263 int id;
264 struct __ecereNameSpace__ecere__com__Class * _class;
265 const char *  dataTypeString;
266 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
267 struct Type * dataType;
268 void (*  Set)(void * , int);
269 int (*  Get)(void * );
270 unsigned int (*  IsSet)(void * );
271 void *  data;
272 void *  symbol;
273 int vid;
274 unsigned int conversion;
275 unsigned int watcherOffset;
276 const char *  category;
277 unsigned int compiled;
278 unsigned int selfWatchable;
279 unsigned int isWatchable;
280 } __attribute__ ((gcc_struct));
281
282 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
283
284 extern void PrintType(struct Type * type, char *  string, unsigned int printName, unsigned int fullName);
285
286 extern void FreeType(struct Type * type);
287
288 struct __ecereNameSpace__ecere__com__DataMember;
289
290 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);
291
292 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);
293
294 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_New(int type, int declMode);
295
296 extern unsigned int __ecereNameSpace__ecere__com__eMember_AddMember(struct __ecereNameSpace__ecere__com__DataMember * addTo, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
297
298 extern unsigned int __ecereNameSpace__ecere__com__eClass_AddMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
299
300 struct Specifier;
301
302 extern void FreeSpecifier(struct Specifier * spec);
303
304 struct Symbol;
305
306 extern struct Symbol * FindType(struct Context * ctx, const char *  name);
307
308 extern struct Symbol * FindClass(const char *  name);
309
310 struct __ecereNameSpace__ecere__sys__OldLink;
311
312 struct __ecereNameSpace__ecere__sys__OldLink
313 {
314 struct __ecereNameSpace__ecere__sys__OldLink * prev;
315 struct __ecereNameSpace__ecere__sys__OldLink * next;
316 void *  data;
317 } __attribute__ ((gcc_struct));
318
319 struct __ecereNameSpace__ecere__sys__BinaryTree;
320
321 struct __ecereNameSpace__ecere__sys__BinaryTree
322 {
323 struct __ecereNameSpace__ecere__sys__BTNode * root;
324 int count;
325 int (*  CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
326 void (*  FreeKey)(void *  key);
327 } __attribute__ ((gcc_struct));
328
329 struct __ecereNameSpace__ecere__com__DataMember
330 {
331 struct __ecereNameSpace__ecere__com__DataMember * prev;
332 struct __ecereNameSpace__ecere__com__DataMember * next;
333 const char *  name;
334 unsigned int isProperty;
335 int memberAccess;
336 int id;
337 struct __ecereNameSpace__ecere__com__Class * _class;
338 const char *  dataTypeString;
339 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
340 struct Type * dataType;
341 int type;
342 int offset;
343 int memberID;
344 struct __ecereNameSpace__ecere__sys__OldList members;
345 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
346 int memberOffset;
347 short structAlignment;
348 short pointerAlignment;
349 } __attribute__ ((gcc_struct));
350
351 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
352
353 struct ClassDef;
354
355 struct Operand;
356
357 struct OpTable
358 {
359 unsigned int (*  Add)(struct Expression *, struct Operand *, struct Operand *);
360 unsigned int (*  Sub)(struct Expression *, struct Operand *, struct Operand *);
361 unsigned int (*  Mul)(struct Expression *, struct Operand *, struct Operand *);
362 unsigned int (*  Div)(struct Expression *, struct Operand *, struct Operand *);
363 unsigned int (*  Mod)(struct Expression *, struct Operand *, struct Operand *);
364 unsigned int (*  Neg)(struct Expression *, struct Operand *);
365 unsigned int (*  Inc)(struct Expression *, struct Operand *);
366 unsigned int (*  Dec)(struct Expression *, struct Operand *);
367 unsigned int (*  Asign)(struct Expression *, struct Operand *, struct Operand *);
368 unsigned int (*  AddAsign)(struct Expression *, struct Operand *, struct Operand *);
369 unsigned int (*  SubAsign)(struct Expression *, struct Operand *, struct Operand *);
370 unsigned int (*  MulAsign)(struct Expression *, struct Operand *, struct Operand *);
371 unsigned int (*  DivAsign)(struct Expression *, struct Operand *, struct Operand *);
372 unsigned int (*  ModAsign)(struct Expression *, struct Operand *, struct Operand *);
373 unsigned int (*  BitAnd)(struct Expression *, struct Operand *, struct Operand *);
374 unsigned int (*  BitOr)(struct Expression *, struct Operand *, struct Operand *);
375 unsigned int (*  BitXor)(struct Expression *, struct Operand *, struct Operand *);
376 unsigned int (*  LShift)(struct Expression *, struct Operand *, struct Operand *);
377 unsigned int (*  RShift)(struct Expression *, struct Operand *, struct Operand *);
378 unsigned int (*  BitNot)(struct Expression *, struct Operand *);
379 unsigned int (*  AndAsign)(struct Expression *, struct Operand *, struct Operand *);
380 unsigned int (*  OrAsign)(struct Expression *, struct Operand *, struct Operand *);
381 unsigned int (*  XorAsign)(struct Expression *, struct Operand *, struct Operand *);
382 unsigned int (*  LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
383 unsigned int (*  RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
384 unsigned int (*  Not)(struct Expression *, struct Operand *);
385 unsigned int (*  Equ)(struct Expression *, struct Operand *, struct Operand *);
386 unsigned int (*  Nqu)(struct Expression *, struct Operand *, struct Operand *);
387 unsigned int (*  And)(struct Expression *, struct Operand *, struct Operand *);
388 unsigned int (*  Or)(struct Expression *, struct Operand *, struct Operand *);
389 unsigned int (*  Grt)(struct Expression *, struct Operand *, struct Operand *);
390 unsigned int (*  Sma)(struct Expression *, struct Operand *, struct Operand *);
391 unsigned int (*  GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
392 unsigned int (*  SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
393 unsigned int (*  Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
394 } __attribute__ ((gcc_struct));
395
396 struct Operand
397 {
398 int kind;
399 struct Type * type;
400 unsigned int ptrSize;
401 union
402 {
403 char c;
404 unsigned char uc;
405 short s;
406 unsigned short us;
407 int i;
408 unsigned int ui;
409 float f;
410 double d;
411 long long i64;
412 uint64 ui64;
413 } __attribute__ ((gcc_struct)) __anon1;
414 struct OpTable ops;
415 } __attribute__ ((gcc_struct));
416
417 extern struct Operand GetOperand(struct Expression * exp);
418
419 struct __ecereNameSpace__ecere__com__BitMember;
420
421 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);
422
423 struct __ecereNameSpace__ecere__com__BitMember
424 {
425 struct __ecereNameSpace__ecere__com__BitMember * prev;
426 struct __ecereNameSpace__ecere__com__BitMember * next;
427 const char *  name;
428 unsigned int isProperty;
429 int memberAccess;
430 int id;
431 struct __ecereNameSpace__ecere__com__Class * _class;
432 const char *  dataTypeString;
433 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
434 struct Type * dataType;
435 int type;
436 int size;
437 int pos;
438 uint64 mask;
439 } __attribute__ ((gcc_struct));
440
441 struct __ecereNameSpace__ecere__com__Method;
442
443 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
444 {
445 union
446 {
447 struct
448 {
449 const char *  dataTypeString;
450 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
451 } __attribute__ ((gcc_struct)) __anon1;
452 struct __ecereNameSpace__ecere__com__DataValue expression;
453 struct
454 {
455 const char *  memberString;
456 union
457 {
458 struct __ecereNameSpace__ecere__com__DataMember * member;
459 struct __ecereNameSpace__ecere__com__Property * prop;
460 struct __ecereNameSpace__ecere__com__Method * method;
461 } __attribute__ ((gcc_struct)) __anon1;
462 } __attribute__ ((gcc_struct)) __anon2;
463 } __attribute__ ((gcc_struct)) __anon1;
464 } __attribute__ ((gcc_struct));
465
466 struct __ecereNameSpace__ecere__com__Method
467 {
468 const char *  name;
469 struct __ecereNameSpace__ecere__com__Method * parent;
470 struct __ecereNameSpace__ecere__com__Method * left;
471 struct __ecereNameSpace__ecere__com__Method * right;
472 int depth;
473 int (*  function)();
474 int vid;
475 int type;
476 struct __ecereNameSpace__ecere__com__Class * _class;
477 void *  symbol;
478 const char *  dataTypeString;
479 struct Type * dataType;
480 int memberAccess;
481 } __attribute__ ((gcc_struct));
482
483 struct Symbol
484 {
485 char *  string;
486 struct Symbol * parent;
487 struct Symbol * left;
488 struct Symbol * right;
489 int depth;
490 struct Type * type;
491 union
492 {
493 struct __ecereNameSpace__ecere__com__Method * method;
494 struct __ecereNameSpace__ecere__com__Property * _property;
495 struct __ecereNameSpace__ecere__com__Class * registered;
496 } __attribute__ ((gcc_struct)) __anon1;
497 unsigned int notYetDeclared;
498 union
499 {
500 struct
501 {
502 struct External * pointerExternal;
503 struct External * structExternal;
504 } __attribute__ ((gcc_struct)) __anon1;
505 struct
506 {
507 struct External * externalGet;
508 struct External * externalSet;
509 struct External * externalPtr;
510 struct External * externalIsSet;
511 } __attribute__ ((gcc_struct)) __anon2;
512 struct
513 {
514 struct External * methodExternal;
515 struct External * methodCodeExternal;
516 } __attribute__ ((gcc_struct)) __anon3;
517 } __attribute__ ((gcc_struct)) __anon2;
518 unsigned int imported;
519 unsigned int declaredStructSym;
520 struct __ecereNameSpace__ecere__com__Class * _class;
521 unsigned int declaredStruct;
522 unsigned int needConstructor;
523 unsigned int needDestructor;
524 char *  constructorName;
525 char *  structName;
526 char *  className;
527 char *  destructorName;
528 struct ModuleImport * module;
529 struct ClassImport * _import;
530 struct Location nameLoc;
531 unsigned int isParam;
532 unsigned int isRemote;
533 unsigned int isStruct;
534 unsigned int fireWatchersDone;
535 int declaring;
536 unsigned int classData;
537 unsigned int isStatic;
538 char *  shortName;
539 struct __ecereNameSpace__ecere__sys__OldList *  templateParams;
540 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
541 struct Context * ctx;
542 int isIterator;
543 struct Expression * propCategory;
544 } __attribute__ ((gcc_struct));
545
546 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);
547
548 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);
549
550 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);
551
552 struct __ecereNameSpace__ecere__com__Module;
553
554 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char *  name);
555
556 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
557
558 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);
559
560 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);
561
562 struct Identifier;
563
564 struct Declarator
565 {
566 struct Declarator * prev;
567 struct Declarator * next;
568 struct Location loc;
569 int type;
570 struct Symbol * symbol;
571 struct Declarator * declarator;
572 union
573 {
574 struct Identifier * identifier;
575 struct
576 {
577 struct Expression * exp;
578 struct Expression * posExp;
579 struct Attrib * attrib;
580 } __attribute__ ((gcc_struct)) structDecl;
581 struct
582 {
583 struct Expression * exp;
584 struct Specifier * enumClass;
585 } __attribute__ ((gcc_struct)) array;
586 struct
587 {
588 struct __ecereNameSpace__ecere__sys__OldList * parameters;
589 } __attribute__ ((gcc_struct)) function;
590 struct
591 {
592 struct Pointer * pointer;
593 } __attribute__ ((gcc_struct)) pointer;
594 struct
595 {
596 struct ExtDecl * extended;
597 } __attribute__ ((gcc_struct)) extended;
598 } __attribute__ ((gcc_struct)) __anon1;
599 } __attribute__ ((gcc_struct));
600
601 extern struct Identifier * GetDeclId(struct Declarator * decl);
602
603 struct Identifier
604 {
605 struct Identifier * prev;
606 struct Identifier * next;
607 struct Location loc;
608 struct Symbol * classSym;
609 struct Specifier * _class;
610 char *  string;
611 struct Identifier * badID;
612 } __attribute__ ((gcc_struct));
613
614 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
615
616 struct Instantiation;
617
618 struct Expression
619 {
620 struct Expression * prev;
621 struct Expression * next;
622 struct Location loc;
623 int type;
624 union
625 {
626 struct
627 {
628 char *  constant;
629 struct Identifier * identifier;
630 } __attribute__ ((gcc_struct)) __anon1;
631 struct Statement * compound;
632 struct Instantiation * instance;
633 struct
634 {
635 char *  string;
636 unsigned int intlString;
637 unsigned int wideString;
638 } __attribute__ ((gcc_struct)) __anon2;
639 struct __ecereNameSpace__ecere__sys__OldList *  list;
640 struct
641 {
642 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
643 struct Declarator * decl;
644 } __attribute__ ((gcc_struct)) _classExp;
645 struct
646 {
647 struct Identifier * id;
648 } __attribute__ ((gcc_struct)) classData;
649 struct
650 {
651 struct Expression * exp;
652 struct __ecereNameSpace__ecere__sys__OldList * arguments;
653 struct Location argLoc;
654 } __attribute__ ((gcc_struct)) call;
655 struct
656 {
657 struct Expression * exp;
658 struct __ecereNameSpace__ecere__sys__OldList * index;
659 } __attribute__ ((gcc_struct)) index;
660 struct
661 {
662 struct Expression * exp;
663 struct Identifier * member;
664 int memberType;
665 unsigned int thisPtr;
666 } __attribute__ ((gcc_struct)) member;
667 struct
668 {
669 int op;
670 struct Expression * exp1;
671 struct Expression * exp2;
672 } __attribute__ ((gcc_struct)) op;
673 struct TypeName * typeName;
674 struct Specifier * _class;
675 struct
676 {
677 struct TypeName * typeName;
678 struct Expression * exp;
679 } __attribute__ ((gcc_struct)) cast;
680 struct
681 {
682 struct Expression * cond;
683 struct __ecereNameSpace__ecere__sys__OldList * exp;
684 struct Expression * elseExp;
685 } __attribute__ ((gcc_struct)) cond;
686 struct
687 {
688 struct TypeName * typeName;
689 struct Expression * size;
690 } __attribute__ ((gcc_struct)) _new;
691 struct
692 {
693 struct TypeName * typeName;
694 struct Expression * size;
695 struct Expression * exp;
696 } __attribute__ ((gcc_struct)) _renew;
697 struct
698 {
699 char * table;
700 struct Identifier * id;
701 } __attribute__ ((gcc_struct)) db;
702 struct
703 {
704 struct Expression * ds;
705 struct Expression * name;
706 } __attribute__ ((gcc_struct)) dbopen;
707 struct
708 {
709 struct TypeName * typeName;
710 struct Initializer * initializer;
711 } __attribute__ ((gcc_struct)) initializer;
712 struct
713 {
714 struct Expression * exp;
715 struct TypeName * typeName;
716 } __attribute__ ((gcc_struct)) vaArg;
717 } __attribute__ ((gcc_struct)) __anon1;
718 unsigned int debugValue;
719 struct __ecereNameSpace__ecere__com__DataValue val;
720 uint64 address;
721 unsigned int hasAddress;
722 struct Type * expType;
723 struct Type * destType;
724 unsigned int usage;
725 int tempCount;
726 unsigned int byReference;
727 unsigned int isConstant;
728 unsigned int addedThis;
729 unsigned int needCast;
730 unsigned int thisPtr;
731 unsigned int opDestType;
732 unsigned int needTemplateCast;
733 } __attribute__ ((gcc_struct));
734
735 struct Instantiation
736 {
737 struct Instantiation * prev;
738 struct Instantiation * next;
739 struct Location loc;
740 struct Specifier * _class;
741 struct Expression * exp;
742 struct __ecereNameSpace__ecere__sys__OldList *  members;
743 struct Symbol * symbol;
744 unsigned int fullSet;
745 unsigned int isConstant;
746 unsigned char *  data;
747 struct Location nameLoc;
748 struct Location insideLoc;
749 unsigned int built;
750 } __attribute__ ((gcc_struct));
751
752 struct ClassFunction;
753
754 struct ClassFunction
755 {
756 struct ClassFunction * prev;
757 struct ClassFunction * next;
758 struct Location loc;
759 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
760 struct Declarator * declarator;
761 struct __ecereNameSpace__ecere__sys__OldList *  declarations;
762 struct Statement * body;
763 struct __ecereNameSpace__ecere__com__Class * _class;
764 struct __ecereNameSpace__ecere__sys__OldList attached;
765 int declMode;
766 struct Type * type;
767 struct Symbol * propSet;
768 unsigned int isVirtual;
769 unsigned int isConstructor;
770 unsigned int isDestructor;
771 unsigned int dontMangle;
772 int id;
773 int idCode;
774 } __attribute__ ((gcc_struct));
775
776 struct ClassDefinition;
777
778 struct Context
779 {
780 struct Context * parent;
781 struct __ecereNameSpace__ecere__sys__BinaryTree types;
782 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
783 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
784 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
785 int nextID;
786 int simpleID;
787 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
788 struct ClassDefinition * classDef;
789 unsigned int templateTypesOnly;
790 unsigned int hasNameSpace;
791 } __attribute__ ((gcc_struct));
792
793 struct ClassDefinition
794 {
795 struct ClassDefinition * prev;
796 struct ClassDefinition * next;
797 struct Location loc;
798 struct Specifier * _class;
799 struct __ecereNameSpace__ecere__sys__OldList *  baseSpecs;
800 struct __ecereNameSpace__ecere__sys__OldList *  definitions;
801 struct Symbol * symbol;
802 struct Location blockStart;
803 struct Location nameLoc;
804 int declMode;
805 unsigned int deleteWatchable;
806 } __attribute__ ((gcc_struct));
807
808 struct __ecereNameSpace__ecere__com__NameSpace;
809
810 struct __ecereNameSpace__ecere__com__NameSpace
811 {
812 const char *  name;
813 struct __ecereNameSpace__ecere__com__NameSpace *  btParent;
814 struct __ecereNameSpace__ecere__com__NameSpace *  left;
815 struct __ecereNameSpace__ecere__com__NameSpace *  right;
816 int depth;
817 struct __ecereNameSpace__ecere__com__NameSpace *  parent;
818 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
819 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
820 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
821 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
822 } __attribute__ ((gcc_struct));
823
824 struct __ecereNameSpace__ecere__com__Class
825 {
826 struct __ecereNameSpace__ecere__com__Class * prev;
827 struct __ecereNameSpace__ecere__com__Class * next;
828 const char *  name;
829 int offset;
830 int structSize;
831 void * *  _vTbl;
832 int vTblSize;
833 unsigned int (*  Constructor)(void * );
834 void (*  Destructor)(void * );
835 int offsetClass;
836 int sizeClass;
837 struct __ecereNameSpace__ecere__com__Class * base;
838 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
839 struct __ecereNameSpace__ecere__sys__BinaryTree members;
840 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
841 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
842 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
843 struct __ecereNameSpace__ecere__sys__OldList derivatives;
844 int memberID;
845 int startMemberID;
846 int type;
847 struct __ecereNameSpace__ecere__com__Instance * module;
848 struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
849 const char *  dataTypeString;
850 struct Type * dataType;
851 int typeSize;
852 int defaultAlignment;
853 void (*  Initialize)();
854 int memberOffset;
855 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
856 const char *  designerClass;
857 unsigned int noExpansion;
858 const char *  defaultProperty;
859 unsigned int comRedefinition;
860 int count;
861 int isRemote;
862 unsigned int internalDecl;
863 void *  data;
864 unsigned int computeSize;
865 short structAlignment;
866 short pointerAlignment;
867 int destructionWatchOffset;
868 unsigned int fixed;
869 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
870 int inheritanceAccess;
871 const char *  fullName;
872 void *  symbol;
873 struct __ecereNameSpace__ecere__sys__OldList conversions;
874 struct __ecereNameSpace__ecere__sys__OldList templateParams;
875 struct __ecereNameSpace__ecere__com__ClassTemplateArgument *  templateArgs;
876 struct __ecereNameSpace__ecere__com__Class * templateClass;
877 struct __ecereNameSpace__ecere__sys__OldList templatized;
878 int numParams;
879 unsigned int isInstanceClass;
880 unsigned int byValueSystemClass;
881 } __attribute__ ((gcc_struct));
882
883 struct __ecereNameSpace__ecere__com__Application
884 {
885 int argc;
886 const char * *  argv;
887 int exitCode;
888 unsigned int isGUIApp;
889 struct __ecereNameSpace__ecere__sys__OldList allModules;
890 char *  parsedCommand;
891 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
892 } __attribute__ ((gcc_struct));
893
894 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
895
896 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
897
898 struct __ecereNameSpace__ecere__com__Module
899 {
900 struct __ecereNameSpace__ecere__com__Instance * application;
901 struct __ecereNameSpace__ecere__sys__OldList classes;
902 struct __ecereNameSpace__ecere__sys__OldList defines;
903 struct __ecereNameSpace__ecere__sys__OldList functions;
904 struct __ecereNameSpace__ecere__sys__OldList modules;
905 struct __ecereNameSpace__ecere__com__Instance * prev;
906 struct __ecereNameSpace__ecere__com__Instance * next;
907 const char *  name;
908 void *  library;
909 void *  Unload;
910 int importType;
911 int origImportType;
912 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
913 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
914 } __attribute__ ((gcc_struct));
915
916 void __ecereUnregisterModule_firstPass(struct __ecereNameSpace__ecere__com__Instance * module)
917 {
918
919 }
920
921 struct TemplateParameter;
922
923 struct Specifier
924 {
925 struct Specifier * prev;
926 struct Specifier * next;
927 struct Location loc;
928 int type;
929 union
930 {
931 int specifier;
932 struct
933 {
934 struct ExtDecl * extDecl;
935 char *  name;
936 struct Symbol * symbol;
937 struct __ecereNameSpace__ecere__sys__OldList *  templateArgs;
938 } __attribute__ ((gcc_struct)) __anon1;
939 struct
940 {
941 struct Identifier * id;
942 struct __ecereNameSpace__ecere__sys__OldList *  list;
943 struct __ecereNameSpace__ecere__sys__OldList *  baseSpecs;
944 struct __ecereNameSpace__ecere__sys__OldList *  definitions;
945 unsigned int addNameSpace;
946 struct Context * ctx;
947 struct ExtDecl * extDeclStruct;
948 } __attribute__ ((gcc_struct)) __anon2;
949 struct Expression * expression;
950 struct Specifier * _class;
951 struct TemplateParameter * templateParameter;
952 } __attribute__ ((gcc_struct)) __anon1;
953 } __attribute__ ((gcc_struct));
954
955 struct Type
956 {
957 struct Type * prev;
958 struct Type * next;
959 int refCount;
960 union
961 {
962 struct Symbol * _class;
963 struct
964 {
965 struct __ecereNameSpace__ecere__sys__OldList members;
966 char *  enumName;
967 } __attribute__ ((gcc_struct)) __anon1;
968 struct
969 {
970 struct Type * returnType;
971 struct __ecereNameSpace__ecere__sys__OldList params;
972 struct Symbol * thisClass;
973 unsigned int staticMethod;
974 struct TemplateParameter * thisClassTemplate;
975 } __attribute__ ((gcc_struct)) __anon2;
976 struct
977 {
978 struct __ecereNameSpace__ecere__com__Method * method;
979 struct __ecereNameSpace__ecere__com__Class * methodClass;
980 struct __ecereNameSpace__ecere__com__Class * usedClass;
981 } __attribute__ ((gcc_struct)) __anon3;
982 struct
983 {
984 struct Type * arrayType;
985 int arraySize;
986 struct Expression * arraySizeExp;
987 unsigned int freeExp;
988 struct Symbol * enumClass;
989 } __attribute__ ((gcc_struct)) __anon4;
990 struct Type * type;
991 struct TemplateParameter * templateParameter;
992 } __attribute__ ((gcc_struct)) __anon1;
993 int kind;
994 unsigned int size;
995 char *  name;
996 char *  typeName;
997 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
998 int classObjectType;
999 int alignment;
1000 unsigned int offset;
1001 int bitFieldCount;
1002 int count;
1003 unsigned int isSigned : 1;
1004 unsigned int constant : 1;
1005 unsigned int truth : 1;
1006 unsigned int byReference : 1;
1007 unsigned int extraParam : 1;
1008 unsigned int directClassAccess : 1;
1009 unsigned int computing : 1;
1010 unsigned int keepCast : 1;
1011 unsigned int passAsTemplate : 1;
1012 unsigned int dllExport : 1;
1013 unsigned int attrStdcall : 1;
1014 unsigned int declaredWithStruct : 1;
1015 unsigned int typedByReference : 1;
1016 unsigned int casted : 1;
1017 unsigned int pointerAlignment : 1;
1018 } __attribute__ ((gcc_struct));
1019
1020 struct PropertyDef;
1021
1022 struct PropertyDef
1023 {
1024 struct PropertyDef * prev;
1025 struct PropertyDef * next;
1026 struct Location loc;
1027 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
1028 struct Declarator * declarator;
1029 struct Identifier * id;
1030 struct Statement * getStmt;
1031 struct Statement * setStmt;
1032 struct Statement * issetStmt;
1033 struct Symbol * symbol;
1034 struct Expression * category;
1035 struct
1036 {
1037 unsigned int conversion : 1;
1038 unsigned int isWatchable : 1;
1039 unsigned int isDBProp : 1;
1040 } __attribute__ ((gcc_struct)) __anon1;
1041 } __attribute__ ((gcc_struct));
1042
1043 struct TemplateArgument;
1044
1045 struct TemplateParameter
1046 {
1047 struct TemplateParameter * prev;
1048 struct TemplateParameter * next;
1049 struct Location loc;
1050 int type;
1051 struct Identifier * identifier;
1052 union
1053 {
1054 struct TemplateDatatype * dataType;
1055 int memberType;
1056 } __attribute__ ((gcc_struct)) __anon1;
1057 struct TemplateArgument * defaultArgument;
1058 const char *  dataTypeString;
1059 struct Type * baseType;
1060 } __attribute__ ((gcc_struct));
1061
1062 struct TemplateArgument
1063 {
1064 struct TemplateArgument * prev;
1065 struct TemplateArgument * next;
1066 struct Location loc;
1067 struct Identifier * name;
1068 int type;
1069 union
1070 {
1071 struct Expression * expression;
1072 struct Identifier * identifier;
1073 struct TemplateDatatype * templateDatatype;
1074 } __attribute__ ((gcc_struct)) __anon1;
1075 } __attribute__ ((gcc_struct));
1076
1077 struct Declaration;
1078
1079 typedef union YYSTYPE
1080 {
1081 int specifierType;
1082 int i;
1083 int declMode;
1084 struct Identifier * id;
1085 struct Expression * exp;
1086 struct Specifier * specifier;
1087 struct __ecereNameSpace__ecere__sys__OldList * list;
1088 struct Enumerator * enumerator;
1089 struct Declarator * declarator;
1090 struct Pointer * pointer;
1091 struct Initializer * initializer;
1092 struct InitDeclarator * initDeclarator;
1093 struct TypeName * typeName;
1094 struct Declaration * declaration;
1095 struct Statement * stmt;
1096 struct FunctionDefinition * function;
1097 struct External * external;
1098 struct Context * context;
1099 struct AsmField * asmField;
1100 struct Attrib * attrib;
1101 struct ExtDecl * extDecl;
1102 struct Attribute * attribute;
1103 struct Instantiation * instance;
1104 struct MembersInit * membersInit;
1105 struct MemberInit * memberInit;
1106 struct ClassFunction * classFunction;
1107 struct ClassDefinition * _class;
1108 struct ClassDef * classDef;
1109 struct PropertyDef * prop;
1110 char * string;
1111 struct Symbol * symbol;
1112 struct PropertyWatch * propertyWatch;
1113 struct TemplateParameter * templateParameter;
1114 struct TemplateArgument * templateArgument;
1115 struct TemplateDatatype * templateDatatype;
1116 struct DBTableEntry * dbtableEntry;
1117 struct DBIndexItem * dbindexItem;
1118 struct DBTableDef * dbtableDef;
1119 } __attribute__ ((gcc_struct)) YYSTYPE;
1120
1121 extern YYSTYPE yylval;
1122
1123 struct ClassDef
1124 {
1125 struct ClassDef * prev;
1126 struct ClassDef * next;
1127 struct Location loc;
1128 int type;
1129 union
1130 {
1131 struct Declaration * decl;
1132 struct ClassFunction * function;
1133 struct __ecereNameSpace__ecere__sys__OldList *  defProperties;
1134 struct PropertyDef * propertyDef;
1135 struct PropertyWatch * propertyWatch;
1136 char *  designer;
1137 struct Identifier * defaultProperty;
1138 struct
1139 {
1140 struct Identifier * id;
1141 struct Initializer * initializer;
1142 } __attribute__ ((gcc_struct)) __anon1;
1143 } __attribute__ ((gcc_struct)) __anon1;
1144 int memberAccess;
1145 void *  object;
1146 } __attribute__ ((gcc_struct));
1147
1148 struct Declaration
1149 {
1150 struct Declaration * prev;
1151 struct Declaration * next;
1152 struct Location loc;
1153 int type;
1154 union
1155 {
1156 struct
1157 {
1158 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
1159 struct __ecereNameSpace__ecere__sys__OldList *  declarators;
1160 } __attribute__ ((gcc_struct)) __anon1;
1161 struct Instantiation * inst;
1162 struct
1163 {
1164 struct Identifier * id;
1165 struct Expression * exp;
1166 } __attribute__ ((gcc_struct)) __anon2;
1167 } __attribute__ ((gcc_struct)) __anon1;
1168 struct Specifier * extStorage;
1169 struct Symbol * symbol;
1170 int declMode;
1171 } __attribute__ ((gcc_struct));
1172
1173 struct External
1174 {
1175 struct External * prev;
1176 struct External * next;
1177 struct Location loc;
1178 int type;
1179 struct Symbol * symbol;
1180 union
1181 {
1182 struct FunctionDefinition * function;
1183 struct ClassDefinition * _class;
1184 struct Declaration * declaration;
1185 char *  importString;
1186 struct Identifier * id;
1187 struct DBTableDef * table;
1188 } __attribute__ ((gcc_struct)) __anon1;
1189 int importType;
1190 struct External * fwdDecl;
1191 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1192 struct __ecereNameSpace__ecere__com__Instance * incoming;
1193 int nonBreakableIncoming;
1194 } __attribute__ ((gcc_struct));
1195
1196 static void AddDefinitions(struct __ecereNameSpace__ecere__com__Class * regClass, struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__sys__OldList * definitions)
1197 {
1198 if(definitions != (((void *)0)))
1199 {
1200 struct ClassDef * def;
1201
1202 for(def = definitions->first; def; def = def->next)
1203 {
1204 if(def->type == 2)
1205 {
1206 struct Declaration * decl = def->__anon1.decl;
1207 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
1208 struct Type * dataType;
1209
1210 if(decl->type == 0)
1211 {
1212 struct Declarator * d;
1213
1214 if(decl->__anon1.__anon1.declarators)
1215 {
1216 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1217 {
1218 struct Identifier * declId = GetDeclId(d);
1219
1220 if(declId)
1221 {
1222 if(regClass && regClass->type == 2)
1223 {
1224 struct Expression * sizeExp = (d->type == 0) ? d->__anon1.structDecl.exp : (((void *)0));
1225 struct Expression * posExp = (d->type == 0) ? d->__anon1.structDecl.posExp : (((void *)0));
1226 int bitSize = 0, bitPos = -1;
1227 char dataTypeString[8192];
1228
1229 dataTypeString[0] = (char)0;
1230 if(sizeExp)
1231 {
1232 ProcessExpressionType(sizeExp);
1233 ComputeExpression(sizeExp);
1234 if(sizeExp->isConstant)
1235 bitSize = strtol(sizeExp->__anon1.__anon1.constant, (((void *)0)), 0);
1236 FreeExpression(sizeExp);
1237 }
1238 if(posExp)
1239 {
1240 ProcessExpressionType(posExp);
1241 ComputeExpression(posExp);
1242 if(posExp->isConstant)
1243 bitPos = strtol(posExp->__anon1.__anon1.constant, (((void *)0)), 0);
1244 FreeExpression(posExp);
1245 }
1246 if(d->type == 0)
1247 {
1248 d->__anon1.structDecl.posExp = (((void *)0));
1249 d->__anon1.structDecl.exp = (((void *)0));
1250 }
1251 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1252 PrintType(dataType, dataTypeString, 0, 1);
1253 {
1254 struct __ecereNameSpace__ecere__com__BitMember * member = __ecereNameSpace__ecere__com__eClass_AddBitMember(regClass, declId->string, dataTypeString, 0, 0, def->memberAccess);
1255
1256 if(member)
1257 {
1258 member->size = bitSize;
1259 member->pos = bitPos;
1260 }
1261 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)member;
1262 }
1263 if(dataMember)
1264 dataMember->dataType = dataType;
1265 else
1266 {
1267 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), declId->string, regClass->name);
1268 FreeType(dataType);
1269 }
1270 }
1271 else
1272 {
1273 {
1274 char typeString[8192];
1275
1276 typeString[0] = (char)0;
1277 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1278 PrintType(dataType, typeString, 0, 1);
1279 if(member)
1280 {
1281 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, declId->string, typeString, 0, 0, def->memberAccess);
1282 if(!dataMember)
1283 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), declId->string, member->name);
1284 }
1285 else if(regClass)
1286 {
1287 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, declId->string, typeString, 0, 0, def->memberAccess);
1288 if(!dataMember)
1289 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), declId->string, regClass->name);
1290 }
1291 if(dataMember)
1292 dataMember->dataType = dataType;
1293 else
1294 FreeType(dataType);
1295 }
1296 }
1297 }
1298 }
1299 }
1300 else if(decl->__anon1.__anon1.specifiers)
1301 {
1302 struct Specifier * spec;
1303
1304 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
1305 {
1306 if(spec->type == 3 || spec->type == 4)
1307 {
1308 if(spec->__anon1.__anon2.definitions && !spec->__anon1.__anon2.id)
1309 {
1310 struct __ecereNameSpace__ecere__com__DataMember * dataMember = __ecereNameSpace__ecere__com__eMember_New((spec->type == 4) ? 1 : 2, def->memberAccess);
1311
1312 AddDefinitions((((void *)0)), dataMember, spec->__anon1.__anon2.definitions);
1313 if(member)
1314 {
1315 __ecereNameSpace__ecere__com__eMember_AddMember(member, dataMember);
1316 }
1317 else
1318 {
1319 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, dataMember);
1320 }
1321 }
1322 else if(spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id)
1323 {
1324 {
1325 struct Identifier * id = spec->__anon1.__anon2.id;
1326 char typeString[8192];
1327
1328 typeString[0] = (char)0;
1329 spec->__anon1.__anon2.id = (((void *)0));
1330 decl->__anon1.__anon1.declarators = MkListOne(MkDeclaratorIdentifier(id));
1331 dataType = ProcessType(decl->__anon1.__anon1.specifiers, (((void *)0)));
1332 PrintType(dataType, typeString, 0, 1);
1333 if(member)
1334 {
1335 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, id->string, typeString, 0, 0, def->memberAccess);
1336 if(!dataMember)
1337 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), id->string, member->name);
1338 }
1339 else
1340 {
1341 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, id->string, typeString, 0, 0, def->memberAccess);
1342 if(!dataMember)
1343 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), id->string, regClass->name);
1344 }
1345 if(dataMember)
1346 dataMember->dataType = dataType;
1347 else
1348 FreeType(dataType);
1349 }
1350 }
1351 }
1352 }
1353 }
1354 }
1355 else if(decl->type == 2)
1356 {
1357 struct Instantiation * inst = decl->__anon1.inst;
1358 struct Expression * exp = inst->exp;
1359
1360 if(exp)
1361 {
1362 char * string = exp->__anon1.__anon1.identifier->string;
1363
1364 {
1365 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);
1366
1367 if(member)
1368 {
1369 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1370 if(!dataMember)
1371 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), string, member->name);
1372 }
1373 else
1374 {
1375 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1376 if(!dataMember)
1377 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), string, regClass->name);
1378 }
1379 if(dataMember)
1380 dataMember->dataType = dataType;
1381 else
1382 FreeType(dataType);
1383 }
1384 }
1385 }
1386 }
1387 else if(def->type == 3 && def->__anon1.propertyDef)
1388 {
1389 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1390 struct __ecereNameSpace__ecere__com__Property * prop;
1391 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1392
1393 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, propertyDef->__anon1.conversion ? (((void *)0)) : propertyDef->id->string, dataTypeString, inCompiler ? propertyDef->setStmt : (((void *)0)), inCompiler ? propertyDef->getStmt : (((void *)0)), def->memberAccess);
1394 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1395 if(prop)
1396 {
1397 if(inCompiler)
1398 prop->IsSet = (void *)propertyDef->issetStmt;
1399 prop->compiled = 0;
1400 prop->symbol = __extension__ ({
1401 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1402
1403 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(propertyDef->symbol->string), __ecereInstance1->type = propertyDef->symbol->type, __ecereInstance1;
1404 });
1405 ((struct Symbol *)prop->symbol)->propCategory = propertyDef->category;
1406 propertyDef->category = (((void *)0));
1407 if(propertyDef->__anon1.isWatchable)
1408 __ecereNameSpace__ecere__com__eProperty_Watchable(prop);
1409 }
1410 propertyDef->symbol->__anon1._property = prop;
1411 if(propertyDef->symbol->type)
1412 propertyDef->symbol->type->refCount++;
1413 }
1414 else if(def->type == 10 && def->__anon1.propertyDef)
1415 {
1416 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1417 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1418
1419 __ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, propertyDef->id->string, dataTypeString, inCompiler ? propertyDef->setStmt : (((void *)0)), inCompiler ? propertyDef->getStmt : (((void *)0)));
1420 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1421 }
1422 }
1423 }
1424 }
1425
1426 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, struct Location * loc, struct __ecereNameSpace__ecere__sys__OldList * defs, void * after, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators, int declMode)
1427 {
1428 struct __ecereNameSpace__ecere__com__Class * regClass;
1429 struct ClassDef * def;
1430 unsigned int redefinition = 0;
1431
1432 regClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1433 if(regClass && !regClass->internalDecl)
1434 {
1435 if(symbol->parent || (struct Symbol *)globalContext->classes.root == symbol)
1436 {
1437 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->classes, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1438 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1439 }
1440 redefinition = 1;
1441 if(inCompiler)
1442 {
1443 yylloc = *loc;
1444 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "redefinition of class %s\n", (((void *)0))), symbol->string);
1445 return ;
1446 }
1447 }
1448 else
1449 {
1450 char baseName[1024] = "";
1451 unsigned int unitType = 0;
1452 unsigned int wouldBeEnum = 0;
1453 int inheritanceAccess = 1;
1454
1455 if(baseSpecs != (((void *)0)))
1456 {
1457 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
1458
1459 PrintType(baseType, baseName, 0, 1);
1460 if(baseType->kind == 8)
1461 {
1462 if(baseType->__anon1._class->__anon1.registered && classType == 0)
1463 {
1464 if(baseType->__anon1._class->__anon1.registered->type == 3)
1465 classType = 3;
1466 else if(baseType->__anon1._class->__anon1.registered->type == 2)
1467 classType = 2;
1468 else if(baseType->__anon1._class->__anon1.registered->type == 5)
1469 classType = 5;
1470 else if(baseType->__anon1._class->__anon1.registered->type == 4)
1471 {
1472 wouldBeEnum = 1;
1473 }
1474 }
1475 }
1476 else if(baseType->kind == 9 || baseType->kind == 10)
1477 {
1478 classType = 5;
1479 baseName[0] = '\0';
1480 }
1481 else
1482 unitType = 1;
1483 FreeType(baseType);
1484 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
1485 inheritanceAccess = 2;
1486 }
1487 if(classType == 0)
1488 {
1489 if(unitType)
1490 classType = 3;
1491 if(definitions != (((void *)0)))
1492 {
1493 for(def = definitions->first; def; def = def->next)
1494 {
1495 if(def->type == 2)
1496 {
1497 struct Declaration * decl = def->__anon1.decl;
1498
1499 if(decl->type == 0)
1500 {
1501 if(unitType)
1502 {
1503 classType = 2;
1504 break;
1505 }
1506 if(decl->__anon1.__anon1.declarators)
1507 {
1508 struct Declarator * d;
1509
1510 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1511 {
1512 if(d->type != 0)
1513 continue;
1514 if(d->__anon1.structDecl.exp)
1515 {
1516 classType = 2;
1517 break;
1518 }
1519 }
1520 if(d)
1521 break;
1522 }
1523 }
1524 }
1525 }
1526 }
1527 }
1528 if(classType == 0 && wouldBeEnum)
1529 classType = 4;
1530 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, buildingECERECOMModule ? 4 : declMode, inheritanceAccess);
1531 if(regClass)
1532 regClass->symbol = symbol;
1533 }
1534 if(!redefinition)
1535 {
1536 if(classType == 6)
1537 {
1538 struct __ecereNameSpace__ecere__com__DataMember * unionMember = __ecereNameSpace__ecere__com__eMember_New(1, 1);
1539
1540 AddDefinitions(regClass, unionMember, definitions);
1541 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, unionMember);
1542 }
1543 else
1544 AddDefinitions(regClass, (((void *)0)), definitions);
1545 }
1546 if(definitions != (((void *)0)))
1547 {
1548 for(def = definitions->first; def; def = def->next)
1549 {
1550 if(def->type == 0 && (def->__anon1.function->isConstructor || def->__anon1.function->isDestructor))
1551 {
1552 struct Specifier * spec = def->__anon1.function->specifiers ? (*def->__anon1.function->specifiers).last : (((void *)0));
1553
1554 if(!spec || spec->type != 1 || !spec->__anon1.__anon1.name || (strcmp(spec->__anon1.__anon1.name, regClass->name) && (!spec->__anon1.__anon1.symbol || !spec->__anon1.__anon1.symbol->__anon1.registered || strcmp(spec->__anon1.__anon1.symbol->__anon1.registered->name, regClass->name))))
1555 {
1556 yylloc = def->__anon1.function->loc;
1557 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "wrong class name specified for %s\n", (((void *)0))), def->__anon1.function->isConstructor ? __ecereNameSpace__ecere__GetTranslatedString("ec", "constructor", (((void *)0))) : __ecereNameSpace__ecere__GetTranslatedString("ec", "destructor", (((void *)0))));
1558 }
1559 FreeList(def->__anon1.function->specifiers, (void *)(FreeSpecifier));
1560 def->__anon1.function->specifiers = (((void *)0));
1561 }
1562 if(def->type == 0 && def->__anon1.function->declarator)
1563 {
1564 struct ClassFunction * func = def->__anon1.function;
1565
1566 func->_class = regClass;
1567 if(!redefinition && !func->dontMangle)
1568 {
1569 struct Declarator * funcDecl = GetFuncDecl(func->declarator);
1570 struct Identifier * id = GetDeclId(funcDecl);
1571 struct __ecereNameSpace__ecere__com__Method * method;
1572
1573 if(func->isVirtual)
1574 {
1575 char * typeString = StringFromSpecDecl(func->specifiers, func->declarator);
1576
1577 method = __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(regClass, id->string, typeString, inCompiler ? func->declarator->symbol : (((void *)0)), def->memberAccess);
1578 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1579 }
1580 else
1581 {
1582 char * typeString = StringFromSpecDecl(func->specifiers, func->declarator);
1583
1584 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, id->string, typeString, inCompiler ? func->declarator->symbol : (((void *)0)), def->memberAccess);
1585 if(!method)
1586 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Redefinition of method %s in class %s\n", (((void *)0))), id->string, regClass->name);
1587 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1588 }
1589 if(method && (method->type != 1 || method->_class == regClass))
1590 {
1591 method->symbol = __extension__ ({
1592 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1593
1594 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(func->declarator->symbol->string), __ecereInstance1->type = func->declarator->symbol->type, __ecereInstance1->__anon1.method = method, __ecereInstance1;
1595 });
1596 if(func->declarator->symbol->type)
1597 func->declarator->symbol->type->refCount++;
1598 func->declarator->symbol->__anon1.method = method;
1599 }
1600 else
1601 {
1602 func->declarator->symbol->__anon1.method = method;
1603 }
1604 }
1605 }
1606 }
1607 }
1608 if(regClass && symbol->templateParams)
1609 {
1610 struct TemplateParameter * param;
1611
1612 for(param = (*symbol->templateParams).first; param; param = param->next)
1613 {
1614 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg =
1615 {
1616
1617 .__anon1 = {
1618
1619 .__anon1 = {
1620 .dataTypeString = 0
1621 }
1622 }
1623 };
1624
1625 if(param->defaultArgument)
1626 {
1627 switch(param->type)
1628 {
1629 case 0:
1630 defaultArg.__anon1.__anon1.dataTypeString = StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl);
1631 break;
1632 case 1:
1633 {
1634 char memberString[1024];
1635
1636 memberString[0] = '\0';
1637 if(param->defaultArgument->__anon1.identifier->_class)
1638 {
1639 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
1640 {
1641 if(param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter)
1642 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
1643 }
1644 else
1645 {
1646 if(param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
1647 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
1648 }
1649 }
1650 if(memberString[0])
1651 {
1652 strcat(memberString, "::");
1653 }
1654 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
1655 defaultArg.__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(memberString);
1656 break;
1657 }
1658 case 2:
1659 {
1660 struct Operand op;
1661
1662 param->defaultArgument->__anon1.expression->destType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1663 ProcessExpressionType(param->defaultArgument->__anon1.expression);
1664 ComputeExpression(param->defaultArgument->__anon1.expression);
1665 op = GetOperand(param->defaultArgument->__anon1.expression);
1666 defaultArg.__anon1.expression.__anon1.ui64 = op.__anon1.ui64;
1667 break;
1668 }
1669 }
1670 }
1671 if(param->type == 1)
1672 {
1673 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, 1, (void *)(uintptr_t)param->__anon1.memberType, &defaultArg);
1674 }
1675 else
1676 {
1677 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
1678
1679 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, typeString, &defaultArg);
1680 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1681 }
1682 if(param->type == 0 || param->type == 1)
1683 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)defaultArg.__anon1.__anon1.dataTypeString), defaultArg.__anon1.__anon1.dataTypeString = 0);
1684 }
1685 __ecereNameSpace__ecere__com__eClass_DoneAddingTemplateParameters(regClass);
1686 }
1687 }
1688
1689 void PrePreProcessClassDefinitions()
1690 {
1691 struct External * external, * next;
1692
1693 curExternal = (((void *)0));
1694 if(ast)
1695 {
1696 for(external = (*ast).first; external; external = next)
1697 {
1698 next = external->next;
1699 curExternal = external;
1700 if(external->type == 2)
1701 {
1702 struct ClassDefinition * _class = external->__anon1._class;
1703
1704 if(_class->definitions && (!_class->symbol->__anon1.registered || !inCompiler))
1705 {
1706 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), &_class->loc, ast, external->prev, (((void *)0)), _class->declMode);
1707 _class->symbol->isStatic = _class->declMode == 3;
1708 }
1709 }
1710 else if(external->type == 1)
1711 {
1712 struct Declaration * declaration = external->__anon1.declaration;
1713
1714 if(declaration->type == 1)
1715 {
1716 if(declaration->__anon1.__anon1.specifiers)
1717 {
1718 struct Specifier * specifier;
1719
1720 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
1721 {
1722 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)))
1723 {
1724 struct Symbol * type = FindType(globalContext, specifier->__anon1.__anon2.id->string);
1725 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
1726
1727 if(type)
1728 {
1729 declaration->declMode = 0;
1730 if(symbol)
1731 {
1732 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->classes, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1733 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1734 }
1735 }
1736 else if(symbol && !symbol->__anon1.registered)
1737 {
1738 int classType;
1739
1740 if(specifier->type == 2)
1741 classType = 4;
1742 else if(specifier->type == 4)
1743 classType = 6;
1744 else
1745 classType = 1;
1746 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, &specifier->loc, ast, external->prev, declaration->__anon1.__anon1.declarators, declaration->declMode);
1747 symbol->isStatic = declaration->declMode == 3;
1748 }
1749 }
1750 }
1751 }
1752 }
1753 }
1754 else if(external->type == 3)
1755 {
1756 }
1757 }
1758 {
1759 for(external = (*ast).first; external; external = external->next)
1760 {
1761 if(external->type == 2)
1762 {
1763 struct ClassDefinition * _class = external->__anon1._class;
1764
1765 if(_class->symbol)
1766 {
1767 struct __ecereNameSpace__ecere__sys__OldLink * link;
1768
1769 for(link = _class->symbol->templatedClasses.first; link; link = link->next)
1770 {
1771 struct Symbol * symbol = link->data;
1772
1773 symbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1774 }
1775 }
1776 }
1777 else if(external->type == 1)
1778 {
1779 struct Declaration * declaration = external->__anon1.declaration;
1780
1781 if(declaration->type == 1)
1782 {
1783 if(declaration->__anon1.__anon1.specifiers)
1784 {
1785 struct Specifier * specifier;
1786
1787 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
1788 {
1789 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)))
1790 {
1791 struct Symbol * type = FindType(globalContext, specifier->__anon1.__anon2.id->string);
1792 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
1793
1794 if(type)
1795 {
1796 }
1797 else if(symbol)
1798 {
1799 struct __ecereNameSpace__ecere__sys__OldLink * link;
1800
1801 for(link = symbol->templatedClasses.first; link; link = link->next)
1802 {
1803 struct Symbol * tplSymbol = link->data;
1804
1805 tplSymbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, tplSymbol->string);
1806 tplSymbol->module = symbol->module ? symbol->module : mainModule;
1807 }
1808 }
1809 }
1810 }
1811 }
1812 }
1813 }
1814 }
1815 }
1816 }
1817 }
1818
1819 void __ecereRegisterModule_firstPass(struct __ecereNameSpace__ecere__com__Instance * module)
1820 {
1821 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
1822
1823 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrePreProcessClassDefinitions", "void PrePreProcessClassDefinitions(void)", PrePreProcessClassDefinitions, module, 1);
1824 }
1825