32b302fae5dbcd0695f98ca07c7c5d573f2dc958
[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 unsigned int mustRegister;
545 } __attribute__ ((gcc_struct));
546
547 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);
548
549 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);
550
551 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);
552
553 struct __ecereNameSpace__ecere__com__Module;
554
555 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char *  name);
556
557 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
558
559 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);
560
561 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);
562
563 struct Identifier;
564
565 struct Declarator
566 {
567 struct Declarator * prev;
568 struct Declarator * next;
569 struct Location loc;
570 int type;
571 struct Symbol * symbol;
572 struct Declarator * declarator;
573 union
574 {
575 struct Identifier * identifier;
576 struct
577 {
578 struct Expression * exp;
579 struct Expression * posExp;
580 struct Attrib * attrib;
581 } __attribute__ ((gcc_struct)) structDecl;
582 struct
583 {
584 struct Expression * exp;
585 struct Specifier * enumClass;
586 } __attribute__ ((gcc_struct)) array;
587 struct
588 {
589 struct __ecereNameSpace__ecere__sys__OldList * parameters;
590 } __attribute__ ((gcc_struct)) function;
591 struct
592 {
593 struct Pointer * pointer;
594 } __attribute__ ((gcc_struct)) pointer;
595 struct
596 {
597 struct ExtDecl * extended;
598 } __attribute__ ((gcc_struct)) extended;
599 } __attribute__ ((gcc_struct)) __anon1;
600 } __attribute__ ((gcc_struct));
601
602 extern struct Identifier * GetDeclId(struct Declarator * decl);
603
604 struct Identifier
605 {
606 struct Identifier * prev;
607 struct Identifier * next;
608 struct Location loc;
609 struct Symbol * classSym;
610 struct Specifier * _class;
611 char *  string;
612 struct Identifier * badID;
613 } __attribute__ ((gcc_struct));
614
615 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
616
617 struct Instantiation;
618
619 struct Expression
620 {
621 struct Expression * prev;
622 struct Expression * next;
623 struct Location loc;
624 int type;
625 union
626 {
627 struct
628 {
629 char *  constant;
630 struct Identifier * identifier;
631 } __attribute__ ((gcc_struct)) __anon1;
632 struct Statement * compound;
633 struct Instantiation * instance;
634 struct
635 {
636 char *  string;
637 unsigned int intlString;
638 unsigned int wideString;
639 } __attribute__ ((gcc_struct)) __anon2;
640 struct __ecereNameSpace__ecere__sys__OldList *  list;
641 struct
642 {
643 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
644 struct Declarator * decl;
645 } __attribute__ ((gcc_struct)) _classExp;
646 struct
647 {
648 struct Identifier * id;
649 } __attribute__ ((gcc_struct)) classData;
650 struct
651 {
652 struct Expression * exp;
653 struct __ecereNameSpace__ecere__sys__OldList * arguments;
654 struct Location argLoc;
655 } __attribute__ ((gcc_struct)) call;
656 struct
657 {
658 struct Expression * exp;
659 struct __ecereNameSpace__ecere__sys__OldList * index;
660 } __attribute__ ((gcc_struct)) index;
661 struct
662 {
663 struct Expression * exp;
664 struct Identifier * member;
665 int memberType;
666 unsigned int thisPtr;
667 } __attribute__ ((gcc_struct)) member;
668 struct
669 {
670 int op;
671 struct Expression * exp1;
672 struct Expression * exp2;
673 } __attribute__ ((gcc_struct)) op;
674 struct TypeName * typeName;
675 struct Specifier * _class;
676 struct
677 {
678 struct TypeName * typeName;
679 struct Expression * exp;
680 } __attribute__ ((gcc_struct)) cast;
681 struct
682 {
683 struct Expression * cond;
684 struct __ecereNameSpace__ecere__sys__OldList * exp;
685 struct Expression * elseExp;
686 } __attribute__ ((gcc_struct)) cond;
687 struct
688 {
689 struct TypeName * typeName;
690 struct Expression * size;
691 } __attribute__ ((gcc_struct)) _new;
692 struct
693 {
694 struct TypeName * typeName;
695 struct Expression * size;
696 struct Expression * exp;
697 } __attribute__ ((gcc_struct)) _renew;
698 struct
699 {
700 char * table;
701 struct Identifier * id;
702 } __attribute__ ((gcc_struct)) db;
703 struct
704 {
705 struct Expression * ds;
706 struct Expression * name;
707 } __attribute__ ((gcc_struct)) dbopen;
708 struct
709 {
710 struct TypeName * typeName;
711 struct Initializer * initializer;
712 } __attribute__ ((gcc_struct)) initializer;
713 struct
714 {
715 struct Expression * exp;
716 struct TypeName * typeName;
717 } __attribute__ ((gcc_struct)) vaArg;
718 } __attribute__ ((gcc_struct)) __anon1;
719 unsigned int debugValue;
720 struct __ecereNameSpace__ecere__com__DataValue val;
721 uint64 address;
722 unsigned int hasAddress;
723 struct Type * expType;
724 struct Type * destType;
725 unsigned int usage;
726 int tempCount;
727 unsigned int byReference;
728 unsigned int isConstant;
729 unsigned int addedThis;
730 unsigned int needCast;
731 unsigned int thisPtr;
732 unsigned int opDestType;
733 unsigned int needTemplateCast;
734 } __attribute__ ((gcc_struct));
735
736 struct Instantiation
737 {
738 struct Instantiation * prev;
739 struct Instantiation * next;
740 struct Location loc;
741 struct Specifier * _class;
742 struct Expression * exp;
743 struct __ecereNameSpace__ecere__sys__OldList *  members;
744 struct Symbol * symbol;
745 unsigned int fullSet;
746 unsigned int isConstant;
747 unsigned char *  data;
748 struct Location nameLoc;
749 struct Location insideLoc;
750 unsigned int built;
751 } __attribute__ ((gcc_struct));
752
753 struct ClassFunction;
754
755 struct ClassFunction
756 {
757 struct ClassFunction * prev;
758 struct ClassFunction * next;
759 struct Location loc;
760 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
761 struct Declarator * declarator;
762 struct __ecereNameSpace__ecere__sys__OldList *  declarations;
763 struct Statement * body;
764 struct __ecereNameSpace__ecere__com__Class * _class;
765 struct __ecereNameSpace__ecere__sys__OldList attached;
766 int declMode;
767 struct Type * type;
768 struct Symbol * propSet;
769 unsigned int isVirtual;
770 unsigned int isConstructor;
771 unsigned int isDestructor;
772 unsigned int dontMangle;
773 int id;
774 int idCode;
775 } __attribute__ ((gcc_struct));
776
777 struct ClassDefinition;
778
779 struct Context
780 {
781 struct Context * parent;
782 struct __ecereNameSpace__ecere__sys__BinaryTree types;
783 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
784 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
785 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
786 int nextID;
787 int simpleID;
788 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
789 struct ClassDefinition * classDef;
790 unsigned int templateTypesOnly;
791 unsigned int hasNameSpace;
792 } __attribute__ ((gcc_struct));
793
794 struct ClassDefinition
795 {
796 struct ClassDefinition * prev;
797 struct ClassDefinition * next;
798 struct Location loc;
799 struct Specifier * _class;
800 struct __ecereNameSpace__ecere__sys__OldList *  baseSpecs;
801 struct __ecereNameSpace__ecere__sys__OldList *  definitions;
802 struct Symbol * symbol;
803 struct Location blockStart;
804 struct Location nameLoc;
805 int declMode;
806 unsigned int deleteWatchable;
807 } __attribute__ ((gcc_struct));
808
809 struct __ecereNameSpace__ecere__com__NameSpace;
810
811 struct __ecereNameSpace__ecere__com__NameSpace
812 {
813 const char *  name;
814 struct __ecereNameSpace__ecere__com__NameSpace *  btParent;
815 struct __ecereNameSpace__ecere__com__NameSpace *  left;
816 struct __ecereNameSpace__ecere__com__NameSpace *  right;
817 int depth;
818 struct __ecereNameSpace__ecere__com__NameSpace *  parent;
819 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
820 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
821 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
822 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
823 } __attribute__ ((gcc_struct));
824
825 struct __ecereNameSpace__ecere__com__Class
826 {
827 struct __ecereNameSpace__ecere__com__Class * prev;
828 struct __ecereNameSpace__ecere__com__Class * next;
829 const char *  name;
830 int offset;
831 int structSize;
832 void * *  _vTbl;
833 int vTblSize;
834 unsigned int (*  Constructor)(void * );
835 void (*  Destructor)(void * );
836 int offsetClass;
837 int sizeClass;
838 struct __ecereNameSpace__ecere__com__Class * base;
839 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
840 struct __ecereNameSpace__ecere__sys__BinaryTree members;
841 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
842 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
843 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
844 struct __ecereNameSpace__ecere__sys__OldList derivatives;
845 int memberID;
846 int startMemberID;
847 int type;
848 struct __ecereNameSpace__ecere__com__Instance * module;
849 struct __ecereNameSpace__ecere__com__NameSpace *  nameSpace;
850 const char *  dataTypeString;
851 struct Type * dataType;
852 int typeSize;
853 int defaultAlignment;
854 void (*  Initialize)();
855 int memberOffset;
856 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
857 const char *  designerClass;
858 unsigned int noExpansion;
859 const char *  defaultProperty;
860 unsigned int comRedefinition;
861 int count;
862 int isRemote;
863 unsigned int internalDecl;
864 void *  data;
865 unsigned int computeSize;
866 short structAlignment;
867 short pointerAlignment;
868 int destructionWatchOffset;
869 unsigned int fixed;
870 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
871 int inheritanceAccess;
872 const char *  fullName;
873 void *  symbol;
874 struct __ecereNameSpace__ecere__sys__OldList conversions;
875 struct __ecereNameSpace__ecere__sys__OldList templateParams;
876 struct __ecereNameSpace__ecere__com__ClassTemplateArgument *  templateArgs;
877 struct __ecereNameSpace__ecere__com__Class * templateClass;
878 struct __ecereNameSpace__ecere__sys__OldList templatized;
879 int numParams;
880 unsigned int isInstanceClass;
881 unsigned int byValueSystemClass;
882 } __attribute__ ((gcc_struct));
883
884 struct __ecereNameSpace__ecere__com__Application
885 {
886 int argc;
887 const char * *  argv;
888 int exitCode;
889 unsigned int isGUIApp;
890 struct __ecereNameSpace__ecere__sys__OldList allModules;
891 char *  parsedCommand;
892 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
893 } __attribute__ ((gcc_struct));
894
895 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
896
897 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
898
899 struct __ecereNameSpace__ecere__com__Module
900 {
901 struct __ecereNameSpace__ecere__com__Instance * application;
902 struct __ecereNameSpace__ecere__sys__OldList classes;
903 struct __ecereNameSpace__ecere__sys__OldList defines;
904 struct __ecereNameSpace__ecere__sys__OldList functions;
905 struct __ecereNameSpace__ecere__sys__OldList modules;
906 struct __ecereNameSpace__ecere__com__Instance * prev;
907 struct __ecereNameSpace__ecere__com__Instance * next;
908 const char *  name;
909 void *  library;
910 void *  Unload;
911 int importType;
912 int origImportType;
913 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
914 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
915 } __attribute__ ((gcc_struct));
916
917 void __ecereUnregisterModule_firstPass(struct __ecereNameSpace__ecere__com__Instance * module)
918 {
919
920 }
921
922 struct TemplateParameter;
923
924 struct Specifier
925 {
926 struct Specifier * prev;
927 struct Specifier * next;
928 struct Location loc;
929 int type;
930 union
931 {
932 int specifier;
933 struct
934 {
935 struct ExtDecl * extDecl;
936 char *  name;
937 struct Symbol * symbol;
938 struct __ecereNameSpace__ecere__sys__OldList *  templateArgs;
939 struct Specifier * nsSpec;
940 } __attribute__ ((gcc_struct)) __anon1;
941 struct
942 {
943 struct Identifier * id;
944 struct __ecereNameSpace__ecere__sys__OldList *  list;
945 struct __ecereNameSpace__ecere__sys__OldList *  baseSpecs;
946 struct __ecereNameSpace__ecere__sys__OldList *  definitions;
947 unsigned int addNameSpace;
948 struct Context * ctx;
949 struct ExtDecl * extDeclStruct;
950 } __attribute__ ((gcc_struct)) __anon2;
951 struct Expression * expression;
952 struct Specifier * _class;
953 struct TemplateParameter * templateParameter;
954 } __attribute__ ((gcc_struct)) __anon1;
955 } __attribute__ ((gcc_struct));
956
957 struct Type
958 {
959 struct Type * prev;
960 struct Type * next;
961 int refCount;
962 union
963 {
964 struct Symbol * _class;
965 struct
966 {
967 struct __ecereNameSpace__ecere__sys__OldList members;
968 char *  enumName;
969 } __attribute__ ((gcc_struct)) __anon1;
970 struct
971 {
972 struct Type * returnType;
973 struct __ecereNameSpace__ecere__sys__OldList params;
974 struct Symbol * thisClass;
975 unsigned int staticMethod;
976 struct TemplateParameter * thisClassTemplate;
977 } __attribute__ ((gcc_struct)) __anon2;
978 struct
979 {
980 struct __ecereNameSpace__ecere__com__Method * method;
981 struct __ecereNameSpace__ecere__com__Class * methodClass;
982 struct __ecereNameSpace__ecere__com__Class * usedClass;
983 } __attribute__ ((gcc_struct)) __anon3;
984 struct
985 {
986 struct Type * arrayType;
987 int arraySize;
988 struct Expression * arraySizeExp;
989 unsigned int freeExp;
990 struct Symbol * enumClass;
991 } __attribute__ ((gcc_struct)) __anon4;
992 struct Type * type;
993 struct TemplateParameter * templateParameter;
994 } __attribute__ ((gcc_struct)) __anon1;
995 int kind;
996 unsigned int size;
997 char *  name;
998 char *  typeName;
999 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1000 int classObjectType;
1001 int alignment;
1002 unsigned int offset;
1003 int bitFieldCount;
1004 int count;
1005 unsigned int isSigned : 1;
1006 unsigned int constant : 1;
1007 unsigned int truth : 1;
1008 unsigned int byReference : 1;
1009 unsigned int extraParam : 1;
1010 unsigned int directClassAccess : 1;
1011 unsigned int computing : 1;
1012 unsigned int keepCast : 1;
1013 unsigned int passAsTemplate : 1;
1014 unsigned int dllExport : 1;
1015 unsigned int attrStdcall : 1;
1016 unsigned int declaredWithStruct : 1;
1017 unsigned int typedByReference : 1;
1018 unsigned int casted : 1;
1019 unsigned int pointerAlignment : 1;
1020 } __attribute__ ((gcc_struct));
1021
1022 struct PropertyDef;
1023
1024 struct PropertyDef
1025 {
1026 struct PropertyDef * prev;
1027 struct PropertyDef * next;
1028 struct Location loc;
1029 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
1030 struct Declarator * declarator;
1031 struct Identifier * id;
1032 struct Statement * getStmt;
1033 struct Statement * setStmt;
1034 struct Statement * issetStmt;
1035 struct Symbol * symbol;
1036 struct Expression * category;
1037 struct
1038 {
1039 unsigned int conversion : 1;
1040 unsigned int isWatchable : 1;
1041 unsigned int isDBProp : 1;
1042 } __attribute__ ((gcc_struct)) __anon1;
1043 } __attribute__ ((gcc_struct));
1044
1045 struct TemplateArgument;
1046
1047 struct TemplateParameter
1048 {
1049 struct TemplateParameter * prev;
1050 struct TemplateParameter * next;
1051 struct Location loc;
1052 int type;
1053 struct Identifier * identifier;
1054 union
1055 {
1056 struct TemplateDatatype * dataType;
1057 int memberType;
1058 } __attribute__ ((gcc_struct)) __anon1;
1059 struct TemplateArgument * defaultArgument;
1060 const char *  dataTypeString;
1061 struct Type * baseType;
1062 } __attribute__ ((gcc_struct));
1063
1064 struct TemplateArgument
1065 {
1066 struct TemplateArgument * prev;
1067 struct TemplateArgument * next;
1068 struct Location loc;
1069 struct Identifier * name;
1070 int type;
1071 union
1072 {
1073 struct Expression * expression;
1074 struct Identifier * identifier;
1075 struct TemplateDatatype * templateDatatype;
1076 } __attribute__ ((gcc_struct)) __anon1;
1077 } __attribute__ ((gcc_struct));
1078
1079 struct Declaration;
1080
1081 typedef union YYSTYPE
1082 {
1083 int specifierType;
1084 int i;
1085 int declMode;
1086 struct Identifier * id;
1087 struct Expression * exp;
1088 struct Specifier * specifier;
1089 struct __ecereNameSpace__ecere__sys__OldList * list;
1090 struct Enumerator * enumerator;
1091 struct Declarator * declarator;
1092 struct Pointer * pointer;
1093 struct Initializer * initializer;
1094 struct InitDeclarator * initDeclarator;
1095 struct TypeName * typeName;
1096 struct Declaration * declaration;
1097 struct Statement * stmt;
1098 struct FunctionDefinition * function;
1099 struct External * external;
1100 struct Context * context;
1101 struct AsmField * asmField;
1102 struct Attrib * attrib;
1103 struct ExtDecl * extDecl;
1104 struct Attribute * attribute;
1105 struct Instantiation * instance;
1106 struct MembersInit * membersInit;
1107 struct MemberInit * memberInit;
1108 struct ClassFunction * classFunction;
1109 struct ClassDefinition * _class;
1110 struct ClassDef * classDef;
1111 struct PropertyDef * prop;
1112 char * string;
1113 struct Symbol * symbol;
1114 struct PropertyWatch * propertyWatch;
1115 struct TemplateParameter * templateParameter;
1116 struct TemplateArgument * templateArgument;
1117 struct TemplateDatatype * templateDatatype;
1118 struct DBTableEntry * dbtableEntry;
1119 struct DBIndexItem * dbindexItem;
1120 struct DBTableDef * dbtableDef;
1121 } __attribute__ ((gcc_struct)) YYSTYPE;
1122
1123 extern YYSTYPE yylval;
1124
1125 struct ClassDef
1126 {
1127 struct ClassDef * prev;
1128 struct ClassDef * next;
1129 struct Location loc;
1130 int type;
1131 union
1132 {
1133 struct Declaration * decl;
1134 struct ClassFunction * function;
1135 struct __ecereNameSpace__ecere__sys__OldList *  defProperties;
1136 struct PropertyDef * propertyDef;
1137 struct PropertyWatch * propertyWatch;
1138 char *  designer;
1139 struct Identifier * defaultProperty;
1140 struct
1141 {
1142 struct Identifier * id;
1143 struct Initializer * initializer;
1144 } __attribute__ ((gcc_struct)) __anon1;
1145 } __attribute__ ((gcc_struct)) __anon1;
1146 int memberAccess;
1147 void *  object;
1148 } __attribute__ ((gcc_struct));
1149
1150 struct Declaration
1151 {
1152 struct Declaration * prev;
1153 struct Declaration * next;
1154 struct Location loc;
1155 int type;
1156 union
1157 {
1158 struct
1159 {
1160 struct __ecereNameSpace__ecere__sys__OldList *  specifiers;
1161 struct __ecereNameSpace__ecere__sys__OldList *  declarators;
1162 } __attribute__ ((gcc_struct)) __anon1;
1163 struct Instantiation * inst;
1164 struct
1165 {
1166 struct Identifier * id;
1167 struct Expression * exp;
1168 } __attribute__ ((gcc_struct)) __anon2;
1169 } __attribute__ ((gcc_struct)) __anon1;
1170 struct Specifier * extStorage;
1171 struct Symbol * symbol;
1172 int declMode;
1173 } __attribute__ ((gcc_struct));
1174
1175 struct External
1176 {
1177 struct External * prev;
1178 struct External * next;
1179 struct Location loc;
1180 int type;
1181 struct Symbol * symbol;
1182 union
1183 {
1184 struct FunctionDefinition * function;
1185 struct ClassDefinition * _class;
1186 struct Declaration * declaration;
1187 char *  importString;
1188 struct Identifier * id;
1189 struct DBTableDef * table;
1190 } __attribute__ ((gcc_struct)) __anon1;
1191 int importType;
1192 struct External * fwdDecl;
1193 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1194 struct __ecereNameSpace__ecere__com__Instance * incoming;
1195 int nonBreakableIncoming;
1196 } __attribute__ ((gcc_struct));
1197
1198 static void AddDefinitions(struct __ecereNameSpace__ecere__com__Class * regClass, struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__sys__OldList * definitions)
1199 {
1200 if(definitions != (((void *)0)))
1201 {
1202 struct ClassDef * def;
1203
1204 for(def = definitions->first; def; def = def->next)
1205 {
1206 if(def->type == 2)
1207 {
1208 struct Declaration * decl = def->__anon1.decl;
1209 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
1210 struct Type * dataType;
1211
1212 if(decl->type == 0)
1213 {
1214 struct Declarator * d;
1215
1216 if(decl->__anon1.__anon1.declarators)
1217 {
1218 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1219 {
1220 struct Identifier * declId = GetDeclId(d);
1221
1222 if(declId)
1223 {
1224 if(regClass && regClass->type == 2)
1225 {
1226 struct Expression * sizeExp = (d->type == 0) ? d->__anon1.structDecl.exp : (((void *)0));
1227 struct Expression * posExp = (d->type == 0) ? d->__anon1.structDecl.posExp : (((void *)0));
1228 int bitSize = 0, bitPos = -1;
1229 char dataTypeString[8192];
1230
1231 dataTypeString[0] = (char)0;
1232 if(sizeExp)
1233 {
1234 ProcessExpressionType(sizeExp);
1235 ComputeExpression(sizeExp);
1236 if(sizeExp->isConstant)
1237 bitSize = strtol(sizeExp->__anon1.__anon1.constant, (((void *)0)), 0);
1238 FreeExpression(sizeExp);
1239 }
1240 if(posExp)
1241 {
1242 ProcessExpressionType(posExp);
1243 ComputeExpression(posExp);
1244 if(posExp->isConstant)
1245 bitPos = strtol(posExp->__anon1.__anon1.constant, (((void *)0)), 0);
1246 FreeExpression(posExp);
1247 }
1248 if(d->type == 0)
1249 {
1250 d->__anon1.structDecl.posExp = (((void *)0));
1251 d->__anon1.structDecl.exp = (((void *)0));
1252 }
1253 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1254 PrintType(dataType, dataTypeString, 0, 1);
1255 {
1256 struct __ecereNameSpace__ecere__com__BitMember * member = __ecereNameSpace__ecere__com__eClass_AddBitMember(regClass, declId->string, dataTypeString, 0, 0, def->memberAccess);
1257
1258 if(member)
1259 {
1260 member->size = bitSize;
1261 member->pos = bitPos;
1262 }
1263 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)member;
1264 }
1265 if(dataMember)
1266 dataMember->dataType = dataType;
1267 else
1268 {
1269 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), declId->string, regClass->name);
1270 FreeType(dataType);
1271 }
1272 }
1273 else
1274 {
1275 {
1276 char typeString[8192];
1277
1278 typeString[0] = (char)0;
1279 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1280 PrintType(dataType, typeString, 0, 1);
1281 if(member)
1282 {
1283 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, declId->string, typeString, 0, 0, def->memberAccess);
1284 if(!dataMember)
1285 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), declId->string, member->name);
1286 }
1287 else if(regClass)
1288 {
1289 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, declId->string, typeString, 0, 0, def->memberAccess);
1290 if(!dataMember)
1291 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), declId->string, regClass->name);
1292 }
1293 if(dataMember)
1294 dataMember->dataType = dataType;
1295 else
1296 FreeType(dataType);
1297 }
1298 }
1299 }
1300 }
1301 }
1302 else if(decl->__anon1.__anon1.specifiers)
1303 {
1304 struct Specifier * spec;
1305
1306 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
1307 {
1308 if(spec->type == 3 || spec->type == 4)
1309 {
1310 if(spec->__anon1.__anon2.definitions && !spec->__anon1.__anon2.id)
1311 {
1312 struct __ecereNameSpace__ecere__com__DataMember * dataMember = __ecereNameSpace__ecere__com__eMember_New((spec->type == 4) ? 1 : 2, def->memberAccess);
1313
1314 AddDefinitions((((void *)0)), dataMember, spec->__anon1.__anon2.definitions);
1315 if(member)
1316 {
1317 __ecereNameSpace__ecere__com__eMember_AddMember(member, dataMember);
1318 }
1319 else
1320 {
1321 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, dataMember);
1322 }
1323 }
1324 else if(spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id)
1325 {
1326 {
1327 struct Identifier * id = spec->__anon1.__anon2.id;
1328 char typeString[8192];
1329
1330 typeString[0] = (char)0;
1331 spec->__anon1.__anon2.id = (((void *)0));
1332 decl->__anon1.__anon1.declarators = MkListOne(MkDeclaratorIdentifier(id));
1333 dataType = ProcessType(decl->__anon1.__anon1.specifiers, (((void *)0)));
1334 PrintType(dataType, typeString, 0, 1);
1335 if(member)
1336 {
1337 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, id->string, typeString, 0, 0, def->memberAccess);
1338 if(!dataMember)
1339 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), id->string, member->name);
1340 }
1341 else
1342 {
1343 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, id->string, typeString, 0, 0, def->memberAccess);
1344 if(!dataMember)
1345 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), id->string, regClass->name);
1346 }
1347 if(dataMember)
1348 dataMember->dataType = dataType;
1349 else
1350 FreeType(dataType);
1351 }
1352 }
1353 }
1354 }
1355 }
1356 }
1357 else if(decl->type == 2)
1358 {
1359 struct Instantiation * inst = decl->__anon1.inst;
1360 struct Expression * exp = inst->exp;
1361
1362 if(exp)
1363 {
1364 char * string = exp->__anon1.__anon1.identifier->string;
1365
1366 {
1367 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);
1368
1369 if(member)
1370 {
1371 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1372 if(!dataMember)
1373 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), string, member->name);
1374 }
1375 else
1376 {
1377 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1378 if(!dataMember)
1379 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), string, regClass->name);
1380 }
1381 if(dataMember)
1382 dataMember->dataType = dataType;
1383 else
1384 FreeType(dataType);
1385 }
1386 }
1387 }
1388 }
1389 else if(def->type == 3 && def->__anon1.propertyDef)
1390 {
1391 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1392 struct __ecereNameSpace__ecere__com__Property * prop;
1393 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1394
1395 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);
1396 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1397 if(prop)
1398 {
1399 if(inCompiler)
1400 prop->IsSet = (void *)propertyDef->issetStmt;
1401 prop->compiled = 0;
1402 prop->symbol = __extension__ ({
1403 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1404
1405 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(propertyDef->symbol->string), __ecereInstance1->type = propertyDef->symbol->type, __ecereInstance1;
1406 });
1407 ((struct Symbol *)prop->symbol)->propCategory = propertyDef->category;
1408 propertyDef->category = (((void *)0));
1409 if(propertyDef->__anon1.isWatchable)
1410 __ecereNameSpace__ecere__com__eProperty_Watchable(prop);
1411 }
1412 propertyDef->symbol->__anon1._property = prop;
1413 if(propertyDef->symbol->type)
1414 propertyDef->symbol->type->refCount++;
1415 }
1416 else if(def->type == 10 && def->__anon1.propertyDef)
1417 {
1418 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1419 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1420
1421 __ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, propertyDef->id->string, dataTypeString, inCompiler ? propertyDef->setStmt : (((void *)0)), inCompiler ? propertyDef->getStmt : (((void *)0)));
1422 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1423 }
1424 }
1425 }
1426 }
1427
1428 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)
1429 {
1430 struct __ecereNameSpace__ecere__com__Class * regClass;
1431 struct ClassDef * def;
1432 unsigned int redefinition = 0;
1433
1434 regClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1435 if(regClass && !regClass->internalDecl)
1436 {
1437 if(symbol->parent || (struct Symbol *)globalContext->classes.root == symbol)
1438 {
1439 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->classes, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1440 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1441 }
1442 redefinition = 1;
1443 if(inCompiler)
1444 {
1445 yylloc = *loc;
1446 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "redefinition of class %s\n", (((void *)0))), symbol->string);
1447 return ;
1448 }
1449 }
1450 else
1451 {
1452 char baseName[1024] = "";
1453 unsigned int unitType = 0;
1454 unsigned int wouldBeEnum = 0;
1455 int inheritanceAccess = 1;
1456
1457 if(baseSpecs != (((void *)0)))
1458 {
1459 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
1460
1461 PrintType(baseType, baseName, 0, 1);
1462 if(baseType->kind == 8)
1463 {
1464 if(baseType->__anon1._class->__anon1.registered && classType == 0)
1465 {
1466 if(baseType->__anon1._class->__anon1.registered->type == 3)
1467 classType = 3;
1468 else if(baseType->__anon1._class->__anon1.registered->type == 2)
1469 classType = 2;
1470 else if(baseType->__anon1._class->__anon1.registered->type == 5)
1471 classType = 5;
1472 else if(baseType->__anon1._class->__anon1.registered->type == 4)
1473 {
1474 wouldBeEnum = 1;
1475 }
1476 }
1477 }
1478 else if(baseType->kind == 9 || baseType->kind == 10)
1479 {
1480 classType = 5;
1481 baseName[0] = '\0';
1482 }
1483 else
1484 unitType = 1;
1485 FreeType(baseType);
1486 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
1487 inheritanceAccess = 2;
1488 }
1489 if(classType == 0)
1490 {
1491 if(unitType)
1492 classType = 3;
1493 if(definitions != (((void *)0)))
1494 {
1495 for(def = definitions->first; def; def = def->next)
1496 {
1497 if(def->type == 2)
1498 {
1499 struct Declaration * decl = def->__anon1.decl;
1500
1501 if(decl->type == 0)
1502 {
1503 if(unitType)
1504 {
1505 classType = 2;
1506 break;
1507 }
1508 if(decl->__anon1.__anon1.declarators)
1509 {
1510 struct Declarator * d;
1511
1512 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1513 {
1514 if(d->type != 0)
1515 continue;
1516 if(d->__anon1.structDecl.exp)
1517 {
1518 classType = 2;
1519 break;
1520 }
1521 }
1522 if(d)
1523 break;
1524 }
1525 }
1526 }
1527 }
1528 }
1529 }
1530 if(classType == 0 && wouldBeEnum)
1531 classType = 4;
1532 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);
1533 if(regClass)
1534 regClass->symbol = symbol;
1535 }
1536 if(!redefinition)
1537 {
1538 if(classType == 6)
1539 {
1540 struct __ecereNameSpace__ecere__com__DataMember * unionMember = __ecereNameSpace__ecere__com__eMember_New(1, 1);
1541
1542 AddDefinitions(regClass, unionMember, definitions);
1543 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, unionMember);
1544 }
1545 else
1546 AddDefinitions(regClass, (((void *)0)), definitions);
1547 }
1548 if(definitions != (((void *)0)))
1549 {
1550 for(def = definitions->first; def; def = def->next)
1551 {
1552 if(def->type == 0 && (def->__anon1.function->isConstructor || def->__anon1.function->isDestructor))
1553 {
1554 struct Specifier * spec = def->__anon1.function->specifiers ? (*def->__anon1.function->specifiers).last : (((void *)0));
1555
1556 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))))
1557 {
1558 yylloc = def->__anon1.function->loc;
1559 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))));
1560 }
1561 FreeList(def->__anon1.function->specifiers, (void *)(FreeSpecifier));
1562 def->__anon1.function->specifiers = (((void *)0));
1563 }
1564 if(def->type == 0 && def->__anon1.function->declarator)
1565 {
1566 struct ClassFunction * func = def->__anon1.function;
1567
1568 func->_class = regClass;
1569 if(!redefinition && !func->dontMangle)
1570 {
1571 struct Declarator * funcDecl = GetFuncDecl(func->declarator);
1572 struct Identifier * id = GetDeclId(funcDecl);
1573 struct __ecereNameSpace__ecere__com__Method * method;
1574
1575 if(func->isVirtual)
1576 {
1577 char * typeString = StringFromSpecDecl(func->specifiers, func->declarator);
1578
1579 method = __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(regClass, id->string, typeString, inCompiler ? func->declarator->symbol : (((void *)0)), def->memberAccess);
1580 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1581 }
1582 else
1583 {
1584 char * typeString = StringFromSpecDecl(func->specifiers, func->declarator);
1585
1586 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, id->string, typeString, inCompiler ? func->declarator->symbol : (((void *)0)), def->memberAccess);
1587 if(!method)
1588 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Redefinition of method %s in class %s\n", (((void *)0))), id->string, regClass->name);
1589 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1590 }
1591 if(method && (method->type != 1 || method->_class == regClass))
1592 {
1593 method->symbol = __extension__ ({
1594 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1595
1596 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(func->declarator->symbol->string), __ecereInstance1->type = func->declarator->symbol->type, __ecereInstance1->__anon1.method = method, __ecereInstance1;
1597 });
1598 if(func->declarator->symbol->type)
1599 func->declarator->symbol->type->refCount++;
1600 func->declarator->symbol->__anon1.method = method;
1601 }
1602 else
1603 {
1604 func->declarator->symbol->__anon1.method = method;
1605 }
1606 }
1607 }
1608 }
1609 }
1610 if(regClass && symbol->templateParams)
1611 {
1612 struct TemplateParameter * param;
1613
1614 for(param = (*symbol->templateParams).first; param; param = param->next)
1615 {
1616 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg =
1617 {
1618
1619 .__anon1 = {
1620
1621 .__anon1 = {
1622 .dataTypeString = 0
1623 }
1624 }
1625 };
1626
1627 if(param->defaultArgument)
1628 {
1629 switch(param->type)
1630 {
1631 case 0:
1632 defaultArg.__anon1.__anon1.dataTypeString = StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl);
1633 break;
1634 case 1:
1635 {
1636 char memberString[1024];
1637
1638 memberString[0] = '\0';
1639 if(param->defaultArgument->__anon1.identifier->_class)
1640 {
1641 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
1642 {
1643 if(param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter)
1644 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
1645 }
1646 else
1647 {
1648 if(param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
1649 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
1650 }
1651 }
1652 if(memberString[0])
1653 {
1654 strcat(memberString, "::");
1655 }
1656 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
1657 defaultArg.__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(memberString);
1658 break;
1659 }
1660 case 2:
1661 {
1662 struct Operand op;
1663
1664 param->defaultArgument->__anon1.expression->destType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1665 ProcessExpressionType(param->defaultArgument->__anon1.expression);
1666 ComputeExpression(param->defaultArgument->__anon1.expression);
1667 op = GetOperand(param->defaultArgument->__anon1.expression);
1668 defaultArg.__anon1.expression.__anon1.ui64 = op.__anon1.ui64;
1669 break;
1670 }
1671 }
1672 }
1673 if(param->type == 1)
1674 {
1675 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, 1, (void *)(uintptr_t)param->__anon1.memberType, &defaultArg);
1676 }
1677 else
1678 {
1679 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
1680
1681 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, typeString, &defaultArg);
1682 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1683 }
1684 if(param->type == 0 || param->type == 1)
1685 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)defaultArg.__anon1.__anon1.dataTypeString), defaultArg.__anon1.__anon1.dataTypeString = 0);
1686 }
1687 __ecereNameSpace__ecere__com__eClass_DoneAddingTemplateParameters(regClass);
1688 }
1689 }
1690
1691 void PrePreProcessClassDefinitions()
1692 {
1693 struct External * external, * next;
1694
1695 curExternal = (((void *)0));
1696 if(ast)
1697 {
1698 for(external = (*ast).first; external; external = next)
1699 {
1700 next = external->next;
1701 curExternal = external;
1702 if(external->type == 2)
1703 {
1704 struct ClassDefinition * _class = external->__anon1._class;
1705
1706 if((!_class->symbol->__anon1.registered || !inCompiler))
1707 {
1708 if(_class->definitions)
1709 _class->symbol->mustRegister = 1;
1710 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), &_class->loc, ast, external->prev, (((void *)0)), _class->declMode);
1711 _class->symbol->isStatic = _class->declMode == 3;
1712 }
1713 }
1714 else if(external->type == 1)
1715 {
1716 struct Declaration * declaration = external->__anon1.declaration;
1717
1718 if(declaration->type == 1)
1719 {
1720 if(declaration->__anon1.__anon1.specifiers)
1721 {
1722 struct Specifier * specifier;
1723
1724 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
1725 {
1726 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)))
1727 {
1728 struct Symbol * type = FindType(globalContext, specifier->__anon1.__anon2.id->string);
1729 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
1730
1731 if(type)
1732 {
1733 declaration->declMode = 0;
1734 if(symbol)
1735 {
1736 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->classes, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1737 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1738 }
1739 }
1740 else if(symbol && !symbol->__anon1.registered)
1741 {
1742 int classType;
1743
1744 if(specifier->type == 2)
1745 classType = 4;
1746 else if(specifier->type == 4)
1747 classType = 6;
1748 else
1749 classType = 1;
1750 if(specifier->__anon1.__anon2.definitions || specifier->type == 2 || specifier->__anon1.__anon2.baseSpecs)
1751 symbol->mustRegister = 1;
1752 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);
1753 symbol->isStatic = declaration->declMode == 3;
1754 }
1755 }
1756 }
1757 }
1758 }
1759 }
1760 else if(external->type == 3)
1761 {
1762 }
1763 }
1764 {
1765 for(external = (*ast).first; external; external = external->next)
1766 {
1767 if(external->type == 2)
1768 {
1769 struct ClassDefinition * _class = external->__anon1._class;
1770
1771 if(_class->symbol)
1772 {
1773 struct __ecereNameSpace__ecere__sys__OldLink * link;
1774
1775 for(link = _class->symbol->templatedClasses.first; link; link = link->next)
1776 {
1777 struct Symbol * symbol = link->data;
1778
1779 symbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1780 }
1781 }
1782 }
1783 else if(external->type == 1)
1784 {
1785 struct Declaration * declaration = external->__anon1.declaration;
1786
1787 if(declaration->type == 1)
1788 {
1789 if(declaration->__anon1.__anon1.specifiers)
1790 {
1791 struct Specifier * specifier;
1792
1793 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
1794 {
1795 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)))
1796 {
1797 struct Symbol * type = FindType(globalContext, specifier->__anon1.__anon2.id->string);
1798 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
1799
1800 if(type)
1801 {
1802 }
1803 else if(symbol)
1804 {
1805 struct __ecereNameSpace__ecere__sys__OldLink * link;
1806
1807 for(link = symbol->templatedClasses.first; link; link = link->next)
1808 {
1809 struct Symbol * tplSymbol = link->data;
1810
1811 tplSymbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, tplSymbol->string);
1812 tplSymbol->module = symbol->module ? symbol->module : mainModule;
1813 }
1814 }
1815 }
1816 }
1817 }
1818 }
1819 }
1820 }
1821 }
1822 }
1823 }
1824
1825 void __ecereRegisterModule_firstPass(struct __ecereNameSpace__ecere__com__Instance * module)
1826 {
1827 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
1828
1829 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrePreProcessClassDefinitions", "void PrePreProcessClassDefinitions(void)", PrePreProcessClassDefinitions, module, 1);
1830 }
1831