array test_ar155 array I_nextFree199 integer I_firstFree360 integer I_maxIndex751 array I_typeId746 integer I_firstFree360 = 0 integer I_maxIndex751 = 0 function initGlobals157() { } function main126() { initGlobals157(); init_test808(); } function config180() { } function init_test808() { local integer temp132 test_ar_155[5] = new_B188(); test_ar_155[6] = new_C127(); temp_132 = test_ar_155[6]; test_ar_155[6] = test_ar_155[5]; test_ar_155[5] = temp_132; if ((dispatch_I_test_I_foo171(test_ar_155[5]) == 3) and (dispatch_I_test_I_foo171(test_ar_155[6]) == 2)) { testSuccess160(); } else { }; } IS_NATIVE function testSuccess160() { } function B_foo770(integer this662) returns integer { return 2; } function B_init211(integer this126) { } function new_B188() returns integer { local integer this647 this_647 = alloc_B121(); construct_B158(this_647); return this_647; } function construct_B158(integer this178) { B_init211(this_178); } function C_foo209(integer this490) returns integer { return 3; } function C_init634(integer this145) { } function new_C127() returns integer { local integer this556 this_556 = alloc_C171(); construct_C208(this_556); return this_556; } function construct_C208(integer this202) { C_init634(this_202); } function alloc_B121() returns integer { local integer this531 if (I_firstFree_360 == 0) { if (I_maxIndex_751 < 32768) { I_maxIndex_751 = (I_maxIndex_751 + 1); this_531 = I_maxIndex_751; I_typeId_746[this_531] = 2; } else { error140("Out of memory: Could not create B."); this_531 = 0; }; } else { I_firstFree_360 = (I_firstFree_360 - 1); this_531 = I_nextFree_199[I_firstFree_360]; I_typeId_746[this_531] = 2; }; return this_531; } function error140(string msg674) { $debugPrint163((msg_674 + (" " + #getStackTrace()))); } function alloc_C171() returns integer { local integer this993 if (I_firstFree_360 == 0) { if (I_maxIndex_751 < 32768) { I_maxIndex_751 = (I_maxIndex_751 + 1); this_993 = I_maxIndex_751; I_typeId_746[this_993] = 3; } else { error140("Out of memory: Could not create C."); this_993 = 0; }; } else { I_firstFree_360 = (I_firstFree_360 - 1); this_993 = I_nextFree_199[I_firstFree_360]; I_typeId_746[this_993] = 3; }; return this_993; } function dispatch_I_test_I_foo171(integer this157) returns integer { if (I_typeId_746[this_157] == 0) { if (this_157 == 0) { error140("Nullpointer exception when calling I.foo"); } else { error140("Called I.foo on invalid object."); }; } else { }; if (I_typeId_746[this_157] <= 2) { this_157 = B_foo770(this_157); } else { this_157 = C_foo209(this_157); }; return this_157; }