array IntList_elements110 array IntList_nextFree786 integer IntList_firstFree139 integer IntList_maxIndex163 array IntList_typeId174 array IntListIterator_nextFree161 integer IntListIterator_firstFree754 integer IntListIterator_maxIndex132 array IntListIterator_typeId467 array IntList_size210 array IntListIterator_list171 array IntListIterator_pos102 integer IntList_firstFree139 = 0 integer IntList_maxIndex163 = 0 integer IntListIterator_firstFree754 = 0 integer IntListIterator_maxIndex132 = 0 function initGlobals201() { } function main972() { initGlobals201(); init_test184(); } function config205() { } function init_test184() { local integer list114 local integer sum520 local integer iterator447 local integer i150 local integer this959 local integer this137 local integer this308 local integer this770 list_114 = dispatch_IntList_test_IntList_add129(dispatch_IntList_test_IntList_add129(dispatch_IntList_test_IntList_add129(new_IntList832(), 7), 3), 5); sum_520 = 0; this_959 = list_114; iterator_447 = new_IntListIterator201(this_959); loop { this_137 = iterator_447; exitwhen (not (IntListIterator_pos_102[this_137] < IntList_size_210[IntListIterator_list_171[this_137]])); this_308 = iterator_447; IntListIterator_pos_102[this_308] = (IntListIterator_pos_102[this_308] + 1); i_150 = dispatch_IntList_test_IntList_get143(IntListIterator_list_171[this_308], (IntListIterator_pos_102[this_308] - 1)); sum_520 = (sum_520 + i_150); }; this_770 = iterator_447; dispatch_IntListIterator_destroyIntListIterator135(this_770); if (sum_520 == 15) { testSuccess700(); } else { }; } IS_NATIVE function testSuccess700() { } function new_IntList832() returns integer { local integer this899 local integer this389 local integer this179 local integer this839 if (IntList_firstFree_139 == 0) { if (IntList_maxIndex_163 < 32768) { IntList_maxIndex_163 = (IntList_maxIndex_163 + 1); this_389 = IntList_maxIndex_163; IntList_typeId_174[this_389] = 1; } else { error170("Out of memory: Could not create IntList."); this_389 = 0; }; } else { IntList_firstFree_139 = (IntList_firstFree_139 - 1); this_389 = IntList_nextFree_786[IntList_firstFree_139]; IntList_typeId_174[this_389] = 1; }; this_899 = this_389; this_179 = this_899; this_839 = this_179; IntList_size_210[this_839] = 0; return this_899; } function new_IntListIterator201(integer list192) returns integer { local integer this262 local integer this390 local integer this229 local integer list176 local integer this830 if (IntListIterator_firstFree_754 == 0) { if (IntListIterator_maxIndex_132 < 32768) { IntListIterator_maxIndex_132 = (IntListIterator_maxIndex_132 + 1); this_390 = IntListIterator_maxIndex_132; IntListIterator_typeId_467[this_390] = 2; } else { error170("Out of memory: Could not create IntListIterator."); this_390 = 0; }; } else { IntListIterator_firstFree_754 = (IntListIterator_firstFree_754 - 1); this_390 = IntListIterator_nextFree_161[IntListIterator_firstFree_754]; IntListIterator_typeId_467[this_390] = 2; }; this_262 = this_390; this_229 = this_262; list_176 = list_192; this_830 = this_229; IntListIterator_pos_102[this_830] = 0; IntListIterator_list_171[this_229] = list_176; return this_262; } function error170(string msg193) { $debugPrint675((msg_193 + (" " + #getStackTrace()))); } function dispatch_IntList_test_IntList_add129(integer this198, integer x110) returns integer { local integer test_IntList_add_result678 local integer this956 local integer x530 local integer this121 local integer test_IntList_getOffset_result167 local integer this194 if (IntList_typeId_174[this_198] == 0) { if (this_198 == 0) { error170("Nullpointer exception when calling IntList.add"); } else { error170("Called IntList.add on invalid object."); }; } else { }; this_956 = this_198; x_530 = x_110; this_121 = this_956; if (IntList_typeId_174[this_121] == 0) { if (this_121 == 0) { error170("Nullpointer exception when calling IntList.getOffset"); } else { error170("Called IntList.getOffset on invalid object."); }; } else { }; this_194 = this_121; test_IntList_getOffset_result_167 = (64 * ((this_194 castTo integer) - 1)); IntList_elements_110[(test_IntList_getOffset_result_167 + IntList_size_210[this_956])] = x_530; IntList_size_210[this_956] = (IntList_size_210[this_956] + 1); test_IntList_add_result_678 = this_956; return test_IntList_add_result_678; } function dispatch_IntList_test_IntList_get143(integer this126, integer i127) returns integer { local integer test_IntList_get_result789 local integer this156 local integer i781 local integer this137 local integer test_IntList_getOffset_result104 local integer this661 if (IntList_typeId_174[this_126] == 0) { if (this_126 == 0) { error170("Nullpointer exception when calling IntList.get"); } else { error170("Called IntList.get on invalid object."); }; } else { }; this_156 = this_126; i_781 = i_127; this_137 = this_156; if (IntList_typeId_174[this_137] == 0) { if (this_137 == 0) { error170("Nullpointer exception when calling IntList.getOffset"); } else { error170("Called IntList.getOffset on invalid object."); }; } else { }; this_661 = this_137; test_IntList_getOffset_result_104 = (64 * ((this_661 castTo integer) - 1)); test_IntList_get_result_789 = IntList_elements_110[(test_IntList_getOffset_result_104 + i_781)]; return test_IntList_get_result_789; } function dispatch_IntListIterator_destroyIntListIterator135(integer this206) { local integer this376 local integer obj191 if (IntListIterator_typeId_467[this_206] == 0) { if (this_206 == 0) { error170("Nullpointer exception when calling IntListIterator.IntListIterator"); } else { error170("Called IntListIterator.IntListIterator on invalid object."); }; } else { }; this_376 = this_206; obj_191 = this_376; if (IntListIterator_typeId_467[obj_191] == 0) { error170("Double free: object of type IntListIterator"); } else { IntListIterator_nextFree_161[IntListIterator_firstFree_754] = obj_191; IntListIterator_firstFree_754 = (IntListIterator_firstFree_754 + 1); IntListIterator_typeId_467[obj_191] = 0; }; }