array IntList_elements682 array IntList_nextFree161 integer IntList_firstFree587 integer IntList_maxIndex580 array IntList_typeId106 array IntListIterator_nextFree185 integer IntListIterator_firstFree167 integer IntListIterator_maxIndex157 array IntListIterator_typeId148 array IntList_size975 array IntListIterator_list202 array IntListIterator_pos765 integer IntList_firstFree587 = 0 integer IntList_maxIndex580 = 0 integer IntListIterator_firstFree167 = 0 integer IntListIterator_maxIndex157 = 0 function initGlobals139() { IntList_firstFree_587 = 0; IntList_maxIndex_580 = 0; IntListIterator_firstFree_167 = 0; IntListIterator_maxIndex_157 = 0; } function main914() { initGlobals139(); init_test121(); } function config213() { } function init_test121() { local integer list166 local integer sum120 local integer iterator823 local integer i185 list_166 = dispatch_IntList_test_IntList_add123(dispatch_IntList_test_IntList_add123(dispatch_IntList_test_IntList_add123(new_IntList164(), 7), 3), 5); sum_120 = 0; iterator_823 = IntList_iterator116(list_166); loop { exitwhen (not IntListIterator_hasNext164(iterator_823)); i_185 = IntListIterator_next452(iterator_823); sum_120 = (sum_120 + i_185); }; IntListIterator_close134(iterator_823); if (sum_120 == 15) { testSuccess282(); } else { }; } IS_NATIVE function testSuccess282() { } function IntList_getOffset390(integer this195) returns integer { return (64 * ((this_195 castTo integer) - 1)); } function IntList_add578(integer this205, integer x165) returns integer { IntList_elements_682[(dispatch_IntList_test_IntList_getOffset177(this_205) + IntList_size_975[this_205])] = x_165; IntList_size_975[this_205] = (IntList_size_975[this_205] + 1); return this_205; } function IntList_get113(integer this204, integer i157) returns integer { return IntList_elements_682[(dispatch_IntList_test_IntList_getOffset177(this_204) + i_157)]; } function IntList_iterator116(integer this163) returns integer { return new_IntListIterator591(this_163); } function IntList_init374(integer this154) { IntList_size_975[this_154] = 0; } function new_IntList164() returns integer { local integer this127 this_127 = alloc_IntList181(); construct_IntList132(this_127); return this_127; } function construct_IntList132(integer this169) { IntList_init374(this_169); } function new_IntListIterator591(integer list156) returns integer { local integer this132 this_132 = alloc_IntListIterator853(); construct_IntListIterator167(this_132, list_156); return this_132; } function IntListIterator_hasNext164(integer this146) returns boolean { return (IntListIterator_pos_765[this_146] < IntList_size_975[IntListIterator_list_202[this_146]]); } function IntListIterator_next452(integer this123) returns integer { IntListIterator_pos_765[this_123] = (IntListIterator_pos_765[this_123] + 1); return dispatch_IntList_test_IntList_get121(IntListIterator_list_202[this_123], (IntListIterator_pos_765[this_123] - 1)); } function IntListIterator_close134(integer this560) { dispatch_IntListIterator_destroyIntListIterator737(this_560); } function destroyIntListIterator448(integer this473) { IntListIterator_onDestroy844(this_473); dealloc_IntListIterator160(this_473); } function IntListIterator_init116(integer this180) { IntListIterator_pos_765[this_180] = 0; } function construct_IntListIterator167(integer this103, integer list190) { IntListIterator_init116(this_103); IntListIterator_list_202[this_103] = list_190; } function IntListIterator_onDestroy844(integer this562) { } function alloc_IntList181() returns integer { local integer this201 if (IntList_firstFree_587 == 0) { if (IntList_maxIndex_580 < 32768) { IntList_maxIndex_580 = (IntList_maxIndex_580 + 1); this_201 = IntList_maxIndex_580; IntList_typeId_106[this_201] = 1; } else { error829("Out of memory: Could not create IntList."); this_201 = 0; }; } else { IntList_firstFree_587 = (IntList_firstFree_587 - 1); this_201 = IntList_nextFree_161[IntList_firstFree_587]; IntList_typeId_106[this_201] = 1; }; return this_201; } function error829(string msg173) { $debugPrint160((msg_173 + (" " + #getStackTrace()))); } function alloc_IntListIterator853() returns integer { local integer this106 if (IntListIterator_firstFree_167 == 0) { if (IntListIterator_maxIndex_157 < 32768) { IntListIterator_maxIndex_157 = (IntListIterator_maxIndex_157 + 1); this_106 = IntListIterator_maxIndex_157; IntListIterator_typeId_148[this_106] = 2; } else { error829("Out of memory: Could not create IntListIterator."); this_106 = 0; }; } else { IntListIterator_firstFree_167 = (IntListIterator_firstFree_167 - 1); this_106 = IntListIterator_nextFree_185[IntListIterator_firstFree_167]; IntListIterator_typeId_148[this_106] = 2; }; return this_106; } function dealloc_IntListIterator160(integer obj138) { if (IntListIterator_typeId_148[obj_138] == 0) { error829("Double free: object of type IntListIterator"); } else { IntListIterator_nextFree_185[IntListIterator_firstFree_167] = obj_138; IntListIterator_firstFree_167 = (IntListIterator_firstFree_167 + 1); IntListIterator_typeId_148[obj_138] = 0; }; } function dispatch_IntList_test_IntList_getOffset177(integer this132) returns integer { local integer test_IntList_getOffset_result195 if (IntList_typeId_106[this_132] == 0) { if (this_132 == 0) { error829("Nullpointer exception when calling IntList.getOffset"); } else { error829("Called IntList.getOffset on invalid object."); }; } else { }; test_IntList_getOffset_result_195 = IntList_getOffset390(this_132); return test_IntList_getOffset_result_195; } function dispatch_IntList_test_IntList_add123(integer this653, integer x208) returns integer { local integer test_IntList_add_result754 if (IntList_typeId_106[this_653] == 0) { if (this_653 == 0) { error829("Nullpointer exception when calling IntList.add"); } else { error829("Called IntList.add on invalid object."); }; } else { }; test_IntList_add_result_754 = IntList_add578(this_653, x_208); return test_IntList_add_result_754; } function dispatch_IntList_test_IntList_get121(integer this358, integer i984) returns integer { local integer test_IntList_get_result879 if (IntList_typeId_106[this_358] == 0) { if (this_358 == 0) { error829("Nullpointer exception when calling IntList.get"); } else { error829("Called IntList.get on invalid object."); }; } else { }; test_IntList_get_result_879 = IntList_get113(this_358, i_984); return test_IntList_get_result_879; } function dispatch_IntListIterator_destroyIntListIterator737(integer this834) { if (IntListIterator_typeId_148[this_834] == 0) { if (this_834 == 0) { error829("Nullpointer exception when calling IntListIterator.IntListIterator"); } else { error829("Called IntListIterator.IntListIterator on invalid object."); }; } else { }; destroyIntListIterator448(this_834); }