compiler/libec: Fixed warning in call to Unserialize for struct parameter
[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 int classObjectType;
998 int alignment;
999 unsigned int offset;
1000 int bitFieldCount;
1001 int count;
1002 unsigned int isSigned : 1;
1003 unsigned int constant : 1;
1004 unsigned int truth : 1;
1005 unsigned int byReference : 1;
1006 unsigned int extraParam : 1;
1007 unsigned int directClassAccess : 1;
1008 unsigned int computing : 1;
1009 unsigned int keepCast : 1;
1010 unsigned int passAsTemplate : 1;
1011 unsigned int dllExport : 1;
1012 unsigned int attrStdcall : 1;
1013 unsigned int declaredWithStruct : 1;
1014 unsigned int typedByReference : 1;
1015 unsigned int casted : 1;
1016 unsigned int pointerAlignment : 1;
1017 } __attribute__ ((gcc_struct));
1018
1019 struct PropertyDef;
1020
1021 struct PropertyDef
1022 {
1023 struct PropertyDef * prev;
1024 struct PropertyDef * next;
1025 struct Location loc;
1026 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
1027 struct Declarator * declarator;
1028 struct Identifier * id;
1029 struct Statement * getStmt;
1030 struct Statement * setStmt;
1031 struct Statement * issetStmt;
1032 struct Symbol * symbol;
1033 struct Expression * category;
1034 struct
1035 {
1036 unsigned int conversion : 1;
1037 unsigned int isWatchable : 1;
1038 unsigned int isDBProp : 1;
1039 } __attribute__ ((gcc_struct)) __anon1;
1040 } __attribute__ ((gcc_struct));
1041
1042 struct TemplateArgument;
1043
1044 struct TemplateParameter
1045 {
1046 struct TemplateParameter * prev;
1047 struct TemplateParameter * next;
1048 struct Location loc;
1049 int type;
1050 struct Identifier * identifier;
1051 union
1052 {
1053 struct TemplateDatatype * dataType;
1054 int memberType;
1055 } __attribute__ ((gcc_struct)) __anon1;
1056 struct TemplateArgument * defaultArgument;
1057 const char *  dataTypeString;
1058 struct Type * baseType;
1059 } __attribute__ ((gcc_struct));
1060
1061 struct TemplateArgument
1062 {
1063 struct TemplateArgument * prev;
1064 struct TemplateArgument * next;
1065 struct Location loc;
1066 struct Identifier * name;
1067 int type;
1068 union
1069 {
1070 struct Expression * expression;
1071 struct Identifier * identifier;
1072 struct TemplateDatatype * templateDatatype;
1073 } __attribute__ ((gcc_struct)) __anon1;
1074 } __attribute__ ((gcc_struct));
1075
1076 struct Declaration;
1077
1078 typedef union YYSTYPE
1079 {
1080 int specifierType;
1081 int i;
1082 int declMode;
1083 struct Identifier * id;
1084 struct Expression * exp;
1085 struct Specifier * specifier;
1086 struct __ecereNameSpace__ecere__sys__OldList * list;
1087 struct Enumerator * enumerator;
1088 struct Declarator * declarator;
1089 struct Pointer * pointer;
1090 struct Initializer * initializer;
1091 struct InitDeclarator * initDeclarator;
1092 struct TypeName * typeName;
1093 struct Declaration * declaration;
1094 struct Statement * stmt;
1095 struct FunctionDefinition * function;
1096 struct External * external;
1097 struct Context * context;
1098 struct AsmField * asmField;
1099 struct Attrib * attrib;
1100 struct ExtDecl * extDecl;
1101 struct Attribute * attribute;
1102 struct Instantiation * instance;
1103 struct MembersInit * membersInit;
1104 struct MemberInit * memberInit;
1105 struct ClassFunction * classFunction;
1106 struct ClassDefinition * _class;
1107 struct ClassDef * classDef;
1108 struct PropertyDef * prop;
1109 char * string;
1110 struct Symbol * symbol;
1111 struct PropertyWatch * propertyWatch;
1112 struct TemplateParameter * templateParameter;
1113 struct TemplateArgument * templateArgument;
1114 struct TemplateDatatype * templateDatatype;
1115 struct DBTableEntry * dbtableEntry;
1116 struct DBIndexItem * dbindexItem;
1117 struct DBTableDef * dbtableDef;
1118 } __attribute__ ((gcc_struct)) YYSTYPE;
1119
1120 extern YYSTYPE yylval;
1121
1122 struct ClassDef
1123 {
1124 struct ClassDef * prev;
1125 struct ClassDef * next;
1126 struct Location loc;
1127 int type;
1128 union
1129 {
1130 struct Declaration * decl;
1131 struct ClassFunction * function;
1132 struct __ecereNameSpace__ecere__sys__OldList *  defProperties;
1133 struct PropertyDef * propertyDef;
1134 struct PropertyWatch * propertyWatch;
1135 char *  designer;
1136 struct Identifier * defaultProperty;
1137 struct
1138 {
1139 struct Identifier * id;
1140 struct Initializer * initializer;
1141 } __attribute__ ((gcc_struct)) __anon1;
1142 } __attribute__ ((gcc_struct)) __anon1;
1143 int memberAccess;
1144 void *  object;
1145 } __attribute__ ((gcc_struct));
1146
1147 struct Declaration
1148 {
1149 struct Declaration * prev;
1150 struct Declaration * next;
1151 struct Location loc;
1152 int type;
1153 union
1154 {
1155 struct
1156 {
1157 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
1158 struct __ecereNameSpace__ecere__sys__OldList *  declarators;
1159 } __attribute__ ((gcc_struct)) __anon1;
1160 struct Instantiation * inst;
1161 struct
1162 {
1163 struct Identifier * id;
1164 struct Expression * exp;
1165 } __attribute__ ((gcc_struct)) __anon2;
1166 } __attribute__ ((gcc_struct)) __anon1;
1167 struct Specifier * extStorage;
1168 struct Symbol * symbol;
1169 int declMode;
1170 } __attribute__ ((gcc_struct));
1171
1172 struct External
1173 {
1174 struct External * prev;
1175 struct External * next;
1176 struct Location loc;
1177 int type;
1178 struct Symbol * symbol;
1179 union
1180 {
1181 struct FunctionDefinition * function;
1182 struct ClassDefinition * _class;
1183 struct Declaration * declaration;
1184 char *  importString;
1185 struct Identifier * id;
1186 struct DBTableDef * table;
1187 } __attribute__ ((gcc_struct)) __anon1;
1188 int importType;
1189 struct External * fwdDecl;
1190 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1191 struct __ecereNameSpace__ecere__com__Instance * incoming;
1192 int nonBreakableIncoming;
1193 } __attribute__ ((gcc_struct));
1194
1195 static void AddDefinitions(struct __ecereNameSpace__ecere__com__Class * regClass, struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__sys__OldList * definitions)
1196 {
1197 if(definitions != (((void *)0)))
1198 {
1199 struct ClassDef * def;
1200
1201 for(def = definitions->first; def; def = def->next)
1202 {
1203 if(def->type == 2)
1204 {
1205 struct Declaration * decl = def->__anon1.decl;
1206 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
1207 struct Type * dataType;
1208
1209 if(decl->type == 0)
1210 {
1211 struct Declarator * d;
1212
1213 if(decl->__anon1.__anon1.declarators)
1214 {
1215 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1216 {
1217 struct Identifier * declId = GetDeclId(d);
1218
1219 if(declId)
1220 {
1221 if(regClass && regClass->type == 2)
1222 {
1223 struct Expression * sizeExp = (d->type == 0) ? d->__anon1.structDecl.exp : (((void *)0));
1224 struct Expression * posExp = (d->type == 0) ? d->__anon1.structDecl.posExp : (((void *)0));
1225 int bitSize = 0, bitPos = -1;
1226 char dataTypeString[8192];
1227
1228 dataTypeString[0] = (char)0;
1229 if(sizeExp)
1230 {
1231 ProcessExpressionType(sizeExp);
1232 ComputeExpression(sizeExp);
1233 if(sizeExp->isConstant)
1234 bitSize = strtol(sizeExp->__anon1.__anon1.constant, (((void *)0)), 0);
1235 FreeExpression(sizeExp);
1236 }
1237 if(posExp)
1238 {
1239 ProcessExpressionType(posExp);
1240 ComputeExpression(posExp);
1241 if(posExp->isConstant)
1242 bitPos = strtol(posExp->__anon1.__anon1.constant, (((void *)0)), 0);
1243 FreeExpression(posExp);
1244 }
1245 if(d->type == 0)
1246 {
1247 d->__anon1.structDecl.posExp = (((void *)0));
1248 d->__anon1.structDecl.exp = (((void *)0));
1249 }
1250 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1251 PrintType(dataType, dataTypeString, 0, 1);
1252 {
1253 struct __ecereNameSpace__ecere__com__BitMember * member = __ecereNameSpace__ecere__com__eClass_AddBitMember(regClass, declId->string, dataTypeString, 0, 0, def->memberAccess);
1254
1255 if(member)
1256 {
1257 member->size = bitSize;
1258 member->pos = bitPos;
1259 }
1260 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)member;
1261 }
1262 if(dataMember)
1263 dataMember->dataType = dataType;
1264 else
1265 {
1266 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), declId->string, regClass->name);
1267 FreeType(dataType);
1268 }
1269 }
1270 else
1271 {
1272 {
1273 char typeString[8192];
1274
1275 typeString[0] = (char)0;
1276 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1277 PrintType(dataType, typeString, 0, 1);
1278 if(member)
1279 {
1280 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, declId->string, typeString, 0, 0, def->memberAccess);
1281 if(!dataMember)
1282 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), declId->string, member->name);
1283 }
1284 else if(regClass)
1285 {
1286 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, declId->string, typeString, 0, 0, def->memberAccess);
1287 if(!dataMember)
1288 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), declId->string, regClass->name);
1289 }
1290 if(dataMember)
1291 dataMember->dataType = dataType;
1292 else
1293 FreeType(dataType);
1294 }
1295 }
1296 }
1297 }
1298 }
1299 else if(decl->__anon1.__anon1.specifiers)
1300 {
1301 struct Specifier * spec;
1302
1303 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
1304 {
1305 if(spec->type == 3 || spec->type == 4)
1306 {
1307 if(spec->__anon1.__anon2.definitions && !spec->__anon1.__anon2.id)
1308 {
1309 struct __ecereNameSpace__ecere__com__DataMember * dataMember = __ecereNameSpace__ecere__com__eMember_New((spec->type == 4) ? 1 : 2, def->memberAccess);
1310
1311 AddDefinitions((((void *)0)), dataMember, spec->__anon1.__anon2.definitions);
1312 if(member)
1313 {
1314 __ecereNameSpace__ecere__com__eMember_AddMember(member, dataMember);
1315 }
1316 else
1317 {
1318 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, dataMember);
1319 }
1320 }
1321 else if(spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id)
1322 {
1323 {
1324 struct Identifier * id = spec->__anon1.__anon2.id;
1325 char typeString[8192];
1326
1327 typeString[0] = (char)0;
1328 spec->__anon1.__anon2.id = (((void *)0));
1329 decl->__anon1.__anon1.declarators = MkListOne(MkDeclaratorIdentifier(id));
1330 dataType = ProcessType(decl->__anon1.__anon1.specifiers, (((void *)0)));
1331 PrintType(dataType, typeString, 0, 1);
1332 if(member)
1333 {
1334 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, id->string, typeString, 0, 0, def->memberAccess);
1335 if(!dataMember)
1336 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), id->string, member->name);
1337 }
1338 else
1339 {
1340 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, id->string, typeString, 0, 0, def->memberAccess);
1341 if(!dataMember)
1342 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), id->string, regClass->name);
1343 }
1344 if(dataMember)
1345 dataMember->dataType = dataType;
1346 else
1347 FreeType(dataType);
1348 }
1349 }
1350 }
1351 }
1352 }
1353 }
1354 else if(decl->type == 2)
1355 {
1356 struct Instantiation * inst = decl->__anon1.inst;
1357 struct Expression * exp = inst->exp;
1358
1359 if(exp)
1360 {
1361 char * string = exp->__anon1.__anon1.identifier->string;
1362
1363 {
1364 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);
1365
1366 if(member)
1367 {
1368 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1369 if(!dataMember)
1370 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), string, member->name);
1371 }
1372 else
1373 {
1374 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1375 if(!dataMember)
1376 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), string, regClass->name);
1377 }
1378 if(dataMember)
1379 dataMember->dataType = dataType;
1380 else
1381 FreeType(dataType);
1382 }
1383 }
1384 }
1385 }
1386 else if(def->type == 3 && def->__anon1.propertyDef)
1387 {
1388 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1389 struct __ecereNameSpace__ecere__com__Property * prop;
1390 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1391
1392 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);
1393 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1394 if(prop)
1395 {
1396 if(inCompiler)
1397 prop->IsSet = (void *)propertyDef->issetStmt;
1398 prop->compiled = 0;
1399 prop->symbol = __extension__ ({
1400 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1401
1402 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(propertyDef->symbol->string), __ecereInstance1->type = propertyDef->symbol->type, __ecereInstance1;
1403 });
1404 ((struct Symbol *)prop->symbol)->propCategory = propertyDef->category;
1405 propertyDef->category = (((void *)0));
1406 if(propertyDef->__anon1.isWatchable)
1407 __ecereNameSpace__ecere__com__eProperty_Watchable(prop);
1408 }
1409 propertyDef->symbol->__anon1._property = prop;
1410 if(propertyDef->symbol->type)
1411 propertyDef->symbol->type->refCount++;
1412 }
1413 else if(def->type == 10 && def->__anon1.propertyDef)
1414 {
1415 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1416 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1417
1418 __ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, propertyDef->id->string, dataTypeString, inCompiler ? propertyDef->setStmt : (((void *)0)), inCompiler ? propertyDef->getStmt : (((void *)0)));
1419 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1420 }
1421 }
1422 }
1423 }
1424
1425 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)
1426 {
1427 struct __ecereNameSpace__ecere__com__Class * regClass;
1428 struct ClassDef * def;
1429 unsigned int redefinition = 0;
1430
1431 regClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1432 if(regClass && !regClass->internalDecl)
1433 {
1434 if(symbol->parent || (struct Symbol *)globalContext->classes.root == symbol)
1435 {
1436 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->classes, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1437 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1438 }
1439 redefinition = 1;
1440 if(inCompiler)
1441 {
1442 yylloc = *loc;
1443 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "redefinition of class %s\n", (((void *)0))), symbol->string);
1444 return ;
1445 }
1446 }
1447 else
1448 {
1449 char baseName[1024] = "";
1450 unsigned int unitType = 0;
1451 unsigned int wouldBeEnum = 0;
1452 int inheritanceAccess = 1;
1453
1454 if(baseSpecs != (((void *)0)))
1455 {
1456 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
1457
1458 PrintType(baseType, baseName, 0, 1);
1459 if(baseType->kind == 8)
1460 {
1461 if(baseType->__anon1._class->__anon1.registered && classType == 0)
1462 {
1463 if(baseType->__anon1._class->__anon1.registered->type == 3)
1464 classType = 3;
1465 else if(baseType->__anon1._class->__anon1.registered->type == 2)
1466 classType = 2;
1467 else if(baseType->__anon1._class->__anon1.registered->type == 5)
1468 classType = 5;
1469 else if(baseType->__anon1._class->__anon1.registered->type == 4)
1470 {
1471 wouldBeEnum = 1;
1472 }
1473 }
1474 }
1475 else if(baseType->kind == 9 || baseType->kind == 10)
1476 {
1477 classType = 5;
1478 baseName[0] = '\0';
1479 }
1480 else
1481 unitType = 1;
1482 FreeType(baseType);
1483 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
1484 inheritanceAccess = 2;
1485 }
1486 if(classType == 0)
1487 {
1488 if(unitType)
1489 classType = 3;
1490 if(definitions != (((void *)0)))
1491 {
1492 for(def = definitions->first; def; def = def->next)
1493 {
1494 if(def->type == 2)
1495 {
1496 struct Declaration * decl = def->__anon1.decl;
1497
1498 if(decl->type == 0)
1499 {
1500 if(unitType)
1501 {
1502 classType = 2;
1503 break;
1504 }
1505 if(decl->__anon1.__anon1.declarators)
1506 {
1507 struct Declarator * d;
1508
1509 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1510 {
1511 if(d->type != 0)
1512 continue;
1513 if(d->__anon1.structDecl.exp)
1514 {
1515 classType = 2;
1516 break;
1517 }
1518 }
1519 if(d)
1520 break;
1521 }
1522 }
1523 }
1524 }
1525 }
1526 }
1527 if(classType == 0 && wouldBeEnum)
1528 classType = 4;
1529 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);
1530 if(regClass)
1531 regClass->symbol = symbol;
1532 }
1533 if(!redefinition)
1534 {
1535 if(classType == 6)
1536 {
1537 struct __ecereNameSpace__ecere__com__DataMember * unionMember = __ecereNameSpace__ecere__com__eMember_New(1, 1);
1538
1539 AddDefinitions(regClass, unionMember, definitions);
1540 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, unionMember);
1541 }
1542 else
1543 AddDefinitions(regClass, (((void *)0)), definitions);
1544 }
1545 if(definitions != (((void *)0)))
1546 {
1547 for(def = definitions->first; def; def = def->next)
1548 {
1549 if(def->type == 0 && (def->__anon1.function->isConstructor || def->__anon1.function->isDestructor))
1550 {
1551 struct Specifier * spec = def->__anon1.function->specifiers ? (*def->__anon1.function->specifiers).last : (((void *)0));
1552
1553 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))))
1554 {
1555 yylloc = def->__anon1.function->loc;
1556 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))));
1557 }
1558 FreeList(def->__anon1.function->specifiers, (void *)(FreeSpecifier));
1559 def->__anon1.function->specifiers = (((void *)0));
1560 }
1561 if(def->type == 0 && def->__anon1.function->declarator)
1562 {
1563 struct ClassFunction * func = def->__anon1.function;
1564
1565 func->_class = regClass;
1566 if(!redefinition && !func->dontMangle)
1567 {
1568 struct Declarator * funcDecl = GetFuncDecl(func->declarator);
1569 struct Identifier * id = GetDeclId(funcDecl);
1570 struct __ecereNameSpace__ecere__com__Method * method;
1571
1572 if(func->isVirtual)
1573 {
1574 char * typeString = StringFromSpecDecl(func->specifiers, func->declarator);
1575
1576 method = __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(regClass, id->string, typeString, inCompiler ? func->declarator->symbol : (((void *)0)), def->memberAccess);
1577 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1578 }
1579 else
1580 {
1581 char * typeString = StringFromSpecDecl(func->specifiers, func->declarator);
1582
1583 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, id->string, typeString, inCompiler ? func->declarator->symbol : (((void *)0)), def->memberAccess);
1584 if(!method)
1585 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Redefinition of method %s in class %s\n", (((void *)0))), id->string, regClass->name);
1586 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1587 }
1588 if(method && (method->type != 1 || method->_class == regClass))
1589 {
1590 method->symbol = __extension__ ({
1591 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1592
1593 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(func->declarator->symbol->string), __ecereInstance1->type = func->declarator->symbol->type, __ecereInstance1->__anon1.method = method, __ecereInstance1;
1594 });
1595 if(func->declarator->symbol->type)
1596 func->declarator->symbol->type->refCount++;
1597 func->declarator->symbol->__anon1.method = method;
1598 }
1599 else
1600 {
1601 func->declarator->symbol->__anon1.method = method;
1602 }
1603 }
1604 }
1605 }
1606 }
1607 if(regClass && symbol->templateParams)
1608 {
1609 struct TemplateParameter * param;
1610
1611 for(param = (*symbol->templateParams).first; param; param = param->next)
1612 {
1613 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg =
1614 {
1615
1616 .__anon1 = {
1617
1618 .__anon1 = {
1619 .dataTypeString = 0
1620 }
1621 }
1622 };
1623
1624 if(param->defaultArgument)
1625 {
1626 switch(param->type)
1627 {
1628 case 0:
1629 defaultArg.__anon1.__anon1.dataTypeString = StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl);
1630 break;
1631 case 1:
1632 {
1633 char memberString[1024];
1634
1635 memberString[0] = '\0';
1636 if(param->defaultArgument->__anon1.identifier->_class)
1637 {
1638 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
1639 {
1640 if(param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter)
1641 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
1642 }
1643 else
1644 {
1645 if(param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
1646 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
1647 }
1648 }
1649 if(memberString[0])
1650 {
1651 strcat(memberString, "::");
1652 }
1653 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
1654 defaultArg.__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(memberString);
1655 break;
1656 }
1657 case 2:
1658 {
1659 struct Operand op;
1660
1661 param->defaultArgument->__anon1.expression->destType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1662 ProcessExpressionType(param->defaultArgument->__anon1.expression);
1663 ComputeExpression(param->defaultArgument->__anon1.expression);
1664 op = GetOperand(param->defaultArgument->__anon1.expression);
1665 defaultArg.__anon1.expression.__anon1.ui64 = op.__anon1.ui64;
1666 break;
1667 }
1668 }
1669 }
1670 if(param->type == 1)
1671 {
1672 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, 1, (void *)(uintptr_t)param->__anon1.memberType, &defaultArg);
1673 }
1674 else
1675 {
1676 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
1677
1678 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, typeString, &defaultArg);
1679 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1680 }
1681 if(param->type == 0 || param->type == 1)
1682 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)defaultArg.__anon1.__anon1.dataTypeString), defaultArg.__anon1.__anon1.dataTypeString = 0);
1683 }
1684 __ecereNameSpace__ecere__com__eClass_DoneAddingTemplateParameters(regClass);
1685 }
1686 }
1687
1688 void PrePreProcessClassDefinitions()
1689 {
1690 struct External * external, * next;
1691
1692 curExternal = (((void *)0));
1693 if(ast)
1694 {
1695 for(external = (*ast).first; external; external = next)
1696 {
1697 next = external->next;
1698 curExternal = external;
1699 if(external->type == 2)
1700 {
1701 struct ClassDefinition * _class = external->__anon1._class;
1702
1703 if(_class->definitions && (!_class->symbol->__anon1.registered || !inCompiler))
1704 {
1705 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), &_class->loc, ast, external->prev, (((void *)0)), _class->declMode);
1706 _class->symbol->isStatic = _class->declMode == 3;
1707 }
1708 }
1709 else if(external->type == 1)
1710 {
1711 struct Declaration * declaration = external->__anon1.declaration;
1712
1713 if(declaration->type == 1)
1714 {
1715 if(declaration->__anon1.__anon1.specifiers)
1716 {
1717 struct Specifier * specifier;
1718
1719 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
1720 {
1721 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)))
1722 {
1723 struct Symbol * type = FindType(globalContext, specifier->__anon1.__anon2.id->string);
1724 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
1725
1726 if(type)
1727 {
1728 declaration->declMode = 0;
1729 if(symbol)
1730 {
1731 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->classes, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1732 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1733 }
1734 }
1735 else if(symbol && !symbol->__anon1.registered)
1736 {
1737 int classType;
1738
1739 if(specifier->type == 2)
1740 classType = 4;
1741 else if(specifier->type == 4)
1742 classType = 6;
1743 else
1744 classType = 1;
1745 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);
1746 symbol->isStatic = declaration->declMode == 3;
1747 }
1748 }
1749 }
1750 }
1751 }
1752 }
1753 else if(external->type == 3)
1754 {
1755 }
1756 }
1757 {
1758 for(external = (*ast).first; external; external = external->next)
1759 {
1760 if(external->type == 2)
1761 {
1762 struct ClassDefinition * _class = external->__anon1._class;
1763
1764 if(_class->symbol)
1765 {
1766 struct __ecereNameSpace__ecere__sys__OldLink * link;
1767
1768 for(link = _class->symbol->templatedClasses.first; link; link = link->next)
1769 {
1770 struct Symbol * symbol = link->data;
1771
1772 symbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1773 }
1774 }
1775 }
1776 else if(external->type == 1)
1777 {
1778 struct Declaration * declaration = external->__anon1.declaration;
1779
1780 if(declaration->type == 1)
1781 {
1782 if(declaration->__anon1.__anon1.specifiers)
1783 {
1784 struct Specifier * specifier;
1785
1786 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
1787 {
1788 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)))
1789 {
1790 struct Symbol * type = FindType(globalContext, specifier->__anon1.__anon2.id->string);
1791 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
1792
1793 if(type)
1794 {
1795 }
1796 else if(symbol)
1797 {
1798 struct __ecereNameSpace__ecere__sys__OldLink * link;
1799
1800 for(link = symbol->templatedClasses.first; link; link = link->next)
1801 {
1802 struct Symbol * tplSymbol = link->data;
1803
1804 tplSymbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, tplSymbol->string);
1805 tplSymbol->module = symbol->module ? symbol->module : mainModule;
1806 }
1807 }
1808 }
1809 }
1810 }
1811 }
1812 }
1813 }
1814 }
1815 }
1816 }
1817
1818 void __ecereRegisterModule_firstPass(struct __ecereNameSpace__ecere__com__Instance * module)
1819 {
1820 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
1821
1822 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrePreProcessClassDefinitions", "void PrePreProcessClassDefinitions(void)", PrePreProcessClassDefinitions, module, 1);
1823 }
1824