1 /* Code generated from eC source file: pass0.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;
49 extern int structDeclMode;
51 extern const char * sourceFile;
53 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
55 struct __ecereNameSpace__ecere__sys__OldList
62 } __attribute__ ((gcc_struct));
64 struct __ecereNameSpace__ecere__sys__BTNode;
66 struct __ecereNameSpace__ecere__com__DataValue
81 } __attribute__ ((gcc_struct)) __anon1;
82 } __attribute__ ((gcc_struct));
84 struct __ecereNameSpace__ecere__com__SerialBuffer
86 unsigned char * _buffer;
90 } __attribute__ ((gcc_struct));
92 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
94 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
96 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
98 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
100 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
106 struct InitDeclarator;
116 struct PropertyWatch;
118 struct TemplateParameter;
120 struct TemplateArgument;
122 struct TemplateDatatype;
136 } __attribute__ ((gcc_struct));
138 extern char * strcat(char * , const char * );
140 extern size_t strlen(const char * );
142 extern int strncmp(const char * , const char * , size_t n);
148 extern void Compiler_Error(const char * format, ...);
150 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
152 struct __ecereNameSpace__ecere__com__LinkList
157 } __attribute__ ((gcc_struct));
159 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
161 extern char * strcpy(char * , const char * );
163 struct __ecereNameSpace__ecere__com__LinkElement
167 } __attribute__ ((gcc_struct));
169 extern char * strstr(const char * , const char * );
171 extern void Compiler_Warning(const char * format, ...);
173 extern int sprintf(char * , const char * , ...);
175 struct __ecereNameSpace__ecere__com__GlobalFunction;
177 struct __ecereNameSpace__ecere__com__IteratorPointer;
179 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
181 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
183 extern void FreeList(struct __ecereNameSpace__ecere__sys__OldList * list, void (* FreeFunction)(void * ));
185 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
187 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
189 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
191 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
193 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
195 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
197 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
199 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear(struct __ecereNameSpace__ecere__sys__OldList * this);
201 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
203 extern void FreeInitDeclarator(struct InitDeclarator * decl);
205 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
207 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
211 struct CodePosition start;
212 struct CodePosition end;
213 } __attribute__ ((gcc_struct));
215 void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams)
221 for(c = 0; (ch = className[c]) && ch != '<'; c++)
225 strcat(output, "__ecereNameSpace__");
229 len = strlen(output);
231 if(!strncmp(className, "const ", 6))
233 for(; (ch = className[c]); c++)
257 if(!includeTemplateParams)
259 if(!strncmp(className + c + 1, "const ", 6))
273 if(!strncmp(className + c + 1, "const ", 6))
280 output[len++] = (char)0;
283 extern struct Location yylloc;
287 extern struct External * curExternal;
291 struct __ecereNameSpace__ecere__com__LinkElement in;
292 struct __ecereNameSpace__ecere__com__LinkElement out;
293 struct External * from;
294 struct External * to;
295 unsigned int breakable;
296 } __attribute__ ((gcc_struct));
298 extern void FreeExternal(struct External * external);
300 extern struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference);
304 extern struct Context * PushContext(void);
306 extern void PopContext(struct Context * ctx);
308 extern struct Context * curContext;
310 struct __ecereNameSpace__ecere__com__Class;
312 struct __ecereNameSpace__ecere__com__Instance
315 struct __ecereNameSpace__ecere__com__Class * _class;
317 } __attribute__ ((gcc_struct));
319 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
321 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
323 extern int AddMembers(struct External * neededBy, struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__com__Class * _class, unsigned int isMember, unsigned int * retSize, struct __ecereNameSpace__ecere__com__Class * topClass, unsigned int * addedPadding);
325 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
327 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
329 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
331 int __ecereVMethodID___ecereNameSpace__ecere__com__Container_GetNext;
333 struct __ecereNameSpace__ecere__com__Property;
335 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
337 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);
339 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
341 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
343 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);
347 extern void FreeDeclarator(struct Declarator * decl);
349 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
351 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
353 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
355 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
357 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
359 struct __ecereNameSpace__ecere__com__BTNamedLink;
361 struct __ecereNameSpace__ecere__com__BTNamedLink
364 struct __ecereNameSpace__ecere__com__BTNamedLink * parent;
365 struct __ecereNameSpace__ecere__com__BTNamedLink * left;
366 struct __ecereNameSpace__ecere__com__BTNamedLink * right;
369 } __attribute__ ((gcc_struct));
373 extern struct Symbol * FindClass(const char * name);
377 extern struct External * MkExternalDeclaration(struct Declaration * declaration);
379 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
383 extern struct Specifier * MkSpecifierName(const char * name);
385 extern struct Declaration * MkStructDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * declarators, struct Specifier * extStorage);
387 extern void FreeSpecifier(struct Specifier * spec);
389 extern struct Specifier * MkSpecifier(int specifier);
391 extern struct Specifier * CopySpecifier(struct Specifier * spec);
393 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
397 extern struct Identifier * GetDeclId(struct Declarator * decl);
401 struct Identifier * prev;
402 struct Identifier * next;
404 struct Symbol * classSym;
405 struct Specifier * _class;
407 struct Identifier * badID;
408 } __attribute__ ((gcc_struct));
410 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
412 extern struct Identifier * MkIdentifier(const char * string);
414 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
420 struct Specifier * prev;
421 struct Specifier * next;
429 struct ExtDecl * extDecl;
431 struct Symbol * symbol;
432 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
433 } __attribute__ ((gcc_struct)) __anon1;
436 struct Identifier * id;
437 struct __ecereNameSpace__ecere__sys__OldList * list;
438 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
439 struct __ecereNameSpace__ecere__sys__OldList * definitions;
440 unsigned int addNameSpace;
441 struct Context * ctx;
442 struct ExtDecl * extDeclStruct;
443 } __attribute__ ((gcc_struct)) __anon2;
444 struct Expression * expression;
445 struct Specifier * _class;
446 struct TemplateParameter * templateParameter;
447 } __attribute__ ((gcc_struct)) __anon1;
448 } __attribute__ ((gcc_struct));
452 struct Declarator * prev;
453 struct Declarator * next;
456 struct Symbol * symbol;
457 struct Declarator * declarator;
460 struct Identifier * identifier;
463 struct Expression * exp;
464 struct Expression * posExp;
465 struct Attrib * attrib;
466 } __attribute__ ((gcc_struct)) structDecl;
469 struct Expression * exp;
470 struct Specifier * enumClass;
471 } __attribute__ ((gcc_struct)) array;
474 struct __ecereNameSpace__ecere__sys__OldList * parameters;
475 } __attribute__ ((gcc_struct)) function;
478 struct Pointer * pointer;
479 } __attribute__ ((gcc_struct)) pointer;
482 struct ExtDecl * extended;
483 } __attribute__ ((gcc_struct)) extended;
484 } __attribute__ ((gcc_struct)) __anon1;
485 } __attribute__ ((gcc_struct));
487 extern struct Expression * QMkExpId(const char * id);
489 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
491 extern struct Expression * CopyExpression(struct Expression * exp);
493 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
495 extern struct Expression * MkExpIdentifier(struct Identifier * id);
497 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
499 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
503 struct __ecereNameSpace__ecere__com__Property
505 struct __ecereNameSpace__ecere__com__Property * prev;
506 struct __ecereNameSpace__ecere__com__Property * next;
508 unsigned int isProperty;
511 struct __ecereNameSpace__ecere__com__Class * _class;
512 const char * dataTypeString;
513 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
514 struct Type * dataType;
515 void (* Set)(void * , int);
516 int (* Get)(void * );
517 unsigned int (* IsSet)(void * );
521 unsigned int conversion;
522 unsigned int watcherOffset;
523 const char * category;
524 unsigned int compiled;
525 unsigned int selfWatchable;
526 unsigned int isWatchable;
527 } __attribute__ ((gcc_struct));
529 extern struct Type * MkClassType(const char * name);
531 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
533 extern void FreeType(struct Type * type);
535 struct ClassFunction;
537 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
543 struct Initializer * prev;
544 struct Initializer * next;
549 struct Expression * exp;
550 struct __ecereNameSpace__ecere__sys__OldList * list;
551 } __attribute__ ((gcc_struct)) __anon1;
552 unsigned int isConstant;
553 struct Identifier * id;
554 } __attribute__ ((gcc_struct));
556 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
558 extern void FreeInitializer(struct Initializer * initializer);
560 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
562 struct __ecereNameSpace__ecere__com__Method;
564 struct __ecereNameSpace__ecere__com__Method
567 struct __ecereNameSpace__ecere__com__Method * parent;
568 struct __ecereNameSpace__ecere__com__Method * left;
569 struct __ecereNameSpace__ecere__com__Method * right;
574 struct __ecereNameSpace__ecere__com__Class * _class;
576 const char * dataTypeString;
577 struct Type * dataType;
579 } __attribute__ ((gcc_struct));
584 struct Symbol * parent;
585 struct Symbol * left;
586 struct Symbol * right;
591 struct __ecereNameSpace__ecere__com__Method * method;
592 struct __ecereNameSpace__ecere__com__Property * _property;
593 struct __ecereNameSpace__ecere__com__Class * registered;
594 } __attribute__ ((gcc_struct)) __anon1;
595 unsigned int notYetDeclared;
600 struct External * pointerExternal;
601 struct External * structExternal;
602 } __attribute__ ((gcc_struct)) __anon1;
605 struct External * externalGet;
606 struct External * externalSet;
607 struct External * externalPtr;
608 struct External * externalIsSet;
609 } __attribute__ ((gcc_struct)) __anon2;
612 struct External * methodExternal;
613 struct External * methodCodeExternal;
614 } __attribute__ ((gcc_struct)) __anon3;
615 } __attribute__ ((gcc_struct)) __anon2;
616 unsigned int imported;
617 unsigned int declaredStructSym;
618 struct __ecereNameSpace__ecere__com__Class * _class;
619 unsigned int declaredStruct;
620 unsigned int needConstructor;
621 unsigned int needDestructor;
622 char * constructorName;
625 char * destructorName;
626 struct ModuleImport * module;
627 struct ClassImport * _import;
628 struct Location nameLoc;
629 unsigned int isParam;
630 unsigned int isRemote;
631 unsigned int isStruct;
632 unsigned int fireWatchersDone;
634 unsigned int classData;
635 unsigned int isStatic;
637 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
638 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
639 struct Context * ctx;
641 struct Expression * propCategory;
642 } __attribute__ ((gcc_struct));
651 struct Symbol * _class;
654 struct __ecereNameSpace__ecere__sys__OldList members;
656 } __attribute__ ((gcc_struct)) __anon1;
659 struct Type * returnType;
660 struct __ecereNameSpace__ecere__sys__OldList params;
661 struct Symbol * thisClass;
662 unsigned int staticMethod;
663 struct TemplateParameter * thisClassTemplate;
664 } __attribute__ ((gcc_struct)) __anon2;
667 struct __ecereNameSpace__ecere__com__Method * method;
668 struct __ecereNameSpace__ecere__com__Class * methodClass;
669 struct __ecereNameSpace__ecere__com__Class * usedClass;
670 } __attribute__ ((gcc_struct)) __anon3;
673 struct Type * arrayType;
675 struct Expression * arraySizeExp;
676 unsigned int freeExp;
677 struct Symbol * enumClass;
678 } __attribute__ ((gcc_struct)) __anon4;
680 struct TemplateParameter * templateParameter;
681 } __attribute__ ((gcc_struct)) __anon1;
691 unsigned int isSigned : 1;
692 unsigned int constant : 1;
693 unsigned int truth : 1;
694 unsigned int byReference : 1;
695 unsigned int extraParam : 1;
696 unsigned int directClassAccess : 1;
697 unsigned int computing : 1;
698 unsigned int keepCast : 1;
699 unsigned int passAsTemplate : 1;
700 unsigned int dllExport : 1;
701 unsigned int attrStdcall : 1;
702 unsigned int declaredWithStruct : 1;
703 unsigned int typedByReference : 1;
704 unsigned int casted : 1;
705 unsigned int pointerAlignment : 1;
706 } __attribute__ ((gcc_struct));
708 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);
710 extern void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method);
712 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
718 struct ClassFunction * prev;
719 struct ClassFunction * next;
721 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
722 struct Declarator * declarator;
723 struct __ecereNameSpace__ecere__sys__OldList * declarations;
724 struct Statement * body;
725 struct __ecereNameSpace__ecere__com__Class * _class;
726 struct __ecereNameSpace__ecere__sys__OldList attached;
729 struct Symbol * propSet;
730 unsigned int isVirtual;
731 unsigned int isConstructor;
732 unsigned int isDestructor;
733 unsigned int dontMangle;
736 } __attribute__ ((gcc_struct));
740 struct Statement * prev;
741 struct Statement * next;
746 struct __ecereNameSpace__ecere__sys__OldList * expressions;
749 struct Identifier * id;
750 struct Statement * stmt;
751 } __attribute__ ((gcc_struct)) labeled;
754 struct Expression * exp;
755 struct Statement * stmt;
756 } __attribute__ ((gcc_struct)) caseStmt;
759 struct __ecereNameSpace__ecere__sys__OldList * declarations;
760 struct __ecereNameSpace__ecere__sys__OldList * statements;
761 struct Context * context;
762 unsigned int isSwitch;
763 } __attribute__ ((gcc_struct)) compound;
766 struct __ecereNameSpace__ecere__sys__OldList * exp;
767 struct Statement * stmt;
768 struct Statement * elseStmt;
769 } __attribute__ ((gcc_struct)) ifStmt;
772 struct __ecereNameSpace__ecere__sys__OldList * exp;
773 struct Statement * stmt;
774 } __attribute__ ((gcc_struct)) switchStmt;
777 struct __ecereNameSpace__ecere__sys__OldList * exp;
778 struct Statement * stmt;
779 } __attribute__ ((gcc_struct)) whileStmt;
782 struct __ecereNameSpace__ecere__sys__OldList * exp;
783 struct Statement * stmt;
784 } __attribute__ ((gcc_struct)) doWhile;
787 struct Statement * init;
788 struct Statement * check;
789 struct __ecereNameSpace__ecere__sys__OldList * increment;
790 struct Statement * stmt;
791 } __attribute__ ((gcc_struct)) forStmt;
794 struct Identifier * id;
795 } __attribute__ ((gcc_struct)) gotoStmt;
798 struct Specifier * spec;
800 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
801 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
802 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
803 } __attribute__ ((gcc_struct)) asmStmt;
806 struct Expression * watcher;
807 struct Expression * object;
808 struct __ecereNameSpace__ecere__sys__OldList * watches;
809 } __attribute__ ((gcc_struct)) _watch;
812 struct Identifier * id;
813 struct __ecereNameSpace__ecere__sys__OldList * exp;
814 struct __ecereNameSpace__ecere__sys__OldList * filter;
815 struct Statement * stmt;
816 } __attribute__ ((gcc_struct)) forEachStmt;
817 struct Declaration * decl;
818 } __attribute__ ((gcc_struct)) __anon1;
819 } __attribute__ ((gcc_struct));
821 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
823 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
825 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
827 extern struct Statement * MkReturnStmt(struct __ecereNameSpace__ecere__sys__OldList * exp);
829 struct __ecereNameSpace__ecere__sys__BinaryTree;
831 struct __ecereNameSpace__ecere__sys__BinaryTree
833 struct __ecereNameSpace__ecere__sys__BTNode * root;
835 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
836 void (* FreeKey)(void * key);
837 } __attribute__ ((gcc_struct));
839 struct __ecereNameSpace__ecere__sys__BTNode * __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(struct __ecereNameSpace__ecere__sys__BinaryTree * this, const char * key);
841 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
843 struct __ecereNameSpace__ecere__com__DataMember;
845 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
851 const char * dataTypeString;
852 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
853 } __attribute__ ((gcc_struct)) __anon1;
854 struct __ecereNameSpace__ecere__com__DataValue expression;
857 const char * memberString;
860 struct __ecereNameSpace__ecere__com__DataMember * member;
861 struct __ecereNameSpace__ecere__com__Property * prop;
862 struct __ecereNameSpace__ecere__com__Method * method;
863 } __attribute__ ((gcc_struct)) __anon1;
864 } __attribute__ ((gcc_struct)) __anon2;
865 } __attribute__ ((gcc_struct)) __anon1;
866 } __attribute__ ((gcc_struct));
868 struct __ecereNameSpace__ecere__com__DataMember
870 struct __ecereNameSpace__ecere__com__DataMember * prev;
871 struct __ecereNameSpace__ecere__com__DataMember * next;
873 unsigned int isProperty;
876 struct __ecereNameSpace__ecere__com__Class * _class;
877 const char * dataTypeString;
878 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
879 struct Type * dataType;
883 struct __ecereNameSpace__ecere__sys__OldList members;
884 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
886 short structAlignment;
887 short pointerAlignment;
888 } __attribute__ ((gcc_struct));
890 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);
892 struct __ecereNameSpace__ecere__com__Module;
894 extern unsigned int ModuleAccess(struct __ecereNameSpace__ecere__com__Instance * searchIn, struct __ecereNameSpace__ecere__com__Instance * searchFor);
896 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
898 extern struct __ecereNameSpace__ecere__com__DataMember * __ecereNameSpace__ecere__com__eClass_FindDataMember(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module, struct __ecereNameSpace__ecere__com__DataMember ** subMemberStack, int * subMemberStackPos);
900 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
902 extern struct __ecereNameSpace__ecere__com__Property * __ecereNameSpace__ecere__com__eClass_FindProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module);
904 extern struct __ecereNameSpace__ecere__com__Method * __ecereNameSpace__ecere__com__eClass_FindMethod(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, struct __ecereNameSpace__ecere__com__Instance * module);
906 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);
912 struct TypeName * prev;
913 struct TypeName * next;
915 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
916 struct Declarator * declarator;
918 struct Expression * bitCount;
919 } __attribute__ ((gcc_struct));
921 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
923 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
927 extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
929 extern struct ClassDef * MkClassDefFunction(struct ClassFunction * function);
931 struct ClassDefinition;
935 struct Context * parent;
936 struct __ecereNameSpace__ecere__sys__BinaryTree types;
937 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
938 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
939 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
942 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
943 struct ClassDefinition * classDef;
944 unsigned int templateTypesOnly;
945 unsigned int hasNameSpace;
946 } __attribute__ ((gcc_struct));
948 struct ClassDefinition
950 struct ClassDefinition * prev;
951 struct ClassDefinition * next;
953 struct Specifier * _class;
954 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
955 struct __ecereNameSpace__ecere__sys__OldList * definitions;
956 struct Symbol * symbol;
957 struct Location blockStart;
958 struct Location nameLoc;
960 unsigned int deleteWatchable;
961 } __attribute__ ((gcc_struct));
963 struct Instantiation;
967 struct Expression * prev;
968 struct Expression * next;
976 struct Identifier * identifier;
977 } __attribute__ ((gcc_struct)) __anon1;
978 struct Statement * compound;
979 struct Instantiation * instance;
983 unsigned int intlString;
984 unsigned int wideString;
985 } __attribute__ ((gcc_struct)) __anon2;
986 struct __ecereNameSpace__ecere__sys__OldList * list;
989 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
990 struct Declarator * decl;
991 } __attribute__ ((gcc_struct)) _classExp;
994 struct Identifier * id;
995 } __attribute__ ((gcc_struct)) classData;
998 struct Expression * exp;
999 struct __ecereNameSpace__ecere__sys__OldList * arguments;
1000 struct Location argLoc;
1001 } __attribute__ ((gcc_struct)) call;
1004 struct Expression * exp;
1005 struct __ecereNameSpace__ecere__sys__OldList * index;
1006 } __attribute__ ((gcc_struct)) index;
1009 struct Expression * exp;
1010 struct Identifier * member;
1012 unsigned int thisPtr;
1013 } __attribute__ ((gcc_struct)) member;
1017 struct Expression * exp1;
1018 struct Expression * exp2;
1019 } __attribute__ ((gcc_struct)) op;
1020 struct TypeName * typeName;
1021 struct Specifier * _class;
1024 struct TypeName * typeName;
1025 struct Expression * exp;
1026 } __attribute__ ((gcc_struct)) cast;
1029 struct Expression * cond;
1030 struct __ecereNameSpace__ecere__sys__OldList * exp;
1031 struct Expression * elseExp;
1032 } __attribute__ ((gcc_struct)) cond;
1035 struct TypeName * typeName;
1036 struct Expression * size;
1037 } __attribute__ ((gcc_struct)) _new;
1040 struct TypeName * typeName;
1041 struct Expression * size;
1042 struct Expression * exp;
1043 } __attribute__ ((gcc_struct)) _renew;
1047 struct Identifier * id;
1048 } __attribute__ ((gcc_struct)) db;
1051 struct Expression * ds;
1052 struct Expression * name;
1053 } __attribute__ ((gcc_struct)) dbopen;
1056 struct TypeName * typeName;
1057 struct Initializer * initializer;
1058 } __attribute__ ((gcc_struct)) initializer;
1061 struct Expression * exp;
1062 struct TypeName * typeName;
1063 } __attribute__ ((gcc_struct)) vaArg;
1064 } __attribute__ ((gcc_struct)) __anon1;
1065 unsigned int debugValue;
1066 struct __ecereNameSpace__ecere__com__DataValue val;
1068 unsigned int hasAddress;
1069 struct Type * expType;
1070 struct Type * destType;
1073 unsigned int byReference;
1074 unsigned int isConstant;
1075 unsigned int addedThis;
1076 unsigned int needCast;
1077 unsigned int thisPtr;
1078 unsigned int opDestType;
1079 unsigned int needTemplateCast;
1080 } __attribute__ ((gcc_struct));
1082 struct Instantiation
1084 struct Instantiation * prev;
1085 struct Instantiation * next;
1086 struct Location loc;
1087 struct Specifier * _class;
1088 struct Expression * exp;
1089 struct __ecereNameSpace__ecere__sys__OldList * members;
1090 struct Symbol * symbol;
1091 unsigned int fullSet;
1092 unsigned int isConstant;
1093 unsigned char * data;
1094 struct Location nameLoc;
1095 struct Location insideLoc;
1097 } __attribute__ ((gcc_struct));
1101 struct Declaration * prev;
1102 struct Declaration * next;
1103 struct Location loc;
1109 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1110 struct __ecereNameSpace__ecere__sys__OldList * declarators;
1111 } __attribute__ ((gcc_struct)) __anon1;
1112 struct Instantiation * inst;
1115 struct Identifier * id;
1116 struct Expression * exp;
1117 } __attribute__ ((gcc_struct)) __anon2;
1118 } __attribute__ ((gcc_struct)) __anon1;
1119 struct Specifier * extStorage;
1120 struct Symbol * symbol;
1122 } __attribute__ ((gcc_struct));
1124 extern struct Expression * MkExpInstance(struct Instantiation * inst);
1130 struct MembersInit * prev;
1131 struct MembersInit * next;
1132 struct Location loc;
1136 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1137 struct ClassFunction * function;
1138 } __attribute__ ((gcc_struct)) __anon1;
1139 } __attribute__ ((gcc_struct));
1145 struct MemberInit * prev;
1146 struct MemberInit * next;
1147 struct Location loc;
1148 struct Location realLoc;
1149 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1150 struct Initializer * initializer;
1152 unsigned int variable;
1153 unsigned int takeOutExp;
1154 } __attribute__ ((gcc_struct));
1156 static void CheckPublicExpression(struct Expression * exp, int access);
1158 static void CheckPublicInitializer(struct Initializer * init, int access)
1163 CheckPublicExpression(init->__anon1.exp, access);
1167 struct Initializer * i;
1169 for(i = (*init->__anon1.list).first; i; i = i->next)
1170 CheckPublicInitializer(i, access);
1176 static void CheckPublicClass(struct Symbol * classSym, int access, const char * word);
1178 static void CheckPublicTypeName(struct TypeName * type, int access)
1180 if(type->qualifiers)
1182 struct Specifier * spec;
1184 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
1188 struct Symbol * classSym = spec->__anon1.__anon1.symbol;
1190 CheckPublicClass(classSym, access, "define");
1196 static void CheckPublicDataType(struct Type * type, int access, const char * word)
1204 CheckPublicClass(type->__anon1._class, access, word);
1214 struct Type * param;
1216 CheckPublicDataType(type->__anon1.__anon2.returnType, access, word);
1217 for(param = type->__anon1.__anon2.params.first; param; param = param->next)
1218 CheckPublicDataType(param, access, word);
1219 CheckPublicClass(type->__anon1.__anon2.thisClass, access, word);
1223 CheckPublicDataType(type->__anon1.__anon4.arrayType, access, word);
1224 if(type->__anon1.__anon4.enumClass)
1225 CheckPublicClass(type->__anon1.__anon4.enumClass, access, word);
1229 CheckPublicDataType(type->__anon1.type, access, word);
1238 CheckPublicClass(type->__anon1._class, access, word);
1245 static void CheckPublicExpression(struct Expression * exp, int access)
1258 if(exp->__anon1.op.exp1)
1259 CheckPublicExpression(exp->__anon1.op.exp1, access);
1260 if(exp->__anon1.op.exp2)
1261 CheckPublicExpression(exp->__anon1.op.exp2, access);
1265 struct Expression * e;
1267 for(e = (*exp->__anon1.list).first; e; e = e->next)
1268 CheckPublicExpression(e, access);
1273 struct Expression * e;
1275 CheckPublicExpression(exp->__anon1.index.exp, access);
1276 for(e = (*exp->__anon1.index.index).first; e; e = e->next)
1277 CheckPublicExpression(e, access);
1282 struct Expression * e;
1284 CheckPublicExpression(exp->__anon1.call.exp, access);
1285 if(exp->__anon1.call.arguments)
1287 for(e = (*exp->__anon1.call.arguments).first; e; e = e->next)
1288 CheckPublicExpression(e, access);
1294 CheckPublicExpression(exp->__anon1.member.exp, access);
1299 CheckPublicExpression(exp->__anon1.member.exp, access);
1303 CheckPublicTypeName(exp->__anon1.typeName, access);
1307 CheckPublicTypeName(exp->__anon1.cast.typeName, access);
1308 if(exp->__anon1.cast.exp)
1309 CheckPublicExpression(exp->__anon1.cast.exp, access);
1314 struct Expression * e;
1316 CheckPublicExpression(exp->__anon1.cond.cond, access);
1317 for(e = (*exp->__anon1.cond.exp).first; e; e = e->next)
1318 CheckPublicExpression(e, access);
1319 CheckPublicExpression(exp->__anon1.cond.elseExp, access);
1324 CheckPublicExpression(exp->__anon1._new.size, access);
1328 CheckPublicExpression(exp->__anon1._renew.size, access);
1329 CheckPublicExpression(exp->__anon1._renew.exp, access);
1333 struct MembersInit * members;
1335 CheckPublicClass(exp->__anon1.instance->_class->__anon1.__anon1.symbol, access, "define");
1336 for(members = (*exp->__anon1.instance->members).first; members; members = members->next)
1338 if(members->type == 0)
1340 struct MemberInit * member;
1342 for(member = (*members->__anon1.dataMembers).first; member; member = member->next)
1344 CheckPublicInitializer(member->initializer, access);
1358 struct ClassDef * prev;
1359 struct ClassDef * next;
1360 struct Location loc;
1364 struct Declaration * decl;
1365 struct ClassFunction * function;
1366 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1367 struct PropertyDef * propertyDef;
1368 struct PropertyWatch * propertyWatch;
1370 struct Identifier * defaultProperty;
1373 struct Identifier * id;
1374 struct Initializer * initializer;
1375 } __attribute__ ((gcc_struct)) __anon1;
1376 } __attribute__ ((gcc_struct)) __anon1;
1379 } __attribute__ ((gcc_struct));
1383 struct PropertyDef * prev;
1384 struct PropertyDef * next;
1385 struct Location loc;
1386 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1387 struct Declarator * declarator;
1388 struct Identifier * id;
1389 struct Statement * getStmt;
1390 struct Statement * setStmt;
1391 struct Statement * issetStmt;
1392 struct Symbol * symbol;
1393 struct Expression * category;
1396 unsigned int conversion : 1;
1397 unsigned int isWatchable : 1;
1398 unsigned int isDBProp : 1;
1399 } __attribute__ ((gcc_struct)) __anon1;
1400 } __attribute__ ((gcc_struct));
1402 static void CheckMembersDefinitions(struct __ecereNameSpace__ecere__com__Class * regClass, struct __ecereNameSpace__ecere__com__DataMember * member, struct __ecereNameSpace__ecere__sys__OldList * definitions, int access)
1404 if(definitions != (((void *)0)))
1406 struct ClassDef * def;
1408 for(def = definitions->first; def; def = def->next)
1412 struct Declaration * decl = def->__anon1.decl;
1413 struct __ecereNameSpace__ecere__com__DataMember * dataMember;
1418 struct Declarator * d;
1420 if(decl->__anon1.__anon1.declarators)
1422 for(d = (*decl->__anon1.__anon1.declarators).first; d; d = d->next)
1424 struct Identifier * declId = GetDeclId(d);
1430 struct __ecereNameSpace__ecere__com__BTNamedLink * link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&member->membersAlpha, declId->string);
1432 dataMember = link ? link->data : (((void *)0));
1435 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(regClass, declId->string, privateModule, (((void *)0)), (((void *)0)));
1437 CheckPublicDataType(dataMember->dataType, (def->memberAccess == 2) ? 2 : access, __ecereNameSpace__ecere__GetTranslatedString("ec", "class data member", (((void *)0))));
1441 else if(decl->__anon1.__anon1.specifiers)
1443 struct Specifier * spec;
1445 for(spec = (*decl->__anon1.__anon1.specifiers).first; spec; spec = spec->next)
1447 if(spec->type == 3 || spec->type == 4)
1449 if(spec->__anon1.__anon2.definitions && !spec->__anon1.__anon2.id)
1451 CheckMembersDefinitions(regClass, member, spec->__anon1.__anon2.definitions, (def->memberAccess == 2) ? 2 : access);
1453 else if(spec->__anon1.__anon2.definitions && spec->__anon1.__anon2.id)
1457 struct __ecereNameSpace__ecere__com__BTNamedLink * link = (struct __ecereNameSpace__ecere__com__BTNamedLink *)__ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_FindString(&member->membersAlpha, spec->__anon1.__anon2.id->string);
1459 dataMember = link ? link->data : (((void *)0));
1462 dataMember = __ecereNameSpace__ecere__com__eClass_FindDataMember(regClass, spec->__anon1.__anon2.id->string, privateModule, (((void *)0)), (((void *)0)));
1464 CheckPublicDataType(dataMember->dataType, (def->memberAccess == 2) ? 2 : access, __ecereNameSpace__ecere__GetTranslatedString("ec", "class data member", (((void *)0))));
1470 else if(decl->type == 2)
1472 CheckPublicClass(decl->__anon1.inst->_class->__anon1.__anon1.symbol, (def->memberAccess == 2) ? 2 : access, __ecereNameSpace__ecere__GetTranslatedString("ec", "class member instance", (((void *)0))));
1479 struct FunctionDefinition;
1481 typedef union YYSTYPE
1486 struct Identifier * id;
1487 struct Expression * exp;
1488 struct Specifier * specifier;
1489 struct __ecereNameSpace__ecere__sys__OldList * list;
1490 struct Enumerator * enumerator;
1491 struct Declarator * declarator;
1492 struct Pointer * pointer;
1493 struct Initializer * initializer;
1494 struct InitDeclarator * initDeclarator;
1495 struct TypeName * typeName;
1496 struct Declaration * declaration;
1497 struct Statement * stmt;
1498 struct FunctionDefinition * function;
1499 struct External * external;
1500 struct Context * context;
1501 struct AsmField * asmField;
1502 struct Attrib * attrib;
1503 struct ExtDecl * extDecl;
1504 struct Attribute * attribute;
1505 struct Instantiation * instance;
1506 struct MembersInit * membersInit;
1507 struct MemberInit * memberInit;
1508 struct ClassFunction * classFunction;
1509 struct ClassDefinition * _class;
1510 struct ClassDef * classDef;
1511 struct PropertyDef * prop;
1513 struct Symbol * symbol;
1514 struct PropertyWatch * propertyWatch;
1515 struct TemplateParameter * templateParameter;
1516 struct TemplateArgument * templateArgument;
1517 struct TemplateDatatype * templateDatatype;
1518 struct DBTableEntry * dbtableEntry;
1519 struct DBIndexItem * dbindexItem;
1520 struct DBTableDef * dbtableDef;
1521 } __attribute__ ((gcc_struct)) YYSTYPE;
1523 extern YYSTYPE yylval;
1527 struct External * prev;
1528 struct External * next;
1529 struct Location loc;
1531 struct Symbol * symbol;
1534 struct FunctionDefinition * function;
1535 struct ClassDefinition * _class;
1536 struct Declaration * declaration;
1537 char * importString;
1538 struct Identifier * id;
1539 struct DBTableDef * table;
1540 } __attribute__ ((gcc_struct)) __anon1;
1542 struct External * fwdDecl;
1543 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1544 struct __ecereNameSpace__ecere__com__Instance * incoming;
1545 int nonBreakableIncoming;
1546 } __attribute__ ((gcc_struct));
1548 struct FunctionDefinition
1550 struct FunctionDefinition * prev;
1551 struct FunctionDefinition * next;
1552 struct Location loc;
1553 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1554 struct Declarator * declarator;
1555 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1556 struct Statement * body;
1557 struct __ecereNameSpace__ecere__com__Class * _class;
1558 struct __ecereNameSpace__ecere__sys__OldList attached;
1561 struct Symbol * propSet;
1563 unsigned int propertyNoThis;
1564 } __attribute__ ((gcc_struct));
1566 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
1568 struct __ecereNameSpace__ecere__com__NameSpace;
1570 struct __ecereNameSpace__ecere__com__NameSpace
1573 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1574 struct __ecereNameSpace__ecere__com__NameSpace * left;
1575 struct __ecereNameSpace__ecere__com__NameSpace * right;
1577 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1578 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1579 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1580 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1581 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1582 } __attribute__ ((gcc_struct));
1584 struct __ecereNameSpace__ecere__com__Class
1586 struct __ecereNameSpace__ecere__com__Class * prev;
1587 struct __ecereNameSpace__ecere__com__Class * next;
1593 unsigned int (* Constructor)(void * );
1594 void (* Destructor)(void * );
1597 struct __ecereNameSpace__ecere__com__Class * base;
1598 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
1599 struct __ecereNameSpace__ecere__sys__BinaryTree members;
1600 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
1601 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
1602 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
1603 struct __ecereNameSpace__ecere__sys__OldList derivatives;
1607 struct __ecereNameSpace__ecere__com__Instance * module;
1608 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
1609 const char * dataTypeString;
1610 struct Type * dataType;
1612 int defaultAlignment;
1613 void (* Initialize)();
1615 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
1616 const char * designerClass;
1617 unsigned int noExpansion;
1618 const char * defaultProperty;
1619 unsigned int comRedefinition;
1622 unsigned int internalDecl;
1624 unsigned int computeSize;
1625 short structAlignment;
1626 short pointerAlignment;
1627 int destructionWatchOffset;
1629 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
1630 int inheritanceAccess;
1631 const char * fullName;
1633 struct __ecereNameSpace__ecere__sys__OldList conversions;
1634 struct __ecereNameSpace__ecere__sys__OldList templateParams;
1635 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
1636 struct __ecereNameSpace__ecere__com__Class * templateClass;
1637 struct __ecereNameSpace__ecere__sys__OldList templatized;
1639 unsigned int isInstanceClass;
1640 unsigned int byValueSystemClass;
1641 } __attribute__ ((gcc_struct));
1643 struct __ecereNameSpace__ecere__com__Application
1646 const char * * argv;
1648 unsigned int isGUIApp;
1649 struct __ecereNameSpace__ecere__sys__OldList allModules;
1650 char * parsedCommand;
1651 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
1652 } __attribute__ ((gcc_struct));
1654 static unsigned int NameSpaceContained(struct __ecereNameSpace__ecere__com__NameSpace * ns, struct __ecereNameSpace__ecere__com__NameSpace * parent)
1658 else if((*ns).parent)
1659 return NameSpaceContained((*ns).parent, parent);
1664 static void AddSimpleBaseMembers(struct External * external, struct __ecereNameSpace__ecere__sys__OldList * list, struct __ecereNameSpace__ecere__com__Class * _class, struct __ecereNameSpace__ecere__com__Class * topClass)
1666 if(_class->type != 1000)
1667 AddMembers(external, list, _class, 0, (((void *)0)), topClass, (((void *)0)));
1670 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
1672 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
1674 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
1676 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Application;
1678 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__LinkList;
1680 struct __ecereNameSpace__ecere__com__Module
1682 struct __ecereNameSpace__ecere__com__Instance * application;
1683 struct __ecereNameSpace__ecere__sys__OldList classes;
1684 struct __ecereNameSpace__ecere__sys__OldList defines;
1685 struct __ecereNameSpace__ecere__sys__OldList functions;
1686 struct __ecereNameSpace__ecere__sys__OldList modules;
1687 struct __ecereNameSpace__ecere__com__Instance * prev;
1688 struct __ecereNameSpace__ecere__com__Instance * next;
1694 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
1695 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
1696 } __attribute__ ((gcc_struct));
1698 void __ecereUnregisterModule_pass0(struct __ecereNameSpace__ecere__com__Instance * module)
1703 static void CheckPublicClass(struct Symbol * classSym, int access, const char * word)
1705 struct __ecereNameSpace__ecere__com__Class * regClass = classSym ? classSym->__anon1.registered : (((void *)0));
1709 if(regClass->templateClass)
1710 regClass = regClass->templateClass;
1711 if(classSym->isStatic && access != 3)
1713 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Non-static %s making use of a static class\n", (((void *)0))), word);
1715 else if(access == 1)
1717 if(!NameSpaceContained(regClass->nameSpace, &((struct __ecereNameSpace__ecere__com__Application *)(((char *)((struct __ecereNameSpace__ecere__com__Module *)(((char *)regClass->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application + sizeof(struct __ecereNameSpace__ecere__com__Module) + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->systemNameSpace))
1719 if(NameSpaceContained(regClass->nameSpace, &((struct __ecereNameSpace__ecere__com__Module *)(((char *)regClass->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->privateNameSpace) || !ModuleAccess(privateModule, regClass->module))
1720 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Public %s making use of a private class\n", (((void *)0))), word);
1726 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, struct ExtDecl * extDecl)
1728 char structName[1024];
1729 char className[1024];
1730 char constructorName[1024];
1731 char destructorName[1024];
1732 struct __ecereNameSpace__ecere__com__Class * regClass;
1733 struct ClassFunction * destructor = (((void *)0)), * constructor = (((void *)0));
1734 unsigned int isUnion = classType == 6;
1735 struct External * external = (((void *)0));
1736 struct ClassDef * def;
1737 struct __ecereNameSpace__ecere__sys__OldList * list = (((void *)0));
1738 struct __ecereNameSpace__ecere__sys__OldList * classDataList = (((void *)0));
1743 classDataList = MkList();
1745 regClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, symbol->string);
1748 classType = regClass->type;
1752 if(!NameSpaceContained(regClass->nameSpace, &((struct __ecereNameSpace__ecere__com__Module *)(((char *)regClass->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->privateNameSpace) && regClass->inheritanceAccess == 1)
1754 if(!regClass->base->symbol)
1755 regClass->base->symbol = FindClass(regClass->base->fullName);
1756 CheckPublicClass(regClass->base->symbol, 1, __ecereNameSpace__ecere__GetTranslatedString("ec", "class", (((void *)0))));
1758 else if(!symbol->isStatic && regClass->base)
1760 if(!regClass->base->symbol)
1761 regClass->base->symbol = FindClass(regClass->base->fullName);
1762 CheckPublicClass(regClass->base->symbol, 2, __ecereNameSpace__ecere__GetTranslatedString("ec", "class", (((void *)0))));
1765 if(definitions != (((void *)0)))
1767 for(def = definitions->first; def; def = def->next)
1771 struct __ecereNameSpace__ecere__com__DataMember * member;
1772 struct __ecereNameSpace__ecere__com__Property * prop;
1773 struct __ecereNameSpace__ecere__com__Method * method;
1775 if((prop = __ecereNameSpace__ecere__com__eClass_FindProperty(regClass, def->__anon1.__anon1.id->string, privateModule)))
1777 __ecereNameSpace__ecere__com__eClass_AddProperty(regClass, def->__anon1.__anon1.id->string, (((void *)0)), (((void *)0)), (((void *)0)), def->memberAccess);
1779 else if((member = __ecereNameSpace__ecere__com__eClass_FindDataMember(regClass, def->__anon1.__anon1.id->string, privateModule, (((void *)0)), (((void *)0)))))
1781 __ecereNameSpace__ecere__com__eClass_AddDataMember(regClass, def->__anon1.__anon1.id->string, (((void *)0)), 0, 0, def->memberAccess);
1783 else if((method = __ecereNameSpace__ecere__com__eClass_FindMethod(regClass, def->__anon1.__anon1.id->string, privateModule)))
1785 __ecereNameSpace__ecere__com__eClass_AddMethod(regClass, def->__anon1.__anon1.id->string, (((void *)0)), (((void *)0)), def->memberAccess);
1790 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Couldn't find member %s to override\n", (((void *)0))), def->__anon1.__anon1.id->string);
1797 external = MkExternalDeclaration((((void *)0)));
1798 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, external);
1799 curExternal = external;
1800 curExternal->symbol = symbol;
1802 if((classType == 1 || classType == 5) && inCompiler)
1804 AddSimpleBaseMembers(external, list, regClass->base, regClass);
1806 if(definitions != (((void *)0)))
1810 if(!NameSpaceContained(regClass->nameSpace, &((struct __ecereNameSpace__ecere__com__Module *)(((char *)regClass->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->privateNameSpace))
1811 CheckMembersDefinitions(regClass, (((void *)0)), definitions, 1);
1812 else if(!symbol->isStatic)
1813 CheckMembersDefinitions(regClass, (((void *)0)), definitions, 2);
1815 for(def = definitions->first; def; def = def->next)
1820 struct Declaration * decl = def->__anon1.decl;
1825 if(inCompiler && classType != 2)
1827 ListAdd(list, MkClassDefDeclaration(decl));
1828 def->__anon1.decl = (((void *)0));
1831 else if(decl->type == 2)
1833 struct Instantiation * inst = decl->__anon1.inst;
1834 struct Expression * exp = inst->exp;
1835 struct Symbol * classSym;
1839 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
1840 struct Declarator * d;
1842 ListAdd(specifiers, MkSpecifierName(inst->_class->__anon1.__anon1.name));
1843 d = MkDeclaratorIdentifier(MkIdentifier(exp->__anon1.__anon1.identifier->string));
1846 struct __ecereNameSpace__ecere__sys__OldList * declarators = MkList();
1848 ListAdd(declarators, d);
1849 decl = MkStructDeclaration(specifiers, declarators, (((void *)0)));
1850 ListAdd(list, MkClassDefDeclaration(decl));
1852 exp->__anon1.member.member = exp->__anon1.__anon1.identifier;
1853 exp->__anon1.member.exp = QMkExpId("this");
1854 exp->__anon1.member.memberType = 3;
1855 exp->__anon1.member.thisPtr = 1;
1860 FreeList(specifiers, (void *)(FreeSpecifier));
1863 classSym = inst->_class->__anon1.__anon1.symbol;
1864 if(classSym && classSym->__anon1.registered && (classSym->__anon1.registered->type == 1 || classSym->__anon1.registered->type == 2 || classSym->__anon1.registered->type == 3))
1866 if(inst->members && (*inst->members).count)
1867 symbol->needConstructor = 1;
1871 symbol->needConstructor = 1;
1872 symbol->needDestructor = 1;
1876 else if(def->type == 9)
1878 struct Declaration * decl = def->__anon1.decl;
1882 if(inCompiler && classType != 2)
1884 ListAdd(classDataList, MkClassDefDeclaration(decl));
1885 def->__anon1.decl = (((void *)0));
1889 else if(def->type == 1)
1890 symbol->needConstructor = 1;
1891 else if(def->type == 4)
1892 symbol->needConstructor = 1;
1893 else if(def->type == 0)
1895 struct ClassFunction * func = def->__anon1.function;
1897 if(func->isDestructor)
1902 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "redefinition of destructor for class %s\n", (((void *)0))), symbol->string);
1906 symbol->needDestructor = 1;
1908 if(!inCompiler && func->body)
1910 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
1912 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&func->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
1916 if(func->isConstructor)
1921 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "redefinition of constructor for class %s\n", (((void *)0))), symbol->string);
1925 symbol->needConstructor = 1;
1927 if(!inCompiler && func->body)
1929 struct Symbol * thisSymbol = (thisSymbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol), thisSymbol->string = __ecereNameSpace__ecere__sys__CopyString("this"), thisSymbol->type = MkClassType(regClass->fullName), thisSymbol);
1931 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Add(&func->body->__anon1.compound.context->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)thisSymbol);
1940 external->symbol = (((void *)0));
1943 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * declarators = (initDeclarators != (((void *)0))) ? initDeclarators : MkList();
1945 initDeclarators = (((void *)0));
1946 strcpy(structName, symbol->string);
1947 symbol->structName = __ecereNameSpace__ecere__sys__CopyString(structName);
1949 struct Specifier * spec = MkStructOrUnion(3, MkIdentifier(structName), isUnion ? MkListOne(MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkStructOrUnion(4, (((void *)0)), list)), (((void *)0)), (((void *)0))))) : list);
1951 spec->__anon1.__anon2.extDeclStruct = extDecl;
1952 ListAdd(specs, spec);
1954 external->symbol = symbol;
1955 if(symbol->__anon2.__anon1.structExternal)
1958 struct TopoEdge * e;
1959 struct __ecereNameSpace__ecere__com__Instance * __internalLinkList = symbol->__anon2.__anon1.structExternal->incoming;
1961 for(e = ((struct TopoEdge *)(uintptr_t)((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)__internalLinkList + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->first); e; e = (struct TopoEdge *)((struct __ecereNameSpace__ecere__com__IteratorPointer * (*)(struct __ecereNameSpace__ecere__com__Instance *, struct __ecereNameSpace__ecere__com__IteratorPointer * pointer))__extension__ ({
1962 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = __internalLinkList;
1964 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__LinkList->_vTbl;
1965 })[__ecereVMethodID___ecereNameSpace__ecere__com__Container_GetNext])(__internalLinkList, (struct __ecereNameSpace__ecere__com__IteratorPointer *)e))
1966 __ecereMethod_External_CreateUniqueEdge(external, e->from, e->breakable);
1969 struct TopoEdge * e;
1970 struct __ecereNameSpace__ecere__com__Instance * __internalLinkList = symbol->__anon2.__anon1.structExternal->outgoing;
1972 for(e = ((struct TopoEdge *)(uintptr_t)((struct __ecereNameSpace__ecere__com__LinkList *)(((char *)__internalLinkList + 0 + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->first); e; e = (struct TopoEdge *)((struct __ecereNameSpace__ecere__com__IteratorPointer * (*)(struct __ecereNameSpace__ecere__com__Instance *, struct __ecereNameSpace__ecere__com__IteratorPointer * pointer))__extension__ ({
1973 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = __internalLinkList;
1975 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__LinkList->_vTbl;
1976 })[__ecereVMethodID___ecereNameSpace__ecere__com__Container_GetNext])(__internalLinkList, (struct __ecereNameSpace__ecere__com__IteratorPointer *)e))
1977 __ecereMethod_External_CreateUniqueEdge(e->to, external, e->breakable);
1979 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), symbol->__anon2.__anon1.structExternal);
1980 FreeExternal(symbol->__anon2.__anon1.structExternal);
1982 symbol->__anon2.__anon1.structExternal = external;
1983 external->__anon1.declaration = MkDeclaration(specs, declarators);
1985 symbol->declaredStruct = 1;
1989 curExternal = external->prev;
1990 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(defs, external);
1991 FreeExternal(external);
1992 (__ecereNameSpace__ecere__com__eSystem_Delete(list), list = 0);
1994 if((*classDataList).count)
1996 char classDataStructName[1024];
1997 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1998 struct External * external;
2000 strcpy(classDataStructName, "__ecereClassData_");
2001 FullClassNameCat(classDataStructName, symbol->string, 0);
2002 declMode = structDeclMode = 0;
2003 ListAdd(specs, MkStructOrUnion(3, MkIdentifier(classDataStructName), classDataList));
2004 external = MkExternalDeclaration(MkDeclaration(specs, (((void *)0))));
2005 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, external);
2007 symbol->classData = 1;
2010 (__ecereNameSpace__ecere__com__eSystem_Delete(classDataList), classDataList = 0);
2015 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList(), * declarators = MkList();
2017 strcpy(className, "__ecereClass_");
2018 FullClassNameCat(className, symbol->string, 1);
2019 symbol->className = __ecereNameSpace__ecere__sys__CopyString(className);
2020 if(!strstr(sourceFile, ".main.ec"))
2021 ListAdd(specs, MkSpecifier(STATIC));
2022 ListAdd(specs, MkStructOrUnion(3, MkIdentifier("__ecereNameSpace__ecere__com__Class"), (((void *)0))));
2023 ListAdd(declarators, MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(className))), (((void *)0))));
2024 symbol->__anon2.__anon1.pointerExternal = MkExternalDeclaration(MkDeclaration(specs, declarators));
2025 DeclareStruct(symbol->__anon2.__anon1.pointerExternal, "ecere::com::Class", 0, 1);
2026 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, symbol->__anon2.__anon1.pointerExternal);
2027 after = symbol->__anon2.__anon3.methodExternal;
2029 if(symbol->needDestructor)
2031 struct ClassFunction * function;
2032 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
2033 struct Declarator * decl;
2034 struct Statement * body;
2035 struct Context * context;
2036 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0)), * statements;
2038 strcpy(destructorName, "__ecereDestructor_");
2039 FullClassNameCat(destructorName, symbol->string, 0);
2040 symbol->destructorName = __ecereNameSpace__ecere__sys__CopyString(destructorName);
2041 ListAdd(specs, MkSpecifier(VOID));
2042 context = PushContext();
2043 statements = MkList();
2044 if(definitions != (((void *)0)))
2046 for(def = definitions->first; def; def = def->next)
2048 if(def->type == 2 && def->__anon1.decl && def->__anon1.decl->type == 2)
2050 struct Instantiation * inst = def->__anon1.decl->__anon1.inst;
2051 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
2053 if(inst->exp && (!classSym || !classSym->__anon1.registered || classSym->__anon1.registered->type == 0))
2055 struct Expression * exp = MkExpOp((((void *)0)), DELETE, CopyExpression(inst->exp));
2057 ListAdd(statements, MkExpressionStmt(MkListOne(exp)));
2059 if(inst->exp && (!classSym || !classSym->__anon1.registered || classSym->__anon1.registered->type == 5))
2061 struct Expression * exp = MkExpOp((((void *)0)), DELETE, CopyExpression(inst->exp));
2063 ListAdd(statements, MkExpressionStmt(MkListOne(exp)));
2068 if(destructor && destructor->body)
2070 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*statements), (((void *)0)), destructor->body);
2071 destructor->body->__anon1.compound.context->parent = context;
2072 destructor->body = (((void *)0));
2074 body = MkCompoundStmt(declarations, statements);
2075 PopContext(context);
2076 body->__anon1.compound.context = context;
2077 decl = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(destructorName)), (((void *)0)));
2078 decl->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2079 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), decl->symbol);
2080 function = MkClassFunction(specs, (((void *)0)), decl, (((void *)0)));
2081 ProcessClassFunctionBody(function, body);
2082 function->dontMangle = 1;
2083 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, (((void *)0)), MkClassDefFunction(function));
2085 if(symbol->needConstructor && inCompiler)
2087 struct ClassFunction * function;
2088 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
2089 struct Declarator * decl;
2090 struct Statement * body;
2091 struct Context * context;
2092 struct __ecereNameSpace__ecere__sys__OldList * declarations = (((void *)0)), * statements;
2094 strcpy(constructorName, "__ecereConstructor_");
2095 FullClassNameCat(constructorName, symbol->string, 0);
2096 symbol->constructorName = __ecereNameSpace__ecere__sys__CopyString(constructorName);
2097 ListAdd(specs, MkSpecifierName("bool"));
2098 context = PushContext();
2099 statements = MkList();
2100 if(definitions != (((void *)0)))
2102 for(def = definitions->first; def; def = def->next)
2104 if(def->type == 2 && def->__anon1.decl && def->__anon1.decl->type == 2)
2106 struct Instantiation * inst = def->__anon1.decl->__anon1.inst;
2107 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
2109 if(inst->exp && (!classSym || !classSym->__anon1.registered || classSym->__anon1.registered->type == 0 || classSym->__anon1.registered->type == 5))
2111 struct Instantiation * newInst = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Instantiation);
2114 newInst->members = (((void *)0));
2115 newInst->exp = CopyExpression(inst->exp);
2116 newInst->_class = CopySpecifier(inst->_class);
2117 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpInstance(newInst))));
2120 if(inst->exp && (!classSym || !classSym->__anon1.registered || classSym->__anon1.registered->type == 0))
2122 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eInstance_IncRef")), MkListOne(CopyExpression(inst->exp))))));
2126 for(def = definitions->first; def; def = def->next)
2128 if(def->type == 1 && def->__anon1.defProperties)
2130 struct MemberInit * propertyDef;
2132 for(propertyDef = (*def->__anon1.defProperties).first; propertyDef; propertyDef = propertyDef->next)
2134 struct Expression * memberExp;
2135 struct Identifier * id = (*propertyDef->identifiers).first;
2139 memberExp = MkExpMember(MkExpIdentifier(MkIdentifier("this")), id);
2140 for(id = id->next; id; id = id->next)
2141 memberExp = MkExpMember(memberExp, id);
2142 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(memberExp, '=', (propertyDef->initializer && propertyDef->initializer->type == 0 ? propertyDef->initializer->__anon1.exp : (((void *)0)))))));
2144 if(propertyDef->initializer)
2146 if(propertyDef->initializer->type == 0)
2147 propertyDef->initializer->__anon1.exp = (((void *)0));
2148 FreeInitializer(propertyDef->initializer);
2150 propertyDef->initializer = (((void *)0));
2151 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Clear((&*propertyDef->identifiers));
2155 for(def = definitions->first; def; def = def->next)
2157 if(def->type == 2 && def->__anon1.decl && def->__anon1.decl->type == 2)
2159 struct Instantiation * inst = def->__anon1.decl->__anon1.inst;
2160 struct Symbol * classSym = inst->_class->__anon1.__anon1.symbol;
2162 if(inst->exp || (!classSym || !classSym->__anon1.registered || classSym->__anon1.registered->type == 0 || classSym->__anon1.registered->type == 5))
2164 if(!(inst->exp && (!classSym || !classSym->__anon1.registered || classSym->__anon1.registered->type == 0 || classSym->__anon1.registered->type == 5)) || (inst->members && (*inst->members).count))
2166 def->__anon1.decl->__anon1.inst = (((void *)0));
2167 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpInstance(inst))));
2173 if(constructor && constructor->body)
2175 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*statements), constructor->body);
2176 constructor->body->__anon1.compound.context->parent = context;
2177 constructor->body = (((void *)0));
2179 ListAdd(statements, MkReturnStmt(MkListOne(MkExpIdentifier(MkIdentifier("true")))));
2180 body = MkCompoundStmt(declarations, statements);
2181 PopContext(context);
2182 body->__anon1.compound.context = context;
2183 decl = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(constructorName)), (((void *)0)));
2184 decl->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2185 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), decl->symbol);
2186 function = MkClassFunction(specs, (((void *)0)), decl, (((void *)0)));
2187 ProcessClassFunctionBody(function, body);
2188 function->dontMangle = 1;
2189 if(definitions != (((void *)0)))
2190 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, (((void *)0)), MkClassDefFunction(function));
2193 if(definitions != (((void *)0)))
2195 for(def = definitions->first; def; def = def->next)
2197 if(def->type == 3 && def->__anon1.propertyDef)
2199 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
2200 struct ClassDef * after = def;
2201 struct ClassDef * newDef;
2205 yylloc = propertyDef->loc;
2206 if(!NameSpaceContained(regClass->nameSpace, &((struct __ecereNameSpace__ecere__com__Module *)(((char *)regClass->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->privateNameSpace) && def->memberAccess == 1)
2207 CheckPublicDataType(propertyDef->symbol->type, 1, "class property");
2208 else if(!symbol->isStatic)
2209 CheckPublicDataType(propertyDef->symbol->type, 2, "class property");
2213 struct ClassFunction * func;
2214 struct Declarator * decl;
2216 struct __ecereNameSpace__ecere__sys__OldList * params;
2218 if(propertyDef->getStmt && propertyDef->id)
2220 strcpy(name, "__ecereProp_");
2221 FullClassNameCat(name, symbol->string, 0);
2222 strcat(name, "_Get_");
2223 FullClassNameCat(name, propertyDef->id->string, 1);
2225 if(propertyDef->symbol->type && propertyDef->symbol->type->kind == 8 && propertyDef->symbol->type->__anon1._class && propertyDef->symbol->type->__anon1._class->__anon1.registered && propertyDef->symbol->type->__anon1._class->__anon1.registered->type == 1)
2227 ListAdd(params, MkTypeName(CopyList(propertyDef->specifiers, (void *)(CopySpecifier)), MkDeclaratorIdentifier(MkIdentifier("value"))));
2228 decl = PlugDeclarator(propertyDef->declarator, MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(name)), params));
2229 func = MkClassFunction(MkListOne(MkSpecifier(VOID)), (((void *)0)), decl, (((void *)0)));
2233 decl = PlugDeclarator(propertyDef->declarator, MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(name)), params));
2234 func = MkClassFunction(CopyList(propertyDef->specifiers, (void *)(CopySpecifier)), (((void *)0)), decl, (((void *)0)));
2236 ProcessClassFunctionBody(func, propertyDef->getStmt);
2237 func->declarator->symbol = propertyDef->symbol;
2238 propertyDef->symbol->__anon2.__anon2.externalGet = (struct External *)func;
2239 func->dontMangle = 1;
2240 newDef = MkClassDefFunction(func);
2241 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, after, newDef);
2244 propertyDef->getStmt = (((void *)0));
2246 func->body = (((void *)0));
2248 if(propertyDef->setStmt && propertyDef->id)
2250 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
2252 strcpy(name, "__ecereProp_");
2253 FullClassNameCat(name, symbol->string, 0);
2254 strcat(name, "_Set_");
2255 FullClassNameCat(name, propertyDef->id->string, 1);
2257 ListAdd(params, MkTypeName(CopyList(propertyDef->specifiers, (void *)(CopySpecifier)), PlugDeclarator(propertyDef->declarator, MkDeclaratorIdentifier(MkIdentifier("value")))));
2258 if(propertyDef->__anon1.isDBProp)
2260 struct Specifier * spec;
2261 struct __ecereNameSpace__ecere__sys__OldList * specs = ((struct TypeName *)(*params).last)->qualifiers;
2263 for(spec = (*specs).first; spec; spec = spec->next)
2264 if(spec->type == 0 && spec->__anon1.specifier == CONST)
2267 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specs), (((void *)0)), MkSpecifier(CONST));
2269 decl = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(name)), params);
2271 unsigned int isConversion = propertyDef->symbol->__anon1._property && propertyDef->symbol->__anon1._property->conversion;
2272 unsigned int useVoid = 0;
2274 switch(regClass->type)
2282 useVoid = !isConversion;
2285 useVoid = !isConversion;
2286 if(useVoid && !propertyDef->__anon1.isDBProp)
2287 Compiler_Warning(__ecereNameSpace__ecere__GetTranslatedString("ec", "set defined on type without storage for non-conversion property\n", (((void *)0))));
2289 ListAdd(specifiers, useVoid ? MkSpecifier(VOID) : MkSpecifierName(regClass->fullName));
2291 func = MkClassFunction(specifiers, (((void *)0)), decl, (((void *)0)));
2292 ProcessClassFunctionBody(func, propertyDef->setStmt);
2293 func->dontMangle = 1;
2294 func->declarator->symbol = propertyDef->symbol;
2295 propertyDef->symbol->__anon2.__anon2.externalSet = (struct External *)func;
2296 if(!propertyDef->__anon1.conversion && regClass->type == 0)
2297 func->propSet = propertyDef->symbol;
2298 newDef = MkClassDefFunction(func);
2299 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, after, newDef);
2302 propertyDef->setStmt = (((void *)0));
2304 func->body = (((void *)0));
2306 if(propertyDef->issetStmt && propertyDef->id)
2308 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
2310 strcpy(name, "__ecereProp_");
2311 FullClassNameCat(name, symbol->string, 0);
2312 strcat(name, "_IsSet_");
2313 FullClassNameCat(name, propertyDef->id->string, 1);
2315 decl = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(name)), params);
2316 ListAdd(specifiers, MkSpecifierName("bool"));
2317 func = MkClassFunction(specifiers, (((void *)0)), decl, (((void *)0)));
2318 ProcessClassFunctionBody(func, propertyDef->issetStmt);
2319 func->dontMangle = 1;
2320 func->declarator->symbol = propertyDef->symbol;
2321 propertyDef->symbol->__anon2.__anon2.externalIsSet = (struct External *)func;
2322 newDef = MkClassDefFunction(func);
2323 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, after, newDef);
2326 propertyDef->issetStmt = (((void *)0));
2328 func->body = (((void *)0));
2330 if(propertyDef->id && inCompiler)
2332 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(symbol->__anon1.registered, propertyDef->id->string, privateModule);
2333 struct Declaration * decl;
2334 struct External * external;
2335 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
2337 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*specifiers), (((void *)0)), MkSpecifier(STATIC));
2338 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
2339 ListAdd(specifiers, MkSpecifierName("Property"));
2340 strcpy(name, "__ecereProp_");
2341 FullClassNameCat(name, symbol->string, 0);
2343 FullClassNameCat(name, propertyDef->id->string, 1);
2345 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
2347 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))));
2348 strcpy(name, "__ecerePropM_");
2349 FullClassNameCat(name, symbol->string, 0);
2351 FullClassNameCat(name, propertyDef->id->string, 1);
2352 ListAdd(list, MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(name)), (((void *)0))));
2353 decl = MkDeclaration(specifiers, list);
2355 external = MkExternalDeclaration(decl);
2356 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*ast), curExternal ? curExternal->prev : (((void *)0)), external);
2357 external->symbol = propertyDef->symbol;
2358 propertyDef->symbol->__anon2.__anon2.externalPtr = external;
2359 if(inCompiler && prop && prop->symbol)
2360 ((struct Symbol *)prop->symbol)->__anon2.__anon2.externalPtr = external;
2365 else if(def->type == 10 && def->__anon1.propertyDef)
2367 struct PropertyDef * propertyDef = def->__anon1.propertyDef;
2368 struct ClassDef * after = def;
2369 struct ClassDef * newDef;
2374 yylloc = propertyDef->loc;
2375 if(!NameSpaceContained(regClass->nameSpace, &((struct __ecereNameSpace__ecere__com__Module *)(((char *)regClass->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->privateNameSpace))
2376 CheckPublicDataType(propertyDef->symbol->type, 1, "classwide property");
2377 else if(!symbol->isStatic)
2378 CheckPublicDataType(propertyDef->symbol->type, 2, "classwide property");
2381 struct ClassFunction * func;
2382 struct Declarator * decl;
2384 struct __ecereNameSpace__ecere__sys__OldList * params;
2386 if(propertyDef->getStmt && propertyDef->id)
2388 struct Declarator * declId;
2390 sprintf(name, "class::__ecereClassProp_");
2391 FullClassNameCat(name, symbol->string, 0);
2392 strcat(name, "_Get_");
2393 strcat(name, propertyDef->id->string);
2395 declId = MkDeclaratorIdentifier(MkIdentifier(name));
2397 decl = MkDeclaratorFunction(declId, params);
2398 func = MkClassFunction(MkListOne(MkSpecifierName("uint64")), (((void *)0)), decl, (((void *)0)));
2400 ProcessClassFunctionBody(func, propertyDef->getStmt);
2401 func->declarator->symbol = propertyDef->symbol;
2402 propertyDef->symbol->__anon2.__anon2.externalGet = (struct External *)func;
2403 func->dontMangle = 1;
2404 newDef = MkClassDefFunction(func);
2405 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, after, newDef);
2407 decl = PlugDeclarator(propertyDef->declarator, MkDeclaratorFunction((((void *)0)), (((void *)0))));
2408 func->type = ProcessType(propertyDef->specifiers, decl);
2409 FreeDeclarator(decl);
2410 if(func->type->__anon1.__anon2.returnType->kind == 8 && func->type->__anon1.__anon2.returnType->__anon1._class && func->type->__anon1.__anon2.returnType->__anon1._class->__anon1.registered && func->type->__anon1.__anon2.returnType->__anon1._class->__anon1.registered->type == 1)
2411 func->type->__anon1.__anon2.returnType->byReference = 1;
2412 func->type->__anon1.__anon2.returnType->passAsTemplate = 1;
2414 propertyDef->getStmt = (((void *)0));
2416 func->body = (((void *)0));
2418 if(propertyDef->setStmt && propertyDef->id)
2420 struct Context * prevCurContext;
2421 struct __ecereNameSpace__ecere__sys__OldList * specifiers = MkList();
2422 struct Statement * body = propertyDef->setStmt;
2423 struct Declarator * ptrDecl;
2424 struct Expression * e;
2426 strcpy(name, "class::__ecereClassProp_");
2427 FullClassNameCat(name, symbol->string, 0);
2428 strcat(name, "_Set_");
2429 strcat(name, propertyDef->id->string);
2431 prevCurContext = curContext;
2432 curContext = body->__anon1.compound.context;
2433 ListAdd(params, MkTypeName(MkListOne(MkSpecifierName("uint64")), MkDeclaratorIdentifier(MkIdentifier("_value"))));
2434 decl = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(name)), params);
2435 if(!body->__anon1.compound.declarations)
2436 body->__anon1.compound.declarations = MkList();
2437 if(propertyDef->symbol->type && propertyDef->symbol->type->kind == 8 && propertyDef->symbol->type->__anon1._class && propertyDef->symbol->type->__anon1._class->__anon1.registered && propertyDef->symbol->type->__anon1._class->__anon1.registered->type == 1)
2438 ptrDecl = MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), PlugDeclarator(propertyDef->declarator, MkDeclaratorIdentifier(MkIdentifier("value"))));
2440 ptrDecl = PlugDeclarator(propertyDef->declarator, MkDeclaratorIdentifier(MkIdentifier("value")));
2441 e = MkExpIdentifier(MkIdentifier("_value"));
2442 if(__ecereProp_Type_Get_isPointerType(propertyDef->symbol->type))
2443 e = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("uintptr")), (((void *)0))), e);
2444 ListAdd(body->__anon1.compound.declarations, MkDeclaration(CopyList(propertyDef->specifiers, (void *)(CopySpecifier)), MkListOne(MkInitDeclarator(ptrDecl, MkInitializerAssignment(MkExpCast(MkTypeName(CopyList(propertyDef->specifiers, (void *)(CopySpecifier)), CopyDeclarator(propertyDef->declarator)), e))))));
2445 curContext = prevCurContext;
2447 struct Symbol * sym = ptrDecl->symbol;
2450 FreeType(sym->type);
2451 sym->type = ProcessType(propertyDef->specifiers, propertyDef->declarator);
2453 ListAdd(specifiers, MkSpecifier(VOID));
2454 func = MkClassFunction(specifiers, (((void *)0)), decl, (((void *)0)));
2455 ProcessClassFunctionBody(func, propertyDef->setStmt);
2456 func->dontMangle = 1;
2457 func->declarator->symbol = propertyDef->symbol;
2458 propertyDef->symbol->__anon2.__anon2.externalSet = (struct External *)func;
2459 newDef = MkClassDefFunction(func);
2460 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, after, newDef);
2463 propertyDef->setStmt = (((void *)0));
2465 func->body = (((void *)0));
2470 else if(def->type == 0 && def->__anon1.function->declarator)
2472 struct ClassFunction * func = def->__anon1.function;
2474 func->_class = regClass;
2475 if(!func->dontMangle)
2477 struct Declarator * funcDecl = GetFuncDecl(func->declarator);
2478 struct Identifier * id = GetDeclId(funcDecl);
2479 struct __ecereNameSpace__ecere__com__Method * method;
2481 if(!funcDecl->__anon1.function.parameters || !(*funcDecl->__anon1.function.parameters).first)
2483 if(!funcDecl->__anon1.function.parameters)
2484 funcDecl->__anon1.function.parameters = MkList();
2485 ListAdd(funcDecl->__anon1.function.parameters, MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0))));
2487 method = __ecereNameSpace__ecere__com__eClass_FindMethod(regClass, id->string, privateModule);
2488 FreeSpecifier(id->_class);
2489 id->_class = (((void *)0));
2490 if(inCompiler && method)
2492 char * newId = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (strlen(id->string) + strlen("__ecereMethod___ecereNameSpace__") + strlen(symbol->string) + 2));
2495 ProcessMethodType(method);
2497 if(!NameSpaceContained(regClass->nameSpace, &((struct __ecereNameSpace__ecere__com__Module *)(((char *)regClass->module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->privateNameSpace) && method->memberAccess == 1)
2498 CheckPublicDataType(method->dataType, 1, "class method");
2499 strcpy(newId, "__ecereMethod_");
2500 FullClassNameCat(newId, symbol->string, 0);
2502 strcat(newId, id->string);
2503 (__ecereNameSpace__ecere__com__eSystem_Delete(id->string), id->string = 0);
2505 if(method->type != 1)
2509 (__ecereNameSpace__ecere__com__eSystem_Delete(((struct Symbol *)method->symbol)->string), ((struct Symbol *)method->symbol)->string = 0);
2510 ((struct Symbol *)method->symbol)->string = __ecereNameSpace__ecere__sys__CopyString(newId);
2518 if(initDeclarators != (((void *)0)))
2519 FreeList(initDeclarators, (void *)(FreeInitDeclarator));
2522 void PreProcessClassDefinitions()
2524 struct External * external, * next;
2526 curExternal = (((void *)0));
2529 for(external = (*ast).first; external; external = next)
2531 next = external->next;
2532 curExternal = external;
2533 if(external->type == 2)
2535 struct ClassDefinition * _class = external->__anon1._class;
2537 if(_class->definitions)
2539 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), &_class->loc, ast, external->prev, (((void *)0)), (((void *)0)));
2542 else if(external->type == 1)
2544 struct Declaration * declaration = external->__anon1.declaration;
2546 if(declaration && declaration->type == 1)
2548 if(declaration->__anon1.__anon1.specifiers)
2550 struct Specifier * specifier;
2552 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
2554 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)))
2556 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
2560 struct __ecereNameSpace__ecere__sys__OldList * initDeclarators = (((void *)0));
2561 struct ExtDecl * extDecl = specifier->__anon1.__anon2.extDeclStruct;
2563 specifier->__anon1.__anon2.extDeclStruct = (((void *)0));
2566 initDeclarators = declaration->__anon1.__anon1.declarators;
2567 declaration->__anon1.__anon1.declarators = (((void *)0));
2569 ProcessClass((specifier->type == 4) ? 6 : 0, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, &specifier->loc, ast, external->prev, initDeclarators, extDecl);
2575 else if(declaration && inCompiler && declaration->type == 3)
2577 yylloc = declaration->loc;
2578 if(declaration->declMode == 1)
2579 CheckPublicExpression(declaration->__anon1.__anon2.exp, 1);
2580 else if(declaration->declMode != 3)
2581 CheckPublicExpression(declaration->__anon1.__anon2.exp, 2);
2584 else if(external->type == 3)
2587 else if(inCompiler && external->type == 0)
2589 yylloc = external->__anon1.function->loc;
2590 if(!external->__anon1.function->type)
2591 external->__anon1.function->type = ProcessType(external->__anon1.function->specifiers, external->__anon1.function->declarator);
2592 if(external->__anon1.function->declMode == 1)
2593 CheckPublicDataType(external->__anon1.function->type, 1, "function");
2594 else if(external->__anon1.function->declMode != 3)
2595 CheckPublicDataType(external->__anon1.function->type, 2, "function");
2601 void __ecereRegisterModule_pass0(struct __ecereNameSpace__ecere__com__Instance * module)
2603 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
2605 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("FullClassNameCat", "void FullClassNameCat(char * output, const char * className, bool includeTemplateParams)", FullClassNameCat, module, 1);
2606 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("PreProcessClassDefinitions", "void PreProcessClassDefinitions(void)", PreProcessClassDefinitions, module, 1);