array Iterator_nextFree207 integer Iterator_firstFree149 integer Iterator_maxIndex160 array Iterator_typeId142 array List_nextFree608 integer List_firstFree203 integer List_maxIndex141 array List_typeId138 array Iterator_t582 integer A_firstFree122 = 0 integer A_maxIndex967 = 0 integer B_firstFree670 = 0 integer B_maxIndex197 = 0 integer C_firstFree602 = 0 integer C_maxIndex175 = 0 integer Iterator_firstFree149 = 0 integer Iterator_maxIndex160 = 0 integer List_firstFree203 = 0 integer List_maxIndex141 = 0 function initGlobals517() { Iterator_firstFree_149 = 0; Iterator_maxIndex_160 = 0; List_firstFree_203 = 0; List_maxIndex_141 = 0; } function main151() { initGlobals517(); init_test354(); } function config161() { } function init_test354() { local integer a126 local integer iterator873 a_126 = new_List754(); iterator_873 = dispatch_List_test_List_iterator134(a_126); loop { exitwhen (not dispatch_Iterator_test_Iterator_hasNext138(iterator_873)); dispatch_Iterator_test_Iterator_next107(iterator_873); testSuccess189(); }; } IS_NATIVE function testSuccess189() { } function new_Iterator567(integer t812) returns integer { local integer this865 this_865 = alloc_Iterator126(); construct_Iterator175(this_865, t_812); return this_865; } function Iterator_hasNext147(integer this212) returns boolean { return true; } function Iterator_next815(integer this907) returns any { return Iterator_t_582[this_907]; } function Iterator_init150(integer this195) { } function construct_Iterator175(integer this150, integer t203) { Iterator_init150(this_150); } function List_iterator163(integer this142) returns integer { return new_Iterator567(this_142); } function List_init311(integer this154) { } function new_List754() returns integer { local integer this213 this_213 = alloc_List187(); construct_List181(this_213); return this_213; } function construct_List181(integer this117) { List_init311(this_117); } function error618(string msg366) { $debugPrint566((msg_366 + (" " + #getStackTrace()))); } function alloc_Iterator126() returns integer { local integer this138 if (Iterator_firstFree_149 == 0) { if (Iterator_maxIndex_160 < 32768) { Iterator_maxIndex_160 = (Iterator_maxIndex_160 + 1); this_138 = Iterator_maxIndex_160; Iterator_typeId_142[this_138] = 4; } else { error618("Out of memory: Could not create Iterator."); this_138 = 0; }; } else { Iterator_firstFree_149 = (Iterator_firstFree_149 - 1); this_138 = Iterator_nextFree_207[Iterator_firstFree_149]; Iterator_typeId_142[this_138] = 4; }; return this_138; } function alloc_List187() returns integer { local integer this648 if (List_firstFree_203 == 0) { if (List_maxIndex_141 < 32768) { List_maxIndex_141 = (List_maxIndex_141 + 1); this_648 = List_maxIndex_141; List_typeId_138[this_648] = 5; } else { error618("Out of memory: Could not create List."); this_648 = 0; }; } else { List_firstFree_203 = (List_firstFree_203 - 1); this_648 = List_nextFree_608[List_firstFree_203]; List_typeId_138[this_648] = 5; }; return this_648; } function dispatch_Iterator_test_Iterator_hasNext138(integer this154) returns boolean { local boolean test_Iterator_hasNext_result151 if (Iterator_typeId_142[this_154] == 0) { if (this_154 == 0) { error618("Nullpointer exception when calling Iterator.hasNext"); } else { error618("Called Iterator.hasNext on invalid object."); }; } else { }; test_Iterator_hasNext_result_151 = Iterator_hasNext147(this_154); return test_Iterator_hasNext_result_151; } function dispatch_Iterator_test_Iterator_next107(integer this209) returns any { local any test_Iterator_next_result817 if (Iterator_typeId_142[this_209] == 0) { if (this_209 == 0) { error618("Nullpointer exception when calling Iterator.next"); } else { error618("Called Iterator.next on invalid object."); }; } else { }; test_Iterator_next_result_817 = Iterator_next815(this_209); return test_Iterator_next_result_817; } function dispatch_List_test_List_iterator134(integer this110) returns integer { local integer test_List_iterator_result806 if (List_typeId_138[this_110] == 0) { if (this_110 == 0) { error618("Nullpointer exception when calling List.iterator"); } else { error618("Called List.iterator on invalid object."); }; } else { }; test_List_iterator_result_806 = List_iterator163(this_110); return test_List_iterator_result_806; }