array IntList_elements128 array IntList_nextFree778 integer IntList_firstFree522 integer IntList_maxIndex442 array IntList_typeId470 array IntListIterator_nextFree155 integer IntListIterator_firstFree192 integer IntListIterator_maxIndex114 array IntListIterator_typeId642 array IntList_size609 array IntListIterator_list121 array IntListIterator_pos196 integer IntList_firstFree522 = 0 integer IntList_maxIndex442 = 0 integer IntListIterator_firstFree192 = 0 integer IntListIterator_maxIndex114 = 0 function initGlobals697() { } function main420() { initGlobals697(); init_test173(); } function config183() { } function init_test173() { local integer sum159 local integer listIterator132 local integer from597 listIterator_132 = dispatch_IntList_test_IntList_add115(dispatch_IntList_test_IntList_add115(dispatch_IntList_test_IntList_add115(new_IntList160(), 7), 3), 5); sum_159 = 0; if (IntList_typeId_470[listIterator_132] == 0) { if (listIterator_132 == 0) { error335("Nullpointer exception when calling IntList.iterator"); } else { error335("Called IntList.iterator on invalid object."); }; } else { }; from_597 = new_IntListIterator265(listIterator_132); listIterator_132 = from_597; loop { exitwhen (IntListIterator_pos_196[from_597] >= IntList_size_609[IntListIterator_list_121[from_597]]); IntListIterator_pos_196[from_597] = (IntListIterator_pos_196[from_597] + 1); sum_159 = (sum_159 + dispatch_IntList_test_IntList_get592(IntListIterator_list_121[from_597], (IntListIterator_pos_196[from_597] - 1))); }; if (IntListIterator_typeId_642[listIterator_132] == 0) { if (listIterator_132 == 0) { error335("Nullpointer exception when calling IntListIterator.close"); } else { error335("Called IntListIterator.close on invalid object."); }; } else { }; dispatch_IntListIterator_destroyIntListIterator462(listIterator_132); if (sum_159 == 15) { testSuccess128(); } else { }; } IS_NATIVE function testSuccess128() { } function new_IntList160() returns integer { local integer this118 if (IntList_firstFree_522 == 0) { if (IntList_maxIndex_442 < 32768) { IntList_maxIndex_442 = (IntList_maxIndex_442 + 1); this_118 = IntList_maxIndex_442; IntList_typeId_470[this_118] = 1; } else { error335("Out of memory: Could not create IntList."); this_118 = 0; }; } else { IntList_firstFree_522 = (IntList_firstFree_522 - 1); this_118 = IntList_nextFree_778[IntList_firstFree_522]; IntList_typeId_470[this_118] = 1; }; IntList_size_609[this_118] = 0; return this_118; } function new_IntListIterator265(integer list208) returns integer { local integer this273 if (IntListIterator_firstFree_192 == 0) { if (IntListIterator_maxIndex_114 < 32768) { IntListIterator_maxIndex_114 = (IntListIterator_maxIndex_114 + 1); this_273 = IntListIterator_maxIndex_114; IntListIterator_typeId_642[this_273] = 2; } else { error335("Out of memory: Could not create IntListIterator."); this_273 = 0; }; } else { IntListIterator_firstFree_192 = (IntListIterator_firstFree_192 - 1); this_273 = IntListIterator_nextFree_155[IntListIterator_firstFree_192]; IntListIterator_typeId_642[this_273] = 2; }; IntListIterator_pos_196[this_273] = 0; IntListIterator_list_121[this_273] = list_208; return this_273; } function error335(string msg748) { $debugPrint123((msg_748 + (" " + #getStackTrace()))); } function dispatch_IntList_test_IntList_add115(integer this158, integer x198) returns integer { if (IntList_typeId_470[this_158] == 0) { if (this_158 == 0) { error335("Nullpointer exception when calling IntList.add"); } else { error335("Called IntList.add on invalid object."); }; } else { }; if (IntList_typeId_470[this_158] == 0) { if (this_158 == 0) { error335("Nullpointer exception when calling IntList.getOffset"); } else { error335("Called IntList.getOffset on invalid object."); }; } else { }; IntList_elements_128[((64 * ((this_158 castTo integer) - 1)) + IntList_size_609[this_158])] = x_198; IntList_size_609[this_158] = (IntList_size_609[this_158] + 1); return this_158; } function dispatch_IntList_test_IntList_get592(integer this144, integer i456) returns integer { if (IntList_typeId_470[this_144] == 0) { if (this_144 == 0) { error335("Nullpointer exception when calling IntList.get"); } else { error335("Called IntList.get on invalid object."); }; } else { }; if (IntList_typeId_470[this_144] == 0) { if (this_144 == 0) { error335("Nullpointer exception when calling IntList.getOffset"); } else { error335("Called IntList.getOffset on invalid object."); }; } else { }; return IntList_elements_128[((64 * ((this_144 castTo integer) - 1)) + i_456)]; } function dispatch_IntListIterator_destroyIntListIterator462(integer this213) { if (IntListIterator_typeId_642[this_213] == 0) { if (this_213 == 0) { error335("Nullpointer exception when calling IntListIterator.IntListIterator"); } else { error335("Called IntListIterator.IntListIterator on invalid object."); }; } else { }; if (IntListIterator_typeId_642[this_213] == 0) { error335("Double free: object of type IntListIterator"); } else { IntListIterator_nextFree_155[IntListIterator_firstFree_192] = this_213; IntListIterator_firstFree_192 = (IntListIterator_firstFree_192 + 1); IntListIterator_typeId_642[this_213] = 0; }; }