array C_nextFree144 integer C_firstFree147 integer C_maxIndex161 array C_typeId814 array Iterator_nextFree202 integer Iterator_firstFree122 integer Iterator_maxIndex387 array Iterator_i125 integer C_firstFree147 = 0 integer C_maxIndex161 = 0 integer Iterator_firstFree122 = 0 integer Iterator_maxIndex387 = 0 function initGlobals224() { } function main126() { initGlobals224(); init_test167(); } function config197() { } function init_test167() { local integer c152 c_152 = new_C142(); if (C_typeId_814[c_152] == 0) { if (c_152 == 0) { error510("Nullpointer exception when calling C.iterator"); } else { error510("Called C.iterator on invalid object."); }; } else { }; c_152 = new_Iterator106(); loop { exitwhen (Iterator_i_125[c_152] >= 10); Iterator_i_125[c_152] = (Iterator_i_125[c_152] + 1); if ((Iterator_i_125[c_152] castTo any) == 5) { testSuccess151(); } else { }; }; } IS_NATIVE function testSuccess151() { } function new_C142() returns integer { local integer this111 if (C_firstFree_147 == 0) { if (C_maxIndex_161 < 32768) { C_maxIndex_161 = (C_maxIndex_161 + 1); this_111 = C_maxIndex_161; C_typeId_814[this_111] = 1; } else { error510("Out of memory: Could not create C."); this_111 = 0; }; } else { C_firstFree_147 = (C_firstFree_147 - 1); this_111 = C_nextFree_144[C_firstFree_147]; C_typeId_814[this_111] = 1; }; return this_111; } function new_Iterator106() returns integer { local integer this172 if (Iterator_firstFree_122 == 0) { if (Iterator_maxIndex_387 < 32768) { Iterator_maxIndex_387 = (Iterator_maxIndex_387 + 1); this_172 = Iterator_maxIndex_387; } else { error510("Out of memory: Could not create Iterator."); this_172 = 0; }; } else { Iterator_firstFree_122 = (Iterator_firstFree_122 - 1); this_172 = Iterator_nextFree_202[Iterator_firstFree_122]; }; Iterator_i_125[this_172] = 0; return this_172; } function error510(string msg976) { $debugPrint835((msg_976 + (" " + #getStackTrace()))); }