if(list != null)
{
Item item;
- while(item = list.first)
+ while((item = list.first))
{
list.Remove(item);
FreeFunction(item);
{
case enumType:
{
- NamedLink member, next;
- if(type.enumName)
- delete type.enumName;
+ NamedLink64 member, next;
+ delete type.enumName;
for(member = type.members.first; member; member = next)
{
next = member.next;
FreeType(symbol.type);
- while(link = symbol.templatedClasses.first)
+ while((link = symbol.templatedClasses.first))
symbol.templatedClasses.Delete(link);
delete symbol.string;
{
Symbol symbol;
- while(symbol = excludedSymbols.first)
+ while((symbol = excludedSymbols.first))
{
excludedSymbols.Remove(symbol);
FreeSymbol(symbol);
if(context == curContext)
curContext = globalContext;
- while(symbol = (Symbol)context.types.root)
+ while((symbol = (Symbol)context.types.root))
{
context.types.Remove((BTNode)symbol);
FreeSymbol(symbol);
}
- while(symbol = (Symbol)context.classes.root)
+ while((symbol = (Symbol)context.classes.root))
{
context.classes.Remove((BTNode)symbol);
FreeSymbol(symbol);
}
- while(symbol = (Symbol)context.symbols.root)
+ while((symbol = (Symbol)context.symbols.root))
{
context.symbols.Remove((BTNode)symbol);
FreeSymbol(symbol);
}
- while(symbol = (Symbol)context.structSymbols.root)
+ while((symbol = (Symbol)context.structSymbols.root))
{
context.structSymbols.Remove((BTNode)symbol);
FreeSymbol(symbol);
}
- while(symbol = (Symbol)context.templateTypes.root)
+ while((symbol = (Symbol)context.templateTypes.root))
{
context.templateTypes.Remove((BTNode)symbol);
FreeTemplateType((TemplatedType)symbol);
FreeList(spec.templateArgs, FreeTemplateArgument);
spec.templateArgs = null;
}
+ if(spec.nsSpec)
+ {
+ FreeSpecifier(spec.nsSpec);
+ spec.nsSpec = null;
+ }
break;
case extendedSpecifier:
if(spec.extDecl)
FreeIdentifier(exp.member.member);
break;
case typeSizeExp:
- FreeTypeName(exp._new.typeName);
+ FreeTypeName(exp.typeName);
break;
case typeAlignExp:
- FreeTypeName(exp._new.typeName);
+ FreeTypeName(exp.typeName);
+ break;
+ case offsetOfExp:
+ if(exp.offset.typeName)
+ FreeTypeName(exp.offset.typeName);
+ if(exp.offset.id)
+ FreeIdentifier(exp.offset.id);
break;
case castExp:
if(exp.cast.exp)
if(stmt._watch.object)
FreeExpression(stmt._watch.object);
if(stmt._watch.watches)
- FreeList(stmt._watch.watches, (stmt.type == watchStmt) ? FreePropertyWatch : FreeIdentifier);
+ FreeList(stmt._watch.watches, (stmt.type == watchStmt) ? (void *)FreePropertyWatch : (void *)FreeIdentifier);
break;
}
}
switch(initializer.type)
{
case listInitializer:
- {
FreeList(initializer.list, FreeInitializer);
break;
- }
case expInitializer:
if(initializer.exp)
FreeExpression(initializer.exp);
- if(initializer.id)
- FreeIdentifier(initializer.id);
break;
}
+ if(initializer.id)
+ FreeIdentifier(initializer.id);
delete initializer;
}
void FreeExternal(External external)
{
+ TopoEdge e;
+ while((e = external.incoming.first))
+ {
+ e.from.outgoing.Remove((IteratorPointer)e);
+ external.incoming.Remove((IteratorPointer)e);
+ delete e;
+ }
+ while((e = external.outgoing.first))
+ {
+ e.to.incoming.Remove((IteratorPointer)e);
+ external.outgoing.Remove((IteratorPointer)e);
+ if(!e.breakable)
+ e.to.nonBreakableIncoming--;
+ delete e;
+ }
switch(external.type)
{
case functionExternal:
if(ast != null)
{
External external;
- while(external = ast.first)
+ while((external = ast.first))
{
ast.Remove(external);
FreeExternal(external);
DataMember dataMember;
Method method;
ClassTemplateParameter param;
- ClassProperty classProp;
+
+ if(_class.templateClass) continue;
if(_class.dataType)
{