array IntList_elements169 array IntList_nextFree370 integer IntList_firstFree146 integer IntList_maxIndex100 array IntList_typeId152 array IntListIterator_nextFree202 integer IntListIterator_firstFree209 integer IntListIterator_maxIndex129 array IntListIterator_typeId889 array IntList_size154 array IntListIterator_list141 array IntListIterator_pos202 integer IntList_firstFree146 = 0 integer IntList_maxIndex100 = 0 integer IntListIterator_firstFree209 = 0 integer IntListIterator_maxIndex129 = 0 function initGlobals143() { } function main116() { initGlobals143(); init_test109(); } function config443() { } function init_test109() { local integer list914 local integer sum188 local integer listIterator930 local integer i500 local integer from902 local integer this206 local integer test_IntList_iterator_result196 local integer this553 local integer this194 local integer this348 local integer this187 local integer this804 list_914 = dispatch_IntList_test_IntList_add207(dispatch_IntList_test_IntList_add207(dispatch_IntList_test_IntList_add207(new_IntList103(), 7), 3), 5); sum_188 = 0; this_206 = list_914; if (IntList_typeId_152[this_206] == 0) { if (this_206 == 0) { error195("Nullpointer exception when calling IntList.iterator"); } else { error195("Called IntList.iterator on invalid object."); }; } else { }; this_553 = this_206; test_IntList_iterator_result_196 = new_IntListIterator226(this_553); listIterator_930 = test_IntList_iterator_result_196; from_902 = listIterator_930; loop { this_194 = from_902; exitwhen (not (IntListIterator_pos_202[this_194] < IntList_size_154[IntListIterator_list_141[this_194]])); this_348 = from_902; IntListIterator_pos_202[this_348] = (IntListIterator_pos_202[this_348] + 1); i_500 = dispatch_IntList_test_IntList_get290(IntListIterator_list_141[this_348], (IntListIterator_pos_202[this_348] - 1)); sum_188 = (sum_188 + i_500); }; this_187 = listIterator_930; if (IntListIterator_typeId_889[this_187] == 0) { if (this_187 == 0) { error195("Nullpointer exception when calling IntListIterator.close"); } else { error195("Called IntListIterator.close on invalid object."); }; } else { }; this_804 = this_187; dispatch_IntListIterator_destroyIntListIterator767(this_804); if (sum_188 == 15) { testSuccess156(); } else { }; } IS_NATIVE function testSuccess156() { } function new_IntList103() returns integer { local integer this581 local integer this644 local integer this190 local integer this144 if (IntList_firstFree_146 == 0) { if (IntList_maxIndex_100 < 32768) { IntList_maxIndex_100 = (IntList_maxIndex_100 + 1); this_644 = IntList_maxIndex_100; IntList_typeId_152[this_644] = 1; } else { error195("Out of memory: Could not create IntList."); this_644 = 0; }; } else { IntList_firstFree_146 = (IntList_firstFree_146 - 1); this_644 = IntList_nextFree_370[IntList_firstFree_146]; IntList_typeId_152[this_644] = 1; }; this_581 = this_644; this_190 = this_581; this_144 = this_190; IntList_size_154[this_144] = 0; return this_581; } function new_IntListIterator226(integer list574) returns integer { local integer this171 local integer this621 local integer this204 local integer list496 local integer this140 if (IntListIterator_firstFree_209 == 0) { if (IntListIterator_maxIndex_129 < 32768) { IntListIterator_maxIndex_129 = (IntListIterator_maxIndex_129 + 1); this_621 = IntListIterator_maxIndex_129; IntListIterator_typeId_889[this_621] = 2; } else { error195("Out of memory: Could not create IntListIterator."); this_621 = 0; }; } else { IntListIterator_firstFree_209 = (IntListIterator_firstFree_209 - 1); this_621 = IntListIterator_nextFree_202[IntListIterator_firstFree_209]; IntListIterator_typeId_889[this_621] = 2; }; this_171 = this_621; this_204 = this_171; list_496 = list_574; this_140 = this_204; IntListIterator_pos_202[this_140] = 0; IntListIterator_list_141[this_204] = list_496; return this_171; } function error195(string msg131) { $debugPrint640((msg_131 + (" " + #getStackTrace()))); } function dispatch_IntList_test_IntList_add207(integer this471, integer x202) returns integer { local integer test_IntList_add_result149 local integer this139 local integer x159 local integer this722 local integer test_IntList_getOffset_result108 local integer this542 if (IntList_typeId_152[this_471] == 0) { if (this_471 == 0) { error195("Nullpointer exception when calling IntList.add"); } else { error195("Called IntList.add on invalid object."); }; } else { }; this_139 = this_471; x_159 = x_202; this_722 = this_139; if (IntList_typeId_152[this_722] == 0) { if (this_722 == 0) { error195("Nullpointer exception when calling IntList.getOffset"); } else { error195("Called IntList.getOffset on invalid object."); }; } else { }; this_542 = this_722; test_IntList_getOffset_result_108 = (64 * ((this_542 castTo integer) - 1)); IntList_elements_169[(test_IntList_getOffset_result_108 + IntList_size_154[this_139])] = x_159; IntList_size_154[this_139] = (IntList_size_154[this_139] + 1); test_IntList_add_result_149 = this_139; return test_IntList_add_result_149; } function dispatch_IntList_test_IntList_get290(integer this763, integer i159) returns integer { local integer test_IntList_get_result190 local integer this104 local integer i163 local integer this321 local integer test_IntList_getOffset_result144 local integer this120 if (IntList_typeId_152[this_763] == 0) { if (this_763 == 0) { error195("Nullpointer exception when calling IntList.get"); } else { error195("Called IntList.get on invalid object."); }; } else { }; this_104 = this_763; i_163 = i_159; this_321 = this_104; if (IntList_typeId_152[this_321] == 0) { if (this_321 == 0) { error195("Nullpointer exception when calling IntList.getOffset"); } else { error195("Called IntList.getOffset on invalid object."); }; } else { }; this_120 = this_321; test_IntList_getOffset_result_144 = (64 * ((this_120 castTo integer) - 1)); test_IntList_get_result_190 = IntList_elements_169[(test_IntList_getOffset_result_144 + i_163)]; return test_IntList_get_result_190; } function dispatch_IntListIterator_destroyIntListIterator767(integer this184) { local integer this176 local integer obj163 if (IntListIterator_typeId_889[this_184] == 0) { if (this_184 == 0) { error195("Nullpointer exception when calling IntListIterator.IntListIterator"); } else { error195("Called IntListIterator.IntListIterator on invalid object."); }; } else { }; this_176 = this_184; obj_163 = this_176; if (IntListIterator_typeId_889[obj_163] == 0) { error195("Double free: object of type IntListIterator"); } else { IntListIterator_nextFree_202[IntListIterator_firstFree_209] = obj_163; IntListIterator_firstFree_209 = (IntListIterator_firstFree_209 + 1); IntListIterator_typeId_889[obj_163] = 0; }; }