array C_nextFree111 integer C_firstFree166 integer C_maxIndex523 array C_typeId978 array Iterator_nextFree132 integer Iterator_firstFree156 integer Iterator_maxIndex553 array Iterator_i213 integer C_firstFree166 = 0 integer C_maxIndex523 = 0 integer Iterator_firstFree156 = 0 integer Iterator_maxIndex553 = 0 function initGlobals665() { } function main688() { initGlobals665(); init_test183(); } function config420() { } function init_test183() { local integer c108 local integer iter757 local integer i864 local integer from204 local integer this622 local integer test_C_iterator_result988 local integer this129 local integer this205 c_108 = new_C172(); this_622 = c_108; if (C_typeId_978[this_622] == 0) { if (this_622 == 0) { error141("Nullpointer exception when calling C.iterator"); } else { error141("Called C.iterator on invalid object."); }; } else { }; test_C_iterator_result_988 = new_Iterator182(); iter_757 = test_C_iterator_result_988; from_204 = iter_757; loop { this_129 = from_204; exitwhen (not (Iterator_i_213[this_129] < 10)); this_205 = from_204; Iterator_i_213[this_205] = (Iterator_i_213[this_205] + 1); i_864 = (Iterator_i_213[this_205] castTo any); if (i_864 == 5) { testSuccess335(); } else { }; }; } IS_NATIVE function testSuccess335() { } function new_C172() returns integer { local integer this796 local integer this197 if (C_firstFree_166 == 0) { if (C_maxIndex_523 < 32768) { C_maxIndex_523 = (C_maxIndex_523 + 1); this_197 = C_maxIndex_523; C_typeId_978[this_197] = 1; } else { error141("Out of memory: Could not create C."); this_197 = 0; }; } else { C_firstFree_166 = (C_firstFree_166 - 1); this_197 = C_nextFree_111[C_firstFree_166]; C_typeId_978[this_197] = 1; }; this_796 = this_197; return this_796; } function new_Iterator182() returns integer { local integer this718 local integer this167 local integer this801 local integer this168 if (Iterator_firstFree_156 == 0) { if (Iterator_maxIndex_553 < 32768) { Iterator_maxIndex_553 = (Iterator_maxIndex_553 + 1); this_167 = Iterator_maxIndex_553; } else { error141("Out of memory: Could not create Iterator."); this_167 = 0; }; } else { Iterator_firstFree_156 = (Iterator_firstFree_156 - 1); this_167 = Iterator_nextFree_132[Iterator_firstFree_156]; }; this_718 = this_167; this_801 = this_718; this_168 = this_801; Iterator_i_213[this_168] = 0; return this_718; } function error141(string msg578) { $debugPrint213((msg_578 + (" " + #getStackTrace()))); }