ide/debugger; compiler/libec: (#19, #456) Fixed watches memory leaks, improved errors
authorJerome St-Louis <jerome@ecere.com>
Sun, 4 May 2014 00:16:42 +0000 (20:16 -0400)
committerJerome St-Louis <jerome@ecere.com>
Sun, 4 May 2014 00:16:42 +0000 (20:16 -0400)
- Fixed setting 'constant' regardless of error type (only used for memoryErrorExp)
- Freeing data for debugger error expressions
- Fixed some memory errors missing addresses
- Making use of dereferenceError
- Improved evaluation pathways to resolve in less unknown errors
- Treating both class and struct members expression errors the same way

15 files changed:
compiler/bootstrap/libec/bootstrap/ast.c
compiler/bootstrap/libec/bootstrap/copy.c
compiler/bootstrap/libec/bootstrap/dbpass.c
compiler/bootstrap/libec/bootstrap/ecdefs.c
compiler/bootstrap/libec/bootstrap/freeAst.c
compiler/bootstrap/libec/bootstrap/output.c
compiler/bootstrap/libec/bootstrap/pass0.c
compiler/bootstrap/libec/bootstrap/pass15.c
compiler/bootstrap/libec/bootstrap/pass16.c
compiler/bootstrap/libec/bootstrap/pass2.c
compiler/bootstrap/libec/bootstrap/pass3.c
compiler/libec/src/ecdefs.ec
compiler/libec/src/freeAst.ec
ide/src/debugger/Debugger.ec
ide/src/debugger/debugTools.ec

index fd83a95..1f4cc5b 100644 (file)
@@ -1469,7 +1469,7 @@ struct Expression * MkExpExtensionCompound(struct Statement * compound)
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 25, __ecereInstance1->compound = compound, __ecereInstance1;
+__ecereInstance1->type = 23, __ecereInstance1->compound = compound, __ecereInstance1;
 });
 }
 
@@ -1478,7 +1478,7 @@ struct Expression * MkExpExtensionExpression(struct __ecereNameSpace__ecere__sys
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 34, __ecereInstance1->list = expressions, __ecereInstance1->loc = yylloc, __ecereInstance1;
+__ecereInstance1->type = 32, __ecereInstance1->list = expressions, __ecereInstance1->loc = yylloc, __ecereInstance1;
 });
 }
 
@@ -1487,7 +1487,7 @@ struct Expression * MkExpExtensionInitializer(struct TypeName * typeName, struct
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 35, __ecereInstance1->initializer.typeName = typeName, __ecereInstance1->initializer.initializer = initializer, __ecereInstance1->loc = yylloc, __ecereInstance1;
+__ecereInstance1->type = 33, __ecereInstance1->initializer.typeName = typeName, __ecereInstance1->initializer.initializer = initializer, __ecereInstance1->loc = yylloc, __ecereInstance1;
 });
 }
 
@@ -1745,7 +1745,7 @@ struct Expression * MkExpTypeAlign(struct TypeName * typeName)
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 38, __ecereInstance1->typeName = typeName, __ecereInstance1;
+__ecereInstance1->type = 36, __ecereInstance1->typeName = typeName, __ecereInstance1;
 });
 }
 
@@ -1790,7 +1790,7 @@ struct Expression * MkExpRenew0(struct Expression * memExp, struct TypeName * ty
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 29, __ecereInstance1->_renew.exp = memExp, __ecereInstance1->_renew.typeName = type, __ecereInstance1->_renew.size = size, __ecereInstance1;
+__ecereInstance1->type = 27, __ecereInstance1->_renew.exp = memExp, __ecereInstance1->_renew.typeName = type, __ecereInstance1->_renew.size = size, __ecereInstance1;
 });
 }
 
@@ -1808,7 +1808,7 @@ struct Expression * MkExpNew0(struct TypeName * type, struct Expression * size)
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 28, __ecereInstance1->_new.typeName = type, __ecereInstance1->_new.size = size, __ecereInstance1;
+__ecereInstance1->type = 26, __ecereInstance1->_new.typeName = type, __ecereInstance1->_new.size = size, __ecereInstance1;
 });
 }
 
@@ -1817,7 +1817,7 @@ struct Expression * MkExpVaArg(struct Expression * exp, struct TypeName * type)
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 36, __ecereInstance1->vaArg.exp = exp, __ecereInstance1->vaArg.typeName = type, __ecereInstance1;
+__ecereInstance1->type = 34, __ecereInstance1->vaArg.exp = exp, __ecereInstance1->vaArg.typeName = type, __ecereInstance1;
 });
 }
 
@@ -4665,7 +4665,7 @@ struct Expression * MkExpClass(struct __ecereNameSpace__ecere__sys__OldList * sp
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 26, __ecereInstance1->_classExp.specifiers = specifiers, __ecereInstance1->_classExp.decl = decl, __ecereInstance1;
+__ecereInstance1->type = 24, __ecereInstance1->_classExp.specifiers = specifiers, __ecereInstance1->_classExp.decl = decl, __ecereInstance1;
 });
 }
 
@@ -4674,7 +4674,7 @@ struct Expression * MkExpClassData(struct Identifier * id)
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 27, __ecereInstance1->classData.id = id, __ecereInstance1;
+__ecereInstance1->type = 25, __ecereInstance1->classData.id = id, __ecereInstance1;
 });
 }
 
@@ -4728,7 +4728,7 @@ struct Expression * MkExpDBOpen(struct Expression * ds, struct Expression * dbNa
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 30, __ecereInstance1->dbopen.ds = ds, __ecereInstance1->dbopen.name = dbName, __ecereInstance1;
+__ecereInstance1->type = 28, __ecereInstance1->dbopen.ds = ds, __ecereInstance1->dbopen.name = dbName, __ecereInstance1;
 });
 }
 
@@ -4737,7 +4737,7 @@ struct Expression * MkExpDBField(char * table, struct Identifier * id)
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 31, __ecereInstance1->db.table = table, __ecereInstance1->db.id = id, __ecereInstance1;
+__ecereInstance1->type = 29, __ecereInstance1->db.table = table, __ecereInstance1->db.id = id, __ecereInstance1;
 });
 }
 
@@ -4746,7 +4746,7 @@ struct Expression * MkExpDBIndex(char * table, struct Identifier * id)
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 33, __ecereInstance1->db.table = table, __ecereInstance1->db.id = id, __ecereInstance1;
+__ecereInstance1->type = 31, __ecereInstance1->db.table = table, __ecereInstance1->db.id = id, __ecereInstance1;
 });
 }
 
@@ -4755,7 +4755,7 @@ struct Expression * MkExpDBTable(char * table)
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 32, __ecereInstance1->db.table = table, __ecereInstance1;
+__ecereInstance1->type = 30, __ecereInstance1->db.table = table, __ecereInstance1;
 });
 }
 
@@ -4764,7 +4764,7 @@ struct Expression * MkExpArray(struct __ecereNameSpace__ecere__sys__OldList * ex
 return __extension__ ({
 struct Expression * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 
-__ecereInstance1->type = 37, __ecereInstance1->list = expressions, __ecereInstance1;
+__ecereInstance1->type = 35, __ecereInstance1->list = expressions, __ecereInstance1;
 });
 }
 
index 1d53458..79bbcfe 100644 (file)
@@ -1117,7 +1117,7 @@ break;
 case 10:
 result = MkExpTypeSize(CopyTypeName(exp->typeName));
 break;
-case 38:
+case 36:
 result = MkExpTypeAlign(CopyTypeName(exp->typeName));
 break;
 case 11:
@@ -1133,13 +1133,13 @@ ListAdd(list, CopyExpression(e));
 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 35:
+case 33:
 result = MkExpExtensionInitializer(CopyTypeName(exp->initializer.typeName), CopyInitializer(exp->initializer.initializer));
 break;
 }
index c7ef11a..49904a4 100644 (file)
@@ -1306,7 +1306,7 @@ ProcessExpression(exp->cond.elseExp);
 break;
 case 16:
 break;
-case 31:
+case 29:
 {
 char tableName[1024];
 char name[1024];
@@ -1321,7 +1321,7 @@ exp->type = 0;
 exp->identifier = MkIdentifier(name);
 break;
 }
-case 32:
+case 30:
 {
 char tableName[1024];
 char name[1024];
@@ -1336,7 +1336,7 @@ exp->type = 0;
 exp->identifier = MkIdentifier(name);
 break;
 }
-case 33:
+case 31:
 {
 char tableName[1024];
 char name[1024];
@@ -1351,7 +1351,7 @@ exp->type = 0;
 exp->identifier = MkIdentifier(name);
 break;
 }
-case 30:
+case 28:
 {
 if(tableStatements)
 {
@@ -1418,7 +1418,7 @@ struct Context * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(
 __ecereInstance1->parent = ifDBStmt->compound.context, __ecereInstance1;
 });
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*ifDBStmt->compound.statements), MkExpressionStmt(MkListOne(MkExpCall(MkExpMember(MkExpIdentifier(MkIdentifier("db")), MkIdentifier("Commit")), MkList()))));
-exp->type = 25;
+exp->type = 23;
 exp->compound = databaseOpenStmt;
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*databaseOpenStmt->compound.statements), MkExpressionStmt(MkListOne(MkExpIdentifier(MkIdentifier("db")))));
 tableStatements = (((void *)0));
index 9867834..95d84f4 100644 (file)
@@ -2079,26 +2079,24 @@ __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "classSizeExp", 15);
 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dummyExp", 16);
 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dereferenceErrorExp", 17);
 __ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "symbolErrorExp", 18);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "classMemberSymbolErrorExp", 19);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "structMemberSymbolErrorExp", 20);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "memoryErrorExp", 21);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "unknownErrorExp", 22);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "noDebuggerErrorExp", 23);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "debugStateErrorExp", 24);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "extensionCompoundExp", 25);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "classExp", 26);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "classDataExp", 27);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "new0Exp", 28);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "renew0Exp", 29);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dbopenExp", 30);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dbfieldExp", 31);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dbtableExp", 32);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dbindexExp", 33);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "extensionExpressionExp", 34);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "extensionInitializerExp", 35);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "vaArgExp", 36);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "arrayExp", 37);
-__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "typeAlignExp", 38);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "memberSymbolErrorExp", 19);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "memoryErrorExp", 20);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "unknownErrorExp", 21);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "noDebuggerErrorExp", 22);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "extensionCompoundExp", 23);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "classExp", 24);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "classDataExp", 25);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "new0Exp", 26);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "renew0Exp", 27);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dbopenExp", 28);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dbfieldExp", 29);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dbtableExp", 30);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "dbindexExp", 31);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "extensionExpressionExp", 32);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "extensionInitializerExp", 33);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "vaArgExp", 34);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "arrayExp", 35);
+__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "typeAlignExp", 36);
 class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(4, "MemberType", 0, 0, 0, 0, 0, module, 1, 1);
 if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + structSize_Instance)))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + structSize_Instance)))->application && class)
 __ecereClass_MemberType = class;
index 9c54e79..ea560ff 100644 (file)
@@ -1477,12 +1477,12 @@ static void _FreeExpression(struct Expression * exp, unsigned int freePointer)
 switch(exp->type)
 {
 case 13:
-case 28:
+case 26:
 FreeExpression(exp->_new.size);
 FreeTypeName(exp->_new.typeName);
 break;
 case 14:
-case 29:
+case 27:
 FreeExpression(exp->_renew.exp);
 FreeExpression(exp->_renew.size);
 FreeTypeName(exp->_renew.typeName);
@@ -1540,7 +1540,7 @@ break;
 case 10:
 FreeTypeName(exp->_new.typeName);
 break;
-case 38:
+case 36:
 FreeTypeName(exp->_new.typeName);
 break;
 case 11:
@@ -1558,19 +1558,19 @@ if(exp->cond.elseExp)
 FreeExpression(exp->cond.elseExp);
 break;
 }
-case 25:
+case 23:
 {
 if(exp->compound)
 FreeStatement(exp->compound);
 break;
 }
-case 34:
+case 32:
 {
 if(exp->list)
 FreeList(exp->list, FreeExpression);
 break;
 }
-case 35:
+case 33:
 {
 if(exp->initializer.typeName)
 FreeTypeName(exp->initializer.typeName);
@@ -1580,32 +1580,32 @@ break;
 }
 case 16:
 break;
-case 26:
+case 24:
 if(exp->_classExp.specifiers)
 FreeList(exp->_classExp.specifiers, FreeSpecifier);
 if(exp->_classExp.decl)
 FreeDeclarator(exp->_classExp.decl);
 break;
+case 29:
 case 31:
-case 33:
-case 32:
+case 30:
 if(exp->db.id)
 FreeIdentifier(exp->db.id);
 (__ecereNameSpace__ecere__com__eSystem_Delete(exp->db.table), exp->db.table = 0);
 break;
-case 30:
+case 28:
 if(exp->dbopen.ds)
 FreeExpression(exp->dbopen.ds);
 if(exp->dbopen.name)
 FreeExpression(exp->dbopen.name);
 break;
-case 36:
+case 34:
 if(exp->vaArg.exp)
 FreeExpression(exp->vaArg.exp);
 if(exp->vaArg.typeName)
 FreeTypeName(exp->vaArg.typeName);
 break;
-case 37:
+case 35:
 if(exp->list)
 FreeList(exp->list, FreeExpression);
 break;
@@ -1613,10 +1613,27 @@ case 15:
 if(exp->_class)
 FreeSpecifier(exp->_class);
 break;
-case 27:
+case 25:
 if(exp->classData.id)
 FreeIdentifier(exp->classData.id);
 break;
+case 18:
+if(exp->identifier)
+FreeIdentifier(exp->identifier);
+break;
+case 20:
+(__ecereNameSpace__ecere__com__eSystem_Delete(exp->constant), exp->constant = 0);
+break;
+case 19:
+if(exp->member.exp)
+FreeExpression(exp->member.exp);
+if(exp->member.member)
+FreeIdentifier(exp->member.member);
+break;
+case 17:
+case 21:
+case 22:
+break;
 }
 if(freePointer)
 {
index 6dac75d..1b55f23 100644 (file)
@@ -1414,7 +1414,7 @@ void OutputExpression(struct Expression * exp, struct __ecereNameSpace__ecere__c
 {
 switch(exp->type)
 {
-case 26:
+case 24:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 
@@ -1450,7 +1450,7 @@ __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpa
 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
 }
 break;
-case 25:
+case 23:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 
@@ -1495,7 +1495,7 @@ struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
 break;
-case 28:
+case 26:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 
@@ -1544,7 +1544,7 @@ struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, "]");
 break;
-case 29:
+case 27:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 
@@ -1618,12 +1618,12 @@ __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpa
 OutputExpression(exp->op.exp2, f);
 }
 break;
-case 34:
+case 32:
 case 5:
 {
 struct Expression * expression;
 
-if(exp->type == 34)
+if(exp->type == 32)
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 
@@ -1746,7 +1746,7 @@ struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
 break;
-case 38:
+case 36:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 
@@ -1759,7 +1759,7 @@ struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
 break;
-case 35:
+case 33:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 
@@ -1819,7 +1819,7 @@ __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpa
 if(exp->cond.elseExp)
 OutputExpression(exp->cond.elseExp, f);
 break;
-case 36:
+case 34:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 
@@ -1838,7 +1838,7 @@ struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 __internal_ClassInst ? __internal_ClassInst->_vTbl : __ecereClass___ecereNameSpace__ecere__sys__File->_vTbl;
 })[__ecereVMethodID___ecereNameSpace__ecere__sys__File_Puts])(f, ")");
 break;
-case 37:
+case 35:
 ((unsigned int (*)(struct __ecereNameSpace__ecere__com__Instance *, const char *  string))__extension__ ({
 struct __ecereNameSpace__ecere__com__Instance * __internal_ClassInst = f;
 
index 77ba525..45ee4eb 100644 (file)
@@ -1410,11 +1410,11 @@ CheckPublicExpression(exp->cond.elseExp, access);
 break;
 }
 case 13:
-case 28:
+case 26:
 CheckPublicExpression(exp->_new.size, access);
 break;
 case 14:
-case 29:
+case 27:
 CheckPublicExpression(exp->_renew.size, access);
 CheckPublicExpression(exp->_renew.exp, access);
 break;
index d39e5db..ca0095a 100644 (file)
@@ -5337,7 +5337,7 @@ ReadString(string, sourceExp->string);
 decl = SpecDeclFromString(string, specs, (((void *)0)));
 FreeExpContents(sourceExp);
 FreeType(sourceExp->expType);
-sourceExp->type = 26;
+sourceExp->type = 24;
 sourceExp->_classExp.specifiers = specs;
 sourceExp->_classExp.decl = decl;
 sourceExp->expType = dest;
@@ -5594,7 +5594,7 @@ return 0x1;
 }
 else
 {
-while((sourceExp->type == 5 || sourceExp->type == 34) && sourceExp->list)
+while((sourceExp->type == 5 || sourceExp->type == 32) && sourceExp->list)
 sourceExp = (*sourceExp->list).last;
 if(sourceExp->type == 0)
 {
@@ -11564,7 +11564,7 @@ FreeType(op2.type);
 break;
 }
 case 5:
-case 34:
+case 32:
 {
 struct Expression * e, * n;
 
@@ -11604,7 +11604,7 @@ struct __ecereNameSpace__ecere__com__Property * prop = (((void *)0));
 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
 struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
 
-if(type->kind == 19 && exp->member.exp->type == 26)
+if(type->kind == 19 && exp->member.exp->type == 24)
 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
 if(!_class)
 {
@@ -12324,7 +12324,7 @@ context = PushContext();
 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
-exp->type = 25;
+exp->type = 23;
 exp->compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")), '=', newExp))));
 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")))));
@@ -12373,7 +12373,7 @@ context = PushContext();
 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifier(DOUBLE)), MkListOne(MkDeclaratorIdentifier(MkIdentifier("d"))), (((void *)0)))));
 ListAdd(unionDefs, MkClassDefDeclaration(MkStructDeclaration(MkListOne(MkSpecifierName("uint64")), MkListOne(MkDeclaratorIdentifier(MkIdentifier("i"))), (((void *)0)))));
 specs = MkListOne(MkStructOrUnion(4, (((void *)0)), unionDefs));
-exp->type = 25;
+exp->type = 23;
 exp->compound = MkCompoundStmt(MkListOne(MkDeclaration(specs, MkListOne(MkInitDeclarator(MkDeclaratorIdentifier(MkIdentifier("__internal_union")), (((void *)0)))))), statements);
 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpOp(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("i")), '=', newExp))));
 ListAdd(statements, MkExpressionStmt(MkListOne(MkExpMember(MkExpIdentifier(MkIdentifier("__internal_union")), MkIdentifier("d")))));
@@ -13197,11 +13197,11 @@ if(!_class || strcmp(_class->fullName, "char *"))
 {
 struct Expression * checkedExp = e, * newExp;
 
-while(((checkedExp->type == 5 || checkedExp->type == 34 || checkedExp->type == 25) && checkedExp->list) || checkedExp->type == 11)
+while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->list) || checkedExp->type == 11)
 {
-if(checkedExp->type == 5 || checkedExp->type == 34 || checkedExp->type == 25)
+if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
 {
-if(checkedExp->type == 25)
+if(checkedExp->type == 23)
 {
 checkedExp = (*((struct Statement *)(*checkedExp->compound->compound.statements).last)->expressions).last;
 }
@@ -13256,7 +13256,7 @@ if(curCompound)
 char name[100];
 struct __ecereNameSpace__ecere__sys__OldList * stmts = MkList();
 
-e->type = 25;
+e->type = 23;
 sprintf(name, "__internalValue%03X", internalValueCounter++);
 if(!curCompound->compound.declarations)
 curCompound->compound.declarations = MkList();
@@ -13282,11 +13282,11 @@ curContext = context->parent;
 }
 }
 checkedExp = e;
-while(((checkedExp->type == 5 || checkedExp->type == 34 || checkedExp->type == 25) && checkedExp->list) || checkedExp->type == 11)
+while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->list) || checkedExp->type == 11)
 {
-if(checkedExp->type == 5 || checkedExp->type == 34 || checkedExp->type == 25)
+if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
 {
-if(checkedExp->type == 25)
+if(checkedExp->type == 23)
 {
 checkedExp = (*((struct Statement *)(*checkedExp->compound->compound.statements).last)->expressions).last;
 }
@@ -13828,7 +13828,7 @@ __ecereInstance1->refCount = 1, __ecereInstance1->kind = 1, __ecereInstance1->co
 break;
 }
 case 13:
-case 28:
+case 26:
 ProcessExpressionType(exp->_new.size);
 exp->expType = __extension__ ({
 struct Type * __ecereInstance1 = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Type);
@@ -13838,7 +13838,7 @@ __ecereInstance1->refCount = 1, __ecereInstance1->kind = 13, __ecereInstance1->t
 DeclareType(exp->expType->type, 0x0, 0x0);
 break;
 case 14:
-case 29:
+case 27:
 ProcessExpressionType(exp->_renew.size);
 ProcessExpressionType(exp->_renew.exp);
 exp->expType = __extension__ ({
@@ -14555,7 +14555,7 @@ FreeType(type2);
 break;
 }
 case 5:
-case 34:
+case 32:
 {
 struct Expression * e;
 
@@ -15297,7 +15297,7 @@ struct Identifier * id = exp->member.member;
 int typeKind = type->kind;
 struct __ecereNameSpace__ecere__com__Class * _class = (id && (!id->_class || id->_class->name)) ? (id->classSym ? id->classSym->registered : (type->_class ? type->_class->registered : (((void *)0)))) : (((void *)0));
 
-if(typeKind == 19 && exp->member.exp->type == 26)
+if(typeKind == 19 && exp->member.exp->type == 24)
 {
 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
 typeKind = 8;
@@ -15909,14 +15909,14 @@ exp->isConstant = exp->cast.exp->isConstant;
 }
 break;
 }
-case 35:
+case 33:
 {
 struct Type * type = ProcessType(exp->initializer.typeName->qualifiers, exp->initializer.typeName->declarator);
 
 exp->expType = type;
 break;
 }
-case 36:
+case 34:
 {
 struct Type * type = ProcessType(exp->vaArg.typeName->qualifiers, exp->vaArg.typeName->declarator);
 
@@ -15963,7 +15963,7 @@ if(!exp->cond.elseExp->isConstant)
 exp->isConstant = 0x0;
 break;
 }
-case 25:
+case 23:
 {
 if(exp->compound && exp->compound->compound.statements && (*exp->compound->compound.statements).last)
 {
@@ -15982,7 +15982,7 @@ exp->expType->refCount++;
 }
 break;
 }
-case 26:
+case 24:
 {
 struct Specifier * spec = (*exp->_classExp.specifiers).first;
 
@@ -15999,7 +15999,7 @@ exp->byReference = 0x1;
 }
 break;
 }
-case 27:
+case 25:
 {
 struct __ecereNameSpace__ecere__com__Class * _class = thisClass ? thisClass : currentClass;
 
@@ -16023,7 +16023,7 @@ return ;
 }
 break;
 }
-case 37:
+case 35:
 {
 struct Type * type = (((void *)0));
 char * typeString = (((void *)0));
@@ -16953,7 +16953,7 @@ struct Statement * block = stmt->forEachStmt.stmt;
 char iteratorType[1024];
 struct Type * source;
 struct Expression * e;
-unsigned int isBuiltin = exp && (*exp).last && (((struct Expression *)(*exp).last)->type == 37 || (((struct Expression *)(*exp).last)->type == 11 && ((struct Expression *)(*exp).last)->cast.exp->type == 37));
+unsigned int isBuiltin = exp && (*exp).last && (((struct Expression *)(*exp).last)->type == 35 || (((struct Expression *)(*exp).last)->type == 11 && ((struct Expression *)(*exp).last)->cast.exp->type == 35));
 struct Expression * arrayExp;
 char * typeString = (((void *)0));
 int builtinCount = 0;
@@ -17017,7 +17017,7 @@ else if(isBuiltin)
 struct Type * type = (((void *)0));
 char typeStringBuf[1024];
 
-arrayExp = (((struct Expression *)(*exp).last)->type == 37) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->cast.exp;
+arrayExp = (((struct Expression *)(*exp).last)->type == 35) ? (struct Expression *)(*exp).last : ((struct Expression *)(*exp).last)->cast.exp;
 if(((struct Expression *)(*exp).last)->type == 11)
 {
 struct TypeName * typeName = ((struct Expression *)(*exp).last)->cast.typeName;
index dbfd0bb..14dbdbe 100644 (file)
@@ -2245,7 +2245,7 @@ tempCount = ((tempCount > declTempCount) ? tempCount : declTempCount);
 tempCount++;
 curExternal->function->tempCount = (__simpleStruct0 = curExternal->function->tempCount, (__simpleStruct0 > tempCount) ? __simpleStruct0 : tempCount);
 sprintf(ecereTemp, "__ecereInstance%d", tempCount);
-exp->type = 25;
+exp->type = 23;
 exp->compound = MkCompoundStmt((((void *)0)), (((void *)0)));
 exp->compound->compound.context = PushContext();
 exp->compound->compound.context->simpleID = exp->compound->compound.context->parent->simpleID;
@@ -2292,11 +2292,11 @@ break;
 case 3:
 break;
 case 13:
-case 28:
+case 26:
 ProcessExpression(exp->_new.size);
 break;
 case 14:
-case 29:
+case 27:
 ProcessExpression(exp->_renew.size);
 ProcessExpression(exp->_renew.exp);
 break;
@@ -2384,7 +2384,7 @@ ProcessExpression(exp->op.exp2);
 }
 break;
 }
-case 34:
+case 32:
 case 5:
 {
 struct Expression * e;
@@ -2558,7 +2558,7 @@ ProcessExpression(exp->cond.elseExp);
 }
 break;
 }
-case 25:
+case 23:
 {
 if(exp->compound->compound.statements && ((struct Statement *)(*exp->compound->compound.statements).last)->type == 3 && ((struct Statement *)(*exp->compound->compound.statements).last)->expressions && (*((struct Statement *)(*exp->compound->compound.statements).last)->expressions).last)
 {
@@ -2567,12 +2567,12 @@ if(exp->compound->compound.statements && ((struct Statement *)(*exp->compound->c
 ProcessStatement(exp->compound);
 break;
 }
-case 36:
+case 34:
 {
 ProcessExpression(exp->vaArg.exp);
 break;
 }
-case 35:
+case 33:
 {
 ProcessInitializer(exp->initializer.initializer);
 break;
index f8dc38c..f6db43b 100644 (file)
@@ -1107,7 +1107,7 @@ static void _FixRefExp(struct Expression ** expPtr, struct Expression ** memberE
 {
 struct Expression * memberExp = *memberExpPtr;
 
-if(memberExp && memberExp->type == 8 && memberExp->member.exp && (memberExp->member.exp->type == 5 || memberExp->member.exp->type == 34))
+if(memberExp && memberExp->type == 8 && memberExp->member.exp && (memberExp->member.exp->type == 5 || memberExp->member.exp->type == 32))
 {
 struct Expression * bracketExp = memberExp->member.exp;
 struct Expression * idExp = (*bracketExp->list).last;
@@ -1130,7 +1130,7 @@ FreeExpression(bracketExp);
 *expPtr = exp;
 }
 }
-else if(*expPtr && (*expPtr)->type == 4 && (*expPtr)->op.op == '&' && !(*expPtr)->op.exp1 && memberExp && (memberExp->type == 5 || memberExp->type == 34) && memberExp->list && (*memberExp->list).count > 1)
+else if(*expPtr && (*expPtr)->type == 4 && (*expPtr)->op.op == '&' && !(*expPtr)->op.exp1 && memberExp && (memberExp->type == 5 || memberExp->type == 32) && memberExp->list && (*memberExp->list).count > 1)
 {
 struct Expression * newExp = (((void *)0));
 struct Expression * exp = *expPtr;
@@ -1185,7 +1185,7 @@ struct Expression * exp = e;
 
 for(; ; )
 {
-if(exp->type == 5 || exp->type == 34)
+if(exp->type == 5 || exp->type == 32)
 {
 if(exp->list)
 {
@@ -1245,7 +1245,7 @@ unsigned int byReference = 0x0;
 
 for(; exp; )
 {
-if(exp->type == 5 || exp->type == 34)
+if(exp->type == 5 || exp->type == 32)
 {
 if((*exp->list).count > 1)
 byReference = 0x1;
@@ -1575,13 +1575,13 @@ break;
 case 3:
 break;
 case 13:
-case 28:
+case 26:
 case 14:
-case 29:
+case 27:
 {
 struct __ecereNameSpace__ecere__sys__OldList * args = MkList();
 
-if(exp->type == 14 || exp->type == 29)
+if(exp->type == 14 || exp->type == 27)
 ListAdd(args, exp->_renew.exp);
 ListAdd(args, MkExpOp(MkExpTypeSize(exp->_new.typeName), '*', MkExpBrackets(MkListOne(exp->_new.size))));
 switch(exp->type)
@@ -1589,13 +1589,13 @@ switch(exp->type)
 case 13:
 exp->call.exp = QMkExpId("ecere::com::eSystem_New");
 break;
-case 28:
+case 26:
 exp->call.exp = QMkExpId("ecere::com::eSystem_New0");
 break;
 case 14:
 exp->call.exp = QMkExpId("ecere::com::eSystem_Renew");
 break;
-case 29:
+case 27:
 exp->call.exp = QMkExpId("ecere::com::eSystem_Renew0");
 break;
 }
@@ -1692,7 +1692,7 @@ while(testExp)
 {
 if(testExp->type == 11)
 testExp = testExp->cast.exp;
-else if(testExp->type == 5 || testExp->type == 34)
+else if(testExp->type == 5 || testExp->type == 32)
 testExp = (*testExp->list).last;
 else if(testExp->type == 8)
 break;
@@ -1800,10 +1800,10 @@ exp2 = exp->op.exp2;
 }
 }
 memberExp = exp->op.exp1;
-while(memberExp && ((memberExp->type == 5 && (*memberExp->list).count == 1) || memberExp->type == 34 || memberExp->type == 25))
+while(memberExp && ((memberExp->type == 5 && (*memberExp->list).count == 1) || memberExp->type == 32 || memberExp->type == 23))
 {
 parentExp = memberExp;
-if(memberExp->type == 25)
+if(memberExp->type == 23)
 memberExp = (*((struct Statement *)(*memberExp->compound->compound.statements).last)->expressions).last;
 else
 memberExp = (*memberExp->list).last;
@@ -1811,18 +1811,18 @@ memberExp = (*memberExp->list).last;
 if(memberExp && memberExp->type == 6 && memberExp->index.exp && memberExp->index.exp->expType && memberExp->index.exp->expType->kind == 8 && memberExp->index.exp->expType->_class && memberExp->index.exp->expType->_class->registered && memberExp->index.exp->expType->_class->registered != containerClass && __ecereNameSpace__ecere__com__eClass_IsDerived(memberExp->index.exp->expType->_class->registered, containerClass))
 {
 ProcessExpression(memberExp);
-while(memberExp && ((memberExp->type == 5 && (*memberExp->list).count == 1) || memberExp->type == 34 || memberExp->type == 25))
+while(memberExp && ((memberExp->type == 5 && (*memberExp->list).count == 1) || memberExp->type == 32 || memberExp->type == 23))
 {
 parentExp = memberExp;
-if(memberExp->type == 25)
+if(memberExp->type == 23)
 memberExp = (*((struct Statement *)(*memberExp->compound->compound.statements).last)->expressions).last;
 else
 memberExp = (*memberExp->list).last;
 }
-if(memberExp && memberExp->type == 25)
+if(memberExp && memberExp->type == 23)
 {
 parentExp = memberExp;
-if(memberExp->type == 25)
+if(memberExp->type == 23)
 {
 struct Statement * stmt = memberExp->compound->compound.statements ? (*memberExp->compound->compound.statements).last : (((void *)0));
 
@@ -1859,7 +1859,7 @@ if(memberExp == exp1)
 exp1 = (((void *)0));
 else
 {
-if(parentExp->type == 25)
+if(parentExp->type == 23)
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*((struct Statement *)(*parentExp->compound->compound.statements).last)->expressions), memberExp);
 else
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*parentExp->list), memberExp);
@@ -2014,7 +2014,7 @@ exp->tempCount++;
 curExternal->function->tempCount = (__simpleStruct0 = curExternal->function->tempCount, __simpleStruct1 = exp->tempCount, (__simpleStruct0 > __simpleStruct1) ? __simpleStruct0 : __simpleStruct1);
 sprintf(ecereTemp, "__ecTemp%d", exp->tempCount);
 curContext = context;
-exp->type = 25;
+exp->type = 23;
 exp->compound = MkCompoundStmt(MkListOne(MkDeclaration(MkListOne(MkSpecifier(VOID)), MkListOne(MkInitDeclarator(MkDeclaratorPointer(MkPointer((((void *)0)), (((void *)0))), MkDeclaratorIdentifier(MkIdentifier(ecereTemp))), MkInitializerAssignment(QBrackets(memberExp->member.exp)))))), list);
 args = MkList();
 if(convertTo)
@@ -2043,7 +2043,7 @@ else
 {
 struct Expression * newExp = exp;
 
-if(parentExp && parentExp->type == 25)
+if(parentExp && parentExp->type == 23)
 {
 newExp = __ecereNameSpace__ecere__com__eInstance_New(__ecereClass_Expression);
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*((struct Statement *)(*parentExp->compound->compound.statements).last)->expressions), newExp);
@@ -2378,7 +2378,7 @@ FreeExpression(exp2);
 break;
 }
 case 5:
-case 34:
+case 32:
 {
 if(exp->list)
 {
@@ -2405,9 +2405,9 @@ struct Expression * e;
 struct Expression * checkedExp = exp->index.exp;
 unsigned int isBuiltin = 0x0;
 
-while(checkedExp->type == 25 || checkedExp->type == 5 || checkedExp->type == 11)
+while(checkedExp->type == 23 || checkedExp->type == 5 || checkedExp->type == 11)
 {
-if(checkedExp->type == 25)
+if(checkedExp->type == 23)
 {
 isBuiltin = 0x1;
 break;
@@ -2732,16 +2732,16 @@ struct Expression * checkedExp = memberExp->member.exp;
 struct Expression * parentExp = (((void *)0));
 struct Expression * newExp;
 
-while(((checkedExp->type == 5 || checkedExp->type == 34) && checkedExp->list) || checkedExp->type == 11)
+while(((checkedExp->type == 5 || checkedExp->type == 32) && checkedExp->list) || checkedExp->type == 11)
 {
 parentExp = checkedExp;
-if(checkedExp->type == 5 || checkedExp->type == 34)
+if(checkedExp->type == 5 || checkedExp->type == 32)
 checkedExp = (*checkedExp->list).last;
 else if(checkedExp->type == 11)
 checkedExp = checkedExp->cast.exp;
 }
 newExp = (typedObject && !memberExp->member.exp->expType->classObjectType) ? checkedExp : MkExpOp((((void *)0)), '&', checkedExp);
-if(parentExp && (parentExp->type == 5 || parentExp->type == 34))
+if(parentExp && (parentExp->type == 5 || parentExp->type == 32))
 {
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*parentExp->list), checkedExp);
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*parentExp->list), newExp);
@@ -2866,12 +2866,12 @@ struct Expression * newExp;
 
 checkedExp = e;
 parentExp = exp;
-while(((checkedExp->type == 5 || checkedExp->type == 34 || checkedExp->type == 25) && checkedExp->list) || checkedExp->type == 11)
+while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->list) || checkedExp->type == 11)
 {
 parentExp = checkedExp;
-if(checkedExp->type == 5 || checkedExp->type == 34 || checkedExp->type == 25)
+if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
 {
-if(checkedExp->type == 25)
+if(checkedExp->type == 23)
 {
 checkedExp = (*((struct Statement *)(*checkedExp->compound->compound.statements).last)->expressions).last;
 }
@@ -2900,7 +2900,7 @@ __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*exp->call.argument
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->call.arguments), e);
 e = newExp;
 }
-else if(parentExp->type == 5 || parentExp->type == 34)
+else if(parentExp->type == 5 || parentExp->type == 32)
 {
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*parentExp->list), checkedExp);
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*parentExp->list), newExp);
@@ -2914,7 +2914,7 @@ parentExp->cast.typeName = MkTypeName(MkListOne(MkSpecifier(VOID)), MkDeclarator
 }
 parentExp->cast.exp = newExp;
 }
-else if(parentExp->type == 25)
+else if(parentExp->type == 23)
 {
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*((struct Statement *)(*parentExp->compound->compound.statements).last)->expressions), checkedExp);
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*((struct Statement *)(*parentExp->compound->compound.statements).last)->expressions), newExp);
@@ -2952,7 +2952,7 @@ PrintTypeNoConst(e->expType, typeString, 0x0, 0x1);
 decl = SpecDeclFromString(typeString, specs, (((void *)0)));
 newExp->destType = ProcessType(specs, decl);
 curContext = context;
-e->type = 25;
+e->type = 23;
 if(curCompound)
 {
 char name[100];
@@ -2975,12 +2975,12 @@ curContext = context->parent;
 }
 checkedExp = e;
 parentExp = exp;
-while(((checkedExp->type == 5 || checkedExp->type == 34 || checkedExp->type == 25) && checkedExp->list) || checkedExp->type == 11)
+while(((checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23) && checkedExp->list) || checkedExp->type == 11)
 {
 parentExp = checkedExp;
-if(checkedExp->type == 5 || checkedExp->type == 34 || checkedExp->type == 25)
+if(checkedExp->type == 5 || checkedExp->type == 32 || checkedExp->type == 23)
 {
-if(checkedExp->type == 25)
+if(checkedExp->type == 23)
 {
 checkedExp = (*((struct Statement *)(*checkedExp->compound->compound.statements).last)->expressions).last;
 }
@@ -2998,14 +2998,14 @@ __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*exp->call.argument
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*exp->call.arguments), e);
 e = newExp;
 }
-else if(parentExp->type == 5 || parentExp->type == 34)
+else if(parentExp->type == 5 || parentExp->type == 32)
 {
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*parentExp->list), checkedExp);
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*parentExp->list), newExp);
 }
 else if(parentExp->type == 11)
 parentExp->cast.exp = newExp;
-else if(parentExp->type == 5 || parentExp->type == 25)
+else if(parentExp->type == 5 || parentExp->type == 23)
 {
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Remove((&*((struct Statement *)(*parentExp->compound->compound.statements).last)->expressions), checkedExp);
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Add((&*((struct Statement *)(*parentExp->compound->compound.statements).last)->expressions), newExp);
@@ -3039,7 +3039,7 @@ if(_class->type == 0 && destType->byReference == 0x0 && strcmp(_class->dataTypeS
 struct Expression * c;
 struct Context * context = PushContext();
 
-if(_class->templateClass && !strcmp(_class->templateClass->name, "Container") && e->list && (*e->list).first && ((struct Expression *)(*e->list).first)->type == 11 && ((struct Expression *)(*e->list).first)->cast.exp && ((struct Expression *)(*e->list).first)->cast.exp->type == 4 && ((struct Expression *)(*e->list).first)->cast.exp->op.op == '&' && ((struct Expression *)(*e->list).first)->cast.exp->op.exp2 && ((struct Expression *)(*e->list).first)->cast.exp->op.exp2->type == 35)
+if(_class->templateClass && !strcmp(_class->templateClass->name, "Container") && e->list && (*e->list).first && ((struct Expression *)(*e->list).first)->type == 11 && ((struct Expression *)(*e->list).first)->cast.exp && ((struct Expression *)(*e->list).first)->cast.exp->type == 4 && ((struct Expression *)(*e->list).first)->cast.exp->op.op == '&' && ((struct Expression *)(*e->list).first)->cast.exp->op.exp2 && ((struct Expression *)(*e->list).first)->cast.exp->op.exp2->type == 33)
 {
 __ecereMethod___ecereNameSpace__ecere__sys__OldList_Insert((&*exp->call.arguments), e->prev, MkExpIdentifier(MkIdentifier(className)));
 }
@@ -3096,7 +3096,7 @@ struct __ecereNameSpace__ecere__com__Class * convertTo = (((void *)0));
 struct __ecereNameSpace__ecere__com__DataMember * member = (((void *)0));
 unsigned int thisPtr = exp->member.thisPtr;
 
-if(type->kind == 19 && exp->member.exp->type == 26)
+if(type->kind == 19 && exp->member.exp->type == 24)
 _class = __ecereNameSpace__ecere__com__eSystem_FindClass(privateModule, "ecere::com::Class");
 if(!_class)
 {
@@ -3429,9 +3429,9 @@ DeclareStruct(member->_class->fullName, 0x0);
 structName[0] = (char)0;
 FullClassNameCat(structName, member->_class->fullName, 0x0);
 checkedExp = exp->member.exp;
-while(((checkedExp->type == 5 || checkedExp->type == 34) && checkedExp->list && (*checkedExp->list).count == 1) || checkedExp->type == 11)
+while(((checkedExp->type == 5 || checkedExp->type == 32) && checkedExp->list && (*checkedExp->list).count == 1) || checkedExp->type == 11)
 {
-if(checkedExp->type == 5 || checkedExp->type == 34)
+if(checkedExp->type == 5 || checkedExp->type == 32)
 checkedExp = (*checkedExp->list).last;
 else if(checkedExp->type == 11)
 checkedExp = checkedExp->cast.exp;
@@ -3510,7 +3510,7 @@ exp->type = 9;
 }
 break;
 }
-case 25:
+case 23:
 {
 struct Expression * e = (*((struct Statement *)(*exp->compound->compound.statements).last)->expressions).last;
 
@@ -3578,7 +3578,7 @@ exp->cond.elseExp->usage = (exp->cond.elseExp->usage & ~0x1) | (((unsigned int)0
 ProcessExpression(exp->cond.elseExp);
 break;
 }
-case 26:
+case 24:
 {
 if(exp->_classExp.specifiers && (*exp->_classExp.specifiers).first && ((struct Specifier *)(*exp->_classExp.specifiers).first)->type == 8)
 {
@@ -3616,12 +3616,12 @@ exp->identifier = MkIdentifier(className);
 }
 break;
 }
-case 36:
+case 34:
 {
 ProcessExpression(exp->vaArg.exp);
 break;
 }
-case 35:
+case 33:
 {
 ProcessInitializer(exp->initializer.initializer);
 break;
index 91898ff..c5adfa5 100644 (file)
@@ -1509,7 +1509,7 @@ InstDeclPassExpression(exp->op.exp1);
 if(exp->op.exp2)
 InstDeclPassExpression(exp->op.exp2);
 break;
-case 34:
+case 32:
 case 5:
 {
 struct Expression * e;
@@ -1591,17 +1591,17 @@ InstDeclPassExpression(e);
 InstDeclPassExpression(exp->cond.elseExp);
 break;
 }
-case 25:
+case 23:
 {
 InstDeclPassStatement(exp->compound);
 break;
 }
-case 36:
+case 34:
 {
 InstDeclPassExpression(exp->vaArg.exp);
 break;
 }
-case 35:
+case 33:
 {
 InstDeclPassTypeName(exp->initializer.typeName, 0x0);
 InstDeclPassInitializer(exp->initializer.initializer);
index fa567ea..0e67b45 100644 (file)
@@ -282,9 +282,9 @@ public enum ExpressionType
    identifierExp, instanceExp, constantExp, stringExp, opExp,
    bracketsExp, indexExp, callExp, memberExp, pointerExp, typeSizeExp,
    castExp, conditionExp, newExp, renewExp, classSizeExp,
-   dummyExp, dereferenceErrorExp, symbolErrorExp, classMemberSymbolErrorExp,
-   structMemberSymbolErrorExp, memoryErrorExp, unknownErrorExp,
-   noDebuggerErrorExp, debugStateErrorExp,
+   dummyExp, dereferenceErrorExp, symbolErrorExp,
+   memberSymbolErrorExp, memoryErrorExp, unknownErrorExp,
+   noDebuggerErrorExp,
    extensionCompoundExp, classExp, classDataExp, new0Exp, renew0Exp,
    dbopenExp, dbfieldExp, dbtableExp, dbindexExp, extensionExpressionExp, extensionInitializerExp,
    vaArgExp, arrayExp, typeAlignExp
index 6220b11..bf5c1bd 100644 (file)
@@ -503,6 +503,23 @@ static void _FreeExpression(Expression exp, bool freePointer)
          if(exp.classData.id)
             FreeIdentifier(exp.classData.id);
             break;
+      case symbolErrorExp:
+         if(exp.identifier)
+            FreeIdentifier(exp.identifier);
+         break;
+      case memoryErrorExp:
+         delete exp.constant;
+         break;
+      case memberSymbolErrorExp:
+         if(exp.member.exp)
+            FreeExpression(exp.member.exp);
+         if(exp.member.member)
+            FreeIdentifier(exp.member.member);
+         break;
+      case dereferenceErrorExp:
+      case unknownErrorExp:
+      case noDebuggerErrorExp:
+         break;
    }
    if(freePointer)
    {
index 28eed24..7712fc2 100644 (file)
@@ -2895,22 +2895,28 @@ class Debugger
                   case symbolErrorExp:
                      snprintf(watchmsg, sizeof(watchmsg), $"Symbol \"%s\" not found", exp.identifier.string);
                      break;
-                  case structMemberSymbolErrorExp:
-                     // todo get info as in next case (ExpClassMemberSymbolError)
-                     snprintf(watchmsg, sizeof(watchmsg), $"Error: Struct member not found for \"%s\"", wh.expression);
-                     break;
-                  case classMemberSymbolErrorExp:
+                  case memberSymbolErrorExp:
+                  {
+                     Class _class;
+                     Expression memberExp = exp.member.exp;
+                     Identifier memberID = exp.member.member;
+                     Type type = memberExp.expType;
+                     if(type)
                      {
-                        Class _class;
-                        Expression memberExp = exp.member.exp;
-                        Identifier memberID = exp.member.member;
-                        Type type = memberExp.expType;
-                        if(type)
+                        if(type.kind == structType || type.kind == unionType)
+                        {
+                           char string[1024] = "";
+                           if(!type.name)
+                              PrintTypeNoConst(type, string, false, true);
+                           snprintf(watchmsg, sizeof(watchmsg), $"Member \"%s\" not found in %s \"%s\"",
+                              memberID ? memberID.string : "", type.kind == unionType ? "union" : "struct", type.name ? type.name : string);
+                        }
+                        else
                         {
-                           _class = (memberID && memberID.classSym) ? memberID.classSym.registered : ((type.kind == classType && type._class) ? type._class.registered : null);
+                           Class _class = (memberID && memberID.classSym) ? memberID.classSym.registered : ((type.kind == classType && type._class) ? type._class.registered : null);
+                           char string[1024] = "";
                            if(!_class)
                            {
-                              char string[256] = "";
                               Symbol classSym;
                               PrintTypeNoConst(type, string, false, true);
                               classSym = FindClass(string);
@@ -2919,29 +2925,31 @@ class Debugger
                            if(_class)
                               snprintf(watchmsg, sizeof(watchmsg), $"Member \"%s\" not found in class \"%s\"", memberID ? memberID.string : "", _class.name);
                            else
-                              snprintf(watchmsg, sizeof(watchmsg), "Member \"%s\" not found in unregistered class? (Should never get this message)", memberID ? memberID.string : "");
+                              // NOTE: This should probably never happen, only classes and struct can be dereferenced, a dereferenceErrorExp should be displayed instead
+                              snprintf(watchmsg, sizeof(watchmsg), $"Member \"%s\" not found in type \"%s\"", memberID ? memberID.string : "", string);
                         }
-                        else
-                           snprintf(watchmsg, sizeof(watchmsg), "Member \"%s\" not found in no type? (Should never get this message)", memberID ? memberID.string : "");
                      }
+                     else
+                        // NOTE: This should probably never happen, the error causing the unresolved expression should be displayed instead
+                        snprintf(watchmsg, sizeof(watchmsg), $"Accessing member \"%s\" from unresolved expression", memberID ? memberID.string : "");
                      break;
+                  }
                   case memoryErrorExp:
                      // Need to ensure when set to memoryErrorExp, constant is set
                      snprintf(watchmsg, sizeof(watchmsg), $"Memory can't be read at %s", /*(exp.type == constantExp) ? */exp.constant /*: null*/);
                      break;
                   case dereferenceErrorExp:
-                     snprintf(watchmsg, sizeof(watchmsg), $"Dereference failure for \"%s\"", wh.expression);
-                     break;
-                  case unknownErrorExp:
-                     snprintf(watchmsg, sizeof(watchmsg), $"Unknown error for \"%s\"", wh.expression);
+                     snprintf(watchmsg, sizeof(watchmsg), $"Dereferencing error evaluating for \"%s\"", wh.expression);
                      break;
                   case noDebuggerErrorExp:
                      snprintf(watchmsg, sizeof(watchmsg), $"Debugger required for symbol evaluation in \"%s\"", wh.expression);
                      break;
-                  case debugStateErrorExp:
-                     snprintf(watchmsg, sizeof(watchmsg), $"Incorrect debugger state for symbol evaluation in \"%s\"", wh.expression);
+                  case unknownErrorExp:
+                     // NOTE: This should never happen
+                     snprintf(watchmsg, sizeof(watchmsg), $"Error evaluating \"%s\"", wh.expression);
                      break;
                   case 0:
+                     // NOTE: This should never happen
                      snprintf(watchmsg, sizeof(watchmsg), $"Null type for \"%s\"", wh.expression);
                      break;
                   case stringExp:
@@ -3058,7 +3066,7 @@ class Debugger
                         if(item)
                            wh.value = CopyString(item.name);
                         else
-                           wh.value = CopyString($"Invalid Enum Value");
+                           wh.value = PrintString($"Invalid Enum Value (", value, ")");
                         result = true;
                      }
                      else if(wh.type && (wh.type.kind == charType || (wh.type.kind == classType && wh.type._class &&
@@ -3147,10 +3155,13 @@ class Debugger
                      {
                         char tempString[256];
                         if(exp.member.memberType == propertyMember)
+                           // TODO: Have a propertyErrorExp to carry over
                            snprintf(watchmsg, sizeof(watchmsg), $"Missing property evaluation support for \"%s\"", wh.expression);
                         else
-                           snprintf(watchmsg, sizeof(watchmsg), $"Evaluation failed for \"%s\" of type \"%s\"", wh.expression,
-                                 exp.type.OnGetString(tempString, null, null));
+                           // NOTE: This should never happen
+                           snprintf(watchmsg, sizeof(watchmsg), $"Error evaluating \"%s\"", wh.expression);
+                           /*snprintf(watchmsg, sizeof(watchmsg), $"Evaluation failed for \"%s\" of type \"%s\"", wh.expression,
+                                 exp.type.OnGetString(tempString, null, null));*/
                      }
                      break;
                }
@@ -3253,6 +3264,7 @@ class Debugger
             else
                break;
          }
+         delete eval.result;
          return result;
       }
       return null;
@@ -5012,6 +5024,7 @@ void GDBFallBack(Expression exp, String expString)
    result = Debugger::EvaluateExpression(expString, &evalError);
    if(result)
    {
+      FreeExpContents(exp);
       exp.constant = result;
       exp.type = constantExp;
    }
index eba1e65..3909341 100644 (file)
@@ -13,6 +13,22 @@ static void CarryExpressionError(Expression exp, Expression expError)
 
    *temp = *expError;
 
+   // -- Careful: this could be problematic as FreeExpContents will free the contents of expError
+   // Nulling things that may be freed now, but this is all overly messy/complex
+   switch(expError.type)
+   {
+      case symbolErrorExp:
+         expError.identifier = null;
+         break;
+      case memoryErrorExp:
+         expError.constant = null;
+         break;
+      case memberSymbolErrorExp:
+         expError.member.exp = null;
+         expError.member.member = null;
+         break;
+   }
+
    /*
    Identifier identifier = expError.identifier;
    expError.identifier = null;
@@ -20,6 +36,8 @@ static void CarryExpressionError(Expression exp, Expression expError)
    exp.identifier = identifier;
    exp.type = expError.type;
    */
+   if(exp.expType) FreeType(exp.expType);
+   if(exp.destType) FreeType(exp.destType);
    FreeExpContents(exp);
    *exp = *temp; //*expError;
    delete temp;
@@ -77,9 +95,9 @@ static char GetGdbFormatChar(Type type)
 
 /*static */bool ExpressionIsError(Expression exp)
 {
-   return (exp.type == dereferenceErrorExp || exp.type == symbolErrorExp || exp.type == classMemberSymbolErrorExp ||
-         exp.type == structMemberSymbolErrorExp || exp.type == memoryErrorExp || exp.type == unknownErrorExp ||
-         exp.type == noDebuggerErrorExp || exp.type == debugStateErrorExp);
+   return (exp.type == dereferenceErrorExp || exp.type == symbolErrorExp ||
+         exp.type == memberSymbolErrorExp || exp.type == memoryErrorExp || exp.type == unknownErrorExp ||
+         exp.type == noDebuggerErrorExp);
 }
 
 void DebugComputeExpression(Expression exp)
@@ -170,149 +188,137 @@ void DebugComputeExpression(Expression exp)
          else
             hasAddress = false;
 
-         switch(kind)
+         if(evalError == dummyExp)
          {
-            case charType:
-               delete evaluation;
-               evaluation = Debugger::EvaluateExpression(exp.identifier.string, &evalError);
-               if(evaluation)
-               {
-                  //int c, len;
-                  char * temp;
-                  temp = strstr(evaluation, " '");
-                  //len = strlen(temp);
-                  if(temp)
-                     temp[0] = '\0';
-                  {/*
-                     for(c = 0; c < len; c++)
-                        temp[c] = ' ';
-                     eString_TrimRSpaces(evaluation, evaluation);
-                  */}
-               }
-               else
-               {
-                  exp.type = evalError;
-                  exp.constant = PrintHexUInt64(address);
-               }
-               break;
-            case shortType:
-            case intType:
-            case longType:
-            case intPtrType:
-            case intSizeType:
-            case _BoolType:
-            case int64Type:
-            case floatType:
-            case doubleType:
-            case enumType:
-            case pointerType:
-               delete evaluation;
-               evaluation = Debugger::EvaluateExpression(exp.identifier.string, &evalError);
-               if(evaluation)
-               {
-                  if(kind == pointerType)
+            switch(kind)
+            {
+               case charType:
+                  delete evaluation;
+                  evaluation = Debugger::EvaluateExpression(exp.identifier.string, &evalError);
+                  if(evaluation)
                   {
-                     uint64 value;
-                     value = _strtoui64(evaluation, null, 0);
+                     //int c, len;
+                     char * temp;
+                     temp = strstr(evaluation, " '");
+                     //len = strlen(temp);
+                     if(temp)
+                        temp[0] = '\0';
+                     {/*
+                        for(c = 0; c < len; c++)
+                           temp[c] = ' ';
+                        eString_TrimRSpaces(evaluation, evaluation);
+                     */}
+                  }
+                  break;
+               case shortType:
+               case intType:
+               case longType:
+               case intPtrType:
+               case intSizeType:
+               case _BoolType:
+               case int64Type:
+               case floatType:
+               case doubleType:
+               case enumType:
+               case pointerType:
+                  delete evaluation;
+                  evaluation = Debugger::EvaluateExpression(exp.identifier.string, &evalError);
+                  if(evaluation)
+                  {
+                     if(kind == pointerType)
+                     {
+                        uint64 value;
+                        value = _strtoui64(evaluation, null, 0);
+                        delete evaluation;
+                        evaluation = PrintHexUInt64(value);
+                     }
+                  }
+                  break;
+               case classType:
+                  if(isPointer)
+                  {
+                     int size;
+                     char format;
                      delete evaluation;
-                     evaluation = PrintHexUInt64(value);
+                     //evaluation = Debugger::EvaluateExpression(exp.identifier.string, &evalError);
+                     size = ComputeTypeSize(exp.expType); //exp.expType.arrayType.size;
+                     format = GetGdbFormatChar(exp.expType);
+                     evaluation = Debugger::ReadMemory(address, size, format, &evalError);
+                     if(evaluation)
+                        StripQuotes(evaluation, evaluation);
                   }
-               }
-               else
+                  break;
+               case structType:
+               case unionType:
+               case functionType:
+                  //evaluation = Debugger::EvaluateExpression(exp.identifier.string, &evalError);
+                  delete evaluation;
+                  break;
+               case arrayType:
                {
-                  exp.constant = CopyString("");
-                  exp.type = evalError;
+                  // for classType  --> if(_class.type == structClass) ?
+                  //char temp[1024];
+                  //sprintf(temp, "&%s", exp.identifier.string);
+                  //evaluation = Debugger::EvaluateExpression(temp, &evalError);
+                  break;
                }
-               break;
-            case classType:
-               if(isPointer)
-               {
-                  int size;
-                  char format;
+               case ellipsisType:
+               case methodType:
+               case vaListType:
+               // case TypeTypedObject, TypeAnyObject, TypeClassPointer:
+               case dummyType:
                   delete evaluation;
-                  //evaluation = Debugger::EvaluateExpression(exp.identifier.string, &evalError);
-                  size = ComputeTypeSize(exp.expType); //exp.expType.arrayType.size;
-                  format = GetGdbFormatChar(exp.expType);
-                  evaluation = Debugger::ReadMemory(address, size, format, &evalError);
-                  if(evaluation)
-                     StripQuotes(evaluation, evaluation);
-               }
-               break;
-            case structType:
-            case unionType:
-            case functionType:
-               //evaluation = Debugger::EvaluateExpression(exp.identifier.string, &evalError);
-               delete evaluation;
-               evaluation = null;
-               break;
-            case arrayType:
-            {
-               // for classType  --> if(_class.type == structClass) ?
-               //char temp[1024];
-               //sprintf(temp, "&%s", exp.identifier.string);
-               //evaluation = Debugger::EvaluateExpression(temp, &evalError);
-               break;
+                  evaluation = Debugger::EvaluateExpression(exp.identifier.string, &evalError);
+                  break;
             }
-            case ellipsisType:
-            case methodType:
-            case vaListType:
-            // case TypeTypedObject, TypeAnyObject, TypeClassPointer:
-            case dummyType:
-               delete evaluation;
-               evaluation = Debugger::EvaluateExpression(exp.identifier.string, &evalError);
-               if(evaluation)
-                  ;
-               else
-               {
-                  exp.constant = CopyString("");
-                  exp.type = evalError;
-               }
-               break;
          }
-         if(evalError != dummyExp)
+         switch(evalError)
          {
-            exp.type = evalError;
-            exp.constant = CopyString("");
-         }
-         else
-         {
-            if(evaluation)
-            {
-               //expNew = ParseExpressionString(evaluation);
-               expNew = MkExpConstant(evaluation);
-               //printf("Evaluation = %s\n", evaluation);
-               delete evaluation;
-               expNew.destType = exp.expType;
-
-               // WHY EXACTLY MUST WE PROCESS THIS EXPRESSION TYPE AGAIN ? ADDED THIS FOR 0x00000000
-               if(exp.expType && exp.expType.kind == pointerType && expNew.destType)
+            case dummyExp:
+               if(evaluation)
                {
-                  expNew.expType = expNew.destType;
-                  expNew.destType.refCount++;
+                  //expNew = ParseExpressionString(evaluation);
+                  expNew = MkExpConstant(evaluation);
+                  //printf("Evaluation = %s\n", evaluation);
+                  delete evaluation;
+                  expNew.destType = exp.expType;
+
+                  // WHY EXACTLY MUST WE PROCESS THIS EXPRESSION TYPE AGAIN ? ADDED THIS FOR 0x00000000
+                  if(exp.expType && (exp.expType.kind == pointerType || exp.expType.kind == classType) && expNew.destType)
+                  {
+                     expNew.expType = expNew.destType;
+                     expNew.destType.refCount++;
+                  }
+                  else
+                     ProcessExpressionType(expNew);
+                  FreeType(exp.destType);
+                  FreeExpContents(exp);
+
+                  DebugComputeExpression(expNew);
+                  expNew.prev = prev;
+                  expNew.next = next;
+                  expNew.isConstant = true;
+                  expNew.address = address;
+                  expNew.hasAddress = hasAddress;
+                  *exp = *expNew;
+                  delete expNew;
                }
                else
-                  ProcessExpressionType(expNew);
-               FreeType(exp.destType);
+               {
+                  // Unhandled code path, evaluation is null
+                  FreeExpContents(exp);
+                  exp.type = unknownErrorExp;
+               }
+               break;
+            case symbolErrorExp:
+               // Keep the identifier
+               exp.type = evalError;
+               break;
+            default:
                FreeExpContents(exp);
-
-               DebugComputeExpression(expNew);
-               expNew.prev = prev;
-               expNew.next = next;
-               expNew.isConstant = true;
-               expNew.address = address;
-               expNew.hasAddress = hasAddress;
-               *exp = *expNew;
-            }
-            else
-            {
-               exp.address = address;
-               exp.hasAddress = hasAddress;
-               //exp.type = ExpUnknownError;
-            }
+               exp.type = evalError;
+               break;
          }
-         //else
-         //   exp.type = ExpUnknownError;
-
          break;
       }
       case instanceExp:
@@ -362,6 +368,7 @@ void DebugComputeExpression(Expression exp)
                      expNew.next = next;
                      expNew.isConstant = true;
                      *exp = *expNew;
+                     delete expNew;
                   }
                   else
                      exp.type = ExpUnknownError;
@@ -456,56 +463,83 @@ void DebugComputeExpression(Expression exp)
                            expNew.next = next;
                            expNew.isConstant = true;
                            *exp = *expNew;
+                           delete expNew;
                         }
                         else
                            exp1.address = 0;
                      }
                      else if(exp.op.op == '*')
                      {
-                        uint64 address;
-                        int size;
-                        char format;
-                        GetUInt64(exp1, &address);
-                        size = ComputeTypeSize(exp.expType); //exp.expType.arrayType.size;
-                        format = GetGdbFormatChar(exp.expType);
-                        if(format)
+                        if(!exp.expType)
                         {
-                           evaluation = Debugger::ReadMemory(address, size, format, &evalError);
-                           if(evalError != dummyExp)
-                           {
-                              exp1.type = evalError;
-                              exp1.constant = PrintHexUInt64(address);
-                              expError = exp1;
-                           }
+                           delete evaluation;
+                           FreeExpContents(exp1);
+                           exp1.type = dereferenceErrorExp;
+                           expError = exp1;
+                        }
+                        else
+                        {
+                           uint64 address;
+                           int size;
+                           char format;
+                           if(exp1.expType.kind == structType)
+                              address = exp1.address;
                            else
+                              GetUInt64(exp1, &address);
+                           size = ComputeTypeSize(exp.expType); //exp.expType.arrayType.size;
+                           format = GetGdbFormatChar(exp.expType);
+                           if(format)
                            {
-                              if(evaluation)
-                              {
-                                 expNew = ParseExpressionString(evaluation);
-                                 expNew.address = address;
-                                 expNew.hasAddress = true;
-                                 delete evaluation;
-                                 expNew.destType = exp.expType;
-                                 FreeType(exp.destType);
-                                 FreeExpContents(exp);
-                                 ProcessExpressionType(expNew);
-                                 DebugComputeExpression(expNew);
-                                 expNew.prev = prev;
-                                 expNew.next = next;
-                                 expNew.isConstant = true;
-                                 *exp = *expNew;
-                              }
-                              else
+                              evaluation = Debugger::ReadMemory(address, size, format, &evalError);
+                              switch(evalError)
                               {
-                                 exp1.type = unknownErrorExp;
-                                 expError = exp1;
+                                 case dummyExp:
+                                    if(evaluation)
+                                    {
+                                       expNew = ParseExpressionString(evaluation);
+                                       expNew.address = address;
+                                       expNew.hasAddress = true;
+                                       delete evaluation;
+                                       expNew.destType = exp.expType;
+                                       FreeType(exp.destType);
+                                       FreeExpContents(exp);
+                                       ProcessExpressionType(expNew);
+                                       DebugComputeExpression(expNew);
+                                       expNew.prev = prev;
+                                       expNew.next = next;
+                                       expNew.isConstant = true;
+                                       *exp = *expNew;
+                                       delete expNew;
+                                    }
+                                    else
+                                    {
+                                       // Unhandled code path, evaluation is null
+                                       FreeExpContents(exp);
+                                       exp.type = unknownErrorExp;
+                                    }
+                                    break;
+                                 case memoryErrorExp:
+                                    delete evaluation;
+                                    FreeExpContents(exp1);
+                                    exp1.type = evalError;
+                                    exp1.constant = PrintHexUInt64(address);
+                                    expError = exp1;
+                                    break;
+                                 default:
+                                    delete evaluation;
+                                    FreeExpContents(exp1);
+                                    exp1.type = evalError;
+                                    expError = exp1;
+                                    break;
+
                               }
                            }
-                        }
-                        else
-                        {
-                           exp1.type = unknownErrorExp;  // Not supported yet, generate error to fallback to GDB printout
-                           expError = exp1;
+                           else
+                           {
+                              FreeExpContents(exp1);
+                              exp1.type = unknownErrorExp;  // Not supported yet, generate error to fallback to GDB printout
+                              expError = exp1;
+                           }
                         }
                      }
                   }
@@ -1200,6 +1234,7 @@ void DebugComputeExpression(Expression exp)
                                  expNew.address = address;
                                  expNew.hasAddress = true;
                                  *exp = *expNew;
+                                 delete expNew;
                               }
                               else
                                  exp.type = unknownErrorExp;
@@ -1284,12 +1319,15 @@ void DebugComputeExpression(Expression exp)
                               expNew.address = address;
                               expNew.hasAddress = true;
                               *exp = *expNew;
+                              delete expNew;
                            }
                            else
                               exp.type = unknownErrorExp;
                         }
                         else
                         {
+                           FreeExpContents(exp);
+
                            // TESTING THIS HERE...
                            exp.type = constantExp;
                            exp.constant = PrintHexUInt64(address);
@@ -1299,9 +1337,11 @@ void DebugComputeExpression(Expression exp)
                            exp.isConstant = true;
                         }
                      }
+                     else
+                        exp.type = memberSymbolErrorExp;
                   }
                   else
-                     exp.type = classMemberSymbolErrorExp;
+                     exp.type = memberSymbolErrorExp;
                }
             }
 
@@ -1313,7 +1353,7 @@ void DebugComputeExpression(Expression exp)
          }
          else
          {
-            exp.type = classMemberSymbolErrorExp;
+            exp.type = memberSymbolErrorExp;
          }
          break;
       }