array Iterator_nextFree116 integer Iterator_firstFree184 integer Iterator_maxIndex121 array Iterator_typeId113 array List_nextFree492 integer List_firstFree785 integer List_maxIndex572 array List_typeId151 array Iterator_t212 integer A_firstFree957 = 0 integer A_maxIndex134 = 0 integer B_firstFree588 = 0 integer B_maxIndex123 = 0 integer C_firstFree900 = 0 integer C_maxIndex514 = 0 integer Iterator_firstFree184 = 0 integer Iterator_maxIndex121 = 0 integer List_firstFree785 = 0 integer List_maxIndex572 = 0 function initGlobals150() { } function main545() { initGlobals150(); init_test799(); } function config893() { } function init_test799() { local integer iterator121 iterator_121 = dispatch_List_test_List_iterator199(new_List196()); loop { exitwhen (not dispatch_Iterator_test_Iterator_hasNext196(iterator_121)); dispatch_Iterator_test_Iterator_next204(iterator_121); testSuccess156(); }; } IS_NATIVE function testSuccess156() { } function new_Iterator148(integer t197) returns integer { local integer this103 this_103 = alloc_Iterator123(); construct_Iterator753(this_103, t_197); return this_103; } function Iterator_hasNext209(integer this166) returns boolean { return true; } function Iterator_next657(integer this147) returns any { return Iterator_t_212[this_147]; } function Iterator_init180(integer this748) { } function construct_Iterator753(integer this191, integer t131) { Iterator_init180(this_191); } function List_iterator179(integer this960) returns integer { return new_Iterator148(this_960); } function List_init285(integer this201) { } function new_List196() returns integer { local integer this197 this_197 = alloc_List103(); construct_List188(this_197); return this_197; } function construct_List188(integer this100) { List_init285(this_100); } function error162(string msg140) { $debugPrint194((msg_140 + (" " + #getStackTrace()))); } function alloc_Iterator123() returns integer { local integer this162 if (Iterator_firstFree_184 == 0) { if (Iterator_maxIndex_121 < 32768) { Iterator_maxIndex_121 = (Iterator_maxIndex_121 + 1); this_162 = Iterator_maxIndex_121; Iterator_typeId_113[this_162] = 4; } else { error162("Out of memory: Could not create Iterator."); this_162 = 0; }; } else { Iterator_firstFree_184 = (Iterator_firstFree_184 - 1); this_162 = Iterator_nextFree_116[Iterator_firstFree_184]; Iterator_typeId_113[this_162] = 4; }; return this_162; } function alloc_List103() returns integer { local integer this112 if (List_firstFree_785 == 0) { if (List_maxIndex_572 < 32768) { List_maxIndex_572 = (List_maxIndex_572 + 1); this_112 = List_maxIndex_572; List_typeId_151[this_112] = 5; } else { error162("Out of memory: Could not create List."); this_112 = 0; }; } else { List_firstFree_785 = (List_firstFree_785 - 1); this_112 = List_nextFree_492[List_firstFree_785]; List_typeId_151[this_112] = 5; }; return this_112; } function dispatch_Iterator_test_Iterator_hasNext196(integer this366) returns boolean { if (Iterator_typeId_113[this_366] == 0) { if (this_366 == 0) { error162("Nullpointer exception when calling Iterator.hasNext"); } else { error162("Called Iterator.hasNext on invalid object."); }; } else { }; return Iterator_hasNext209(this_366); } function dispatch_Iterator_test_Iterator_next204(integer this104) returns any { if (Iterator_typeId_113[this_104] == 0) { if (this_104 == 0) { error162("Nullpointer exception when calling Iterator.next"); } else { error162("Called Iterator.next on invalid object."); }; } else { }; return Iterator_next657(this_104); } function dispatch_List_test_List_iterator199(integer this161) returns integer { if (List_typeId_151[this_161] == 0) { if (this_161 == 0) { error162("Nullpointer exception when calling List.iterator"); } else { error162("Called List.iterator on invalid object."); }; } else { }; return List_iterator179(this_161); }