array IntList_elements287 array IntList_nextFree482 integer IntList_firstFree279 integer IntList_maxIndex137 array IntList_typeId501 array IntListIterator_nextFree107 integer IntListIterator_firstFree821 integer IntListIterator_maxIndex195 array IntListIterator_typeId103 array IntList_size149 array IntListIterator_list180 array IntListIterator_pos758 integer IntList_firstFree279 = 0 integer IntList_maxIndex137 = 0 integer IntListIterator_firstFree821 = 0 integer IntListIterator_maxIndex195 = 0 function initGlobals124() { IntList_firstFree_279 = 0; IntList_maxIndex_137 = 0; IntListIterator_firstFree_821 = 0; IntListIterator_maxIndex_195 = 0; } function main639() { initGlobals124(); init_test116(); } function config368() { } function init_test116() { local integer list153 local integer sum186 local integer iterator173 local integer i666 list_153 = dispatch_IntList_test_IntList_add184(dispatch_IntList_test_IntList_add184(dispatch_IntList_test_IntList_add184(new_IntList358(), 7), 3), 5); sum_186 = 0; iterator_173 = IntList_iterator129(list_153); loop { exitwhen (not IntListIterator_hasNext125(iterator_173)); i_666 = IntListIterator_next111(iterator_173); sum_186 = (sum_186 + i_666); }; IntListIterator_close113(iterator_173); if (sum_186 == 15) { testSuccess649(); } else { }; } IS_NATIVE function testSuccess649() { } function IntList_getOffset119(integer this211) returns integer { return (64 * ((this_211 castTo integer) - 1)); } function IntList_add736(integer this507, integer x146) returns integer { IntList_elements_287[(dispatch_IntList_test_IntList_getOffset126(this_507) + IntList_size_149[this_507])] = x_146; IntList_size_149[this_507] = (IntList_size_149[this_507] + 1); return this_507; } function IntList_get371(integer this915, integer i154) returns integer { return IntList_elements_287[(dispatch_IntList_test_IntList_getOffset126(this_915) + i_154)]; } function IntList_iterator129(integer this910) returns integer { return new_IntListIterator275(this_910); } function IntList_init440(integer this213) { IntList_size_149[this_213] = 0; } function new_IntList358() returns integer { local integer this127 this_127 = alloc_IntList428(); construct_IntList187(this_127); return this_127; } function construct_IntList187(integer this267) { IntList_init440(this_267); } function new_IntListIterator275(integer list175) returns integer { local integer this176 this_176 = alloc_IntListIterator363(); construct_IntListIterator746(this_176, list_175); return this_176; } function IntListIterator_hasNext125(integer this116) returns boolean { return (IntListIterator_pos_758[this_116] < IntList_size_149[IntListIterator_list_180[this_116]]); } function IntListIterator_next111(integer this470) returns integer { IntListIterator_pos_758[this_470] = (IntListIterator_pos_758[this_470] + 1); return dispatch_IntList_test_IntList_get228(IntListIterator_list_180[this_470], (IntListIterator_pos_758[this_470] - 1)); } function IntListIterator_close113(integer this266) { dispatch_IntListIterator_destroyIntListIterator169(this_266); } function destroyIntListIterator300(integer this647) { IntListIterator_onDestroy666(this_647); dealloc_IntListIterator108(this_647); } function IntListIterator_init145(integer this196) { IntListIterator_pos_758[this_196] = 0; } function construct_IntListIterator746(integer this749, integer list108) { IntListIterator_init145(this_749); IntListIterator_list_180[this_749] = list_108; } function IntListIterator_onDestroy666(integer this716) { } function alloc_IntList428() returns integer { local integer this122 if (IntList_firstFree_279 == 0) { if (IntList_maxIndex_137 < 32768) { IntList_maxIndex_137 = (IntList_maxIndex_137 + 1); this_122 = IntList_maxIndex_137; IntList_typeId_501[this_122] = 1; } else { error203("Out of memory: Could not create IntList."); this_122 = 0; }; } else { IntList_firstFree_279 = (IntList_firstFree_279 - 1); this_122 = IntList_nextFree_482[IntList_firstFree_279]; IntList_typeId_501[this_122] = 1; }; return this_122; } function error203(string msg194) { $debugPrint840((msg_194 + (" " + #getStackTrace()))); } function alloc_IntListIterator363() returns integer { local integer this150 if (IntListIterator_firstFree_821 == 0) { if (IntListIterator_maxIndex_195 < 32768) { IntListIterator_maxIndex_195 = (IntListIterator_maxIndex_195 + 1); this_150 = IntListIterator_maxIndex_195; IntListIterator_typeId_103[this_150] = 2; } else { error203("Out of memory: Could not create IntListIterator."); this_150 = 0; }; } else { IntListIterator_firstFree_821 = (IntListIterator_firstFree_821 - 1); this_150 = IntListIterator_nextFree_107[IntListIterator_firstFree_821]; IntListIterator_typeId_103[this_150] = 2; }; return this_150; } function dealloc_IntListIterator108(integer obj200) { if (IntListIterator_typeId_103[obj_200] == 0) { error203("Double free: object of type IntListIterator"); } else { IntListIterator_nextFree_107[IntListIterator_firstFree_821] = obj_200; IntListIterator_firstFree_821 = (IntListIterator_firstFree_821 + 1); IntListIterator_typeId_103[obj_200] = 0; }; } function dispatch_IntList_test_IntList_getOffset126(integer this201) returns integer { local integer test_IntList_getOffset_result135 if (IntList_typeId_501[this_201] == 0) { if (this_201 == 0) { error203("Nullpointer exception when calling IntList.getOffset"); } else { error203("Called IntList.getOffset on invalid object."); }; } else { }; test_IntList_getOffset_result_135 = IntList_getOffset119(this_201); return test_IntList_getOffset_result_135; } function dispatch_IntList_test_IntList_add184(integer this605, integer x132) returns integer { local integer test_IntList_add_result199 if (IntList_typeId_501[this_605] == 0) { if (this_605 == 0) { error203("Nullpointer exception when calling IntList.add"); } else { error203("Called IntList.add on invalid object."); }; } else { }; test_IntList_add_result_199 = IntList_add736(this_605, x_132); return test_IntList_add_result_199; } function dispatch_IntList_test_IntList_get228(integer this126, integer i153) returns integer { local integer test_IntList_get_result234 if (IntList_typeId_501[this_126] == 0) { if (this_126 == 0) { error203("Nullpointer exception when calling IntList.get"); } else { error203("Called IntList.get on invalid object."); }; } else { }; test_IntList_get_result_234 = IntList_get371(this_126, i_153); return test_IntList_get_result_234; } function dispatch_IntListIterator_destroyIntListIterator169(integer this904) { if (IntListIterator_typeId_103[this_904] == 0) { if (this_904 == 0) { error203("Nullpointer exception when calling IntListIterator.IntListIterator"); } else { error203("Called IntListIterator.IntListIterator on invalid object."); }; } else { }; destroyIntListIterator300(this_904); }