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 # if defined(__GNUC__) || defined(__TINYC__)
40 # define ecere_stdcall __attribute__((__stdcall__))
42 # define ecere_stdcall __stdcall
45 # define ecere_stdcall
48 #include <sys/types.h>
51 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366, BOOL = 367, _BOOL = 368, _COMPLEX = 369, _IMAGINARY = 370, RESTRICT = 371, THREAD = 372, WIDE_STRING_LITERAL = 373
54 extern unsigned int inCompiler;
56 extern unsigned int buildingECERECOMModule;
58 struct __ecereNameSpace__ecere__sys__OldList
65 } __attribute__ ((gcc_struct));
67 struct __ecereNameSpace__ecere__sys__BTNode;
69 struct __ecereNameSpace__ecere__com__DataValue
84 } __attribute__ ((gcc_struct)) __anon1;
85 } __attribute__ ((gcc_struct));
87 struct __ecereNameSpace__ecere__com__SerialBuffer
89 unsigned char * _buffer;
93 } __attribute__ ((gcc_struct));
95 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
97 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
99 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
101 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
103 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
111 struct InitDeclarator;
117 struct FunctionDefinition;
131 struct PropertyWatch;
145 } __attribute__ ((gcc_struct));
147 extern int strtol(const char * , char * * , int base);
149 extern void Compiler_Error(const char * format, ...);
151 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
153 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
159 struct __ecereNameSpace__ecere__com__ClassProperty;
161 extern int strcmp(const char * , const char * );
163 extern char * strcpy(char * , const char * );
165 extern char * strcat(char * , const char * );
167 struct __ecereNameSpace__ecere__com__ClassTemplateParameter;
169 struct __ecereNameSpace__ecere__com__LinkList
174 } __attribute__ ((gcc_struct));
176 struct __ecereNameSpace__ecere__com__GlobalFunction;
178 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
180 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
182 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
184 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
186 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
190 struct CodePosition start;
191 struct CodePosition end;
192 } __attribute__ ((gcc_struct));
194 extern struct ModuleImport * mainModule;
196 extern struct Location yylloc;
200 extern void ProcessExpressionType(struct Expression * exp);
202 extern void ComputeExpression(struct Expression * exp);
204 extern void FreeExpression(struct Expression * exp);
208 extern struct Context * globalContext;
212 extern struct External * curExternal;
214 struct __ecereNameSpace__ecere__com__Class;
216 struct __ecereNameSpace__ecere__com__Instance
219 struct __ecereNameSpace__ecere__com__Class * _class;
221 } __attribute__ ((gcc_struct));
223 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
225 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
227 extern struct __ecereNameSpace__ecere__com__ClassProperty * __ecereNameSpace__ecere__com__eClass_AddClassProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * dataType, void * setStmt, void * getStmt);
229 extern void __ecereNameSpace__ecere__com__eClass_DoneAddingTemplateParameters(struct __ecereNameSpace__ecere__com__Class * base);
231 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
233 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
235 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
237 struct __ecereNameSpace__ecere__com__Property;
239 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
241 extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
243 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
245 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
247 extern struct __ecereNameSpace__ecere__com__Property * __ecereNameSpace__ecere__com__eClass_AddProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * dataType, void * setStmt, void * getStmt, int declMode);
249 extern void __ecereNameSpace__ecere__com__eProperty_Watchable(struct __ecereNameSpace__ecere__com__Property * _property);
253 extern char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
255 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
257 struct TemplateDatatype
259 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
260 struct Declarator * decl;
261 } __attribute__ ((gcc_struct));
265 struct __ecereNameSpace__ecere__com__Property
267 struct __ecereNameSpace__ecere__com__Property * prev;
268 struct __ecereNameSpace__ecere__com__Property * next;
270 unsigned int isProperty;
273 struct __ecereNameSpace__ecere__com__Class * _class;
274 const char * dataTypeString;
275 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
276 struct Type * dataType;
277 void (* Set)(void * , int);
278 int (* Get)(void * );
279 unsigned int (* IsSet)(void * );
283 unsigned int conversion;
284 unsigned int watcherOffset;
285 const char * category;
286 unsigned int compiled;
287 unsigned int selfWatchable;
288 unsigned int isWatchable;
289 } __attribute__ ((gcc_struct));
291 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
293 extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
295 extern void FreeType(struct Type * type);
297 struct __ecereNameSpace__ecere__com__DataMember;
299 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_AddDataMember(struct __ecereNameSpace__ecere__com__DataMember * member, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode);
301 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_AddDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, unsigned int size, unsigned int alignment, int declMode);
303 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eMember_New(int type, int declMode);
305 extern unsigned int __ecereNameSpace__ecere__com__eMember_AddMember(struct __ecereNameSpace__ecere__com__DataMember * addTo, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
307 extern unsigned int __ecereNameSpace__ecere__com__eClass_AddMember(struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__DataMember * dataMember);
311 extern void FreeSpecifier(struct Specifier * spec);
315 extern struct Symbol * FindType(struct Context * ctx, const char * name);
317 extern struct Symbol * FindClass(const char * name);
319 struct __ecereNameSpace__ecere__sys__OldLink;
321 struct __ecereNameSpace__ecere__sys__OldLink
323 struct __ecereNameSpace__ecere__sys__OldLink * prev;
324 struct __ecereNameSpace__ecere__sys__OldLink * next;
326 } __attribute__ ((gcc_struct));
328 struct __ecereNameSpace__ecere__sys__BinaryTree;
330 struct __ecereNameSpace__ecere__sys__BinaryTree
332 struct __ecereNameSpace__ecere__sys__BTNode * root;
334 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
335 void (* FreeKey)(void * key);
336 } __attribute__ ((gcc_struct));
338 struct __ecereNameSpace__ecere__com__DataMember
340 struct __ecereNameSpace__ecere__com__DataMember * prev;
341 struct __ecereNameSpace__ecere__com__DataMember * next;
343 unsigned int isProperty;
346 struct __ecereNameSpace__ecere__com__Class * _class;
347 const char * dataTypeString;
348 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
349 struct Type * dataType;
353 struct __ecereNameSpace__ecere__sys__OldList members;
354 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
356 short structAlignment;
357 short pointerAlignment;
358 } __attribute__ ((gcc_struct));
360 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
368 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
369 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
370 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
371 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
372 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
373 unsigned int (* Neg)(struct Expression *, struct Operand *);
374 unsigned int (* Inc)(struct Expression *, struct Operand *);
375 unsigned int (* Dec)(struct Expression *, struct Operand *);
376 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
377 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
378 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
379 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
380 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
381 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
382 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
383 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
384 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
385 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
386 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
387 unsigned int (* BitNot)(struct Expression *, struct Operand *);
388 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
389 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
390 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
391 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
392 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
393 unsigned int (* Not)(struct Expression *, struct Operand *);
394 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
395 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
396 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
397 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
398 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
399 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
400 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
401 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
402 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
403 } __attribute__ ((gcc_struct));
409 unsigned int ptrSize;
422 } __attribute__ ((gcc_struct)) __anon1;
424 } __attribute__ ((gcc_struct));
426 extern struct Operand GetOperand(struct Expression * exp);
428 struct __ecereNameSpace__ecere__com__BitMember;
430 extern struct __ecereNameSpace__ecere__com__BitMember * __ecereNameSpace__ecere__com__eClass_AddBitMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, int bitSize, int bitPos, int declMode);
432 struct __ecereNameSpace__ecere__com__BitMember
434 struct __ecereNameSpace__ecere__com__BitMember * prev;
435 struct __ecereNameSpace__ecere__com__BitMember * next;
437 unsigned int isProperty;
440 struct __ecereNameSpace__ecere__com__Class * _class;
441 const char * dataTypeString;
442 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
443 struct Type * dataType;
448 } __attribute__ ((gcc_struct));
450 struct __ecereNameSpace__ecere__com__Method;
452 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
458 const char * dataTypeString;
459 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
460 } __attribute__ ((gcc_struct)) __anon1;
461 struct __ecereNameSpace__ecere__com__DataValue expression;
464 const char * memberString;
467 struct __ecereNameSpace__ecere__com__DataMember * member;
468 struct __ecereNameSpace__ecere__com__Property * prop;
469 struct __ecereNameSpace__ecere__com__Method * method;
470 } __attribute__ ((gcc_struct)) __anon1;
471 } __attribute__ ((gcc_struct)) __anon2;
472 } __attribute__ ((gcc_struct)) __anon1;
473 } __attribute__ ((gcc_struct));
475 struct __ecereNameSpace__ecere__com__Method
478 struct __ecereNameSpace__ecere__com__Method * parent;
479 struct __ecereNameSpace__ecere__com__Method * left;
480 struct __ecereNameSpace__ecere__com__Method * right;
485 struct __ecereNameSpace__ecere__com__Class * _class;
487 const char * dataTypeString;
488 struct Type * dataType;
490 } __attribute__ ((gcc_struct));
495 struct Symbol * parent;
496 struct Symbol * left;
497 struct Symbol * right;
502 struct __ecereNameSpace__ecere__com__Method * method;
503 struct __ecereNameSpace__ecere__com__Property * _property;
504 struct __ecereNameSpace__ecere__com__Class * registered;
505 } __attribute__ ((gcc_struct)) __anon1;
506 unsigned int notYetDeclared;
511 struct External * pointerExternal;
512 struct External * structExternal;
513 } __attribute__ ((gcc_struct)) __anon1;
516 struct External * externalGet;
517 struct External * externalSet;
518 struct External * externalPtr;
519 struct External * externalIsSet;
520 } __attribute__ ((gcc_struct)) __anon2;
523 struct External * methodExternal;
524 struct External * methodCodeExternal;
525 } __attribute__ ((gcc_struct)) __anon3;
526 } __attribute__ ((gcc_struct)) __anon2;
527 unsigned int imported;
528 unsigned int declaredStructSym;
529 struct __ecereNameSpace__ecere__com__Class * _class;
530 unsigned int declaredStruct;
531 unsigned int needConstructor;
532 unsigned int needDestructor;
533 char * constructorName;
536 char * destructorName;
537 struct ModuleImport * module;
538 struct ClassImport * _import;
539 struct Location nameLoc;
540 unsigned int isParam;
541 unsigned int isRemote;
542 unsigned int isStruct;
543 unsigned int fireWatchersDone;
545 unsigned int classData;
546 unsigned int isStatic;
548 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
549 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
550 struct Context * ctx;
552 struct Expression * propCategory;
553 unsigned int mustRegister;
554 } __attribute__ ((gcc_struct));
556 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode);
558 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_AddMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, const char * type, void * function, int declMode);
560 extern struct __ecereNameSpace__ecere__com__ClassTemplateParameter * __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, int type, const void * info, struct __ecereNameSpace__ecere__com__ClassTemplateArgument * defaultArg);
562 struct __ecereNameSpace__ecere__com__Module;
564 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
566 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
568 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_RegisterClass(int type, const char * name, const char * baseName, int size, int sizeClass, unsigned int (* Constructor)(void * ), void (* Destructor)(void * ), struct __ecereNameSpace__ecere__com__Instance * module, int declMode, int inheritanceAccess);
570 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(const char * name, const char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
576 struct Declarator * prev;
577 struct Declarator * next;
580 struct Symbol * symbol;
581 struct Declarator * declarator;
584 struct Identifier * identifier;
587 struct Expression * exp;
588 struct Expression * posExp;
589 struct Attrib * attrib;
590 } __attribute__ ((gcc_struct)) structDecl;
593 struct Expression * exp;
594 struct Specifier * enumClass;
595 } __attribute__ ((gcc_struct)) array;
598 struct __ecereNameSpace__ecere__sys__OldList * parameters;
599 } __attribute__ ((gcc_struct)) function;
602 struct Pointer * pointer;
603 } __attribute__ ((gcc_struct)) pointer;
606 struct ExtDecl * extended;
607 } __attribute__ ((gcc_struct)) extended;
608 } __attribute__ ((gcc_struct)) __anon1;
609 } __attribute__ ((gcc_struct));
611 extern struct Identifier * GetDeclId(struct Declarator * decl);
615 struct Identifier * prev;
616 struct Identifier * next;
618 struct Symbol * classSym;
619 struct Specifier * _class;
621 struct Identifier * badID;
622 } __attribute__ ((gcc_struct));
624 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
626 struct Instantiation;
630 struct Expression * prev;
631 struct Expression * next;
639 struct Identifier * identifier;
640 } __attribute__ ((gcc_struct)) __anon1;
641 struct Statement * compound;
642 struct Instantiation * instance;
646 unsigned int intlString;
647 unsigned int wideString;
648 } __attribute__ ((gcc_struct)) __anon2;
649 struct __ecereNameSpace__ecere__sys__OldList * list;
652 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
653 struct Declarator * decl;
654 } __attribute__ ((gcc_struct)) _classExp;
657 struct Identifier * id;
658 } __attribute__ ((gcc_struct)) classData;
661 struct Expression * exp;
662 struct __ecereNameSpace__ecere__sys__OldList * arguments;
663 struct Location argLoc;
664 } __attribute__ ((gcc_struct)) call;
667 struct Expression * exp;
668 struct __ecereNameSpace__ecere__sys__OldList * index;
669 } __attribute__ ((gcc_struct)) index;
672 struct Expression * exp;
673 struct Identifier * member;
675 unsigned int thisPtr;
676 } __attribute__ ((gcc_struct)) member;
680 struct Expression * exp1;
681 struct Expression * exp2;
682 } __attribute__ ((gcc_struct)) op;
683 struct TypeName * typeName;
684 struct Specifier * _class;
687 struct TypeName * typeName;
688 struct Expression * exp;
689 } __attribute__ ((gcc_struct)) cast;
692 struct Expression * cond;
693 struct __ecereNameSpace__ecere__sys__OldList * exp;
694 struct Expression * elseExp;
695 } __attribute__ ((gcc_struct)) cond;
698 struct TypeName * typeName;
699 struct Expression * size;
700 } __attribute__ ((gcc_struct)) _new;
703 struct TypeName * typeName;
704 struct Expression * size;
705 struct Expression * exp;
706 } __attribute__ ((gcc_struct)) _renew;
710 struct Identifier * id;
711 } __attribute__ ((gcc_struct)) db;
714 struct Expression * ds;
715 struct Expression * name;
716 } __attribute__ ((gcc_struct)) dbopen;
719 struct TypeName * typeName;
720 struct Initializer * initializer;
721 } __attribute__ ((gcc_struct)) initializer;
724 struct Expression * exp;
725 struct TypeName * typeName;
726 } __attribute__ ((gcc_struct)) vaArg;
727 } __attribute__ ((gcc_struct)) __anon1;
728 unsigned int debugValue;
729 struct __ecereNameSpace__ecere__com__DataValue val;
731 unsigned int hasAddress;
732 struct Type * expType;
733 struct Type * destType;
736 unsigned int byReference;
737 unsigned int isConstant;
738 unsigned int addedThis;
739 unsigned int needCast;
740 unsigned int thisPtr;
741 unsigned int opDestType;
742 unsigned int needTemplateCast;
743 } __attribute__ ((gcc_struct));
747 struct Instantiation * prev;
748 struct Instantiation * next;
750 struct Specifier * _class;
751 struct Expression * exp;
752 struct __ecereNameSpace__ecere__sys__OldList * members;
753 struct Symbol * symbol;
754 unsigned int fullSet;
755 unsigned int isConstant;
756 unsigned char * data;
757 struct Location nameLoc;
758 struct Location insideLoc;
760 } __attribute__ ((gcc_struct));
762 struct ClassFunction;
766 struct ClassFunction * prev;
767 struct ClassFunction * next;
769 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
770 struct Declarator * declarator;
771 struct __ecereNameSpace__ecere__sys__OldList * declarations;
772 struct Statement * body;
773 struct __ecereNameSpace__ecere__com__Class * _class;
774 struct __ecereNameSpace__ecere__sys__OldList attached;
777 struct Symbol * propSet;
778 unsigned int isVirtual;
779 unsigned int isConstructor;
780 unsigned int isDestructor;
781 unsigned int dontMangle;
784 } __attribute__ ((gcc_struct));
786 struct ClassDefinition;
790 struct Context * parent;
791 struct __ecereNameSpace__ecere__sys__BinaryTree types;
792 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
793 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
794 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
797 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
798 struct ClassDefinition * classDef;
799 unsigned int templateTypesOnly;
800 unsigned int hasNameSpace;
801 } __attribute__ ((gcc_struct));
803 struct ClassDefinition
805 struct ClassDefinition * prev;
806 struct ClassDefinition * next;
808 struct Specifier * _class;
809 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
810 struct __ecereNameSpace__ecere__sys__OldList * definitions;
811 struct Symbol * symbol;
812 struct Location blockStart;
813 struct Location nameLoc;
815 unsigned int deleteWatchable;
816 } __attribute__ ((gcc_struct));
818 struct __ecereNameSpace__ecere__com__NameSpace;
820 struct __ecereNameSpace__ecere__com__NameSpace
823 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
824 struct __ecereNameSpace__ecere__com__NameSpace * left;
825 struct __ecereNameSpace__ecere__com__NameSpace * right;
827 struct __ecereNameSpace__ecere__com__NameSpace * parent;
828 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
829 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
830 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
831 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
832 } __attribute__ ((gcc_struct));
834 struct __ecereNameSpace__ecere__com__Class
836 struct __ecereNameSpace__ecere__com__Class * prev;
837 struct __ecereNameSpace__ecere__com__Class * next;
843 unsigned int (* Constructor)(void * );
844 void (* Destructor)(void * );
847 struct __ecereNameSpace__ecere__com__Class * base;
848 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
849 struct __ecereNameSpace__ecere__sys__BinaryTree members;
850 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
851 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
852 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
853 struct __ecereNameSpace__ecere__sys__OldList derivatives;
857 struct __ecereNameSpace__ecere__com__Instance * module;
858 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
859 const char * dataTypeString;
860 struct Type * dataType;
862 int defaultAlignment;
863 void (* Initialize)();
865 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
866 const char * designerClass;
867 unsigned int noExpansion;
868 const char * defaultProperty;
869 unsigned int comRedefinition;
872 unsigned int internalDecl;
874 unsigned int computeSize;
875 short structAlignment;
876 short pointerAlignment;
877 int destructionWatchOffset;
879 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
880 int inheritanceAccess;
881 const char * fullName;
883 struct __ecereNameSpace__ecere__sys__OldList conversions;
884 struct __ecereNameSpace__ecere__sys__OldList templateParams;
885 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
886 struct __ecereNameSpace__ecere__com__Class * templateClass;
887 struct __ecereNameSpace__ecere__sys__OldList templatized;
889 unsigned int isInstanceClass;
890 unsigned int byValueSystemClass;
891 } __attribute__ ((gcc_struct));
893 struct __ecereNameSpace__ecere__com__Application
898 unsigned int isGUIApp;
899 struct __ecereNameSpace__ecere__sys__OldList allModules;
900 char * parsedCommand;
901 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
902 } __attribute__ ((gcc_struct));
904 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
906 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
908 struct __ecereNameSpace__ecere__com__Module
910 struct __ecereNameSpace__ecere__com__Instance * application;
911 struct __ecereNameSpace__ecere__sys__OldList classes;
912 struct __ecereNameSpace__ecere__sys__OldList defines;
913 struct __ecereNameSpace__ecere__sys__OldList functions;
914 struct __ecereNameSpace__ecere__sys__OldList modules;
915 struct __ecereNameSpace__ecere__com__Instance * prev;
916 struct __ecereNameSpace__ecere__com__Instance * next;
922 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
923 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
924 } __attribute__ ((gcc_struct));
926 void __ecereUnregisterModule_firstPass(struct __ecereNameSpace__ecere__com__Instance * module)
931 struct TemplateParameter;
935 struct Specifier * prev;
936 struct Specifier * next;
944 struct ExtDecl * extDecl;
946 struct Symbol * symbol;
947 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
948 struct Specifier * nsSpec;
949 } __attribute__ ((gcc_struct)) __anon1;
952 struct Identifier * id;
953 struct __ecereNameSpace__ecere__sys__OldList * list;
954 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
955 struct __ecereNameSpace__ecere__sys__OldList * definitions;
956 unsigned int addNameSpace;
957 struct Context * ctx;
958 struct ExtDecl * extDeclStruct;
959 } __attribute__ ((gcc_struct)) __anon2;
960 struct Expression * expression;
961 struct Specifier * _class;
962 struct TemplateParameter * templateParameter;
963 } __attribute__ ((gcc_struct)) __anon1;
964 } __attribute__ ((gcc_struct));
973 struct Symbol * _class;
976 struct __ecereNameSpace__ecere__sys__OldList members;
978 } __attribute__ ((gcc_struct)) __anon1;
981 struct Type * returnType;
982 struct __ecereNameSpace__ecere__sys__OldList params;
983 struct Symbol * thisClass;
984 unsigned int staticMethod;
985 struct TemplateParameter * thisClassTemplate;
986 } __attribute__ ((gcc_struct)) __anon2;
989 struct __ecereNameSpace__ecere__com__Method * method;
990 struct __ecereNameSpace__ecere__com__Class * methodClass;
991 struct __ecereNameSpace__ecere__com__Class * usedClass;
992 } __attribute__ ((gcc_struct)) __anon3;
995 struct Type * arrayType;
997 struct Expression * arraySizeExp;
998 unsigned int freeExp;
999 struct Symbol * enumClass;
1000 } __attribute__ ((gcc_struct)) __anon4;
1002 struct TemplateParameter * templateParameter;
1003 } __attribute__ ((gcc_struct)) __anon1;
1008 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1009 int classObjectType;
1011 unsigned int offset;
1014 unsigned int isSigned : 1;
1015 unsigned int constant : 1;
1016 unsigned int truth : 1;
1017 unsigned int byReference : 1;
1018 unsigned int extraParam : 1;
1019 unsigned int directClassAccess : 1;
1020 unsigned int computing : 1;
1021 unsigned int keepCast : 1;
1022 unsigned int passAsTemplate : 1;
1023 unsigned int dllExport : 1;
1024 unsigned int attrStdcall : 1;
1025 unsigned int declaredWithStruct : 1;
1026 unsigned int typedByReference : 1;
1027 unsigned int casted : 1;
1028 unsigned int pointerAlignment : 1;
1029 unsigned int isLong : 1;
1030 } __attribute__ ((gcc_struct));
1036 struct PropertyDef * prev;
1037 struct PropertyDef * next;
1038 struct Location loc;
1039 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1040 struct Declarator * declarator;
1041 struct Identifier * id;
1042 struct Statement * getStmt;
1043 struct Statement * setStmt;
1044 struct Statement * issetStmt;
1045 struct Symbol * symbol;
1046 struct Expression * category;
1049 unsigned int conversion : 1;
1050 unsigned int isWatchable : 1;
1051 unsigned int isDBProp : 1;
1052 } __attribute__ ((gcc_struct)) __anon1;
1053 } __attribute__ ((gcc_struct));
1055 struct TemplateArgument;
1057 struct TemplateParameter
1059 struct TemplateParameter * prev;
1060 struct TemplateParameter * next;
1061 struct Location loc;
1063 struct Identifier * identifier;
1066 struct TemplateDatatype * dataType;
1068 } __attribute__ ((gcc_struct)) __anon1;
1069 struct TemplateArgument * defaultArgument;
1070 const char * dataTypeString;
1071 struct Type * baseType;
1072 } __attribute__ ((gcc_struct));
1074 struct TemplateArgument
1076 struct TemplateArgument * prev;
1077 struct TemplateArgument * next;
1078 struct Location loc;
1079 struct Identifier * name;
1083 struct Expression * expression;
1084 struct Identifier * identifier;
1085 struct TemplateDatatype * templateDatatype;
1086 } __attribute__ ((gcc_struct)) __anon1;
1087 } __attribute__ ((gcc_struct));
1091 typedef union YYSTYPE
1096 struct Identifier * id;
1097 struct Expression * exp;
1098 struct Specifier * specifier;
1099 struct __ecereNameSpace__ecere__sys__OldList * list;
1100 struct Enumerator * enumerator;
1101 struct Declarator * declarator;
1102 struct Pointer * pointer;
1103 struct Initializer * initializer;
1104 struct InitDeclarator * initDeclarator;
1105 struct TypeName * typeName;
1106 struct Declaration * declaration;
1107 struct Statement * stmt;
1108 struct FunctionDefinition * function;
1109 struct External * external;
1110 struct Context * context;
1111 struct AsmField * asmField;
1112 struct Attrib * attrib;
1113 struct ExtDecl * extDecl;
1114 struct Attribute * attribute;
1115 struct Instantiation * instance;
1116 struct MembersInit * membersInit;
1117 struct MemberInit * memberInit;
1118 struct ClassFunction * classFunction;
1119 struct ClassDefinition * _class;
1120 struct ClassDef * classDef;
1121 struct PropertyDef * prop;
1123 struct Symbol * symbol;
1124 struct PropertyWatch * propertyWatch;
1125 struct TemplateParameter * templateParameter;
1126 struct TemplateArgument * templateArgument;
1127 struct TemplateDatatype * templateDatatype;
1128 struct DBTableEntry * dbtableEntry;
1129 struct DBIndexItem * dbindexItem;
1130 struct DBTableDef * dbtableDef;
1131 } __attribute__ ((gcc_struct)) YYSTYPE;
1133 extern YYSTYPE yylval;
1137 struct ClassDef * prev;
1138 struct ClassDef * next;
1139 struct Location loc;
1143 struct Declaration * decl;
1144 struct ClassFunction * function;
1145 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1146 struct PropertyDef * propertyDef;
1147 struct PropertyWatch * propertyWatch;
1149 struct Identifier * defaultProperty;
1152 struct Identifier * id;
1153 struct Initializer * initializer;
1154 } __attribute__ ((gcc_struct)) __anon1;
1155 } __attribute__ ((gcc_struct)) __anon1;
1158 } __attribute__ ((gcc_struct));
1162 struct Declaration * prev;
1163 struct Declaration * next;
1164 struct Location loc;
1170 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1171 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1172 } __attribute__ ((gcc_struct)) __anon1;
1173 struct Instantiation * inst;
1176 struct Identifier * id;
1177 struct Expression * exp;
1178 } __attribute__ ((gcc_struct)) __anon2;
1179 } __attribute__ ((gcc_struct)) __anon1;
1180 struct Specifier * extStorage;
1181 struct Symbol * symbol;
1183 } __attribute__ ((gcc_struct));
1187 struct External * prev;
1188 struct External * next;
1189 struct Location loc;
1191 struct Symbol * symbol;
1194 struct FunctionDefinition * function;
1195 struct ClassDefinition * _class;
1196 struct Declaration * declaration;
1197 char * importString;
1198 struct Identifier * id;
1199 struct DBTableDef * table;
1200 } __attribute__ ((gcc_struct)) __anon1;
1202 struct External * fwdDecl;
1203 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1204 struct __ecereNameSpace__ecere__com__Instance * incoming;
1205 int nonBreakableIncoming;
1206 } __attribute__ ((gcc_struct));
1208 static void AddDefinitions(struct __ecereNameSpace__ecere__com__Class * regClass, struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__sys__OldList * definitions)
1210 if(definitions != (((void *)0)))
1212 struct ClassDef * def;
1214 for(def = definitions->first; def; def = def->next)
1218 struct Declaration * decl = def->__anon1.decl;
1219 struct __ecereNameSpace__ecere__com__DataMember * dataMember = (((void *)0));
1220 struct Type * dataType;
1224 struct Declarator * d;
1226 if(decl->__anon1.__anon1.declarators)
1228 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1230 struct Identifier * declId = GetDeclId(d);
1234 if(regClass && regClass->type == 2)
1236 struct Expression * sizeExp = (d->type == 0) ? d->__anon1.structDecl.exp : (((void *)0));
1237 struct Expression * posExp = (d->type == 0) ? d->__anon1.structDecl.posExp : (((void *)0));
1238 int bitSize = 0, bitPos = -1;
1239 char dataTypeString[8192];
1241 dataTypeString[0] = (char)0;
1244 ProcessExpressionType(sizeExp);
1245 ComputeExpression(sizeExp);
1246 if(sizeExp->isConstant)
1247 bitSize = strtol(sizeExp->__anon1.__anon1.constant, (((void *)0)), 0);
1248 FreeExpression(sizeExp);
1252 ProcessExpressionType(posExp);
1253 ComputeExpression(posExp);
1254 if(posExp->isConstant)
1255 bitPos = strtol(posExp->__anon1.__anon1.constant, (((void *)0)), 0);
1256 FreeExpression(posExp);
1260 d->__anon1.structDecl.posExp = (((void *)0));
1261 d->__anon1.structDecl.exp = (((void *)0));
1263 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1264 PrintType(dataType, dataTypeString, 0, 1);
1266 struct __ecereNameSpace__ecere__com__BitMember * member = __ecereNameSpace__ecere__com__eClass_AddBitMember(regClass, declId->string, dataTypeString, 0, 0, def->memberAccess);
1270 member->size = bitSize;
1271 member->pos = bitPos;
1273 dataMember = (struct __ecereNameSpace__ecere__com__DataMember *)member;
1276 dataMember->dataType = dataType;
1279 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), declId->string, regClass->name);
1286 char typeString[8192];
1288 typeString[0] = (char)0;
1289 dataType = ProcessType(decl->__anon1.__anon1.specifiers, d);
1290 PrintType(dataType, typeString, 0, 1);
1293 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, declId->string, typeString, 0, 0, def->memberAccess);
1295 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), declId->string, member->name);
1299 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, declId->string, typeString, 0, 0, def->memberAccess);
1301 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), declId->string, regClass->name);
1304 dataMember->dataType = dataType;
1312 else if(decl->__anon1.__anon1.specifiers)
1314 struct Specifier * spec;
1316 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
1318 if(spec->type == 3 || spec->type == 4)
1320 if(spec->__anon1.__anon2.definitions && !spec->__anon1.__anon2.id)
1322 struct __ecereNameSpace__ecere__com__DataMember * dataMember = __ecereNameSpace__ecere__com__eMember_New((spec->type == 4) ? 1 : 2, def->memberAccess);
1324 AddDefinitions((((void *)0)), dataMember, spec->__anon1.__anon2.definitions);
1327 __ecereNameSpace__ecere__com__eMember_AddMember(member, dataMember);
1331 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, dataMember);
1334 else if(spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id)
1337 struct Identifier * id = spec->__anon1.__anon2.id;
1338 char typeString[8192];
1340 typeString[0] = (char)0;
1341 spec->__anon1.__anon2.id = (((void *)0));
1342 decl->__anon1.__anon1.declarators = MkListOne(MkDeclaratorIdentifier(id));
1343 dataType = ProcessType(decl->__anon1.__anon1.specifiers, (((void *)0)));
1344 PrintType(dataType, typeString, 0, 1);
1347 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, id->string, typeString, 0, 0, def->memberAccess);
1349 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), id->string, member->name);
1353 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, id->string, typeString, 0, 0, def->memberAccess);
1355 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), id->string, regClass->name);
1358 dataMember->dataType = dataType;
1367 else if(decl->type == 2)
1369 struct Instantiation * inst = decl->__anon1.inst;
1370 struct Expression * exp = inst->exp;
1374 char * string = exp->__anon1.__anon1.identifier->string;
1377 struct Type * dataType = (dataType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), dataType->kind = 8, dataType->__anon1._class = inst->_class->__anon1.__anon1.symbol, dataType->refCount = 1, dataType);
1381 dataMember = __ecereNameSpace__ecere__com__eMember_AddDataMember(member, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1383 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in member %s\n", (((void *)0))), string, member->name);
1387 dataMember = __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, string, inst->_class->__anon1.__anon1.name, 0, 0, def->memberAccess);
1389 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Member with same name already exists %s in class %s\n", (((void *)0))), string, regClass->name);
1392 dataMember->dataType = dataType;
1399 else if(def->type == 3 && def->__anon1.propertyDef)
1401 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1402 struct __ecereNameSpace__ecere__com__Property * prop;
1403 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1405 prop = __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, propertyDef->__anon1.conversion ? (((void *)0)) : propertyDef->id->string, dataTypeString, inCompiler ? propertyDef->setStmt : (((void *)0)), inCompiler ? propertyDef->getStmt : (((void *)0)), def->memberAccess);
1406 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1410 prop->IsSet = (void *)propertyDef->issetStmt;
1412 prop->symbol = __extension__ ({
1413 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1415 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(propertyDef->symbol->string), __ecereInstance1->type = propertyDef->symbol->type, __ecereInstance1;
1417 ((struct Symbol *)prop->symbol)->propCategory = propertyDef->category;
1418 propertyDef->category = (((void *)0));
1419 if(propertyDef->__anon1.isWatchable)
1420 __ecereNameSpace__ecere__com__eProperty_Watchable(prop);
1422 propertyDef->symbol->__anon1._property = prop;
1423 if(propertyDef->symbol->type)
1424 propertyDef->symbol->type->refCount++;
1426 else if(def->type == 10 && def->__anon1.propertyDef)
1428 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
1429 char * dataTypeString = StringFromSpecDecl(propertyDef->specifiers, propertyDef->declarator);
1431 __ecereNameSpace__ecere__com__eClass_AddClassProperty(regClass, propertyDef->id->string, dataTypeString, inCompiler ? propertyDef->setStmt : (((void *)0)), inCompiler ? propertyDef->getStmt : (((void *)0)));
1432 (__ecereNameSpace__ecere__com__eSystem_Delete(dataTypeString), dataTypeString = 0);
1438 static void ProcessClass(int classType, struct __ecereNameSpace__ecere__sys__OldList * definitions, struct Symbol * symbol, struct __ecereNameSpace__ecere__sys__OldList * baseSpecs, struct __ecereNameSpace__ecere__sys__OldList * enumValues, struct Location * loc, struct __ecereNameSpace__ecere__sys__OldList * defs, void * after, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators, int declMode)
1440 struct __ecereNameSpace__ecere__com__Class * regClass;
1441 struct ClassDef * def;
1442 unsigned int redefinition = 0;
1444 regClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1445 if(regClass && !regClass->internalDecl)
1447 if(symbol->parent || (struct Symbol *)globalContext->classes.root == symbol)
1449 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->classes, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1450 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1456 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "redefinition of class %s\n", (((void *)0))), symbol->string);
1462 char baseName[1024] = "";
1463 unsigned int unitType = 0;
1464 unsigned int wouldBeEnum = 0;
1465 int inheritanceAccess = 1;
1467 if(baseSpecs != (((void *)0)))
1469 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
1471 PrintType(baseType, baseName, 0, 1);
1472 if(baseType->kind == 8)
1474 if(baseType->__anon1._class->__anon1.registered && classType == 0)
1476 if(baseType->__anon1._class->__anon1.registered->type == 3)
1478 else if(baseType->__anon1._class->__anon1.registered->type == 2)
1480 else if(baseType->__anon1._class->__anon1.registered->type == 5)
1482 else if(baseType->__anon1._class->__anon1.registered->type == 4)
1488 else if(baseType->kind == 9 || baseType->kind == 10)
1496 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
1497 inheritanceAccess = 2;
1503 if(definitions != (((void *)0)))
1505 for(def = definitions->first; def; def = def->next)
1509 struct Declaration * decl = def->__anon1.decl;
1518 if(decl->__anon1.__anon1.declarators)
1520 struct Declarator * d;
1522 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1526 if(d->__anon1.structDecl.exp)
1540 if(classType == 0 && wouldBeEnum)
1542 regClass = symbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_RegisterClass((classType == 6) ? 1 : classType, symbol->string, baseName[0] ? baseName : (((void *)0)), 0, 0, (((void *)0)), (((void *)0)), privateModule, buildingECERECOMModule ? 4 : declMode, inheritanceAccess);
1544 regClass->symbol = symbol;
1550 struct __ecereNameSpace__ecere__com__DataMember * unionMember = __ecereNameSpace__ecere__com__eMember_New(1, 1);
1552 AddDefinitions(regClass, unionMember, definitions);
1553 __ecereNameSpace__ecere__com__eClass_AddMember(regClass, unionMember);
1556 AddDefinitions(regClass, (((void *)0)), definitions);
1558 if(definitions != (((void *)0)))
1560 for(def = definitions->first; def; def = def->next)
1562 if(def->type == 0 && (def->__anon1.function->isConstructor || def->__anon1.function->isDestructor))
1564 struct Specifier * spec = def->__anon1.function->specifiers ? (*def->__anon1.function->specifiers).last : (((void *)0));
1566 if(!spec || spec->type != 1 || !spec->__anon1.__anon1.name || (strcmp(spec->__anon1.__anon1.name, regClass->name) && (!spec->__anon1.__anon1.symbol || !spec->__anon1.__anon1.symbol->__anon1.registered || strcmp(spec->__anon1.__anon1.symbol->__anon1.registered->name, regClass->name))))
1568 yylloc = def->__anon1.function->loc;
1569 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "wrong class name specified for %s\n", (((void *)0))), def->__anon1.function->isConstructor ? __ecereNameSpace__ecere__GetTranslatedString("ec", "constructor", (((void *)0))) : __ecereNameSpace__ecere__GetTranslatedString("ec", "destructor", (((void *)0))));
1571 FreeList(def->__anon1.function->specifiers, (void *)(FreeSpecifier));
1572 def->__anon1.function->specifiers = (((void *)0));
1574 if(def->type == 0 && def->__anon1.function->declarator)
1576 struct ClassFunction * func = def->__anon1.function;
1578 func->_class = regClass;
1579 if(!redefinition && !func->dontMangle)
1581 struct Declarator * funcDecl = GetFuncDecl(func->declarator);
1582 struct Identifier * id = GetDeclId(funcDecl);
1583 struct __ecereNameSpace__ecere__com__Method * method;
1587 char * typeString = StringFromSpecDecl(func->specifiers, func->declarator);
1589 method = __ecereNameSpace__ecere__com__eClass_AddVirtualMethod(regClass, id->string, typeString, inCompiler ? func->declarator->symbol : (((void *)0)), def->memberAccess);
1590 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1594 char * typeString = StringFromSpecDecl(func->specifiers, func->declarator);
1596 method = __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, id->string, typeString, inCompiler ? func->declarator->symbol : (((void *)0)), def->memberAccess);
1598 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Redefinition of method %s in class %s\n", (((void *)0))), id->string, regClass->name);
1599 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1601 if(method && (method->type != 1 || method->_class == regClass))
1603 method->symbol = __extension__ ({
1604 struct Symbol * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
1606 __ecereInstance1->string = __ecereNameSpace__ecere__sys__CopyString(func->declarator->symbol->string), __ecereInstance1->type = func->declarator->symbol->type, __ecereInstance1->__anon1.method = method, __ecereInstance1;
1608 if(func->declarator->symbol->type)
1609 func->declarator->symbol->type->refCount++;
1610 func->declarator->symbol->__anon1.method = method;
1614 func->declarator->symbol->__anon1.method = method;
1620 if(regClass && symbol->templateParams)
1622 struct TemplateParameter * param;
1624 for(param = (*symbol->templateParams).first; param; param = param->next)
1626 struct __ecereNameSpace__ecere__com__ClassTemplateArgument defaultArg =
1637 if(param->defaultArgument)
1642 defaultArg.__anon1.__anon1.dataTypeString = StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl);
1646 char memberString[1024];
1648 memberString[0] = '\0';
1649 if(param->defaultArgument->__anon1.identifier->_class)
1651 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
1653 if(param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter)
1654 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
1658 if(param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
1659 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
1664 strcat(memberString, "::");
1666 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
1667 defaultArg.__anon1.__anon2.memberString = __ecereNameSpace__ecere__sys__CopyString(memberString);
1674 param->defaultArgument->__anon1.expression->destType = ProcessType(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl);
1675 ProcessExpressionType(param->defaultArgument->__anon1.expression);
1676 ComputeExpression(param->defaultArgument->__anon1.expression);
1677 op = GetOperand(param->defaultArgument->__anon1.expression);
1678 defaultArg.__anon1.expression.__anon1.ui64 = op.__anon1.ui64;
1683 if(param->type == 1)
1685 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, 1, (void *)(uintptr_t)param->__anon1.memberType, &defaultArg);
1689 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
1691 __ecereNameSpace__ecere__com__eClass_AddTemplateParameter(regClass, param->identifier->string, param->type, typeString, &defaultArg);
1692 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
1694 if(param->type == 0 || param->type == 1)
1695 (__ecereNameSpace__ecere__com__eSystem_Delete((void *)defaultArg.__anon1.__anon1.dataTypeString), defaultArg.__anon1.__anon1.dataTypeString = 0);
1697 __ecereNameSpace__ecere__com__eClass_DoneAddingTemplateParameters(regClass);
1701 void PrePreProcessClassDefinitions()
1703 struct External * external, * next;
1705 curExternal = (((void *)0));
1708 for(external = (*ast).first; external; external = next)
1710 next = external->next;
1711 curExternal = external;
1712 if(external->type == 2)
1714 struct ClassDefinition * _class = external->__anon1._class;
1716 if((!_class->symbol->__anon1.registered || !inCompiler))
1718 if(_class->definitions)
1719 _class->symbol->mustRegister = 1;
1720 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), &_class->loc, ast, external->prev, (((void *)0)), _class->declMode);
1721 _class->symbol->isStatic = _class->declMode == 3;
1724 else if(external->type == 1)
1726 struct Declaration * declaration = external->__anon1.declaration;
1728 if(declaration->type == 1)
1730 if(declaration->__anon1.__anon1.specifiers)
1732 struct Specifier * specifier;
1734 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
1736 if((specifier->type == 2 || specifier->type == 3 || specifier->type == 4) && specifier->__anon1.__anon2.id && specifier->__anon1.__anon2.id->string && (declaration->declMode || specifier->__anon1.__anon2.baseSpecs || (specifier->type == 2 && specifier->__anon1.__anon2.definitions)))
1738 struct Symbol * type = FindType(globalContext, specifier->__anon1.__anon2.id->string);
1739 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
1743 declaration->declMode = 0;
1746 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->classes, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1747 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1750 else if(symbol && !symbol->__anon1.registered)
1754 if(specifier->type == 2)
1756 else if(specifier->type == 4)
1760 if(specifier->__anon1.__anon2.definitions || specifier->type == 2 || specifier->__anon1.__anon2.baseSpecs)
1761 symbol->mustRegister = 1;
1762 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, &specifier->loc, ast, external->prev, declaration->__anon1.__anon1.declarators, declaration->declMode);
1763 symbol->isStatic = declaration->declMode == 3;
1770 else if(external->type == 3)
1775 for(external = (*ast).first; external; external = external->next)
1777 if(external->type == 2)
1779 struct ClassDefinition * _class = external->__anon1._class;
1783 struct __ecereNameSpace__ecere__sys__OldLink * link;
1785 for(link = _class->symbol->templatedClasses.first; link; link = link->next)
1787 struct Symbol * symbol = link->data;
1789 symbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1793 else if(external->type == 1)
1795 struct Declaration * declaration = external->__anon1.declaration;
1797 if(declaration->type == 1)
1799 if(declaration->__anon1.__anon1.specifiers)
1801 struct Specifier * specifier;
1803 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
1805 if((specifier->type == 2 || specifier->type == 3 || specifier->type == 4) && specifier->__anon1.__anon2.id && specifier->__anon1.__anon2.id->string && (declaration->declMode || specifier->__anon1.__anon2.baseSpecs || (specifier->type == 2 && specifier->__anon1.__anon2.definitions)))
1807 struct Symbol * type = FindType(globalContext, specifier->__anon1.__anon2.id->string);
1808 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
1815 struct __ecereNameSpace__ecere__sys__OldLink * link;
1817 for(link = symbol->templatedClasses.first; link; link = link->next)
1819 struct Symbol * tplSymbol = link->data;
1821 tplSymbol->__anon1.registered = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, tplSymbol->string);
1822 tplSymbol->module = symbol->module ? symbol->module : mainModule;
1835 void __ecereRegisterModule_firstPass(struct __ecereNameSpace__ecere__com__Instance * module)
1837 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
1839 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PrePreProcessClassDefinitions", "void PrePreProcessClassDefinitions(void)", PrePreProcessClassDefinitions, module, 1);