1 /* Code generated from eC source file: firstPass.ec */
3 #define __runtimePlatform 1
4 #elif defined(__APPLE__)
5 #define __runtimePlatform 3
7 #define __runtimePlatform 2
10 typedef long long int64;
11 typedef unsigned long long uint64;
15 #elif defined(__TINYC__)
17 #define __builtin_va_list va_list
18 #define __builtin_va_start va_start
19 #define __builtin_va_end va_end
21 #define strcasecmp stricmp
22 #define strncasecmp strnicmp
23 #define __declspec(x) __attribute__((x))
27 typedef long long int64;
28 typedef unsigned long long uint64;
30 typedef __int64 int64;
31 typedef unsigned __int64 uint64;
34 #define __ENDIAN_PAD(x) (8 - (x))
36 #define __ENDIAN_PAD(x) 0
39 #include <sys/types.h>
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
45 extern unsigned int inCompiler;
47 extern unsigned int buildingECERECOMModule;
49 struct __ecereNameSpace__ecere__sys__OldList
56 } __attribute__ ((gcc_struct));
58 struct __ecereNameSpace__ecere__sys__BTNode;
60 struct __ecereNameSpace__ecere__com__DataValue
75 } __attribute__ ((gcc_struct)) __anon1;
76 } __attribute__ ((gcc_struct));
78 struct __ecereNameSpace__ecere__com__SerialBuffer
80 unsigned char * _buffer;
84 } __attribute__ ((gcc_struct));
86 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
88 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
90 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
92 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
94 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
102 struct InitDeclarator;
108 struct FunctionDefinition;
122 struct PropertyWatch;
136 } __attribute__ ((gcc_struct));
138 extern int strtol(const char * , char * * , int base);
140 extern void Compiler_Error(const char * format, ...);
142 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
144 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
150 struct __ecereNameSpace__ecere__com__ClassProperty;
152 extern int strcmp(const char * , const char * );
154 extern char * strcpy(char * , const char * );
156 extern char * strcat(char * , const char * );
158 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
160 struct __ecereNameSpace__ecere__com__LinkList
165 } __attribute__ ((gcc_struct));
167 struct __ecereNameSpace__ecere__com__GlobalFunction;
169 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
171 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
173 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
175 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
177 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
181 struct CodePosition start;
182 struct CodePosition end;
183 } __attribute__ ((gcc_struct));
185 extern struct ModuleImport * mainModule;
187 extern struct Location yylloc;
191 extern void ProcessExpressionType(struct Expression * exp);
193 extern void ComputeExpression(struct Expression * exp);
195 extern void FreeExpression(struct Expression * exp);
199 extern struct Context * globalContext;
203 extern struct External * curExternal;
205 struct __ecereNameSpace__ecere__com__Class;
207 struct __ecereNameSpace__ecere__com__Instance
210 struct __ecereNameSpace__ecere__com__Class * _class;
212 } __attribute__ ((gcc_struct));
214 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
216 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
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);
220 extern void __ecereNameSpace__ecere__com__eClass_DoneAddingTemplateParameters(struct __ecereNameSpace__ecere__com__Class * base);
222 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
224 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
226 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
228 struct __ecereNameSpace__ecere__com__Property;
230 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
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);
234 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
236 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
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);
240 extern void __ecereNameSpace__ecere__com__eProperty_Watchable(struct __ecereNameSpace__ecere__com__Property * _property);
244 extern char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
246 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
248 struct TemplateDatatype
250 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
251 struct Declarator * decl;
252 } __attribute__ ((gcc_struct));
256 struct __ecereNameSpace__ecere__com__Property
258 struct __ecereNameSpace__ecere__com__Property * prev;
259 struct __ecereNameSpace__ecere__com__Property * next;
261 unsigned int isProperty;
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 * );
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));
282 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
284 extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
286 extern void FreeType(struct Type * type);
288 struct __ecereNameSpace__ecere__com__DataMember;
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);
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);
294 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_New(int type, int declMode);
296 extern unsigned int __ecereNameSpace__ecere__com__eMember_AddMember(struct __ecereNameSpace__ecere__com__DataMember * addTo, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
298 extern unsigned int __ecereNameSpace__ecere__com__eClass_AddMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
302 extern void FreeSpecifier(struct Specifier * spec);
306 extern struct Symbol * FindType(struct Context * ctx, const char * name);
308 extern struct Symbol * FindClass(const char * name);
310 struct __ecereNameSpace__ecere__sys__OldLink;
312 struct __ecereNameSpace__ecere__sys__OldLink
314 struct __ecereNameSpace__ecere__sys__OldLink * prev;
315 struct __ecereNameSpace__ecere__sys__OldLink * next;
317 } __attribute__ ((gcc_struct));
319 struct __ecereNameSpace__ecere__sys__BinaryTree;
321 struct __ecereNameSpace__ecere__sys__BinaryTree
323 struct __ecereNameSpace__ecere__sys__BTNode * root;
325 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
326 void (* FreeKey)(void * key);
327 } __attribute__ ((gcc_struct));
329 struct __ecereNameSpace__ecere__com__DataMember
331 struct __ecereNameSpace__ecere__com__DataMember * prev;
332 struct __ecereNameSpace__ecere__com__DataMember * next;
334 unsigned int isProperty;
337 struct __ecereNameSpace__ecere__com__Class * _class;
338 const char * dataTypeString;
339 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
340 struct Type * dataType;
344 struct __ecereNameSpace__ecere__sys__OldList members;
345 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
347 short structAlignment;
348 short pointerAlignment;
349 } __attribute__ ((gcc_struct));
351 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
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));
400 unsigned int ptrSize;
413 } __attribute__ ((gcc_struct)) __anon1;
415 } __attribute__ ((gcc_struct));
417 extern struct Operand GetOperand(struct Expression * exp);
419 struct __ecereNameSpace__ecere__com__BitMember;
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);
423 struct __ecereNameSpace__ecere__com__BitMember
425 struct __ecereNameSpace__ecere__com__BitMember * prev;
426 struct __ecereNameSpace__ecere__com__BitMember * next;
428 unsigned int isProperty;
431 struct __ecereNameSpace__ecere__com__Class * _class;
432 const char * dataTypeString;
433 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
434 struct Type * dataType;
439 } __attribute__ ((gcc_struct));
441 struct __ecereNameSpace__ecere__com__Method;
443 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
449 const char * dataTypeString;
450 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
451 } __attribute__ ((gcc_struct)) __anon1;
452 struct __ecereNameSpace__ecere__com__DataValue expression;
455 const char * memberString;
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));
466 struct __ecereNameSpace__ecere__com__Method
469 struct __ecereNameSpace__ecere__com__Method * parent;
470 struct __ecereNameSpace__ecere__com__Method * left;
471 struct __ecereNameSpace__ecere__com__Method * right;
476 struct __ecereNameSpace__ecere__com__Class * _class;
478 const char * dataTypeString;
479 struct Type * dataType;
481 } __attribute__ ((gcc_struct));
486 struct Symbol * parent;
487 struct Symbol * left;
488 struct Symbol * right;
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;
502 struct External * pointerExternal;
503 struct External * structExternal;
504 } __attribute__ ((gcc_struct)) __anon1;
507 struct External * externalGet;
508 struct External * externalSet;
509 struct External * externalPtr;
510 struct External * externalIsSet;
511 } __attribute__ ((gcc_struct)) __anon2;
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;
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;
536 unsigned int classData;
537 unsigned int isStatic;
539 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
540 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
541 struct Context * ctx;
543 struct Expression * propCategory;
544 } __attribute__ ((gcc_struct));
546 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode);
548 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode);
550 extern struct __ecereNameSpace__ecere__com__ClassTemplateParameter * __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, int type, const void * info, struct __ecereNameSpace__ecere__com__ClassTemplateArgument * defaultArg);
552 struct __ecereNameSpace__ecere__com__Module;
554 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
556 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
558 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, const char * name, const char * baseName, int size, int sizeClass, unsigned int (* Constructor)(void * ), void (* Destructor)(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
560 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(const char * name, const char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
566 struct Declarator * prev;
567 struct Declarator * next;
570 struct Symbol * symbol;
571 struct Declarator * declarator;
574 struct Identifier * identifier;
577 struct Expression * exp;
578 struct Expression * posExp;
579 struct Attrib * attrib;
580 } __attribute__ ((gcc_struct)) structDecl;
583 struct Expression * exp;
584 struct Specifier * enumClass;
585 } __attribute__ ((gcc_struct)) array;
588 struct __ecereNameSpace__ecere__sys__OldList * parameters;
589 } __attribute__ ((gcc_struct)) function;
592 struct Pointer * pointer;
593 } __attribute__ ((gcc_struct)) pointer;
596 struct ExtDecl * extended;
597 } __attribute__ ((gcc_struct)) extended;
598 } __attribute__ ((gcc_struct)) __anon1;
599 } __attribute__ ((gcc_struct));
601 extern struct Identifier * GetDeclId(struct Declarator * decl);
605 struct Identifier * prev;
606 struct Identifier * next;
608 struct Symbol * classSym;
609 struct Specifier * _class;
611 struct Identifier * badID;
612 } __attribute__ ((gcc_struct));
614 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
616 struct Instantiation;
620 struct Expression * prev;
621 struct Expression * next;
629 struct Identifier * identifier;
630 } __attribute__ ((gcc_struct)) __anon1;
631 struct Statement * compound;
632 struct Instantiation * instance;
636 unsigned int intlString;
637 unsigned int wideString;
638 } __attribute__ ((gcc_struct)) __anon2;
639 struct __ecereNameSpace__ecere__sys__OldList * list;
642 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
643 struct Declarator * decl;
644 } __attribute__ ((gcc_struct)) _classExp;
647 struct Identifier * id;
648 } __attribute__ ((gcc_struct)) classData;
651 struct Expression * exp;
652 struct __ecereNameSpace__ecere__sys__OldList * arguments;
653 struct Location argLoc;
654 } __attribute__ ((gcc_struct)) call;
657 struct Expression * exp;
658 struct __ecereNameSpace__ecere__sys__OldList * index;
659 } __attribute__ ((gcc_struct)) index;
662 struct Expression * exp;
663 struct Identifier * member;
665 unsigned int thisPtr;
666 } __attribute__ ((gcc_struct)) member;
670 struct Expression * exp1;
671 struct Expression * exp2;
672 } __attribute__ ((gcc_struct)) op;
673 struct TypeName * typeName;
674 struct Specifier * _class;
677 struct TypeName * typeName;
678 struct Expression * exp;
679 } __attribute__ ((gcc_struct)) cast;
682 struct Expression * cond;
683 struct __ecereNameSpace__ecere__sys__OldList * exp;
684 struct Expression * elseExp;
685 } __attribute__ ((gcc_struct)) cond;
688 struct TypeName * typeName;
689 struct Expression * size;
690 } __attribute__ ((gcc_struct)) _new;
693 struct TypeName * typeName;
694 struct Expression * size;
695 struct Expression * exp;
696 } __attribute__ ((gcc_struct)) _renew;
700 struct Identifier * id;
701 } __attribute__ ((gcc_struct)) db;
704 struct Expression * ds;
705 struct Expression * name;
706 } __attribute__ ((gcc_struct)) dbopen;
709 struct TypeName * typeName;
710 struct Initializer * initializer;
711 } __attribute__ ((gcc_struct)) initializer;
714 struct Expression * exp;
715 struct TypeName * typeName;
716 } __attribute__ ((gcc_struct)) vaArg;
717 } __attribute__ ((gcc_struct)) __anon1;
718 unsigned int debugValue;
719 struct __ecereNameSpace__ecere__com__DataValue val;
721 unsigned int hasAddress;
722 struct Type * expType;
723 struct Type * destType;
726 unsigned int byReference;
727 unsigned int isConstant;
728 unsigned int addedThis;
729 unsigned int needCast;
730 unsigned int thisPtr;
731 unsigned int opDestType;
732 unsigned int needTemplateCast;
733 } __attribute__ ((gcc_struct));
737 struct Instantiation * prev;
738 struct Instantiation * next;
740 struct Specifier * _class;
741 struct Expression * exp;
742 struct __ecereNameSpace__ecere__sys__OldList * members;
743 struct Symbol * symbol;
744 unsigned int fullSet;
745 unsigned int isConstant;
746 unsigned char * data;
747 struct Location nameLoc;
748 struct Location insideLoc;
750 } __attribute__ ((gcc_struct));
752 struct ClassFunction;
756 struct ClassFunction * prev;
757 struct ClassFunction * next;
759 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
760 struct Declarator * declarator;
761 struct __ecereNameSpace__ecere__sys__OldList * declarations;
762 struct Statement * body;
763 struct __ecereNameSpace__ecere__com__Class * _class;
764 struct __ecereNameSpace__ecere__sys__OldList attached;
767 struct Symbol * propSet;
768 unsigned int isVirtual;
769 unsigned int isConstructor;
770 unsigned int isDestructor;
771 unsigned int dontMangle;
774 } __attribute__ ((gcc_struct));
776 struct ClassDefinition;
780 struct Context * parent;
781 struct __ecereNameSpace__ecere__sys__BinaryTree types;
782 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
783 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
784 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
787 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
788 struct ClassDefinition * classDef;
789 unsigned int templateTypesOnly;
790 unsigned int hasNameSpace;
791 } __attribute__ ((gcc_struct));
793 struct ClassDefinition
795 struct ClassDefinition * prev;
796 struct ClassDefinition * next;
798 struct Specifier * _class;
799 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
800 struct __ecereNameSpace__ecere__sys__OldList * definitions;
801 struct Symbol * symbol;
802 struct Location blockStart;
803 struct Location nameLoc;
805 unsigned int deleteWatchable;
806 } __attribute__ ((gcc_struct));
808 struct __ecereNameSpace__ecere__com__NameSpace;
810 struct __ecereNameSpace__ecere__com__NameSpace
813 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
814 struct __ecereNameSpace__ecere__com__NameSpace * left;
815 struct __ecereNameSpace__ecere__com__NameSpace * right;
817 struct __ecereNameSpace__ecere__com__NameSpace * parent;
818 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
819 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
820 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
821 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
822 } __attribute__ ((gcc_struct));
824 struct __ecereNameSpace__ecere__com__Class
826 struct __ecereNameSpace__ecere__com__Class * prev;
827 struct __ecereNameSpace__ecere__com__Class * next;
833 unsigned int (* Constructor)(void * );
834 void (* Destructor)(void * );
837 struct __ecereNameSpace__ecere__com__Class * base;
838 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
839 struct __ecereNameSpace__ecere__sys__BinaryTree members;
840 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
841 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
842 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
843 struct __ecereNameSpace__ecere__sys__OldList derivatives;
847 struct __ecereNameSpace__ecere__com__Instance * module;
848 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
849 const char * dataTypeString;
850 struct Type * dataType;
852 int defaultAlignment;
853 void (* Initialize)();
855 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
856 const char * designerClass;
857 unsigned int noExpansion;
858 const char * defaultProperty;
859 unsigned int comRedefinition;
862 unsigned int internalDecl;
864 unsigned int computeSize;
865 short structAlignment;
866 short pointerAlignment;
867 int destructionWatchOffset;
869 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
870 int inheritanceAccess;
871 const char * fullName;
873 struct __ecereNameSpace__ecere__sys__OldList conversions;
874 struct __ecereNameSpace__ecere__sys__OldList templateParams;
875 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
876 struct __ecereNameSpace__ecere__com__Class * templateClass;
877 struct __ecereNameSpace__ecere__sys__OldList templatized;
879 unsigned int isInstanceClass;
880 unsigned int byValueSystemClass;
881 } __attribute__ ((gcc_struct));
883 struct __ecereNameSpace__ecere__com__Application
888 unsigned int isGUIApp;
889 struct __ecereNameSpace__ecere__sys__OldList allModules;
890 char * parsedCommand;
891 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
892 } __attribute__ ((gcc_struct));
894 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
896 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
898 struct __ecereNameSpace__ecere__com__Module
900 struct __ecereNameSpace__ecere__com__Instance * application;
901 struct __ecereNameSpace__ecere__sys__OldList classes;
902 struct __ecereNameSpace__ecere__sys__OldList defines;
903 struct __ecereNameSpace__ecere__sys__OldList functions;
904 struct __ecereNameSpace__ecere__sys__OldList modules;
905 struct __ecereNameSpace__ecere__com__Instance * prev;
906 struct __ecereNameSpace__ecere__com__Instance * next;
912 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
913 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
914 } __attribute__ ((gcc_struct));
916 void __ecereUnregisterModule_firstPass(struct __ecereNameSpace__ecere__com__Instance * module)
921 struct TemplateParameter;
925 struct Specifier * prev;
926 struct Specifier * next;
934 struct ExtDecl * extDecl;
936 struct Symbol * symbol;
937 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
938 } __attribute__ ((gcc_struct)) __anon1;
941 struct Identifier * id;
942 struct __ecereNameSpace__ecere__sys__OldList * list;
943 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
944 struct __ecereNameSpace__ecere__sys__OldList * definitions;
945 unsigned int addNameSpace;
946 struct Context * ctx;
947 struct ExtDecl * extDeclStruct;
948 } __attribute__ ((gcc_struct)) __anon2;
949 struct Expression * expression;
950 struct Specifier * _class;
951 struct TemplateParameter * templateParameter;
952 } __attribute__ ((gcc_struct)) __anon1;
953 } __attribute__ ((gcc_struct));
962 struct Symbol * _class;
965 struct __ecereNameSpace__ecere__sys__OldList members;
967 } __attribute__ ((gcc_struct)) __anon1;
970 struct Type * returnType;
971 struct __ecereNameSpace__ecere__sys__OldList params;
972 struct Symbol * thisClass;
973 unsigned int staticMethod;
974 struct TemplateParameter * thisClassTemplate;
975 } __attribute__ ((gcc_struct)) __anon2;
978 struct __ecereNameSpace__ecere__com__Method * method;
979 struct __ecereNameSpace__ecere__com__Class * methodClass;
980 struct __ecereNameSpace__ecere__com__Class * usedClass;
981 } __attribute__ ((gcc_struct)) __anon3;
984 struct Type * arrayType;
986 struct Expression * arraySizeExp;
987 unsigned int freeExp;
988 struct Symbol * enumClass;
989 } __attribute__ ((gcc_struct)) __anon4;
991 struct TemplateParameter * templateParameter;
992 } __attribute__ ((gcc_struct)) __anon1;
997 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1000 unsigned int offset;
1003 unsigned int isSigned : 1;
1004 unsigned int constant : 1;
1005 unsigned int truth : 1;
1006 unsigned int byReference : 1;
1007 unsigned int extraParam : 1;
1008 unsigned int directClassAccess : 1;
1009 unsigned int computing : 1;
1010 unsigned int keepCast : 1;
1011 unsigned int passAsTemplate : 1;
1012 unsigned int dllExport : 1;
1013 unsigned int attrStdcall : 1;
1014 unsigned int declaredWithStruct : 1;
1015 unsigned int typedByReference : 1;
1016 unsigned int casted : 1;
1017 unsigned int pointerAlignment : 1;
1018 } __attribute__ ((gcc_struct));
1024 struct PropertyDef * prev;
1025 struct PropertyDef * next;
1026 struct Location loc;
1027 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1028 struct Declarator * declarator;
1029 struct Identifier * id;
1030 struct Statement * getStmt;
1031 struct Statement * setStmt;
1032 struct Statement * issetStmt;
1033 struct Symbol * symbol;
1034 struct Expression * category;
1037 unsigned int conversion : 1;
1038 unsigned int isWatchable : 1;
1039 unsigned int isDBProp : 1;
1040 } __attribute__ ((gcc_struct)) __anon1;
1041 } __attribute__ ((gcc_struct));
1043 struct TemplateArgument;
1045 struct TemplateParameter
1047 struct TemplateParameter * prev;
1048 struct TemplateParameter * next;
1049 struct Location loc;
1051 struct Identifier * identifier;
1054 struct TemplateDatatype * dataType;
1056 } __attribute__ ((gcc_struct)) __anon1;
1057 struct TemplateArgument * defaultArgument;
1058 const char * dataTypeString;
1059 struct Type * baseType;
1060 } __attribute__ ((gcc_struct));
1062 struct TemplateArgument
1064 struct TemplateArgument * prev;
1065 struct TemplateArgument * next;
1066 struct Location loc;
1067 struct Identifier * name;
1071 struct Expression * expression;
1072 struct Identifier * identifier;
1073 struct TemplateDatatype * templateDatatype;
1074 } __attribute__ ((gcc_struct)) __anon1;
1075 } __attribute__ ((gcc_struct));
1079 typedef union YYSTYPE
1084 struct Identifier * id;
1085 struct Expression * exp;
1086 struct Specifier * specifier;
1087 struct __ecereNameSpace__ecere__sys__OldList * list;
1088 struct Enumerator * enumerator;
1089 struct Declarator * declarator;
1090 struct Pointer * pointer;
1091 struct Initializer * initializer;
1092 struct InitDeclarator * initDeclarator;
1093 struct TypeName * typeName;
1094 struct Declaration * declaration;
1095 struct Statement * stmt;
1096 struct FunctionDefinition * function;
1097 struct External * external;
1098 struct Context * context;
1099 struct AsmField * asmField;
1100 struct Attrib * attrib;
1101 struct ExtDecl * extDecl;
1102 struct Attribute * attribute;
1103 struct Instantiation * instance;
1104 struct MembersInit * membersInit;
1105 struct MemberInit * memberInit;
1106 struct ClassFunction * classFunction;
1107 struct ClassDefinition * _class;
1108 struct ClassDef * classDef;
1109 struct PropertyDef * prop;
1111 struct Symbol * symbol;
1112 struct PropertyWatch * propertyWatch;
1113 struct TemplateParameter * templateParameter;
1114 struct TemplateArgument * templateArgument;
1115 struct TemplateDatatype * templateDatatype;
1116 struct DBTableEntry * dbtableEntry;
1117 struct DBIndexItem * dbindexItem;
1118 struct DBTableDef * dbtableDef;
1119 } __attribute__ ((gcc_struct)) YYSTYPE;
1121 extern YYSTYPE yylval;
1125 struct ClassDef * prev;
1126 struct ClassDef * next;
1127 struct Location loc;
1131 struct Declaration * decl;
1132 struct ClassFunction * function;
1133 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1134 struct PropertyDef * propertyDef;
1135 struct PropertyWatch * propertyWatch;
1137 struct Identifier * defaultProperty;
1140 struct Identifier * id;
1141 struct Initializer * initializer;
1142 } __attribute__ ((gcc_struct)) __anon1;
1143 } __attribute__ ((gcc_struct)) __anon1;
1146 } __attribute__ ((gcc_struct));
1150 struct Declaration * prev;
1151 struct Declaration * next;
1152 struct Location loc;
1158 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1159 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1160 } __attribute__ ((gcc_struct)) __anon1;
1161 struct Instantiation * inst;
1164 struct Identifier * id;
1165 struct Expression * exp;
1166 } __attribute__ ((gcc_struct)) __anon2;
1167 } __attribute__ ((gcc_struct)) __anon1;
1168 struct Specifier * extStorage;
1169 struct Symbol * symbol;
1171 } __attribute__ ((gcc_struct));
1175 struct External * prev;
1176 struct External * next;
1177 struct Location loc;
1179 struct Symbol * symbol;
1182 struct FunctionDefinition * function;
1183 struct ClassDefinition * _class;
1184 struct Declaration * declaration;
1185 char * importString;
1186 struct Identifier * id;
1187 struct DBTableDef * table;
1188 } __attribute__ ((gcc_struct)) __anon1;
1190 struct External * fwdDecl;
1191 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1192 struct __ecereNameSpace__ecere__com__Instance * incoming;
1193 int nonBreakableIncoming;
1194 } __attribute__ ((gcc_struct));
1196 static void AddDefinitions(struct __ecereNameSpace__ecere__com__Class * regClass, struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__sys__OldList * definitions)
1198 if(definitions != (((void *)0)))
1200 struct ClassDef * def;
1202 for(def = definitions->first; def; def = def->next)
1206 struct Declaration * decl = def->__anon1.decl;
1207 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
1208 struct Type * dataType;
1212 struct Declarator * d;
1214 if(decl->__anon1.__anon1.declarators)
1216 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1218 struct Identifier * declId = GetDeclId(d);
1222 if(regClass && regClass->type == 2)
1224 struct Expression * sizeExp = (d->type == 0) ? d->__anon1.structDecl.exp : (((void *)0));
1225 struct Expression * posExp = (d->type == 0) ? d->__anon1.structDecl.posExp : (((void *)0));
1226 int bitSize = 0, bitPos = -1;
1227 char dataTypeString[8192];
1229 dataTypeString[0] = (char)0;
1232 ProcessExpressionType(sizeExp);
1233 ComputeExpression(sizeExp);
1234 if(sizeExp->isConstant)
1235 bitSize = strtol(sizeExp->__anon1.__anon1.constant, (((void *)0)), 0);
1236 FreeExpression(sizeExp);
1240 ProcessExpressionType(posExp);
1241 ComputeExpression(posExp);
1242 if(posExp->isConstant)
1243 bitPos = strtol(posExp->__anon1.__anon1.constant, (((void *)0)), 0);
1244 FreeExpression(posExp);
1248 d->__anon1.structDecl.posExp = (((void *)0));
1249 d->__anon1.structDecl.exp = (((void *)0));
1251 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1252 PrintType(dataType, dataTypeString, 0, 1);
1254 struct __ecereNameSpace__ecere__com__BitMember * member = __ecereNameSpace__ecere__com__eClass_AddBitMember(regClass, declId->string, dataTypeString, 0, 0, def->memberAccess);
1258 member->size = bitSize;
1259 member->pos = bitPos;
1261 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)member;
1264 dataMember->dataType = dataType;
1267 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), declId->string, regClass->name);
1274 char typeString[8192];
1276 typeString[0] = (char)0;
1277 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1278 PrintType(dataType, typeString, 0, 1);
1281 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, declId->string, typeString, 0, 0, def->memberAccess);
1283 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), declId->string, member->name);
1287 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, declId->string, typeString, 0, 0, def->memberAccess);
1289 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), declId->string, regClass->name);
1292 dataMember->dataType = dataType;
1300 else if(decl->__anon1.__anon1.specifiers)
1302 struct Specifier * spec;
1304 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
1306 if(spec->type == 3 || spec->type == 4)
1308 if(spec->__anon1.__anon2.definitions && !spec->__anon1.__anon2.id)
1310 struct __ecereNameSpace__ecere__com__DataMember * dataMember = __ecereNameSpace__ecere__com__eMember_New((spec->type == 4) ? 1 : 2, def->memberAccess);
1312 AddDefinitions((((void *)0)), dataMember, spec->__anon1.__anon2.definitions);
1315 __ecereNameSpace__ecere__com__eMember_AddMember(member, dataMember);
1319 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, dataMember);
1322 else if(spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id)
1325 struct Identifier * id = spec->__anon1.__anon2.id;
1326 char typeString[8192];
1328 typeString[0] = (char)0;
1329 spec->__anon1.__anon2.id = (((void *)0));
1330 decl->__anon1.__anon1.declarators = MkListOne(MkDeclaratorIdentifier(id));
1331 dataType = ProcessType(decl->__anon1.__anon1.specifiers, (((void *)0)));
1332 PrintType(dataType, typeString, 0, 1);
1335 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, id->string, typeString, 0, 0, def->memberAccess);
1337 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), id->string, member->name);
1341 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, id->string, typeString, 0, 0, def->memberAccess);
1343 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), id->string, regClass->name);
1346 dataMember->dataType = dataType;
1355 else if(decl->type == 2)
1357 struct Instantiation * inst = decl->__anon1.inst;
1358 struct Expression * exp = inst->exp;
1362 char * string = exp->__anon1.__anon1.identifier->string;
1365 struct Type * dataType = (dataType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dataType->kind = 8, dataType->__anon1._class = inst->_class->__anon1.__anon1.symbol, dataType->refCount = 1, dataType);
1369 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1371 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), string, member->name);
1375 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1377 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), string, regClass->name);
1380 dataMember->dataType = dataType;
1387 else if(def->type == 3 && def->__anon1.propertyDef)
1389 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1390 struct __ecereNameSpace__ecere__com__Property * prop;
1391 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1393 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, propertyDef->__anon1.conversion ? (((void *)0)) : propertyDef->id->string, dataTypeString, inCompiler ? propertyDef->setStmt : (((void *)0)), inCompiler ? propertyDef->getStmt : (((void *)0)), def->memberAccess);
1394 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1398 prop->IsSet = (void *)propertyDef->issetStmt;
1400 prop->symbol = __extension__ ({
1401 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1403 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(propertyDef->symbol->string), __ecereInstance1->type = propertyDef->symbol->type, __ecereInstance1;
1405 ((struct Symbol *)prop->symbol)->propCategory = propertyDef->category;
1406 propertyDef->category = (((void *)0));
1407 if(propertyDef->__anon1.isWatchable)
1408 __ecereNameSpace__ecere__com__eProperty_Watchable(prop);
1410 propertyDef->symbol->__anon1._property = prop;
1411 if(propertyDef->symbol->type)
1412 propertyDef->symbol->type->refCount++;
1414 else if(def->type == 10 && def->__anon1.propertyDef)
1416 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1417 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1419 __ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, propertyDef->id->string, dataTypeString, inCompiler ? propertyDef->setStmt : (((void *)0)), inCompiler ? propertyDef->getStmt : (((void *)0)));
1420 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1426 static void ProcessClass(int classType, struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol, struct __ecereNameSpace__ecere__sys__OldList * baseSpecs, struct __ecereNameSpace__ecere__sys__OldList * enumValues, struct Location * loc, struct __ecereNameSpace__ecere__sys__OldList * defs, void * after, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators, int declMode)
1428 struct __ecereNameSpace__ecere__com__Class * regClass;
1429 struct ClassDef * def;
1430 unsigned int redefinition = 0;
1432 regClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1433 if(regClass && !regClass->internalDecl)
1435 if(symbol->parent || (struct Symbol *)globalContext->classes.root == symbol)
1437 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->classes, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1438 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1444 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "redefinition of class %s\n", (((void *)0))), symbol->string);
1450 char baseName[1024] = "";
1451 unsigned int unitType = 0;
1452 unsigned int wouldBeEnum = 0;
1453 int inheritanceAccess = 1;
1455 if(baseSpecs != (((void *)0)))
1457 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
1459 PrintType(baseType, baseName, 0, 1);
1460 if(baseType->kind == 8)
1462 if(baseType->__anon1._class->__anon1.registered && classType == 0)
1464 if(baseType->__anon1._class->__anon1.registered->type == 3)
1466 else if(baseType->__anon1._class->__anon1.registered->type == 2)
1468 else if(baseType->__anon1._class->__anon1.registered->type == 5)
1470 else if(baseType->__anon1._class->__anon1.registered->type == 4)
1476 else if(baseType->kind == 9 || baseType->kind == 10)
1484 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
1485 inheritanceAccess = 2;
1491 if(definitions != (((void *)0)))
1493 for(def = definitions->first; def; def = def->next)
1497 struct Declaration * decl = def->__anon1.decl;
1506 if(decl->__anon1.__anon1.declarators)
1508 struct Declarator * d;
1510 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1514 if(d->__anon1.structDecl.exp)
1528 if(classType == 0 && wouldBeEnum)
1530 regClass = symbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_RegisterClass((classType == 6) ? 1 : classType, symbol->string, baseName[0] ? baseName : (((void *)0)), 0, 0, (((void *)0)), (((void *)0)), privateModule, buildingECERECOMModule ? 4 : declMode, inheritanceAccess);
1532 regClass->symbol = symbol;
1538 struct __ecereNameSpace__ecere__com__DataMember * unionMember = __ecereNameSpace__ecere__com__eMember_New(1, 1);
1540 AddDefinitions(regClass, unionMember, definitions);
1541 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, unionMember);
1544 AddDefinitions(regClass, (((void *)0)), definitions);
1546 if(definitions != (((void *)0)))
1548 for(def = definitions->first; def; def = def->next)
1550 if(def->type == 0 && (def->__anon1.function->isConstructor || def->__anon1.function->isDestructor))
1552 struct Specifier * spec = def->__anon1.function->specifiers ? (*def->__anon1.function->specifiers).last : (((void *)0));
1554 if(!spec || spec->type != 1 || !spec->__anon1.__anon1.name || (strcmp(spec->__anon1.__anon1.name, regClass->name) && (!spec->__anon1.__anon1.symbol || !spec->__anon1.__anon1.symbol->__anon1.registered || strcmp(spec->__anon1.__anon1.symbol->__anon1.registered->name, regClass->name))))
1556 yylloc = def->__anon1.function->loc;
1557 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "wrong class name specified for %s\n", (((void *)0))), def->__anon1.function->isConstructor ? __ecereNameSpace__ecere__GetTranslatedString("ec", "constructor", (((void *)0))) : __ecereNameSpace__ecere__GetTranslatedString("ec", "destructor", (((void *)0))));
1559 FreeList(def->__anon1.function->specifiers, (void *)(FreeSpecifier));
1560 def->__anon1.function->specifiers = (((void *)0));
1562 if(def->type == 0 && def->__anon1.function->declarator)
1564 struct ClassFunction * func = def->__anon1.function;
1566 func->_class = regClass;
1567 if(!redefinition && !func->dontMangle)
1569 struct Declarator * funcDecl = GetFuncDecl(func->declarator);
1570 struct Identifier * id = GetDeclId(funcDecl);
1571 struct __ecereNameSpace__ecere__com__Method * method;
1575 char * typeString = StringFromSpecDecl(func->specifiers, func->declarator);
1577 method = __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(regClass, id->string, typeString, inCompiler ? func->declarator->symbol : (((void *)0)), def->memberAccess);
1578 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1582 char * typeString = StringFromSpecDecl(func->specifiers, func->declarator);
1584 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, id->string, typeString, inCompiler ? func->declarator->symbol : (((void *)0)), def->memberAccess);
1586 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Redefinition of method %s in class %s\n", (((void *)0))), id->string, regClass->name);
1587 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1589 if(method && (method->type != 1 || method->_class == regClass))
1591 method->symbol = __extension__ ({
1592 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1594 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(func->declarator->symbol->string), __ecereInstance1->type = func->declarator->symbol->type, __ecereInstance1->__anon1.method = method, __ecereInstance1;
1596 if(func->declarator->symbol->type)
1597 func->declarator->symbol->type->refCount++;
1598 func->declarator->symbol->__anon1.method = method;
1602 func->declarator->symbol->__anon1.method = method;
1608 if(regClass && symbol->templateParams)
1610 struct TemplateParameter * param;
1612 for(param = (*symbol->templateParams).first; param; param = param->next)
1614 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg =
1625 if(param->defaultArgument)
1630 defaultArg.__anon1.__anon1.dataTypeString = StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl);
1634 char memberString[1024];
1636 memberString[0] = '\0';
1637 if(param->defaultArgument->__anon1.identifier->_class)
1639 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
1641 if(param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter)
1642 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
1646 if(param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
1647 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
1652 strcat(memberString, "::");
1654 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
1655 defaultArg.__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(memberString);
1662 param->defaultArgument->__anon1.expression->destType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1663 ProcessExpressionType(param->defaultArgument->__anon1.expression);
1664 ComputeExpression(param->defaultArgument->__anon1.expression);
1665 op = GetOperand(param->defaultArgument->__anon1.expression);
1666 defaultArg.__anon1.expression.__anon1.ui64 = op.__anon1.ui64;
1671 if(param->type == 1)
1673 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, 1, (void *)(uintptr_t)param->__anon1.memberType, &defaultArg);
1677 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
1679 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, typeString, &defaultArg);
1680 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1682 if(param->type == 0 || param->type == 1)
1683 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)defaultArg.__anon1.__anon1.dataTypeString), defaultArg.__anon1.__anon1.dataTypeString = 0);
1685 __ecereNameSpace__ecere__com__eClass_DoneAddingTemplateParameters(regClass);
1689 void PrePreProcessClassDefinitions()
1691 struct External * external, * next;
1693 curExternal = (((void *)0));
1696 for(external = (*ast).first; external; external = next)
1698 next = external->next;
1699 curExternal = external;
1700 if(external->type == 2)
1702 struct ClassDefinition * _class = external->__anon1._class;
1704 if(_class->definitions && (!_class->symbol->__anon1.registered || !inCompiler))
1706 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), &_class->loc, ast, external->prev, (((void *)0)), _class->declMode);
1707 _class->symbol->isStatic = _class->declMode == 3;
1710 else if(external->type == 1)
1712 struct Declaration * declaration = external->__anon1.declaration;
1714 if(declaration->type == 1)
1716 if(declaration->__anon1.__anon1.specifiers)
1718 struct Specifier * specifier;
1720 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
1722 if((specifier->type == 2 || specifier->type == 3 || specifier->type == 4) && specifier->__anon1.__anon2.id && specifier->__anon1.__anon2.id->string && (declaration->declMode || specifier->__anon1.__anon2.baseSpecs || (specifier->type == 2 && specifier->__anon1.__anon2.definitions)))
1724 struct Symbol * type = FindType(globalContext, specifier->__anon1.__anon2.id->string);
1725 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
1729 declaration->declMode = 0;
1732 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->classes, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1733 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1736 else if(symbol && !symbol->__anon1.registered)
1740 if(specifier->type == 2)
1742 else if(specifier->type == 4)
1746 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, &specifier->loc, ast, external->prev, declaration->__anon1.__anon1.declarators, declaration->declMode);
1747 symbol->isStatic = declaration->declMode == 3;
1754 else if(external->type == 3)
1759 for(external = (*ast).first; external; external = external->next)
1761 if(external->type == 2)
1763 struct ClassDefinition * _class = external->__anon1._class;
1767 struct __ecereNameSpace__ecere__sys__OldLink * link;
1769 for(link = _class->symbol->templatedClasses.first; link; link = link->next)
1771 struct Symbol * symbol = link->data;
1773 symbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1777 else if(external->type == 1)
1779 struct Declaration * declaration = external->__anon1.declaration;
1781 if(declaration->type == 1)
1783 if(declaration->__anon1.__anon1.specifiers)
1785 struct Specifier * specifier;
1787 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
1789 if((specifier->type == 2 || specifier->type == 3 || specifier->type == 4) && specifier->__anon1.__anon2.id && specifier->__anon1.__anon2.id->string && (declaration->declMode || specifier->__anon1.__anon2.baseSpecs || (specifier->type == 2 && specifier->__anon1.__anon2.definitions)))
1791 struct Symbol * type = FindType(globalContext, specifier->__anon1.__anon2.id->string);
1792 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
1799 struct __ecereNameSpace__ecere__sys__OldLink * link;
1801 for(link = symbol->templatedClasses.first; link; link = link->next)
1803 struct Symbol * tplSymbol = link->data;
1805 tplSymbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, tplSymbol->string);
1806 tplSymbol->module = symbol->module ? symbol->module : mainModule;
1819 void __ecereRegisterModule_firstPass(struct __ecereNameSpace__ecere__com__Instance * module)
1821 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
1823 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrePreProcessClassDefinitions", "void PrePreProcessClassDefinitions(void)", PrePreProcessClassDefinitions, module, 1);