[opengtl-commits] [385] implement the garbage collection statement

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 385
Author:   cyrille
Date:     2008-09-11 23:50:26 +0200 (Thu, 11 Sep 2008)

Log Message:
-----------
implement the garbage collection statement

Modified Paths:
--------------
    trunk/OpenGTL/OpenGTL/GTLCore/AST/GarbageCollectionStatement.cpp
    trunk/OpenGTL/OpenGTL/GTLCore/AST/Statement.cpp
    trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp
    trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.cpp
    trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.h
    trunk/OpenGTL/OpenShiva/OpenShiva/PixelVisitor_p.cpp
    trunk/OpenGTL/OpenShiva/OpenShiva/PixelVisitor_p.h


Modified: trunk/OpenGTL/OpenGTL/GTLCore/AST/GarbageCollectionStatement.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/AST/GarbageCollectionStatement.cpp	2008-09-11 20:58:43 UTC (rev 384)
+++ trunk/OpenGTL/OpenGTL/GTLCore/AST/GarbageCollectionStatement.cpp	2008-09-11 21:50:26 UTC (rev 385)
@@ -21,6 +21,13 @@
 
 #include <stdlib.h>
 
+#include <llvm/Constant.h>
+#include <llvm/Instructions.h>
+
+#include "../Type.h"
+#include "../CodeGenerator_p.h"
+#include "../Visitor_p.h"
+
 using namespace GTLCore::AST;
 
 GarbageCollectionStatement::GarbageCollectionStatement( llvm::Value* _pointer, const GTLCore::Type* _type ) : m_pointer(_pointer), m_type(_type)
@@ -31,8 +38,21 @@
 {
 }
 
-llvm::BasicBlock* GarbageCollectionStatement::generateStatement( GenerationContext&, llvm::BasicBlock* _curentBlock) const
+llvm::BasicBlock* GarbageCollectionStatement::generateStatement( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock) const
 {
   // FIXME: garbage collect if needed
-  return _curentBlock;
+  
+  if( m_type->dataType() == Type::STRUCTURE or m_type->dataType() == Type::ARRAY )
+  {
+    llvm::Value* countValue = CodeGenerator::getCountFieldOf( _currentBlock, m_pointer );
+    llvm::Value* test = CodeGenerator::createStrictInferiorExpression( _currentBlock, countValue, Type::Integer32, CodeGenerator::integerToConstant( 1 ), Type::Integer32 );
+    llvm::BasicBlock* first = createBlock( _generationContext );
+    llvm::BasicBlock* after = createBlock( _generationContext );
+    llvm::BasicBlock* last = Visitor::getVisitorFor( m_type )->cleanUp( _generationContext, first, m_pointer, m_type, 0, true, false );
+    new llvm::FreeInst( m_pointer, last );
+    CodeGenerator::createIfStatement( _currentBlock, test, Type::Boolean, first, last, after);
+    return after;
+  } else {
+    return _currentBlock;
+  }
 }

Modified: trunk/OpenGTL/OpenGTL/GTLCore/AST/Statement.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/AST/Statement.cpp	2008-09-11 20:58:43 UTC (rev 384)
+++ trunk/OpenGTL/OpenGTL/GTLCore/AST/Statement.cpp	2008-09-11 21:50:26 UTC (rev 385)
@@ -222,25 +222,32 @@
 
 llvm::BasicBlock* ReturnStatement::generateStatement( GenerationContext& _context, llvm::BasicBlock* _bb) const
 {
+  // FIXME share the cleanup code
   if( m_returnExpr )
   {
-    llvm::Value* result = m_returnExpr->generateValue( _context, _bb).value();
+    ExpressionResult result = m_returnExpr->generateValue( _context, _bb);
+    if( result.functionResult() )
+    {
+      _bb = Visitor::getVisitorFor( m_returnExpr->type() )->mark( _context, _bb, result.value(), m_returnExpr->type(), CodeGenerator::integerToConstant( 1 ) );
+    }
     _bb = _context.flushDelayedStatement( _bb );
+    GTL_DEBUG( result << " " << m_variablesToClean.size() << " " << _context.function()->name() );
     for( std::list<VariableNG*>::const_iterator it = m_variablesToClean.begin();
          it != m_variablesToClean.end(); ++it)
     {
-      _bb = (*it)->cleanUp( _context, _bb, result);
+      _bb = (*it)->cleanUp( _context, _bb, result.value());
     }
+    llvm::Value* resultValue = result.value();
     if( m_returnExpr->type()->dataType() != Type::ARRAY
         and m_returnExpr->type()->dataType() != Type::STRUCTURE )
     {
-      result = _context.codeGenerator()->convertValueTo(_bb, result, m_returnExpr->type(), _context.function()->returnType() );
+      resultValue = _context.codeGenerator()->convertValueTo(_bb, resultValue, m_returnExpr->type(), _context.function()->returnType() );
     }
     // Mark the return value
     const GTLCore::Type* returnType = m_returnExpr->type();
     const Visitor* visitor = Visitor::getVisitorFor( returnType );
-    _bb = visitor->mark( _context, _bb, result, returnType, CodeGenerator::integerToConstant( -1 ) );
-    llvm::ReturnInst::Create( result, _bb);
+    _bb = visitor->mark( _context, _bb, resultValue, returnType, CodeGenerator::integerToConstant( -1 ) );
+    llvm::ReturnInst::Create( resultValue, _bb);
   } else {
     _bb = _context.flushDelayedStatement( _bb );
     for( std::list<VariableNG*>::const_iterator it = m_variablesToClean.begin();

Modified: trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp	2008-09-11 20:58:43 UTC (rev 384)
+++ trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp	2008-09-11 21:50:26 UTC (rev 385)
@@ -159,7 +159,7 @@
 {
   if( d->allocatedInMemory and not d->constantPointer )
   {
-    llvm::BasicBlock* bb = d->visitor->cleanUp( _generationContext, _currentBlock, d->pointer, d->type, _donttouch, d->allocatedInMemory );
+    llvm::BasicBlock* bb = d->visitor->cleanUp( _generationContext, _currentBlock, d->pointer, d->type, _donttouch, d->allocatedInMemory, true );
     new llvm::FreeInst( d->pointer, bb);
     return bb;
   }

Modified: trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.cpp	2008-09-11 20:58:43 UTC (rev 384)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.cpp	2008-09-11 21:50:26 UTC (rev 385)
@@ -126,7 +126,7 @@
   return _currentBlock;
 }
 
-llvm::BasicBlock* PrimitiveVisitor::cleanUp( GenerationContext& , llvm::BasicBlock* _currentBlock, llvm::Value* , const Type* , llvm::Value* , bool ) const
+llvm::BasicBlock* PrimitiveVisitor::cleanUp( GenerationContext& , llvm::BasicBlock* _currentBlock, llvm::Value* , const Type* , llvm::Value* , bool, bool /*_ignoreCount*/ ) const
 {
   return _currentBlock;
 }
@@ -171,7 +171,7 @@
       std::list<llvm::Value*> sizes;
       sizes.push_back( getSize( _generationContext, ifContent, _value ) );
       
-      llvm::BasicBlock* endIfContent = cleanUp(_generationContext, ifContent, _pointer, _pointerType, 0, _allocatedInMemory );
+      llvm::BasicBlock* endIfContent = cleanUp(_generationContext, ifContent, _pointer, _pointerType, 0, _allocatedInMemory, true );
       
       endIfContent = initialise( _generationContext, endIfContent, _pointer, _pointerType, sizes, _allocatedInMemory );
       
@@ -303,11 +303,33 @@
   return _currentBlock;
 }
 
-llvm::BasicBlock* ArrayVisitor::cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory ) const
+llvm::BasicBlock* ArrayVisitor::cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory, bool _ignoreCount ) const
 {
+  // TODO use _donttouch in the array as well
     //   int i = 0;
+#ifndef NDEBUG
+  if( _pointer )
+  {
+    GTL_DEBUG( _pointer << " " << *_pointer );
+  }
+  GTL_DEBUG( _donttouch );
+  if( _donttouch )
+  {
+    GTL_DEBUG( _donttouch  << " " << *_donttouch );
+  }
+#endif
+  if( _pointer != _donttouch )
+  {
+    llvm::Value* arraySize = getSize( _generationContext, _currentBlock, _pointer);
+    llvm::Value* test1 = CodeGenerator::createStrictInferiorExpression( _currentBlock, CodeGenerator::getCountFieldOf( _currentBlock, _pointer), Type::Integer32, CodeGenerator::integerToConstant( 1 ), Type::Integer32 );
+    llvm::Value* test2 = CodeGenerator::createDifferentExpression( _currentBlock, arraySize, Type::Integer32, CodeGenerator::integerToConstant( 0 ), Type::Integer32 );
+    llvm::Value* testIf = CodeGenerator::createAndExpression( _currentBlock, test1, Type::Boolean, test2, Type::Boolean );
+    llvm::BasicBlock* firstIfBlock = llvm::BasicBlock::Create("firstIfBlock");
+    _generationContext.llvmFunction()->getBasicBlockList().push_back( firstIfBlock);
+    
+    
     VariableNG* index = new VariableNG( Type::Integer32, false);
-    index->initialise( _generationContext, _currentBlock, ExpressionResult( _generationContext.codeGenerator()->integerToConstant(0), Type::Integer32), std::list<llvm::Value*>());
+    index->initialise( _generationContext, firstIfBlock, ExpressionResult( _generationContext.codeGenerator()->integerToConstant(0), Type::Integer32), std::list<llvm::Value*>());
     
     // Construct the body of the for loop
     llvm::BasicBlock* bodyBlock = llvm::BasicBlock::Create("bodyBlock");
@@ -318,24 +340,33 @@
           _generationContext,
           bodyBlock, 
           _generationContext.codeGenerator()->accessArrayValue( bodyBlock, _pointer, index->get( _generationContext, bodyBlock  ) ),
-          _pointerType->embeddedType(), _donttouch, _allocatedInMemory );
+          _pointerType->embeddedType(), _donttouch, _allocatedInMemory, _ignoreCount );
     std::vector<llvm::Value*> indexes;
     indexes.push_back( llvm::ConstantInt::get(llvm::Type::Int32Ty, 0)); // Access the structure of the array
     indexes.push_back( llvm::ConstantInt::get(llvm::Type::Int32Ty, ArrayWrap::POS_DATA )); // Access the data of the array
-    // Init the size
-    llvm::Value* ptrToData = llvm::GetElementPtrInst::Create( _pointer, indexes.begin(), indexes.end(), "", endBodyBlock);
-    new llvm::FreeInst( new llvm::LoadInst( ptrToData, "", endBodyBlock ), endBodyBlock );
     // Create the for statement
     llvm::BasicBlock*  afterBlock = CodeGenerator::createIterationForStatement(
                     _generationContext,
-                    _currentBlock,
+                    firstIfBlock,
                     index,
-                    getSize( _generationContext, _currentBlock, _pointer),
+                    arraySize,
                     Type::Integer32,
                     bodyBlock,
                     endBodyBlock );
+    // Free the array
+    llvm::Value* ptrToData = llvm::GetElementPtrInst::Create( _pointer, indexes.begin(), indexes.end(), "", afterBlock);
+    new llvm::FreeInst( new llvm::LoadInst( ptrToData, "", afterBlock ), afterBlock );
+    
+    llvm::BasicBlock* afterIfBlock = llvm::BasicBlock::Create("afterIfBlock");
+    _generationContext.llvmFunction()->getBasicBlockList().push_back( afterIfBlock);
+    
+    CodeGenerator::createIfStatement( _currentBlock, testIf, Type::Boolean, firstIfBlock, afterBlock, afterIfBlock );
+    
     delete index;
-    return afterBlock;
+    return afterIfBlock;
+  } else {
+    return _currentBlock;
+  }
 }
 
 llvm::BasicBlock* ArrayVisitor::mark( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _increment ) const
@@ -411,7 +442,7 @@
   return _currentBlock;
 }
 
-llvm::BasicBlock* VectorVisitor::cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory ) const
+llvm::BasicBlock* VectorVisitor::cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory, bool /*_ignoreCount*/ ) const
 {
   // Don't do nothing
   return _currentBlock;
@@ -495,8 +526,19 @@
   return _currentBlock;
 }
 
-llvm::BasicBlock* StructureVisitor::cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory ) const
+llvm::BasicBlock* StructureVisitor::cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory, bool _ignoreCount ) const
 {
+  // TODO use ignoreCount
+#ifndef NDEBUG
+  if( _pointer )
+  {
+    GTL_DEBUG( _pointer << " " << *_pointer );
+  }
+  if( _donttouch )
+  {
+    GTL_DEBUG( _donttouch  << " " << *_donttouch );
+  }
+#endif
   if( _pointer == _donttouch ) return _currentBlock;
   GTL_ASSERT( _pointerType->dataType() == Type::STRUCTURE );
   
@@ -504,7 +546,7 @@
   {
     const Type* type = _pointerType->structDataMember(i).type();
     const Visitor* visitor = Visitor::getVisitorFor( type );
-    _currentBlock = visitor->cleanUp( _generationContext, _currentBlock, pointerToValue( _generationContext, _currentBlock, _pointer, i ), type, _donttouch, _allocatedInMemory );
+    _currentBlock = visitor->cleanUp( _generationContext, _currentBlock, pointerToValue( _generationContext, _currentBlock, _pointer, i ), type, _donttouch, _allocatedInMemory, _ignoreCount );
   }
   return _currentBlock;
 }

Modified: trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.h
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.h	2008-09-11 20:58:43 UTC (rev 384)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.h	2008-09-11 21:50:26 UTC (rev 385)
@@ -93,7 +93,7 @@
        * @param _size the size of the array, if applicable
        */
       virtual llvm::BasicBlock* initialise(GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, const std::list< llvm::Value*>& _sizes, bool _allocatedInMemory) const = 0;
-      virtual llvm::BasicBlock* cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory ) const = 0;
+      virtual llvm::BasicBlock* cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory, bool _ignoreCount ) const = 0;
       virtual llvm::BasicBlock* mark( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* increment ) const = 0;
     public:
       /**
@@ -117,7 +117,7 @@
                                 llvm::Value* pointer, const Type* _pointerType) const;
       virtual llvm::BasicBlock* set(GenerationContext& _generationContext, llvm::BasicBlock* currentBlock, llvm::Value* pointer, const Type* _pointerType, llvm::Value*, const Type* _valueType, bool _allocatedInMemory) const;
       virtual llvm::BasicBlock* initialise(GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, const std::list< llvm::Value*>& _sizes, bool _allocatedInMemory) const;
-      virtual llvm::BasicBlock* cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory ) const;
+      virtual llvm::BasicBlock* cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory, bool _ignoreCount ) const;
       virtual llvm::BasicBlock* mark( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* increment ) const;
   };
   /**
@@ -135,7 +135,7 @@
       virtual ExpressionResult get( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType) const;
       virtual llvm::BasicBlock* set(GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value*, const Type* _valueType, bool _allocatedInMemory) const;
       virtual llvm::BasicBlock* initialise( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, const std::list< llvm::Value*>& _sizes, bool _allocatedInMemory) const;
-      virtual llvm::BasicBlock* cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory ) const;
+      virtual llvm::BasicBlock* cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory, bool _ignoreCount ) const;
       virtual llvm::BasicBlock* mark( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* increment ) const;
     private:
       /**
@@ -170,7 +170,7 @@
       virtual ExpressionResult get( GenerationContext& _generationContext, llvm::BasicBlock* currentBlock, llvm::Value* pointer, const Type* _pointerType) const;
       virtual llvm::BasicBlock* set(GenerationContext& _generationContext, llvm::BasicBlock* currentBlock, llvm::Value* pointer, const Type* _pointerType, llvm::Value*, const Type* _valueType, bool _allocatedInMemory) const;
       virtual llvm::BasicBlock* initialise( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, const std::list< llvm::Value*>& _sizes, bool _allocatedInMemory) const;
-      virtual llvm::BasicBlock* cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory ) const;
+      virtual llvm::BasicBlock* cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory, bool _ignoreCount ) const;
       virtual llvm::BasicBlock* mark( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* increment ) const;
   };
 
@@ -188,7 +188,7 @@
       virtual ExpressionResult get( GenerationContext& _generationContext, llvm::BasicBlock* currentBlock, llvm::Value* pointer, const Type* _pointerType) const;
       virtual llvm::BasicBlock* set(GenerationContext& _generationContext, llvm::BasicBlock* currentBlock, llvm::Value* pointer, const Type* _pointerType, llvm::Value*, const Type* _valueType, bool _allocatedInMemory) const;
       virtual llvm::BasicBlock* initialise( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, const std::list< llvm::Value*>& _sizes, bool _allocatedInMemory) const;
-      virtual llvm::BasicBlock* cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory ) const;
+      virtual llvm::BasicBlock* cleanUp( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory, bool _ignoreCount ) const;
       virtual llvm::BasicBlock* mark( GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const Type* _pointerType, llvm::Value* increment ) const;
     private:
       llvm::Value* pointerToValue(GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, int index ) const;

Modified: trunk/OpenGTL/OpenShiva/OpenShiva/PixelVisitor_p.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/PixelVisitor_p.cpp	2008-09-11 20:58:43 UTC (rev 384)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/PixelVisitor_p.cpp	2008-09-11 21:50:26 UTC (rev 385)
@@ -102,7 +102,7 @@
   return _currentBlock;
 }
 
-llvm::BasicBlock* PixelVisitor::cleanUp( GTLCore::GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const GTLCore::Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory ) const
+llvm::BasicBlock* PixelVisitor::cleanUp( GTLCore::GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const GTLCore::Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory, bool _ignoreCount ) const
 {
   return _currentBlock;
 }

Modified: trunk/OpenGTL/OpenShiva/OpenShiva/PixelVisitor_p.h
===================================================================
--- trunk/OpenGTL/OpenShiva/OpenShiva/PixelVisitor_p.h	2008-09-11 20:58:43 UTC (rev 384)
+++ trunk/OpenGTL/OpenShiva/OpenShiva/PixelVisitor_p.h	2008-09-11 21:50:26 UTC (rev 385)
@@ -43,7 +43,7 @@
       virtual GTLCore::ExpressionResult get(GTLCore::GenerationContext& _generationContext, llvm::BasicBlock* currentBlock, llvm::Value* pointer, const GTLCore::Type* _pointerType) const;
       virtual llvm::BasicBlock* set(GTLCore::GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const GTLCore::Type* _pointerType, llvm::Value* _value, const GTLCore::Type* _valueType, bool _allocatedInMemory) const;
       virtual llvm::BasicBlock* initialise(GTLCore::GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const GTLCore::Type* _pointerType, const std::list< llvm::Value*>& _sizes, bool _allocatedInMemory) const;
-      virtual llvm::BasicBlock* cleanUp( GTLCore::GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const GTLCore::Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory ) const;
+      virtual llvm::BasicBlock* cleanUp( GTLCore::GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const GTLCore::Type* _pointerType, llvm::Value* _donttouch, bool _allocatedInMemory, bool _ignoreCount ) const;
       virtual llvm::BasicBlock* mark( GTLCore::GenerationContext& _generationContext, llvm::BasicBlock* _currentBlock, llvm::Value* _pointer, const GTLCore::Type* _pointerType, llvm::Value* increment ) const;
   };
   


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/