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