+/* Code generated from eC source file: copy.ec */
#if defined(__GNUC__)
typedef long long int64;
typedef unsigned long long uint64;
+#ifndef _WIN32
+#define __declspec(x)
+#endif
#elif defined(__TINYC__)
#include <stdarg.h>
#define __builtin_va_list va_list
#define strcasecmp stricmp
#define strncasecmp strnicmp
#define __declspec(x) __attribute__((x))
+#else
+#define __declspec(x)
#endif
typedef long long int64;
typedef unsigned long long uint64;
#else
#define __ENDIAN_PAD(x) 0
#endif
+#include <stdint.h>
+#include <sys/types.h>
+extern void * __ecereNameSpace__ecere__com__eSystem_New(unsigned int size);
+
+extern void * __ecereNameSpace__ecere__com__eSystem_New0(unsigned int size);
+
+extern void * __ecereNameSpace__ecere__com__eSystem_Renew(void * memory, unsigned int size);
+
+extern void * __ecereNameSpace__ecere__com__eSystem_Renew0(void * memory, unsigned int size);
+
+extern void __ecereNameSpace__ecere__com__eSystem_Delete(void * memory);
+
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__BTNode;
struct __ecereNameSpace__ecere__sys__BTNode;
{
struct __ecereNameSpace__ecere__sys__BTNode * root;
int count;
-int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, unsigned int a, unsigned int b);
+int (* CompareKey)(struct __ecereNameSpace__ecere__sys__BinaryTree * tree, uintptr_t a, uintptr_t b);
void (* FreeKey)(void * key);
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__sys__OldList;
int count;
unsigned int offset;
unsigned int circ;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Method;
struct __ecereNameSpace__ecere__com__Method
{
-char * name;
+const char * name;
struct __ecereNameSpace__ecere__com__Method * parent;
struct __ecereNameSpace__ecere__com__Method * left;
struct __ecereNameSpace__ecere__com__Method * right;
int type;
struct __ecereNameSpace__ecere__com__Class * _class;
void * symbol;
-char * dataTypeString;
+const char * dataTypeString;
struct Type * dataType;
int memberAccess;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Property;
{
struct __ecereNameSpace__ecere__com__Property * prev;
struct __ecereNameSpace__ecere__com__Property * next;
-char * name;
+const char * name;
unsigned int isProperty;
int memberAccess;
int id;
struct __ecereNameSpace__ecere__com__Class * _class;
-char * dataTypeString;
+const char * dataTypeString;
struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
struct Type * dataType;
-void (* Set)();
-int (* Get)();
-unsigned int (* IsSet)();
+void (* Set)(void * , int);
+int (* Get)(void * );
+unsigned int (* IsSet)(void * );
void * data;
void * symbol;
int vid;
unsigned int conversion;
unsigned int watcherOffset;
-char * category;
+const char * category;
unsigned int compiled;
unsigned int selfWatchable;
unsigned int isWatchable;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_CodePosition;
int line;
int charPos;
int pos;
-unsigned int included;
-};
+int included;
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Location;
{
struct CodePosition start;
struct CodePosition end;
-};
+} __attribute__ ((gcc_struct));
+
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attrib;
+
+struct Attrib
+{
+struct Location loc;
+int type;
+struct __ecereNameSpace__ecere__sys__OldList * attribs;
+} __attribute__ ((gcc_struct));
+
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ExtDecl;
+
+struct ExtDecl
+{
+struct Location loc;
+int type;
+union
+{
+char * s;
+struct Attrib * attr;
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_ClassDefinition;
struct Location nameLoc;
struct Location insideLoc;
unsigned int built;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declaration;
{
struct __ecereNameSpace__ecere__sys__OldList * specifiers;
struct __ecereNameSpace__ecere__sys__OldList * declarators;
-};
+} __attribute__ ((gcc_struct));
struct Instantiation * inst;
struct
{
struct Identifier * id;
struct Expression * exp;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
struct Specifier * extStorage;
struct Symbol * symbol;
int declMode;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Statement;
{
struct Identifier * id;
struct Statement * stmt;
-} labeled;
+} __attribute__ ((gcc_struct)) labeled;
struct
{
struct Expression * exp;
struct Statement * stmt;
-} caseStmt;
+} __attribute__ ((gcc_struct)) caseStmt;
struct
{
struct __ecereNameSpace__ecere__sys__OldList * declarations;
struct __ecereNameSpace__ecere__sys__OldList * statements;
struct Context * context;
unsigned int isSwitch;
-} compound;
+} __attribute__ ((gcc_struct)) compound;
struct
{
struct __ecereNameSpace__ecere__sys__OldList * exp;
struct Statement * stmt;
struct Statement * elseStmt;
-} ifStmt;
+} __attribute__ ((gcc_struct)) ifStmt;
struct
{
struct __ecereNameSpace__ecere__sys__OldList * exp;
struct Statement * stmt;
-} switchStmt;
+} __attribute__ ((gcc_struct)) switchStmt;
struct
{
struct __ecereNameSpace__ecere__sys__OldList * exp;
struct Statement * stmt;
-} whileStmt;
+} __attribute__ ((gcc_struct)) whileStmt;
struct
{
struct __ecereNameSpace__ecere__sys__OldList * exp;
struct Statement * stmt;
-} doWhile;
+} __attribute__ ((gcc_struct)) doWhile;
struct
{
struct Statement * init;
struct Statement * check;
struct __ecereNameSpace__ecere__sys__OldList * increment;
struct Statement * stmt;
-} forStmt;
+} __attribute__ ((gcc_struct)) forStmt;
struct
{
struct Identifier * id;
-} gotoStmt;
+} __attribute__ ((gcc_struct)) gotoStmt;
struct
{
struct Specifier * spec;
struct __ecereNameSpace__ecere__sys__OldList * inputFields;
struct __ecereNameSpace__ecere__sys__OldList * outputFields;
struct __ecereNameSpace__ecere__sys__OldList * clobberedFields;
-} asmStmt;
+} __attribute__ ((gcc_struct)) asmStmt;
struct
{
struct Expression * watcher;
struct Expression * object;
struct __ecereNameSpace__ecere__sys__OldList * watches;
-} _watch;
+} __attribute__ ((gcc_struct)) _watch;
struct
{
struct Identifier * id;
struct __ecereNameSpace__ecere__sys__OldList * exp;
struct __ecereNameSpace__ecere__sys__OldList * filter;
struct Statement * stmt;
-} forEachStmt;
+} __attribute__ ((gcc_struct)) forEachStmt;
struct Declaration * decl;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TypeName;
struct Declarator * declarator;
int classObjectType;
struct Expression * bitCount;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Initializer;
{
struct Expression * exp;
struct __ecereNameSpace__ecere__sys__OldList * list;
-};
+} __attribute__ ((gcc_struct));
unsigned int isConstant;
-};
+struct Identifier * id;
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataValue;
double d;
long long i64;
uint64 ui64;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Expression;
{
char * constant;
struct Identifier * identifier;
-};
+} __attribute__ ((gcc_struct));
struct Statement * compound;
struct Instantiation * instance;
+struct
+{
char * string;
+unsigned int intlString;
+} __attribute__ ((gcc_struct));
struct __ecereNameSpace__ecere__sys__OldList * list;
struct
{
struct __ecereNameSpace__ecere__sys__OldList * specifiers;
struct Declarator * decl;
-} _classExp;
+} __attribute__ ((gcc_struct)) _classExp;
struct
{
struct Identifier * id;
-} classData;
+} __attribute__ ((gcc_struct)) classData;
struct
{
struct Expression * exp;
struct __ecereNameSpace__ecere__sys__OldList * arguments;
struct Location argLoc;
-} call;
+} __attribute__ ((gcc_struct)) call;
struct
{
struct Expression * exp;
struct __ecereNameSpace__ecere__sys__OldList * index;
-} index;
+} __attribute__ ((gcc_struct)) index;
struct
{
struct Expression * exp;
struct Identifier * member;
int memberType;
unsigned int thisPtr;
-} member;
+} __attribute__ ((gcc_struct)) member;
struct
{
int op;
struct Expression * exp1;
struct Expression * exp2;
-} op;
+} __attribute__ ((gcc_struct)) op;
struct TypeName * typeName;
struct Specifier * _class;
struct
{
struct TypeName * typeName;
struct Expression * exp;
-} cast;
+} __attribute__ ((gcc_struct)) cast;
struct
{
struct Expression * cond;
struct __ecereNameSpace__ecere__sys__OldList * exp;
struct Expression * elseExp;
-} cond;
+} __attribute__ ((gcc_struct)) cond;
struct
{
struct TypeName * typeName;
struct Expression * size;
-} _new;
+} __attribute__ ((gcc_struct)) _new;
struct
{
struct TypeName * typeName;
struct Expression * size;
struct Expression * exp;
-} _renew;
+} __attribute__ ((gcc_struct)) _renew;
struct
{
char * table;
struct Identifier * id;
-} db;
+} __attribute__ ((gcc_struct)) db;
struct
{
struct Expression * ds;
struct Expression * name;
-} dbopen;
+} __attribute__ ((gcc_struct)) dbopen;
struct
{
struct TypeName * typeName;
struct Initializer * initializer;
-} initializer;
+} __attribute__ ((gcc_struct)) initializer;
struct
{
struct Expression * exp;
struct TypeName * typeName;
-} vaArg;
-};
+} __attribute__ ((gcc_struct)) vaArg;
+} __attribute__ ((gcc_struct));
unsigned int debugValue;
struct __ecereNameSpace__ecere__com__DataValue val;
-unsigned int address;
+uint64 address;
unsigned int hasAddress;
struct Type * expType;
struct Type * destType;
unsigned int addedThis;
unsigned int needCast;
unsigned int thisPtr;
-};
+unsigned int opDestType;
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_TemplateDatatype;
int specifier;
struct
{
+struct ExtDecl * extDecl;
char * name;
struct Symbol * symbol;
struct __ecereNameSpace__ecere__sys__OldList * templateArgs;
-};
+} __attribute__ ((gcc_struct));
struct
{
struct Identifier * id;
struct __ecereNameSpace__ecere__sys__OldList * definitions;
unsigned int addNameSpace;
struct Context * ctx;
-};
+struct ExtDecl * extDeclStruct;
+} __attribute__ ((gcc_struct));
struct Expression * expression;
struct Specifier * _class;
struct TemplateParameter * templateParameter;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Identifier;
struct Specifier * _class;
char * string;
struct Identifier * badID;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Pointer;
struct Location loc;
struct __ecereNameSpace__ecere__sys__OldList * qualifiers;
struct Pointer * pointer;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Declarator;
{
struct Expression * exp;
struct Expression * posExp;
-char * attrib;
-} structDecl;
+struct Attrib * attrib;
+} __attribute__ ((gcc_struct)) structDecl;
struct
{
struct Expression * exp;
struct Specifier * enumClass;
-} array;
+} __attribute__ ((gcc_struct)) array;
struct
{
struct __ecereNameSpace__ecere__sys__OldList * parameters;
-} function;
+} __attribute__ ((gcc_struct)) function;
struct
{
struct Pointer * pointer;
-} pointer;
+} __attribute__ ((gcc_struct)) pointer;
struct
{
-char * extended;
-} extended;
-};
-};
+struct ExtDecl * extended;
+} __attribute__ ((gcc_struct)) extended;
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_FunctionDefinition;
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Symbol;
-struct Symbol;
+struct Symbol
+{
+char * string;
+struct Symbol * parent;
+struct Symbol * left;
+struct Symbol * right;
+int depth;
+struct Type * type;
+union
+{
+struct __ecereNameSpace__ecere__com__Method * method;
+struct __ecereNameSpace__ecere__com__Property * _property;
+struct __ecereNameSpace__ecere__com__Class * registered;
+} __attribute__ ((gcc_struct));
+int id;
+int idCode;
+union
+{
+struct
+{
+struct External * pointerExternal;
+struct External * structExternal;
+} __attribute__ ((gcc_struct));
+struct
+{
+struct External * externalGet;
+struct External * externalSet;
+struct External * externalPtr;
+struct External * externalIsSet;
+} __attribute__ ((gcc_struct));
+struct
+{
+struct External * methodExternal;
+struct External * methodCodeExternal;
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
+unsigned int imported;
+unsigned int declaredStructSym;
+struct __ecereNameSpace__ecere__com__Class * _class;
+unsigned int declaredStruct;
+unsigned int needConstructor;
+unsigned int needDestructor;
+char * constructorName;
+char * structName;
+char * className;
+char * destructorName;
+struct ModuleImport * module;
+struct ClassImport * _import;
+struct Location nameLoc;
+unsigned int isParam;
+unsigned int isRemote;
+unsigned int isStruct;
+unsigned int fireWatchersDone;
+int declaring;
+unsigned int classData;
+unsigned int isStatic;
+char * shortName;
+struct __ecereNameSpace__ecere__sys__OldList * templateParams;
+struct __ecereNameSpace__ecere__sys__OldList templatedClasses;
+struct Context * ctx;
+int isIterator;
+struct Expression * propCategory;
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Type;
{
struct __ecereNameSpace__ecere__sys__OldList members;
char * enumName;
-};
+} __attribute__ ((gcc_struct));
struct
{
struct Type * returnType;
struct Symbol * thisClass;
unsigned int staticMethod;
struct TemplateParameter * thisClassTemplate;
-};
+} __attribute__ ((gcc_struct));
struct
{
struct __ecereNameSpace__ecere__com__Method * method;
struct __ecereNameSpace__ecere__com__Class * methodClass;
struct __ecereNameSpace__ecere__com__Class * usedClass;
-};
+} __attribute__ ((gcc_struct));
struct
{
struct Type * arrayType;
struct Expression * arraySizeExp;
unsigned int freeExp;
struct Symbol * enumClass;
-};
+} __attribute__ ((gcc_struct));
struct Type * type;
struct TemplateParameter * templateParameter;
-};
-unsigned int isSigned;
+} __attribute__ ((gcc_struct));
int kind;
-unsigned int constant;
unsigned int size;
char * name;
char * typeName;
-unsigned int count;
-unsigned int truth;
int classObjectType;
-unsigned int byReference;
-unsigned int extraParam;
int alignment;
-unsigned int directClassAccess;
-unsigned int computing;
-unsigned int dllExport;
unsigned int offset;
-unsigned int keepCast;
-unsigned int passAsTemplate;
int bitFieldCount;
-};
+int count;
+unsigned int isSigned : 1;
+unsigned int constant : 1;
+unsigned int truth : 1;
+unsigned int byReference : 1;
+unsigned int extraParam : 1;
+unsigned int directClassAccess : 1;
+unsigned int computing : 1;
+unsigned int keepCast : 1;
+unsigned int passAsTemplate : 1;
+unsigned int dllExport : 1;
+unsigned int attrStdcall : 1;
+unsigned int declaredWithStruct : 1;
+unsigned int typedByReference : 1;
+unsigned int casted : 1;
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Class;
{
struct __ecereNameSpace__ecere__com__Class * prev;
struct __ecereNameSpace__ecere__com__Class * next;
-char * name;
+const char * name;
int offset;
int structSize;
int (* * _vTbl)();
int type;
struct __ecereNameSpace__ecere__com__Instance * module;
struct __ecereNameSpace__ecere__com__NameSpace * nameSpace;
-char * dataTypeString;
+const char * dataTypeString;
struct Type * dataType;
int typeSize;
int defaultAlignment;
void (* Initialize)();
int memberOffset;
struct __ecereNameSpace__ecere__sys__OldList selfWatchers;
-char * designerClass;
+const char * designerClass;
unsigned int noExpansion;
-char * defaultProperty;
+const char * defaultProperty;
unsigned int comRedefinition;
int count;
-unsigned int isRemote;
+int isRemote;
unsigned int internalDecl;
void * data;
unsigned int computeSize;
unsigned int fixed;
struct __ecereNameSpace__ecere__sys__OldList delayedCPValues;
int inheritanceAccess;
-char * fullName;
+const char * fullName;
void * symbol;
struct __ecereNameSpace__ecere__sys__OldList conversions;
struct __ecereNameSpace__ecere__sys__OldList templateParams;
struct __ecereNameSpace__ecere__com__Class * templateClass;
struct __ecereNameSpace__ecere__sys__OldList templatized;
int numParams;
-};
+unsigned int isInstanceClass;
+unsigned int byValueSystemClass;
+} __attribute__ ((gcc_struct));
+
+extern long long __ecereNameSpace__ecere__com__eClass_GetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name);
+
+extern void __ecereNameSpace__ecere__com__eClass_SetProperty(struct __ecereNameSpace__ecere__com__Class * _class, const char * name, long long value);
+
+extern void __ecereNameSpace__ecere__com__eInstance_FireSelfWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
+
+extern void __ecereNameSpace__ecere__com__eInstance_SetMethod(struct __ecereNameSpace__ecere__com__Instance * instance, const char * name, void * function);
+
+extern void __ecereNameSpace__ecere__com__eInstance_IncRef(struct __ecereNameSpace__ecere__com__Instance * instance);
+
+extern void __ecereNameSpace__ecere__com__eInstance_StopWatching(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property, struct __ecereNameSpace__ecere__com__Instance * object);
+
+extern void __ecereNameSpace__ecere__com__eInstance_Watch(void * instance, struct __ecereNameSpace__ecere__com__Property * _property, void * object, void (* callback)(void * , void * ));
+
+extern void __ecereNameSpace__ecere__com__eInstance_FireWatchers(struct __ecereNameSpace__ecere__com__Instance * instance, struct __ecereNameSpace__ecere__com__Property * _property);
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__Instance;
int (* * _vTbl)();
struct __ecereNameSpace__ecere__com__Class * _class;
int _refCount;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__DataMember;
{
struct __ecereNameSpace__ecere__com__DataMember * prev;
struct __ecereNameSpace__ecere__com__DataMember * next;
-char * name;
+const char * name;
unsigned int isProperty;
int memberAccess;
int id;
struct __ecereNameSpace__ecere__com__Class * _class;
-char * dataTypeString;
+const char * dataTypeString;
struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
struct Type * dataType;
int type;
struct __ecereNameSpace__ecere__sys__BinaryTree membersAlpha;
int memberOffset;
int structAlignment;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__SerialBuffer;
unsigned int count;
unsigned int _size;
unsigned int pos;
-};
+} __attribute__ ((gcc_struct));
extern struct __ecereNameSpace__ecere__com__Class * __ecereClass___ecereNameSpace__ecere__com__ClassTemplateArgument;
{
struct
{
-char * dataTypeString;
+const char * dataTypeString;
struct __ecereNameSpace__ecere__com__Class * dataTypeClass;
-};
+} __attribute__ ((gcc_struct));
struct __ecereNameSpace__ecere__com__DataValue expression;
struct
{
-char * memberString;
+const char * memberString;
union
{
struct __ecereNameSpace__ecere__com__DataMember * member;
struct __ecereNameSpace__ecere__com__Property * prop;
struct __ecereNameSpace__ecere__com__Method * method;
-};
-};
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
-extern struct Identifier * MkIdentifier(char * string);
+extern struct Identifier * MkIdentifier(const char * string);
struct Specifier * CopySpecifier(struct Specifier * spec);
if(copy)
{
copy->loc = initializer->loc;
+if(initializer->id)
+copy->id = CopyIdentifier(initializer->id);
copy->isConstant = initializer->isConstant;
}
return copy;
unsigned int used;
unsigned int variable;
unsigned int takeOutExp;
-};
+} __attribute__ ((gcc_struct));
extern struct MemberInit * MkMemberInit(struct __ecereNameSpace__ecere__sys__OldList * ids, struct Initializer * initializer);
{
struct __ecereNameSpace__ecere__sys__OldList * dataMembers;
struct ClassFunction * function;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
extern struct MembersInit * MkMembersInitList(struct __ecereNameSpace__ecere__sys__OldList * dataMembers);
extern struct Instantiation * MkInstantiation(struct Specifier * _class, struct Expression * exp, struct __ecereNameSpace__ecere__sys__OldList * members);
+extern struct Symbol * FindClass(const char * name);
+
static struct Instantiation * CopyInstantiation(struct Instantiation * inst)
{
struct Instantiation * copy;
}
copy = MkInstantiation(CopySpecifier(inst->_class), CopyExpression(inst->exp), list);
copy->data = inst->data;
+if(inst->data)
+{
+struct Symbol * classSym = FindClass(inst->_class->name);
+struct __ecereNameSpace__ecere__com__Class * _class = classSym ? classSym->registered : (((void *)0));
+
+if(_class)
+{
+if(_class->type == 0)
+((struct __ecereNameSpace__ecere__com__Instance *)(char *)((struct __ecereNameSpace__ecere__com__Instance *)copy->data))->_refCount++;
+}
+}
copy->loc = inst->loc;
copy->isConstant = inst->isConstant;
return copy;
extern struct Expression * MkExpInstance(struct Instantiation * inst);
-extern struct Expression * MkExpConstant(char * string);
+extern struct Expression * MkExpConstant(const char * string);
-extern struct Expression * MkExpString(char * string);
+extern struct Expression * MkExpString(const char * string);
extern struct Expression * MkExpOp(struct Expression * exp1, int op, struct Expression * exp2);
struct TypeName * CopyTypeName(struct TypeName * typeName);
+extern struct Expression * MkExpTypeAlign(struct TypeName * typeName);
+
extern struct Expression * MkExpCast(struct TypeName * typeName, struct Expression * expression);
extern struct Expression * MkExpCondition(struct Expression * cond, struct __ecereNameSpace__ecere__sys__OldList * expressions, struct Expression * elseExp);
static struct Statement * CopyStatement(struct Statement * stmt);
+extern struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct Initializer * initializer);
+
+extern struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * specifiers, struct Declarator * decl);
+
+struct Declarator * CopyDeclarator(struct Declarator * declarator);
+
struct Expression * CopyExpression(struct Expression * exp)
{
struct Expression * result = (((void *)0));
case 10:
result = MkExpTypeSize(CopyTypeName(exp->typeName));
break;
+case 36:
+result = MkExpTypeAlign(CopyTypeName(exp->typeName));
+break;
case 11:
result = MkExpCast(CopyTypeName(exp->cast.typeName), CopyExpression(exp->cast.exp));
break;
result = MkExpCondition(CopyExpression(exp->cond.cond), list, CopyExpression(exp->cond.elseExp));
break;
}
-case 36:
+case 34:
result = MkExpVaArg(CopyExpression(exp->vaArg.exp), CopyTypeName(exp->vaArg.typeName));
break;
-case 25:
+case 23:
result = MkExpExtensionCompound(CopyStatement(exp->compound));
break;
+case 33:
+result = MkExpExtensionInitializer(CopyTypeName(exp->initializer.typeName), CopyInitializer(exp->initializer.initializer));
+break;
+case 24:
+result = MkExpClass(CopyList(exp->_classExp.specifiers, CopySpecifier), CopyDeclarator(exp->_classExp.decl));
+break;
}
if(result)
{
result->loc = exp->loc;
result->isConstant = exp->isConstant;
result->byReference = exp->byReference;
+result->opDestType = exp->opDestType;
}
return result;
}
extern struct Statement * MkExpressionStmt(struct __ecereNameSpace__ecere__sys__OldList * expressions);
+extern struct Statement * MkBadDeclStmt(struct Declaration * decl);
+
extern void * __ecereNameSpace__ecere__com__eInstance_New(struct __ecereNameSpace__ecere__com__Class * _class);
static struct Statement * CopyStatement(struct Statement * stmt)
case 3:
result = MkExpressionStmt(CopyList(stmt->expressions, CopyExpression));
break;
+case 14:
+result = MkBadDeclStmt(CopyDeclaration(stmt->decl));
+break;
}
}
if(result)
struct Location loc;
struct Identifier * id;
struct Expression * exp;
-};
+} __attribute__ ((gcc_struct));
extern struct Enumerator * MkEnumerator(struct Identifier * id, struct Expression * exp);
{
struct Identifier * id;
struct Initializer * initializer;
-};
-};
+} __attribute__ ((gcc_struct));
+} __attribute__ ((gcc_struct));
int memberAccess;
void * object;
-};
+} __attribute__ ((gcc_struct));
extern struct ClassDef * MkClassDefDeclaration(struct Declaration * decl);
extern struct Specifier * MkStructOrUnion(int type, struct Identifier * id, struct __ecereNameSpace__ecere__sys__OldList * definitions);
-extern char * __ecereNameSpace__ecere__sys__CopyString(char * string);
+struct ExtDecl * CopyExtDecl(struct ExtDecl * extDecl);
+
+extern char * __ecereNameSpace__ecere__sys__CopyString(const char * string);
extern struct Specifier * MkSpecifierSubClass(struct Specifier * _class);
+extern struct Specifier * MkSpecifierExtended(struct ExtDecl * extDecl);
+
struct Specifier * CopySpecifier(struct Specifier * spec)
{
-void * __ecereTemp1;
-
if(spec)
switch(spec->type)
{
struct Identifier * id = CopyIdentifier(spec->id);
struct __ecereNameSpace__ecere__sys__OldList * list = (((void *)0));
struct ClassDef * def;
+struct Specifier * s;
if(spec->definitions)
{
ListAdd(list, CopyClassDef(def));
}
}
-return MkStructOrUnion(spec->type, id, list);
+s = MkStructOrUnion(spec->type, id, list);
+s->extDeclStruct = CopyExtDecl(spec->extDeclStruct);
+return s;
}
case 1:
{
case 7:
return MkSpecifierSubClass(CopySpecifier(spec->_class));
case 8:
-return (__ecereTemp1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Specifier), ((struct Specifier *)__ecereTemp1)->loc = spec->loc, ((struct Specifier *)__ecereTemp1)->type = 8, ((struct Specifier *)__ecereTemp1)->templateParameter = spec->templateParameter, ((struct Specifier *)__ecereTemp1));
+return __extension__ ({
+struct Specifier * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Specifier);
+
+__ecereInstance1->loc = spec->loc, __ecereInstance1->type = 8, __ecereInstance1->templateParameter = spec->templateParameter, __ecereInstance1;
+});
+case 5:
+return MkSpecifierExtended(CopyExtDecl(spec->extDecl));
}
return (((void *)0));
}
extern struct TypeName * MkTypeName(struct __ecereNameSpace__ecere__sys__OldList * qualifiers, struct Declarator * declarator);
-struct Declarator * CopyDeclarator(struct Declarator * declarator);
-
struct TypeName * CopyTypeName(struct TypeName * typeName)
{
struct __ecereNameSpace__ecere__sys__OldList * list = (((void *)0));
return copy;
}
+extern struct ExtDecl * MkExtDeclAttrib(struct Attrib * attr);
+
+struct Attrib * CopyAttrib(struct Attrib * attrib);
+
+extern struct ExtDecl * MkExtDeclString(char * s);
+
+struct ExtDecl * CopyExtDecl(struct ExtDecl * extDecl)
+{
+if(extDecl)
+{
+if(extDecl->type == 1)
+return MkExtDeclAttrib(CopyAttrib(extDecl->attr));
+else if(extDecl->type == 0)
+return MkExtDeclString(__ecereNameSpace__ecere__sys__CopyString(extDecl->s));
+}
+return (((void *)0));
+}
+
+extern struct __ecereNameSpace__ecere__com__Class * __ecereClass_Attribute;
+
+struct Attribute
+{
+struct Attribute * prev;
+struct Attribute * next;
+struct Location loc;
+char * attr;
+struct Expression * exp;
+} __attribute__ ((gcc_struct));
+
+extern struct Attribute * MkAttribute(char * attr, struct Expression * exp);
+
+struct Attribute * CopyAttribute(struct Attribute * attrib)
+{
+if(attrib)
+return MkAttribute(__ecereNameSpace__ecere__sys__CopyString(attrib->attr), CopyExpression(attrib->exp));
+return (((void *)0));
+}
+
+extern struct Attrib * MkAttrib(int type, struct __ecereNameSpace__ecere__sys__OldList * attribs);
+
+struct Attrib * CopyAttrib(struct Attrib * attrib)
+{
+if(attrib)
+return MkAttrib(attrib->type, CopyList(attrib->attribs, CopyAttribute));
+return (((void *)0));
+}
+
extern struct Declarator * MkStructDeclarator(struct Declarator * declarator, struct Expression * exp);
extern struct Declarator * MkDeclaratorIdentifier(struct Identifier * id);
extern struct Declarator * MkDeclaratorPointer(struct Pointer * pointer, struct Declarator * declarator);
-extern struct Declarator * MkDeclaratorExtended(char * extended, struct Declarator * declarator);
+extern struct Declarator * MkDeclaratorExtended(struct ExtDecl * extended, struct Declarator * declarator);
-extern struct Declarator * MkDeclaratorExtendedEnd(char * extended, struct Declarator * declarator);
+extern struct Declarator * MkDeclaratorExtendedEnd(struct ExtDecl * extended, struct Declarator * declarator);
struct Declarator * CopyDeclarator(struct Declarator * declarator)
{
struct Declarator * decl = MkStructDeclarator(CopyDeclarator(declarator->declarator), CopyExpression(declarator->structDecl.exp));
if(declarator->structDecl.attrib)
-decl->structDecl.attrib = __ecereNameSpace__ecere__sys__CopyString(declarator->structDecl.attrib);
+decl->structDecl.attrib = CopyAttrib(declarator->structDecl.attrib);
return decl;
}
case 1:
case 5:
return MkDeclaratorPointer(CopyPointer(declarator->pointer.pointer), CopyDeclarator(declarator->declarator));
case 6:
-return MkDeclaratorExtended(__ecereNameSpace__ecere__sys__CopyString(declarator->extended.extended), CopyDeclarator(declarator->declarator));
+return MkDeclaratorExtended(CopyExtDecl(declarator->extended.extended), CopyDeclarator(declarator->declarator));
case 7:
-return MkDeclaratorExtendedEnd(__ecereNameSpace__ecere__sys__CopyString(declarator->extended.extended), CopyDeclarator(declarator->declarator));
+return MkDeclaratorExtendedEnd(CopyExtDecl(declarator->extended.extended), CopyDeclarator(declarator->declarator));
}
}
return (((void *)0));
struct Location loc;
struct Declarator * declarator;
struct Initializer * initializer;
-};
+} __attribute__ ((gcc_struct));
extern struct InitDeclarator * MkInitDeclarator(struct Declarator * declarator, struct Initializer * initializer);
{
struct __ecereNameSpace__ecere__sys__Item * prev;
struct __ecereNameSpace__ecere__sys__Item * next;
-};
+} __attribute__ ((gcc_struct));
struct __ecereNameSpace__ecere__sys__OldList * CopyList(struct __ecereNameSpace__ecere__sys__OldList * source, void * (* CopyFunction)(void *))
{
struct __ecereNameSpace__ecere__com__GlobalFunction;
-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);
+extern struct __ecereNameSpace__ecere__com__GlobalFunction * __ecereNameSpace__ecere__com__eSystem_RegisterFunction(const char * name, const char * type, void * func, struct __ecereNameSpace__ecere__com__Instance * module, int declMode);
void __ecereRegisterModule_copy(struct __ecereNameSpace__ecere__com__Instance * module)
{
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopyClassDef", "ClassDef CopyClassDef(ClassDef def)", CopyClassDef, module, 2);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopySpecifier", "Specifier CopySpecifier(Specifier spec)", CopySpecifier, module, 2);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopyTypeName", "TypeName CopyTypeName(TypeName typeName)", CopyTypeName, module, 2);
+__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopyExtDecl", "ExtDecl CopyExtDecl(ExtDecl extDecl)", CopyExtDecl, module, 2);
+__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopyAttribute", "Attribute CopyAttribute(Attribute attrib)", CopyAttribute, module, 2);
+__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopyAttrib", "Attrib CopyAttrib(Attrib attrib)", CopyAttrib, module, 2);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopyDeclarator", "Declarator CopyDeclarator(Declarator declarator)", CopyDeclarator, module, 2);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopyInitDeclarator", "InitDeclarator CopyInitDeclarator(InitDeclarator initDecl)", CopyInitDeclarator, module, 2);
__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopyDeclaration", "Declaration CopyDeclaration(Declaration decl)", CopyDeclaration, module, 2);
-__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopyList", "ecere::sys::OldList * CopyList(ecere::sys::OldList * source, void *( *)(void *))", CopyList, module, 2);
+__ecereNameSpace__ecere__com__eSystem_RegisterFunction("CopyList", "ecere::sys::OldList * CopyList(ecere::sys::OldList * source, void * (* CopyFunction)(void *))", CopyList, module, 2);
}
void __ecereUnregisterModule_copy(struct __ecereNameSpace__ecere__com__Instance * module)