array test_ar690 array I_nextFree135 integer I_firstFree500 integer I_maxIndex200 array I_typeId569 integer I_firstFree500 = 0 integer I_maxIndex200 = 0 function initGlobals204() { I_firstFree_500 = 0; I_maxIndex_200 = 0; } function main191() { initGlobals204(); init_test558(); } function config184() { } function init_test558() { local integer temp122 test_ar_690[5] = new_B118(); test_ar_690[6] = new_C742(); temp_122 = test_ar_690[6]; test_ar_690[6] = test_ar_690[5]; test_ar_690[5] = temp_122; if ((dispatch_I_test_I_foo104(test_ar_690[5]) == 3) and (dispatch_I_test_I_foo104(test_ar_690[6]) == 2)) { testSuccess157(); } else { }; } IS_NATIVE function testSuccess157() { } function B_foo156(integer this150) returns integer { return 2; } function B_init298(integer this190) { } function new_B118() returns integer { local integer this108 this_108 = alloc_B177(); construct_B158(this_108); return this_108; } function construct_B158(integer this162) { B_init298(this_162); } function C_foo111(integer this116) returns integer { return 3; } function C_init310(integer this704) { } function new_C742() returns integer { local integer this194 this_194 = alloc_C994(); construct_C725(this_194); return this_194; } function construct_C725(integer this203) { C_init310(this_203); } function alloc_B177() returns integer { local integer this171 if (I_firstFree_500 == 0) { if (I_maxIndex_200 < 32768) { I_maxIndex_200 = (I_maxIndex_200 + 1); this_171 = I_maxIndex_200; I_typeId_569[this_171] = 2; } else { error139("Out of memory: Could not create B."); this_171 = 0; }; } else { I_firstFree_500 = (I_firstFree_500 - 1); this_171 = I_nextFree_135[I_firstFree_500]; I_typeId_569[this_171] = 2; }; return this_171; } function error139(string msg148) { $debugPrint211((msg_148 + (" " + #getStackTrace()))); } function alloc_C994() returns integer { local integer this458 if (I_firstFree_500 == 0) { if (I_maxIndex_200 < 32768) { I_maxIndex_200 = (I_maxIndex_200 + 1); this_458 = I_maxIndex_200; I_typeId_569[this_458] = 3; } else { error139("Out of memory: Could not create C."); this_458 = 0; }; } else { I_firstFree_500 = (I_firstFree_500 - 1); this_458 = I_nextFree_135[I_firstFree_500]; I_typeId_569[this_458] = 3; }; return this_458; } function dispatch_I_test_I_foo104(integer this128) returns integer { local integer test_I_foo_result162 if (I_typeId_569[this_128] == 0) { if (this_128 == 0) { error139("Nullpointer exception when calling I.foo"); } else { error139("Called I.foo on invalid object."); }; } else { }; if (I_typeId_569[this_128] <= 2) { test_I_foo_result_162 = B_foo156(this_128); } else { test_I_foo_result_162 = C_foo111(this_128); }; return test_I_foo_result_162; }