array C_nextFree307 integer C_firstFree131 integer C_maxIndex955 array Iterator_nextFree183 integer Iterator_firstFree189 integer Iterator_maxIndex738 array Iterator_typeId182 array Iterator_i606 integer C_firstFree131 = 0 integer C_maxIndex955 = 0 integer Iterator_firstFree189 = 0 integer Iterator_maxIndex738 = 0 function initGlobals187() { } function main959() { initGlobals187(); init_test174(); } function config117() { } function init_test174() { local integer iterator205 new_C873(); iterator_205 = new_Iterator208(); loop { exitwhen (Iterator_i_606[iterator_205] >= 10); Iterator_i_606[iterator_205] = (Iterator_i_606[iterator_205] + 1); if ((Iterator_i_606[iterator_205] castTo any) == 5) { testSuccess115(); } else { }; }; dispatch_Iterator_destroyIterator471(iterator_205); } IS_NATIVE function testSuccess115() { } function new_C873() returns integer { local integer this106 if (C_firstFree_131 == 0) { if (C_maxIndex_955 < 32768) { C_maxIndex_955 = (C_maxIndex_955 + 1); this_106 = C_maxIndex_955; } else { error179("Out of memory: Could not create C."); this_106 = 0; }; } else { C_firstFree_131 = (C_firstFree_131 - 1); this_106 = C_nextFree_307[C_firstFree_131]; }; return this_106; } function new_Iterator208() returns integer { local integer this149 if (Iterator_firstFree_189 == 0) { if (Iterator_maxIndex_738 < 32768) { Iterator_maxIndex_738 = (Iterator_maxIndex_738 + 1); this_149 = Iterator_maxIndex_738; Iterator_typeId_182[this_149] = 2; } else { error179("Out of memory: Could not create Iterator."); this_149 = 0; }; } else { Iterator_firstFree_189 = (Iterator_firstFree_189 - 1); this_149 = Iterator_nextFree_183[Iterator_firstFree_189]; Iterator_typeId_182[this_149] = 2; }; Iterator_i_606[this_149] = 0; return this_149; } function error179(string msg564) { $debugPrint912((msg_564 + (" " + #getStackTrace()))); } function dispatch_Iterator_destroyIterator471(integer this480) { if (Iterator_typeId_182[this_480] == 0) { if (this_480 == 0) { error179("Nullpointer exception when calling Iterator.Iterator"); } else { error179("Called Iterator.Iterator on invalid object."); }; } else { }; if (Iterator_typeId_182[this_480] == 0) { error179("Double free: object of type Iterator"); } else { Iterator_nextFree_183[Iterator_firstFree_189] = this_480; Iterator_firstFree_189 = (Iterator_firstFree_189 + 1); Iterator_typeId_182[this_480] = 0; }; }