array IntList_elements120 array IntList_nextFree148 integer IntList_firstFree108 integer IntList_maxIndex157 array IntList_typeId120 array IntListIterator_nextFree750 integer IntListIterator_firstFree758 integer IntListIterator_maxIndex110 array IntListIterator_typeId155 array IntList_size198 array IntListIterator_list189 array IntListIterator_pos102 integer IntList_firstFree108 = 0 integer IntList_maxIndex157 = 0 integer IntListIterator_firstFree758 = 0 integer IntListIterator_maxIndex110 = 0 function initGlobals119() { } function main207() { initGlobals119(); init_test507(); } function config164() { } function init_test507() { local integer sum118 local integer iterator906 iterator_906 = dispatch_IntList_test_IntList_add109(dispatch_IntList_test_IntList_add109(dispatch_IntList_test_IntList_add109(new_IntList151(), 7), 3), 5); sum_118 = 0; iterator_906 = new_IntListIterator289(iterator_906); loop { exitwhen (IntListIterator_pos_102[iterator_906] >= IntList_size_198[IntListIterator_list_189[iterator_906]]); IntListIterator_pos_102[iterator_906] = (IntListIterator_pos_102[iterator_906] + 1); sum_118 = (sum_118 + dispatch_IntList_test_IntList_get587(IntListIterator_list_189[iterator_906], (IntListIterator_pos_102[iterator_906] - 1))); }; dispatch_IntListIterator_destroyIntListIterator756(iterator_906); if (sum_118 == 15) { testSuccess150(); } else { }; } IS_NATIVE function testSuccess150() { } function new_IntList151() returns integer { local integer this160 if (IntList_firstFree_108 == 0) { if (IntList_maxIndex_157 < 32768) { IntList_maxIndex_157 = (IntList_maxIndex_157 + 1); this_160 = IntList_maxIndex_157; IntList_typeId_120[this_160] = 1; } else { error284("Out of memory: Could not create IntList."); this_160 = 0; }; } else { IntList_firstFree_108 = (IntList_firstFree_108 - 1); this_160 = IntList_nextFree_148[IntList_firstFree_108]; IntList_typeId_120[this_160] = 1; }; IntList_size_198[this_160] = 0; return this_160; } function new_IntListIterator289(integer list455) returns integer { local integer this136 if (IntListIterator_firstFree_758 == 0) { if (IntListIterator_maxIndex_110 < 32768) { IntListIterator_maxIndex_110 = (IntListIterator_maxIndex_110 + 1); this_136 = IntListIterator_maxIndex_110; IntListIterator_typeId_155[this_136] = 2; } else { error284("Out of memory: Could not create IntListIterator."); this_136 = 0; }; } else { IntListIterator_firstFree_758 = (IntListIterator_firstFree_758 - 1); this_136 = IntListIterator_nextFree_750[IntListIterator_firstFree_758]; IntListIterator_typeId_155[this_136] = 2; }; IntListIterator_pos_102[this_136] = 0; IntListIterator_list_189[this_136] = list_455; return this_136; } function error284(string msg964) { $debugPrint132((msg_964 + (" " + #getStackTrace()))); } function dispatch_IntList_test_IntList_add109(integer this206, integer x542) returns integer { if (IntList_typeId_120[this_206] == 0) { if (this_206 == 0) { error284("Nullpointer exception when calling IntList.add"); } else { error284("Called IntList.add on invalid object."); }; } else { }; if (IntList_typeId_120[this_206] == 0) { if (this_206 == 0) { error284("Nullpointer exception when calling IntList.getOffset"); } else { error284("Called IntList.getOffset on invalid object."); }; } else { }; IntList_elements_120[((64 * ((this_206 castTo integer) - 1)) + IntList_size_198[this_206])] = x_542; IntList_size_198[this_206] = (IntList_size_198[this_206] + 1); return this_206; } function dispatch_IntList_test_IntList_get587(integer this112, integer i189) returns integer { if (IntList_typeId_120[this_112] == 0) { if (this_112 == 0) { error284("Nullpointer exception when calling IntList.get"); } else { error284("Called IntList.get on invalid object."); }; } else { }; if (IntList_typeId_120[this_112] == 0) { if (this_112 == 0) { error284("Nullpointer exception when calling IntList.getOffset"); } else { error284("Called IntList.getOffset on invalid object."); }; } else { }; return IntList_elements_120[((64 * ((this_112 castTo integer) - 1)) + i_189)]; } function dispatch_IntListIterator_destroyIntListIterator756(integer this183) { if (IntListIterator_typeId_155[this_183] == 0) { if (this_183 == 0) { error284("Nullpointer exception when calling IntListIterator.IntListIterator"); } else { error284("Called IntListIterator.IntListIterator on invalid object."); }; } else { }; if (IntListIterator_typeId_155[this_183] == 0) { error284("Double free: object of type IntListIterator"); } else { IntListIterator_nextFree_750[IntListIterator_firstFree_758] = this_183; IntListIterator_firstFree_758 = (IntListIterator_firstFree_758 + 1); IntListIterator_typeId_155[this_183] = 0; }; }