[opengtl-commits] [388] mark variable as allocated in memory when they are the result of a function and when the pointer is replaced

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


Revision: 388
Author:   cyrille
Date:     2008-09-12 22:52:12 +0200 (Fri, 12 Sep 2008)

Log Message:
-----------
mark variable as allocated in memory when they are the result of a function and when the pointer is replaced

Modified Paths:
--------------
    trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp


Modified: trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp	2008-09-12 20:46:55 UTC (rev 387)
+++ trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp	2008-09-12 20:52:12 UTC (rev 388)
@@ -79,6 +79,7 @@
   if( _initialiser.value() and _initialiser.functionResult()
       and (type()->dataType() == Type::ARRAY or type()->dataType() == Type::STRUCTURE ) )
   {
+    d->allocatedInMemory = true;
     initialise( _generationContext, _initialiser.value() );
     _bb = d->visitor->mark( _generationContext, _bb, d->pointer, d->type, CodeGenerator::integerToConstant( 1 ) );
   } else {
@@ -128,6 +129,7 @@
   _currentBlock = cleanUp( _generationContext, _currentBlock, 0 );
   d->pointer = _pointer;
   _currentBlock = d->visitor->mark( _generationContext, _currentBlock, d->pointer, d->type, CodeGenerator::integerToConstant( 1 ) );
+  d->allocatedInMemory = true;
   return _currentBlock;
 }
 


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