array IntList_elements135 array IntList_nextFree382 integer IntList_firstFree183 integer IntList_maxIndex153 array IntList_typeId597 array IntListIterator_nextFree246 integer IntListIterator_firstFree159 integer IntListIterator_maxIndex132 array IntListIterator_typeId660 array IntList_size112 array IntListIterator_list101 array IntListIterator_pos151 integer IntList_firstFree183 = 0 integer IntList_maxIndex153 = 0 integer IntListIterator_firstFree159 = 0 integer IntListIterator_maxIndex132 = 0 function initGlobals820() { } function main544() { initGlobals820(); init_test587(); } function config181() { } function init_test587() { local integer list148 local integer sum970 local integer listIterator511 local integer i211 local integer from663 local integer this123 local integer test_IntList_iterator_result203 local integer this475 local integer this113 local integer this335 local integer this770 local integer this106 list_148 = dispatch_IntList_test_IntList_add153(dispatch_IntList_test_IntList_add153(dispatch_IntList_test_IntList_add153(new_IntList222(), 7), 3), 5); sum_970 = 0; this_123 = list_148; if (IntList_typeId_597[this_123] == 0) { if (this_123 == 0) { error131("Nullpointer exception when calling IntList.iterator"); } else { error131("Called IntList.iterator on invalid object."); }; } else { }; this_475 = this_123; test_IntList_iterator_result_203 = new_IntListIterator821(this_475); listIterator_511 = test_IntList_iterator_result_203; from_663 = listIterator_511; loop { this_113 = from_663; exitwhen (not (IntListIterator_pos_151[this_113] < IntList_size_112[IntListIterator_list_101[this_113]])); this_335 = from_663; IntListIterator_pos_151[this_335] = (IntListIterator_pos_151[this_335] + 1); i_211 = dispatch_IntList_test_IntList_get124(IntListIterator_list_101[this_335], (IntListIterator_pos_151[this_335] - 1)); sum_970 = (sum_970 + i_211); }; this_770 = listIterator_511; if (IntListIterator_typeId_660[this_770] == 0) { if (this_770 == 0) { error131("Nullpointer exception when calling IntListIterator.close"); } else { error131("Called IntListIterator.close on invalid object."); }; } else { }; this_106 = this_770; dispatch_IntListIterator_destroyIntListIterator159(this_106); if (sum_970 == 15) { testSuccess143(); } else { }; } IS_NATIVE function testSuccess143() { } function new_IntList222() returns integer { local integer this658 local integer this642 local integer this207 local integer this123 if (IntList_firstFree_183 == 0) { if (IntList_maxIndex_153 < 32768) { IntList_maxIndex_153 = (IntList_maxIndex_153 + 1); this_642 = IntList_maxIndex_153; IntList_typeId_597[this_642] = 1; } else { error131("Out of memory: Could not create IntList."); this_642 = 0; }; } else { IntList_firstFree_183 = (IntList_firstFree_183 - 1); this_642 = IntList_nextFree_382[IntList_firstFree_183]; IntList_typeId_597[this_642] = 1; }; this_658 = this_642; this_207 = this_658; this_123 = this_207; IntList_size_112[this_123] = 0; return this_658; } function new_IntListIterator821(integer list265) returns integer { local integer this171 local integer this905 local integer this203 local integer list158 local integer this198 if (IntListIterator_firstFree_159 == 0) { if (IntListIterator_maxIndex_132 < 32768) { IntListIterator_maxIndex_132 = (IntListIterator_maxIndex_132 + 1); this_905 = IntListIterator_maxIndex_132; IntListIterator_typeId_660[this_905] = 2; } else { error131("Out of memory: Could not create IntListIterator."); this_905 = 0; }; } else { IntListIterator_firstFree_159 = (IntListIterator_firstFree_159 - 1); this_905 = IntListIterator_nextFree_246[IntListIterator_firstFree_159]; IntListIterator_typeId_660[this_905] = 2; }; this_171 = this_905; this_203 = this_171; list_158 = list_265; this_198 = this_203; IntListIterator_pos_151[this_198] = 0; IntListIterator_list_101[this_203] = list_158; return this_171; } function error131(string msg180) { $debugPrint149((msg_180 + (" " + #getStackTrace()))); } function dispatch_IntList_test_IntList_add153(integer this210, integer x205) returns integer { local integer test_IntList_add_result184 local integer this205 local integer x193 local integer this144 local integer test_IntList_getOffset_result456 local integer this174 if (IntList_typeId_597[this_210] == 0) { if (this_210 == 0) { error131("Nullpointer exception when calling IntList.add"); } else { error131("Called IntList.add on invalid object."); }; } else { }; this_205 = this_210; x_193 = x_205; this_144 = this_205; if (IntList_typeId_597[this_144] == 0) { if (this_144 == 0) { error131("Nullpointer exception when calling IntList.getOffset"); } else { error131("Called IntList.getOffset on invalid object."); }; } else { }; this_174 = this_144; test_IntList_getOffset_result_456 = (64 * ((this_174 castTo integer) - 1)); IntList_elements_135[(test_IntList_getOffset_result_456 + IntList_size_112[this_205])] = x_193; IntList_size_112[this_205] = (IntList_size_112[this_205] + 1); test_IntList_add_result_184 = this_205; return test_IntList_add_result_184; } function dispatch_IntList_test_IntList_get124(integer this109, integer i135) returns integer { local integer test_IntList_get_result144 local integer this469 local integer i561 local integer this104 local integer test_IntList_getOffset_result269 local integer this625 if (IntList_typeId_597[this_109] == 0) { if (this_109 == 0) { error131("Nullpointer exception when calling IntList.get"); } else { error131("Called IntList.get on invalid object."); }; } else { }; this_469 = this_109; i_561 = i_135; this_104 = this_469; if (IntList_typeId_597[this_104] == 0) { if (this_104 == 0) { error131("Nullpointer exception when calling IntList.getOffset"); } else { error131("Called IntList.getOffset on invalid object."); }; } else { }; this_625 = this_104; test_IntList_getOffset_result_269 = (64 * ((this_625 castTo integer) - 1)); test_IntList_get_result_144 = IntList_elements_135[(test_IntList_getOffset_result_269 + i_561)]; return test_IntList_get_result_144; } function dispatch_IntListIterator_destroyIntListIterator159(integer this151) { local integer this205 local integer obj207 if (IntListIterator_typeId_660[this_151] == 0) { if (this_151 == 0) { error131("Nullpointer exception when calling IntListIterator.IntListIterator"); } else { error131("Called IntListIterator.IntListIterator on invalid object."); }; } else { }; this_205 = this_151; obj_207 = this_205; if (IntListIterator_typeId_660[obj_207] == 0) { error131("Double free: object of type IntListIterator"); } else { IntListIterator_nextFree_246[IntListIterator_firstFree_159] = obj_207; IntListIterator_firstFree_159 = (IntListIterator_firstFree_159 + 1); IntListIterator_typeId_660[obj_207] = 0; }; }