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 extern char * strcpy(char * , const char * );
156 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
158 struct __ecereNameSpace__ecere__com__LinkList
163 } __attribute__ ((gcc_struct));
165 extern void Compiler_Error(const char * format, ...);
167 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
169 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
171 extern char * __ecereNameSpace__ecere__sys__GetLastDirectory(const char * string, char * output);
173 extern unsigned int __ecereNameSpace__ecere__sys__StripExtension(char * string);
175 extern void FixModuleName(char * moduleName);
177 extern int sprintf(char * , const char * , ...);
179 extern char * QMkString(const char * source);
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 } __attribute__ ((gcc_struct));
530 extern void DeclareClass(struct External * neededFor, struct Symbol * classSym, const char * className);
532 extern struct Symbol * FindClass(const char * name);
536 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
538 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
540 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
542 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
544 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
546 extern char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
548 struct TemplateDatatype
550 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
551 struct Declarator * decl;
552 } __attribute__ ((gcc_struct));
558 struct Declarator * prev;
559 struct Declarator * next;
562 struct Symbol * symbol;
563 struct Declarator * declarator;
566 struct Identifier * identifier;
569 struct Expression * exp;
570 struct Expression * posExp;
571 struct Attrib * attrib;
572 } __attribute__ ((gcc_struct)) structDecl;
575 struct Expression * exp;
576 struct Specifier * enumClass;
577 } __attribute__ ((gcc_struct)) array;
580 struct __ecereNameSpace__ecere__sys__OldList * parameters;
581 } __attribute__ ((gcc_struct)) function;
584 struct Pointer * pointer;
585 } __attribute__ ((gcc_struct)) pointer;
588 struct ExtDecl * extended;
589 } __attribute__ ((gcc_struct)) extended;
590 } __attribute__ ((gcc_struct)) __anon1;
591 } __attribute__ ((gcc_struct));
593 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
595 extern struct Identifier * MkIdentifier(const char * string);
597 extern struct Expression * MkExpIdentifier(struct Identifier * id);
599 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
601 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
605 struct Identifier * prev;
606 struct Identifier * next;
608 struct Symbol * classSym;
609 struct Specifier * _class;
611 struct Identifier * badID;
612 } __attribute__ ((gcc_struct));
614 extern struct Identifier * GetDeclId(struct Declarator * decl);
616 struct ClassPropertyValue
618 struct __ecereNameSpace__ecere__com__Class * regClass;
619 struct Identifier * id;
620 struct Expression * exp;
621 } __attribute__ ((gcc_struct));
623 extern void FreeIdentifier(struct Identifier * id);
625 struct __ecereNameSpace__ecere__sys__NamedLink64;
627 struct __ecereNameSpace__ecere__sys__NamedLink64
629 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
630 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
633 } __attribute__ ((gcc_struct));
635 struct __ecereNameSpace__ecere__sys__OldLink;
637 struct __ecereNameSpace__ecere__sys__OldLink
639 struct __ecereNameSpace__ecere__sys__OldLink * prev;
640 struct __ecereNameSpace__ecere__sys__OldLink * next;
642 } __attribute__ ((gcc_struct));
644 struct ClassFunction;
648 struct ClassFunction * prev;
649 struct ClassFunction * next;
651 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
652 struct Declarator * declarator;
653 struct __ecereNameSpace__ecere__sys__OldList * declarations;
654 struct Statement * body;
655 struct __ecereNameSpace__ecere__com__Class * _class;
656 struct __ecereNameSpace__ecere__sys__OldList attached;
659 struct Symbol * propSet;
660 unsigned int isVirtual;
661 unsigned int isConstructor;
662 unsigned int isDestructor;
663 unsigned int dontMangle;
666 } __attribute__ ((gcc_struct));
668 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
670 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
672 struct PropertyWatch;
676 struct PropertyWatch * prev;
677 struct PropertyWatch * next;
679 struct Statement * compound;
680 struct __ecereNameSpace__ecere__sys__OldList * properties;
681 unsigned int deleteWatch;
682 } __attribute__ ((gcc_struct));
684 extern void FreePropertyWatch(struct PropertyWatch * watcher);
690 struct Statement * prev;
691 struct Statement * next;
696 struct __ecereNameSpace__ecere__sys__OldList * expressions;
699 struct Identifier * id;
700 struct Statement * stmt;
701 } __attribute__ ((gcc_struct)) labeled;
704 struct Expression * exp;
705 struct Statement * stmt;
706 } __attribute__ ((gcc_struct)) caseStmt;
709 struct __ecereNameSpace__ecere__sys__OldList * declarations;
710 struct __ecereNameSpace__ecere__sys__OldList * statements;
711 struct Context * context;
712 unsigned int isSwitch;
713 } __attribute__ ((gcc_struct)) compound;
716 struct __ecereNameSpace__ecere__sys__OldList * exp;
717 struct Statement * stmt;
718 struct Statement * elseStmt;
719 } __attribute__ ((gcc_struct)) ifStmt;
722 struct __ecereNameSpace__ecere__sys__OldList * exp;
723 struct Statement * stmt;
724 } __attribute__ ((gcc_struct)) switchStmt;
727 struct __ecereNameSpace__ecere__sys__OldList * exp;
728 struct Statement * stmt;
729 } __attribute__ ((gcc_struct)) whileStmt;
732 struct __ecereNameSpace__ecere__sys__OldList * exp;
733 struct Statement * stmt;
734 } __attribute__ ((gcc_struct)) doWhile;
737 struct Statement * init;
738 struct Statement * check;
739 struct __ecereNameSpace__ecere__sys__OldList * increment;
740 struct Statement * stmt;
741 } __attribute__ ((gcc_struct)) forStmt;
744 struct Identifier * id;
745 } __attribute__ ((gcc_struct)) gotoStmt;
748 struct Specifier * spec;
750 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
751 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
752 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
753 } __attribute__ ((gcc_struct)) asmStmt;
756 struct Expression * watcher;
757 struct Expression * object;
758 struct __ecereNameSpace__ecere__sys__OldList * watches;
759 } __attribute__ ((gcc_struct)) _watch;
762 struct Identifier * id;
763 struct __ecereNameSpace__ecere__sys__OldList * exp;
764 struct __ecereNameSpace__ecere__sys__OldList * filter;
765 struct Statement * stmt;
766 } __attribute__ ((gcc_struct)) forEachStmt;
767 struct Declaration * decl;
768 } __attribute__ ((gcc_struct)) __anon1;
769 } __attribute__ ((gcc_struct));
771 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
775 struct Declaration * prev;
776 struct Declaration * next;
783 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
784 struct __ecereNameSpace__ecere__sys__OldList * declarators;
785 } __attribute__ ((gcc_struct)) __anon1;
786 struct Instantiation * inst;
789 struct Identifier * id;
790 struct Expression * exp;
791 } __attribute__ ((gcc_struct)) __anon2;
792 } __attribute__ ((gcc_struct)) __anon1;
793 struct Specifier * extStorage;
794 struct Symbol * symbol;
796 } __attribute__ ((gcc_struct));
800 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
802 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
804 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
808 struct Initializer * prev;
809 struct Initializer * next;
814 struct Expression * exp;
815 struct __ecereNameSpace__ecere__sys__OldList * list;
816 } __attribute__ ((gcc_struct)) __anon1;
817 unsigned int isConstant;
818 struct Identifier * id;
819 } __attribute__ ((gcc_struct));
821 struct FunctionDefinition;
823 extern struct FunctionDefinition * _MkFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * declarationList, unsigned int errorOnOmit);
825 struct FunctionDefinition
827 struct FunctionDefinition * prev;
828 struct FunctionDefinition * next;
830 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
831 struct Declarator * declarator;
832 struct __ecereNameSpace__ecere__sys__OldList * declarations;
833 struct Statement * body;
834 struct __ecereNameSpace__ecere__com__Class * _class;
835 struct __ecereNameSpace__ecere__sys__OldList attached;
838 struct Symbol * propSet;
840 unsigned int propertyNoThis;
841 } __attribute__ ((gcc_struct));
843 extern void ProcessFunctionBody(struct FunctionDefinition * func, struct Statement * body);
845 extern struct External * MkExternalFunction(struct FunctionDefinition * function);
851 struct TypeName * prev;
852 struct TypeName * next;
854 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
855 struct Declarator * declarator;
857 struct Expression * bitCount;
858 } __attribute__ ((gcc_struct));
860 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
862 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
864 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
868 struct Expression * prev;
869 struct Expression * next;
877 struct Identifier * identifier;
878 } __attribute__ ((gcc_struct)) __anon1;
879 struct Statement * compound;
880 struct Instantiation * instance;
884 unsigned int intlString;
885 unsigned int wideString;
886 } __attribute__ ((gcc_struct)) __anon2;
887 struct __ecereNameSpace__ecere__sys__OldList * list;
890 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
891 struct Declarator * decl;
892 } __attribute__ ((gcc_struct)) _classExp;
895 struct Identifier * id;
896 } __attribute__ ((gcc_struct)) classData;
899 struct Expression * exp;
900 struct __ecereNameSpace__ecere__sys__OldList * arguments;
901 struct Location argLoc;
902 } __attribute__ ((gcc_struct)) call;
905 struct Expression * exp;
906 struct __ecereNameSpace__ecere__sys__OldList * index;
907 } __attribute__ ((gcc_struct)) index;
910 struct Expression * exp;
911 struct Identifier * member;
913 unsigned int thisPtr;
914 } __attribute__ ((gcc_struct)) member;
918 struct Expression * exp1;
919 struct Expression * exp2;
920 } __attribute__ ((gcc_struct)) op;
921 struct TypeName * typeName;
922 struct Specifier * _class;
925 struct TypeName * typeName;
926 struct Expression * exp;
927 } __attribute__ ((gcc_struct)) cast;
930 struct Expression * cond;
931 struct __ecereNameSpace__ecere__sys__OldList * exp;
932 struct Expression * elseExp;
933 } __attribute__ ((gcc_struct)) cond;
936 struct TypeName * typeName;
937 struct Expression * size;
938 } __attribute__ ((gcc_struct)) _new;
941 struct TypeName * typeName;
942 struct Expression * size;
943 struct Expression * exp;
944 } __attribute__ ((gcc_struct)) _renew;
948 struct Identifier * id;
949 } __attribute__ ((gcc_struct)) db;
952 struct Expression * ds;
953 struct Expression * name;
954 } __attribute__ ((gcc_struct)) dbopen;
957 struct TypeName * typeName;
958 struct Initializer * initializer;
959 } __attribute__ ((gcc_struct)) initializer;
962 struct Expression * exp;
963 struct TypeName * typeName;
964 } __attribute__ ((gcc_struct)) vaArg;
965 } __attribute__ ((gcc_struct)) __anon1;
966 unsigned int debugValue;
967 struct __ecereNameSpace__ecere__com__DataValue val;
969 unsigned int hasAddress;
970 struct Type * expType;
971 struct Type * destType;
974 unsigned int byReference;
975 unsigned int isConstant;
976 unsigned int addedThis;
977 unsigned int needCast;
978 unsigned int thisPtr;
979 unsigned int opDestType;
980 unsigned int needTemplateCast;
981 } __attribute__ ((gcc_struct));
987 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
988 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
989 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
990 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
991 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
992 unsigned int (* Neg)(struct Expression *, struct Operand *);
993 unsigned int (* Inc)(struct Expression *, struct Operand *);
994 unsigned int (* Dec)(struct Expression *, struct Operand *);
995 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
996 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
997 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
998 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
999 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1000 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1001 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1002 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1003 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1004 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1005 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1006 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1007 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1008 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1009 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1010 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1011 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1012 unsigned int (* Not)(struct Expression *, struct Operand *);
1013 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1014 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1015 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1016 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1017 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1018 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1019 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1020 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1021 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1022 } __attribute__ ((gcc_struct));
1028 unsigned int ptrSize;
1041 } __attribute__ ((gcc_struct)) __anon1;
1043 } __attribute__ ((gcc_struct));
1045 extern struct Operand GetOperand(struct Expression * exp);
1047 struct __ecereNameSpace__ecere__sys__BinaryTree;
1049 struct __ecereNameSpace__ecere__sys__BinaryTree
1051 struct __ecereNameSpace__ecere__sys__BTNode * root;
1053 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
1054 void (* FreeKey)(void * key);
1055 } __attribute__ ((gcc_struct));
1057 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
1059 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
1061 struct TemplateParameter;
1065 struct Specifier * prev;
1066 struct Specifier * next;
1067 struct Location loc;
1074 struct ExtDecl * extDecl;
1076 struct Symbol * symbol;
1077 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
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 int classObjectType;
1139 unsigned int offset;
1142 unsigned int isSigned : 1;
1143 unsigned int constant : 1;
1144 unsigned int truth : 1;
1145 unsigned int byReference : 1;
1146 unsigned int extraParam : 1;
1147 unsigned int directClassAccess : 1;
1148 unsigned int computing : 1;
1149 unsigned int keepCast : 1;
1150 unsigned int passAsTemplate : 1;
1151 unsigned int dllExport : 1;
1152 unsigned int attrStdcall : 1;
1153 unsigned int declaredWithStruct : 1;
1154 unsigned int typedByReference : 1;
1155 unsigned int casted : 1;
1156 unsigned int pointerAlignment : 1;
1157 } __attribute__ ((gcc_struct));
1159 unsigned int __ecereProp_Type_Get_isPointerTypeSize(struct Type * this);
1161 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
1163 struct __ecereNameSpace__ecere__com__Module;
1165 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);
1167 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
1169 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
1171 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);
1173 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);
1175 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
1177 struct __ecereNameSpace__ecere__com__DataMember;
1179 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1185 const char * dataTypeString;
1186 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1187 } __attribute__ ((gcc_struct)) __anon1;
1188 struct __ecereNameSpace__ecere__com__DataValue expression;
1191 const char * memberString;
1194 struct __ecereNameSpace__ecere__com__DataMember * member;
1195 struct __ecereNameSpace__ecere__com__Property * prop;
1196 struct __ecereNameSpace__ecere__com__Method * method;
1197 } __attribute__ ((gcc_struct)) __anon1;
1198 } __attribute__ ((gcc_struct)) __anon2;
1199 } __attribute__ ((gcc_struct)) __anon1;
1200 } __attribute__ ((gcc_struct));
1202 struct __ecereNameSpace__ecere__com__DataMember
1204 struct __ecereNameSpace__ecere__com__DataMember * prev;
1205 struct __ecereNameSpace__ecere__com__DataMember * next;
1207 unsigned int isProperty;
1210 struct __ecereNameSpace__ecere__com__Class * _class;
1211 const char * dataTypeString;
1212 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1213 struct Type * dataType;
1217 struct __ecereNameSpace__ecere__sys__OldList members;
1218 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
1220 short structAlignment;
1221 short pointerAlignment;
1222 } __attribute__ ((gcc_struct));
1224 extern struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param);
1226 struct __ecereNameSpace__ecere__com__BitMember;
1228 struct __ecereNameSpace__ecere__com__BitMember
1230 struct __ecereNameSpace__ecere__com__BitMember * prev;
1231 struct __ecereNameSpace__ecere__com__BitMember * next;
1233 unsigned int isProperty;
1236 struct __ecereNameSpace__ecere__com__Class * _class;
1237 const char * dataTypeString;
1238 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1239 struct Type * dataType;
1244 } __attribute__ ((gcc_struct));
1246 struct __ecereNameSpace__ecere__com__ClassProperty;
1248 struct __ecereNameSpace__ecere__com__ClassProperty
1251 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1252 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1253 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1255 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1256 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1257 const char * dataTypeString;
1258 struct Type * dataType;
1259 unsigned int constant;
1260 } __attribute__ ((gcc_struct));
1262 struct ClassDefinition;
1266 struct External * prev;
1267 struct External * next;
1268 struct Location loc;
1270 struct Symbol * symbol;
1273 struct FunctionDefinition * function;
1274 struct ClassDefinition * _class;
1275 struct Declaration * declaration;
1276 char * importString;
1277 struct Identifier * id;
1278 struct DBTableDef * table;
1279 } __attribute__ ((gcc_struct)) __anon1;
1281 struct External * fwdDecl;
1282 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1283 struct __ecereNameSpace__ecere__com__Instance * incoming;
1284 int nonBreakableIncoming;
1285 } __attribute__ ((gcc_struct));
1289 struct Context * parent;
1290 struct __ecereNameSpace__ecere__sys__BinaryTree types;
1291 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1292 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
1293 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
1296 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
1297 struct ClassDefinition * classDef;
1298 unsigned int templateTypesOnly;
1299 unsigned int hasNameSpace;
1300 } __attribute__ ((gcc_struct));
1302 struct ClassDefinition
1304 struct ClassDefinition * prev;
1305 struct ClassDefinition * next;
1306 struct Location loc;
1307 struct Specifier * _class;
1308 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1309 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1310 struct Symbol * symbol;
1311 struct Location blockStart;
1312 struct Location nameLoc;
1314 unsigned int deleteWatchable;
1315 } __attribute__ ((gcc_struct));
1317 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
1323 struct Enumerator * prev;
1324 struct Enumerator * next;
1325 struct Location loc;
1326 struct Identifier * id;
1327 struct Expression * exp;
1328 } __attribute__ ((gcc_struct));
1330 struct TemplateArgument;
1332 struct TemplateParameter
1334 struct TemplateParameter * prev;
1335 struct TemplateParameter * next;
1336 struct Location loc;
1338 struct Identifier * identifier;
1341 struct TemplateDatatype * dataType;
1343 } __attribute__ ((gcc_struct)) __anon1;
1344 struct TemplateArgument * defaultArgument;
1345 const char * dataTypeString;
1346 struct Type * baseType;
1347 } __attribute__ ((gcc_struct));
1349 struct TemplateArgument
1351 struct TemplateArgument * prev;
1352 struct TemplateArgument * next;
1353 struct Location loc;
1354 struct Identifier * name;
1358 struct Expression * expression;
1359 struct Identifier * identifier;
1360 struct TemplateDatatype * templateDatatype;
1361 } __attribute__ ((gcc_struct)) __anon1;
1362 } __attribute__ ((gcc_struct));
1366 typedef union YYSTYPE
1371 struct Identifier * id;
1372 struct Expression * exp;
1373 struct Specifier * specifier;
1374 struct __ecereNameSpace__ecere__sys__OldList * list;
1375 struct Enumerator * enumerator;
1376 struct Declarator * declarator;
1377 struct Pointer * pointer;
1378 struct Initializer * initializer;
1379 struct InitDeclarator * initDeclarator;
1380 struct TypeName * typeName;
1381 struct Declaration * declaration;
1382 struct Statement * stmt;
1383 struct FunctionDefinition * function;
1384 struct External * external;
1385 struct Context * context;
1386 struct AsmField * asmField;
1387 struct Attrib * attrib;
1388 struct ExtDecl * extDecl;
1389 struct Attribute * attribute;
1390 struct Instantiation * instance;
1391 struct MembersInit * membersInit;
1392 struct MemberInit * memberInit;
1393 struct ClassFunction * classFunction;
1394 struct ClassDefinition * _class;
1395 struct ClassDef * classDef;
1396 struct PropertyDef * prop;
1398 struct Symbol * symbol;
1399 struct PropertyWatch * propertyWatch;
1400 struct TemplateParameter * templateParameter;
1401 struct TemplateArgument * templateArgument;
1402 struct TemplateDatatype * templateDatatype;
1403 struct DBTableEntry * dbtableEntry;
1404 struct DBIndexItem * dbindexItem;
1405 struct DBTableDef * dbtableDef;
1406 } __attribute__ ((gcc_struct)) YYSTYPE;
1408 extern YYSTYPE yylval;
1412 struct ClassDef * prev;
1413 struct ClassDef * next;
1414 struct Location loc;
1418 struct Declaration * decl;
1419 struct ClassFunction * function;
1420 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1421 struct PropertyDef * propertyDef;
1422 struct PropertyWatch * propertyWatch;
1424 struct Identifier * defaultProperty;
1427 struct Identifier * id;
1428 struct Initializer * initializer;
1429 } __attribute__ ((gcc_struct)) __anon1;
1430 } __attribute__ ((gcc_struct)) __anon1;
1433 } __attribute__ ((gcc_struct));
1435 extern struct ClassDef * MkClassDefFunction(struct ClassFunction * function);
1437 struct __ecereNameSpace__ecere__com__NameSpace;
1439 struct __ecereNameSpace__ecere__com__NameSpace
1442 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1443 struct __ecereNameSpace__ecere__com__NameSpace * left;
1444 struct __ecereNameSpace__ecere__com__NameSpace * right;
1446 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1447 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1448 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1449 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1450 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1451 } __attribute__ ((gcc_struct));
1453 struct __ecereNameSpace__ecere__com__Class
1455 struct __ecereNameSpace__ecere__com__Class * prev;
1456 struct __ecereNameSpace__ecere__com__Class * next;
1462 unsigned int (* Constructor)(void * );
1463 void (* Destructor)(void * );
1466 struct __ecereNameSpace__ecere__com__Class * base;
1467 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
1468 struct __ecereNameSpace__ecere__sys__BinaryTree members;
1469 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
1470 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
1471 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
1472 struct __ecereNameSpace__ecere__sys__OldList derivatives;
1476 struct __ecereNameSpace__ecere__com__Instance * module;
1477 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
1478 const char * dataTypeString;
1479 struct Type * dataType;
1481 int defaultAlignment;
1482 void (* Initialize)();
1484 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
1485 const char * designerClass;
1486 unsigned int noExpansion;
1487 const char * defaultProperty;
1488 unsigned int comRedefinition;
1491 unsigned int internalDecl;
1493 unsigned int computeSize;
1494 short structAlignment;
1495 short pointerAlignment;
1496 int destructionWatchOffset;
1498 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
1499 int inheritanceAccess;
1500 const char * fullName;
1502 struct __ecereNameSpace__ecere__sys__OldList conversions;
1503 struct __ecereNameSpace__ecere__sys__OldList templateParams;
1504 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
1505 struct __ecereNameSpace__ecere__com__Class * templateClass;
1506 struct __ecereNameSpace__ecere__sys__OldList templatized;
1508 unsigned int isInstanceClass;
1509 unsigned int byValueSystemClass;
1510 } __attribute__ ((gcc_struct));
1512 struct __ecereNameSpace__ecere__com__Application
1515 const char * * argv;
1517 unsigned int isGUIApp;
1518 struct __ecereNameSpace__ecere__sys__OldList allModules;
1519 char * parsedCommand;
1520 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
1521 } __attribute__ ((gcc_struct));
1523 void GetNameSpaceString(struct __ecereNameSpace__ecere__com__NameSpace * ns, char * string)
1526 GetNameSpaceString(ns->parent, string);
1529 strcat(string, ns->name);
1530 strcat(string, "::");
1534 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassPropertyValue;
1536 struct External * ProcessClassFunction(struct __ecereNameSpace__ecere__com__Class * owningClass, struct ClassFunction * func, struct __ecereNameSpace__ecere__sys__OldList * defs, struct External * after, unsigned int makeStatic)
1538 struct Type * type = (((void *)0));
1539 struct Symbol * symbol;
1540 struct External * external = (((void *)0));
1542 if(defs && func->declarator)
1544 struct FunctionDefinition * function = (((void *)0));
1545 struct Symbol * propSymbol;
1549 if(!func->specifiers)
1550 func->specifiers = MkList();
1553 struct Specifier * s;
1555 for(s = (*func->specifiers).first; s; s = s->next)
1556 if(s->type == 0 && s->__anon1.specifier == STATIC)
1559 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*func->specifiers), (((void *)0)), MkSpecifier(STATIC));
1562 propSymbol = func->declarator->symbol;
1563 ReplaceThisClassSpecifiers(func->specifiers, owningClass);
1564 if(propSymbol->__anon2.__anon2.externalGet == (struct External *)func)
1565 func->declarator->symbol = (((void *)0));
1566 else if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func)
1567 func->declarator->symbol = (((void *)0));
1568 else if(propSymbol->__anon2.__anon2.externalIsSet == (struct External *)func)
1569 func->declarator->symbol = (((void *)0));
1571 function = _MkFunction(func->specifiers, func->declarator, (((void *)0)), 0);
1572 function->propSet = func->propSet;
1573 function->type = func->type;
1575 func->type->refCount++;
1576 ProcessFunctionBody(function, func->body);
1577 external = MkExternalFunction(function);
1580 char className[1024];
1582 strcpy(className, "__ecereClass_");
1583 FullClassNameCat(className, owningClass->fullName, 1);
1584 DeclareClass(external, owningClass->symbol, className);
1586 external->symbol = func->declarator->symbol;
1587 external->__anon1.function->_class = func->_class;
1589 symbol = func->declarator->symbol;
1590 if(!func->dontMangle)
1592 struct __ecereNameSpace__ecere__com__Method * method = func->declarator->symbol->__anon1.method;
1594 func->declarator->symbol->__anon2.__anon3.methodExternal = external;
1595 if(method && method->symbol)
1596 ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal = external;
1597 if(method && method->type == 1)
1599 struct Type * methodDataType;
1601 ProcessMethodType(method);
1602 methodDataType = method->dataType;
1603 type = symbol->type;
1604 if(!type->__anon1.__anon2.staticMethod && !type->__anon1.__anon2.thisClass && !type->__anon1.__anon2.thisClassTemplate)
1606 if(method->dataType->__anon1.__anon2.thisClassTemplate)
1608 if(owningClass->templateArgs)
1610 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = FindTemplateArg(owningClass, method->dataType->__anon1.__anon2.thisClassTemplate);
1612 type->byReference = method->dataType->byReference;
1613 methodDataType = ProcessTypeString(method->dataTypeString, 0);
1614 type->__anon1.__anon2.thisClass = methodDataType->__anon1.__anon2.thisClass = arg ? FindClass((*arg).__anon1.__anon1.dataTypeString) : (((void *)0));
1617 else if(method->dataType->__anon1.__anon2.staticMethod)
1618 type->__anon1.__anon2.staticMethod = 1;
1619 else if(method->dataType->__anon1.__anon2.thisClass)
1621 type->__anon1.__anon2.thisClass = method->dataType->__anon1.__anon2.thisClass;
1622 type->byReference = method->dataType->byReference;
1626 if(!owningClass->symbol)
1627 owningClass->symbol = FindClass(owningClass->fullName);
1628 type->__anon1.__anon2.thisClass = owningClass->symbol;
1629 type->extraParam = 1;
1633 if(!MatchTypes(type, methodDataType, (((void *)0)), owningClass, method->_class, 1, 1, 1, 0, 1))
1635 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Incompatible virtual function %s\n", (((void *)0))), method->name);
1639 struct Type * typeParam;
1640 struct Declarator * funcDecl = GetFuncDecl(func->declarator);
1642 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).first)
1644 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
1646 for(typeParam = methodDataType->__anon1.__anon2.params.first; typeParam && param; typeParam = typeParam->next)
1648 if(typeParam->classObjectType)
1650 param->classObjectType = typeParam->classObjectType;
1651 if(param->declarator && param->declarator->symbol)
1652 param->declarator->symbol->type->classObjectType = typeParam->classObjectType;
1654 param = param ? param->next : (((void *)0));
1658 if(methodDataType != method->dataType)
1659 FreeType(methodDataType);
1663 type = symbol->type;
1664 if(!type->__anon1.__anon2.staticMethod && !type->__anon1.__anon2.thisClass)
1666 if(owningClass && !owningClass->symbol)
1667 owningClass->symbol = FindClass(owningClass->fullName);
1668 type->__anon1.__anon2.thisClass = owningClass ? FindClass(owningClass->fullName) : (((void *)0));
1674 if(symbol->type && !symbol->type->__anon1.__anon2.staticMethod && !symbol->type->__anon1.__anon2.thisClass)
1676 if(!owningClass->symbol)
1677 owningClass->symbol = FindClass(owningClass->fullName);
1678 symbol->type->__anon1.__anon2.thisClass = owningClass->symbol;
1680 if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func && propSymbol->__anon1._property && propSymbol->__anon1._property->conversion)
1682 if(symbol->type->__anon1.__anon2.thisClass && symbol->type->classObjectType != 1)
1684 if(owningClass->type != 1)
1685 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
1688 if(propSymbol->__anon2.__anon2.externalGet == (struct External *)func)
1690 propSymbol->__anon2.__anon2.externalGet = external;
1692 else if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func)
1694 propSymbol->__anon2.__anon2.externalSet = external;
1696 else if(propSymbol->__anon2.__anon2.externalIsSet == (struct External *)func)
1698 propSymbol->__anon2.__anon2.externalIsSet = external;
1708 func->declarator = (((void *)0));
1709 func->specifiers = (((void *)0));
1710 func->body = (((void *)0));
1711 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, external);
1715 struct __ecereNameSpace__ecere__com__Method * method = func->declarator->symbol->__anon1.method;
1717 if(method && method->symbol)
1718 ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal = (((void *)0));
1719 if(func->declarator->symbol && func->declarator->symbol->__anon2.__anon3.methodExternal == external)
1720 func->declarator->symbol->__anon2.__anon3.methodExternal = (((void *)0));
1721 func->declarator = (((void *)0));
1722 func->specifiers = (((void *)0));
1723 FreeExternal(external);
1728 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1729 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1730 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, external);
1731 external->__anon1.function->declarator = CopyDeclarator(external->__anon1.function->declarator);
1732 external->__anon1.function->specifiers = CopyList(external->__anon1.function->specifiers, (void *)(CopySpecifier));
1733 external->__anon1.function->body = (((void *)0));
1739 void RegisterMembersAndProperties(struct __ecereNameSpace__ecere__com__Class * regClass, unsigned int isMember, const char * className, struct Statement * statement)
1741 struct __ecereNameSpace__ecere__com__DataMember * dataMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)regClass : (((void *)0));
1742 struct __ecereNameSpace__ecere__com__DataMember * member;
1743 struct __ecereNameSpace__ecere__com__Property * prop;
1744 struct Expression * exp;
1745 struct Statement * stmt;
1746 char dataMemberSize[16];
1747 unsigned int lastOffset = 0;
1749 unsigned int privateMembers = 0;
1751 sprintf(dataMemberSize, "%d", (int)sizeof(struct __ecereNameSpace__ecere__com__DataMember *));
1754 for(prop = regClass->conversions.first; prop; prop = prop->next)
1756 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1759 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1760 ListAdd(args, MkExpConstant("0"));
1762 char * string = QMkString(prop->dataTypeString);
1764 ListAdd(args, MkExpString(string));
1765 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1769 strcpy(name, "__ecereProp_");
1770 FullClassNameCat(name, regClass->fullName, 0);
1771 strcat(name, "_Set_");
1772 FullClassNameCat(name, prop->name, 1);
1773 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1776 ListAdd(args, MkExpConstant("0"));
1779 strcpy(name, "__ecereProp_");
1780 FullClassNameCat(name, regClass->fullName, 0);
1781 strcat(name, "_Get_");
1782 FullClassNameCat(name, prop->name, 1);
1783 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1786 ListAdd(args, MkExpConstant("0"));
1787 switch(prop->memberAccess)
1790 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1793 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1797 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1800 strcpy(name, "__ecereProp_");
1801 FullClassNameCat(name, regClass->fullName, 0);
1803 FullClassNameCat(name, prop->name, 1);
1804 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args))));
1805 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1808 for(member = isMember ? dataMember->members.first : regClass->membersAndProperties.first; member; member = member->next)
1810 if(member->isProperty)
1812 prop = (struct __ecereNameSpace__ecere__com__Property *)member;
1814 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1815 char name[1024], nameM[1024];
1816 char * string = QMkString(prop->name);
1818 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1819 ListAdd(args, MkExpString(string));
1820 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1822 char * string = QMkString(prop->dataTypeString);
1824 ListAdd(args, MkExpString(string));
1825 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1829 strcpy(name, "__ecereProp_");
1830 FullClassNameCat(name, regClass->fullName, 0);
1831 strcat(name, "_Set_");
1832 FullClassNameCat(name, prop->name, 1);
1833 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1836 ListAdd(args, MkExpConstant("0"));
1839 strcpy(name, "__ecereProp_");
1840 FullClassNameCat(name, regClass->fullName, 0);
1841 strcat(name, "_Get_");
1842 FullClassNameCat(name, prop->name, 1);
1843 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1846 ListAdd(args, MkExpConstant("0"));
1847 switch(prop->memberAccess)
1850 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1853 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1857 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1860 strcpy(name, "__ecereProp_");
1861 FullClassNameCat(name, regClass->fullName, 0);
1863 FullClassNameCat(name, prop->name, 1);
1864 strcpy(nameM, "__ecerePropM_");
1865 FullClassNameCat(nameM, regClass->fullName, 0);
1867 FullClassNameCat(nameM, prop->name, 1);
1868 if(prop->dataTypeString)
1870 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args))));
1874 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args)));
1876 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1881 strcpy(name, "__ecereProp_");
1882 FullClassNameCat(name, regClass->fullName, 1);
1883 strcat(name, "_IsSet_");
1884 FullClassNameCat(name, prop->name, 0);
1885 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))))));
1886 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1888 if(prop->symbol && ((struct Symbol *)prop->symbol)->propCategory)
1890 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier(nameM)), MkIdentifier("category")), '=', CopyExpression(((struct Symbol *)prop->symbol)->propCategory))));
1891 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1893 if(prop->dataTypeString)
1895 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
1897 ListAdd(list, MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', MkExpIdentifier(MkIdentifier(nameM))));
1898 ListAdd(list, MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0"))));
1899 stmt = MkIfStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("module")), MkIdentifier("application")), EQ_OP, MkExpMember(MkExpIdentifier(MkIdentifier("__thisModule")), MkIdentifier("application")))), MkExpressionStmt(list), (((void *)0)));
1900 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1901 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")))));
1902 ListAdd(unregisterModuleBody->__anon1.compound.statements, stmt);
1906 else if(member->type == 0 && !isMember && regClass->type == 2)
1908 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)member;
1909 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1911 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1913 char * string = QMkString(bitMember->name);
1915 ListAdd(args, MkExpString(string));
1916 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1919 char * string = QMkString(bitMember->dataTypeString);
1921 ListAdd(args, MkExpString(string));
1922 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1927 sprintf(string, "%d", bitMember->size);
1928 ListAdd(args, (exp = MkExpConstant(string)));
1933 sprintf(string, "%d", bitMember->pos);
1934 ListAdd(args, (exp = MkExpConstant(string)));
1936 switch(member->memberAccess)
1939 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1942 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1946 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1949 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddBitMember")), args)));
1950 ListAdd(statement->__anon1.compound.statements, stmt);
1952 else if(member->memberAccess == 1 || (member->type == 0 && !member->dataTypeString))
1954 struct __ecereNameSpace__ecere__sys__OldList * args;
1958 unsigned int offset = member->offset - lastOffset;
1961 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1965 sprintf(string, "\"__ecerePrivateData%d\"", privateID++);
1966 ListAdd(args, MkExpString(string));
1971 sprintf(string, "\"byte[%d]\"", offset);
1972 ListAdd(args, MkExpString(string));
1977 sprintf(string, "%d", offset);
1978 ListAdd(args, (exp = MkExpConstant(string)));
1980 ListAdd(args, (exp = MkExpConstant("1")));
1981 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1982 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier(isMember ? "eMember_AddDataMember" : "eClass_AddDataMember")), args)));
1983 ListAdd(statement->__anon1.compound.statements, stmt);
1986 if(member->type == 0)
1988 if(!member->dataType)
1989 member->dataType = ProcessTypeString(member->dataTypeString, 0);
1990 ComputeTypeSize(member->dataType);
1992 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1994 char * string = QMkString(member->name);
1996 ListAdd(args, MkExpString(string));
1997 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2000 char * string = QMkString(member->dataTypeString);
2002 ListAdd(args, MkExpString(string));
2003 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2006 if(__ecereProp_Type_Get_isPointerTypeSize(member->dataType))
2008 ListAdd(args, (exp = MkExpTypeSize(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))))));
2009 ListAdd(args, (exp = MkExpConstant("0xF000F000")));
2015 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))
2018 DeclareStruct(registerModuleExternal, member->dataType->__anon1._class->string, 0, 1);
2019 FullClassNameCat(string, member->dataType->__anon1._class->string, 0);
2020 exp = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(string), (((void *)0)))), (((void *)0))));
2024 sprintf(string, "%d", member->dataType->size);
2025 exp = MkExpConstant(string);
2028 if(member->dataType->pointerAlignment)
2029 exp = MkExpConstant("0xF000F000");
2032 sprintf(string, "%d", member->dataType->alignment);
2033 exp = MkExpConstant(string);
2038 switch(member->memberAccess)
2041 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2044 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2048 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2051 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier(isMember ? "eMember_AddDataMember" : "eClass_AddDataMember")), args)));
2052 ListAdd(statement->__anon1.compound.statements, stmt);
2053 lastOffset = member->offset + member->dataType->size;
2057 static int memberCount = 0;
2058 struct Context * context;
2059 struct Statement * compound;
2060 char memberName[256];
2062 sprintf(memberName, "dataMember%d", memberCount);
2064 curContext = statement->__anon1.compound.context;
2065 context = PushContext();
2066 args = MkListOne(MkExpIdentifier(MkIdentifier((member->type == 1) ? "unionMember" : "structMember")));
2067 switch(member->memberAccess)
2070 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2073 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2077 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2080 compound = MkCompoundStmt(MkListOne(MkDeclaration(MkListOne(MkSpecifierName("DataMember")), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(memberName)), MkInitializerAssignment(MkExpCall(MkExpIdentifier(MkIdentifier("eMember_New")), args)))))), MkList());
2081 compound->__anon1.compound.context = context;
2083 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
2084 ListAdd(args, MkExpIdentifier(MkIdentifier(memberName)));
2085 RegisterMembersAndProperties((struct __ecereNameSpace__ecere__com__Class *)member, 1, memberName, compound);
2087 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eMember_AddMember")), args)));
2089 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMember")), args)));
2090 ListAdd(compound->__anon1.compound.statements, stmt);
2091 PopContext(context);
2092 ListAdd(statement->__anon1.compound.statements, compound);
2094 lastOffset = member->offset + member->memberOffset;
2102 struct __ecereNameSpace__ecere__com__ClassProperty * classProperty;
2104 for(prop = regClass->membersAndProperties.first; prop; prop = prop->next)
2106 if(prop->isProperty && prop->isWatchable)
2108 struct __ecereNameSpace__ecere__sys__OldList * args;
2109 char name[1024], nameM[1024];
2111 strcpy(name, "__ecereProp_");
2112 FullClassNameCat(name, regClass->fullName, 1);
2114 FullClassNameCat(name, prop->name, 0);
2115 strcpy(nameM, "__ecerePropM_");
2116 FullClassNameCat(nameM, regClass->fullName, 1);
2118 FullClassNameCat(nameM, prop->name, 0);
2119 args = MkListOne(MkExpCondition(MkExpIdentifier(MkIdentifier(nameM)), MkListOne(MkExpIdentifier(MkIdentifier(nameM))), MkExpIdentifier(MkIdentifier(name))));
2120 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eProperty_Watchable")), args)));
2121 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2124 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)))
2126 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2128 char * string = QMkString(classProperty->name);
2130 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
2131 ListAdd(args, MkExpString(string));
2132 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2134 char * string = QMkString(classProperty->dataTypeString);
2136 ListAdd(args, MkExpString(string));
2137 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2139 if(classProperty->Set)
2141 strcpy(name, "__ecereClassProp_");
2142 FullClassNameCat(name, regClass->fullName, 1);
2143 strcat(name, "_Set_");
2144 strcat(name, classProperty->name);
2145 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
2148 ListAdd(args, MkExpConstant("0"));
2149 if(classProperty->Get)
2151 strcpy(name, "__ecereClassProp_");
2152 FullClassNameCat(name, regClass->fullName, 1);
2153 strcat(name, "_Get_");
2154 strcat(name, classProperty->name);
2155 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
2158 ListAdd(args, MkExpConstant("0"));
2159 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddClassProperty")), args)));
2160 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2165 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
2167 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
2169 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
2171 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List_TPL_ClassPropertyValue_;
2173 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__TemplateMemberType;
2175 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List;
2177 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2179 struct __ecereNameSpace__ecere__com__Module
2181 struct __ecereNameSpace__ecere__com__Instance * application;
2182 struct __ecereNameSpace__ecere__sys__OldList classes;
2183 struct __ecereNameSpace__ecere__sys__OldList defines;
2184 struct __ecereNameSpace__ecere__sys__OldList functions;
2185 struct __ecereNameSpace__ecere__sys__OldList modules;
2186 struct __ecereNameSpace__ecere__com__Instance * prev;
2187 struct __ecereNameSpace__ecere__com__Instance * next;
2193 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
2194 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
2195 } __attribute__ ((gcc_struct));
2197 void __ecereDestructor_ClassPropertyValue(struct __ecereNameSpace__ecere__com__Instance * this)
2199 __attribute__((unused)) struct ClassPropertyValue * __ecerePointer_ClassPropertyValue = (struct ClassPropertyValue *)(this ? (((char *)this) + __ecereClass_ClassPropertyValue->offset) : 0);
2202 FreeIdentifier(__ecerePointer_ClassPropertyValue->id);
2206 void CreateRegisterModuleBody()
2208 if(!registerModuleBody && inCompiler)
2210 char registerName[1024], moduleName[274];
2211 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
2212 struct Declarator * declarator;
2213 struct TypeName * moduleParam;
2215 registerModuleBody = MkCompoundStmt(MkList(), MkList());
2216 registerModuleBody->__anon1.compound.context = __extension__ ({
2217 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
2219 __ecereInstance1->parent = globalContext, __ecereInstance1;
2221 ListAdd(registerModuleBody->__anon1.compound.declarations, MkDeclaration((specifiers = MkListOne(MkSpecifierName("ecere::com::Class"))), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("class")), (((void *)0))))));
2222 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
2223 specifiers = MkList();
2224 ListAdd(specifiers, MkSpecifier(VOID));
2225 moduleParam = MkTypeName(MkListOne(MkSpecifierName("Module")), MkDeclaratorIdentifier(MkIdentifier("module")));
2226 __ecereNameSpace__ecere__sys__GetLastDirectory(outputFile, moduleName);
2227 __ecereNameSpace__ecere__sys__StripExtension(moduleName);
2228 FixModuleName(moduleName);
2229 sprintf(registerName, "__ecereRegisterModule_%s", moduleName);
2230 declarator = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(registerName)), MkListOne(moduleParam));
2232 struct FunctionDefinition * function = _MkFunction(specifiers, declarator, (((void *)0)), 0);
2234 ProcessFunctionBody(function, registerModuleBody);
2235 function->declMode = 0;
2238 ListAdd(ast, (registerModuleExternal = MkExternalFunction(function)));
2239 DeclareStruct(registerModuleExternal, "ecere::com::Instance", 0, 1);
2240 DeclareStruct(registerModuleExternal, "ecere::com::Module", 0, 1);
2243 if(!unregisterModuleBody && inCompiler)
2245 char registerName[1024], moduleName[274];
2246 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
2247 struct Declarator * declarator;
2248 struct TypeName * moduleParam;
2250 unregisterModuleBody = MkCompoundStmt(MkList(), MkList());
2251 unregisterModuleBody->__anon1.compound.context = __extension__ ({
2252 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
2254 __ecereInstance1->parent = globalContext, __ecereInstance1;
2256 specifiers = MkList();
2257 ListAdd(specifiers, MkSpecifier(VOID));
2258 moduleParam = MkTypeName(MkListOne(MkSpecifierName("Module")), MkDeclaratorIdentifier(MkIdentifier("module")));
2259 __ecereNameSpace__ecere__sys__GetLastDirectory(outputFile, moduleName);
2260 __ecereNameSpace__ecere__sys__StripExtension(moduleName);
2261 FixModuleName(moduleName);
2262 sprintf(registerName, "__ecereUnregisterModule_%s", moduleName);
2263 declarator = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(registerName)), MkListOne(moduleParam));
2265 struct FunctionDefinition * function = _MkFunction(specifiers, declarator, (((void *)0)), 0);
2267 ProcessFunctionBody(function, unregisterModuleBody);
2268 function->declMode = 0;
2271 ListAdd(ast, (unregisterModuleExternal = MkExternalFunction(function)));
2272 DeclareStruct(unregisterModuleExternal, "ecere::com::Instance", 0, 1);
2273 DeclareStruct(unregisterModuleExternal, "ecere::com::Module", 0, 1);
2278 void __ecereCreateModuleInstances_pass1()
2280 classPropValues = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__com__List_TPL_ClassPropertyValue_);
2281 __ecereNameSpace__ecere__com__eInstance_IncRef(classPropValues);
2284 void __ecereUnregisterModule_pass1(struct __ecereNameSpace__ecere__com__Instance * module)
2289 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)
2291 struct ClassDef * def;
2292 struct __ecereNameSpace__ecere__com__Class * regClass = symbol->__anon1.registered;
2296 classType = regClass->type;
2297 if(classType == 4 && enumValues && (inCompiler || !buildingECERECOMModule))
2299 struct Enumerator * e;
2301 for(e = enumValues->first; e; e = e->next)
2305 struct Type * destType = (destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), destType->kind = 4, destType->refCount = 1, destType);
2307 e->exp->destType = destType;
2309 ProcessExpressionType(e->exp);
2311 if(!e->exp->expType)
2314 destType->__anon1._class = symbol;
2315 ProcessExpressionType(e->exp);
2317 if(e->exp->type == 0 && e->exp->expType && e->exp->__anon1.__anon1.identifier && e->exp->__anon1.__anon1.identifier->string && e->exp->expType->kind == 15)
2319 struct __ecereNameSpace__ecere__sys__NamedLink64 * l;
2320 char * string = e->exp->__anon1.__anon1.identifier->string;
2322 for(l = e->exp->expType->__anon1.__anon1.members.first; l; l = l->next)
2324 if(!strcmp(l->name, string))
2328 FreeExpContents(e->exp);
2330 e->exp->__anon1.__anon1.constant = PrintInt64(l->data);
2331 FreeType(e->exp->expType);
2332 e->exp->expType = ProcessTypeString("int64", 0);
2339 ComputeExpression(e->exp);
2340 if(e->exp->isConstant && e->exp->type == 2)
2342 struct Operand op = GetOperand(e->exp);
2348 value = op.type->isSigned ? (long long)op.__anon1.c : (long long)op.__anon1.uc;
2351 value = op.type->isSigned ? (long long)op.__anon1.s : (long long)op.__anon1.us;
2354 value = op.type->isSigned ? op.__anon1.i64 : (long long)op.__anon1.ui64;
2358 value = op.type->isSigned ? (long long)op.__anon1.i : (int)op.__anon1.ui;
2360 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(regClass, e->id->string, value);
2363 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2366 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2369 struct __ecereNameSpace__ecere__com__EnumClassData * baseData = regClass->data;
2370 struct __ecereNameSpace__ecere__sys__OldLink * deriv;
2372 for(deriv = regClass->derivatives.first; deriv; deriv = deriv->next)
2374 struct __ecereNameSpace__ecere__com__Class * c = deriv->data;
2376 if(c && c->type == 4)
2378 struct __ecereNameSpace__ecere__com__EnumClassData * data = c->data;
2380 data->largest = baseData->largest;
2385 if(definitions != (((void *)0)))
2389 for(def = definitions->first; def; def = def->next)
2391 if(def->type == 4 && def->__anon1.propertyWatch)
2393 struct PropertyWatch * propWatch = def->__anon1.propertyWatch;
2394 struct ClassFunction * func;
2395 char watcherName[1024];
2396 struct Identifier * propID;
2397 struct Statement * stmt = MkExpressionStmt(MkList());
2398 struct Declarator * decl;
2399 struct __ecereNameSpace__ecere__sys__OldList * specs;
2401 sprintf(watcherName, "__ecerePropertySelfWatcher_%d", propWatcherID++);
2402 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
2404 strcat(watcherName, "_");
2405 strcat(watcherName, propID->string);
2407 decl = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(watcherName)), MkListOne(MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0)))));
2409 ListAdd(specs, MkSpecifier(STATIC));
2410 ListAdd(specs, MkSpecifier(VOID));
2411 func = MkClassFunction(specs, (((void *)0)), decl, (((void *)0)));
2412 ProcessClassFunctionBody(func, propWatch->compound);
2413 decl->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2414 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), decl->symbol);
2415 func->dontMangle = 1;
2416 propWatch->compound = (((void *)0));
2417 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, (((void *)0)), MkClassDefFunction(func));
2418 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
2420 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(regClass, propID->string, privateModule);
2424 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2426 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2428 char * s = QMkString(propID->string);
2430 ListAdd(args, MkExpString(s));
2431 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2433 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
2434 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("eProperty_SelfWatch")), args));
2437 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, regClass->fullName);
2439 FreePropertyWatch(def->__anon1.propertyWatch);
2440 def->__anon1.propertyWatch = (struct PropertyWatch *)stmt;
2444 for(def = definitions->first; def; def = def->next)
2448 ProcessClassFunction(regClass, def->__anon1.function, defs, external->prev, declMode == 3);
2452 if(inCompiler && !symbol->notYetDeclared && regClass)
2454 struct Statement * stmt;
2455 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2456 struct __ecereNameSpace__ecere__com__Method * method;
2457 struct Expression * exp;
2458 const char * registerFunction = (((void *)0));
2459 int inheritanceAccess = 1;
2461 CreateRegisterModuleBody();
2462 curExternal = registerModuleExternal;
2463 switch(regClass->type)
2466 ListAdd(args, MkExpIdentifier(MkIdentifier("structClass")));
2469 ListAdd(args, MkExpIdentifier(MkIdentifier("bitClass")));
2472 ListAdd(args, MkExpIdentifier(MkIdentifier("enumClass")));
2475 ListAdd(args, MkExpIdentifier(MkIdentifier("noHeadClass")));
2478 ListAdd(args, MkExpIdentifier(MkIdentifier("unitClass")));
2481 ListAdd(args, MkExpIdentifier(MkIdentifier("normalClass")));
2485 char nameSpace[1024] = "";
2486 char className[1024] = "";
2489 GetNameSpaceString(regClass->nameSpace, nameSpace);
2492 __ecereNameSpace__ecere__sys__GetLastDirectory(sourceFile, className);
2493 __ecereNameSpace__ecere__sys__ChangeCh(className, '.', '_');
2494 strcat(className, "}");
2496 strcat(className, nameSpace);
2497 strcat(className, regClass->name);
2498 string = QMkString(className);
2499 ListAdd(args, MkExpString(string));
2500 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2502 if(baseSpecs != (((void *)0)))
2504 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
2506 if(baseType->kind != 9 && baseType->kind != 10)
2508 char baseName[1024] = "";
2511 if(baseType->kind == 8 && baseType->__anon1._class && baseType->__anon1._class->isStatic)
2513 __ecereNameSpace__ecere__sys__GetLastDirectory(sourceFile, baseName);
2514 __ecereNameSpace__ecere__sys__ChangeCh(baseName, '.', '_');
2515 strcat(baseName, "}");
2516 strcat(baseName, baseType->__anon1._class->string);
2519 PrintType(baseType, baseName, 0, 1);
2520 string = QMkString(baseName);
2521 ListAdd(args, MkExpString(string));
2522 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2525 ListAdd(args, MkExpConstant("0"));
2527 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
2528 inheritanceAccess = 2;
2531 ListAdd(args, MkExpConstant("0"));
2532 if(regClass->type == 1 || regClass->type == 0 || regClass->type == 5)
2534 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
2537 struct __ecereNameSpace__ecere__com__Class * base;
2539 for(base = regClass->base; base && base->type != 1000; base = base->next)
2541 for(member = base->membersAndProperties.first; member; member = member->next)
2542 if(!member->isProperty)
2548 if(regClass->type == 1 && symbol->declaredStruct && member)
2550 char baseStructName[1024];
2552 baseStructName[0] = (char)0;
2553 strcpy(baseStructName, (regClass->base->templateClass ? regClass->base->templateClass : regClass->base)->fullName);
2554 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))))));
2557 ListAdd(args, symbol->declaredStruct ? MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(symbol->structName), (((void *)0)))), (((void *)0)))) : MkExpConstant("0"));
2561 ListAdd(args, MkExpConstant("0"));
2564 char classDataStructName[1024];
2566 strcpy(classDataStructName, "__ecereClassData_");
2567 FullClassNameCat(classDataStructName, symbol->string, 0);
2568 ListAdd(args, symbol->classData ? MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(classDataStructName), (((void *)0)))), (((void *)0)))) : MkExpConstant("0"));
2570 if(regClass->type == 0 || regClass->type == 5)
2572 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), symbol->needConstructor ? MkExpIdentifier(MkIdentifier(symbol->constructorName)) : MkExpConstant("0")));
2573 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), symbol->needDestructor ? MkExpIdentifier(MkIdentifier(symbol->destructorName)) : MkExpConstant("0")));
2577 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")));
2578 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")));
2580 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
2584 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2587 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2591 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
2594 switch(inheritanceAccess)
2597 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2601 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2604 registerFunction = "eSystem_RegisterClass";
2605 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier("class")), '=', MkExpCall((exp = MkExpIdentifier(MkIdentifier(registerFunction))), args))));
2606 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2607 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)));
2608 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2609 if(external && external->type == 2 && external->__anon1._class->deleteWatchable)
2611 args = MkListOne(MkExpIdentifier(MkIdentifier("class")));
2612 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_DestructionWatchable")), args)));
2613 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2617 struct __ecereNameSpace__ecere__com__Class * base = regClass->base;
2620 for(c = 0; c < base->vTblSize; c++)
2622 struct Symbol * method = (struct Symbol *)regClass->_vTbl[c];
2624 if((void *)method != DummyMethod && base->_vTbl[c] != (void *)method && method->__anon2.__anon3.methodExternal)
2626 struct External * external = method->__anon2.__anon3.methodExternal;
2627 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2628 struct Identifier * id = external->__anon1.function ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2631 struct External * e = method->__anon2.__anon3.methodExternal ? method->__anon2.__anon3.methodExternal : method->__anon2.__anon3.methodCodeExternal;
2633 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, e, e->type == 0);
2635 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2637 char * string = QMkString(method->__anon1.method->name);
2639 ListAdd(args, MkExpString(string));
2640 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2642 ListAdd(args, MkExpConstant("0"));
2643 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2644 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2645 exp->expType = __extension__ ({
2646 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2648 __ecereInstance1->refCount = 1, __ecereInstance1;
2650 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMethod")), args)));
2651 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2658 for(c = regClass->base ? regClass->base->vTblSize : 0; c < regClass->vTblSize; c++)
2660 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)))
2662 if(method->type == 1 && method->_class == regClass && method->vid == c)
2665 struct Expression * exp;
2666 struct External * external = method->symbol ? ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal : (((void *)0));
2667 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2668 struct Identifier * id = (external && external->__anon1.function) ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2670 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2672 char * string = QMkString(method->name);
2674 ListAdd(args, MkExpString(string));
2675 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2678 char * string = QMkString(method->dataTypeString);
2680 ListAdd(args, MkExpString(string));
2681 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2683 if(id && external->__anon1.function->body)
2685 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2686 exp->expType = __extension__ ({
2687 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2689 __ecereInstance1->refCount = 1, __ecereInstance1;
2694 ListAdd(args, (exp = MkExpConstant("0")));
2696 switch(method->memberAccess)
2699 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2702 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2706 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2709 strcpy(name, "__ecereVMethodID_");
2710 FullClassNameCat(name, method->_class->fullName, 0);
2712 strcat(name, method->name);
2713 exp = MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddVirtualMethod")), args);
2714 stmt = MkExpressionStmt(MkListOne(exp));
2716 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, external, external->type == 0);
2717 DeclareMethod(curExternal, method, name);
2718 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2723 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)))
2725 if(method->type == 1 && method->_class == regClass)
2727 else if(method->memberAccess == 1 || !method->dataTypeString)
2729 struct External * external = method->symbol ? ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal : (((void *)0));
2730 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2731 struct Identifier * id = (external && external->__anon1.function) ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2733 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2735 char * string = QMkString(method->name);
2737 ListAdd(args, MkExpString(string));
2738 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2741 char * string = QMkString(method->dataTypeString);
2743 ListAdd(args, MkExpString(string));
2744 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2746 if(id && external->__anon1.function->body)
2748 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2749 exp->expType = __extension__ ({
2750 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2752 __ecereInstance1->refCount = 1, __ecereInstance1;
2757 ListAdd(args, (exp = MkExpConstant("0")));
2759 switch(method->memberAccess)
2762 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2765 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2769 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2772 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMethod")), args)));
2773 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2775 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, external, external->type == 0);
2778 RegisterMembersAndProperties(regClass, 0, "class", registerModuleBody);
2781 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
2782 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
2783 struct __ecereNameSpace__ecere__com__EnumClassData * e = (regClass ? ((void *)(((char *)regClass->data) + enumClass->offsetClass)) : (((void *)0)));
2785 for(value = e->values.first; value; value = value->next)
2787 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2789 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2791 char * string = QMkString(value->name);
2793 ListAdd(args, MkExpString(string));
2794 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2799 if(!strcmp(regClass->dataTypeString, "uint64"))
2800 temp = PrintUInt64(value->data);
2802 temp = PrintInt64(value->data);
2803 ListAdd(args, MkExpConstant(temp));
2804 (__ecereNameSpace__ecere__com__eSystem_Delete(temp), temp = 0);
2806 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eEnum_AddFixedValue")), args)));
2807 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2810 if(symbol->templateParams)
2812 struct TemplateParameter * param;
2814 for(param = (*symbol->templateParams).first; param; param = param->next)
2816 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2818 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2820 char * string = QMkString(param->identifier->string);
2822 ListAdd(args, MkExpString(string));
2823 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2825 ListAdd(args, MkExpIdentifier(MkIdentifier((param->type == 0) ? "type" : ((param->type == 1) ? "identifier" : "expression"))));
2831 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
2832 char * string = QMkString(typeString);
2834 ListAdd(args, MkExpString(string));
2835 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
2836 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2841 char memberTypeString[132] = "TemplateMemberType::";
2842 unsigned int needClass = 1;
2844 ((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);
2845 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(memberTypeString))));
2849 if(param->defaultArgument)
2851 struct __ecereNameSpace__ecere__sys__OldList * members = MkList();
2857 char * typeString = param->defaultArgument->__anon1.templateDatatype ? StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl) : (((void *)0));
2858 char * string = QMkString(typeString);
2860 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(MkListOne(MkIdentifier("dataTypeString")), MkInitializerAssignment(MkExpString(string))));
2861 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
2862 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2867 char memberString[1024];
2870 memberString[0] = '\0';
2871 if(param->defaultArgument->__anon1.identifier->_class)
2873 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
2874 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
2875 else if(param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
2876 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
2879 strcat(memberString, "::");
2880 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
2881 string = QMkString(memberString);
2882 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(MkListOne(MkIdentifier("dataTypeString")), MkInitializerAssignment(MkExpString(string))));
2883 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2895 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
2898 struct __ecereNameSpace__ecere__sys__OldList * ids = MkList();
2900 char * string = (((void *)0));
2902 op = GetOperand(param->defaultArgument->__anon1.expression);
2903 ui64String = PrintUInt64(op.__anon1.ui64);
2904 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ids), MkIdentifier("expression"));
2905 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ids), MkIdentifier("ui64"));
2906 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(ids, MkInitializerAssignment(MkExpConstant(ui64String))));
2907 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2908 (__ecereNameSpace__ecere__com__eSystem_Delete(ui64String), ui64String = 0);
2912 ListAdd(args, MkExpInstance(MkInstantiation(MkSpecifierName("ClassTemplateArgument"), (((void *)0)), MkListOne(MkMembersInitList(members)))));
2915 ListAdd(args, MkExpIdentifier(MkIdentifier("null")));
2916 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddTemplateParameter")), args)));
2917 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2919 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_DoneAddingTemplateParameters")), MkListOne(MkExpIdentifier(MkIdentifier("class"))))));
2920 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2922 if(definitions != (((void *)0)))
2924 for(def = definitions->first; def; def = def->next)
2926 if(def->type == 4 && def->__anon1.propertyWatch)
2928 ListAdd(registerModuleBody->__anon1.compound.statements, (struct Statement *)def->__anon1.propertyWatch);
2929 def->__anon1.propertyWatch = (((void *)0));
2931 else if(def->type == 5)
2934 char * s = QMkString(def->__anon1.designer);
2936 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("designerClass")), '=', MkExpString(s)))), (((void *)0)));
2937 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2939 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2941 else if(def->type == 6)
2943 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("noExpansion")), '=', MkExpConstant("1")))), (((void *)0)));
2944 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2946 else if(def->type == 7)
2948 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("fixed")), '=', MkExpConstant("1")))), (((void *)0)));
2949 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2951 regClass->fixed = 1;
2953 else if(def->type == 8)
2955 char * s = QMkString(def->__anon1.defaultProperty->string);
2957 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("defaultProperty")), '=', MkExpString(s)))), (((void *)0)));
2958 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2959 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2961 else if(def->type == 11)
2963 ((struct __ecereNameSpace__ecere__com__IteratorPointer * (*)(struct __ecereNameSpace__ecere__com__Instance *, uint64 value))__extension__ ({
2964 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = classPropValues;
2966 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
2967 })[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Add])(classPropValues, (uint64)(uintptr_t)(__extension__ ({
2968 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassPropertyValue);
2970 ((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;
2972 def->__anon1.__anon1.id = (((void *)0));
2973 def->__anon1.__anon1.initializer->__anon1.exp = (((void *)0));
2981 void ProcessClassDefinitions()
2983 struct External * external, * next;
2985 CreateRegisterModuleBody();
2988 for(external = (*ast).first; external; external = next)
2990 next = external->next;
2991 curExternal = external;
2992 if(external->type == 2)
2994 struct ClassDefinition * _class = external->__anon1._class;
2996 if(_class->definitions)
2998 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), ast, external, _class->declMode);
3002 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
3003 FreeExternal(external);
3006 else if(external->type == 0)
3008 unsigned int setStaticMethod = 0;
3010 if(external->symbol && !external->symbol->type->__anon1.__anon2.thisClass && !external->symbol->type->__anon1.__anon2.staticMethod)
3012 external->symbol->type->__anon1.__anon2.staticMethod = 1;
3013 setStaticMethod = 1;
3017 struct FunctionDefinition * function = external->__anon1.function;
3018 struct Statement * stmt;
3019 struct __ecereNameSpace__ecere__sys__OldList * args;
3021 if(!strcmp(function->declarator->symbol->string, "__on_register_module"))
3023 ListAdd(registerModuleBody->__anon1.compound.statements, function->body);
3024 function->body->__anon1.compound.context->parent = registerModuleBody->__anon1.compound.context;
3025 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
3026 function->body = (((void *)0));
3027 FreeExternal(external);
3030 if(function->declMode != 2 && function->declMode != 1)
3033 CreateRegisterModuleBody();
3035 char * string = QMkString(function->declarator->symbol->string);
3037 ListAdd(args, MkExpString(string));
3038 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3042 char type[1024] = "";
3045 function->declarator->symbol->type->__anon1.__anon2.staticMethod = 0;
3046 PrintType(function->declarator->symbol->type, type, 1, 1);
3048 function->declarator->symbol->type->__anon1.__anon2.staticMethod = 1;
3049 string = QMkString(type);
3050 ListAdd(args, MkExpString(string));
3051 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3054 ListAdd(args, MkExpIdentifier(MkIdentifier(function->declarator->symbol->string)));
3056 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
3057 switch(function->declMode)
3060 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
3063 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
3067 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
3070 stmt = MkExpressionStmt(MkListOne(MkExpCall((MkExpIdentifier(MkIdentifier("eSystem_RegisterFunction"))), args)));
3071 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
3074 else if(external->type == 1)
3076 struct Declaration * declaration = external->__anon1.declaration;
3078 if(external->symbol)
3080 if(external->symbol->type && external->symbol->type->kind == 11 && !external->symbol->type->__anon1.__anon2.thisClass)
3081 external->symbol->type->__anon1.__anon2.staticMethod = 1;
3083 if(external->symbol && declaration && declaration->type == 1)
3085 if(declaration->__anon1.__anon1.specifiers)
3087 struct Specifier * specifier;
3088 unsigned int removeExternal = 0;
3090 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
3092 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)))
3094 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
3100 if(specifier->type == 2)
3105 symbol->ctx = specifier->__anon1.__anon2.ctx;
3106 specifier->__anon1.__anon2.ctx = (((void *)0));
3107 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, ast, external, declaration->declMode);
3111 if(inCompiler && removeExternal)
3113 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
3114 FreeExternal(external);
3118 else if(declaration && declaration->type == 3)
3120 if(inCompiler && declaration->declMode != 3)
3122 struct Statement * stmt;
3123 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
3125 CreateRegisterModuleBody();
3127 char * string = QMkString(declaration->__anon1.__anon2.id->string);
3129 ListAdd(args, MkExpString(string));
3130 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3134 char type[1024] = "";
3136 PrintExpression(declaration->__anon1.__anon2.exp, type);
3137 string = QMkString(type);
3138 ListAdd(args, MkExpString(string));
3139 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3141 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
3142 switch(declaration->declMode)
3145 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
3148 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
3152 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
3155 stmt = MkExpressionStmt(MkListOne(MkExpCall((MkExpIdentifier(MkIdentifier("eSystem_RegisterDefine"))), args)));
3156 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
3162 struct __ecereNameSpace__ecere__com__Iterator v =
3164 (classPropValues), 0
3167 while(__ecereMethod___ecereNameSpace__ecere__com__Iterator_Next(&v))
3169 struct __ecereNameSpace__ecere__sys__OldList * findClassArgs = MkList();
3170 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
3171 struct Statement * compoundStmt;
3173 struct Expression * e;
3176 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3178 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3180 yylloc = __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));
3185 ListAdd(findClassArgs, MkExpIdentifier(MkIdentifier("module")));
3186 s = QMkString(__extension__ ({
3187 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3189 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3190 })->regClass->name);
3191 ListAdd(findClassArgs, MkExpString(s));
3192 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
3193 ListAdd(args, MkExpIdentifier(MkIdentifier("_class")));
3194 s = QMkString(__extension__ ({
3195 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3197 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3199 ListAdd(args, MkExpString(s));
3200 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
3201 e = __extension__ ({
3202 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3204 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3206 ProcessExpressionType(e);
3207 if(__ecereProp_Type_Get_isPointerType(e->expType))
3208 e = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("intptr")), (((void *)0))), e);
3209 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(INT64)), (((void *)0))), e));
3210 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)))));
3211 compoundStmt->__anon1.compound.context = __extension__ ({
3212 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
3214 __ecereInstance1->parent = registerModuleBody->__anon1.compound.context, __ecereInstance1;
3216 ListAdd(registerModuleBody->__anon1.compound.statements, compoundStmt);
3219 ((void (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
3220 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = classPropValues;
3222 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
3223 })[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Free])(classPropValues);
3227 void __ecereRegisterModule_pass1(struct __ecereNameSpace__ecere__com__Instance * module)
3229 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
3231 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetBuildingEcereCom", "void SetBuildingEcereCom(bool b)", SetBuildingEcereCom, module, 1);
3232 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetBuildingEcereCom", "bool GetBuildingEcereCom(void)", GetBuildingEcereCom, module, 1);
3233 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetBuildingEcereComModule", "void SetBuildingEcereComModule(bool b)", SetBuildingEcereComModule, module, 1);
3234 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetBuildingEcereComModule", "bool GetBuildingEcereComModule(void)", GetBuildingEcereComModule, module, 1);
3235 __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);
3236 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CreateRegisterModuleBody", "void CreateRegisterModuleBody(void)", CreateRegisterModuleBody, module, 2);
3237 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("RegisterMembersAndProperties", "void RegisterMembersAndProperties(ecere::com::Class regClass, bool isMember, const char * className, Statement statement)", RegisterMembersAndProperties, module, 2);
3238 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetNameSpaceString", "void GetNameSpaceString(ecere::com::NameSpace ns, char * string)", GetNameSpaceString, module, 2);
3239 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ClassPropertyValue", 0, sizeof(struct ClassPropertyValue), 0, (void *)0, (void *)__ecereDestructor_ClassPropertyValue, module, 2, 1);
3240 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)
3241 __ecereClass_ClassPropertyValue = class;
3242 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessClassDefinitions", "void ProcessClassDefinitions(void)", ProcessClassDefinitions, module, 1);