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 # if defined(__GNUC__) || defined(__TINYC__)
40 # define ecere_stdcall __attribute__((__stdcall__))
42 # define ecere_stdcall __stdcall
45 # define ecere_stdcall
48 #include <sys/types.h>
51 IDENTIFIER = 258, CONSTANT = 259, STRING_LITERAL = 260, SIZEOF = 261, PTR_OP = 262, INC_OP = 263, DEC_OP = 264, LEFT_OP = 265, RIGHT_OP = 266, LE_OP = 267, GE_OP = 268, EQ_OP = 269, NE_OP = 270, AND_OP = 271, OR_OP = 272, MUL_ASSIGN = 273, DIV_ASSIGN = 274, MOD_ASSIGN = 275, ADD_ASSIGN = 276, SUB_ASSIGN = 277, LEFT_ASSIGN = 278, RIGHT_ASSIGN = 279, AND_ASSIGN = 280, XOR_ASSIGN = 281, OR_ASSIGN = 282, TYPE_NAME = 283, TYPEDEF = 284, EXTERN = 285, STATIC = 286, AUTO = 287, REGISTER = 288, CHAR = 289, SHORT = 290, INT = 291, UINT = 292, INT64 = 293, LONG = 294, SIGNED = 295, UNSIGNED = 296, FLOAT = 297, DOUBLE = 298, CONST = 299, VOLATILE = 300, VOID = 301, VALIST = 302, STRUCT = 303, UNION = 304, ENUM = 305, ELLIPSIS = 306, CASE = 307, DEFAULT = 308, IF = 309, SWITCH = 310, WHILE = 311, DO = 312, FOR = 313, GOTO = 314, CONTINUE = 315, BREAK = 316, RETURN = 317, IFX = 318, ELSE = 319, CLASS = 320, THISCLASS = 321, CLASS_NAME = 322, PROPERTY = 323, SETPROP = 324, GETPROP = 325, NEWOP = 326, RENEW = 327, DELETE = 328, EXT_DECL = 329, EXT_STORAGE = 330, IMPORT = 331, DEFINE = 332, VIRTUAL = 333, ATTRIB = 334, PUBLIC = 335, PRIVATE = 336, TYPED_OBJECT = 337, ANY_OBJECT = 338, _INCREF = 339, EXTENSION = 340, ASM = 341, TYPEOF = 342, WATCH = 343, STOPWATCHING = 344, FIREWATCHERS = 345, WATCHABLE = 346, CLASS_DESIGNER = 347, CLASS_NO_EXPANSION = 348, CLASS_FIXED = 349, ISPROPSET = 350, CLASS_DEFAULT_PROPERTY = 351, PROPERTY_CATEGORY = 352, CLASS_DATA = 353, CLASS_PROPERTY = 354, SUBCLASS = 355, NAMESPACE = 356, NEW0OP = 357, RENEW0 = 358, VAARG = 359, DBTABLE = 360, DBFIELD = 361, DBINDEX = 362, DATABASE_OPEN = 363, ALIGNOF = 364, ATTRIB_DEP = 365, __ATTRIB = 366, BOOL = 367, _BOOL = 368, _COMPLEX = 369, _IMAGINARY = 370, RESTRICT = 371, THREAD = 372, WIDE_STRING_LITERAL = 373
54 extern int propWatcherID;
56 unsigned int buildingECERECOM = 0;
58 unsigned int buildingECERECOMModule = 0;
60 extern unsigned int inCompiler;
62 extern const char * outputFile;
64 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerTypeSize;
66 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_first;
68 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__sys__BTNode_next;
70 extern unsigned int parsingType;
72 extern const char * sourceFile;
74 static struct __ecereNameSpace__ecere__com__Instance * classPropValues;
76 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp___ecereNameSpace__ecere__com__Iterator_data;
78 extern struct __ecereNameSpace__ecere__com__Property * __ecereProp_Type_isPointerType;
80 struct __ecereNameSpace__ecere__sys__OldList
87 } __attribute__ ((gcc_struct));
89 struct __ecereNameSpace__ecere__com__DataValue
104 } __attribute__ ((gcc_struct)) __anon1;
105 } __attribute__ ((gcc_struct));
107 struct __ecereNameSpace__ecere__com__SerialBuffer
109 unsigned char * _buffer;
113 } __attribute__ ((gcc_struct));
115 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
117 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
119 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
121 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
123 extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
127 struct InitDeclarator;
137 struct Instantiation;
157 } __attribute__ ((gcc_struct));
163 struct __ecereNameSpace__ecere__com__LinkList
168 } __attribute__ ((gcc_struct));
170 extern void Compiler_Error(const char * format, ...);
172 extern const char * __ecereNameSpace__ecere__GetTranslatedString(const char * name, const char * string, const char * stringAndContext);
174 extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
176 extern char * __ecereNameSpace__ecere__sys__GetLastDirectory(const char * string, char * output);
178 extern unsigned int __ecereNameSpace__ecere__sys__StripExtension(char * string);
180 extern void FixModuleName(char * moduleName);
182 extern int sprintf(char * , const char * , ...);
184 extern char * QMkString(const char * source);
186 extern char * strcpy(char * , const char * );
188 extern void FullClassNameCat(char * output, const char * className, unsigned int includeTemplateParams);
190 extern char * strcat(char * , const char * );
192 extern int strcmp(const char * , const char * );
194 extern char * PrintInt64(long long result);
196 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
198 extern unsigned int DummyMethod(void);
200 extern char * PrintUInt64(uint64 result);
202 extern size_t strlen(const char * );
204 struct __ecereNameSpace__ecere__com__IteratorPointer;
206 struct __ecereNameSpace__ecere__com__GlobalFunction;
208 int __ecereVMethodID_class_OnGetString;
210 void SetBuildingEcereCom(unsigned int b)
212 buildingECERECOM = b;
215 unsigned int GetBuildingEcereCom()
217 return buildingECERECOM;
220 void SetBuildingEcereComModule(unsigned int b)
222 buildingECERECOMModule = b;
225 unsigned int GetBuildingEcereComModule()
227 return buildingECERECOMModule;
230 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
232 extern struct __ecereNameSpace__ecere__sys__OldList * excludedSymbols;
234 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
236 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
238 extern struct __ecereNameSpace__ecere__sys__OldList * MkListOne(void * item);
240 extern struct __ecereNameSpace__ecere__sys__OldList * ast;
242 struct __ecereNameSpace__ecere__com__EnumClassData
244 struct __ecereNameSpace__ecere__sys__OldList values;
246 } __attribute__ ((gcc_struct));
248 unsigned int __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(struct __ecereNameSpace__ecere__sys__OldList * this, void * prevItem, void * item);
250 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
252 void __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove(struct __ecereNameSpace__ecere__sys__OldList * this, void * item);
254 extern struct Pointer * MkPointer(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Pointer * pointer);
256 extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
258 extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
260 extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
264 struct CodePosition start;
265 struct CodePosition end;
266 } __attribute__ ((gcc_struct));
268 extern struct Location yylloc;
272 static struct Statement * registerModuleBody;
274 static struct Statement * unregisterModuleBody;
276 extern struct Statement * MkCompoundStmt(struct __ecereNameSpace__ecere__sys__OldList * declarations, struct __ecereNameSpace__ecere__sys__OldList * statements);
278 extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
280 extern struct Statement * MkIfStmt(struct __ecereNameSpace__ecere__sys__OldList * exp, struct Statement * statement, struct Statement * elseStmt);
284 static struct External * registerModuleExternal;
286 static struct External * unregisterModuleExternal;
288 extern void FreeExternal(struct External * external);
290 extern struct External * DeclareStruct(struct External * neededBy, const char * name, unsigned int skipNoHead, unsigned int needDereference);
292 extern struct External * curExternal;
296 extern struct Context * globalContext;
298 extern struct Context * curContext;
300 extern struct Context * PushContext(void);
302 extern void PopContext(struct Context * ctx);
306 extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
308 extern struct Expression * MkExpConstant(const char * string);
310 extern struct Expression * MkExpString(const char * string);
312 extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
314 extern struct Expression * MkExpCall(struct Expression * expression, struct __ecereNameSpace__ecere__sys__OldList * arguments);
316 extern struct Expression * CopyExpression(struct Expression * exp);
318 extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
320 extern void ProcessExpressionType(struct Expression * exp);
322 extern void FreeExpContents(struct Expression * exp);
324 extern void ComputeExpression(struct Expression * exp);
326 extern struct Expression * MkExpInstance(struct Instantiation * inst);
328 extern void PrintExpression(struct Expression * exp, char * string);
330 struct __ecereNameSpace__ecere__sys__BTNode;
332 struct __ecereNameSpace__ecere__sys__BTNode
335 struct __ecereNameSpace__ecere__sys__BTNode * parent;
336 struct __ecereNameSpace__ecere__sys__BTNode * left;
337 struct __ecereNameSpace__ecere__sys__BTNode * right;
339 } __attribute__ ((gcc_struct));
341 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BTNode_Get_next(struct __ecereNameSpace__ecere__sys__BTNode * this);
343 struct __ecereNameSpace__ecere__com__Class;
345 struct __ecereNameSpace__ecere__com__Instance
348 struct __ecereNameSpace__ecere__com__Class * _class;
350 } __attribute__ ((gcc_struct));
352 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
354 extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
356 extern void ReplaceThisClassSpecifiers(struct __ecereNameSpace__ecere__sys__OldList * specs, struct __ecereNameSpace__ecere__com__Class * _class);
358 extern void __ecereNameSpace__ecere__com__eEnum_AddFixedValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string, long long value);
360 extern long long __ecereNameSpace__ecere__com__eEnum_AddValue(struct __ecereNameSpace__ecere__com__Class * _class, const char * string);
362 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
364 extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
366 extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
368 struct __ecereNameSpace__ecere__com__Iterator
370 struct __ecereNameSpace__ecere__com__Instance * container;
371 struct __ecereNameSpace__ecere__com__IteratorPointer * pointer;
372 } __attribute__ ((gcc_struct));
374 int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Add;
376 int __ecereVMethodID___ecereNameSpace__ecere__com__Container_Free;
378 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
380 unsigned int __ecereMethod___ecereNameSpace__ecere__com__Iterator_Next();
382 uint64 __ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(struct __ecereNameSpace__ecere__com__Iterator * this);
384 void __ecereProp___ecereNameSpace__ecere__com__Iterator_Set_data(struct __ecereNameSpace__ecere__com__Iterator * this, uint64 value);
386 void __ecereDestroyModuleInstances_pass1()
388 (__ecereNameSpace__ecere__com__eInstance_DecRef(classPropValues), classPropValues = 0);
391 struct __ecereNameSpace__ecere__com__Property;
393 extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
395 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);
397 extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
399 extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
403 extern struct Specifier * MkSpecifier(int specifier);
405 extern struct Specifier * CopySpecifier(struct Specifier * spec);
407 extern struct Specifier * MkSpecifierName(const char * name);
409 extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
411 extern struct Instantiation * MkInstantiation(struct Specifier * _class, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
413 struct __ecereNameSpace__ecere__com__Method;
415 extern void ProcessMethodType(struct __ecereNameSpace__ecere__com__Method * method);
417 extern void DeclareMethod(struct External * neededFor, struct __ecereNameSpace__ecere__com__Method * method, const char * name);
421 struct __ecereNameSpace__ecere__com__Property
423 struct __ecereNameSpace__ecere__com__Property * prev;
424 struct __ecereNameSpace__ecere__com__Property * next;
426 unsigned int isProperty;
429 struct __ecereNameSpace__ecere__com__Class * _class;
430 const char * dataTypeString;
431 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
432 struct Type * dataType;
433 void (* Set)(void * , int);
434 int (* Get)(void * );
435 unsigned int (* IsSet)(void * );
439 unsigned int conversion;
440 unsigned int watcherOffset;
441 const char * category;
442 unsigned int compiled;
443 unsigned int selfWatchable;
444 unsigned int isWatchable;
445 } __attribute__ ((gcc_struct));
447 struct __ecereNameSpace__ecere__com__Method
450 struct __ecereNameSpace__ecere__com__Method * parent;
451 struct __ecereNameSpace__ecere__com__Method * left;
452 struct __ecereNameSpace__ecere__com__Method * right;
457 struct __ecereNameSpace__ecere__com__Class * _class;
459 const char * dataTypeString;
460 struct Type * dataType;
462 } __attribute__ ((gcc_struct));
464 extern struct Type * ProcessTypeString(const char * string, unsigned int staticMethod);
466 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);
468 extern void FreeType(struct Type * type);
470 extern int ComputeTypeSize(struct Type * type);
472 extern void PrintType(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
479 struct Symbol * parent;
480 struct Symbol * left;
481 struct Symbol * right;
486 struct __ecereNameSpace__ecere__com__Method * method;
487 struct __ecereNameSpace__ecere__com__Property * _property;
488 struct __ecereNameSpace__ecere__com__Class * registered;
489 } __attribute__ ((gcc_struct)) __anon1;
490 unsigned int notYetDeclared;
495 struct External * pointerExternal;
496 struct External * structExternal;
497 } __attribute__ ((gcc_struct)) __anon1;
500 struct External * externalGet;
501 struct External * externalSet;
502 struct External * externalPtr;
503 struct External * externalIsSet;
504 } __attribute__ ((gcc_struct)) __anon2;
507 struct External * methodExternal;
508 struct External * methodCodeExternal;
509 } __attribute__ ((gcc_struct)) __anon3;
510 } __attribute__ ((gcc_struct)) __anon2;
511 unsigned int imported;
512 unsigned int declaredStructSym;
513 struct __ecereNameSpace__ecere__com__Class * _class;
514 unsigned int declaredStruct;
515 unsigned int needConstructor;
516 unsigned int needDestructor;
517 char * constructorName;
520 char * destructorName;
521 struct ModuleImport * module;
522 struct ClassImport * _import;
523 struct Location nameLoc;
524 unsigned int isParam;
525 unsigned int isRemote;
526 unsigned int isStruct;
527 unsigned int fireWatchersDone;
529 unsigned int classData;
530 unsigned int isStatic;
532 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
533 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
534 struct Context * ctx;
536 struct Expression * propCategory;
537 unsigned int mustRegister;
538 } __attribute__ ((gcc_struct));
540 extern struct Symbol * FindClass(const char * name);
544 extern struct Declarator * GetFuncDecl(struct Declarator * decl);
546 extern struct Declarator * CopyDeclarator(struct Declarator * declarator);
548 extern struct Declarator * MkDeclaratorFunction(struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * parameters);
550 extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
552 extern struct Type * ProcessType(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
554 extern char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl);
556 struct TemplateDatatype
558 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
559 struct Declarator * decl;
560 } __attribute__ ((gcc_struct));
566 struct Declarator * prev;
567 struct Declarator * next;
570 struct Symbol * symbol;
571 struct Declarator * declarator;
574 struct Identifier * identifier;
577 struct Expression * exp;
578 struct Expression * posExp;
579 struct Attrib * attrib;
580 } __attribute__ ((gcc_struct)) structDecl;
583 struct Expression * exp;
584 struct Specifier * enumClass;
585 } __attribute__ ((gcc_struct)) array;
588 struct __ecereNameSpace__ecere__sys__OldList * parameters;
589 } __attribute__ ((gcc_struct)) function;
592 struct Pointer * pointer;
593 } __attribute__ ((gcc_struct)) pointer;
596 struct ExtDecl * extended;
597 } __attribute__ ((gcc_struct)) extended;
598 } __attribute__ ((gcc_struct)) __anon1;
599 } __attribute__ ((gcc_struct));
601 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
603 extern struct Identifier * MkIdentifier(const char * string);
605 extern struct Expression * MkExpIdentifier(struct Identifier * id);
607 extern struct Expression * MkExpMember(struct Expression * expression, struct Identifier * member);
609 extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
613 struct Identifier * prev;
614 struct Identifier * next;
616 struct Symbol * classSym;
617 struct Specifier * _class;
619 struct Identifier * badID;
620 } __attribute__ ((gcc_struct));
622 extern struct Identifier * GetDeclId(struct Declarator * decl);
624 struct ClassPropertyValue
626 struct __ecereNameSpace__ecere__com__Class * regClass;
627 struct Identifier * id;
628 struct Expression * exp;
629 } __attribute__ ((gcc_struct));
631 extern void FreeIdentifier(struct Identifier * id);
633 struct __ecereNameSpace__ecere__sys__NamedLink64;
635 struct __ecereNameSpace__ecere__sys__NamedLink64
637 struct __ecereNameSpace__ecere__sys__NamedLink64 * prev;
638 struct __ecereNameSpace__ecere__sys__NamedLink64 * next;
641 } __attribute__ ((gcc_struct));
643 struct __ecereNameSpace__ecere__sys__OldLink;
645 struct __ecereNameSpace__ecere__sys__OldLink
647 struct __ecereNameSpace__ecere__sys__OldLink * prev;
648 struct __ecereNameSpace__ecere__sys__OldLink * next;
650 } __attribute__ ((gcc_struct));
652 struct ClassFunction;
656 struct ClassFunction * prev;
657 struct ClassFunction * next;
659 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
660 struct Declarator * declarator;
661 struct __ecereNameSpace__ecere__sys__OldList * declarations;
662 struct Statement * body;
663 struct __ecereNameSpace__ecere__com__Class * _class;
664 struct __ecereNameSpace__ecere__sys__OldList attached;
667 struct Symbol * propSet;
668 unsigned int isVirtual;
669 unsigned int isConstructor;
670 unsigned int isDestructor;
671 unsigned int dontMangle;
674 } __attribute__ ((gcc_struct));
676 extern struct ClassFunction * MkClassFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Specifier * _class, struct Declarator * decl, struct __ecereNameSpace__ecere__sys__OldList * declList);
678 extern void ProcessClassFunctionBody(struct ClassFunction * func, struct Statement * body);
680 struct PropertyWatch;
684 struct PropertyWatch * prev;
685 struct PropertyWatch * next;
687 struct Statement * compound;
688 struct __ecereNameSpace__ecere__sys__OldList * properties;
689 unsigned int deleteWatch;
690 } __attribute__ ((gcc_struct));
692 extern void FreePropertyWatch(struct PropertyWatch * watcher);
698 struct Statement * prev;
699 struct Statement * next;
704 struct __ecereNameSpace__ecere__sys__OldList * expressions;
707 struct Identifier * id;
708 struct Statement * stmt;
709 } __attribute__ ((gcc_struct)) labeled;
712 struct Expression * exp;
713 struct Statement * stmt;
714 } __attribute__ ((gcc_struct)) caseStmt;
717 struct __ecereNameSpace__ecere__sys__OldList * declarations;
718 struct __ecereNameSpace__ecere__sys__OldList * statements;
719 struct Context * context;
720 unsigned int isSwitch;
721 } __attribute__ ((gcc_struct)) compound;
724 struct __ecereNameSpace__ecere__sys__OldList * exp;
725 struct Statement * stmt;
726 struct Statement * elseStmt;
727 } __attribute__ ((gcc_struct)) ifStmt;
730 struct __ecereNameSpace__ecere__sys__OldList * exp;
731 struct Statement * stmt;
732 } __attribute__ ((gcc_struct)) switchStmt;
735 struct __ecereNameSpace__ecere__sys__OldList * exp;
736 struct Statement * stmt;
737 } __attribute__ ((gcc_struct)) whileStmt;
740 struct __ecereNameSpace__ecere__sys__OldList * exp;
741 struct Statement * stmt;
742 } __attribute__ ((gcc_struct)) doWhile;
745 struct Statement * init;
746 struct Statement * check;
747 struct __ecereNameSpace__ecere__sys__OldList * increment;
748 struct Statement * stmt;
749 } __attribute__ ((gcc_struct)) forStmt;
752 struct Identifier * id;
753 } __attribute__ ((gcc_struct)) gotoStmt;
756 struct Specifier * spec;
758 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
759 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
760 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
761 } __attribute__ ((gcc_struct)) asmStmt;
764 struct Expression * watcher;
765 struct Expression * object;
766 struct __ecereNameSpace__ecere__sys__OldList * watches;
767 } __attribute__ ((gcc_struct)) _watch;
770 struct Identifier * id;
771 struct __ecereNameSpace__ecere__sys__OldList * exp;
772 struct __ecereNameSpace__ecere__sys__OldList * filter;
773 struct Statement * stmt;
774 } __attribute__ ((gcc_struct)) forEachStmt;
775 struct Declaration * decl;
776 } __attribute__ ((gcc_struct)) __anon1;
777 } __attribute__ ((gcc_struct));
779 extern struct Declaration * MkDeclaration(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct __ecereNameSpace__ecere__sys__OldList * initDeclarators);
783 struct Declaration * prev;
784 struct Declaration * next;
791 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
792 struct __ecereNameSpace__ecere__sys__OldList * declarators;
793 } __attribute__ ((gcc_struct)) __anon1;
794 struct Instantiation * inst;
797 struct Identifier * id;
798 struct Expression * exp;
799 } __attribute__ ((gcc_struct)) __anon2;
800 } __attribute__ ((gcc_struct)) __anon1;
801 struct Specifier * extStorage;
802 struct Symbol * symbol;
804 } __attribute__ ((gcc_struct));
808 extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
810 extern struct Initializer * MkInitializerAssignment(struct Expression * exp);
812 extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
816 struct Initializer * prev;
817 struct Initializer * next;
822 struct Expression * exp;
823 struct __ecereNameSpace__ecere__sys__OldList * list;
824 } __attribute__ ((gcc_struct)) __anon1;
825 unsigned int isConstant;
826 struct Identifier * id;
827 } __attribute__ ((gcc_struct));
829 struct FunctionDefinition;
831 extern struct FunctionDefinition * _MkFunction(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * declarator, struct __ecereNameSpace__ecere__sys__OldList * declarationList, unsigned int errorOnOmit);
833 struct FunctionDefinition
835 struct FunctionDefinition * prev;
836 struct FunctionDefinition * next;
838 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
839 struct Declarator * declarator;
840 struct __ecereNameSpace__ecere__sys__OldList * declarations;
841 struct Statement * body;
842 struct __ecereNameSpace__ecere__com__Class * _class;
843 struct __ecereNameSpace__ecere__sys__OldList attached;
846 struct Symbol * propSet;
848 unsigned int propertyNoThis;
849 } __attribute__ ((gcc_struct));
851 extern void ProcessFunctionBody(struct FunctionDefinition * func, struct Statement * body);
853 extern struct External * MkExternalFunction(struct FunctionDefinition * function);
859 struct TypeName * prev;
860 struct TypeName * next;
862 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
863 struct Declarator * declarator;
865 struct Expression * bitCount;
866 } __attribute__ ((gcc_struct));
868 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
870 extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
872 extern struct Expression * MkExpTypeSize(struct TypeName * typeName);
876 struct Expression * prev;
877 struct Expression * next;
885 struct Identifier * identifier;
886 } __attribute__ ((gcc_struct)) __anon1;
887 struct Statement * compound;
888 struct Instantiation * instance;
892 unsigned int intlString;
893 unsigned int wideString;
894 } __attribute__ ((gcc_struct)) __anon2;
895 struct __ecereNameSpace__ecere__sys__OldList * list;
898 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
899 struct Declarator * decl;
900 } __attribute__ ((gcc_struct)) _classExp;
903 struct Identifier * id;
904 } __attribute__ ((gcc_struct)) classData;
907 struct Expression * exp;
908 struct __ecereNameSpace__ecere__sys__OldList * arguments;
909 struct Location argLoc;
910 } __attribute__ ((gcc_struct)) call;
913 struct Expression * exp;
914 struct __ecereNameSpace__ecere__sys__OldList * index;
915 } __attribute__ ((gcc_struct)) index;
918 struct Expression * exp;
919 struct Identifier * member;
921 unsigned int thisPtr;
922 } __attribute__ ((gcc_struct)) member;
926 struct Expression * exp1;
927 struct Expression * exp2;
928 } __attribute__ ((gcc_struct)) op;
929 struct TypeName * typeName;
930 struct Specifier * _class;
933 struct TypeName * typeName;
934 struct Expression * exp;
935 } __attribute__ ((gcc_struct)) cast;
938 struct Expression * cond;
939 struct __ecereNameSpace__ecere__sys__OldList * exp;
940 struct Expression * elseExp;
941 } __attribute__ ((gcc_struct)) cond;
944 struct TypeName * typeName;
945 struct Expression * size;
946 } __attribute__ ((gcc_struct)) _new;
949 struct TypeName * typeName;
950 struct Expression * size;
951 struct Expression * exp;
952 } __attribute__ ((gcc_struct)) _renew;
956 struct Identifier * id;
957 } __attribute__ ((gcc_struct)) db;
960 struct Expression * ds;
961 struct Expression * name;
962 } __attribute__ ((gcc_struct)) dbopen;
965 struct TypeName * typeName;
966 struct Initializer * initializer;
967 } __attribute__ ((gcc_struct)) initializer;
970 struct Expression * exp;
971 struct TypeName * typeName;
972 } __attribute__ ((gcc_struct)) vaArg;
973 } __attribute__ ((gcc_struct)) __anon1;
974 unsigned int debugValue;
975 struct __ecereNameSpace__ecere__com__DataValue val;
977 unsigned int hasAddress;
978 struct Type * expType;
979 struct Type * destType;
982 unsigned int byReference;
983 unsigned int isConstant;
984 unsigned int addedThis;
985 unsigned int needCast;
986 unsigned int thisPtr;
987 unsigned int opDestType;
988 unsigned int needTemplateCast;
989 } __attribute__ ((gcc_struct));
995 unsigned int (* Add)(struct Expression *, struct Operand *, struct Operand *);
996 unsigned int (* Sub)(struct Expression *, struct Operand *, struct Operand *);
997 unsigned int (* Mul)(struct Expression *, struct Operand *, struct Operand *);
998 unsigned int (* Div)(struct Expression *, struct Operand *, struct Operand *);
999 unsigned int (* Mod)(struct Expression *, struct Operand *, struct Operand *);
1000 unsigned int (* Neg)(struct Expression *, struct Operand *);
1001 unsigned int (* Inc)(struct Expression *, struct Operand *);
1002 unsigned int (* Dec)(struct Expression *, struct Operand *);
1003 unsigned int (* Asign)(struct Expression *, struct Operand *, struct Operand *);
1004 unsigned int (* AddAsign)(struct Expression *, struct Operand *, struct Operand *);
1005 unsigned int (* SubAsign)(struct Expression *, struct Operand *, struct Operand *);
1006 unsigned int (* MulAsign)(struct Expression *, struct Operand *, struct Operand *);
1007 unsigned int (* DivAsign)(struct Expression *, struct Operand *, struct Operand *);
1008 unsigned int (* ModAsign)(struct Expression *, struct Operand *, struct Operand *);
1009 unsigned int (* BitAnd)(struct Expression *, struct Operand *, struct Operand *);
1010 unsigned int (* BitOr)(struct Expression *, struct Operand *, struct Operand *);
1011 unsigned int (* BitXor)(struct Expression *, struct Operand *, struct Operand *);
1012 unsigned int (* LShift)(struct Expression *, struct Operand *, struct Operand *);
1013 unsigned int (* RShift)(struct Expression *, struct Operand *, struct Operand *);
1014 unsigned int (* BitNot)(struct Expression *, struct Operand *);
1015 unsigned int (* AndAsign)(struct Expression *, struct Operand *, struct Operand *);
1016 unsigned int (* OrAsign)(struct Expression *, struct Operand *, struct Operand *);
1017 unsigned int (* XorAsign)(struct Expression *, struct Operand *, struct Operand *);
1018 unsigned int (* LShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1019 unsigned int (* RShiftAsign)(struct Expression *, struct Operand *, struct Operand *);
1020 unsigned int (* Not)(struct Expression *, struct Operand *);
1021 unsigned int (* Equ)(struct Expression *, struct Operand *, struct Operand *);
1022 unsigned int (* Nqu)(struct Expression *, struct Operand *, struct Operand *);
1023 unsigned int (* And)(struct Expression *, struct Operand *, struct Operand *);
1024 unsigned int (* Or)(struct Expression *, struct Operand *, struct Operand *);
1025 unsigned int (* Grt)(struct Expression *, struct Operand *, struct Operand *);
1026 unsigned int (* Sma)(struct Expression *, struct Operand *, struct Operand *);
1027 unsigned int (* GrtEqu)(struct Expression *, struct Operand *, struct Operand *);
1028 unsigned int (* SmaEqu)(struct Expression *, struct Operand *, struct Operand *);
1029 unsigned int (* Cond)(struct Expression *, struct Operand *, struct Operand *, struct Operand *);
1030 } __attribute__ ((gcc_struct));
1036 unsigned int ptrSize;
1049 } __attribute__ ((gcc_struct)) __anon1;
1051 } __attribute__ ((gcc_struct));
1053 extern struct Operand GetOperand(struct Expression * exp);
1055 struct __ecereNameSpace__ecere__sys__BinaryTree;
1057 struct __ecereNameSpace__ecere__sys__BinaryTree
1059 struct __ecereNameSpace__ecere__sys__BTNode * root;
1061 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
1062 void (* FreeKey)(void * key);
1063 } __attribute__ ((gcc_struct));
1065 void __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(struct __ecereNameSpace__ecere__sys__BinaryTree * this, struct __ecereNameSpace__ecere__sys__BTNode * node);
1067 struct __ecereNameSpace__ecere__sys__BTNode * __ecereProp___ecereNameSpace__ecere__sys__BinaryTree_Get_first(struct __ecereNameSpace__ecere__sys__BinaryTree * this);
1069 struct TemplateParameter;
1073 struct Specifier * prev;
1074 struct Specifier * next;
1075 struct Location loc;
1082 struct ExtDecl * extDecl;
1084 struct Symbol * symbol;
1085 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
1086 struct Specifier * nsSpec;
1087 } __attribute__ ((gcc_struct)) __anon1;
1090 struct Identifier * id;
1091 struct __ecereNameSpace__ecere__sys__OldList * list;
1092 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1093 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1094 unsigned int addNameSpace;
1095 struct Context * ctx;
1096 struct ExtDecl * extDeclStruct;
1097 } __attribute__ ((gcc_struct)) __anon2;
1098 struct Expression * expression;
1099 struct Specifier * _class;
1100 struct TemplateParameter * templateParameter;
1101 } __attribute__ ((gcc_struct)) __anon1;
1102 } __attribute__ ((gcc_struct));
1111 struct Symbol * _class;
1114 struct __ecereNameSpace__ecere__sys__OldList members;
1116 } __attribute__ ((gcc_struct)) __anon1;
1119 struct Type * returnType;
1120 struct __ecereNameSpace__ecere__sys__OldList params;
1121 struct Symbol * thisClass;
1122 unsigned int staticMethod;
1123 struct TemplateParameter * thisClassTemplate;
1124 } __attribute__ ((gcc_struct)) __anon2;
1127 struct __ecereNameSpace__ecere__com__Method * method;
1128 struct __ecereNameSpace__ecere__com__Class * methodClass;
1129 struct __ecereNameSpace__ecere__com__Class * usedClass;
1130 } __attribute__ ((gcc_struct)) __anon3;
1133 struct Type * arrayType;
1135 struct Expression * arraySizeExp;
1136 unsigned int freeExp;
1137 struct Symbol * enumClass;
1138 } __attribute__ ((gcc_struct)) __anon4;
1140 struct TemplateParameter * templateParameter;
1141 } __attribute__ ((gcc_struct)) __anon1;
1146 struct __ecereNameSpace__ecere__com__Class * thisClassFrom;
1147 int classObjectType;
1149 unsigned int offset;
1152 unsigned int isSigned : 1;
1153 unsigned int constant : 1;
1154 unsigned int truth : 1;
1155 unsigned int byReference : 1;
1156 unsigned int extraParam : 1;
1157 unsigned int directClassAccess : 1;
1158 unsigned int computing : 1;
1159 unsigned int keepCast : 1;
1160 unsigned int passAsTemplate : 1;
1161 unsigned int dllExport : 1;
1162 unsigned int attrStdcall : 1;
1163 unsigned int declaredWithStruct : 1;
1164 unsigned int typedByReference : 1;
1165 unsigned int casted : 1;
1166 unsigned int pointerAlignment : 1;
1167 unsigned int isLong : 1;
1168 } __attribute__ ((gcc_struct));
1170 unsigned int __ecereProp_Type_Get_isPointerTypeSize(struct Type * this);
1172 unsigned int __ecereProp_Type_Get_isPointerType(struct Type * this);
1174 struct __ecereNameSpace__ecere__com__Module;
1176 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);
1178 extern struct __ecereNameSpace__ecere__com__Instance * privateModule;
1180 extern struct __ecereNameSpace__ecere__com__Class * __ecereNameSpace__ecere__com__eSystem_FindClass(struct __ecereNameSpace__ecere__com__Instance * module, const char * name);
1182 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);
1184 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);
1186 extern struct __ecereNameSpace__ecere__com__Instance * __thisModule;
1188 struct __ecereNameSpace__ecere__com__DataMember;
1190 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
1196 const char * dataTypeString;
1197 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1198 } __attribute__ ((gcc_struct)) __anon1;
1199 struct __ecereNameSpace__ecere__com__DataValue expression;
1202 const char * memberString;
1205 struct __ecereNameSpace__ecere__com__DataMember * member;
1206 struct __ecereNameSpace__ecere__com__Property * prop;
1207 struct __ecereNameSpace__ecere__com__Method * method;
1208 } __attribute__ ((gcc_struct)) __anon1;
1209 } __attribute__ ((gcc_struct)) __anon2;
1210 } __attribute__ ((gcc_struct)) __anon1;
1211 } __attribute__ ((gcc_struct));
1213 struct __ecereNameSpace__ecere__com__DataMember
1215 struct __ecereNameSpace__ecere__com__DataMember * prev;
1216 struct __ecereNameSpace__ecere__com__DataMember * next;
1218 unsigned int isProperty;
1221 struct __ecereNameSpace__ecere__com__Class * _class;
1222 const char * dataTypeString;
1223 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1224 struct Type * dataType;
1228 struct __ecereNameSpace__ecere__sys__OldList members;
1229 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
1231 short structAlignment;
1232 short pointerAlignment;
1233 } __attribute__ ((gcc_struct));
1235 extern struct __ecereNameSpace__ecere__com__ClassTemplateArgument * FindTemplateArg(struct __ecereNameSpace__ecere__com__Class * _class, struct TemplateParameter * param);
1237 struct __ecereNameSpace__ecere__com__BitMember;
1239 struct __ecereNameSpace__ecere__com__BitMember
1241 struct __ecereNameSpace__ecere__com__BitMember * prev;
1242 struct __ecereNameSpace__ecere__com__BitMember * next;
1244 unsigned int isProperty;
1247 struct __ecereNameSpace__ecere__com__Class * _class;
1248 const char * dataTypeString;
1249 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
1250 struct Type * dataType;
1255 } __attribute__ ((gcc_struct));
1257 struct __ecereNameSpace__ecere__com__ClassProperty;
1259 struct __ecereNameSpace__ecere__com__ClassProperty
1262 struct __ecereNameSpace__ecere__com__ClassProperty * parent;
1263 struct __ecereNameSpace__ecere__com__ClassProperty * left;
1264 struct __ecereNameSpace__ecere__com__ClassProperty * right;
1266 void (* Set)(struct __ecereNameSpace__ecere__com__Class *, long long);
1267 long long (* Get)(struct __ecereNameSpace__ecere__com__Class *);
1268 const char * dataTypeString;
1269 struct Type * dataType;
1270 unsigned int constant;
1271 } __attribute__ ((gcc_struct));
1273 struct ClassDefinition;
1277 struct External * prev;
1278 struct External * next;
1279 struct Location loc;
1281 struct Symbol * symbol;
1284 struct FunctionDefinition * function;
1285 struct ClassDefinition * _class;
1286 struct Declaration * declaration;
1287 char * importString;
1288 struct Identifier * id;
1289 struct DBTableDef * table;
1290 } __attribute__ ((gcc_struct)) __anon1;
1292 struct External * fwdDecl;
1293 struct __ecereNameSpace__ecere__com__Instance * outgoing;
1294 struct __ecereNameSpace__ecere__com__Instance * incoming;
1295 int nonBreakableIncoming;
1296 } __attribute__ ((gcc_struct));
1300 struct Context * parent;
1301 struct __ecereNameSpace__ecere__sys__BinaryTree types;
1302 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1303 struct __ecereNameSpace__ecere__sys__BinaryTree symbols;
1304 struct __ecereNameSpace__ecere__sys__BinaryTree structSymbols;
1307 struct __ecereNameSpace__ecere__sys__BinaryTree templateTypes;
1308 struct ClassDefinition * classDef;
1309 unsigned int templateTypesOnly;
1310 unsigned int hasNameSpace;
1311 } __attribute__ ((gcc_struct));
1313 struct ClassDefinition
1315 struct ClassDefinition * prev;
1316 struct ClassDefinition * next;
1317 struct Location loc;
1318 struct Specifier * _class;
1319 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
1320 struct __ecereNameSpace__ecere__sys__OldList * definitions;
1321 struct Symbol * symbol;
1322 struct Location blockStart;
1323 struct Location nameLoc;
1325 unsigned int deleteWatchable;
1326 } __attribute__ ((gcc_struct));
1328 void __ecereMethod_External_CreateUniqueEdge(struct External * this, struct External * from, unsigned int soft);
1334 struct Enumerator * prev;
1335 struct Enumerator * next;
1336 struct Location loc;
1337 struct Identifier * id;
1338 struct Expression * exp;
1339 } __attribute__ ((gcc_struct));
1341 struct TemplateArgument;
1343 struct TemplateParameter
1345 struct TemplateParameter * prev;
1346 struct TemplateParameter * next;
1347 struct Location loc;
1349 struct Identifier * identifier;
1352 struct TemplateDatatype * dataType;
1354 } __attribute__ ((gcc_struct)) __anon1;
1355 struct TemplateArgument * defaultArgument;
1356 const char * dataTypeString;
1357 struct Type * baseType;
1358 } __attribute__ ((gcc_struct));
1360 struct TemplateArgument
1362 struct TemplateArgument * prev;
1363 struct TemplateArgument * next;
1364 struct Location loc;
1365 struct Identifier * name;
1369 struct Expression * expression;
1370 struct Identifier * identifier;
1371 struct TemplateDatatype * templateDatatype;
1372 } __attribute__ ((gcc_struct)) __anon1;
1373 } __attribute__ ((gcc_struct));
1377 typedef union YYSTYPE
1382 struct Identifier * id;
1383 struct Expression * exp;
1384 struct Specifier * specifier;
1385 struct __ecereNameSpace__ecere__sys__OldList * list;
1386 struct Enumerator * enumerator;
1387 struct Declarator * declarator;
1388 struct Pointer * pointer;
1389 struct Initializer * initializer;
1390 struct InitDeclarator * initDeclarator;
1391 struct TypeName * typeName;
1392 struct Declaration * declaration;
1393 struct Statement * stmt;
1394 struct FunctionDefinition * function;
1395 struct External * external;
1396 struct Context * context;
1397 struct AsmField * asmField;
1398 struct Attrib * attrib;
1399 struct ExtDecl * extDecl;
1400 struct Attribute * attribute;
1401 struct Instantiation * instance;
1402 struct MembersInit * membersInit;
1403 struct MemberInit * memberInit;
1404 struct ClassFunction * classFunction;
1405 struct ClassDefinition * _class;
1406 struct ClassDef * classDef;
1407 struct PropertyDef * prop;
1409 struct Symbol * symbol;
1410 struct PropertyWatch * propertyWatch;
1411 struct TemplateParameter * templateParameter;
1412 struct TemplateArgument * templateArgument;
1413 struct TemplateDatatype * templateDatatype;
1414 struct DBTableEntry * dbtableEntry;
1415 struct DBIndexItem * dbindexItem;
1416 struct DBTableDef * dbtableDef;
1417 } __attribute__ ((gcc_struct)) YYSTYPE;
1419 extern YYSTYPE yylval;
1423 struct ClassDef * prev;
1424 struct ClassDef * next;
1425 struct Location loc;
1429 struct Declaration * decl;
1430 struct ClassFunction * function;
1431 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1432 struct PropertyDef * propertyDef;
1433 struct PropertyWatch * propertyWatch;
1435 struct Identifier * defaultProperty;
1438 struct Identifier * id;
1439 struct Initializer * initializer;
1440 } __attribute__ ((gcc_struct)) __anon1;
1441 } __attribute__ ((gcc_struct)) __anon1;
1444 } __attribute__ ((gcc_struct));
1446 extern struct ClassDef * MkClassDefFunction(struct ClassFunction * function);
1448 struct __ecereNameSpace__ecere__com__NameSpace;
1450 struct __ecereNameSpace__ecere__com__NameSpace
1453 struct __ecereNameSpace__ecere__com__NameSpace * btParent;
1454 struct __ecereNameSpace__ecere__com__NameSpace * left;
1455 struct __ecereNameSpace__ecere__com__NameSpace * right;
1457 struct __ecereNameSpace__ecere__com__NameSpace * parent;
1458 struct __ecereNameSpace__ecere__sys__BinaryTree nameSpaces;
1459 struct __ecereNameSpace__ecere__sys__BinaryTree classes;
1460 struct __ecereNameSpace__ecere__sys__BinaryTree defines;
1461 struct __ecereNameSpace__ecere__sys__BinaryTree functions;
1462 } __attribute__ ((gcc_struct));
1464 struct __ecereNameSpace__ecere__com__Class
1466 struct __ecereNameSpace__ecere__com__Class * prev;
1467 struct __ecereNameSpace__ecere__com__Class * next;
1473 unsigned int (* Constructor)(void * );
1474 void (* Destructor)(void * );
1477 struct __ecereNameSpace__ecere__com__Class * base;
1478 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
1479 struct __ecereNameSpace__ecere__sys__BinaryTree members;
1480 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
1481 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
1482 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
1483 struct __ecereNameSpace__ecere__sys__OldList derivatives;
1487 struct __ecereNameSpace__ecere__com__Instance * module;
1488 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
1489 const char * dataTypeString;
1490 struct Type * dataType;
1492 int defaultAlignment;
1493 void (* Initialize)();
1495 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
1496 const char * designerClass;
1497 unsigned int noExpansion;
1498 const char * defaultProperty;
1499 unsigned int comRedefinition;
1502 unsigned int internalDecl;
1504 unsigned int computeSize;
1505 short structAlignment;
1506 short pointerAlignment;
1507 int destructionWatchOffset;
1509 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
1510 int inheritanceAccess;
1511 const char * fullName;
1513 struct __ecereNameSpace__ecere__sys__OldList conversions;
1514 struct __ecereNameSpace__ecere__sys__OldList templateParams;
1515 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
1516 struct __ecereNameSpace__ecere__com__Class * templateClass;
1517 struct __ecereNameSpace__ecere__sys__OldList templatized;
1519 unsigned int isInstanceClass;
1520 unsigned int byValueSystemClass;
1521 } __attribute__ ((gcc_struct));
1523 struct __ecereNameSpace__ecere__com__Application
1526 const char * * argv;
1528 unsigned int isGUIApp;
1529 struct __ecereNameSpace__ecere__sys__OldList allModules;
1530 char * parsedCommand;
1531 struct __ecereNameSpace__ecere__com__NameSpace systemNameSpace;
1532 } __attribute__ ((gcc_struct));
1534 void GetNameSpaceString(struct __ecereNameSpace__ecere__com__NameSpace * ns, char * string)
1537 GetNameSpaceString(ns->parent, string);
1540 strcat(string, ns->name);
1541 strcat(string, "::");
1545 static struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassPropertyValue;
1547 struct External * ProcessClassFunction(struct __ecereNameSpace__ecere__com__Class * owningClass, struct ClassFunction * func, struct __ecereNameSpace__ecere__sys__OldList * defs, struct External * after, unsigned int makeStatic)
1549 struct Type * type = (((void *)0));
1550 struct Symbol * symbol;
1551 struct External * external = (((void *)0));
1553 if(defs && func->declarator)
1555 struct FunctionDefinition * function = (((void *)0));
1556 struct Symbol * propSymbol;
1560 if(!func->specifiers)
1561 func->specifiers = MkList();
1564 struct Specifier * s;
1566 for(s = (*func->specifiers).first; s; s = s->next)
1567 if(s->type == 0 && s->__anon1.specifier == STATIC)
1570 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*func->specifiers), (((void *)0)), MkSpecifier(STATIC));
1573 propSymbol = func->declarator->symbol;
1574 ReplaceThisClassSpecifiers(func->specifiers, owningClass);
1575 if(propSymbol->__anon2.__anon2.externalGet == (struct External *)func)
1576 func->declarator->symbol = (((void *)0));
1577 else if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func)
1578 func->declarator->symbol = (((void *)0));
1579 else if(propSymbol->__anon2.__anon2.externalIsSet == (struct External *)func)
1580 func->declarator->symbol = (((void *)0));
1582 function = _MkFunction(func->specifiers, func->declarator, (((void *)0)), 0);
1583 function->propSet = func->propSet;
1584 function->type = func->type;
1586 func->type->refCount++;
1587 ProcessFunctionBody(function, func->body);
1588 external = MkExternalFunction(function);
1589 external->symbol = func->declarator->symbol;
1590 external->__anon1.function->_class = func->_class;
1592 symbol = func->declarator->symbol;
1593 if(!func->dontMangle)
1595 struct __ecereNameSpace__ecere__com__Method * method = func->declarator->symbol->__anon1.method;
1597 func->declarator->symbol->__anon2.__anon3.methodExternal = external;
1598 if(method && method->symbol)
1599 ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal = external;
1600 if(method && method->type == 1)
1602 struct Type * methodDataType;
1604 ProcessMethodType(method);
1605 methodDataType = method->dataType;
1606 type = symbol->type;
1607 if(!type->__anon1.__anon2.staticMethod && !type->__anon1.__anon2.thisClass && !type->__anon1.__anon2.thisClassTemplate)
1609 if(method->dataType->__anon1.__anon2.thisClassTemplate)
1611 if(owningClass->templateArgs)
1613 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * arg = FindTemplateArg(owningClass, method->dataType->__anon1.__anon2.thisClassTemplate);
1615 type->byReference = method->dataType->byReference;
1616 methodDataType = ProcessTypeString(method->dataTypeString, 0);
1617 type->__anon1.__anon2.thisClass = methodDataType->__anon1.__anon2.thisClass = arg ? FindClass((*arg).__anon1.__anon1.dataTypeString) : (((void *)0));
1620 else if(method->dataType->__anon1.__anon2.staticMethod)
1621 type->__anon1.__anon2.staticMethod = 1;
1622 else if(method->dataType->__anon1.__anon2.thisClass)
1624 type->__anon1.__anon2.thisClass = method->dataType->__anon1.__anon2.thisClass;
1625 type->byReference = method->dataType->byReference;
1629 if(!owningClass->symbol)
1630 owningClass->symbol = FindClass(owningClass->fullName);
1631 type->__anon1.__anon2.thisClass = owningClass->symbol;
1632 type->extraParam = 1;
1636 if(!MatchTypes(type, methodDataType, (((void *)0)), owningClass, method->_class, 1, 1, 1, 0, 1))
1638 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Incompatible virtual function %s\n", (((void *)0))), method->name);
1642 struct Type * typeParam;
1643 struct Declarator * funcDecl = GetFuncDecl(func->declarator);
1645 if(funcDecl->__anon1.function.parameters && (*funcDecl->__anon1.function.parameters).first)
1647 struct TypeName * param = (*funcDecl->__anon1.function.parameters).first;
1649 for(typeParam = methodDataType->__anon1.__anon2.params.first; typeParam && param; typeParam = typeParam->next)
1651 if(typeParam->classObjectType)
1653 param->classObjectType = typeParam->classObjectType;
1654 if(param->declarator && param->declarator->symbol)
1655 param->declarator->symbol->type->classObjectType = typeParam->classObjectType;
1657 param = param ? param->next : (((void *)0));
1661 if(methodDataType != method->dataType)
1662 FreeType(methodDataType);
1666 type = symbol->type;
1667 if(!type->__anon1.__anon2.staticMethod && !type->__anon1.__anon2.thisClass)
1669 if(owningClass && !owningClass->symbol)
1670 owningClass->symbol = FindClass(owningClass->fullName);
1671 type->__anon1.__anon2.thisClass = owningClass ? FindClass(owningClass->fullName) : (((void *)0));
1677 if(symbol->type && !symbol->type->__anon1.__anon2.staticMethod && !symbol->type->__anon1.__anon2.thisClass)
1679 if(!owningClass->symbol)
1680 owningClass->symbol = FindClass(owningClass->fullName);
1681 symbol->type->__anon1.__anon2.thisClass = owningClass->symbol;
1683 if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func && propSymbol->__anon1._property && propSymbol->__anon1._property->conversion)
1685 if(symbol->type->__anon1.__anon2.thisClass && symbol->type->classObjectType != 1)
1687 if(owningClass->type != 1)
1688 symbol->type->__anon1.__anon2.thisClass = (((void *)0));
1691 if(propSymbol->__anon2.__anon2.externalGet == (struct External *)func)
1693 propSymbol->__anon2.__anon2.externalGet = external;
1695 else if(propSymbol->__anon2.__anon2.externalSet == (struct External *)func)
1697 propSymbol->__anon2.__anon2.externalSet = external;
1699 else if(propSymbol->__anon2.__anon2.externalIsSet == (struct External *)func)
1701 propSymbol->__anon2.__anon2.externalIsSet = external;
1711 func->declarator = (((void *)0));
1712 func->specifiers = (((void *)0));
1713 func->body = (((void *)0));
1714 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, external);
1718 struct __ecereNameSpace__ecere__com__Method * method = func->declarator->symbol->__anon1.method;
1720 if(method && method->symbol)
1721 ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal = (((void *)0));
1722 if(func->declarator->symbol && func->declarator->symbol->__anon2.__anon3.methodExternal == external)
1723 func->declarator->symbol->__anon2.__anon3.methodExternal = (((void *)0));
1724 func->declarator = (((void *)0));
1725 func->specifiers = (((void *)0));
1726 FreeExternal(external);
1731 __ecereMethod___ecereNameSpace__ecere__sys__BinaryTree_Remove(&globalContext->symbols, (struct __ecereNameSpace__ecere__sys__BTNode *)symbol);
1732 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), symbol);
1733 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(defs, after, external);
1734 external->__anon1.function->declarator = CopyDeclarator(external->__anon1.function->declarator);
1735 external->__anon1.function->specifiers = CopyList(external->__anon1.function->specifiers, (void *)(CopySpecifier));
1736 external->__anon1.function->body = (((void *)0));
1742 void RegisterMembersAndProperties(struct __ecereNameSpace__ecere__com__Class * regClass, unsigned int isMember, const char * className, struct Statement * statement)
1744 struct __ecereNameSpace__ecere__com__DataMember * dataMember = isMember ? (struct __ecereNameSpace__ecere__com__DataMember *)regClass : (((void *)0));
1745 struct __ecereNameSpace__ecere__com__DataMember * member;
1746 struct __ecereNameSpace__ecere__com__Property * prop;
1747 struct Expression * exp;
1748 struct Statement * stmt;
1749 char dataMemberSize[16];
1750 unsigned int lastOffset = 0;
1752 unsigned int privateMembers = 0;
1754 sprintf(dataMemberSize, "%d", (int)sizeof(struct __ecereNameSpace__ecere__com__DataMember *));
1757 for(prop = regClass->conversions.first; prop; prop = prop->next)
1759 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1762 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1763 ListAdd(args, MkExpConstant("0"));
1765 char * string = QMkString(prop->dataTypeString);
1767 ListAdd(args, MkExpString(string));
1768 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1772 strcpy(name, "__ecereProp_");
1773 FullClassNameCat(name, regClass->fullName, 0);
1774 strcat(name, "_Set_");
1775 FullClassNameCat(name, prop->name, 1);
1776 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1779 ListAdd(args, MkExpConstant("0"));
1782 strcpy(name, "__ecereProp_");
1783 FullClassNameCat(name, regClass->fullName, 0);
1784 strcat(name, "_Get_");
1785 FullClassNameCat(name, prop->name, 1);
1786 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1789 ListAdd(args, MkExpConstant("0"));
1790 switch(prop->memberAccess)
1793 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1796 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1800 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1803 strcpy(name, "__ecereProp_");
1804 FullClassNameCat(name, regClass->fullName, 0);
1806 FullClassNameCat(name, prop->name, 1);
1807 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args))));
1808 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1811 for(member = isMember ? dataMember->members.first : regClass->membersAndProperties.first; member; member = member->next)
1813 if(member->isProperty)
1815 prop = (struct __ecereNameSpace__ecere__com__Property *)member;
1817 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1818 char name[1024], nameM[1024];
1819 char * string = QMkString(prop->name);
1821 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1822 ListAdd(args, MkExpString(string));
1823 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1825 char * string = QMkString(prop->dataTypeString);
1827 ListAdd(args, MkExpString(string));
1828 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1832 strcpy(name, "__ecereProp_");
1833 FullClassNameCat(name, regClass->fullName, 0);
1834 strcat(name, "_Set_");
1835 FullClassNameCat(name, prop->name, 1);
1836 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1839 ListAdd(args, MkExpConstant("0"));
1842 strcpy(name, "__ecereProp_");
1843 FullClassNameCat(name, regClass->fullName, 0);
1844 strcat(name, "_Get_");
1845 FullClassNameCat(name, prop->name, 1);
1846 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
1849 ListAdd(args, MkExpConstant("0"));
1850 switch(prop->memberAccess)
1853 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1856 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1860 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1863 strcpy(name, "__ecereProp_");
1864 FullClassNameCat(name, regClass->fullName, 0);
1866 FullClassNameCat(name, prop->name, 1);
1867 strcpy(nameM, "__ecerePropM_");
1868 FullClassNameCat(nameM, regClass->fullName, 0);
1870 FullClassNameCat(nameM, prop->name, 1);
1871 if(prop->dataTypeString)
1873 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args))));
1877 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddProperty")), args)));
1879 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1884 strcpy(name, "__ecereProp_");
1885 FullClassNameCat(name, regClass->fullName, 1);
1886 strcat(name, "_IsSet_");
1887 FullClassNameCat(name, prop->name, 0);
1888 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))))));
1889 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1891 if(prop->symbol && ((struct Symbol *)prop->symbol)->propCategory)
1893 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier(nameM)), MkIdentifier("category")), '=', CopyExpression(((struct Symbol *)prop->symbol)->propCategory))));
1894 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1896 if(prop->dataTypeString)
1898 struct __ecereNameSpace__ecere__sys__OldList * list = MkList();
1900 ListAdd(list, MkExpOp(MkExpIdentifier(MkIdentifier(name)), '=', MkExpIdentifier(MkIdentifier(nameM))));
1901 ListAdd(list, MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0"))));
1902 stmt = MkIfStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("module")), MkIdentifier("application")), EQ_OP, MkExpMember(MkExpIdentifier(MkIdentifier("__thisModule")), MkIdentifier("application")))), MkExpressionStmt(list), (((void *)0)));
1903 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
1904 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier(nameM)), '=', MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")))));
1905 ListAdd(unregisterModuleBody->__anon1.compound.statements, stmt);
1909 else if(member->type == 0 && !isMember && regClass->type == 2)
1911 struct __ecereNameSpace__ecere__com__BitMember * bitMember = (struct __ecereNameSpace__ecere__com__BitMember *)member;
1912 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
1914 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1916 char * string = QMkString(bitMember->name);
1918 ListAdd(args, MkExpString(string));
1919 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1922 char * string = QMkString(bitMember->dataTypeString);
1924 ListAdd(args, MkExpString(string));
1925 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
1930 sprintf(string, "%d", bitMember->size);
1931 ListAdd(args, (exp = MkExpConstant(string)));
1936 sprintf(string, "%d", bitMember->pos);
1937 ListAdd(args, (exp = MkExpConstant(string)));
1939 switch(member->memberAccess)
1942 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
1945 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1949 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
1952 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddBitMember")), args)));
1953 ListAdd(statement->__anon1.compound.statements, stmt);
1955 else if(member->memberAccess == 1 || (member->type == 0 && !member->dataTypeString))
1957 struct __ecereNameSpace__ecere__sys__OldList * args;
1961 unsigned int offset = member->offset - lastOffset;
1964 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1968 sprintf(string, "\"__ecerePrivateData%d\"", privateID++);
1969 ListAdd(args, MkExpString(string));
1974 sprintf(string, "\"byte[%d]\"", offset);
1975 ListAdd(args, MkExpString(string));
1980 sprintf(string, "%d", offset);
1981 ListAdd(args, (exp = MkExpConstant(string)));
1983 ListAdd(args, (exp = MkExpConstant("1")));
1984 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
1985 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier(isMember ? "eMember_AddDataMember" : "eClass_AddDataMember")), args)));
1986 ListAdd(statement->__anon1.compound.statements, stmt);
1989 if(member->type == 0)
1991 if(!member->dataType)
1992 member->dataType = ProcessTypeString(member->dataTypeString, 0);
1993 ComputeTypeSize(member->dataType);
1995 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
1997 char * string = QMkString(member->name);
1999 ListAdd(args, MkExpString(string));
2000 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2003 char * string = QMkString(member->dataTypeString);
2005 ListAdd(args, MkExpString(string));
2006 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2009 if(__ecereProp_Type_Get_isPointerTypeSize(member->dataType))
2011 ListAdd(args, (exp = MkExpTypeSize(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))))));
2012 ListAdd(args, (exp = MkExpConstant("0xF000F000")));
2018 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))
2021 DeclareStruct(registerModuleExternal, member->dataType->__anon1._class->string, 0, 1);
2022 FullClassNameCat(string, member->dataType->__anon1._class->string, 0);
2023 exp = MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(string), (((void *)0)))), (((void *)0))));
2027 sprintf(string, "%d", member->dataType->size);
2028 exp = MkExpConstant(string);
2031 if(member->dataType->pointerAlignment)
2032 exp = MkExpConstant("0xF000F000");
2035 sprintf(string, "%d", member->dataType->alignment);
2036 exp = MkExpConstant(string);
2041 switch(member->memberAccess)
2044 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2047 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2051 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2054 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier(isMember ? "eMember_AddDataMember" : "eClass_AddDataMember")), args)));
2055 ListAdd(statement->__anon1.compound.statements, stmt);
2056 lastOffset = member->offset + member->dataType->size;
2060 static int memberCount = 0;
2061 struct Context * context;
2062 struct Statement * compound;
2063 char memberName[256];
2065 sprintf(memberName, "dataMember%d", memberCount);
2067 curContext = statement->__anon1.compound.context;
2068 context = PushContext();
2069 args = MkListOne(MkExpIdentifier(MkIdentifier((member->type == 1) ? "unionMember" : "structMember")));
2070 switch(member->memberAccess)
2073 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2076 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2080 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2083 compound = MkCompoundStmt(MkListOne(MkDeclaration(MkListOne(MkSpecifierName("DataMember")), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier(memberName)), MkInitializerAssignment(MkExpCall(MkExpIdentifier(MkIdentifier("eMember_New")), args)))))), MkList());
2084 compound->__anon1.compound.context = context;
2086 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
2087 ListAdd(args, MkExpIdentifier(MkIdentifier(memberName)));
2088 RegisterMembersAndProperties((struct __ecereNameSpace__ecere__com__Class *)member, 1, memberName, compound);
2090 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eMember_AddMember")), args)));
2092 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMember")), args)));
2093 ListAdd(compound->__anon1.compound.statements, stmt);
2094 PopContext(context);
2095 ListAdd(statement->__anon1.compound.statements, compound);
2097 lastOffset = member->offset + member->memberOffset;
2105 struct __ecereNameSpace__ecere__com__ClassProperty * classProperty;
2107 for(prop = regClass->membersAndProperties.first; prop; prop = prop->next)
2109 if(prop->isProperty && prop->isWatchable)
2111 struct __ecereNameSpace__ecere__sys__OldList * args;
2112 char name[1024], nameM[1024];
2114 strcpy(name, "__ecereProp_");
2115 FullClassNameCat(name, regClass->fullName, 1);
2117 FullClassNameCat(name, prop->name, 0);
2118 strcpy(nameM, "__ecerePropM_");
2119 FullClassNameCat(nameM, regClass->fullName, 1);
2121 FullClassNameCat(nameM, prop->name, 0);
2122 args = MkListOne(MkExpCondition(MkExpIdentifier(MkIdentifier(nameM)), MkListOne(MkExpIdentifier(MkIdentifier(nameM))), MkExpIdentifier(MkIdentifier(name))));
2123 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eProperty_Watchable")), args)));
2124 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2127 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)))
2129 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2131 char * string = QMkString(classProperty->name);
2133 ListAdd(args, MkExpIdentifier(MkIdentifier(className)));
2134 ListAdd(args, MkExpString(string));
2135 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2137 char * string = QMkString(classProperty->dataTypeString);
2139 ListAdd(args, MkExpString(string));
2140 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2142 if(classProperty->Set)
2144 strcpy(name, "__ecereClassProp_");
2145 FullClassNameCat(name, regClass->fullName, 1);
2146 strcat(name, "_Set_");
2147 strcat(name, classProperty->name);
2148 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
2151 ListAdd(args, MkExpConstant("0"));
2152 if(classProperty->Get)
2154 strcpy(name, "__ecereClassProp_");
2155 FullClassNameCat(name, regClass->fullName, 1);
2156 strcat(name, "_Get_");
2157 strcat(name, classProperty->name);
2158 ListAdd(args, MkExpIdentifier(MkIdentifier(name)));
2161 ListAdd(args, MkExpConstant("0"));
2162 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddClassProperty")), args)));
2163 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2168 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
2170 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
2172 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
2174 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List_TPL_ClassPropertyValue_;
2176 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__TemplateMemberType;
2178 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__List;
2180 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Module;
2182 struct __ecereNameSpace__ecere__com__Module
2184 struct __ecereNameSpace__ecere__com__Instance * application;
2185 struct __ecereNameSpace__ecere__sys__OldList classes;
2186 struct __ecereNameSpace__ecere__sys__OldList defines;
2187 struct __ecereNameSpace__ecere__sys__OldList functions;
2188 struct __ecereNameSpace__ecere__sys__OldList modules;
2189 struct __ecereNameSpace__ecere__com__Instance * prev;
2190 struct __ecereNameSpace__ecere__com__Instance * next;
2196 struct __ecereNameSpace__ecere__com__NameSpace privateNameSpace;
2197 struct __ecereNameSpace__ecere__com__NameSpace publicNameSpace;
2198 } __attribute__ ((gcc_struct));
2200 void __ecereDestructor_ClassPropertyValue(struct __ecereNameSpace__ecere__com__Instance * this)
2202 __attribute__((unused)) struct ClassPropertyValue * __ecerePointer_ClassPropertyValue = (struct ClassPropertyValue *)(this ? (((char *)this) + __ecereClass_ClassPropertyValue->offset) : 0);
2205 FreeIdentifier(__ecerePointer_ClassPropertyValue->id);
2209 void CreateRegisterModuleBody()
2211 if(!registerModuleBody && inCompiler)
2213 char registerName[1024], moduleName[274];
2214 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
2215 struct Declarator * declarator;
2216 struct TypeName * moduleParam;
2218 registerModuleBody = MkCompoundStmt(MkList(), MkList());
2219 registerModuleBody->__anon1.compound.context = __extension__ ({
2220 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
2222 __ecereInstance1->parent = globalContext, __ecereInstance1;
2224 ListAdd(registerModuleBody->__anon1.compound.declarations, MkDeclaration((specifiers = MkListOne(MkSpecifierName("ecere::com::Class"))), MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("class")), (((void *)0))))));
2225 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*specifiers), MkSpecifierExtended(MkExtDeclAttrib(MkAttrib(ATTRIB, MkListOne(MkAttribute(__ecereNameSpace__ecere__sys__CopyString("unused"), (((void *)0))))))));
2226 specifiers = MkList();
2227 ListAdd(specifiers, MkSpecifier(VOID));
2228 moduleParam = MkTypeName(MkListOne(MkSpecifierName("Module")), MkDeclaratorIdentifier(MkIdentifier("module")));
2229 __ecereNameSpace__ecere__sys__GetLastDirectory(outputFile, moduleName);
2230 __ecereNameSpace__ecere__sys__StripExtension(moduleName);
2231 FixModuleName(moduleName);
2232 sprintf(registerName, "__ecereRegisterModule_%s", moduleName);
2233 declarator = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(registerName)), MkListOne(moduleParam));
2235 struct FunctionDefinition * function = _MkFunction(specifiers, declarator, (((void *)0)), 0);
2237 ProcessFunctionBody(function, registerModuleBody);
2238 function->declMode = 0;
2241 ListAdd(ast, (registerModuleExternal = MkExternalFunction(function)));
2242 DeclareStruct(registerModuleExternal, "ecere::com::Instance", 0, 1);
2243 DeclareStruct(registerModuleExternal, "ecere::com::Module", 0, 1);
2246 if(!unregisterModuleBody && inCompiler)
2248 char registerName[1024], moduleName[274];
2249 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
2250 struct Declarator * declarator;
2251 struct TypeName * moduleParam;
2253 unregisterModuleBody = MkCompoundStmt(MkList(), MkList());
2254 unregisterModuleBody->__anon1.compound.context = __extension__ ({
2255 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
2257 __ecereInstance1->parent = globalContext, __ecereInstance1;
2259 specifiers = MkList();
2260 ListAdd(specifiers, MkSpecifier(VOID));
2261 moduleParam = MkTypeName(MkListOne(MkSpecifierName("Module")), MkDeclaratorIdentifier(MkIdentifier("module")));
2262 __ecereNameSpace__ecere__sys__GetLastDirectory(outputFile, moduleName);
2263 __ecereNameSpace__ecere__sys__StripExtension(moduleName);
2264 FixModuleName(moduleName);
2265 sprintf(registerName, "__ecereUnregisterModule_%s", moduleName);
2266 declarator = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(registerName)), MkListOne(moduleParam));
2268 struct FunctionDefinition * function = _MkFunction(specifiers, declarator, (((void *)0)), 0);
2270 ProcessFunctionBody(function, unregisterModuleBody);
2271 function->declMode = 0;
2274 ListAdd(ast, (unregisterModuleExternal = MkExternalFunction(function)));
2275 DeclareStruct(unregisterModuleExternal, "ecere::com::Instance", 0, 1);
2276 DeclareStruct(unregisterModuleExternal, "ecere::com::Module", 0, 1);
2281 void __ecereCreateModuleInstances_pass1()
2283 classPropValues = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__com__List_TPL_ClassPropertyValue_);
2284 __ecereNameSpace__ecere__com__eInstance_IncRef(classPropValues);
2287 void __ecereUnregisterModule_pass1(struct __ecereNameSpace__ecere__com__Instance * module)
2292 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)
2294 struct ClassDef * def;
2295 struct __ecereNameSpace__ecere__com__Class * regClass = symbol->__anon1.registered;
2299 classType = regClass->type;
2300 if(classType == 4 && enumValues && (inCompiler || !buildingECERECOMModule))
2302 struct Enumerator * e;
2304 for(e = enumValues->first; e; e = e->next)
2308 struct Type * destType = (destType = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type), destType->kind = 4, destType->refCount = 1, destType);
2310 e->exp->destType = destType;
2312 ProcessExpressionType(e->exp);
2314 if(!e->exp->expType)
2317 destType->__anon1._class = symbol;
2318 ProcessExpressionType(e->exp);
2320 if(e->exp->type == 0 && e->exp->expType && e->exp->__anon1.__anon1.identifier && e->exp->__anon1.__anon1.identifier->string && e->exp->expType->kind == 15)
2322 struct __ecereNameSpace__ecere__sys__NamedLink64 * l;
2323 char * string = e->exp->__anon1.__anon1.identifier->string;
2325 for(l = e->exp->expType->__anon1.__anon1.members.first; l; l = l->next)
2327 if(!strcmp(l->name, string))
2331 FreeExpContents(e->exp);
2333 e->exp->__anon1.__anon1.constant = PrintInt64(l->data);
2334 FreeType(e->exp->expType);
2335 e->exp->expType = ProcessTypeString("int64", 0);
2342 ComputeExpression(e->exp);
2343 if(e->exp->isConstant && e->exp->type == 2)
2345 struct Operand op = GetOperand(e->exp);
2351 value = op.type->isSigned ? (long long)op.__anon1.c : (long long)op.__anon1.uc;
2354 value = op.type->isSigned ? (long long)op.__anon1.s : (long long)op.__anon1.us;
2357 value = op.type->isSigned ? op.__anon1.i64 : (long long)op.__anon1.ui64;
2361 value = op.type->isSigned ? (long long)op.__anon1.i : (int)op.__anon1.ui;
2363 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(regClass, e->id->string, value);
2366 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2369 __ecereNameSpace__ecere__com__eEnum_AddValue(regClass, e->id->string);
2372 struct __ecereNameSpace__ecere__com__EnumClassData * baseData = regClass->data;
2373 struct __ecereNameSpace__ecere__sys__OldLink * deriv;
2375 for(deriv = regClass->derivatives.first; deriv; deriv = deriv->next)
2377 struct __ecereNameSpace__ecere__com__Class * c = deriv->data;
2379 if(c && c->type == 4)
2381 struct __ecereNameSpace__ecere__com__EnumClassData * data = c->data;
2383 data->largest = baseData->largest;
2388 if(definitions != (((void *)0)))
2392 for(def = definitions->first; def; def = def->next)
2394 if(def->type == 4 && def->__anon1.propertyWatch)
2396 struct PropertyWatch * propWatch = def->__anon1.propertyWatch;
2397 struct ClassFunction * func;
2398 char watcherName[1024];
2399 struct Identifier * propID;
2400 struct Statement * stmt = MkExpressionStmt(MkList());
2401 struct Declarator * decl;
2402 struct __ecereNameSpace__ecere__sys__OldList * specs;
2404 sprintf(watcherName, "__ecerePropertySelfWatcher_%d", propWatcherID++);
2405 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
2407 strcat(watcherName, "_");
2408 strcat(watcherName, propID->string);
2410 decl = MkDeclaratorFunction(MkDeclaratorIdentifier(MkIdentifier(watcherName)), MkListOne(MkTypeName(MkListOne(MkSpecifier(VOID)), (((void *)0)))));
2412 ListAdd(specs, MkSpecifier(STATIC));
2413 ListAdd(specs, MkSpecifier(VOID));
2414 func = MkClassFunction(specs, (((void *)0)), decl, (((void *)0)));
2415 ProcessClassFunctionBody(func, propWatch->compound);
2416 decl->symbol = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Symbol);
2417 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*excludedSymbols), decl->symbol);
2418 func->dontMangle = 1;
2419 propWatch->compound = (((void *)0));
2420 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert(definitions, (((void *)0)), MkClassDefFunction(func));
2421 for(propID = (*propWatch->properties).first; propID; propID = propID->next)
2423 struct __ecereNameSpace__ecere__com__Property * prop = __ecereNameSpace__ecere__com__eClass_FindProperty(regClass, propID->string, privateModule);
2427 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2429 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2431 char * s = QMkString(propID->string);
2433 ListAdd(args, MkExpString(s));
2434 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2436 ListAdd(args, MkExpIdentifier(MkIdentifier(watcherName)));
2437 ListAdd(stmt->__anon1.expressions, MkExpCall(MkExpIdentifier(MkIdentifier("eProperty_SelfWatch")), args));
2440 Compiler_Error(__ecereNameSpace__ecere__GetTranslatedString("ec", "Property %s not found in class %s\n", (((void *)0))), propID->string, regClass->fullName);
2442 FreePropertyWatch(def->__anon1.propertyWatch);
2443 def->__anon1.propertyWatch = (struct PropertyWatch *)stmt;
2447 for(def = definitions->first; def; def = def->next)
2451 ProcessClassFunction(regClass, def->__anon1.function, defs, external->prev, declMode == 3);
2455 if(inCompiler && symbol->mustRegister && regClass)
2457 struct Statement * stmt;
2458 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2459 struct __ecereNameSpace__ecere__com__Method * method;
2460 struct Expression * exp;
2461 const char * registerFunction = (((void *)0));
2462 int inheritanceAccess = 1;
2464 CreateRegisterModuleBody();
2465 curExternal = registerModuleExternal;
2466 switch(regClass->type)
2469 ListAdd(args, MkExpIdentifier(MkIdentifier("structClass")));
2472 ListAdd(args, MkExpIdentifier(MkIdentifier("bitClass")));
2475 ListAdd(args, MkExpIdentifier(MkIdentifier("enumClass")));
2478 ListAdd(args, MkExpIdentifier(MkIdentifier("noHeadClass")));
2481 ListAdd(args, MkExpIdentifier(MkIdentifier("unitClass")));
2484 ListAdd(args, MkExpIdentifier(MkIdentifier("normalClass")));
2488 char nameSpace[1024] = "";
2489 char className[1024] = "";
2492 GetNameSpaceString(regClass->nameSpace, nameSpace);
2495 __ecereNameSpace__ecere__sys__GetLastDirectory(sourceFile, className);
2496 __ecereNameSpace__ecere__sys__ChangeCh(className, '.', '_');
2497 strcat(className, "}");
2499 strcat(className, nameSpace);
2500 strcat(className, regClass->name);
2501 string = QMkString(className);
2502 ListAdd(args, MkExpString(string));
2503 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2505 if(baseSpecs != (((void *)0)))
2507 struct Type * baseType = ProcessType(baseSpecs, (((void *)0)));
2509 if(baseType->kind != 9 && baseType->kind != 10)
2511 char baseName[1024] = "";
2514 if(baseType->kind == 8 && baseType->__anon1._class && baseType->__anon1._class->isStatic)
2516 __ecereNameSpace__ecere__sys__GetLastDirectory(sourceFile, baseName);
2517 __ecereNameSpace__ecere__sys__ChangeCh(baseName, '.', '_');
2518 strcat(baseName, "}");
2519 strcat(baseName, baseType->__anon1._class->string);
2522 PrintType(baseType, baseName, 0, 1);
2523 string = QMkString(baseName);
2524 ListAdd(args, MkExpString(string));
2525 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2528 ListAdd(args, MkExpConstant("0"));
2530 if(((struct Specifier *)baseSpecs->first)->type == 0 && ((struct Specifier *)baseSpecs->first)->__anon1.specifier == PRIVATE)
2531 inheritanceAccess = 2;
2534 ListAdd(args, MkExpConstant("0"));
2535 if(regClass->type == 1 || regClass->type == 0 || regClass->type == 5)
2537 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
2540 struct __ecereNameSpace__ecere__com__Class * base;
2542 for(base = regClass->base; base && base->type != 1000; base = base->next)
2544 for(member = base->membersAndProperties.first; member; member = member->next)
2545 if(!member->isProperty)
2551 if(regClass->type == 1 && symbol->declaredStruct && member)
2553 char baseStructName[1024];
2555 baseStructName[0] = (char)0;
2556 strcpy(baseStructName, (regClass->base->templateClass ? regClass->base->templateClass : regClass->base)->fullName);
2557 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))))));
2560 ListAdd(args, symbol->declaredStruct ? MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(symbol->structName), (((void *)0)))), (((void *)0)))) : MkExpConstant("0"));
2564 ListAdd(args, MkExpConstant("0"));
2567 char classDataStructName[1024];
2569 strcpy(classDataStructName, "__ecereClassData_");
2570 FullClassNameCat(classDataStructName, symbol->string, 0);
2571 ListAdd(args, symbol->classData ? MkExpTypeSize(MkTypeName(MkListOne(MkStructOrUnion(3, MkIdentifier(classDataStructName), (((void *)0)))), (((void *)0)))) : MkExpConstant("0"));
2573 if(regClass->type == 0 || regClass->type == 5)
2575 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), symbol->needConstructor ? MkExpIdentifier(MkIdentifier(symbol->constructorName)) : MkExpConstant("0")));
2576 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), symbol->needDestructor ? MkExpIdentifier(MkIdentifier(symbol->destructorName)) : MkExpConstant("0")));
2580 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")));
2581 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpConstant("0")));
2583 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
2587 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2590 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2594 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
2597 switch(inheritanceAccess)
2600 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2604 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2607 registerFunction = "eSystem_RegisterClass";
2608 stmt = MkExpressionStmt(MkListOne(MkExpOp(MkExpIdentifier(MkIdentifier("class")), '=', MkExpCall((exp = MkExpIdentifier(MkIdentifier(registerFunction))), args))));
2609 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2610 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)));
2611 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2612 if(external && external->type == 2 && external->__anon1._class->deleteWatchable)
2614 args = MkListOne(MkExpIdentifier(MkIdentifier("class")));
2615 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_DestructionWatchable")), args)));
2616 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2620 struct __ecereNameSpace__ecere__com__Class * base = regClass->base;
2623 for(c = 0; c < base->vTblSize; c++)
2625 struct Symbol * method = (struct Symbol *)regClass->_vTbl[c];
2627 if((void *)method != DummyMethod && base->_vTbl[c] != (void *)method && method->__anon2.__anon3.methodExternal)
2629 struct External * external = method->__anon2.__anon3.methodExternal;
2630 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2631 struct Identifier * id = external->__anon1.function ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2634 struct External * e = method->__anon2.__anon3.methodExternal ? method->__anon2.__anon3.methodExternal : method->__anon2.__anon3.methodCodeExternal;
2636 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, e, e->type == 0);
2638 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2640 char * string = QMkString(method->__anon1.method->name);
2642 ListAdd(args, MkExpString(string));
2643 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2645 ListAdd(args, MkExpConstant("0"));
2646 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2647 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2648 exp->expType = __extension__ ({
2649 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2651 __ecereInstance1->refCount = 1, __ecereInstance1;
2653 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMethod")), args)));
2654 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2661 for(c = regClass->base ? regClass->base->vTblSize : 0; c < regClass->vTblSize; c++)
2663 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)))
2665 if(method->type == 1 && method->_class == regClass && method->vid == c)
2668 struct Expression * exp;
2669 struct External * external = method->symbol ? ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal : (((void *)0));
2670 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2671 struct Identifier * id = (external && external->__anon1.function) ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2673 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2675 char * string = QMkString(method->name);
2677 ListAdd(args, MkExpString(string));
2678 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2681 char * string = QMkString(method->dataTypeString);
2683 ListAdd(args, MkExpString(string));
2684 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2686 if(id && external->__anon1.function->body)
2688 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2689 exp->expType = __extension__ ({
2690 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2692 __ecereInstance1->refCount = 1, __ecereInstance1;
2697 ListAdd(args, (exp = MkExpConstant("0")));
2699 switch(method->memberAccess)
2702 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2705 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2709 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2712 strcpy(name, "__ecereVMethodID_");
2713 FullClassNameCat(name, method->_class->fullName, 0);
2715 strcat(name, method->name);
2716 exp = MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddVirtualMethod")), args);
2717 stmt = MkExpressionStmt(MkListOne(exp));
2719 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, external, external->type == 0);
2720 DeclareMethod(curExternal, method, name);
2721 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2726 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)))
2728 if(method->type == 1 && method->_class == regClass)
2730 else if(method->memberAccess == 1 || !method->dataTypeString)
2732 struct External * external = method->symbol ? ((struct Symbol *)method->symbol)->__anon2.__anon3.methodCodeExternal : (((void *)0));
2733 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2734 struct Identifier * id = (external && external->__anon1.function) ? GetDeclId(external->__anon1.function->declarator) : (((void *)0));
2736 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2738 char * string = QMkString(method->name);
2740 ListAdd(args, MkExpString(string));
2741 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2744 char * string = QMkString(method->dataTypeString);
2746 ListAdd(args, MkExpString(string));
2747 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2749 if(id && external->__anon1.function->body)
2751 ListAdd(args, (exp = MkExpIdentifier(MkIdentifier(id->string))));
2752 exp->expType = __extension__ ({
2753 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
2755 __ecereInstance1->refCount = 1, __ecereInstance1;
2760 ListAdd(args, (exp = MkExpConstant("0")));
2762 switch(method->memberAccess)
2765 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
2768 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
2772 ListAdd(args, MkExpIdentifier(MkIdentifier("publicAccess")));
2775 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddMethod")), args)));
2776 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2778 __ecereMethod_External_CreateUniqueEdge(registerModuleExternal, external, external->type == 0);
2781 RegisterMembersAndProperties(regClass, 0, "class", registerModuleBody);
2784 struct __ecereNameSpace__ecere__sys__NamedLink64 * value;
2785 struct __ecereNameSpace__ecere__com__Class * enumClass = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "enum");
2786 struct __ecereNameSpace__ecere__com__EnumClassData * e = (regClass ? ((void *)(((char *)regClass->data) + enumClass->offsetClass)) : (((void *)0)));
2788 for(value = e->values.first; value; value = value->next)
2790 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2792 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2794 char * string = QMkString(value->name);
2796 ListAdd(args, MkExpString(string));
2797 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2802 if(!strcmp(regClass->dataTypeString, "uint64"))
2803 temp = PrintUInt64(value->data);
2805 temp = PrintInt64(value->data);
2806 ListAdd(args, MkExpConstant(temp));
2807 (__ecereNameSpace__ecere__com__eSystem_Delete(temp), temp = 0);
2809 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eEnum_AddFixedValue")), args)));
2810 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2813 if(symbol->templateParams)
2815 struct TemplateParameter * param;
2817 for(param = (*symbol->templateParams).first; param; param = param->next)
2819 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
2821 ListAdd(args, MkExpIdentifier(MkIdentifier("class")));
2823 char * string = QMkString(param->identifier->string);
2825 ListAdd(args, MkExpString(string));
2826 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2828 ListAdd(args, MkExpIdentifier(MkIdentifier((param->type == 0) ? "type" : ((param->type == 1) ? "identifier" : "expression"))));
2834 char * typeString = param->__anon1.dataType ? StringFromSpecDecl(param->__anon1.dataType->specifiers, param->__anon1.dataType->decl) : (((void *)0));
2835 char * string = QMkString(typeString);
2837 ListAdd(args, MkExpString(string));
2838 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
2839 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2844 char memberTypeString[132] = "TemplateMemberType::";
2845 unsigned int needClass = 1;
2847 ((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);
2848 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), (((void *)0)))), MkExpIdentifier(MkIdentifier(memberTypeString))));
2852 if(param->defaultArgument)
2854 struct __ecereNameSpace__ecere__sys__OldList * members = MkList();
2860 char * typeString = param->defaultArgument->__anon1.templateDatatype ? StringFromSpecDecl(param->defaultArgument->__anon1.templateDatatype->specifiers, param->defaultArgument->__anon1.templateDatatype->decl) : (((void *)0));
2861 char * string = QMkString(typeString);
2863 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(MkListOne(MkIdentifier("dataTypeString")), MkInitializerAssignment(MkExpString(string))));
2864 (__ecereNameSpace__ecere__com__eSystem_Delete(typeString), typeString = 0);
2865 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2870 char memberString[1024];
2873 memberString[0] = '\0';
2874 if(param->defaultArgument->__anon1.identifier->_class)
2876 if(param->defaultArgument->__anon1.identifier->_class->type == 8)
2877 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.templateParameter->identifier->string);
2878 else if(param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name)
2879 strcpy(memberString, param->defaultArgument->__anon1.identifier->_class->__anon1.__anon1.name);
2882 strcat(memberString, "::");
2883 strcat(memberString, param->defaultArgument->__anon1.identifier->string);
2884 string = QMkString(memberString);
2885 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(MkListOne(MkIdentifier("dataTypeString")), MkInitializerAssignment(MkExpString(string))));
2886 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2898 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
2901 struct __ecereNameSpace__ecere__sys__OldList * ids = MkList();
2903 char * string = (((void *)0));
2905 op = GetOperand(param->defaultArgument->__anon1.expression);
2906 ui64String = PrintUInt64(op.__anon1.ui64);
2907 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ids), MkIdentifier("expression"));
2908 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ids), MkIdentifier("ui64"));
2909 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*members), MkMemberInit(ids, MkInitializerAssignment(MkExpConstant(ui64String))));
2910 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
2911 (__ecereNameSpace__ecere__com__eSystem_Delete(ui64String), ui64String = 0);
2915 ListAdd(args, MkExpInstance(MkInstantiation(MkSpecifierName("ClassTemplateArgument"), (((void *)0)), MkListOne(MkMembersInitList(members)))));
2918 ListAdd(args, MkExpIdentifier(MkIdentifier("null")));
2919 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_AddTemplateParameter")), args)));
2920 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2922 stmt = MkExpressionStmt(MkListOne(MkExpCall(MkExpIdentifier(MkIdentifier("eClass_DoneAddingTemplateParameters")), MkListOne(MkExpIdentifier(MkIdentifier("class"))))));
2923 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2925 if(definitions != (((void *)0)))
2927 for(def = definitions->first; def; def = def->next)
2929 if(def->type == 4 && def->__anon1.propertyWatch)
2931 ListAdd(registerModuleBody->__anon1.compound.statements, (struct Statement *)def->__anon1.propertyWatch);
2932 def->__anon1.propertyWatch = (((void *)0));
2934 else if(def->type == 5)
2937 char * s = QMkString(def->__anon1.designer);
2939 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("designerClass")), '=', MkExpString(s)))), (((void *)0)));
2940 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2942 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2944 else if(def->type == 6)
2946 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("noExpansion")), '=', MkExpConstant("1")))), (((void *)0)));
2947 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2949 else if(def->type == 7)
2951 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("fixed")), '=', MkExpConstant("1")))), (((void *)0)));
2952 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2954 regClass->fixed = 1;
2956 else if(def->type == 8)
2958 char * s = QMkString(def->__anon1.defaultProperty->string);
2960 stmt = MkIfStmt(MkListOne(MkExpIdentifier(MkIdentifier("class"))), MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("class")), MkIdentifier("defaultProperty")), '=', MkExpString(s)))), (((void *)0)));
2961 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
2962 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
2964 else if(def->type == 11)
2966 ((struct __ecereNameSpace__ecere__com__IteratorPointer * (*)(struct __ecereNameSpace__ecere__com__Instance *, uint64 value))__extension__ ({
2967 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = classPropValues;
2969 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
2970 })[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Add])(classPropValues, (uint64)(uintptr_t)(__extension__ ({
2971 struct __ecereNameSpace__ecere__com__Instance * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_ClassPropertyValue);
2973 ((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;
2975 def->__anon1.__anon1.id = (((void *)0));
2976 def->__anon1.__anon1.initializer->__anon1.exp = (((void *)0));
2984 void ProcessClassDefinitions()
2986 struct External * external, * next;
2988 CreateRegisterModuleBody();
2991 for(external = (*ast).first; external; external = next)
2993 next = external->next;
2994 curExternal = external;
2995 if(external->type == 2)
2997 struct ClassDefinition * _class = external->__anon1._class;
2999 if(_class->definitions)
3001 ProcessClass(0, _class->definitions, _class->symbol, _class->baseSpecs, (((void *)0)), ast, external, _class->declMode);
3005 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
3006 FreeExternal(external);
3009 else if(external->type == 0)
3011 unsigned int setStaticMethod = 0;
3013 if(external->symbol && !external->symbol->type->__anon1.__anon2.thisClass && !external->symbol->type->__anon1.__anon2.staticMethod)
3015 external->symbol->type->__anon1.__anon2.staticMethod = 1;
3016 setStaticMethod = 1;
3020 struct FunctionDefinition * function = external->__anon1.function;
3021 struct Statement * stmt;
3022 struct __ecereNameSpace__ecere__sys__OldList * args;
3024 if(!strcmp(function->declarator->symbol->string, "__on_register_module"))
3026 ListAdd(registerModuleBody->__anon1.compound.statements, function->body);
3027 function->body->__anon1.compound.context->parent = registerModuleBody->__anon1.compound.context;
3028 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
3029 function->body = (((void *)0));
3030 FreeExternal(external);
3033 if(function->declMode != 2 && function->declMode != 1)
3036 CreateRegisterModuleBody();
3038 char * string = QMkString(function->declarator->symbol->string);
3040 ListAdd(args, MkExpString(string));
3041 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3045 char type[1024] = "";
3048 function->declarator->symbol->type->__anon1.__anon2.staticMethod = 0;
3049 PrintType(function->declarator->symbol->type, type, 1, 1);
3051 function->declarator->symbol->type->__anon1.__anon2.staticMethod = 1;
3052 string = QMkString(type);
3053 ListAdd(args, MkExpString(string));
3054 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3057 ListAdd(args, MkExpIdentifier(MkIdentifier(function->declarator->symbol->string)));
3059 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
3060 switch(function->declMode)
3063 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
3066 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
3070 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
3073 stmt = MkExpressionStmt(MkListOne(MkExpCall((MkExpIdentifier(MkIdentifier("eSystem_RegisterFunction"))), args)));
3074 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
3077 else if(external->type == 1)
3079 struct Declaration * declaration = external->__anon1.declaration;
3081 if(external->symbol)
3083 if(external->symbol->type && external->symbol->type->kind == 11 && !external->symbol->type->__anon1.__anon2.thisClass)
3084 external->symbol->type->__anon1.__anon2.staticMethod = 1;
3086 if(external->symbol && declaration && declaration->type == 1)
3088 if(declaration->__anon1.__anon1.specifiers)
3090 struct Specifier * specifier;
3091 unsigned int removeExternal = 0;
3093 for(specifier = (*declaration->__anon1.__anon1.specifiers).first; specifier; specifier = specifier->next)
3095 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)))
3097 struct Symbol * symbol = FindClass(specifier->__anon1.__anon2.id->string);
3103 if(specifier->type == 2)
3108 symbol->ctx = specifier->__anon1.__anon2.ctx;
3109 specifier->__anon1.__anon2.ctx = (((void *)0));
3110 ProcessClass(classType, specifier->__anon1.__anon2.definitions, symbol, specifier->__anon1.__anon2.baseSpecs, specifier->__anon1.__anon2.list, ast, external, declaration->declMode);
3114 if(inCompiler && removeExternal)
3116 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*ast), external);
3117 FreeExternal(external);
3121 else if(declaration && declaration->type == 3)
3123 if(inCompiler && declaration->declMode != 3)
3125 struct Statement * stmt;
3126 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
3128 CreateRegisterModuleBody();
3130 char * string = QMkString(declaration->__anon1.__anon2.id->string);
3132 ListAdd(args, MkExpString(string));
3133 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3137 char type[1024] = "";
3139 PrintExpression(declaration->__anon1.__anon2.exp, type);
3140 string = QMkString(type);
3141 ListAdd(args, MkExpString(string));
3142 (__ecereNameSpace__ecere__com__eSystem_Delete(string), string = 0);
3144 ListAdd(args, MkExpIdentifier(MkIdentifier("module")));
3145 switch(declaration->declMode)
3148 ListAdd(args, MkExpIdentifier(MkIdentifier("staticAccess")));
3151 ListAdd(args, MkExpIdentifier(MkIdentifier("privateAccess")));
3155 ListAdd(args, MkExpIdentifier(MkIdentifier(buildingECERECOMModule ? "baseSystemAccess" : "publicAccess")));
3158 stmt = MkExpressionStmt(MkListOne(MkExpCall((MkExpIdentifier(MkIdentifier("eSystem_RegisterDefine"))), args)));
3159 ListAdd(registerModuleBody->__anon1.compound.statements, stmt);
3165 struct __ecereNameSpace__ecere__com__Iterator v =
3167 (classPropValues), 0
3170 while(__ecereMethod___ecereNameSpace__ecere__com__Iterator_Next(&v))
3172 struct __ecereNameSpace__ecere__sys__OldList * findClassArgs = MkList();
3173 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
3174 struct Statement * compoundStmt;
3176 struct Expression * e;
3179 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3181 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3183 yylloc = __extension__ ({
3184 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3186 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3188 ListAdd(findClassArgs, MkExpIdentifier(MkIdentifier("module")));
3189 s = QMkString(__extension__ ({
3190 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3192 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3193 })->regClass->name);
3194 ListAdd(findClassArgs, MkExpString(s));
3195 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
3196 ListAdd(args, MkExpIdentifier(MkIdentifier("_class")));
3197 s = QMkString(__extension__ ({
3198 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3200 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3202 ListAdd(args, MkExpString(s));
3203 (__ecereNameSpace__ecere__com__eSystem_Delete(s), s = 0);
3204 e = __extension__ ({
3205 char * __ecTemp1 = (char *)(((struct __ecereNameSpace__ecere__com__Instance *)(uintptr_t)__ecereProp___ecereNameSpace__ecere__com__Iterator_Get_data(&v)));
3207 ((struct ClassPropertyValue *)(__ecTemp1 + __ecereClass_ClassPropertyValue->offset));
3209 ProcessExpressionType(e);
3210 if(__ecereProp_Type_Get_isPointerType(e->expType))
3211 e = MkExpCast(MkTypeName(MkListOne(MkSpecifierName("intptr")), (((void *)0))), e);
3212 ListAdd(args, MkExpCast(MkTypeName(MkListOne(MkSpecifier(INT64)), (((void *)0))), e));
3213 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)))));
3214 compoundStmt->__anon1.compound.context = __extension__ ({
3215 struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Context);
3217 __ecereInstance1->parent = registerModuleBody->__anon1.compound.context, __ecereInstance1;
3219 ListAdd(registerModuleBody->__anon1.compound.statements, compoundStmt);
3222 ((void (*)(struct __ecereNameSpace__ecere__com__Instance *))__extension__ ({
3223 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = classPropValues;
3225 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__com__List->_vTbl;
3226 })[__ecereVMethodID___ecereNameSpace__ecere__com__Container_Free])(classPropValues);
3230 void __ecereRegisterModule_pass1(struct __ecereNameSpace__ecere__com__Instance * module)
3232 struct __ecereNameSpace__ecere__com__Class __attribute__((unused)) * class;
3234 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetBuildingEcereCom", "void SetBuildingEcereCom(bool b)", SetBuildingEcereCom, module, 1);
3235 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetBuildingEcereCom", "bool GetBuildingEcereCom(void)", GetBuildingEcereCom, module, 1);
3236 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetBuildingEcereComModule", "void SetBuildingEcereComModule(bool b)", SetBuildingEcereComModule, module, 1);
3237 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetBuildingEcereComModule", "bool GetBuildingEcereComModule(void)", GetBuildingEcereComModule, module, 1);
3238 __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);
3239 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("CreateRegisterModuleBody", "void CreateRegisterModuleBody(void)", CreateRegisterModuleBody, module, 2);
3240 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("RegisterMembersAndProperties", "void RegisterMembersAndProperties(ecere::com::Class regClass, bool isMember, const char * className, Statement statement)", RegisterMembersAndProperties, module, 2);
3241 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetNameSpaceString", "void GetNameSpaceString(ecere::com::NameSpace ns, char * string)", GetNameSpaceString, module, 2);
3242 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(0, "ClassPropertyValue", 0, sizeof(struct ClassPropertyValue), 0, (void *)0, (void *)__ecereDestructor_ClassPropertyValue, module, 2, 1);
3243 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)
3244 __ecereClass_ClassPropertyValue = class;
3245 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("ProcessClassDefinitions", "void ProcessClassDefinitions(void)", ProcessClassDefinitions, module, 1);