array A_nextFree724 integer A_firstFree760 integer A_maxIndex137 array A_typeId253 array B_nextFree151 integer B_firstFree604 integer B_maxIndex365 array B_typeId180 integer A_firstFree760 = 0 integer A_maxIndex137 = 0 integer B_firstFree604 = 0 integer B_maxIndex365 = 0 function initGlobals156() { } function main114() { initGlobals156(); init_test256(); } function config894() { } function init_test256() { local integer i637 local integer this163 local integer test_A_bar_result523 this_163 = new_A944(); if (A_typeId_253[this_163] == 0) { if (this_163 == 0) { error171("Nullpointer exception when calling A.bar"); } else { error171("Called A.bar on invalid object."); }; } else { }; test_A_bar_result_523 = A_bar148(this_163); i_637 = test_A_bar_result_523; if (i_637 == 42) { testSuccess170(); } else { }; } IS_NATIVE function testSuccess170() { } function A_bar148(integer this129) returns integer { local integer b788 local integer this581 local integer test_A_B_foo_result126 b_788 = new_B464(); this_581 = b_788; if (B_typeId_180[this_581] == 0) { if (this_581 == 0) { error171("Nullpointer exception when calling B.foo"); } else { error171("Called B.foo on invalid object."); }; } else { }; test_A_B_foo_result_126 = 4; return ((test_A_B_foo_result_126 * 10) + 2); } function new_A944() returns integer { local integer this149 local integer this148 if (A_firstFree_760 == 0) { if (A_maxIndex_137 < 32768) { A_maxIndex_137 = (A_maxIndex_137 + 1); this_148 = A_maxIndex_137; A_typeId_253[this_148] = 1; } else { error171("Out of memory: Could not create A."); this_148 = 0; }; } else { A_firstFree_760 = (A_firstFree_760 - 1); this_148 = A_nextFree_724[A_firstFree_760]; A_typeId_253[this_148] = 1; }; this_149 = this_148; return this_149; } function new_B464() returns integer { local integer this162 local integer this165 if (B_firstFree_604 == 0) { if (B_maxIndex_365 < 32768) { B_maxIndex_365 = (B_maxIndex_365 + 1); this_165 = B_maxIndex_365; B_typeId_180[this_165] = 2; } else { error171("Out of memory: Could not create B."); this_165 = 0; }; } else { B_firstFree_604 = (B_firstFree_604 - 1); this_165 = B_nextFree_151[B_firstFree_604]; B_typeId_180[this_165] = 2; }; this_162 = this_165; return this_162; } function error171(string msg938) { $debugPrint108((msg_938 + (" " + #getStackTrace()))); }