array IntList_elements139 array IntList_nextFree106 integer IntList_firstFree179 integer IntList_maxIndex180 array IntList_typeId164 array IntListIterator_nextFree552 integer IntListIterator_firstFree855 integer IntListIterator_maxIndex586 array IntListIterator_typeId127 array IntList_size151 array IntListIterator_list213 array IntListIterator_pos202 integer IntList_firstFree179 = 0 integer IntList_maxIndex180 = 0 integer IntListIterator_firstFree855 = 0 integer IntListIterator_maxIndex586 = 0 function initGlobals831() { } function main177() { initGlobals831(); init_test133(); } function config147() { } function init_test133() { local integer sum693 local integer listIterator427 local integer from164 listIterator_427 = dispatch_IntList_test_IntList_add587(dispatch_IntList_test_IntList_add587(dispatch_IntList_test_IntList_add587(new_IntList270(), 7), 3), 5); sum_693 = 0; if (IntList_typeId_164[listIterator_427] == 0) { if (listIterator_427 == 0) { error213("Nullpointer exception when calling IntList.iterator"); } else { error213("Called IntList.iterator on invalid object."); }; } else { }; from_164 = new_IntListIterator122(listIterator_427); listIterator_427 = from_164; loop { exitwhen (IntListIterator_pos_202[from_164] >= IntList_size_151[IntListIterator_list_213[from_164]]); IntListIterator_pos_202[from_164] = (IntListIterator_pos_202[from_164] + 1); sum_693 = (sum_693 + dispatch_IntList_test_IntList_get361(IntListIterator_list_213[from_164], (IntListIterator_pos_202[from_164] - 1))); }; if (IntListIterator_typeId_127[listIterator_427] == 0) { if (listIterator_427 == 0) { error213("Nullpointer exception when calling IntListIterator.close"); } else { error213("Called IntListIterator.close on invalid object."); }; } else { }; dispatch_IntListIterator_destroyIntListIterator189(listIterator_427); if (sum_693 == 15) { testSuccess603(); } else { }; } IS_NATIVE function testSuccess603() { } function new_IntList270() returns integer { local integer this648 if (IntList_firstFree_179 == 0) { if (IntList_maxIndex_180 < 32768) { IntList_maxIndex_180 = (IntList_maxIndex_180 + 1); this_648 = IntList_maxIndex_180; IntList_typeId_164[this_648] = 1; } else { error213("Out of memory: Could not create IntList."); this_648 = 0; }; } else { IntList_firstFree_179 = (IntList_firstFree_179 - 1); this_648 = IntList_nextFree_106[IntList_firstFree_179]; IntList_typeId_164[this_648] = 1; }; IntList_size_151[this_648] = 0; return this_648; } function new_IntListIterator122(integer list657) returns integer { local integer this417 if (IntListIterator_firstFree_855 == 0) { if (IntListIterator_maxIndex_586 < 32768) { IntListIterator_maxIndex_586 = (IntListIterator_maxIndex_586 + 1); this_417 = IntListIterator_maxIndex_586; IntListIterator_typeId_127[this_417] = 2; } else { error213("Out of memory: Could not create IntListIterator."); this_417 = 0; }; } else { IntListIterator_firstFree_855 = (IntListIterator_firstFree_855 - 1); this_417 = IntListIterator_nextFree_552[IntListIterator_firstFree_855]; IntListIterator_typeId_127[this_417] = 2; }; IntListIterator_pos_202[this_417] = 0; IntListIterator_list_213[this_417] = list_657; return this_417; } function error213(string msg156) { $debugPrint167((msg_156 + (" " + #getStackTrace()))); } function dispatch_IntList_test_IntList_add587(integer this383, integer x178) returns integer { if (IntList_typeId_164[this_383] == 0) { if (this_383 == 0) { error213("Nullpointer exception when calling IntList.add"); } else { error213("Called IntList.add on invalid object."); }; } else { }; if (IntList_typeId_164[this_383] == 0) { if (this_383 == 0) { error213("Nullpointer exception when calling IntList.getOffset"); } else { error213("Called IntList.getOffset on invalid object."); }; } else { }; IntList_elements_139[((64 * ((this_383 castTo integer) - 1)) + IntList_size_151[this_383])] = x_178; IntList_size_151[this_383] = (IntList_size_151[this_383] + 1); return this_383; } function dispatch_IntList_test_IntList_get361(integer this843, integer i102) returns integer { if (IntList_typeId_164[this_843] == 0) { if (this_843 == 0) { error213("Nullpointer exception when calling IntList.get"); } else { error213("Called IntList.get on invalid object."); }; } else { }; if (IntList_typeId_164[this_843] == 0) { if (this_843 == 0) { error213("Nullpointer exception when calling IntList.getOffset"); } else { error213("Called IntList.getOffset on invalid object."); }; } else { }; return IntList_elements_139[((64 * ((this_843 castTo integer) - 1)) + i_102)]; } function dispatch_IntListIterator_destroyIntListIterator189(integer this103) { if (IntListIterator_typeId_127[this_103] == 0) { if (this_103 == 0) { error213("Nullpointer exception when calling IntListIterator.IntListIterator"); } else { error213("Called IntListIterator.IntListIterator on invalid object."); }; } else { }; if (IntListIterator_typeId_127[this_103] == 0) { error213("Double free: object of type IntListIterator"); } else { IntListIterator_nextFree_552[IntListIterator_firstFree_855] = this_103; IntListIterator_firstFree_855 = (IntListIterator_firstFree_855 + 1); IntListIterator_typeId_127[this_103] = 0; }; }