1 /* Code generated from eC source file: output.ec */
3 typedef long long int64;
4 typedef unsigned long long uint64;
8 #elif defined(__TINYC__)
10 #define __builtin_va_list va_list
11 #define __builtin_va_start va_start
12 #define __builtin_va_end va_end
14 #define strcasecmp stricmp
15 #define strncasecmp strnicmp
16 #define __declspec(x) __attribute__((x))
20 typedef long long int64;
21 typedef unsigned long long uint64;
23 typedef __int64 int64;
24 typedef unsigned __int64 uint64;
27 #define __ENDIAN_PAD(x) (8 - (x))
29 #define __ENDIAN_PAD(x) 0
32 #include <sys/types.h>
33 extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
35 extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
37 extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
39 extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
41 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
43 struct __ecereNameSpace__ecere__sys__BTNode;
45 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BinaryTree;
47 struct __ecereNameSpace__ecere__sys__BinaryTree
49 struct __ecereNameSpace__ecere__sys__BTNode * root;
51 int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
52 void (* FreeKey)(void * key);
53 } __attribute__ ((gcc_struct));
55 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
57 struct __ecereNameSpace__ecere__sys__OldList
64 } __attribute__ ((gcc_struct));
66 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
68 struct __ecereNameSpace__ecere__com__Method
71 struct __ecereNameSpace__ecere__com__Method * parent;
72 struct __ecereNameSpace__ecere__com__Method * left;
73 struct __ecereNameSpace__ecere__com__Method * right;
78 struct __ecereNameSpace__ecere__com__Class * _class;
80 char * dataTypeString;
81 struct Type * dataType;
83 } __attribute__ ((gcc_struct));
85 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
87 struct __ecereNameSpace__ecere__com__Property
89 struct __ecereNameSpace__ecere__com__Property * prev;
90 struct __ecereNameSpace__ecere__com__Property * next;
92 unsigned int isProperty;
95 struct __ecereNameSpace__ecere__com__Class * _class;
96 char * dataTypeString;
97 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
98 struct Type * dataType;
99 void (* Set)(void * , int);
100 int (* Get)(void * );
101 unsigned int (* IsSet)(void * );
105 unsigned int conversion;
106 unsigned int watcherOffset;
108 unsigned int compiled;
109 unsigned int selfWatchable;
110 unsigned int isWatchable;
111 } __attribute__ ((gcc_struct));
113 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
121 } __attribute__ ((gcc_struct));
123 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
127 struct CodePosition start;
128 struct CodePosition end;
129 } __attribute__ ((gcc_struct));
131 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
137 struct __ecereNameSpace__ecere__sys__OldList * attribs;
138 } __attribute__ ((gcc_struct));
140 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
149 struct Attrib * attr;
150 } __attribute__ ((gcc_struct));
151 } __attribute__ ((gcc_struct));
153 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
155 struct ClassDefinition
157 struct ClassDefinition * prev;
158 struct ClassDefinition * next;
160 struct Specifier * _class;
161 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
162 struct __ecereNameSpace__ecere__sys__OldList * definitions;
163 struct Symbol * symbol;
164 struct Location blockStart;
165 struct Location nameLoc;
168 unsigned int deleteWatchable;
169 } __attribute__ ((gcc_struct));
171 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Context;
175 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Instantiation;
179 struct Instantiation * prev;
180 struct Instantiation * next;
182 struct Specifier * _class;
183 struct Expression * exp;
184 struct __ecereNameSpace__ecere__sys__OldList * members;
185 struct Symbol * symbol;
186 unsigned int fullSet;
187 unsigned int isConstant;
188 unsigned char * data;
189 struct Location nameLoc;
190 struct Location insideLoc;
192 } __attribute__ ((gcc_struct));
194 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
198 struct Declaration * prev;
199 struct Declaration * next;
206 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
207 struct __ecereNameSpace__ecere__sys__OldList * declarators;
208 } __attribute__ ((gcc_struct));
209 struct Instantiation * inst;
212 struct Identifier * id;
213 struct Expression * exp;
214 } __attribute__ ((gcc_struct));
215 } __attribute__ ((gcc_struct));
216 struct Specifier * extStorage;
217 struct Symbol * symbol;
219 } __attribute__ ((gcc_struct));
221 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
225 struct Statement * prev;
226 struct Statement * next;
231 struct __ecereNameSpace__ecere__sys__OldList * expressions;
234 struct Identifier * id;
235 struct Statement * stmt;
236 } __attribute__ ((gcc_struct)) labeled;
239 struct Expression * exp;
240 struct Statement * stmt;
241 } __attribute__ ((gcc_struct)) caseStmt;
244 struct __ecereNameSpace__ecere__sys__OldList * declarations;
245 struct __ecereNameSpace__ecere__sys__OldList * statements;
246 struct Context * context;
247 unsigned int isSwitch;
248 } __attribute__ ((gcc_struct)) compound;
251 struct __ecereNameSpace__ecere__sys__OldList * exp;
252 struct Statement * stmt;
253 struct Statement * elseStmt;
254 } __attribute__ ((gcc_struct)) ifStmt;
257 struct __ecereNameSpace__ecere__sys__OldList * exp;
258 struct Statement * stmt;
259 } __attribute__ ((gcc_struct)) switchStmt;
262 struct __ecereNameSpace__ecere__sys__OldList * exp;
263 struct Statement * stmt;
264 } __attribute__ ((gcc_struct)) whileStmt;
267 struct __ecereNameSpace__ecere__sys__OldList * exp;
268 struct Statement * stmt;
269 } __attribute__ ((gcc_struct)) doWhile;
272 struct Statement * init;
273 struct Statement * check;
274 struct __ecereNameSpace__ecere__sys__OldList * increment;
275 struct Statement * stmt;
276 } __attribute__ ((gcc_struct)) forStmt;
279 struct Identifier * id;
280 } __attribute__ ((gcc_struct)) gotoStmt;
283 struct Specifier * spec;
285 struct __ecereNameSpace__ecere__sys__OldList * inputFields;
286 struct __ecereNameSpace__ecere__sys__OldList * outputFields;
287 struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
288 } __attribute__ ((gcc_struct)) asmStmt;
291 struct Expression * watcher;
292 struct Expression * object;
293 struct __ecereNameSpace__ecere__sys__OldList * watches;
294 } __attribute__ ((gcc_struct)) _watch;
297 struct Identifier * id;
298 struct __ecereNameSpace__ecere__sys__OldList * exp;
299 struct __ecereNameSpace__ecere__sys__OldList * filter;
300 struct Statement * stmt;
301 } __attribute__ ((gcc_struct)) forEachStmt;
302 struct Declaration * decl;
303 } __attribute__ ((gcc_struct));
304 } __attribute__ ((gcc_struct));
306 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
310 struct TypeName * prev;
311 struct TypeName * next;
313 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
314 struct Declarator * declarator;
316 struct Expression * bitCount;
317 } __attribute__ ((gcc_struct));
319 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
323 struct Initializer * prev;
324 struct Initializer * next;
329 struct Expression * exp;
330 struct __ecereNameSpace__ecere__sys__OldList * list;
331 } __attribute__ ((gcc_struct));
332 unsigned int isConstant;
333 } __attribute__ ((gcc_struct));
335 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
337 struct __ecereNameSpace__ecere__com__DataValue
352 } __attribute__ ((gcc_struct));
353 } __attribute__ ((gcc_struct));
355 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
359 struct Expression * prev;
360 struct Expression * next;
368 struct Identifier * identifier;
369 } __attribute__ ((gcc_struct));
370 struct Statement * compound;
371 struct Instantiation * instance;
373 struct __ecereNameSpace__ecere__sys__OldList * list;
376 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
377 struct Declarator * decl;
378 } __attribute__ ((gcc_struct)) _classExp;
381 struct Identifier * id;
382 } __attribute__ ((gcc_struct)) classData;
385 struct Expression * exp;
386 struct __ecereNameSpace__ecere__sys__OldList * arguments;
387 struct Location argLoc;
388 } __attribute__ ((gcc_struct)) call;
391 struct Expression * exp;
392 struct __ecereNameSpace__ecere__sys__OldList * index;
393 } __attribute__ ((gcc_struct)) index;
396 struct Expression * exp;
397 struct Identifier * member;
399 unsigned int thisPtr;
400 } __attribute__ ((gcc_struct)) member;
404 struct Expression * exp1;
405 struct Expression * exp2;
406 } __attribute__ ((gcc_struct)) op;
407 struct TypeName * typeName;
408 struct Specifier * _class;
411 struct TypeName * typeName;
412 struct Expression * exp;
413 } __attribute__ ((gcc_struct)) cast;
416 struct Expression * cond;
417 struct __ecereNameSpace__ecere__sys__OldList * exp;
418 struct Expression * elseExp;
419 } __attribute__ ((gcc_struct)) cond;
422 struct TypeName * typeName;
423 struct Expression * size;
424 } __attribute__ ((gcc_struct)) _new;
427 struct TypeName * typeName;
428 struct Expression * size;
429 struct Expression * exp;
430 } __attribute__ ((gcc_struct)) _renew;
434 struct Identifier * id;
435 } __attribute__ ((gcc_struct)) db;
438 struct Expression * ds;
439 struct Expression * name;
440 } __attribute__ ((gcc_struct)) dbopen;
443 struct TypeName * typeName;
444 struct Initializer * initializer;
445 } __attribute__ ((gcc_struct)) initializer;
448 struct Expression * exp;
449 struct TypeName * typeName;
450 } __attribute__ ((gcc_struct)) vaArg;
451 } __attribute__ ((gcc_struct));
452 unsigned int debugValue;
453 struct __ecereNameSpace__ecere__com__DataValue val;
455 unsigned int hasAddress;
456 struct Type * expType;
457 struct Type * destType;
460 unsigned int byReference;
461 unsigned int isConstant;
462 unsigned int addedThis;
463 unsigned int needCast;
464 unsigned int thisPtr;
465 } __attribute__ ((gcc_struct));
467 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
469 struct TemplateDatatype
471 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
472 struct Declarator * decl;
473 } __attribute__ ((gcc_struct));
475 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateArgument;
477 struct TemplateArgument;
479 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateParameter;
481 struct TemplateParameter
483 struct TemplateParameter * prev;
484 struct TemplateParameter * next;
487 struct Identifier * identifier;
490 struct TemplateDatatype * dataType;
492 } __attribute__ ((gcc_struct));
493 struct TemplateArgument * defaultArgument;
494 char * dataTypeString;
495 struct Type * baseType;
496 } __attribute__ ((gcc_struct));
498 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Specifier;
502 struct Specifier * prev;
503 struct Specifier * next;
511 struct ExtDecl * extDecl;
513 struct Symbol * symbol;
514 struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
515 } __attribute__ ((gcc_struct));
518 struct Identifier * id;
519 struct __ecereNameSpace__ecere__sys__OldList * list;
520 struct __ecereNameSpace__ecere__sys__OldList * baseSpecs;
521 struct __ecereNameSpace__ecere__sys__OldList * definitions;
522 unsigned int addNameSpace;
523 struct Context * ctx;
524 struct ExtDecl * extDeclStruct;
525 } __attribute__ ((gcc_struct));
526 struct Expression * expression;
527 struct Specifier * _class;
528 struct TemplateParameter * templateParameter;
529 } __attribute__ ((gcc_struct));
530 } __attribute__ ((gcc_struct));
532 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
536 struct Identifier * prev;
537 struct Identifier * next;
539 struct Symbol * classSym;
540 struct Specifier * _class;
542 struct Identifier * badID;
543 } __attribute__ ((gcc_struct));
545 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
549 struct Pointer * prev;
550 struct Pointer * next;
552 struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
553 struct Pointer * pointer;
554 } __attribute__ ((gcc_struct));
556 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
560 struct Declarator * prev;
561 struct Declarator * next;
564 struct Symbol * symbol;
565 struct Declarator * declarator;
568 struct Identifier * identifier;
571 struct Expression * exp;
572 struct Expression * posExp;
573 struct Attrib * attrib;
574 } __attribute__ ((gcc_struct)) structDecl;
577 struct Expression * exp;
578 struct Specifier * enumClass;
579 } __attribute__ ((gcc_struct)) array;
582 struct __ecereNameSpace__ecere__sys__OldList * parameters;
583 } __attribute__ ((gcc_struct)) function;
586 struct Pointer * pointer;
587 } __attribute__ ((gcc_struct)) pointer;
590 struct ExtDecl * extended;
591 } __attribute__ ((gcc_struct)) extended;
592 } __attribute__ ((gcc_struct));
593 } __attribute__ ((gcc_struct));
595 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
597 struct FunctionDefinition
599 struct FunctionDefinition * prev;
600 struct FunctionDefinition * next;
602 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
603 struct Declarator * declarator;
604 struct __ecereNameSpace__ecere__sys__OldList * declarations;
605 struct Statement * body;
606 struct __ecereNameSpace__ecere__com__Class * _class;
607 struct __ecereNameSpace__ecere__sys__OldList attached;
610 struct Symbol * propSet;
612 unsigned int propertyNoThis;
613 } __attribute__ ((gcc_struct));
615 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableDef;
619 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_External;
623 struct External * prev;
624 struct External * next;
627 struct Symbol * symbol;
630 struct FunctionDefinition * function;
631 struct ClassDefinition * _class;
632 struct Declaration * declaration;
634 struct Identifier * id;
635 struct DBTableDef * table;
636 } __attribute__ ((gcc_struct));
638 } __attribute__ ((gcc_struct));
640 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ModuleImport;
644 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassImport;
648 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
653 struct Symbol * parent;
654 struct Symbol * left;
655 struct Symbol * right;
660 struct __ecereNameSpace__ecere__com__Method * method;
661 struct __ecereNameSpace__ecere__com__Property * _property;
662 struct __ecereNameSpace__ecere__com__Class * registered;
663 } __attribute__ ((gcc_struct));
670 struct External * pointerExternal;
671 struct External * structExternal;
672 } __attribute__ ((gcc_struct));
675 struct External * externalGet;
676 struct External * externalSet;
677 struct External * externalPtr;
678 struct External * externalIsSet;
679 } __attribute__ ((gcc_struct));
682 struct External * methodExternal;
683 struct External * methodCodeExternal;
684 } __attribute__ ((gcc_struct));
685 } __attribute__ ((gcc_struct));
686 unsigned int imported;
687 unsigned int declaredStructSym;
688 struct __ecereNameSpace__ecere__com__Class * _class;
689 unsigned int declaredStruct;
690 unsigned int needConstructor;
691 unsigned int needDestructor;
692 char * constructorName;
695 char * destructorName;
696 struct ModuleImport * module;
697 struct ClassImport * _import;
698 struct Location nameLoc;
699 unsigned int isParam;
700 unsigned int isRemote;
701 unsigned int isStruct;
702 unsigned int fireWatchersDone;
704 unsigned int classData;
705 unsigned int isStatic;
707 struct __ecereNameSpace__ecere__sys__OldList * templateParams;
708 struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
709 struct Context * ctx;
711 struct Expression * propCategory;
712 } __attribute__ ((gcc_struct));
714 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
723 struct Symbol * _class;
726 struct __ecereNameSpace__ecere__sys__OldList members;
728 } __attribute__ ((gcc_struct));
731 struct Type * returnType;
732 struct __ecereNameSpace__ecere__sys__OldList params;
733 struct Symbol * thisClass;
734 unsigned int staticMethod;
735 struct TemplateParameter * thisClassTemplate;
736 } __attribute__ ((gcc_struct));
739 struct __ecereNameSpace__ecere__com__Method * method;
740 struct __ecereNameSpace__ecere__com__Class * methodClass;
741 struct __ecereNameSpace__ecere__com__Class * usedClass;
742 } __attribute__ ((gcc_struct));
745 struct Type * arrayType;
747 struct Expression * arraySizeExp;
748 unsigned int freeExp;
749 struct Symbol * enumClass;
750 } __attribute__ ((gcc_struct));
752 struct TemplateParameter * templateParameter;
753 } __attribute__ ((gcc_struct));
763 unsigned int isSigned : 1;
764 unsigned int constant : 1;
765 unsigned int truth : 1;
766 unsigned int byReference : 1;
767 unsigned int extraParam : 1;
768 unsigned int directClassAccess : 1;
769 unsigned int computing : 1;
770 unsigned int keepCast : 1;
771 unsigned int passAsTemplate : 1;
772 unsigned int dllExport : 1;
773 unsigned int attrStdcall : 1;
774 unsigned int declaredWithStruct : 1;
775 } __attribute__ ((gcc_struct));
777 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
779 struct __ecereNameSpace__ecere__com__Class
781 struct __ecereNameSpace__ecere__com__Class * prev;
782 struct __ecereNameSpace__ecere__com__Class * next;
788 int (* Constructor)(struct __ecereNameSpace__ecere__com__Instance *);
789 void (* Destructor)(struct __ecereNameSpace__ecere__com__Instance *);
792 struct __ecereNameSpace__ecere__com__Class * base;
793 struct __ecereNameSpace__ecere__sys__BinaryTree methods;
794 struct __ecereNameSpace__ecere__sys__BinaryTree members;
795 struct __ecereNameSpace__ecere__sys__BinaryTree prop;
796 struct __ecereNameSpace__ecere__sys__OldList membersAndProperties;
797 struct __ecereNameSpace__ecere__sys__BinaryTree classProperties;
798 struct __ecereNameSpace__ecere__sys__OldList derivatives;
802 struct __ecereNameSpace__ecere__com__Instance * module;
803 struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
804 char * dataTypeString;
805 struct Type * dataType;
807 int defaultAlignment;
808 void (* Initialize)();
810 struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
811 char * designerClass;
812 unsigned int noExpansion;
813 char * defaultProperty;
814 unsigned int comRedefinition;
816 unsigned int isRemote;
817 unsigned int internalDecl;
819 unsigned int computeSize;
821 int destructionWatchOffset;
823 struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
824 int inheritanceAccess;
827 struct __ecereNameSpace__ecere__sys__OldList conversions;
828 struct __ecereNameSpace__ecere__sys__OldList templateParams;
829 struct __ecereNameSpace__ecere__com__ClassTemplateArgument * templateArgs;
830 struct __ecereNameSpace__ecere__com__Class * templateClass;
831 struct __ecereNameSpace__ecere__sys__OldList templatized;
833 unsigned int isInstanceClass;
834 } __attribute__ ((gcc_struct));
836 extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, char * name);
838 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
840 struct __ecereNameSpace__ecere__com__Instance
843 struct __ecereNameSpace__ecere__com__Class * _class;
845 } __attribute__ ((gcc_struct));
847 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
849 struct __ecereNameSpace__ecere__com__DataMember
851 struct __ecereNameSpace__ecere__com__DataMember * prev;
852 struct __ecereNameSpace__ecere__com__DataMember * next;
854 unsigned int isProperty;
857 struct __ecereNameSpace__ecere__com__Class * _class;
858 char * dataTypeString;
859 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
860 struct Type * dataType;
864 struct __ecereNameSpace__ecere__sys__OldList members;
865 struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
868 } __attribute__ ((gcc_struct));
870 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
872 struct __ecereNameSpace__ecere__com__SerialBuffer
874 unsigned char * _buffer;
878 } __attribute__ ((gcc_struct));
880 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
882 struct __ecereNameSpace__ecere__com__ClassTemplateArgument
888 char * dataTypeString;
889 struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
890 } __attribute__ ((gcc_struct));
891 struct __ecereNameSpace__ecere__com__DataValue expression;
897 struct __ecereNameSpace__ecere__com__DataMember * member;
898 struct __ecereNameSpace__ecere__com__Property * prop;
899 struct __ecereNameSpace__ecere__com__Method * method;
900 } __attribute__ ((gcc_struct));
901 } __attribute__ ((gcc_struct));
902 } __attribute__ ((gcc_struct));
903 } __attribute__ ((gcc_struct));
907 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
910 typedef union YYSTYPE
915 struct Identifier * id;
916 struct Expression * exp;
917 struct Specifier * specifier;
918 struct __ecereNameSpace__ecere__sys__OldList * list;
919 struct Enumerator * enumerator;
920 struct Declarator * declarator;
921 struct Pointer * pointer;
922 struct Initializer * initializer;
923 struct InitDeclarator * initDeclarator;
924 struct TypeName * typeName;
925 struct Declaration * declaration;
926 struct Statement * stmt;
927 struct FunctionDefinition * function;
928 struct External * external;
929 struct Context * context;
930 struct AsmField * asmField;
931 struct Attrib * attrib;
932 struct ExtDecl * extDecl;
933 struct Attribute * attribute;
934 struct Instantiation * instance;
935 struct MembersInit * membersInit;
936 struct MemberInit * memberInit;
937 struct ClassFunction * classFunction;
938 struct ClassDefinition * _class;
939 struct ClassDef * classDef;
940 struct PropertyDef * prop;
942 struct Symbol * symbol;
943 struct PropertyWatch * propertyWatch;
944 struct TemplateParameter * templateParameter;
945 struct TemplateArgument * templateArgument;
946 struct TemplateDatatype * templateDatatype;
947 struct DBTableEntry * dbtableEntry;
948 struct DBIndexItem * dbindexItem;
949 struct DBTableDef * dbtableDef;
950 } __attribute__ ((gcc_struct)) YYSTYPE;
952 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Enumerator;
956 struct Enumerator * prev;
957 struct Enumerator * next;
959 struct Identifier * id;
960 struct Expression * exp;
961 } __attribute__ ((gcc_struct));
963 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_InitDeclarator;
965 struct InitDeclarator
967 struct InitDeclarator * prev;
968 struct InitDeclarator * next;
970 struct Declarator * declarator;
971 struct Initializer * initializer;
972 } __attribute__ ((gcc_struct));
974 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_AsmField;
978 struct AsmField * prev;
979 struct AsmField * next;
982 struct Expression * expression;
983 } __attribute__ ((gcc_struct));
985 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
989 struct Attribute * prev;
990 struct Attribute * next;
993 struct Expression * exp;
994 } __attribute__ ((gcc_struct));
996 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassFunction;
1000 struct ClassFunction * prev;
1001 struct ClassFunction * next;
1002 struct Location loc;
1003 struct __ecereNameSpace__ecere__sys__OldList * specifiers;
1004 struct Declarator * declarator;
1005 struct __ecereNameSpace__ecere__sys__OldList * declarations;
1006 struct Statement * body;
1007 struct __ecereNameSpace__ecere__com__Class * _class;
1008 struct __ecereNameSpace__ecere__sys__OldList attached;
1011 struct Symbol * propSet;
1012 unsigned int isVirtual;
1013 unsigned int isConstructor;
1014 unsigned int isDestructor;
1015 unsigned int dontMangle;
1018 } __attribute__ ((gcc_struct));
1020 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MembersInit;
1024 struct MembersInit * prev;
1025 struct MembersInit * next;
1026 struct Location loc;
1030 struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
1031 struct ClassFunction * function;
1032 } __attribute__ ((gcc_struct));
1033 } __attribute__ ((gcc_struct));
1035 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_MemberInit;
1039 struct MemberInit * prev;
1040 struct MemberInit * next;
1041 struct Location loc;
1042 struct Location realLoc;
1043 struct __ecereNameSpace__ecere__sys__OldList * identifiers;
1044 struct Initializer * initializer;
1046 unsigned int variable;
1047 unsigned int takeOutExp;
1048 } __attribute__ ((gcc_struct));
1050 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyDef;
1054 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_PropertyWatch;
1056 struct PropertyWatch;
1058 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDef;
1062 struct ClassDef * prev;
1063 struct ClassDef * next;
1064 struct Location loc;
1068 struct Declaration * decl;
1069 struct ClassFunction * function;
1070 struct __ecereNameSpace__ecere__sys__OldList * defProperties;
1071 struct PropertyDef * propertyDef;
1072 struct PropertyWatch * propertyWatch;
1074 struct Identifier * defaultProperty;
1077 struct Identifier * id;
1078 struct Initializer * initializer;
1079 } __attribute__ ((gcc_struct));
1080 } __attribute__ ((gcc_struct));
1083 } __attribute__ ((gcc_struct));
1085 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBTableEntry;
1087 struct DBTableEntry;
1089 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_DBIndexItem;
1093 extern YYSTYPE yylval;
1095 extern struct Location yylloc;
1099 unsigned int memoryGuard = 0x0;
1101 void SetMemoryGuard(unsigned int b)
1106 unsigned int GetMemoryGuard()
1111 extern int strcmp(const char * , const char * );
1113 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts;
1115 static void OutputIdentifier(struct Identifier * id, struct __ecereNameSpace__ecere__com__Instance * f)
1121 if(id->_class->type == 8)
1123 if(id->_class->templateParameter && id->_class->templateParameter->identifier && id->_class->templateParameter->identifier->string)
1124 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->templateParameter->identifier->string);
1128 if(id->_class->name)
1130 if(!strcmp(id->_class->name, "class"))
1131 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
1133 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, id->_class->name);
1136 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "::");
1139 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (id && id->string) ? id->string : "(null identifier)");
1142 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc;
1144 static void OutputOperator(int op, struct __ecereNameSpace__ecere__com__Instance * f)
1149 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "++");
1152 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "--");
1155 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof ");
1158 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<");
1161 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>");
1164 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<=");
1167 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">=");
1170 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "==");
1173 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "!=");
1176 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&&");
1179 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "||");
1182 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*=");
1185 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "/=");
1188 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "%=");
1191 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "+=");
1194 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "-=");
1197 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "<<=");
1200 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ">>=");
1203 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "&=");
1206 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "^=");
1209 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "|=");
1224 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, char ch))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Putc])(f, (char)op);
1227 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "delete ");
1232 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName);
1234 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1236 void OutputTypeName(struct TypeName * type, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
1238 if(type->qualifiers)
1240 struct Specifier * spec;
1242 for(spec = (*type->qualifiers).first; spec; spec = spec->next)
1244 OutputSpecifier(spec, f, typeName);
1246 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1249 if(type->declarator)
1251 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1252 OutputDeclarator(type->declarator, f);
1254 if(!type->qualifiers && !type->declarator)
1255 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "...");
1258 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f);
1260 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f);
1262 extern int printf(char * , ...);
1264 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f);
1266 void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__com__Instance * f)
1271 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class(");
1272 if(exp->_classExp.specifiers)
1274 struct Specifier * spec;
1276 for(spec = (*exp->_classExp.specifiers).first; spec; spec = spec->next)
1278 OutputSpecifier(spec, f, 0x0);
1280 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1282 if(exp->_classExp.decl)
1284 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1285 OutputDeclarator(exp->_classExp.decl, f);
1287 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1291 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1292 OutputStatement(exp->compound, f);
1293 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1296 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new ");
1297 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1298 OutputTypeName(exp->_renew.typeName, f, 0x0);
1299 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1300 OutputExpression(exp->_renew.size, f);
1301 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1304 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "new0 ");
1305 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1306 OutputTypeName(exp->_renew.typeName, f, 0x0);
1307 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1308 OutputExpression(exp->_renew.size, f);
1309 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1312 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew ");
1313 OutputExpression(exp->_renew.exp, f);
1314 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1315 OutputTypeName(exp->_renew.typeName, f, 0x0);
1316 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1317 OutputExpression(exp->_renew.size, f);
1318 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1321 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "renew0 ");
1322 OutputExpression(exp->_renew.exp, f);
1323 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1324 OutputTypeName(exp->_renew.typeName, f, 0x0);
1325 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1326 OutputExpression(exp->_renew.size, f);
1327 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1331 OutputIdentifier(exp->identifier, f);
1335 OutputInstance(exp->instance, f);
1339 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->constant);
1345 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, exp->string);
1350 OutputExpression(exp->op.exp1, f);
1352 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1354 OutputOperator(exp->op.op, f);
1357 if(exp->op.exp1 || (exp->op.exp2->type == 4 && !exp->op.exp2->op.exp1 && exp->op.exp2->op.op == exp->op.op))
1358 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1359 OutputExpression(exp->op.exp2, f);
1365 struct Expression * expression;
1368 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1369 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1372 for(expression = (*exp->list).first; expression; expression = expression->next)
1374 OutputExpression(expression, f);
1375 if(expression->next)
1376 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1379 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1384 struct Expression * expression;
1387 OutputExpression(exp->index.exp, f);
1388 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1389 if(exp->index.index)
1390 for(expression = (*exp->index.index).first; expression; expression = expression->next)
1392 OutputExpression(expression, f);
1393 if(expression->next)
1394 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1396 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1401 OutputExpression(exp->call.exp, f);
1402 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1403 if(exp->call.arguments)
1405 struct Expression * expression;
1407 for(expression = (*exp->call.arguments).first; expression; expression = expression->next)
1409 OutputExpression(expression, f);
1410 if(expression->next)
1411 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1414 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1419 OutputExpression(exp->member.exp, f);
1420 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
1421 if(exp->member.member)
1422 OutputIdentifier(exp->member.member, f);
1425 OutputExpression(exp->member.exp, f);
1426 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "->");
1427 OutputIdentifier(exp->member.member, f);
1430 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "sizeof(");
1431 OutputTypeName(exp->typeName, f, 0x0);
1432 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1435 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__alignof__(");
1436 OutputTypeName(exp->typeName, f, 0x0);
1437 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1440 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__extension__ (");
1441 if(exp->initializer.typeName)
1442 OutputTypeName(exp->initializer.typeName, f, 0x0);
1443 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1444 if(exp->initializer.initializer)
1445 OutputInitializer(exp->initializer.initializer, f);
1448 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1449 OutputTypeName(exp->cast.typeName, f, 0x0);
1450 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1452 OutputExpression(exp->cast.exp, f);
1455 OutputExpression(exp->cond.cond, f);
1456 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ? ");
1458 struct Expression * expression;
1460 for(expression = (*exp->cond.exp).first; expression; expression = expression->next)
1462 OutputExpression(expression, f);
1463 if(expression->next)
1464 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1467 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1468 OutputExpression(exp->cond.elseExp, f);
1471 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_arg(");
1472 OutputExpression(exp->vaArg.exp, f);
1473 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1474 OutputTypeName(exp->vaArg.typeName, f, 0x0);
1475 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1478 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
1481 struct Expression * expression;
1483 for(expression = (*exp->list).first; expression; expression = expression->next)
1485 OutputExpression(expression, f);
1486 if(expression->next)
1487 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1490 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
1495 static void OutputAsmField(struct AsmField * field, struct __ecereNameSpace__ecere__com__Instance * f)
1497 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, field->command);
1498 if(field->expression)
1500 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1501 OutputExpression(field->expression, f);
1502 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1506 extern char * strchr(const char * , int);
1508 extern char * __ecereNameSpace__ecere__sys__StripLastDirectory(char * string, char * output);
1510 extern char * sourceFile;
1512 extern char * __ecereNameSpace__ecere__sys__PathCat(char * string, char * addedPath);
1514 extern void __ecereNameSpace__ecere__sys__ChangeCh(char * string, char ch1, char ch2);
1516 static void GetSourceName(char * name, const char * src)
1521 if(!strchr(src, '/') && !strchr(src, '\\'))
1522 __ecereNameSpace__ecere__sys__StripLastDirectory(sourceFile, name);
1523 __ecereNameSpace__ecere__sys__PathCat(name, src);
1526 __ecereNameSpace__ecere__sys__PathCat(name, sourceFile);
1527 __ecereNameSpace__ecere__sys__ChangeCh(name, '\\', '/');
1530 extern unsigned int inCompiler;
1532 extern char * GetIncludeFileFromID(int id);
1534 extern char * outputFile;
1536 extern unsigned int outputLineNumbers;
1538 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f);
1540 extern struct __ecereNameSpace__ecere__sys__OldList * MkList(void);
1542 extern struct Declarator * SpecDeclFromString(char * string, struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * baseDecl);
1544 extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
1546 extern struct Identifier * MkIdentifier(char * string);
1548 extern struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void * ));
1550 extern struct Specifier * CopySpecifier(struct Specifier * spec);
1552 extern struct Declarator * PlugDeclarator(struct Declarator * decl, struct Declarator * baseDecl);
1554 extern void ListAdd(struct __ecereNameSpace__ecere__sys__OldList * list, void * item);
1556 extern struct Specifier * MkSpecifierName(char * name);
1558 extern void PrintTypeNoConst(struct Type * type, char * string, unsigned int printName, unsigned int fullName);
1560 extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
1562 extern void InstDeclPassTypeName(struct TypeName * type, unsigned int param);
1564 extern void FreeTypeName(struct TypeName * typeName);
1566 int __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(struct __ecereNameSpace__ecere__com__Instance * this, char * format, ...);
1568 static void OutputStatement(struct Statement * stmt, struct __ecereNameSpace__ecere__com__Instance * f)
1570 char name[274] = "";
1571 char origName[274] = "";
1575 GetSourceName(name, stmt->loc.start.included ? GetIncludeFileFromID(stmt->loc.start.included) : (((void *)0)));
1576 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
1577 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
1579 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1581 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.start.line, name);
1587 OutputDeclaration(stmt->decl, f);
1590 OutputIdentifier(stmt->labeled.id, f);
1591 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1593 OutputStatement(stmt->labeled.stmt, f);
1596 if(stmt->caseStmt.exp)
1598 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "case ");
1599 OutputExpression(stmt->caseStmt.exp, f);
1600 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":\n");
1605 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "default:\n");
1608 if(stmt->caseStmt.stmt)
1609 OutputStatement(stmt->caseStmt.stmt, f);
1613 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{\n");
1615 if(stmt->compound.declarations)
1617 struct Declaration * decl;
1619 for(decl = (*stmt->compound.declarations).first; decl; decl = decl->next)
1621 OutputDeclaration(decl, f);
1624 if(stmt->compound.statements)
1626 struct Statement * statement;
1628 if(stmt->compound.declarations)
1630 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1633 for(statement = (*stmt->compound.statements).first; statement; statement = statement->next)
1635 OutputStatement(statement, f);
1636 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1640 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1642 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1645 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
1650 if(stmt->expressions)
1652 struct Expression * exp;
1654 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1656 OutputExpression(exp, f);
1658 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1661 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1666 struct Expression * exp;
1668 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "if(");
1669 for(exp = (*stmt->ifStmt.exp).first; exp; exp = exp->next)
1671 OutputExpression(exp, f);
1673 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1675 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1677 if(stmt->ifStmt.stmt)
1678 OutputStatement(stmt->ifStmt.stmt, f);
1679 if(stmt->ifStmt.elseStmt)
1681 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1683 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "else");
1684 if(stmt->ifStmt.elseStmt->type != 4)
1686 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
1690 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1691 OutputStatement(stmt->ifStmt.elseStmt, f);
1697 struct Expression * exp;
1699 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "switch(");
1700 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1702 OutputExpression(exp, f);
1704 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1706 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1708 OutputStatement(stmt->switchStmt.stmt, f);
1713 struct Expression * exp;
1715 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1716 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1718 OutputExpression(exp, f);
1720 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1722 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1724 OutputStatement(stmt->whileStmt.stmt, f);
1729 struct Expression * exp;
1731 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "do\n");
1733 OutputStatement(stmt->whileStmt.stmt, f);
1734 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "while(");
1735 for(exp = (*stmt->switchStmt.exp).first; exp; exp = exp->next)
1737 OutputExpression(exp, f);
1739 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1741 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");");
1746 struct Expression * exp;
1748 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "for(");
1749 OutputStatement(stmt->forStmt.init, f);
1750 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1751 OutputStatement(stmt->forStmt.check, f);
1752 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1753 if(stmt->forStmt.increment)
1755 if(inCompiler && outputLineNumbers && stmt->loc.end.line)
1757 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", stmt->loc.end.line, name);
1760 for(exp = (*stmt->forStmt.increment).first; exp; exp = exp->next)
1762 OutputExpression(exp, f);
1764 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1767 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")\n");
1769 OutputStatement(stmt->forStmt.stmt, f);
1774 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "goto ");
1775 OutputIdentifier(stmt->gotoStmt.id, f);
1776 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1780 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "continue;");
1783 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "break;");
1787 struct Expression * exp;
1789 if(inCompiler && memoryGuard)
1791 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1793 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{ ");
1794 if(exp && exp->expType)
1796 char string[1024] = "";
1797 struct __ecereNameSpace__ecere__sys__OldList * specs = MkList();
1798 struct Declarator * decl;
1799 struct TypeName * typeName;
1801 if(exp->expType->kind == 20)
1803 if(exp->expType->templateParameter->dataTypeString)
1804 decl = SpecDeclFromString(exp->expType->templateParameter->dataTypeString, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1805 else if(exp->expType->templateParameter->dataType)
1807 (__ecereNameSpace__ecere__com__eSystem_Delete(specs), specs = 0);
1808 specs = CopyList(exp->expType->templateParameter->dataType->specifiers, CopySpecifier);
1809 decl = PlugDeclarator(exp->expType->templateParameter->dataType->decl, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1813 ListAdd(specs, MkSpecifierName("uint64"));
1814 decl = MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal"));
1819 PrintTypeNoConst(exp->expType, string, exp->expType->kind == 18 ? 0x1 : 0x0, 0x1);
1820 decl = SpecDeclFromString(string, specs, MkDeclaratorIdentifier(MkIdentifier("__ecereReturnVal")));
1822 typeName = MkTypeName(specs, decl);
1823 InstDeclPassTypeName(typeName, 0x0);
1824 OutputTypeName(typeName, f, 0x0);
1825 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, ";");
1826 FreeTypeName(typeName);
1830 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "return ");
1833 struct Expression * exp = stmt->expressions ? (*stmt->expressions).last : (((void *)0));
1835 if(exp && exp->expType)
1836 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "__ecereReturnVal = ");
1838 if(stmt->expressions)
1840 for(exp = (*stmt->expressions).first; exp; exp = exp->next)
1842 OutputExpression(exp, f);
1844 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
1847 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
1848 if(inCompiler && memoryGuard)
1850 struct Expression * exp = stmt->expressions ? (struct Expression *)(*stmt->expressions).last : (((void *)0));
1852 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();");
1853 if(exp && exp->expType)
1854 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return __ecereReturnVal;");
1856 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "return;");
1857 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}");
1863 struct AsmField * field;
1865 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__asm__ ");
1866 if(stmt->asmStmt.spec)
1867 OutputSpecifier(stmt->asmStmt.spec, f, 0x0);
1868 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1869 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, stmt->asmStmt.statements);
1870 if(stmt->asmStmt.inputFields || stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1872 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1873 if(stmt->asmStmt.inputFields)
1875 for(field = (*stmt->asmStmt.inputFields).first; field; field = field->next)
1878 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1879 OutputAsmField(field, f);
1883 if(stmt->asmStmt.outputFields || stmt->asmStmt.clobberedFields)
1885 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1886 if(stmt->asmStmt.outputFields)
1888 for(field = (*stmt->asmStmt.outputFields).first; field; field = field->next)
1891 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1892 OutputAsmField(field, f);
1896 if(stmt->asmStmt.clobberedFields)
1898 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ":");
1899 for(field = (*stmt->asmStmt.clobberedFields).first; field; field = field->next)
1902 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ",");
1903 OutputAsmField(field, f);
1906 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ");\n");
1911 if(inCompiler && outputLineNumbers && stmt->loc.start.line)
1913 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
1918 static void OutputPointer(struct Pointer * ptr, struct __ecereNameSpace__ecere__com__Instance * f)
1920 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "*");
1923 struct Specifier * spec;
1925 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1926 for(spec = (*ptr->qualifiers).first; spec; spec = spec->next)
1928 OutputSpecifier(spec, f, 0x0);
1930 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1935 OutputPointer(ptr->pointer, f);
1939 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f);
1941 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f);
1943 extern void ProcessExpressionType(struct Expression * exp);
1945 extern void ComputeExpression(struct Expression * exp);
1947 static void OutputDeclarator(struct Declarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
1952 if(decl->declarator)
1954 OutputDeclarator(decl->declarator, f);
1956 if(decl->structDecl.exp)
1958 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1959 OutputExpression(decl->structDecl.exp, f);
1961 if(decl->structDecl.posExp)
1963 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
1964 OutputExpression(decl->structDecl.posExp, f);
1966 if(decl->structDecl.attrib)
1968 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1969 OutputAttrib(decl->structDecl.attrib, f);
1973 OutputIdentifier(decl->identifier, f);
1976 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
1977 OutputDeclarator(decl->declarator, f);
1978 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
1981 if(decl->extended.extended)
1982 OutputExtDecl(decl->extended.extended, f);
1983 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1984 OutputDeclarator(decl->declarator, f);
1987 OutputDeclarator(decl->declarator, f);
1988 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
1989 if(decl->extended.extended)
1990 OutputExtDecl(decl->extended.extended, f);
1993 if(decl->declarator)
1995 OutputDeclarator(decl->declarator, f);
1997 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "[");
2000 ProcessExpressionType(decl->array.exp);
2001 ComputeExpression(decl->array.exp);
2002 OutputExpression(decl->array.exp, f);
2004 else if(decl->array.enumClass)
2006 struct Symbol * _class = decl->array.enumClass->symbol;
2008 if(_class && _class->registered)
2010 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "%d", (int)__ecereNameSpace__ecere__com__eClass_GetProperty(_class->registered, "enumSize"));
2013 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
2017 struct TypeName * param;
2019 if(decl->declarator)
2020 OutputDeclarator(decl->declarator, f);
2021 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "(");
2022 if(decl->function.parameters && (*decl->function.parameters).first)
2024 for(param = (*decl->function.parameters).first; param; param = param->next)
2026 OutputTypeName(param, f, 0x0);
2028 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2031 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2035 if(decl->pointer.pointer)
2036 OutputPointer(decl->pointer.pointer, f);
2037 if(decl->declarator)
2039 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2040 OutputDeclarator(decl->declarator, f);
2046 static void OutputEnumerator(struct Enumerator * enumerator, struct __ecereNameSpace__ecere__com__Instance * f)
2048 OutputIdentifier(enumerator->id, f);
2051 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2052 OutputExpression(enumerator->exp, f);
2056 static void OutputAttribute(struct Attribute * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2059 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, attr->attr);
2062 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2063 OutputExpression(attr->exp, f);
2067 static void OutputAttrib(struct Attrib * attr, struct __ecereNameSpace__ecere__com__Instance * f)
2072 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute__((");
2075 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute((");
2078 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__attribute_deprecated__((");
2083 struct Attribute * attrib;
2085 for(attrib = (*attr->attribs).first; attrib; attrib = attrib->next)
2088 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2089 OutputAttribute(attrib, f);
2092 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "))");
2095 static void OutputExtDecl(struct ExtDecl * extDecl, struct __ecereNameSpace__ecere__com__Instance * f)
2097 if(extDecl->type == 0 && extDecl->s)
2098 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, extDecl->s);
2099 else if(extDecl->type == 1)
2100 OutputAttrib(extDecl->attr, f);
2103 extern struct Symbol * FindClass(char * name);
2105 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f);
2107 static void OutputSpecifier(struct Specifier * spec, struct __ecereNameSpace__ecere__com__Instance * f, unsigned int typeName)
2112 switch(spec->specifier)
2115 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typedef");
2118 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "extern");
2121 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "static");
2124 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "auto");
2127 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "register");
2130 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "const");
2133 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "volatile");
2136 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "void");
2139 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "char");
2142 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "short");
2145 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "int");
2148 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "uint" : "unsigned int");
2151 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, typeName ? "int64" : "long long");
2154 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__builtin_va_list");
2157 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "long");
2160 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "float");
2163 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "double");
2166 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "signed");
2169 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "unsigned");
2172 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2175 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "any_object");
2178 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class");
2181 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "thisclass");
2187 OutputExtDecl(spec->extDecl, f);
2190 if(spec->name && !strcmp(spec->name, "class"))
2192 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "typed_object");
2196 struct Symbol * symbol = spec->symbol;
2198 if(!symbol && spec->name)
2199 symbol = FindClass(spec->name);
2202 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, symbol->string ? symbol->string : "(null)");
2205 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, spec->name);
2210 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "enum");
2213 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2214 OutputIdentifier(spec->id, f);
2218 struct Enumerator * enumerator;
2220 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2222 for(enumerator = (*spec->list).first; enumerator; enumerator = enumerator->next)
2224 OutputEnumerator(enumerator, f);
2225 if(enumerator->next)
2226 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2228 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2236 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, (spec->type == 3) ? "struct" : "union");
2237 if(spec->extDeclStruct)
2239 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2240 OutputExtDecl(spec->extDeclStruct, f);
2244 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2245 OutputIdentifier(spec->id, f);
2247 if(spec->definitions)
2249 struct ClassDef * def;
2251 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2253 for(def = (*spec->definitions).first; def; def = def->next)
2255 OutputClassDef(def, f);
2257 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "} __attribute__ ((gcc_struct))");
2262 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "__typeof(");
2263 OutputExpression(spec->expression, f);
2264 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2267 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "subclass(");
2268 OutputSpecifier(spec->_class, f, 0x0);
2269 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
2272 OutputIdentifier(spec->templateParameter->identifier, f);
2277 static void OutputInitializer(struct Initializer * initializer, struct __ecereNameSpace__ecere__com__Instance * f)
2279 char name[274] = "";
2280 char origName[274] = "";
2284 GetSourceName(name, initializer->loc.start.included ? GetIncludeFileFromID(initializer->loc.start.included) : (((void *)0)));
2285 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2286 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2288 switch(initializer->type)
2292 struct Initializer * init;
2294 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2296 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2298 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2301 for(init = (*initializer->list).first; init; init = init->next)
2303 OutputInitializer(init, f);
2305 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2307 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n}");
2308 if(inCompiler && outputLineNumbers && initializer->loc.start.line)
2310 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", initializer->loc.start.line, name);
2317 if(initializer->exp)
2318 OutputExpression(initializer->exp, f);
2323 static void OutputInitDeclarator(struct InitDeclarator * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2325 OutputDeclarator(decl->declarator, f);
2326 if(decl->initializer)
2328 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2329 OutputInitializer(decl->initializer, f);
2333 static void OutputDeclaration(struct Declaration * decl, struct __ecereNameSpace__ecere__com__Instance * f)
2335 struct Specifier * spec;
2336 char origName[274] = "";
2342 struct InitDeclarator * d;
2346 __ecereNameSpace__ecere__sys__PathCat(origName, outputFile);
2347 __ecereNameSpace__ecere__sys__ChangeCh(origName, '\\', '/');
2349 if(decl->declarators && (*decl->declarators).first)
2351 for(d = (*decl->declarators).first; d; d = d->next)
2354 char name[274] = "";
2356 GetSourceName(name, decl->loc.start.included ? GetIncludeFileFromID(decl->loc.start.included) : (((void *)0)));
2357 if(inCompiler && outputLineNumbers && decl->loc.start.line)
2359 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", decl->loc.start.line, name);
2365 if(decl->specifiers)
2367 unsigned int inTypeDef = 0x0;
2369 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2371 if(spec->type == 0 && spec->specifier == TYPEDEF)
2373 OutputSpecifier(spec, f, inTypeDef && !spec->next);
2375 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2378 if(decl->declarators && (*decl->declarators).first)
2380 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2381 for(d = (*decl->declarators).first; d; d = d->next)
2383 OutputInitDeclarator(d, f);
2385 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2392 if(decl->specifiers)
2394 for(spec = (*decl->specifiers).first; spec; spec = spec->next)
2396 OutputSpecifier(spec, f, 0x0);
2398 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2401 if(decl->declarators)
2403 struct Declarator * d;
2405 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2406 for(d = (*decl->declarators).first; d; d = d->next)
2408 OutputDeclarator(d, f);
2410 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2413 if(decl->extStorage)
2415 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2416 OutputSpecifier(decl->extStorage, f, 0x0);
2423 OutputInstance(decl->inst, f);
2429 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2431 if(inCompiler && outputLineNumbers && decl->loc.start.line && decl->type == 1)
2433 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "\n#line %d \"%s\"\n", outputLine + 2, origName);
2438 static struct FunctionDefinition * curFunction;
2440 extern struct Identifier * GetDeclId(struct Declarator * decl);
2442 static void OutputFunction(struct FunctionDefinition * func, struct __ecereNameSpace__ecere__com__Instance * f)
2444 struct FunctionDefinition * oldFunc = curFunction;
2447 if(func->specifiers)
2449 struct Specifier * spec;
2451 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2453 OutputSpecifier(spec, f, 0x0);
2455 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2457 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2459 if(func->declarator)
2460 OutputDeclarator(func->declarator, f);
2461 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2463 if(func->declarations)
2465 struct Declaration * decl;
2467 for(decl = (*func->declarations).first; decl; decl = decl->next)
2469 OutputDeclaration(decl, f);
2471 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2476 if(inCompiler && memoryGuard)
2478 char name[1024] = "";
2479 struct Identifier * id = GetDeclId(func->declarator);
2481 GetSourceName(name, func->loc.start.included ? GetIncludeFileFromID(func->loc.start.included) : (((void *)0)));
2482 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "{\n");
2483 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PushLoc(\"%s:%s\");\n", name, id->string);
2486 OutputStatement(func->body, f);
2487 if(inCompiler && memoryGuard)
2489 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, " __ecereNameSpace__ecere__com__MemoryGuard_PopLoc();\n");
2490 __ecereMethod___ecereNameSpace__ecere__sys__File_Printf(f, "}\n");
2493 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2496 curFunction = oldFunc;
2499 static void OutputMemberInit(struct MemberInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2501 if(init->identifiers)
2503 if((*init->identifiers).count > 1)
2505 struct Identifier * id;
2507 for(id = (*init->identifiers).first; id; id = id->next)
2509 OutputIdentifier(id, f);
2511 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ".");
2514 else if((*init->identifiers).first)
2515 OutputIdentifier((*init->identifiers).first, f);
2516 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " = ");
2518 if(init->initializer)
2519 OutputInitializer(init->initializer, f);
2522 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f);
2524 static void OutputMembersInit(struct MembersInit * init, struct __ecereNameSpace__ecere__com__Instance * f)
2530 struct MemberInit * member;
2532 if(init->dataMembers)
2534 for(member = (*init->dataMembers).first; member; member = member->next)
2536 OutputMemberInit(member, f);
2538 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2544 OutputClassFunction(init->function, f);
2549 static void OutputInstance(struct Instantiation * inst, struct __ecereNameSpace__ecere__com__Instance * f)
2552 OutputSpecifier(inst->_class, f, 0x0);
2555 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2556 OutputExpression(inst->exp, f);
2558 if(inst->members && (*inst->members).count > 1)
2560 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2563 else if(inst->members)
2564 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " { ");
2566 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "{");
2569 struct MembersInit * init;
2571 for(init = (*inst->members).first; init; init = init->next)
2573 OutputMembersInit(init, f);
2574 if(init->type == 0 && init->next)
2576 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n");
2582 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " }");
2584 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}");
2587 static void OutputClassFunction(struct ClassFunction * func, struct __ecereNameSpace__ecere__com__Instance * f)
2589 if(func->specifiers)
2591 struct Specifier * spec;
2593 for(spec = (*func->specifiers).first; spec; spec = spec->next)
2595 OutputSpecifier(spec, f, 0x0);
2597 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2599 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " ");
2601 if(func->declarator)
2602 OutputDeclarator(func->declarator, f);
2603 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2605 if(func->declarations)
2607 struct Declaration * decl;
2609 for(decl = (*func->declarations).first; decl; decl = decl->next)
2611 OutputDeclaration(decl, f);
2613 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2618 OutputStatement(func->body, f);
2619 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2623 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2626 static void OutputClassDef(struct ClassDef * def, struct __ecereNameSpace__ecere__com__Instance * f)
2633 OutputDeclaration(def->decl, f);
2634 if(def->next && def->next->type != 2)
2636 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2643 struct MemberInit * init;
2645 for(init = (*def->defProperties).first; init; init = init->next)
2647 OutputMemberInit(init, f);
2649 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ", ");
2651 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";\n\n");
2656 OutputClassFunction(def->function, f);
2657 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2663 static void OutputClass(struct ClassDefinition * _class, struct __ecereNameSpace__ecere__com__Instance * f)
2665 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "class ");
2666 OutputSpecifier(_class->_class, f, 0x0);
2667 if(_class->baseSpecs)
2669 struct Specifier * spec;
2671 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, " : ");
2672 for(spec = (*_class->baseSpecs).first; spec; spec = spec->next)
2674 OutputSpecifier(spec, f, 0x0);
2677 if(_class->definitions)
2679 struct ClassDef * def;
2681 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n{\n");
2683 for(def = (*_class->definitions).first; def; def = def->next)
2685 OutputClassDef(def, f);
2687 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "}\n");
2691 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ";");
2694 void OutputTree(struct __ecereNameSpace__ecere__sys__OldList * ast, struct __ecereNameSpace__ecere__com__Instance * f)
2696 struct External * external;
2699 for(external = ast->first; external; external = external->next)
2701 switch(external->type)
2704 OutputFunction(external->function, f);
2705 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2709 OutputDeclaration(external->declaration, f);
2710 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2714 OutputClass(external->_class, f);
2715 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char * string))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "\n");
2722 extern char * __ecereNameSpace__ecere__sys__TrimRSpaces(char * string, char * output);
2724 extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
2726 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__TempFile;
2728 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize;
2730 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek;
2732 int __ecereVMethodID___ecereNameSpace__ecere__sys__File_Read;
2734 extern void __ecereNameSpace__ecere__com__eInstance_DecRef(struct __ecereNameSpace__ecere__com__Instance * instance);
2736 char * StringFromSpecDecl(struct __ecereNameSpace__ecere__sys__OldList * specs, struct Declarator * decl)
2739 struct TypeName * typeName = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_TypeName);
2740 struct __ecereNameSpace__ecere__com__Instance * f = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass___ecereNameSpace__ecere__sys__TempFile);
2743 typeName->qualifiers = specs;
2744 typeName->declarator = decl;
2745 OutputTypeName(typeName, f, 0x1);
2746 ((typeName ? (__ecereClass_TypeName->Destructor ? __ecereClass_TypeName->Destructor(typeName) : 0, __ecereNameSpace__ecere__com__eSystem_Delete(typeName)) : 0), typeName = 0);
2747 size = ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_GetSize])(f);
2748 string = __ecereNameSpace__ecere__com__eSystem_New(sizeof(char) * (size + 1));
2749 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, int pos, int mode))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Seek])(f, 0, 0);
2750 ((int (*)(struct __ecereNameSpace__ecere__com__Instance *, void * buffer, unsigned int size, unsigned int count))f->_vTbl[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Read])(f, string, 1, (unsigned int)size);
2751 string[size] = '\0';
2752 __ecereNameSpace__ecere__sys__TrimRSpaces(string, string);
2753 (__ecereNameSpace__ecere__com__eInstance_DecRef(f), f = 0);
2757 extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__GlobalFunction;
2759 struct __ecereNameSpace__ecere__com__GlobalFunction;
2761 extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(char * name, char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
2763 void __ecereRegisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)
2765 struct __ecereNameSpace__ecere__com__Class * class;
2767 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("SetMemoryGuard", "void SetMemoryGuard(bool b)", SetMemoryGuard, module, 1);
2768 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("GetMemoryGuard", "bool GetMemoryGuard(void)", GetMemoryGuard, module, 1);
2769 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTypeName", "void OutputTypeName(TypeName type, ecere::sys::File f, bool typeName)", OutputTypeName, module, 1);
2770 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputExpression", "void OutputExpression(Expression exp, ecere::sys::File f)", OutputExpression, module, 1);
2771 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("OutputTree", "void OutputTree(ecere::sys::OldList ast, ecere::sys::File f)", OutputTree, module, 1);
2772 __ecereNameSpace__ecere__com__eSystem_RegisterFunction("StringFromSpecDecl", "char * StringFromSpecDecl(ecere::sys::OldList specs, Declarator decl)", StringFromSpecDecl, module, 1);
2775 void __ecereUnregisterModule_output(struct __ecereNameSpace__ecere__com__Instance * module)