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 unsigned int isLong : 1;
1159 } __attribute__ ((gcc_struct));
1161 unsigned int __ecereProp_Type_Get_isPointerTypeSize(struct Type * this);
1163 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
1165 struct __ecereNameSpace__ecere__com__Module;
1167 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);
1169 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
1171 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
1173 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);
1175 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);
1177 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
1179 struct __ecereNameSpace__ecere__com__DataMember;
1181 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1187 const char * dataTypeString;
1188 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1189 } __attribute__ ((gcc_struct)) __anon1;
1190 struct __ecereNameSpace__ecere__com__DataValue expression;
1193 const char * memberString;
1196 struct __ecereNameSpace__ecere__com__DataMember * member;
1197 struct __ecereNameSpace__ecere__com__Property * prop;
1198 struct __ecereNameSpace__ecere__com__Method * method;
1199 } __attribute__ ((gcc_struct)) __anon1;
1200 } __attribute__ ((gcc_struct)) __anon2;
1201 } __attribute__ ((gcc_struct)) __anon1;
1202 } __attribute__ ((gcc_struct));
1204 struct __ecereNameSpace__ecere__com__DataMember
1206 struct __ecereNameSpace__ecere__com__DataMember * prev;
1207 struct __ecereNameSpace__ecere__com__DataMember * next;
1209 unsigned int isProperty;
1212 struct __ecereNameSpace__ecere__com__Class * _class;
1213 const char * dataTypeString;
1214 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1215 struct Type * dataType;
1219 struct __ecereNameSpace__ecere__sys__OldList members;
1220 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
1222 short structAlignment;
1223 short pointerAlignment;
1224 } __attribute__ ((gcc_struct));
1226 extern struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param);
1228 struct __ecereNameSpace__ecere__com__BitMember;
1230 struct __ecereNameSpace__ecere__com__BitMember
1232 struct __ecereNameSpace__ecere__com__BitMember * prev;
1233 struct __ecereNameSpace__ecere__com__BitMember * next;
1235 unsigned int isProperty;
1238 struct __ecereNameSpace__ecere__com__Class * _class;
1239 const char * dataTypeString;
1240 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1241 struct Type * dataType;
1246 } __attribute__ ((gcc_struct));
1248 struct __ecereNameSpace__ecere__com__ClassProperty;
1250 struct __ecereNameSpace__ecere__com__ClassProperty
1253 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1254 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1255 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1257 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1258 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1259 const char * dataTypeString;
1260 struct Type * dataType;
1261 unsigned int constant;
1262 } __attribute__ ((gcc_struct));
1264 struct ClassDefinition;
1268 struct External * prev;
1269 struct External * next;
1270 struct Location loc;
1272 struct Symbol * symbol;
1275 struct FunctionDefinition * function;
1276 struct ClassDefinition * _class;
1277 struct Declaration * declaration;
1278 char * importString;
1279 struct Identifier * id;
1280 struct DBTableDef * table;
1281 } __attribute__ ((gcc_struct)) __anon1;
1283 struct External * fwdDecl;
1284 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1285 struct __ecereNameSpace__ecere__com__Instance * incoming;
1286 int nonBreakableIncoming;
1287 } __attribute__ ((gcc_struct));
1291 struct Context * parent;
1292 struct __ecereNameSpace__ecere__sys__BinaryTree types;
1293 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1294 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
1295 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
1298 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
1299 struct ClassDefinition * classDef;
1300 unsigned int templateTypesOnly;
1301 unsigned int hasNameSpace;
1302 } __attribute__ ((gcc_struct));
1304 struct ClassDefinition
1306 struct ClassDefinition * prev;
1307 struct ClassDefinition * next;
1308 struct Location loc;
1309 struct Specifier * _class;
1310 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1311 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1312 struct Symbol * symbol;
1313 struct Location blockStart;
1314 struct Location nameLoc;
1316 unsigned int deleteWatchable;
1317 } __attribute__ ((gcc_struct));
1319 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
1325 struct Enumerator * prev;
1326 struct Enumerator * next;
1327 struct Location loc;
1328 struct Identifier * id;
1329 struct Expression * exp;
1330 } __attribute__ ((gcc_struct));
1332 struct TemplateArgument;
1334 struct TemplateParameter
1336 struct TemplateParameter * prev;
1337 struct TemplateParameter * next;
1338 struct Location loc;
1340 struct Identifier * identifier;
1343 struct TemplateDatatype * dataType;
1345 } __attribute__ ((gcc_struct)) __anon1;
1346 struct TemplateArgument * defaultArgument;
1347 const char * dataTypeString;
1348 struct Type * baseType;
1349 } __attribute__ ((gcc_struct));
1351 struct TemplateArgument
1353 struct TemplateArgument * prev;
1354 struct TemplateArgument * next;
1355 struct Location loc;
1356 struct Identifier * name;
1360 struct Expression * expression;
1361 struct Identifier * identifier;
1362 struct TemplateDatatype * templateDatatype;
1363 } __attribute__ ((gcc_struct)) __anon1;
1364 } __attribute__ ((gcc_struct));
1368 typedef union YYSTYPE
1373 struct Identifier * id;
1374 struct Expression * exp;
1375 struct Specifier * specifier;
1376 struct __ecereNameSpace__ecere__sys__OldList * list;
1377 struct Enumerator * enumerator;
1378 struct Declarator * declarator;
1379 struct Pointer * pointer;
1380 struct Initializer * initializer;
1381 struct InitDeclarator * initDeclarator;
1382 struct TypeName * typeName;
1383 struct Declaration * declaration;
1384 struct Statement * stmt;
1385 struct FunctionDefinition * function;
1386 struct External * external;
1387 struct Context * context;
1388 struct AsmField * asmField;
1389 struct Attrib * attrib;
1390 struct ExtDecl * extDecl;
1391 struct Attribute * attribute;
1392 struct Instantiation * instance;
1393 struct MembersInit * membersInit;
1394 struct MemberInit * memberInit;
1395 struct ClassFunction * classFunction;
1396 struct ClassDefinition * _class;
1397 struct ClassDef * classDef;
1398 struct PropertyDef * prop;
1400 struct Symbol * symbol;
1401 struct PropertyWatch * propertyWatch;
1402 struct TemplateParameter * templateParameter;
1403 struct TemplateArgument * templateArgument;
1404 struct TemplateDatatype * templateDatatype;
1405 struct DBTableEntry * dbtableEntry;
1406 struct DBIndexItem * dbindexItem;
1407 struct DBTableDef * dbtableDef;
1408 } __attribute__ ((gcc_struct)) YYSTYPE;
1410 extern YYSTYPE yylval;
1414 struct ClassDef * prev;
1415 struct ClassDef * next;
1416 struct Location loc;
1420 struct Declaration * decl;
1421 struct ClassFunction * function;
1422 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1423 struct PropertyDef * propertyDef;
1424 struct PropertyWatch * propertyWatch;
1426 struct Identifier * defaultProperty;
1429 struct Identifier * id;
1430 struct Initializer * initializer;
1431 } __attribute__ ((gcc_struct)) __anon1;
1432 } __attribute__ ((gcc_struct)) __anon1;
1435 } __attribute__ ((gcc_struct));
1437 extern struct ClassDef * MkClassDefFunction(struct ClassFunction * function);
1439 struct __ecereNameSpace__ecere__com__NameSpace;
1441 struct __ecereNameSpace__ecere__com__NameSpace
1444 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1445 struct __ecereNameSpace__ecere__com__NameSpace * left;
1446 struct __ecereNameSpace__ecere__com__NameSpace * right;
1448 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1449 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1450 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1451 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1452 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1453 } __attribute__ ((gcc_struct));
1455 struct __ecereNameSpace__ecere__com__Class
1457 struct __ecereNameSpace__ecere__com__Class * prev;
1458 struct __ecereNameSpace__ecere__com__Class * next;
1464 unsigned int (* Constructor)(void * );
1465 void (* Destructor)(void * );
1468 struct __ecereNameSpace__ecere__com__Class * base;
1469 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
1470 struct __ecereNameSpace__ecere__sys__BinaryTree members;
1471 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
1472 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
1473 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
1474 struct __ecereNameSpace__ecere__sys__OldList derivatives;
1478 struct __ecereNameSpace__ecere__com__Instance * module;
1479 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
1480 const char * dataTypeString;
1481 struct Type * dataType;
1483 int defaultAlignment;
1484 void (* Initialize)();
1486 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
1487 const char * designerClass;
1488 unsigned int noExpansion;
1489 const char * defaultProperty;
1490 unsigned int comRedefinition;
1493 unsigned int internalDecl;
1495 unsigned int computeSize;
1496 short structAlignment;
1497 short pointerAlignment;
1498 int destructionWatchOffset;
1500 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
1501 int inheritanceAccess;
1502 const char * fullName;
1504 struct __ecereNameSpace__ecere__sys__OldList conversions;
1505 struct __ecereNameSpace__ecere__sys__OldList templateParams;
1506 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
1507 struct __ecereNameSpace__ecere__com__Class * templateClass;
1508 struct __ecereNameSpace__ecere__sys__OldList templatized;
1510 unsigned int isInstanceClass;
1511 unsigned int byValueSystemClass;
1512 } __attribute__ ((gcc_struct));
1514 struct __ecereNameSpace__ecere__com__Application
1517 const char * * argv;
1519 unsigned int isGUIApp;
1520 struct __ecereNameSpace__ecere__sys__OldList allModules;
1521 char * parsedCommand;
1522 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
1523 } __attribute__ ((gcc_struct));
1525 void GetNameSpaceString(struct __ecereNameSpace__ecere__com__NameSpace * ns, char * string)
1528 GetNameSpaceString(ns->parent, string);
1531 strcat(string, ns->name);
1532 strcat(string, "::");
1536 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassPropertyValue;
1538 struct External * ProcessClassFunction(struct __ecereNameSpace__ecere__com__Class * owningClass, struct ClassFunction * func, struct __ecereNameSpace__ecere__sys__OldList * defs, struct External * after, unsigned int makeStatic)
1540 struct Type * type = (((void *)0));
1541 struct Symbol * symbol;
1542 struct External * external = (((void *)0));
1544 if(defs && func->declarator)
1546 struct FunctionDefinition * function = (((void *)0));
1547 struct Symbol * propSymbol;
1551 if(!func->specifiers)
1552 func->specifiers = MkList();
1555 struct Specifier * s;
1557 for(s = (*func->specifiers).first; s; s = s->next)
1558 if(s->type == 0 && s->__anon1.specifier == STATIC)
1561 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*func->specifiers), (((void *)0)), MkSpecifier(STATIC));
1564 propSymbol = func->declarator->symbol;
1565 ReplaceThisClassSpecifiers(func->specifiers, owningClass);
1566 if(propSymbol->__anon2.__anon2.externalGet == (struct External *)func)
1567 func->declarator->symbol = (((void *)0));
1568 else if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func)
1569 func->declarator->symbol = (((void *)0));
1570 else if(propSymbol->__anon2.__anon2.externalIsSet == (struct External *)func)
1571 func->declarator->symbol = (((void *)0));
1573 function = _MkFunction(func->specifiers, func->declarator, (((void *)0)), 0);
1574 function->propSet = func->propSet;
1575 function->type = func->type;
1577 func->type->refCount++;
1578 ProcessFunctionBody(function, func->body);
1579 external = MkExternalFunction(function);
1580 external->symbol = func->declarator->symbol;
1581 external->__anon1.function->_class = func->_class;
1583 symbol = func->declarator->symbol;
1584 if(!func->dontMangle)
1586 struct __ecereNameSpace__ecere__com__Method * method = func->declarator->symbol->__anon1.method;
1588 func->declarator->symbol->__anon2.__anon3.methodExternal = external;
1589 if(method && method->symbol)
1590 ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal = external;
1591 if(method && method->type == 1)
1593 struct Type * methodDataType;
1595 ProcessMethodType(method);
1596 methodDataType = method->dataType;
1597 type = symbol->type;
1598 if(!type->__anon1.__anon2.staticMethod && !type->__anon1.__anon2.thisClass && !type->__anon1.__anon2.thisClassTemplate)
1600 if(method->dataType->__anon1.__anon2.thisClassTemplate)
1602 if(owningClass->templateArgs)
1604 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = FindTemplateArg(owningClass, method->dataType->__anon1.__anon2.thisClassTemplate);
1606 type->byReference = method->dataType->byReference;
1607 methodDataType = ProcessTypeString(method->dataTypeString, 0);
1608 type->__anon1.__anon2.thisClass = methodDataType->__anon1.__anon2.thisClass = arg ? FindClass((*arg).__anon1.__anon1.dataTypeString) : (((void *)0));
1611 else if(method->dataType->__anon1.__anon2.staticMethod)
1612 type->__anon1.__anon2.staticMethod = 1;
1613 else if(method->dataType->__anon1.__anon2.thisClass)
1615 type->__anon1.__anon2.thisClass = method->dataType->__anon1.__anon2.thisClass;
1616 type->byReference = method->dataType->byReference;
1620 if(!owningClass->symbol)
1621 owningClass->symbol = FindClass(owningClass->fullName);
1622 type->__anon1.__anon2.thisClass = owningClass->symbol;
1623 type->extraParam = 1;
1627 if(!MatchTypes(type, methodDataType, (((void *)0)), owningClass, method->_class, 1, 1, 1, 0, 1))
1629 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Incompatible virtual function %s\n", (((void *)0))), method->name);
1633 struct Type * typeParam;
1634 struct Declarator * funcDecl = GetFuncDecl(func->declarator);
1636 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).first)
1638 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
1640 for(typeParam = methodDataType->__anon1.__anon2.params.first; typeParam && param; typeParam = typeParam->next)
1642 if(typeParam->classObjectType)
1644 param->classObjectType = typeParam->classObjectType;
1645 if(param->declarator && param->declarator->symbol)
1646 param->declarator->symbol->type->classObjectType = typeParam->classObjectType;
1648 param = param ? param->next : (((void *)0));
1652 if(methodDataType != method->dataType)
1653 FreeType(methodDataType);
1657 type = symbol->type;
1658 if(!type->__anon1.__anon2.staticMethod && !type->__anon1.__anon2.thisClass)
1660 if(owningClass && !owningClass->symbol)
1661 owningClass->symbol = FindClass(owningClass->fullName);
1662 type->__anon1.__anon2.thisClass = owningClass ? FindClass(owningClass->fullName) : (((void *)0));
1668 if(symbol->type && !symbol->type->__anon1.__anon2.staticMethod && !symbol->type->__anon1.__anon2.thisClass)
1670 if(!owningClass->symbol)
1671 owningClass->symbol = FindClass(owningClass->fullName);
1672 symbol->type->__anon1.__anon2.thisClass = owningClass->symbol;
1674 if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func && propSymbol->__anon1._property && propSymbol->__anon1._property->conversion)
1676 if(symbol->type->__anon1.__anon2.thisClass && symbol->type->classObjectType != 1)
1678 if(owningClass->type != 1)
1679 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
1682 if(propSymbol->__anon2.__anon2.externalGet == (struct External *)func)
1684 propSymbol->__anon2.__anon2.externalGet = external;
1686 else if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func)
1688 propSymbol->__anon2.__anon2.externalSet = external;
1690 else if(propSymbol->__anon2.__anon2.externalIsSet == (struct External *)func)
1692 propSymbol->__anon2.__anon2.externalIsSet = external;
1702 func->declarator = (((void *)0));
1703 func->specifiers = (((void *)0));
1704 func->body = (((void *)0));
1705 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, external);
1709 struct __ecereNameSpace__ecere__com__Method * method = func->declarator->symbol->__anon1.method;
1711 if(method && method->symbol)
1712 ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal = (((void *)0));
1713 if(func->declarator->symbol && func->declarator->symbol->__anon2.__anon3.methodExternal == external)
1714 func->declarator->symbol->__anon2.__anon3.methodExternal = (((void *)0));
1715 func->declarator = (((void *)0));
1716 func->specifiers = (((void *)0));
1717 FreeExternal(external);
1722 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1723 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1724 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, external);
1725 external->__anon1.function->declarator = CopyDeclarator(external->__anon1.function->declarator);
1726 external->__anon1.function->specifiers = CopyList(external->__anon1.function->specifiers, (void *)(CopySpecifier));
1727 external->__anon1.function->body = (((void *)0));
1733 void RegisterMembersAndProperties(struct __ecereNameSpace__ecere__com__Class * regClass, unsigned int isMember, const char * className, struct Statement * statement)
1735 struct __ecereNameSpace__ecere__com__DataMember * dataMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)regClass : (((void *)0));
1736 struct __ecereNameSpace__ecere__com__DataMember * member;
1737 struct __ecereNameSpace__ecere__com__Property * prop;
1738 struct Expression * exp;
1739 struct Statement * stmt;
1740 char dataMemberSize[16];
1741 unsigned int lastOffset = 0;
1743 unsigned int privateMembers = 0;
1745 sprintf(dataMemberSize, "%d", (int)sizeof(struct __ecereNameSpace__ecere__com__DataMember *));
1748 for(prop = regClass->conversions.first; prop; prop = prop->next)
1750 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1753 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1754 ListAdd(args, MkExpConstant("0"));
1756 char * string = QMkString(prop->dataTypeString);
1758 ListAdd(args, MkExpString(string));
1759 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1763 strcpy(name, "__ecereProp_");
1764 FullClassNameCat(name, regClass->fullName, 0);
1765 strcat(name, "_Set_");
1766 FullClassNameCat(name, prop->name, 1);
1767 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1770 ListAdd(args, MkExpConstant("0"));
1773 strcpy(name, "__ecereProp_");
1774 FullClassNameCat(name, regClass->fullName, 0);
1775 strcat(name, "_Get_");
1776 FullClassNameCat(name, prop->name, 1);
1777 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1780 ListAdd(args, MkExpConstant("0"));
1781 switch(prop->memberAccess)
1784 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1787 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1791 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1794 strcpy(name, "__ecereProp_");
1795 FullClassNameCat(name, regClass->fullName, 0);
1797 FullClassNameCat(name, prop->name, 1);
1798 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args))));
1799 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1802 for(member = isMember ? dataMember->members.first : regClass->membersAndProperties.first; member; member = member->next)
1804 if(member->isProperty)
1806 prop = (struct __ecereNameSpace__ecere__com__Property *)member;
1808 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1809 char name[1024], nameM[1024];
1810 char * string = QMkString(prop->name);
1812 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1813 ListAdd(args, MkExpString(string));
1814 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1816 char * string = QMkString(prop->dataTypeString);
1818 ListAdd(args, MkExpString(string));
1819 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1823 strcpy(name, "__ecereProp_");
1824 FullClassNameCat(name, regClass->fullName, 0);
1825 strcat(name, "_Set_");
1826 FullClassNameCat(name, prop->name, 1);
1827 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1830 ListAdd(args, MkExpConstant("0"));
1833 strcpy(name, "__ecereProp_");
1834 FullClassNameCat(name, regClass->fullName, 0);
1835 strcat(name, "_Get_");
1836 FullClassNameCat(name, prop->name, 1);
1837 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1840 ListAdd(args, MkExpConstant("0"));
1841 switch(prop->memberAccess)
1844 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1847 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1851 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1854 strcpy(name, "__ecereProp_");
1855 FullClassNameCat(name, regClass->fullName, 0);
1857 FullClassNameCat(name, prop->name, 1);
1858 strcpy(nameM, "__ecerePropM_");
1859 FullClassNameCat(nameM, regClass->fullName, 0);
1861 FullClassNameCat(nameM, prop->name, 1);
1862 if(prop->dataTypeString)
1864 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args))));
1868 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args)));
1870 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1875 strcpy(name, "__ecereProp_");
1876 FullClassNameCat(name, regClass->fullName, 1);
1877 strcat(name, "_IsSet_");
1878 FullClassNameCat(name, prop->name, 0);
1879 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))))));
1880 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1882 if(prop->symbol && ((struct Symbol *)prop->symbol)->propCategory)
1884 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier(nameM)), MkIdentifier("category")), '=', CopyExpression(((struct Symbol *)prop->symbol)->propCategory))));
1885 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1887 if(prop->dataTypeString)
1889 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
1891 ListAdd(list, MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', MkExpIdentifier(MkIdentifier(nameM))));
1892 ListAdd(list, MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0"))));
1893 stmt = MkIfStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("module")), MkIdentifier("application")), EQ_OP, MkExpMember(MkExpIdentifier(MkIdentifier("__thisModule")), MkIdentifier("application")))), MkExpressionStmt(list), (((void *)0)));
1894 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1895 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")))));
1896 ListAdd(unregisterModuleBody->__anon1.compound.statements, stmt);
1900 else if(member->type == 0 && !isMember && regClass->type == 2)
1902 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)member;
1903 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1905 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1907 char * string = QMkString(bitMember->name);
1909 ListAdd(args, MkExpString(string));
1910 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1913 char * string = QMkString(bitMember->dataTypeString);
1915 ListAdd(args, MkExpString(string));
1916 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1921 sprintf(string, "%d", bitMember->size);
1922 ListAdd(args, (exp = MkExpConstant(string)));
1927 sprintf(string, "%d", bitMember->pos);
1928 ListAdd(args, (exp = MkExpConstant(string)));
1930 switch(member->memberAccess)
1933 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1936 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1940 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1943 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddBitMember")), args)));
1944 ListAdd(statement->__anon1.compound.statements, stmt);
1946 else if(member->memberAccess == 1 || (member->type == 0 && !member->dataTypeString))
1948 struct __ecereNameSpace__ecere__sys__OldList * args;
1952 unsigned int offset = member->offset - lastOffset;
1955 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1959 sprintf(string, "\"__ecerePrivateData%d\"", privateID++);
1960 ListAdd(args, MkExpString(string));
1965 sprintf(string, "\"byte[%d]\"", offset);
1966 ListAdd(args, MkExpString(string));
1971 sprintf(string, "%d", offset);
1972 ListAdd(args, (exp = MkExpConstant(string)));
1974 ListAdd(args, (exp = MkExpConstant("1")));
1975 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1976 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier(isMember ? "eMember_AddDataMember" : "eClass_AddDataMember")), args)));
1977 ListAdd(statement->__anon1.compound.statements, stmt);
1980 if(member->type == 0)
1982 if(!member->dataType)
1983 member->dataType = ProcessTypeString(member->dataTypeString, 0);
1984 ComputeTypeSize(member->dataType);
1986 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1988 char * string = QMkString(member->name);
1990 ListAdd(args, MkExpString(string));
1991 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1994 char * string = QMkString(member->dataTypeString);
1996 ListAdd(args, MkExpString(string));
1997 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2000 if(__ecereProp_Type_Get_isPointerTypeSize(member->dataType))
2002 ListAdd(args, (exp = MkExpTypeSize(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))))));
2003 ListAdd(args, (exp = MkExpConstant("0xF000F000")));
2009 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))
2012 DeclareStruct(registerModuleExternal, member->dataType->__anon1._class->string, 0, 1);
2013 FullClassNameCat(string, member->dataType->__anon1._class->string, 0);
2014 exp = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(string), (((void *)0)))), (((void *)0))));
2018 sprintf(string, "%d", member->dataType->size);
2019 exp = MkExpConstant(string);
2022 if(member->dataType->pointerAlignment)
2023 exp = MkExpConstant("0xF000F000");
2026 sprintf(string, "%d", member->dataType->alignment);
2027 exp = MkExpConstant(string);
2032 switch(member->memberAccess)
2035 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2038 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2042 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2045 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier(isMember ? "eMember_AddDataMember" : "eClass_AddDataMember")), args)));
2046 ListAdd(statement->__anon1.compound.statements, stmt);
2047 lastOffset = member->offset + member->dataType->size;
2051 static int memberCount = 0;
2052 struct Context * context;
2053 struct Statement * compound;
2054 char memberName[256];
2056 sprintf(memberName, "dataMember%d", memberCount);
2058 curContext = statement->__anon1.compound.context;
2059 context = PushContext();
2060 args = MkListOne(MkExpIdentifier(MkIdentifier((member->type == 1) ? "unionMember" : "structMember")));
2061 switch(member->memberAccess)
2064 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2067 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2071 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2074 compound = MkCompoundStmt(MkListOne(MkDeclaration(MkListOne(MkSpecifierName("DataMember")), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(memberName)), MkInitializerAssignment(MkExpCall(MkExpIdentifier(MkIdentifier("eMember_New")), args)))))), MkList());
2075 compound->__anon1.compound.context = context;
2077 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
2078 ListAdd(args, MkExpIdentifier(MkIdentifier(memberName)));
2079 RegisterMembersAndProperties((struct __ecereNameSpace__ecere__com__Class *)member, 1, memberName, compound);
2081 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eMember_AddMember")), args)));
2083 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMember")), args)));
2084 ListAdd(compound->__anon1.compound.statements, stmt);
2085 PopContext(context);
2086 ListAdd(statement->__anon1.compound.statements, compound);
2088 lastOffset = member->offset + member->memberOffset;
2096 struct __ecereNameSpace__ecere__com__ClassProperty * classProperty;
2098 for(prop = regClass->membersAndProperties.first; prop; prop = prop->next)
2100 if(prop->isProperty && prop->isWatchable)
2102 struct __ecereNameSpace__ecere__sys__OldList * args;
2103 char name[1024], nameM[1024];
2105 strcpy(name, "__ecereProp_");
2106 FullClassNameCat(name, regClass->fullName, 1);
2108 FullClassNameCat(name, prop->name, 0);
2109 strcpy(nameM, "__ecerePropM_");
2110 FullClassNameCat(nameM, regClass->fullName, 1);
2112 FullClassNameCat(nameM, prop->name, 0);
2113 args = MkListOne(MkExpCondition(MkExpIdentifier(MkIdentifier(nameM)), MkListOne(MkExpIdentifier(MkIdentifier(nameM))), MkExpIdentifier(MkIdentifier(name))));
2114 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eProperty_Watchable")), args)));
2115 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2118 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)))
2120 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2122 char * string = QMkString(classProperty->name);
2124 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
2125 ListAdd(args, MkExpString(string));
2126 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2128 char * string = QMkString(classProperty->dataTypeString);
2130 ListAdd(args, MkExpString(string));
2131 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2133 if(classProperty->Set)
2135 strcpy(name, "__ecereClassProp_");
2136 FullClassNameCat(name, regClass->fullName, 1);
2137 strcat(name, "_Set_");
2138 strcat(name, classProperty->name);
2139 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
2142 ListAdd(args, MkExpConstant("0"));
2143 if(classProperty->Get)
2145 strcpy(name, "__ecereClassProp_");
2146 FullClassNameCat(name, regClass->fullName, 1);
2147 strcat(name, "_Get_");
2148 strcat(name, classProperty->name);
2149 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
2152 ListAdd(args, MkExpConstant("0"));
2153 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddClassProperty")), args)));
2154 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2159 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
2161 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
2163 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
2165 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List_TPL_ClassPropertyValue_;
2167 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__TemplateMemberType;
2169 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List;
2171 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2173 struct __ecereNameSpace__ecere__com__Module
2175 struct __ecereNameSpace__ecere__com__Instance * application;
2176 struct __ecereNameSpace__ecere__sys__OldList classes;
2177 struct __ecereNameSpace__ecere__sys__OldList defines;
2178 struct __ecereNameSpace__ecere__sys__OldList functions;
2179 struct __ecereNameSpace__ecere__sys__OldList modules;
2180 struct __ecereNameSpace__ecere__com__Instance * prev;
2181 struct __ecereNameSpace__ecere__com__Instance * next;
2187 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
2188 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
2189 } __attribute__ ((gcc_struct));
2191 void __ecereDestructor_ClassPropertyValue(struct __ecereNameSpace__ecere__com__Instance * this)
2193 __attribute__((unused)) struct ClassPropertyValue * __ecerePointer_ClassPropertyValue = (struct ClassPropertyValue *)(this ? (((char *)this) + __ecereClass_ClassPropertyValue->offset) : 0);
2196 FreeIdentifier(__ecerePointer_ClassPropertyValue->id);
2200 void CreateRegisterModuleBody()
2202 if(!registerModuleBody && inCompiler)
2204 char registerName[1024], moduleName[274];
2205 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
2206 struct Declarator * declarator;
2207 struct TypeName * moduleParam;
2209 registerModuleBody = MkCompoundStmt(MkList(), MkList());
2210 registerModuleBody->__anon1.compound.context = __extension__ ({
2211 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
2213 __ecereInstance1->parent = globalContext, __ecereInstance1;
2215 ListAdd(registerModuleBody->__anon1.compound.declarations, MkDeclaration((specifiers = MkListOne(MkSpecifierName("ecere::com::Class"))), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("class")), (((void *)0))))));
2216 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
2217 specifiers = MkList();
2218 ListAdd(specifiers, MkSpecifier(VOID));
2219 moduleParam = MkTypeName(MkListOne(MkSpecifierName("Module")), MkDeclaratorIdentifier(MkIdentifier("module")));
2220 __ecereNameSpace__ecere__sys__GetLastDirectory(outputFile, moduleName);
2221 __ecereNameSpace__ecere__sys__StripExtension(moduleName);
2222 FixModuleName(moduleName);
2223 sprintf(registerName, "__ecereRegisterModule_%s", moduleName);
2224 declarator = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(registerName)), MkListOne(moduleParam));
2226 struct FunctionDefinition * function = _MkFunction(specifiers, declarator, (((void *)0)), 0);
2228 ProcessFunctionBody(function, registerModuleBody);
2229 function->declMode = 0;
2232 ListAdd(ast, (registerModuleExternal = MkExternalFunction(function)));
2233 DeclareStruct(registerModuleExternal, "ecere::com::Instance", 0, 1);
2234 DeclareStruct(registerModuleExternal, "ecere::com::Module", 0, 1);
2237 if(!unregisterModuleBody && inCompiler)
2239 char registerName[1024], moduleName[274];
2240 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
2241 struct Declarator * declarator;
2242 struct TypeName * moduleParam;
2244 unregisterModuleBody = MkCompoundStmt(MkList(), MkList());
2245 unregisterModuleBody->__anon1.compound.context = __extension__ ({
2246 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
2248 __ecereInstance1->parent = globalContext, __ecereInstance1;
2250 specifiers = MkList();
2251 ListAdd(specifiers, MkSpecifier(VOID));
2252 moduleParam = MkTypeName(MkListOne(MkSpecifierName("Module")), MkDeclaratorIdentifier(MkIdentifier("module")));
2253 __ecereNameSpace__ecere__sys__GetLastDirectory(outputFile, moduleName);
2254 __ecereNameSpace__ecere__sys__StripExtension(moduleName);
2255 FixModuleName(moduleName);
2256 sprintf(registerName, "__ecereUnregisterModule_%s", moduleName);
2257 declarator = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(registerName)), MkListOne(moduleParam));
2259 struct FunctionDefinition * function = _MkFunction(specifiers, declarator, (((void *)0)), 0);
2261 ProcessFunctionBody(function, unregisterModuleBody);
2262 function->declMode = 0;
2265 ListAdd(ast, (unregisterModuleExternal = MkExternalFunction(function)));
2266 DeclareStruct(unregisterModuleExternal, "ecere::com::Instance", 0, 1);
2267 DeclareStruct(unregisterModuleExternal, "ecere::com::Module", 0, 1);
2272 void __ecereCreateModuleInstances_pass1()
2274 classPropValues = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__com__List_TPL_ClassPropertyValue_);
2275 __ecereNameSpace__ecere__com__eInstance_IncRef(classPropValues);
2278 void __ecereUnregisterModule_pass1(struct __ecereNameSpace__ecere__com__Instance * module)
2283 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)
2285 struct ClassDef * def;
2286 struct __ecereNameSpace__ecere__com__Class * regClass = symbol->__anon1.registered;
2290 classType = regClass->type;
2291 if(classType == 4 && enumValues && (inCompiler || !buildingECERECOMModule))
2293 struct Enumerator * e;
2295 for(e = enumValues->first; e; e = e->next)
2299 struct Type * destType = (destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), destType->kind = 4, destType->refCount = 1, destType);
2301 e->exp->destType = destType;
2303 ProcessExpressionType(e->exp);
2305 if(!e->exp->expType)
2308 destType->__anon1._class = symbol;
2309 ProcessExpressionType(e->exp);
2311 if(e->exp->type == 0 && e->exp->expType && e->exp->__anon1.__anon1.identifier && e->exp->__anon1.__anon1.identifier->string && e->exp->expType->kind == 15)
2313 struct __ecereNameSpace__ecere__sys__NamedLink64 * l;
2314 char * string = e->exp->__anon1.__anon1.identifier->string;
2316 for(l = e->exp->expType->__anon1.__anon1.members.first; l; l = l->next)
2318 if(!strcmp(l->name, string))
2322 FreeExpContents(e->exp);
2324 e->exp->__anon1.__anon1.constant = PrintInt64(l->data);
2325 FreeType(e->exp->expType);
2326 e->exp->expType = ProcessTypeString("int64", 0);
2333 ComputeExpression(e->exp);
2334 if(e->exp->isConstant && e->exp->type == 2)
2336 struct Operand op = GetOperand(e->exp);
2342 value = op.type->isSigned ? (long long)op.__anon1.c : (long long)op.__anon1.uc;
2345 value = op.type->isSigned ? (long long)op.__anon1.s : (long long)op.__anon1.us;
2348 value = op.type->isSigned ? op.__anon1.i64 : (long long)op.__anon1.ui64;
2352 value = op.type->isSigned ? (long long)op.__anon1.i : (int)op.__anon1.ui;
2354 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(regClass, e->id->string, value);
2357 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2360 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2363 struct __ecereNameSpace__ecere__com__EnumClassData * baseData = regClass->data;
2364 struct __ecereNameSpace__ecere__sys__OldLink * deriv;
2366 for(deriv = regClass->derivatives.first; deriv; deriv = deriv->next)
2368 struct __ecereNameSpace__ecere__com__Class * c = deriv->data;
2370 if(c && c->type == 4)
2372 struct __ecereNameSpace__ecere__com__EnumClassData * data = c->data;
2374 data->largest = baseData->largest;
2379 if(definitions != (((void *)0)))
2383 for(def = definitions->first; def; def = def->next)
2385 if(def->type == 4 && def->__anon1.propertyWatch)
2387 struct PropertyWatch * propWatch = def->__anon1.propertyWatch;
2388 struct ClassFunction * func;
2389 char watcherName[1024];
2390 struct Identifier * propID;
2391 struct Statement * stmt = MkExpressionStmt(MkList());
2392 struct Declarator * decl;
2393 struct __ecereNameSpace__ecere__sys__OldList * specs;
2395 sprintf(watcherName, "__ecerePropertySelfWatcher_%d", propWatcherID++);
2396 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
2398 strcat(watcherName, "_");
2399 strcat(watcherName, propID->string);
2401 decl = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(watcherName)), MkListOne(MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0)))));
2403 ListAdd(specs, MkSpecifier(STATIC));
2404 ListAdd(specs, MkSpecifier(VOID));
2405 func = MkClassFunction(specs, (((void *)0)), decl, (((void *)0)));
2406 ProcessClassFunctionBody(func, propWatch->compound);
2407 decl->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2408 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), decl->symbol);
2409 func->dontMangle = 1;
2410 propWatch->compound = (((void *)0));
2411 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, (((void *)0)), MkClassDefFunction(func));
2412 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
2414 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(regClass, propID->string, privateModule);
2418 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2420 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2422 char * s = QMkString(propID->string);
2424 ListAdd(args, MkExpString(s));
2425 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2427 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
2428 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("eProperty_SelfWatch")), args));
2431 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, regClass->fullName);
2433 FreePropertyWatch(def->__anon1.propertyWatch);
2434 def->__anon1.propertyWatch = (struct PropertyWatch *)stmt;
2438 for(def = definitions->first; def; def = def->next)
2442 ProcessClassFunction(regClass, def->__anon1.function, defs, external->prev, declMode == 3);
2446 if(inCompiler && symbol->mustRegister && regClass)
2448 struct Statement * stmt;
2449 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2450 struct __ecereNameSpace__ecere__com__Method * method;
2451 struct Expression * exp;
2452 const char * registerFunction = (((void *)0));
2453 int inheritanceAccess = 1;
2455 CreateRegisterModuleBody();
2456 curExternal = registerModuleExternal;
2457 switch(regClass->type)
2460 ListAdd(args, MkExpIdentifier(MkIdentifier("structClass")));
2463 ListAdd(args, MkExpIdentifier(MkIdentifier("bitClass")));
2466 ListAdd(args, MkExpIdentifier(MkIdentifier("enumClass")));
2469 ListAdd(args, MkExpIdentifier(MkIdentifier("noHeadClass")));
2472 ListAdd(args, MkExpIdentifier(MkIdentifier("unitClass")));
2475 ListAdd(args, MkExpIdentifier(MkIdentifier("normalClass")));
2479 char nameSpace[1024] = "";
2480 char className[1024] = "";
2483 GetNameSpaceString(regClass->nameSpace, nameSpace);
2486 __ecereNameSpace__ecere__sys__GetLastDirectory(sourceFile, className);
2487 __ecereNameSpace__ecere__sys__ChangeCh(className, '.', '_');
2488 strcat(className, "}");
2490 strcat(className, nameSpace);
2491 strcat(className, regClass->name);
2492 string = QMkString(className);
2493 ListAdd(args, MkExpString(string));
2494 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2496 if(baseSpecs != (((void *)0)))
2498 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
2500 if(baseType->kind != 9 && baseType->kind != 10)
2502 char baseName[1024] = "";
2505 if(baseType->kind == 8 && baseType->__anon1._class && baseType->__anon1._class->isStatic)
2507 __ecereNameSpace__ecere__sys__GetLastDirectory(sourceFile, baseName);
2508 __ecereNameSpace__ecere__sys__ChangeCh(baseName, '.', '_');
2509 strcat(baseName, "}");
2510 strcat(baseName, baseType->__anon1._class->string);
2513 PrintType(baseType, baseName, 0, 1);
2514 string = QMkString(baseName);
2515 ListAdd(args, MkExpString(string));
2516 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2519 ListAdd(args, MkExpConstant("0"));
2521 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
2522 inheritanceAccess = 2;
2525 ListAdd(args, MkExpConstant("0"));
2526 if(regClass->type == 1 || regClass->type == 0 || regClass->type == 5)
2528 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
2531 struct __ecereNameSpace__ecere__com__Class * base;
2533 for(base = regClass->base; base && base->type != 1000; base = base->next)
2535 for(member = base->membersAndProperties.first; member; member = member->next)
2536 if(!member->isProperty)
2542 if(regClass->type == 1 && symbol->declaredStruct && member)
2544 char baseStructName[1024];
2546 baseStructName[0] = (char)0;
2547 strcpy(baseStructName, (regClass->base->templateClass ? regClass->base->templateClass : regClass->base)->fullName);
2548 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))))));
2551 ListAdd(args, symbol->declaredStruct ? MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(symbol->structName), (((void *)0)))), (((void *)0)))) : MkExpConstant("0"));
2555 ListAdd(args, MkExpConstant("0"));
2558 char classDataStructName[1024];
2560 strcpy(classDataStructName, "__ecereClassData_");
2561 FullClassNameCat(classDataStructName, symbol->string, 0);
2562 ListAdd(args, symbol->classData ? MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(classDataStructName), (((void *)0)))), (((void *)0)))) : MkExpConstant("0"));
2564 if(regClass->type == 0 || regClass->type == 5)
2566 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), symbol->needConstructor ? MkExpIdentifier(MkIdentifier(symbol->constructorName)) : MkExpConstant("0")));
2567 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), symbol->needDestructor ? MkExpIdentifier(MkIdentifier(symbol->destructorName)) : MkExpConstant("0")));
2571 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")));
2572 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")));
2574 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
2578 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2581 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2585 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
2588 switch(inheritanceAccess)
2591 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2595 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2598 registerFunction = "eSystem_RegisterClass";
2599 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier("class")), '=', MkExpCall((exp = MkExpIdentifier(MkIdentifier(registerFunction))), args))));
2600 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2601 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)));
2602 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2603 if(external && external->type == 2 && external->__anon1._class->deleteWatchable)
2605 args = MkListOne(MkExpIdentifier(MkIdentifier("class")));
2606 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_DestructionWatchable")), args)));
2607 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2611 struct __ecereNameSpace__ecere__com__Class * base = regClass->base;
2614 for(c = 0; c < base->vTblSize; c++)
2616 struct Symbol * method = (struct Symbol *)regClass->_vTbl[c];
2618 if((void *)method != DummyMethod && base->_vTbl[c] != (void *)method && method->__anon2.__anon3.methodExternal)
2620 struct External * external = method->__anon2.__anon3.methodExternal;
2621 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2622 struct Identifier * id = external->__anon1.function ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2625 struct External * e = method->__anon2.__anon3.methodExternal ? method->__anon2.__anon3.methodExternal : method->__anon2.__anon3.methodCodeExternal;
2627 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, e, e->type == 0);
2629 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2631 char * string = QMkString(method->__anon1.method->name);
2633 ListAdd(args, MkExpString(string));
2634 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2636 ListAdd(args, MkExpConstant("0"));
2637 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2638 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2639 exp->expType = __extension__ ({
2640 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2642 __ecereInstance1->refCount = 1, __ecereInstance1;
2644 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMethod")), args)));
2645 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2652 for(c = regClass->base ? regClass->base->vTblSize : 0; c < regClass->vTblSize; c++)
2654 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)))
2656 if(method->type == 1 && method->_class == regClass && method->vid == c)
2659 struct Expression * exp;
2660 struct External * external = method->symbol ? ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal : (((void *)0));
2661 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2662 struct Identifier * id = (external && external->__anon1.function) ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2664 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2666 char * string = QMkString(method->name);
2668 ListAdd(args, MkExpString(string));
2669 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2672 char * string = QMkString(method->dataTypeString);
2674 ListAdd(args, MkExpString(string));
2675 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2677 if(id && external->__anon1.function->body)
2679 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2680 exp->expType = __extension__ ({
2681 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2683 __ecereInstance1->refCount = 1, __ecereInstance1;
2688 ListAdd(args, (exp = MkExpConstant("0")));
2690 switch(method->memberAccess)
2693 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2696 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2700 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2703 strcpy(name, "__ecereVMethodID_");
2704 FullClassNameCat(name, method->_class->fullName, 0);
2706 strcat(name, method->name);
2707 exp = MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddVirtualMethod")), args);
2708 stmt = MkExpressionStmt(MkListOne(exp));
2710 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, external, external->type == 0);
2711 DeclareMethod(curExternal, method, name);
2712 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2717 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)))
2719 if(method->type == 1 && method->_class == regClass)
2721 else if(method->memberAccess == 1 || !method->dataTypeString)
2723 struct External * external = method->symbol ? ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal : (((void *)0));
2724 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2725 struct Identifier * id = (external && external->__anon1.function) ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2727 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2729 char * string = QMkString(method->name);
2731 ListAdd(args, MkExpString(string));
2732 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2735 char * string = QMkString(method->dataTypeString);
2737 ListAdd(args, MkExpString(string));
2738 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2740 if(id && external->__anon1.function->body)
2742 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2743 exp->expType = __extension__ ({
2744 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2746 __ecereInstance1->refCount = 1, __ecereInstance1;
2751 ListAdd(args, (exp = MkExpConstant("0")));
2753 switch(method->memberAccess)
2756 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2759 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2763 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2766 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMethod")), args)));
2767 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2769 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, external, external->type == 0);
2772 RegisterMembersAndProperties(regClass, 0, "class", registerModuleBody);
2775 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
2776 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
2777 struct __ecereNameSpace__ecere__com__EnumClassData * e = (regClass ? ((void *)(((char *)regClass->data) + enumClass->offsetClass)) : (((void *)0)));
2779 for(value = e->values.first; value; value = value->next)
2781 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2783 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2785 char * string = QMkString(value->name);
2787 ListAdd(args, MkExpString(string));
2788 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2793 if(!strcmp(regClass->dataTypeString, "uint64"))
2794 temp = PrintUInt64(value->data);
2796 temp = PrintInt64(value->data);
2797 ListAdd(args, MkExpConstant(temp));
2798 (__ecereNameSpace__ecere__com__eSystem_Delete(temp), temp = 0);
2800 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eEnum_AddFixedValue")), args)));
2801 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2804 if(symbol->templateParams)
2806 struct TemplateParameter * param;
2808 for(param = (*symbol->templateParams).first; param; param = param->next)
2810 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2812 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2814 char * string = QMkString(param->identifier->string);
2816 ListAdd(args, MkExpString(string));
2817 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2819 ListAdd(args, MkExpIdentifier(MkIdentifier((param->type == 0) ? "type" : ((param->type == 1) ? "identifier" : "expression"))));
2825 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
2826 char * string = QMkString(typeString);
2828 ListAdd(args, MkExpString(string));
2829 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
2830 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2835 char memberTypeString[132] = "TemplateMemberType::";
2836 unsigned int needClass = 1;
2838 ((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);
2839 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(memberTypeString))));
2843 if(param->defaultArgument)
2845 struct __ecereNameSpace__ecere__sys__OldList * members = MkList();
2851 char * typeString = param->defaultArgument->__anon1.templateDatatype ? StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl) : (((void *)0));
2852 char * string = QMkString(typeString);
2854 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(MkListOne(MkIdentifier("dataTypeString")), MkInitializerAssignment(MkExpString(string))));
2855 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
2856 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2861 char memberString[1024];
2864 memberString[0] = '\0';
2865 if(param->defaultArgument->__anon1.identifier->_class)
2867 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
2868 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
2869 else if(param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
2870 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
2873 strcat(memberString, "::");
2874 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
2875 string = QMkString(memberString);
2876 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(MkListOne(MkIdentifier("dataTypeString")), MkInitializerAssignment(MkExpString(string))));
2877 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2889 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
2892 struct __ecereNameSpace__ecere__sys__OldList * ids = MkList();
2894 char * string = (((void *)0));
2896 op = GetOperand(param->defaultArgument->__anon1.expression);
2897 ui64String = PrintUInt64(op.__anon1.ui64);
2898 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ids), MkIdentifier("expression"));
2899 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ids), MkIdentifier("ui64"));
2900 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(ids, MkInitializerAssignment(MkExpConstant(ui64String))));
2901 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2902 (__ecereNameSpace__ecere__com__eSystem_Delete(ui64String), ui64String = 0);
2906 ListAdd(args, MkExpInstance(MkInstantiation(MkSpecifierName("ClassTemplateArgument"), (((void *)0)), MkListOne(MkMembersInitList(members)))));
2909 ListAdd(args, MkExpIdentifier(MkIdentifier("null")));
2910 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddTemplateParameter")), args)));
2911 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2913 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_DoneAddingTemplateParameters")), MkListOne(MkExpIdentifier(MkIdentifier("class"))))));
2914 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2916 if(definitions != (((void *)0)))
2918 for(def = definitions->first; def; def = def->next)
2920 if(def->type == 4 && def->__anon1.propertyWatch)
2922 ListAdd(registerModuleBody->__anon1.compound.statements, (struct Statement *)def->__anon1.propertyWatch);
2923 def->__anon1.propertyWatch = (((void *)0));
2925 else if(def->type == 5)
2928 char * s = QMkString(def->__anon1.designer);
2930 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("designerClass")), '=', MkExpString(s)))), (((void *)0)));
2931 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2933 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2935 else if(def->type == 6)
2937 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("noExpansion")), '=', MkExpConstant("1")))), (((void *)0)));
2938 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2940 else if(def->type == 7)
2942 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("fixed")), '=', MkExpConstant("1")))), (((void *)0)));
2943 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2945 regClass->fixed = 1;
2947 else if(def->type == 8)
2949 char * s = QMkString(def->__anon1.defaultProperty->string);
2951 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("defaultProperty")), '=', MkExpString(s)))), (((void *)0)));
2952 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2953 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2955 else if(def->type == 11)
2957 ((struct __ecereNameSpace__ecere__com__IteratorPointer * (*)(struct __ecereNameSpace__ecere__com__Instance *, uint64 value))__extension__ ({
2958 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = classPropValues;
2960 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
2961 })[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Add])(classPropValues, (uint64)(uintptr_t)(__extension__ ({
2962 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassPropertyValue);
2964 ((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;
2966 def->__anon1.__anon1.id = (((void *)0));
2967 def->__anon1.__anon1.initializer->__anon1.exp = (((void *)0));
2975 void ProcessClassDefinitions()
2977 struct External * external, * next;
2979 CreateRegisterModuleBody();
2982 for(external = (*ast).first; external; external = next)
2984 next = external->next;
2985 curExternal = external;
2986 if(external->type == 2)
2988 struct ClassDefinition * _class = external->__anon1._class;
2990 if(_class->definitions)
2992 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), ast, external, _class->declMode);
2996 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
2997 FreeExternal(external);
3000 else if(external->type == 0)
3002 unsigned int setStaticMethod = 0;
3004 if(external->symbol && !external->symbol->type->__anon1.__anon2.thisClass && !external->symbol->type->__anon1.__anon2.staticMethod)
3006 external->symbol->type->__anon1.__anon2.staticMethod = 1;
3007 setStaticMethod = 1;
3011 struct FunctionDefinition * function = external->__anon1.function;
3012 struct Statement * stmt;
3013 struct __ecereNameSpace__ecere__sys__OldList * args;
3015 if(!strcmp(function->declarator->symbol->string, "__on_register_module"))
3017 ListAdd(registerModuleBody->__anon1.compound.statements, function->body);
3018 function->body->__anon1.compound.context->parent = registerModuleBody->__anon1.compound.context;
3019 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
3020 function->body = (((void *)0));
3021 FreeExternal(external);
3024 if(function->declMode != 2 && function->declMode != 1)
3027 CreateRegisterModuleBody();
3029 char * string = QMkString(function->declarator->symbol->string);
3031 ListAdd(args, MkExpString(string));
3032 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3036 char type[1024] = "";
3039 function->declarator->symbol->type->__anon1.__anon2.staticMethod = 0;
3040 PrintType(function->declarator->symbol->type, type, 1, 1);
3042 function->declarator->symbol->type->__anon1.__anon2.staticMethod = 1;
3043 string = QMkString(type);
3044 ListAdd(args, MkExpString(string));
3045 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3048 ListAdd(args, MkExpIdentifier(MkIdentifier(function->declarator->symbol->string)));
3050 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
3051 switch(function->declMode)
3054 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
3057 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
3061 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
3064 stmt = MkExpressionStmt(MkListOne(MkExpCall((MkExpIdentifier(MkIdentifier("eSystem_RegisterFunction"))), args)));
3065 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
3068 else if(external->type == 1)
3070 struct Declaration * declaration = external->__anon1.declaration;
3072 if(external->symbol)
3074 if(external->symbol->type && external->symbol->type->kind == 11 && !external->symbol->type->__anon1.__anon2.thisClass)
3075 external->symbol->type->__anon1.__anon2.staticMethod = 1;
3077 if(external->symbol && declaration && declaration->type == 1)
3079 if(declaration->__anon1.__anon1.specifiers)
3081 struct Specifier * specifier;
3082 unsigned int removeExternal = 0;
3084 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
3086 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)))
3088 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
3094 if(specifier->type == 2)
3099 symbol->ctx = specifier->__anon1.__anon2.ctx;
3100 specifier->__anon1.__anon2.ctx = (((void *)0));
3101 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, ast, external, declaration->declMode);
3105 if(inCompiler && removeExternal)
3107 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
3108 FreeExternal(external);
3112 else if(declaration && declaration->type == 3)
3114 if(inCompiler && declaration->declMode != 3)
3116 struct Statement * stmt;
3117 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
3119 CreateRegisterModuleBody();
3121 char * string = QMkString(declaration->__anon1.__anon2.id->string);
3123 ListAdd(args, MkExpString(string));
3124 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3128 char type[1024] = "";
3130 PrintExpression(declaration->__anon1.__anon2.exp, type);
3131 string = QMkString(type);
3132 ListAdd(args, MkExpString(string));
3133 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3135 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
3136 switch(declaration->declMode)
3139 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
3142 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
3146 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
3149 stmt = MkExpressionStmt(MkListOne(MkExpCall((MkExpIdentifier(MkIdentifier("eSystem_RegisterDefine"))), args)));
3150 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
3156 struct __ecereNameSpace__ecere__com__Iterator v =
3158 (classPropValues), 0
3161 while(__ecereMethod___ecereNameSpace__ecere__com__Iterator_Next(&v))
3163 struct __ecereNameSpace__ecere__sys__OldList * findClassArgs = MkList();
3164 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
3165 struct Statement * compoundStmt;
3167 struct Expression * e;
3170 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3172 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3174 yylloc = __extension__ ({
3175 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3177 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3179 ListAdd(findClassArgs, MkExpIdentifier(MkIdentifier("module")));
3180 s = QMkString(__extension__ ({
3181 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3183 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3184 })->regClass->name);
3185 ListAdd(findClassArgs, MkExpString(s));
3186 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
3187 ListAdd(args, MkExpIdentifier(MkIdentifier("_class")));
3188 s = QMkString(__extension__ ({
3189 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3191 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3193 ListAdd(args, MkExpString(s));
3194 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
3195 e = __extension__ ({
3196 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3198 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3200 ProcessExpressionType(e);
3201 if(__ecereProp_Type_Get_isPointerType(e->expType))
3202 e = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("intptr")), (((void *)0))), e);
3203 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(INT64)), (((void *)0))), e));
3204 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)))));
3205 compoundStmt->__anon1.compound.context = __extension__ ({
3206 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
3208 __ecereInstance1->parent = registerModuleBody->__anon1.compound.context, __ecereInstance1;
3210 ListAdd(registerModuleBody->__anon1.compound.statements, compoundStmt);
3213 ((void (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
3214 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = classPropValues;
3216 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
3217 })[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Free])(classPropValues);
3221 void __ecereRegisterModule_pass1(struct __ecereNameSpace__ecere__com__Instance * module)
3223 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
3225 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetBuildingEcereCom", "void SetBuildingEcereCom(bool b)", SetBuildingEcereCom, module, 1);
3226 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetBuildingEcereCom", "bool GetBuildingEcereCom(void)", GetBuildingEcereCom, module, 1);
3227 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetBuildingEcereComModule", "void SetBuildingEcereComModule(bool b)", SetBuildingEcereComModule, module, 1);
3228 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetBuildingEcereComModule", "bool GetBuildingEcereComModule(void)", GetBuildingEcereComModule, module, 1);
3229 __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);
3230 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CreateRegisterModuleBody", "void CreateRegisterModuleBody(void)", CreateRegisterModuleBody, module, 2);
3231 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("RegisterMembersAndProperties", "void RegisterMembersAndProperties(ecere::com::Class regClass, bool isMember, const char * className, Statement statement)", RegisterMembersAndProperties, module, 2);
3232 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetNameSpaceString", "void GetNameSpaceString(ecere::com::NameSpace ns, char * string)", GetNameSpaceString, module, 2);
3233 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ClassPropertyValue", 0, sizeof(struct ClassPropertyValue), 0, (void *)0, (void *)__ecereDestructor_ClassPropertyValue, module, 2, 1);
3234 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)
3235 __ecereClass_ClassPropertyValue = class;
3236 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessClassDefinitions", "void ProcessClassDefinitions(void)", ProcessClassDefinitions, module, 1);