array C_nextFree921 integer C_firstFree305 integer C_maxIndex195 array Iterator_nextFree164 integer Iterator_firstFree311 integer Iterator_maxIndex105 array Iterator_typeId110 array Iterator_i152 integer C_firstFree305 = 0 integer C_maxIndex195 = 0 integer Iterator_firstFree311 = 0 integer Iterator_maxIndex105 = 0 function initGlobals724() { } function main774() { initGlobals724(); init_test490(); } function config726() { } function init_test490() { local integer iterator109 local integer i714 local integer this438 local integer this139 local integer this108 new_C107(); iterator_109 = new_Iterator459(); loop { this_438 = iterator_109; exitwhen (not (Iterator_i_152[this_438] < 10)); this_139 = iterator_109; Iterator_i_152[this_139] = (Iterator_i_152[this_139] + 1); i_714 = (Iterator_i_152[this_139] castTo any); if (i_714 == 5) { testSuccess451(); } else { }; }; this_108 = iterator_109; dispatch_Iterator_destroyIterator122(this_108); } IS_NATIVE function testSuccess451() { } function new_C107() returns integer { local integer this123 local integer this148 if (C_firstFree_305 == 0) { if (C_maxIndex_195 < 32768) { C_maxIndex_195 = (C_maxIndex_195 + 1); this_148 = C_maxIndex_195; } else { error212("Out of memory: Could not create C."); this_148 = 0; }; } else { C_firstFree_305 = (C_firstFree_305 - 1); this_148 = C_nextFree_921[C_firstFree_305]; }; this_123 = this_148; return this_123; } function new_Iterator459() returns integer { local integer this194 local integer this627 local integer this690 local integer this457 if (Iterator_firstFree_311 == 0) { if (Iterator_maxIndex_105 < 32768) { Iterator_maxIndex_105 = (Iterator_maxIndex_105 + 1); this_627 = Iterator_maxIndex_105; Iterator_typeId_110[this_627] = 2; } else { error212("Out of memory: Could not create Iterator."); this_627 = 0; }; } else { Iterator_firstFree_311 = (Iterator_firstFree_311 - 1); this_627 = Iterator_nextFree_164[Iterator_firstFree_311]; Iterator_typeId_110[this_627] = 2; }; this_194 = this_627; this_690 = this_194; this_457 = this_690; Iterator_i_152[this_457] = 0; return this_194; } function error212(string msg500) { $debugPrint212((msg_500 + (" " + #getStackTrace()))); } function dispatch_Iterator_destroyIterator122(integer this188) { local integer this721 local integer obj171 if (Iterator_typeId_110[this_188] == 0) { if (this_188 == 0) { error212("Nullpointer exception when calling Iterator.Iterator"); } else { error212("Called Iterator.Iterator on invalid object."); }; } else { }; this_721 = this_188; obj_171 = this_721; if (Iterator_typeId_110[obj_171] == 0) { error212("Double free: object of type Iterator"); } else { Iterator_nextFree_164[Iterator_firstFree_311] = obj_171; Iterator_firstFree_311 = (Iterator_firstFree_311 + 1); Iterator_typeId_110[obj_171] = 0; }; }