array A_nextFree597 integer A_firstFree437 integer A_maxIndex214 array A_typeId213 array B_nextFree150 integer B_firstFree885 integer B_maxIndex194 array B_typeId135 integer A_firstFree437 = 0 integer A_maxIndex214 = 0 integer B_firstFree885 = 0 integer B_maxIndex194 = 0 function initGlobals122() { } function main103() { initGlobals122(); init_test120(); } function config175() { } function init_test120() { local integer i283 local integer this101 local integer test_A_bar_result592 this_101 = new_A186(); if (A_typeId_213[this_101] == 0) { if (this_101 == 0) { error283("Nullpointer exception when calling A.bar"); } else { error283("Called A.bar on invalid object."); }; } else { }; test_A_bar_result_592 = A_bar262(this_101); i_283 = test_A_bar_result_592; if (i_283 == 42) { testSuccess525(); } else { }; } IS_NATIVE function testSuccess525() { } function A_bar262(integer this212) returns integer { local integer b723 local integer this128 local integer test_A_B_foo_result813 b_723 = new_B110(); this_128 = b_723; if (B_typeId_135[this_128] == 0) { if (this_128 == 0) { error283("Nullpointer exception when calling B.foo"); } else { error283("Called B.foo on invalid object."); }; } else { }; test_A_B_foo_result_813 = 4; return ((test_A_B_foo_result_813 * 10) + 2); } function new_A186() returns integer { local integer this112 local integer this299 if (A_firstFree_437 == 0) { if (A_maxIndex_214 < 32768) { A_maxIndex_214 = (A_maxIndex_214 + 1); this_299 = A_maxIndex_214; A_typeId_213[this_299] = 1; } else { error283("Out of memory: Could not create A."); this_299 = 0; }; } else { A_firstFree_437 = (A_firstFree_437 - 1); this_299 = A_nextFree_597[A_firstFree_437]; A_typeId_213[this_299] = 1; }; this_112 = this_299; return this_112; } function new_B110() returns integer { local integer this143 local integer this596 if (B_firstFree_885 == 0) { if (B_maxIndex_194 < 32768) { B_maxIndex_194 = (B_maxIndex_194 + 1); this_596 = B_maxIndex_194; B_typeId_135[this_596] = 2; } else { error283("Out of memory: Could not create B."); this_596 = 0; }; } else { B_firstFree_885 = (B_firstFree_885 - 1); this_596 = B_nextFree_150[B_firstFree_885]; B_typeId_135[this_596] = 2; }; this_143 = this_596; return this_143; } function error283(string msg324) { $debugPrint566((msg_324 + (" " + #getStackTrace()))); }