array C_nextFree152 integer C_firstFree760 integer C_maxIndex901 array C_typeId179 array Iterator_nextFree675 integer Iterator_firstFree132 integer Iterator_maxIndex468 array Iterator_i828 integer C_firstFree760 = 0 integer C_maxIndex901 = 0 integer Iterator_firstFree132 = 0 integer Iterator_maxIndex468 = 0 function initGlobals192() { } function main186() { initGlobals192(); init_test162(); } function config152() { } function init_test162() { local integer c116 local integer iter135 local integer i302 local integer from125 local integer this405 local integer test_C_iterator_result964 local integer this228 local integer this148 c_116 = new_C130(); this_405 = c_116; if (C_typeId_179[this_405] == 0) { if (this_405 == 0) { error213("Nullpointer exception when calling C.iterator"); } else { error213("Called C.iterator on invalid object."); }; } else { }; test_C_iterator_result_964 = new_Iterator196(); iter_135 = test_C_iterator_result_964; from_125 = iter_135; loop { this_228 = from_125; exitwhen (not (Iterator_i_828[this_228] < 10)); this_148 = from_125; Iterator_i_828[this_148] = (Iterator_i_828[this_148] + 1); i_302 = (Iterator_i_828[this_148] castTo any); if (i_302 == 5) { testSuccess152(); } else { }; }; } IS_NATIVE function testSuccess152() { } function new_C130() returns integer { local integer this195 local integer this515 if (C_firstFree_760 == 0) { if (C_maxIndex_901 < 32768) { C_maxIndex_901 = (C_maxIndex_901 + 1); this_515 = C_maxIndex_901; C_typeId_179[this_515] = 1; } else { error213("Out of memory: Could not create C."); this_515 = 0; }; } else { C_firstFree_760 = (C_firstFree_760 - 1); this_515 = C_nextFree_152[C_firstFree_760]; C_typeId_179[this_515] = 1; }; this_195 = this_515; return this_195; } function new_Iterator196() returns integer { local integer this870 local integer this497 local integer this206 local integer this166 if (Iterator_firstFree_132 == 0) { if (Iterator_maxIndex_468 < 32768) { Iterator_maxIndex_468 = (Iterator_maxIndex_468 + 1); this_497 = Iterator_maxIndex_468; } else { error213("Out of memory: Could not create Iterator."); this_497 = 0; }; } else { Iterator_firstFree_132 = (Iterator_firstFree_132 - 1); this_497 = Iterator_nextFree_675[Iterator_firstFree_132]; }; this_870 = this_497; this_206 = this_870; this_166 = this_206; Iterator_i_828[this_166] = 0; return this_870; } function error213(string msg194) { $debugPrint176((msg_194 + (" " + #getStackTrace()))); }