1 /* Code generated from eC source file: pass1.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 int propWatcherID;
47 unsigned int buildingECERECOM = 0;
49 unsigned int buildingECERECOMModule = 0;
51 extern unsigned int inCompiler;
53 extern const char * outputFile;
55 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerTypeSize;
57 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
59 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
61 extern unsigned int parsingType;
63 extern const char * sourceFile;
65 static struct __ecereNameSpace__ecere__com__Instance * classPropValues;
67 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Iterator_data;
69 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
71 struct __ecereNameSpace__ecere__sys__OldList
78 } __attribute__ ((gcc_struct));
80 struct __ecereNameSpace__ecere__com__DataValue
95 } __attribute__ ((gcc_struct)) __anon1;
96 } __attribute__ ((gcc_struct));
98 struct __ecereNameSpace__ecere__com__SerialBuffer
100 unsigned char * _buffer;
104 } __attribute__ ((gcc_struct));
106 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
108 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
110 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
112 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
114 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
118 struct InitDeclarator;
128 struct Instantiation;
148 } __attribute__ ((gcc_struct));
154 struct __ecereNameSpace__ecere__com__LinkList
159 } __attribute__ ((gcc_struct));
161 extern void Compiler_Error(const char * format, ...);
163 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
165 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
167 extern char * __ecereNameSpace__ecere__sys__GetLastDirectory(const char * string, char * output);
169 extern unsigned int __ecereNameSpace__ecere__sys__StripExtension(char * string);
171 extern void FixModuleName(char * moduleName);
173 extern int sprintf(char * , const char * , ...);
175 extern char * QMkString(const char * source);
177 extern char * strcpy(char * , const char * );
179 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
181 extern char * strcat(char * , const char * );
183 extern int strcmp(const char * , const char * );
185 extern char * PrintInt64(long long result);
187 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
189 extern unsigned int DummyMethod(void);
191 extern char * PrintUInt64(uint64 result);
193 extern size_t strlen(const char * );
195 struct __ecereNameSpace__ecere__com__IteratorPointer;
197 struct __ecereNameSpace__ecere__com__GlobalFunction;
199 int __ecereVMethodID_class_OnGetString;
201 void SetBuildingEcereCom(unsigned int b)
203 buildingECERECOM = b;
206 unsigned int GetBuildingEcereCom()
208 return buildingECERECOM;
211 void SetBuildingEcereComModule(unsigned int b)
213 buildingECERECOMModule = b;
216 unsigned int GetBuildingEcereComModule()
218 return buildingECERECOMModule;
221 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
223 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
225 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
227 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
229 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
231 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
233 struct __ecereNameSpace__ecere__com__EnumClassData
235 struct __ecereNameSpace__ecere__sys__OldList values;
237 } __attribute__ ((gcc_struct));
239 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
241 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
243 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
245 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
247 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
249 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
251 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
255 struct CodePosition start;
256 struct CodePosition end;
257 } __attribute__ ((gcc_struct));
259 extern struct Location yylloc;
263 static struct Statement * registerModuleBody;
265 static struct Statement * unregisterModuleBody;
267 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
269 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
271 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
275 static struct External * registerModuleExternal;
277 static struct External * unregisterModuleExternal;
279 extern void FreeExternal(struct External * external);
281 extern struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference);
283 extern struct External * curExternal;
287 extern struct Context * globalContext;
289 extern struct Context * curContext;
291 extern struct Context * PushContext(void);
293 extern void PopContext(struct Context * ctx);
297 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
299 extern struct Expression * MkExpConstant(const char * string);
301 extern struct Expression * MkExpString(const char * string);
303 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
305 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
307 extern struct Expression * CopyExpression(struct Expression * exp);
309 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
311 extern void ProcessExpressionType(struct Expression * exp);
313 extern void FreeExpContents(struct Expression * exp);
315 extern void ComputeExpression(struct Expression * exp);
317 extern struct Expression * MkExpInstance(struct Instantiation * inst);
319 extern void PrintExpression(struct Expression * exp, char * string);
321 struct __ecereNameSpace__ecere__sys__BTNode;
323 struct __ecereNameSpace__ecere__sys__BTNode
326 struct __ecereNameSpace__ecere__sys__BTNode * parent;
327 struct __ecereNameSpace__ecere__sys__BTNode * left;
328 struct __ecereNameSpace__ecere__sys__BTNode * right;
330 } __attribute__ ((gcc_struct));
332 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
334 struct __ecereNameSpace__ecere__com__Class;
336 struct __ecereNameSpace__ecere__com__Instance
339 struct __ecereNameSpace__ecere__com__Class * _class;
341 } __attribute__ ((gcc_struct));
343 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
345 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
347 extern void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class);
349 extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string, long long value);
351 extern long long __ecereNameSpace__ecere__com__eEnum_AddValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string);
353 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
355 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
357 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
359 struct __ecereNameSpace__ecere__com__Iterator
361 struct __ecereNameSpace__ecere__com__Instance * container;
362 struct __ecereNameSpace__ecere__com__IteratorPointer * pointer;
363 } __attribute__ ((gcc_struct));
365 int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Add;
367 int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Free;
369 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
371 unsigned int __ecereMethod___ecereNameSpace__ecere__com__Iterator_Next();
373 uint64 __ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(struct __ecereNameSpace__ecere__com__Iterator * this);
375 void __ecereProp___ecereNameSpace__ecere__com__Iterator_Set_data(struct __ecereNameSpace__ecere__com__Iterator * this, uint64 value);
377 void __ecereDestroyModuleInstances_pass1()
379 (__ecereNameSpace__ecere__com__eInstance_DecRef(classPropValues), classPropValues = 0);
382 struct __ecereNameSpace__ecere__com__Property;
384 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
386 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);
388 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
390 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
394 extern struct Specifier * MkSpecifier(int specifier);
396 extern struct Specifier * CopySpecifier(struct Specifier * spec);
398 extern struct Specifier * MkSpecifierName(const char * name);
400 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
402 extern struct Instantiation * MkInstantiation(struct Specifier * _class, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
404 struct __ecereNameSpace__ecere__com__Method;
406 extern void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method);
408 extern void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name);
412 struct __ecereNameSpace__ecere__com__Property
414 struct __ecereNameSpace__ecere__com__Property * prev;
415 struct __ecereNameSpace__ecere__com__Property * next;
417 unsigned int isProperty;
420 struct __ecereNameSpace__ecere__com__Class * _class;
421 const char * dataTypeString;
422 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
423 struct Type * dataType;
424 void (* Set)(void * , int);
425 int (* Get)(void * );
426 unsigned int (* IsSet)(void * );
430 unsigned int conversion;
431 unsigned int watcherOffset;
432 const char * category;
433 unsigned int compiled;
434 unsigned int selfWatchable;
435 unsigned int isWatchable;
436 } __attribute__ ((gcc_struct));
438 struct __ecereNameSpace__ecere__com__Method
441 struct __ecereNameSpace__ecere__com__Method * parent;
442 struct __ecereNameSpace__ecere__com__Method * left;
443 struct __ecereNameSpace__ecere__com__Method * right;
448 struct __ecereNameSpace__ecere__com__Class * _class;
450 const char * dataTypeString;
451 struct Type * dataType;
453 } __attribute__ ((gcc_struct));
455 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
457 extern unsigned int MatchTypes(struct Type * source, struct Type * dest, struct __ecereNameSpace__ecere__sys__OldList * conversions, struct __ecereNameSpace__ecere__com__Class * owningClassSource, struct __ecereNameSpace__ecere__com__Class * owningClassDest, unsigned int doConversion, unsigned int enumBaseType, unsigned int acceptReversedParams, unsigned int isConversionExploration, unsigned int warnConst);
459 extern void FreeType(struct Type * type);
461 extern int ComputeTypeSize(struct Type * type);
463 extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
470 struct Symbol * parent;
471 struct Symbol * left;
472 struct Symbol * right;
477 struct __ecereNameSpace__ecere__com__Method * method;
478 struct __ecereNameSpace__ecere__com__Property * _property;
479 struct __ecereNameSpace__ecere__com__Class * registered;
480 } __attribute__ ((gcc_struct)) __anon1;
481 unsigned int notYetDeclared;
486 struct External * pointerExternal;
487 struct External * structExternal;
488 } __attribute__ ((gcc_struct)) __anon1;
491 struct External * externalGet;
492 struct External * externalSet;
493 struct External * externalPtr;
494 struct External * externalIsSet;
495 } __attribute__ ((gcc_struct)) __anon2;
498 struct External * methodExternal;
499 struct External * methodCodeExternal;
500 } __attribute__ ((gcc_struct)) __anon3;
501 } __attribute__ ((gcc_struct)) __anon2;
502 unsigned int imported;
503 unsigned int declaredStructSym;
504 struct __ecereNameSpace__ecere__com__Class * _class;
505 unsigned int declaredStruct;
506 unsigned int needConstructor;
507 unsigned int needDestructor;
508 char * constructorName;
511 char * destructorName;
512 struct ModuleImport * module;
513 struct ClassImport * _import;
514 struct Location nameLoc;
515 unsigned int isParam;
516 unsigned int isRemote;
517 unsigned int isStruct;
518 unsigned int fireWatchersDone;
520 unsigned int classData;
521 unsigned int isStatic;
523 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
524 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
525 struct Context * ctx;
527 struct Expression * propCategory;
528 unsigned int mustRegister;
529 } __attribute__ ((gcc_struct));
531 extern struct Symbol * FindClass(const char * name);
535 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
537 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
539 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
541 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
543 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
545 extern char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
547 struct TemplateDatatype
549 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
550 struct Declarator * decl;
551 } __attribute__ ((gcc_struct));
557 struct Declarator * prev;
558 struct Declarator * next;
561 struct Symbol * symbol;
562 struct Declarator * declarator;
565 struct Identifier * identifier;
568 struct Expression * exp;
569 struct Expression * posExp;
570 struct Attrib * attrib;
571 } __attribute__ ((gcc_struct)) structDecl;
574 struct Expression * exp;
575 struct Specifier * enumClass;
576 } __attribute__ ((gcc_struct)) array;
579 struct __ecereNameSpace__ecere__sys__OldList * parameters;
580 } __attribute__ ((gcc_struct)) function;
583 struct Pointer * pointer;
584 } __attribute__ ((gcc_struct)) pointer;
587 struct ExtDecl * extended;
588 } __attribute__ ((gcc_struct)) extended;
589 } __attribute__ ((gcc_struct)) __anon1;
590 } __attribute__ ((gcc_struct));
592 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
594 extern struct Identifier * MkIdentifier(const char * string);
596 extern struct Expression * MkExpIdentifier(struct Identifier * id);
598 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
600 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
604 struct Identifier * prev;
605 struct Identifier * next;
607 struct Symbol * classSym;
608 struct Specifier * _class;
610 struct Identifier * badID;
611 } __attribute__ ((gcc_struct));
613 extern struct Identifier * GetDeclId(struct Declarator * decl);
615 struct ClassPropertyValue
617 struct __ecereNameSpace__ecere__com__Class * regClass;
618 struct Identifier * id;
619 struct Expression * exp;
620 } __attribute__ ((gcc_struct));
622 extern void FreeIdentifier(struct Identifier * id);
624 struct __ecereNameSpace__ecere__sys__NamedLink64;
626 struct __ecereNameSpace__ecere__sys__NamedLink64
628 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
629 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
632 } __attribute__ ((gcc_struct));
634 struct __ecereNameSpace__ecere__sys__OldLink;
636 struct __ecereNameSpace__ecere__sys__OldLink
638 struct __ecereNameSpace__ecere__sys__OldLink * prev;
639 struct __ecereNameSpace__ecere__sys__OldLink * next;
641 } __attribute__ ((gcc_struct));
643 struct ClassFunction;
647 struct ClassFunction * prev;
648 struct ClassFunction * next;
650 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
651 struct Declarator * declarator;
652 struct __ecereNameSpace__ecere__sys__OldList * declarations;
653 struct Statement * body;
654 struct __ecereNameSpace__ecere__com__Class * _class;
655 struct __ecereNameSpace__ecere__sys__OldList attached;
658 struct Symbol * propSet;
659 unsigned int isVirtual;
660 unsigned int isConstructor;
661 unsigned int isDestructor;
662 unsigned int dontMangle;
665 } __attribute__ ((gcc_struct));
667 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
669 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
671 struct PropertyWatch;
675 struct PropertyWatch * prev;
676 struct PropertyWatch * next;
678 struct Statement * compound;
679 struct __ecereNameSpace__ecere__sys__OldList * properties;
680 unsigned int deleteWatch;
681 } __attribute__ ((gcc_struct));
683 extern void FreePropertyWatch(struct PropertyWatch * watcher);
689 struct Statement * prev;
690 struct Statement * next;
695 struct __ecereNameSpace__ecere__sys__OldList * expressions;
698 struct Identifier * id;
699 struct Statement * stmt;
700 } __attribute__ ((gcc_struct)) labeled;
703 struct Expression * exp;
704 struct Statement * stmt;
705 } __attribute__ ((gcc_struct)) caseStmt;
708 struct __ecereNameSpace__ecere__sys__OldList * declarations;
709 struct __ecereNameSpace__ecere__sys__OldList * statements;
710 struct Context * context;
711 unsigned int isSwitch;
712 } __attribute__ ((gcc_struct)) compound;
715 struct __ecereNameSpace__ecere__sys__OldList * exp;
716 struct Statement * stmt;
717 struct Statement * elseStmt;
718 } __attribute__ ((gcc_struct)) ifStmt;
721 struct __ecereNameSpace__ecere__sys__OldList * exp;
722 struct Statement * stmt;
723 } __attribute__ ((gcc_struct)) switchStmt;
726 struct __ecereNameSpace__ecere__sys__OldList * exp;
727 struct Statement * stmt;
728 } __attribute__ ((gcc_struct)) whileStmt;
731 struct __ecereNameSpace__ecere__sys__OldList * exp;
732 struct Statement * stmt;
733 } __attribute__ ((gcc_struct)) doWhile;
736 struct Statement * init;
737 struct Statement * check;
738 struct __ecereNameSpace__ecere__sys__OldList * increment;
739 struct Statement * stmt;
740 } __attribute__ ((gcc_struct)) forStmt;
743 struct Identifier * id;
744 } __attribute__ ((gcc_struct)) gotoStmt;
747 struct Specifier * spec;
749 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
750 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
751 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
752 } __attribute__ ((gcc_struct)) asmStmt;
755 struct Expression * watcher;
756 struct Expression * object;
757 struct __ecereNameSpace__ecere__sys__OldList * watches;
758 } __attribute__ ((gcc_struct)) _watch;
761 struct Identifier * id;
762 struct __ecereNameSpace__ecere__sys__OldList * exp;
763 struct __ecereNameSpace__ecere__sys__OldList * filter;
764 struct Statement * stmt;
765 } __attribute__ ((gcc_struct)) forEachStmt;
766 struct Declaration * decl;
767 } __attribute__ ((gcc_struct)) __anon1;
768 } __attribute__ ((gcc_struct));
770 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
774 struct Declaration * prev;
775 struct Declaration * next;
782 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
783 struct __ecereNameSpace__ecere__sys__OldList * declarators;
784 } __attribute__ ((gcc_struct)) __anon1;
785 struct Instantiation * inst;
788 struct Identifier * id;
789 struct Expression * exp;
790 } __attribute__ ((gcc_struct)) __anon2;
791 } __attribute__ ((gcc_struct)) __anon1;
792 struct Specifier * extStorage;
793 struct Symbol * symbol;
795 } __attribute__ ((gcc_struct));
799 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
801 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
803 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
807 struct Initializer * prev;
808 struct Initializer * next;
813 struct Expression * exp;
814 struct __ecereNameSpace__ecere__sys__OldList * list;
815 } __attribute__ ((gcc_struct)) __anon1;
816 unsigned int isConstant;
817 struct Identifier * id;
818 } __attribute__ ((gcc_struct));
820 struct FunctionDefinition;
822 extern struct FunctionDefinition * _MkFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * declarationList, unsigned int errorOnOmit);
824 struct FunctionDefinition
826 struct FunctionDefinition * prev;
827 struct FunctionDefinition * next;
829 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
830 struct Declarator * declarator;
831 struct __ecereNameSpace__ecere__sys__OldList * declarations;
832 struct Statement * body;
833 struct __ecereNameSpace__ecere__com__Class * _class;
834 struct __ecereNameSpace__ecere__sys__OldList attached;
837 struct Symbol * propSet;
839 unsigned int propertyNoThis;
840 } __attribute__ ((gcc_struct));
842 extern void ProcessFunctionBody(struct FunctionDefinition * func, struct Statement * body);
844 extern struct External * MkExternalFunction(struct FunctionDefinition * function);
850 struct TypeName * prev;
851 struct TypeName * next;
853 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
854 struct Declarator * declarator;
856 struct Expression * bitCount;
857 } __attribute__ ((gcc_struct));
859 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
861 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
863 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
867 struct Expression * prev;
868 struct Expression * next;
876 struct Identifier * identifier;
877 } __attribute__ ((gcc_struct)) __anon1;
878 struct Statement * compound;
879 struct Instantiation * instance;
883 unsigned int intlString;
884 unsigned int wideString;
885 } __attribute__ ((gcc_struct)) __anon2;
886 struct __ecereNameSpace__ecere__sys__OldList * list;
889 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
890 struct Declarator * decl;
891 } __attribute__ ((gcc_struct)) _classExp;
894 struct Identifier * id;
895 } __attribute__ ((gcc_struct)) classData;
898 struct Expression * exp;
899 struct __ecereNameSpace__ecere__sys__OldList * arguments;
900 struct Location argLoc;
901 } __attribute__ ((gcc_struct)) call;
904 struct Expression * exp;
905 struct __ecereNameSpace__ecere__sys__OldList * index;
906 } __attribute__ ((gcc_struct)) index;
909 struct Expression * exp;
910 struct Identifier * member;
912 unsigned int thisPtr;
913 } __attribute__ ((gcc_struct)) member;
917 struct Expression * exp1;
918 struct Expression * exp2;
919 } __attribute__ ((gcc_struct)) op;
920 struct TypeName * typeName;
921 struct Specifier * _class;
924 struct TypeName * typeName;
925 struct Expression * exp;
926 } __attribute__ ((gcc_struct)) cast;
929 struct Expression * cond;
930 struct __ecereNameSpace__ecere__sys__OldList * exp;
931 struct Expression * elseExp;
932 } __attribute__ ((gcc_struct)) cond;
935 struct TypeName * typeName;
936 struct Expression * size;
937 } __attribute__ ((gcc_struct)) _new;
940 struct TypeName * typeName;
941 struct Expression * size;
942 struct Expression * exp;
943 } __attribute__ ((gcc_struct)) _renew;
947 struct Identifier * id;
948 } __attribute__ ((gcc_struct)) db;
951 struct Expression * ds;
952 struct Expression * name;
953 } __attribute__ ((gcc_struct)) dbopen;
956 struct TypeName * typeName;
957 struct Initializer * initializer;
958 } __attribute__ ((gcc_struct)) initializer;
961 struct Expression * exp;
962 struct TypeName * typeName;
963 } __attribute__ ((gcc_struct)) vaArg;
964 } __attribute__ ((gcc_struct)) __anon1;
965 unsigned int debugValue;
966 struct __ecereNameSpace__ecere__com__DataValue val;
968 unsigned int hasAddress;
969 struct Type * expType;
970 struct Type * destType;
973 unsigned int byReference;
974 unsigned int isConstant;
975 unsigned int addedThis;
976 unsigned int needCast;
977 unsigned int thisPtr;
978 unsigned int opDestType;
979 unsigned int needTemplateCast;
980 } __attribute__ ((gcc_struct));
986 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
987 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
988 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
989 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
990 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
991 unsigned int (* Neg)(struct Expression *, struct Operand *);
992 unsigned int (* Inc)(struct Expression *, struct Operand *);
993 unsigned int (* Dec)(struct Expression *, struct Operand *);
994 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
995 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
996 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
997 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
998 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
999 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1000 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1001 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1002 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1003 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1004 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1005 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1006 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1007 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1008 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1009 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1010 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1011 unsigned int (* Not)(struct Expression *, struct Operand *);
1012 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1013 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1014 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1015 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1016 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1017 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1018 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1019 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1020 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1021 } __attribute__ ((gcc_struct));
1027 unsigned int ptrSize;
1040 } __attribute__ ((gcc_struct)) __anon1;
1042 } __attribute__ ((gcc_struct));
1044 extern struct Operand GetOperand(struct Expression * exp);
1046 struct __ecereNameSpace__ecere__sys__BinaryTree;
1048 struct __ecereNameSpace__ecere__sys__BinaryTree
1050 struct __ecereNameSpace__ecere__sys__BTNode * root;
1052 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
1053 void (* FreeKey)(void * key);
1054 } __attribute__ ((gcc_struct));
1056 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
1058 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
1060 struct TemplateParameter;
1064 struct Specifier * prev;
1065 struct Specifier * next;
1066 struct Location loc;
1073 struct ExtDecl * extDecl;
1075 struct Symbol * symbol;
1076 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1077 struct Specifier * nsSpec;
1078 } __attribute__ ((gcc_struct)) __anon1;
1081 struct Identifier * id;
1082 struct __ecereNameSpace__ecere__sys__OldList * list;
1083 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1084 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1085 unsigned int addNameSpace;
1086 struct Context * ctx;
1087 struct ExtDecl * extDeclStruct;
1088 } __attribute__ ((gcc_struct)) __anon2;
1089 struct Expression * expression;
1090 struct Specifier * _class;
1091 struct TemplateParameter * templateParameter;
1092 } __attribute__ ((gcc_struct)) __anon1;
1093 } __attribute__ ((gcc_struct));
1102 struct Symbol * _class;
1105 struct __ecereNameSpace__ecere__sys__OldList members;
1107 } __attribute__ ((gcc_struct)) __anon1;
1110 struct Type * returnType;
1111 struct __ecereNameSpace__ecere__sys__OldList params;
1112 struct Symbol * thisClass;
1113 unsigned int staticMethod;
1114 struct TemplateParameter * thisClassTemplate;
1115 } __attribute__ ((gcc_struct)) __anon2;
1118 struct __ecereNameSpace__ecere__com__Method * method;
1119 struct __ecereNameSpace__ecere__com__Class * methodClass;
1120 struct __ecereNameSpace__ecere__com__Class * usedClass;
1121 } __attribute__ ((gcc_struct)) __anon3;
1124 struct Type * arrayType;
1126 struct Expression * arraySizeExp;
1127 unsigned int freeExp;
1128 struct Symbol * enumClass;
1129 } __attribute__ ((gcc_struct)) __anon4;
1131 struct TemplateParameter * templateParameter;
1132 } __attribute__ ((gcc_struct)) __anon1;
1137 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1138 int classObjectType;
1140 unsigned int offset;
1143 unsigned int isSigned : 1;
1144 unsigned int constant : 1;
1145 unsigned int truth : 1;
1146 unsigned int byReference : 1;
1147 unsigned int extraParam : 1;
1148 unsigned int directClassAccess : 1;
1149 unsigned int computing : 1;
1150 unsigned int keepCast : 1;
1151 unsigned int passAsTemplate : 1;
1152 unsigned int dllExport : 1;
1153 unsigned int attrStdcall : 1;
1154 unsigned int declaredWithStruct : 1;
1155 unsigned int typedByReference : 1;
1156 unsigned int casted : 1;
1157 unsigned int pointerAlignment : 1;
1158 } __attribute__ ((gcc_struct));
1160 unsigned int __ecereProp_Type_Get_isPointerTypeSize(struct Type * this);
1162 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
1164 struct __ecereNameSpace__ecere__com__Module;
1166 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);
1168 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
1170 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
1172 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);
1174 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);
1176 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
1178 struct __ecereNameSpace__ecere__com__DataMember;
1180 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1186 const char * dataTypeString;
1187 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1188 } __attribute__ ((gcc_struct)) __anon1;
1189 struct __ecereNameSpace__ecere__com__DataValue expression;
1192 const char * memberString;
1195 struct __ecereNameSpace__ecere__com__DataMember * member;
1196 struct __ecereNameSpace__ecere__com__Property * prop;
1197 struct __ecereNameSpace__ecere__com__Method * method;
1198 } __attribute__ ((gcc_struct)) __anon1;
1199 } __attribute__ ((gcc_struct)) __anon2;
1200 } __attribute__ ((gcc_struct)) __anon1;
1201 } __attribute__ ((gcc_struct));
1203 struct __ecereNameSpace__ecere__com__DataMember
1205 struct __ecereNameSpace__ecere__com__DataMember * prev;
1206 struct __ecereNameSpace__ecere__com__DataMember * next;
1208 unsigned int isProperty;
1211 struct __ecereNameSpace__ecere__com__Class * _class;
1212 const char * dataTypeString;
1213 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1214 struct Type * dataType;
1218 struct __ecereNameSpace__ecere__sys__OldList members;
1219 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
1221 short structAlignment;
1222 short pointerAlignment;
1223 } __attribute__ ((gcc_struct));
1225 extern struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param);
1227 struct __ecereNameSpace__ecere__com__BitMember;
1229 struct __ecereNameSpace__ecere__com__BitMember
1231 struct __ecereNameSpace__ecere__com__BitMember * prev;
1232 struct __ecereNameSpace__ecere__com__BitMember * next;
1234 unsigned int isProperty;
1237 struct __ecereNameSpace__ecere__com__Class * _class;
1238 const char * dataTypeString;
1239 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1240 struct Type * dataType;
1245 } __attribute__ ((gcc_struct));
1247 struct __ecereNameSpace__ecere__com__ClassProperty;
1249 struct __ecereNameSpace__ecere__com__ClassProperty
1252 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1253 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1254 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1256 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1257 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1258 const char * dataTypeString;
1259 struct Type * dataType;
1260 unsigned int constant;
1261 } __attribute__ ((gcc_struct));
1263 struct ClassDefinition;
1267 struct External * prev;
1268 struct External * next;
1269 struct Location loc;
1271 struct Symbol * symbol;
1274 struct FunctionDefinition * function;
1275 struct ClassDefinition * _class;
1276 struct Declaration * declaration;
1277 char * importString;
1278 struct Identifier * id;
1279 struct DBTableDef * table;
1280 } __attribute__ ((gcc_struct)) __anon1;
1282 struct External * fwdDecl;
1283 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1284 struct __ecereNameSpace__ecere__com__Instance * incoming;
1285 int nonBreakableIncoming;
1286 } __attribute__ ((gcc_struct));
1290 struct Context * parent;
1291 struct __ecereNameSpace__ecere__sys__BinaryTree types;
1292 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1293 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
1294 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
1297 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
1298 struct ClassDefinition * classDef;
1299 unsigned int templateTypesOnly;
1300 unsigned int hasNameSpace;
1301 } __attribute__ ((gcc_struct));
1303 struct ClassDefinition
1305 struct ClassDefinition * prev;
1306 struct ClassDefinition * next;
1307 struct Location loc;
1308 struct Specifier * _class;
1309 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1310 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1311 struct Symbol * symbol;
1312 struct Location blockStart;
1313 struct Location nameLoc;
1315 unsigned int deleteWatchable;
1316 } __attribute__ ((gcc_struct));
1318 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
1324 struct Enumerator * prev;
1325 struct Enumerator * next;
1326 struct Location loc;
1327 struct Identifier * id;
1328 struct Expression * exp;
1329 } __attribute__ ((gcc_struct));
1331 struct TemplateArgument;
1333 struct TemplateParameter
1335 struct TemplateParameter * prev;
1336 struct TemplateParameter * next;
1337 struct Location loc;
1339 struct Identifier * identifier;
1342 struct TemplateDatatype * dataType;
1344 } __attribute__ ((gcc_struct)) __anon1;
1345 struct TemplateArgument * defaultArgument;
1346 const char * dataTypeString;
1347 struct Type * baseType;
1348 } __attribute__ ((gcc_struct));
1350 struct TemplateArgument
1352 struct TemplateArgument * prev;
1353 struct TemplateArgument * next;
1354 struct Location loc;
1355 struct Identifier * name;
1359 struct Expression * expression;
1360 struct Identifier * identifier;
1361 struct TemplateDatatype * templateDatatype;
1362 } __attribute__ ((gcc_struct)) __anon1;
1363 } __attribute__ ((gcc_struct));
1367 typedef union YYSTYPE
1372 struct Identifier * id;
1373 struct Expression * exp;
1374 struct Specifier * specifier;
1375 struct __ecereNameSpace__ecere__sys__OldList * list;
1376 struct Enumerator * enumerator;
1377 struct Declarator * declarator;
1378 struct Pointer * pointer;
1379 struct Initializer * initializer;
1380 struct InitDeclarator * initDeclarator;
1381 struct TypeName * typeName;
1382 struct Declaration * declaration;
1383 struct Statement * stmt;
1384 struct FunctionDefinition * function;
1385 struct External * external;
1386 struct Context * context;
1387 struct AsmField * asmField;
1388 struct Attrib * attrib;
1389 struct ExtDecl * extDecl;
1390 struct Attribute * attribute;
1391 struct Instantiation * instance;
1392 struct MembersInit * membersInit;
1393 struct MemberInit * memberInit;
1394 struct ClassFunction * classFunction;
1395 struct ClassDefinition * _class;
1396 struct ClassDef * classDef;
1397 struct PropertyDef * prop;
1399 struct Symbol * symbol;
1400 struct PropertyWatch * propertyWatch;
1401 struct TemplateParameter * templateParameter;
1402 struct TemplateArgument * templateArgument;
1403 struct TemplateDatatype * templateDatatype;
1404 struct DBTableEntry * dbtableEntry;
1405 struct DBIndexItem * dbindexItem;
1406 struct DBTableDef * dbtableDef;
1407 } __attribute__ ((gcc_struct)) YYSTYPE;
1409 extern YYSTYPE yylval;
1413 struct ClassDef * prev;
1414 struct ClassDef * next;
1415 struct Location loc;
1419 struct Declaration * decl;
1420 struct ClassFunction * function;
1421 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1422 struct PropertyDef * propertyDef;
1423 struct PropertyWatch * propertyWatch;
1425 struct Identifier * defaultProperty;
1428 struct Identifier * id;
1429 struct Initializer * initializer;
1430 } __attribute__ ((gcc_struct)) __anon1;
1431 } __attribute__ ((gcc_struct)) __anon1;
1434 } __attribute__ ((gcc_struct));
1436 extern struct ClassDef * MkClassDefFunction(struct ClassFunction * function);
1438 struct __ecereNameSpace__ecere__com__NameSpace;
1440 struct __ecereNameSpace__ecere__com__NameSpace
1443 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1444 struct __ecereNameSpace__ecere__com__NameSpace * left;
1445 struct __ecereNameSpace__ecere__com__NameSpace * right;
1447 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1448 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1449 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1450 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1451 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1452 } __attribute__ ((gcc_struct));
1454 struct __ecereNameSpace__ecere__com__Class
1456 struct __ecereNameSpace__ecere__com__Class * prev;
1457 struct __ecereNameSpace__ecere__com__Class * next;
1463 unsigned int (* Constructor)(void * );
1464 void (* Destructor)(void * );
1467 struct __ecereNameSpace__ecere__com__Class * base;
1468 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
1469 struct __ecereNameSpace__ecere__sys__BinaryTree members;
1470 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
1471 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
1472 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
1473 struct __ecereNameSpace__ecere__sys__OldList derivatives;
1477 struct __ecereNameSpace__ecere__com__Instance * module;
1478 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
1479 const char * dataTypeString;
1480 struct Type * dataType;
1482 int defaultAlignment;
1483 void (* Initialize)();
1485 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
1486 const char * designerClass;
1487 unsigned int noExpansion;
1488 const char * defaultProperty;
1489 unsigned int comRedefinition;
1492 unsigned int internalDecl;
1494 unsigned int computeSize;
1495 short structAlignment;
1496 short pointerAlignment;
1497 int destructionWatchOffset;
1499 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
1500 int inheritanceAccess;
1501 const char * fullName;
1503 struct __ecereNameSpace__ecere__sys__OldList conversions;
1504 struct __ecereNameSpace__ecere__sys__OldList templateParams;
1505 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
1506 struct __ecereNameSpace__ecere__com__Class * templateClass;
1507 struct __ecereNameSpace__ecere__sys__OldList templatized;
1509 unsigned int isInstanceClass;
1510 unsigned int byValueSystemClass;
1511 } __attribute__ ((gcc_struct));
1513 struct __ecereNameSpace__ecere__com__Application
1516 const char * * argv;
1518 unsigned int isGUIApp;
1519 struct __ecereNameSpace__ecere__sys__OldList allModules;
1520 char * parsedCommand;
1521 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
1522 } __attribute__ ((gcc_struct));
1524 void GetNameSpaceString(struct __ecereNameSpace__ecere__com__NameSpace * ns, char * string)
1527 GetNameSpaceString(ns->parent, string);
1530 strcat(string, ns->name);
1531 strcat(string, "::");
1535 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassPropertyValue;
1537 struct External * ProcessClassFunction(struct __ecereNameSpace__ecere__com__Class * owningClass, struct ClassFunction * func, struct __ecereNameSpace__ecere__sys__OldList * defs, struct External * after, unsigned int makeStatic)
1539 struct Type * type = (((void *)0));
1540 struct Symbol * symbol;
1541 struct External * external = (((void *)0));
1543 if(defs && func->declarator)
1545 struct FunctionDefinition * function = (((void *)0));
1546 struct Symbol * propSymbol;
1550 if(!func->specifiers)
1551 func->specifiers = MkList();
1554 struct Specifier * s;
1556 for(s = (*func->specifiers).first; s; s = s->next)
1557 if(s->type == 0 && s->__anon1.specifier == STATIC)
1560 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*func->specifiers), (((void *)0)), MkSpecifier(STATIC));
1563 propSymbol = func->declarator->symbol;
1564 ReplaceThisClassSpecifiers(func->specifiers, owningClass);
1565 if(propSymbol->__anon2.__anon2.externalGet == (struct External *)func)
1566 func->declarator->symbol = (((void *)0));
1567 else if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func)
1568 func->declarator->symbol = (((void *)0));
1569 else if(propSymbol->__anon2.__anon2.externalIsSet == (struct External *)func)
1570 func->declarator->symbol = (((void *)0));
1572 function = _MkFunction(func->specifiers, func->declarator, (((void *)0)), 0);
1573 function->propSet = func->propSet;
1574 function->type = func->type;
1576 func->type->refCount++;
1577 ProcessFunctionBody(function, func->body);
1578 external = MkExternalFunction(function);
1579 external->symbol = func->declarator->symbol;
1580 external->__anon1.function->_class = func->_class;
1582 symbol = func->declarator->symbol;
1583 if(!func->dontMangle)
1585 struct __ecereNameSpace__ecere__com__Method * method = func->declarator->symbol->__anon1.method;
1587 func->declarator->symbol->__anon2.__anon3.methodExternal = external;
1588 if(method && method->symbol)
1589 ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal = external;
1590 if(method && method->type == 1)
1592 struct Type * methodDataType;
1594 ProcessMethodType(method);
1595 methodDataType = method->dataType;
1596 type = symbol->type;
1597 if(!type->__anon1.__anon2.staticMethod && !type->__anon1.__anon2.thisClass && !type->__anon1.__anon2.thisClassTemplate)
1599 if(method->dataType->__anon1.__anon2.thisClassTemplate)
1601 if(owningClass->templateArgs)
1603 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = FindTemplateArg(owningClass, method->dataType->__anon1.__anon2.thisClassTemplate);
1605 type->byReference = method->dataType->byReference;
1606 methodDataType = ProcessTypeString(method->dataTypeString, 0);
1607 type->__anon1.__anon2.thisClass = methodDataType->__anon1.__anon2.thisClass = arg ? FindClass((*arg).__anon1.__anon1.dataTypeString) : (((void *)0));
1610 else if(method->dataType->__anon1.__anon2.staticMethod)
1611 type->__anon1.__anon2.staticMethod = 1;
1612 else if(method->dataType->__anon1.__anon2.thisClass)
1614 type->__anon1.__anon2.thisClass = method->dataType->__anon1.__anon2.thisClass;
1615 type->byReference = method->dataType->byReference;
1619 if(!owningClass->symbol)
1620 owningClass->symbol = FindClass(owningClass->fullName);
1621 type->__anon1.__anon2.thisClass = owningClass->symbol;
1622 type->extraParam = 1;
1626 if(!MatchTypes(type, methodDataType, (((void *)0)), owningClass, method->_class, 1, 1, 1, 0, 1))
1628 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Incompatible virtual function %s\n", (((void *)0))), method->name);
1632 struct Type * typeParam;
1633 struct Declarator * funcDecl = GetFuncDecl(func->declarator);
1635 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).first)
1637 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
1639 for(typeParam = methodDataType->__anon1.__anon2.params.first; typeParam && param; typeParam = typeParam->next)
1641 if(typeParam->classObjectType)
1643 param->classObjectType = typeParam->classObjectType;
1644 if(param->declarator && param->declarator->symbol)
1645 param->declarator->symbol->type->classObjectType = typeParam->classObjectType;
1647 param = param ? param->next : (((void *)0));
1651 if(methodDataType != method->dataType)
1652 FreeType(methodDataType);
1656 type = symbol->type;
1657 if(!type->__anon1.__anon2.staticMethod && !type->__anon1.__anon2.thisClass)
1659 if(owningClass && !owningClass->symbol)
1660 owningClass->symbol = FindClass(owningClass->fullName);
1661 type->__anon1.__anon2.thisClass = owningClass ? FindClass(owningClass->fullName) : (((void *)0));
1667 if(symbol->type && !symbol->type->__anon1.__anon2.staticMethod && !symbol->type->__anon1.__anon2.thisClass)
1669 if(!owningClass->symbol)
1670 owningClass->symbol = FindClass(owningClass->fullName);
1671 symbol->type->__anon1.__anon2.thisClass = owningClass->symbol;
1673 if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func && propSymbol->__anon1._property && propSymbol->__anon1._property->conversion)
1675 if(symbol->type->__anon1.__anon2.thisClass && symbol->type->classObjectType != 1)
1677 if(owningClass->type != 1)
1678 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
1681 if(propSymbol->__anon2.__anon2.externalGet == (struct External *)func)
1683 propSymbol->__anon2.__anon2.externalGet = external;
1685 else if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func)
1687 propSymbol->__anon2.__anon2.externalSet = external;
1689 else if(propSymbol->__anon2.__anon2.externalIsSet == (struct External *)func)
1691 propSymbol->__anon2.__anon2.externalIsSet = external;
1701 func->declarator = (((void *)0));
1702 func->specifiers = (((void *)0));
1703 func->body = (((void *)0));
1704 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, external);
1708 struct __ecereNameSpace__ecere__com__Method * method = func->declarator->symbol->__anon1.method;
1710 if(method && method->symbol)
1711 ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal = (((void *)0));
1712 if(func->declarator->symbol && func->declarator->symbol->__anon2.__anon3.methodExternal == external)
1713 func->declarator->symbol->__anon2.__anon3.methodExternal = (((void *)0));
1714 func->declarator = (((void *)0));
1715 func->specifiers = (((void *)0));
1716 FreeExternal(external);
1721 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1722 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1723 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, external);
1724 external->__anon1.function->declarator = CopyDeclarator(external->__anon1.function->declarator);
1725 external->__anon1.function->specifiers = CopyList(external->__anon1.function->specifiers, (void *)(CopySpecifier));
1726 external->__anon1.function->body = (((void *)0));
1732 void RegisterMembersAndProperties(struct __ecereNameSpace__ecere__com__Class * regClass, unsigned int isMember, const char * className, struct Statement * statement)
1734 struct __ecereNameSpace__ecere__com__DataMember * dataMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)regClass : (((void *)0));
1735 struct __ecereNameSpace__ecere__com__DataMember * member;
1736 struct __ecereNameSpace__ecere__com__Property * prop;
1737 struct Expression * exp;
1738 struct Statement * stmt;
1739 char dataMemberSize[16];
1740 unsigned int lastOffset = 0;
1742 unsigned int privateMembers = 0;
1744 sprintf(dataMemberSize, "%d", (int)sizeof(struct __ecereNameSpace__ecere__com__DataMember *));
1747 for(prop = regClass->conversions.first; prop; prop = prop->next)
1749 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1752 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1753 ListAdd(args, MkExpConstant("0"));
1755 char * string = QMkString(prop->dataTypeString);
1757 ListAdd(args, MkExpString(string));
1758 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1762 strcpy(name, "__ecereProp_");
1763 FullClassNameCat(name, regClass->fullName, 0);
1764 strcat(name, "_Set_");
1765 FullClassNameCat(name, prop->name, 1);
1766 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1769 ListAdd(args, MkExpConstant("0"));
1772 strcpy(name, "__ecereProp_");
1773 FullClassNameCat(name, regClass->fullName, 0);
1774 strcat(name, "_Get_");
1775 FullClassNameCat(name, prop->name, 1);
1776 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1779 ListAdd(args, MkExpConstant("0"));
1780 switch(prop->memberAccess)
1783 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1786 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1790 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1793 strcpy(name, "__ecereProp_");
1794 FullClassNameCat(name, regClass->fullName, 0);
1796 FullClassNameCat(name, prop->name, 1);
1797 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args))));
1798 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1801 for(member = isMember ? dataMember->members.first : regClass->membersAndProperties.first; member; member = member->next)
1803 if(member->isProperty)
1805 prop = (struct __ecereNameSpace__ecere__com__Property *)member;
1807 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1808 char name[1024], nameM[1024];
1809 char * string = QMkString(prop->name);
1811 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1812 ListAdd(args, MkExpString(string));
1813 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1815 char * string = QMkString(prop->dataTypeString);
1817 ListAdd(args, MkExpString(string));
1818 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1822 strcpy(name, "__ecereProp_");
1823 FullClassNameCat(name, regClass->fullName, 0);
1824 strcat(name, "_Set_");
1825 FullClassNameCat(name, prop->name, 1);
1826 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1829 ListAdd(args, MkExpConstant("0"));
1832 strcpy(name, "__ecereProp_");
1833 FullClassNameCat(name, regClass->fullName, 0);
1834 strcat(name, "_Get_");
1835 FullClassNameCat(name, prop->name, 1);
1836 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1839 ListAdd(args, MkExpConstant("0"));
1840 switch(prop->memberAccess)
1843 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1846 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1850 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1853 strcpy(name, "__ecereProp_");
1854 FullClassNameCat(name, regClass->fullName, 0);
1856 FullClassNameCat(name, prop->name, 1);
1857 strcpy(nameM, "__ecerePropM_");
1858 FullClassNameCat(nameM, regClass->fullName, 0);
1860 FullClassNameCat(nameM, prop->name, 1);
1861 if(prop->dataTypeString)
1863 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args))));
1867 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args)));
1869 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1874 strcpy(name, "__ecereProp_");
1875 FullClassNameCat(name, regClass->fullName, 1);
1876 strcat(name, "_IsSet_");
1877 FullClassNameCat(name, prop->name, 0);
1878 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier(nameM)), MkIdentifier("IsSet")), '=', MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(name))))));
1879 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1881 if(prop->symbol && ((struct Symbol *)prop->symbol)->propCategory)
1883 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier(nameM)), MkIdentifier("category")), '=', CopyExpression(((struct Symbol *)prop->symbol)->propCategory))));
1884 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1886 if(prop->dataTypeString)
1888 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
1890 ListAdd(list, MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', MkExpIdentifier(MkIdentifier(nameM))));
1891 ListAdd(list, MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0"))));
1892 stmt = MkIfStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("module")), MkIdentifier("application")), EQ_OP, MkExpMember(MkExpIdentifier(MkIdentifier("__thisModule")), MkIdentifier("application")))), MkExpressionStmt(list), (((void *)0)));
1893 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1894 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")))));
1895 ListAdd(unregisterModuleBody->__anon1.compound.statements, stmt);
1899 else if(member->type == 0 && !isMember && regClass->type == 2)
1901 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)member;
1902 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1904 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1906 char * string = QMkString(bitMember->name);
1908 ListAdd(args, MkExpString(string));
1909 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1912 char * string = QMkString(bitMember->dataTypeString);
1914 ListAdd(args, MkExpString(string));
1915 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1920 sprintf(string, "%d", bitMember->size);
1921 ListAdd(args, (exp = MkExpConstant(string)));
1926 sprintf(string, "%d", bitMember->pos);
1927 ListAdd(args, (exp = MkExpConstant(string)));
1929 switch(member->memberAccess)
1932 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1935 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1939 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1942 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddBitMember")), args)));
1943 ListAdd(statement->__anon1.compound.statements, stmt);
1945 else if(member->memberAccess == 1 || (member->type == 0 && !member->dataTypeString))
1947 struct __ecereNameSpace__ecere__sys__OldList * args;
1951 unsigned int offset = member->offset - lastOffset;
1954 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1958 sprintf(string, "\"__ecerePrivateData%d\"", privateID++);
1959 ListAdd(args, MkExpString(string));
1964 sprintf(string, "\"byte[%d]\"", offset);
1965 ListAdd(args, MkExpString(string));
1970 sprintf(string, "%d", offset);
1971 ListAdd(args, (exp = MkExpConstant(string)));
1973 ListAdd(args, (exp = MkExpConstant("1")));
1974 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1975 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier(isMember ? "eMember_AddDataMember" : "eClass_AddDataMember")), args)));
1976 ListAdd(statement->__anon1.compound.statements, stmt);
1979 if(member->type == 0)
1981 if(!member->dataType)
1982 member->dataType = ProcessTypeString(member->dataTypeString, 0);
1983 ComputeTypeSize(member->dataType);
1985 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1987 char * string = QMkString(member->name);
1989 ListAdd(args, MkExpString(string));
1990 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1993 char * string = QMkString(member->dataTypeString);
1995 ListAdd(args, MkExpString(string));
1996 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1999 if(__ecereProp_Type_Get_isPointerTypeSize(member->dataType))
2001 ListAdd(args, (exp = MkExpTypeSize(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))))));
2002 ListAdd(args, (exp = MkExpConstant("0xF000F000")));
2008 if(member->dataType->kind == 8 && member->dataType->__anon1._class && member->dataType->__anon1._class->__anon1.registered && member->dataType->__anon1._class->__anon1.registered->offset == 0 && (member->dataType->__anon1._class->__anon1.registered->type == 1 || member->dataType->__anon1._class->__anon1.registered->type == 5 || member->dataType->__anon1._class->__anon1.registered->type == 0))
2011 DeclareStruct(registerModuleExternal, member->dataType->__anon1._class->string, 0, 1);
2012 FullClassNameCat(string, member->dataType->__anon1._class->string, 0);
2013 exp = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(string), (((void *)0)))), (((void *)0))));
2017 sprintf(string, "%d", member->dataType->size);
2018 exp = MkExpConstant(string);
2021 if(member->dataType->pointerAlignment)
2022 exp = MkExpConstant("0xF000F000");
2025 sprintf(string, "%d", member->dataType->alignment);
2026 exp = MkExpConstant(string);
2031 switch(member->memberAccess)
2034 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2037 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2041 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2044 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier(isMember ? "eMember_AddDataMember" : "eClass_AddDataMember")), args)));
2045 ListAdd(statement->__anon1.compound.statements, stmt);
2046 lastOffset = member->offset + member->dataType->size;
2050 static int memberCount = 0;
2051 struct Context * context;
2052 struct Statement * compound;
2053 char memberName[256];
2055 sprintf(memberName, "dataMember%d", memberCount);
2057 curContext = statement->__anon1.compound.context;
2058 context = PushContext();
2059 args = MkListOne(MkExpIdentifier(MkIdentifier((member->type == 1) ? "unionMember" : "structMember")));
2060 switch(member->memberAccess)
2063 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2066 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2070 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2073 compound = MkCompoundStmt(MkListOne(MkDeclaration(MkListOne(MkSpecifierName("DataMember")), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(memberName)), MkInitializerAssignment(MkExpCall(MkExpIdentifier(MkIdentifier("eMember_New")), args)))))), MkList());
2074 compound->__anon1.compound.context = context;
2076 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
2077 ListAdd(args, MkExpIdentifier(MkIdentifier(memberName)));
2078 RegisterMembersAndProperties((struct __ecereNameSpace__ecere__com__Class *)member, 1, memberName, compound);
2080 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eMember_AddMember")), args)));
2082 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMember")), args)));
2083 ListAdd(compound->__anon1.compound.statements, stmt);
2084 PopContext(context);
2085 ListAdd(statement->__anon1.compound.statements, compound);
2087 lastOffset = member->offset + member->memberOffset;
2095 struct __ecereNameSpace__ecere__com__ClassProperty * classProperty;
2097 for(prop = regClass->membersAndProperties.first; prop; prop = prop->next)
2099 if(prop->isProperty && prop->isWatchable)
2101 struct __ecereNameSpace__ecere__sys__OldList * args;
2102 char name[1024], nameM[1024];
2104 strcpy(name, "__ecereProp_");
2105 FullClassNameCat(name, regClass->fullName, 1);
2107 FullClassNameCat(name, prop->name, 0);
2108 strcpy(nameM, "__ecerePropM_");
2109 FullClassNameCat(nameM, regClass->fullName, 1);
2111 FullClassNameCat(nameM, prop->name, 0);
2112 args = MkListOne(MkExpCondition(MkExpIdentifier(MkIdentifier(nameM)), MkListOne(MkExpIdentifier(MkIdentifier(nameM))), MkExpIdentifier(MkIdentifier(name))));
2113 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eProperty_Watchable")), args)));
2114 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2117 for(classProperty = (struct __ecereNameSpace__ecere__com__ClassProperty *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(®Class->classProperties); classProperty; classProperty = (struct __ecereNameSpace__ecere__com__ClassProperty *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)classProperty)))
2119 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2121 char * string = QMkString(classProperty->name);
2123 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
2124 ListAdd(args, MkExpString(string));
2125 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2127 char * string = QMkString(classProperty->dataTypeString);
2129 ListAdd(args, MkExpString(string));
2130 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2132 if(classProperty->Set)
2134 strcpy(name, "__ecereClassProp_");
2135 FullClassNameCat(name, regClass->fullName, 1);
2136 strcat(name, "_Set_");
2137 strcat(name, classProperty->name);
2138 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
2141 ListAdd(args, MkExpConstant("0"));
2142 if(classProperty->Get)
2144 strcpy(name, "__ecereClassProp_");
2145 FullClassNameCat(name, regClass->fullName, 1);
2146 strcat(name, "_Get_");
2147 strcat(name, classProperty->name);
2148 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
2151 ListAdd(args, MkExpConstant("0"));
2152 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddClassProperty")), args)));
2153 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2158 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
2160 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
2162 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
2164 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List_TPL_ClassPropertyValue_;
2166 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__TemplateMemberType;
2168 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List;
2170 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2172 struct __ecereNameSpace__ecere__com__Module
2174 struct __ecereNameSpace__ecere__com__Instance * application;
2175 struct __ecereNameSpace__ecere__sys__OldList classes;
2176 struct __ecereNameSpace__ecere__sys__OldList defines;
2177 struct __ecereNameSpace__ecere__sys__OldList functions;
2178 struct __ecereNameSpace__ecere__sys__OldList modules;
2179 struct __ecereNameSpace__ecere__com__Instance * prev;
2180 struct __ecereNameSpace__ecere__com__Instance * next;
2186 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
2187 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
2188 } __attribute__ ((gcc_struct));
2190 void __ecereDestructor_ClassPropertyValue(struct __ecereNameSpace__ecere__com__Instance * this)
2192 __attribute__((unused)) struct ClassPropertyValue * __ecerePointer_ClassPropertyValue = (struct ClassPropertyValue *)(this ? (((char *)this) + __ecereClass_ClassPropertyValue->offset) : 0);
2195 FreeIdentifier(__ecerePointer_ClassPropertyValue->id);
2199 void CreateRegisterModuleBody()
2201 if(!registerModuleBody && inCompiler)
2203 char registerName[1024], moduleName[274];
2204 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
2205 struct Declarator * declarator;
2206 struct TypeName * moduleParam;
2208 registerModuleBody = MkCompoundStmt(MkList(), MkList());
2209 registerModuleBody->__anon1.compound.context = __extension__ ({
2210 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
2212 __ecereInstance1->parent = globalContext, __ecereInstance1;
2214 ListAdd(registerModuleBody->__anon1.compound.declarations, MkDeclaration((specifiers = MkListOne(MkSpecifierName("ecere::com::Class"))), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("class")), (((void *)0))))));
2215 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
2216 specifiers = MkList();
2217 ListAdd(specifiers, MkSpecifier(VOID));
2218 moduleParam = MkTypeName(MkListOne(MkSpecifierName("Module")), MkDeclaratorIdentifier(MkIdentifier("module")));
2219 __ecereNameSpace__ecere__sys__GetLastDirectory(outputFile, moduleName);
2220 __ecereNameSpace__ecere__sys__StripExtension(moduleName);
2221 FixModuleName(moduleName);
2222 sprintf(registerName, "__ecereRegisterModule_%s", moduleName);
2223 declarator = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(registerName)), MkListOne(moduleParam));
2225 struct FunctionDefinition * function = _MkFunction(specifiers, declarator, (((void *)0)), 0);
2227 ProcessFunctionBody(function, registerModuleBody);
2228 function->declMode = 0;
2231 ListAdd(ast, (registerModuleExternal = MkExternalFunction(function)));
2232 DeclareStruct(registerModuleExternal, "ecere::com::Instance", 0, 1);
2233 DeclareStruct(registerModuleExternal, "ecere::com::Module", 0, 1);
2236 if(!unregisterModuleBody && inCompiler)
2238 char registerName[1024], moduleName[274];
2239 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
2240 struct Declarator * declarator;
2241 struct TypeName * moduleParam;
2243 unregisterModuleBody = MkCompoundStmt(MkList(), MkList());
2244 unregisterModuleBody->__anon1.compound.context = __extension__ ({
2245 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
2247 __ecereInstance1->parent = globalContext, __ecereInstance1;
2249 specifiers = MkList();
2250 ListAdd(specifiers, MkSpecifier(VOID));
2251 moduleParam = MkTypeName(MkListOne(MkSpecifierName("Module")), MkDeclaratorIdentifier(MkIdentifier("module")));
2252 __ecereNameSpace__ecere__sys__GetLastDirectory(outputFile, moduleName);
2253 __ecereNameSpace__ecere__sys__StripExtension(moduleName);
2254 FixModuleName(moduleName);
2255 sprintf(registerName, "__ecereUnregisterModule_%s", moduleName);
2256 declarator = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(registerName)), MkListOne(moduleParam));
2258 struct FunctionDefinition * function = _MkFunction(specifiers, declarator, (((void *)0)), 0);
2260 ProcessFunctionBody(function, unregisterModuleBody);
2261 function->declMode = 0;
2264 ListAdd(ast, (unregisterModuleExternal = MkExternalFunction(function)));
2265 DeclareStruct(unregisterModuleExternal, "ecere::com::Instance", 0, 1);
2266 DeclareStruct(unregisterModuleExternal, "ecere::com::Module", 0, 1);
2271 void __ecereCreateModuleInstances_pass1()
2273 classPropValues = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__com__List_TPL_ClassPropertyValue_);
2274 __ecereNameSpace__ecere__com__eInstance_IncRef(classPropValues);
2277 void __ecereUnregisterModule_pass1(struct __ecereNameSpace__ecere__com__Instance * module)
2282 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 __ecereNameSpace__ecere__sys__OldList * defs, struct External * external, int declMode)
2284 struct ClassDef * def;
2285 struct __ecereNameSpace__ecere__com__Class * regClass = symbol->__anon1.registered;
2289 classType = regClass->type;
2290 if(classType == 4 && enumValues && (inCompiler || !buildingECERECOMModule))
2292 struct Enumerator * e;
2294 for(e = enumValues->first; e; e = e->next)
2298 struct Type * destType = (destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), destType->kind = 4, destType->refCount = 1, destType);
2300 e->exp->destType = destType;
2302 ProcessExpressionType(e->exp);
2304 if(!e->exp->expType)
2307 destType->__anon1._class = symbol;
2308 ProcessExpressionType(e->exp);
2310 if(e->exp->type == 0 && e->exp->expType && e->exp->__anon1.__anon1.identifier && e->exp->__anon1.__anon1.identifier->string && e->exp->expType->kind == 15)
2312 struct __ecereNameSpace__ecere__sys__NamedLink64 * l;
2313 char * string = e->exp->__anon1.__anon1.identifier->string;
2315 for(l = e->exp->expType->__anon1.__anon1.members.first; l; l = l->next)
2317 if(!strcmp(l->name, string))
2321 FreeExpContents(e->exp);
2323 e->exp->__anon1.__anon1.constant = PrintInt64(l->data);
2324 FreeType(e->exp->expType);
2325 e->exp->expType = ProcessTypeString("int64", 0);
2332 ComputeExpression(e->exp);
2333 if(e->exp->isConstant && e->exp->type == 2)
2335 struct Operand op = GetOperand(e->exp);
2341 value = op.type->isSigned ? (long long)op.__anon1.c : (long long)op.__anon1.uc;
2344 value = op.type->isSigned ? (long long)op.__anon1.s : (long long)op.__anon1.us;
2347 value = op.type->isSigned ? op.__anon1.i64 : (long long)op.__anon1.ui64;
2351 value = op.type->isSigned ? (long long)op.__anon1.i : (int)op.__anon1.ui;
2353 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(regClass, e->id->string, value);
2356 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2359 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2362 struct __ecereNameSpace__ecere__com__EnumClassData * baseData = regClass->data;
2363 struct __ecereNameSpace__ecere__sys__OldLink * deriv;
2365 for(deriv = regClass->derivatives.first; deriv; deriv = deriv->next)
2367 struct __ecereNameSpace__ecere__com__Class * c = deriv->data;
2369 if(c && c->type == 4)
2371 struct __ecereNameSpace__ecere__com__EnumClassData * data = c->data;
2373 data->largest = baseData->largest;
2378 if(definitions != (((void *)0)))
2382 for(def = definitions->first; def; def = def->next)
2384 if(def->type == 4 && def->__anon1.propertyWatch)
2386 struct PropertyWatch * propWatch = def->__anon1.propertyWatch;
2387 struct ClassFunction * func;
2388 char watcherName[1024];
2389 struct Identifier * propID;
2390 struct Statement * stmt = MkExpressionStmt(MkList());
2391 struct Declarator * decl;
2392 struct __ecereNameSpace__ecere__sys__OldList * specs;
2394 sprintf(watcherName, "__ecerePropertySelfWatcher_%d", propWatcherID++);
2395 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
2397 strcat(watcherName, "_");
2398 strcat(watcherName, propID->string);
2400 decl = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(watcherName)), MkListOne(MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0)))));
2402 ListAdd(specs, MkSpecifier(STATIC));
2403 ListAdd(specs, MkSpecifier(VOID));
2404 func = MkClassFunction(specs, (((void *)0)), decl, (((void *)0)));
2405 ProcessClassFunctionBody(func, propWatch->compound);
2406 decl->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2407 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), decl->symbol);
2408 func->dontMangle = 1;
2409 propWatch->compound = (((void *)0));
2410 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, (((void *)0)), MkClassDefFunction(func));
2411 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
2413 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(regClass, propID->string, privateModule);
2417 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2419 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2421 char * s = QMkString(propID->string);
2423 ListAdd(args, MkExpString(s));
2424 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2426 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
2427 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("eProperty_SelfWatch")), args));
2430 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, regClass->fullName);
2432 FreePropertyWatch(def->__anon1.propertyWatch);
2433 def->__anon1.propertyWatch = (struct PropertyWatch *)stmt;
2437 for(def = definitions->first; def; def = def->next)
2441 ProcessClassFunction(regClass, def->__anon1.function, defs, external->prev, declMode == 3);
2445 if(inCompiler && symbol->mustRegister && regClass)
2447 struct Statement * stmt;
2448 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2449 struct __ecereNameSpace__ecere__com__Method * method;
2450 struct Expression * exp;
2451 const char * registerFunction = (((void *)0));
2452 int inheritanceAccess = 1;
2454 CreateRegisterModuleBody();
2455 curExternal = registerModuleExternal;
2456 switch(regClass->type)
2459 ListAdd(args, MkExpIdentifier(MkIdentifier("structClass")));
2462 ListAdd(args, MkExpIdentifier(MkIdentifier("bitClass")));
2465 ListAdd(args, MkExpIdentifier(MkIdentifier("enumClass")));
2468 ListAdd(args, MkExpIdentifier(MkIdentifier("noHeadClass")));
2471 ListAdd(args, MkExpIdentifier(MkIdentifier("unitClass")));
2474 ListAdd(args, MkExpIdentifier(MkIdentifier("normalClass")));
2478 char nameSpace[1024] = "";
2479 char className[1024] = "";
2482 GetNameSpaceString(regClass->nameSpace, nameSpace);
2485 __ecereNameSpace__ecere__sys__GetLastDirectory(sourceFile, className);
2486 __ecereNameSpace__ecere__sys__ChangeCh(className, '.', '_');
2487 strcat(className, "}");
2489 strcat(className, nameSpace);
2490 strcat(className, regClass->name);
2491 string = QMkString(className);
2492 ListAdd(args, MkExpString(string));
2493 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2495 if(baseSpecs != (((void *)0)))
2497 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
2499 if(baseType->kind != 9 && baseType->kind != 10)
2501 char baseName[1024] = "";
2504 if(baseType->kind == 8 && baseType->__anon1._class && baseType->__anon1._class->isStatic)
2506 __ecereNameSpace__ecere__sys__GetLastDirectory(sourceFile, baseName);
2507 __ecereNameSpace__ecere__sys__ChangeCh(baseName, '.', '_');
2508 strcat(baseName, "}");
2509 strcat(baseName, baseType->__anon1._class->string);
2512 PrintType(baseType, baseName, 0, 1);
2513 string = QMkString(baseName);
2514 ListAdd(args, MkExpString(string));
2515 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2518 ListAdd(args, MkExpConstant("0"));
2520 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
2521 inheritanceAccess = 2;
2524 ListAdd(args, MkExpConstant("0"));
2525 if(regClass->type == 1 || regClass->type == 0 || regClass->type == 5)
2527 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
2530 struct __ecereNameSpace__ecere__com__Class * base;
2532 for(base = regClass->base; base && base->type != 1000; base = base->next)
2534 for(member = base->membersAndProperties.first; member; member = member->next)
2535 if(!member->isProperty)
2541 if(regClass->type == 1 && symbol->declaredStruct && member)
2543 char baseStructName[1024];
2545 baseStructName[0] = (char)0;
2546 strcpy(baseStructName, (regClass->base->templateClass ? regClass->base->templateClass : regClass->base)->fullName);
2547 ListAdd(args, MkExpOp(MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(symbol->structName), (((void *)0)))), (((void *)0)))), '-', MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(baseStructName), (((void *)0)))), (((void *)0))))));
2550 ListAdd(args, symbol->declaredStruct ? MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(symbol->structName), (((void *)0)))), (((void *)0)))) : MkExpConstant("0"));
2554 ListAdd(args, MkExpConstant("0"));
2557 char classDataStructName[1024];
2559 strcpy(classDataStructName, "__ecereClassData_");
2560 FullClassNameCat(classDataStructName, symbol->string, 0);
2561 ListAdd(args, symbol->classData ? MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(classDataStructName), (((void *)0)))), (((void *)0)))) : MkExpConstant("0"));
2563 if(regClass->type == 0 || regClass->type == 5)
2565 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), symbol->needConstructor ? MkExpIdentifier(MkIdentifier(symbol->constructorName)) : MkExpConstant("0")));
2566 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), symbol->needDestructor ? MkExpIdentifier(MkIdentifier(symbol->destructorName)) : MkExpConstant("0")));
2570 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")));
2571 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")));
2573 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
2577 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2580 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2584 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
2587 switch(inheritanceAccess)
2590 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2594 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2597 registerFunction = "eSystem_RegisterClass";
2598 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier("class")), '=', MkExpCall((exp = MkExpIdentifier(MkIdentifier(registerFunction))), args))));
2599 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2600 stmt = MkIfStmt(MkListOne(MkExpOp(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("module")), MkIdentifier("application")), EQ_OP, MkExpMember(MkExpIdentifier(MkIdentifier("__thisModule")), MkIdentifier("application"))), AND_OP, MkExpIdentifier(MkIdentifier("class")))), MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(symbol->className)), '=', MkExpIdentifier(MkIdentifier("class"))))), (((void *)0)));
2601 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2602 if(external && external->type == 2 && external->__anon1._class->deleteWatchable)
2604 args = MkListOne(MkExpIdentifier(MkIdentifier("class")));
2605 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_DestructionWatchable")), args)));
2606 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2610 struct __ecereNameSpace__ecere__com__Class * base = regClass->base;
2613 for(c = 0; c < base->vTblSize; c++)
2615 struct Symbol * method = (struct Symbol *)regClass->_vTbl[c];
2617 if((void *)method != DummyMethod && base->_vTbl[c] != (void *)method && method->__anon2.__anon3.methodExternal)
2619 struct External * external = method->__anon2.__anon3.methodExternal;
2620 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2621 struct Identifier * id = external->__anon1.function ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2624 struct External * e = method->__anon2.__anon3.methodExternal ? method->__anon2.__anon3.methodExternal : method->__anon2.__anon3.methodCodeExternal;
2626 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, e, e->type == 0);
2628 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2630 char * string = QMkString(method->__anon1.method->name);
2632 ListAdd(args, MkExpString(string));
2633 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2635 ListAdd(args, MkExpConstant("0"));
2636 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2637 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2638 exp->expType = __extension__ ({
2639 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2641 __ecereInstance1->refCount = 1, __ecereInstance1;
2643 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMethod")), args)));
2644 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2651 for(c = regClass->base ? regClass->base->vTblSize : 0; c < regClass->vTblSize; c++)
2653 for(method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(®Class->methods); method; method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method)))
2655 if(method->type == 1 && method->_class == regClass && method->vid == c)
2658 struct Expression * exp;
2659 struct External * external = method->symbol ? ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal : (((void *)0));
2660 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2661 struct Identifier * id = (external && external->__anon1.function) ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2663 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2665 char * string = QMkString(method->name);
2667 ListAdd(args, MkExpString(string));
2668 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2671 char * string = QMkString(method->dataTypeString);
2673 ListAdd(args, MkExpString(string));
2674 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2676 if(id && external->__anon1.function->body)
2678 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2679 exp->expType = __extension__ ({
2680 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2682 __ecereInstance1->refCount = 1, __ecereInstance1;
2687 ListAdd(args, (exp = MkExpConstant("0")));
2689 switch(method->memberAccess)
2692 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2695 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2699 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2702 strcpy(name, "__ecereVMethodID_");
2703 FullClassNameCat(name, method->_class->fullName, 0);
2705 strcat(name, method->name);
2706 exp = MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddVirtualMethod")), args);
2707 stmt = MkExpressionStmt(MkListOne(exp));
2709 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, external, external->type == 0);
2710 DeclareMethod(curExternal, method, name);
2711 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2716 for(method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(®Class->methods); method; method = (struct __ecereNameSpace__ecere__com__Method *)__ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(((struct __ecereNameSpace__ecere__sys__BTNode *)method)))
2718 if(method->type == 1 && method->_class == regClass)
2720 else if(method->memberAccess == 1 || !method->dataTypeString)
2722 struct External * external = method->symbol ? ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal : (((void *)0));
2723 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2724 struct Identifier * id = (external && external->__anon1.function) ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2726 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2728 char * string = QMkString(method->name);
2730 ListAdd(args, MkExpString(string));
2731 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2734 char * string = QMkString(method->dataTypeString);
2736 ListAdd(args, MkExpString(string));
2737 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2739 if(id && external->__anon1.function->body)
2741 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2742 exp->expType = __extension__ ({
2743 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2745 __ecereInstance1->refCount = 1, __ecereInstance1;
2750 ListAdd(args, (exp = MkExpConstant("0")));
2752 switch(method->memberAccess)
2755 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2758 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2762 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2765 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMethod")), args)));
2766 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2768 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, external, external->type == 0);
2771 RegisterMembersAndProperties(regClass, 0, "class", registerModuleBody);
2774 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
2775 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
2776 struct __ecereNameSpace__ecere__com__EnumClassData * e = (regClass ? ((void *)(((char *)regClass->data) + enumClass->offsetClass)) : (((void *)0)));
2778 for(value = e->values.first; value; value = value->next)
2780 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2782 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2784 char * string = QMkString(value->name);
2786 ListAdd(args, MkExpString(string));
2787 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2792 if(!strcmp(regClass->dataTypeString, "uint64"))
2793 temp = PrintUInt64(value->data);
2795 temp = PrintInt64(value->data);
2796 ListAdd(args, MkExpConstant(temp));
2797 (__ecereNameSpace__ecere__com__eSystem_Delete(temp), temp = 0);
2799 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eEnum_AddFixedValue")), args)));
2800 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2803 if(symbol->templateParams)
2805 struct TemplateParameter * param;
2807 for(param = (*symbol->templateParams).first; param; param = param->next)
2809 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2811 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2813 char * string = QMkString(param->identifier->string);
2815 ListAdd(args, MkExpString(string));
2816 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2818 ListAdd(args, MkExpIdentifier(MkIdentifier((param->type == 0) ? "type" : ((param->type == 1) ? "identifier" : "expression"))));
2824 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
2825 char * string = QMkString(typeString);
2827 ListAdd(args, MkExpString(string));
2828 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
2829 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2834 char memberTypeString[132] = "TemplateMemberType::";
2835 unsigned int needClass = 1;
2837 ((const char * (*)(struct __ecereNameSpace__ecere__com__Class *, const void *, char * tempString, void * fieldData, unsigned int * needClass))__ecereClass___ecereNameSpace__ecere__com__TemplateMemberType->_vTbl[__ecereVMethodID_class_OnGetString])(__ecereClass___ecereNameSpace__ecere__com__TemplateMemberType, (void *)¶m->__anon1.memberType, memberTypeString + strlen(memberTypeString), (((void *)0)), &needClass);
2838 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(memberTypeString))));
2842 if(param->defaultArgument)
2844 struct __ecereNameSpace__ecere__sys__OldList * members = MkList();
2850 char * typeString = param->defaultArgument->__anon1.templateDatatype ? StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl) : (((void *)0));
2851 char * string = QMkString(typeString);
2853 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(MkListOne(MkIdentifier("dataTypeString")), MkInitializerAssignment(MkExpString(string))));
2854 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
2855 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2860 char memberString[1024];
2863 memberString[0] = '\0';
2864 if(param->defaultArgument->__anon1.identifier->_class)
2866 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
2867 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
2868 else if(param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
2869 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
2872 strcat(memberString, "::");
2873 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
2874 string = QMkString(memberString);
2875 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(MkListOne(MkIdentifier("dataTypeString")), MkInitializerAssignment(MkExpString(string))));
2876 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2888 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
2891 struct __ecereNameSpace__ecere__sys__OldList * ids = MkList();
2893 char * string = (((void *)0));
2895 op = GetOperand(param->defaultArgument->__anon1.expression);
2896 ui64String = PrintUInt64(op.__anon1.ui64);
2897 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ids), MkIdentifier("expression"));
2898 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ids), MkIdentifier("ui64"));
2899 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(ids, MkInitializerAssignment(MkExpConstant(ui64String))));
2900 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2901 (__ecereNameSpace__ecere__com__eSystem_Delete(ui64String), ui64String = 0);
2905 ListAdd(args, MkExpInstance(MkInstantiation(MkSpecifierName("ClassTemplateArgument"), (((void *)0)), MkListOne(MkMembersInitList(members)))));
2908 ListAdd(args, MkExpIdentifier(MkIdentifier("null")));
2909 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddTemplateParameter")), args)));
2910 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2912 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_DoneAddingTemplateParameters")), MkListOne(MkExpIdentifier(MkIdentifier("class"))))));
2913 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2915 if(definitions != (((void *)0)))
2917 for(def = definitions->first; def; def = def->next)
2919 if(def->type == 4 && def->__anon1.propertyWatch)
2921 ListAdd(registerModuleBody->__anon1.compound.statements, (struct Statement *)def->__anon1.propertyWatch);
2922 def->__anon1.propertyWatch = (((void *)0));
2924 else if(def->type == 5)
2927 char * s = QMkString(def->__anon1.designer);
2929 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("designerClass")), '=', MkExpString(s)))), (((void *)0)));
2930 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2932 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2934 else if(def->type == 6)
2936 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("noExpansion")), '=', MkExpConstant("1")))), (((void *)0)));
2937 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2939 else if(def->type == 7)
2941 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("fixed")), '=', MkExpConstant("1")))), (((void *)0)));
2942 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2944 regClass->fixed = 1;
2946 else if(def->type == 8)
2948 char * s = QMkString(def->__anon1.defaultProperty->string);
2950 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("defaultProperty")), '=', MkExpString(s)))), (((void *)0)));
2951 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2952 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2954 else if(def->type == 11)
2956 ((struct __ecereNameSpace__ecere__com__IteratorPointer * (*)(struct __ecereNameSpace__ecere__com__Instance *, uint64 value))__extension__ ({
2957 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = classPropValues;
2959 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
2960 })[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Add])(classPropValues, (uint64)(uintptr_t)(__extension__ ({
2961 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassPropertyValue);
2963 ((struct ClassPropertyValue *)(((char *)__ecereInstance1 + __ecereClass_ClassPropertyValue->offset)))->regClass = regClass, ((struct ClassPropertyValue *)(((char *)__ecereInstance1 + __ecereClass_ClassPropertyValue->offset)))->id = def->__anon1.__anon1.id, ((struct ClassPropertyValue *)(((char *)__ecereInstance1 + __ecereClass_ClassPropertyValue->offset)))->exp = def->__anon1.__anon1.initializer->__anon1.exp, __ecereInstance1;
2965 def->__anon1.__anon1.id = (((void *)0));
2966 def->__anon1.__anon1.initializer->__anon1.exp = (((void *)0));
2974 void ProcessClassDefinitions()
2976 struct External * external, * next;
2978 CreateRegisterModuleBody();
2981 for(external = (*ast).first; external; external = next)
2983 next = external->next;
2984 curExternal = external;
2985 if(external->type == 2)
2987 struct ClassDefinition * _class = external->__anon1._class;
2989 if(_class->definitions)
2991 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), ast, external, _class->declMode);
2995 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
2996 FreeExternal(external);
2999 else if(external->type == 0)
3001 unsigned int setStaticMethod = 0;
3003 if(external->symbol && !external->symbol->type->__anon1.__anon2.thisClass && !external->symbol->type->__anon1.__anon2.staticMethod)
3005 external->symbol->type->__anon1.__anon2.staticMethod = 1;
3006 setStaticMethod = 1;
3010 struct FunctionDefinition * function = external->__anon1.function;
3011 struct Statement * stmt;
3012 struct __ecereNameSpace__ecere__sys__OldList * args;
3014 if(!strcmp(function->declarator->symbol->string, "__on_register_module"))
3016 ListAdd(registerModuleBody->__anon1.compound.statements, function->body);
3017 function->body->__anon1.compound.context->parent = registerModuleBody->__anon1.compound.context;
3018 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
3019 function->body = (((void *)0));
3020 FreeExternal(external);
3023 if(function->declMode != 2 && function->declMode != 1)
3026 CreateRegisterModuleBody();
3028 char * string = QMkString(function->declarator->symbol->string);
3030 ListAdd(args, MkExpString(string));
3031 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3035 char type[1024] = "";
3038 function->declarator->symbol->type->__anon1.__anon2.staticMethod = 0;
3039 PrintType(function->declarator->symbol->type, type, 1, 1);
3041 function->declarator->symbol->type->__anon1.__anon2.staticMethod = 1;
3042 string = QMkString(type);
3043 ListAdd(args, MkExpString(string));
3044 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3047 ListAdd(args, MkExpIdentifier(MkIdentifier(function->declarator->symbol->string)));
3049 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
3050 switch(function->declMode)
3053 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
3056 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
3060 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
3063 stmt = MkExpressionStmt(MkListOne(MkExpCall((MkExpIdentifier(MkIdentifier("eSystem_RegisterFunction"))), args)));
3064 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
3067 else if(external->type == 1)
3069 struct Declaration * declaration = external->__anon1.declaration;
3071 if(external->symbol)
3073 if(external->symbol->type && external->symbol->type->kind == 11 && !external->symbol->type->__anon1.__anon2.thisClass)
3074 external->symbol->type->__anon1.__anon2.staticMethod = 1;
3076 if(external->symbol && declaration && declaration->type == 1)
3078 if(declaration->__anon1.__anon1.specifiers)
3080 struct Specifier * specifier;
3081 unsigned int removeExternal = 0;
3083 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
3085 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)))
3087 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
3093 if(specifier->type == 2)
3098 symbol->ctx = specifier->__anon1.__anon2.ctx;
3099 specifier->__anon1.__anon2.ctx = (((void *)0));
3100 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, ast, external, declaration->declMode);
3104 if(inCompiler && removeExternal)
3106 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
3107 FreeExternal(external);
3111 else if(declaration && declaration->type == 3)
3113 if(inCompiler && declaration->declMode != 3)
3115 struct Statement * stmt;
3116 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
3118 CreateRegisterModuleBody();
3120 char * string = QMkString(declaration->__anon1.__anon2.id->string);
3122 ListAdd(args, MkExpString(string));
3123 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3127 char type[1024] = "";
3129 PrintExpression(declaration->__anon1.__anon2.exp, type);
3130 string = QMkString(type);
3131 ListAdd(args, MkExpString(string));
3132 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3134 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
3135 switch(declaration->declMode)
3138 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
3141 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
3145 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
3148 stmt = MkExpressionStmt(MkListOne(MkExpCall((MkExpIdentifier(MkIdentifier("eSystem_RegisterDefine"))), args)));
3149 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
3155 struct __ecereNameSpace__ecere__com__Iterator v =
3157 (classPropValues), 0
3160 while(__ecereMethod___ecereNameSpace__ecere__com__Iterator_Next(&v))
3162 struct __ecereNameSpace__ecere__sys__OldList * findClassArgs = MkList();
3163 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
3164 struct Statement * compoundStmt;
3166 struct Expression * e;
3169 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3171 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3173 yylloc = __extension__ ({
3174 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3176 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3178 ListAdd(findClassArgs, MkExpIdentifier(MkIdentifier("module")));
3179 s = QMkString(__extension__ ({
3180 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3182 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3183 })->regClass->name);
3184 ListAdd(findClassArgs, MkExpString(s));
3185 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
3186 ListAdd(args, MkExpIdentifier(MkIdentifier("_class")));
3187 s = QMkString(__extension__ ({
3188 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3190 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3192 ListAdd(args, MkExpString(s));
3193 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
3194 e = __extension__ ({
3195 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3197 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3199 ProcessExpressionType(e);
3200 if(__ecereProp_Type_Get_isPointerType(e->expType))
3201 e = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("intptr")), (((void *)0))), e);
3202 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(INT64)), (((void *)0))), e));
3203 compoundStmt = MkCompoundStmt(MkListOne(MkDeclaration(MkListOne(MkSpecifierName("ecere::com::Class")), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("_class")), MkInitializerAssignment(MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eSystem_FindClass")), findClassArgs)))))), MkListOne(MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("ecere::com::eClass_SetProperty")), args)))));
3204 compoundStmt->__anon1.compound.context = __extension__ ({
3205 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
3207 __ecereInstance1->parent = registerModuleBody->__anon1.compound.context, __ecereInstance1;
3209 ListAdd(registerModuleBody->__anon1.compound.statements, compoundStmt);
3212 ((void (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
3213 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = classPropValues;
3215 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
3216 })[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Free])(classPropValues);
3220 void __ecereRegisterModule_pass1(struct __ecereNameSpace__ecere__com__Instance * module)
3222 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
3224 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetBuildingEcereCom", "void SetBuildingEcereCom(bool b)", SetBuildingEcereCom, module, 1);
3225 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetBuildingEcereCom", "bool GetBuildingEcereCom(void)", GetBuildingEcereCom, module, 1);
3226 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetBuildingEcereComModule", "void SetBuildingEcereComModule(bool b)", SetBuildingEcereComModule, module, 1);
3227 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetBuildingEcereComModule", "bool GetBuildingEcereComModule(void)", GetBuildingEcereComModule, module, 1);
3228 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessClassFunction", "External ProcessClassFunction(ecere::com::Class owningClass, ClassFunction func, ecere::sys::OldList defs, External after, bool makeStatic)", ProcessClassFunction, module, 2);
3229 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CreateRegisterModuleBody", "void CreateRegisterModuleBody(void)", CreateRegisterModuleBody, module, 2);
3230 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("RegisterMembersAndProperties", "void RegisterMembersAndProperties(ecere::com::Class regClass, bool isMember, const char * className, Statement statement)", RegisterMembersAndProperties, module, 2);
3231 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetNameSpaceString", "void GetNameSpaceString(ecere::com::NameSpace ns, char * string)", GetNameSpaceString, module, 2);
3232 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ClassPropertyValue", 0, sizeof(struct ClassPropertyValue), 0, (void *)0, (void *)__ecereDestructor_ClassPropertyValue, module, 2, 1);
3233 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
3234 __ecereClass_ClassPropertyValue = class;
3235 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessClassDefinitions", "void ProcessClassDefinitions(void)", ProcessClassDefinitions, module, 1);