array A_nextFree143 integer A_firstFree880 integer A_maxIndex173 array A_typeId181 array B_nextFree872 integer B_firstFree965 integer B_maxIndex120 array B_typeId204 integer A_firstFree880 = 0 integer A_maxIndex173 = 0 integer B_firstFree965 = 0 integer B_maxIndex120 = 0 function initGlobals164() { } function main456() { initGlobals164(); init_test113(); } function config207() { } function init_test113() { local integer this158 this_158 = new_A126(); if (A_typeId_181[this_158] == 0) { if (this_158 == 0) { error178("Nullpointer exception when calling A.bar"); } else { error178("Called A.bar on invalid object."); }; } else { }; this_158 = A_bar153(this_158); if (this_158 == 42) { testSuccess497(); } else { }; } IS_NATIVE function testSuccess497() { } function A_bar153(integer this109) returns integer { this_109 = new_B706(); if (B_typeId_204[this_109] == 0) { if (this_109 == 0) { error178("Nullpointer exception when calling B.foo"); } else { error178("Called B.foo on invalid object."); }; } else { }; return 42; } function new_A126() returns integer { local integer this110 if (A_firstFree_880 == 0) { if (A_maxIndex_173 < 32768) { A_maxIndex_173 = (A_maxIndex_173 + 1); this_110 = A_maxIndex_173; A_typeId_181[this_110] = 1; } else { error178("Out of memory: Could not create A."); this_110 = 0; }; } else { A_firstFree_880 = (A_firstFree_880 - 1); this_110 = A_nextFree_143[A_firstFree_880]; A_typeId_181[this_110] = 1; }; return this_110; } function new_B706() returns integer { local integer this690 if (B_firstFree_965 == 0) { if (B_maxIndex_120 < 32768) { B_maxIndex_120 = (B_maxIndex_120 + 1); this_690 = B_maxIndex_120; B_typeId_204[this_690] = 2; } else { error178("Out of memory: Could not create B."); this_690 = 0; }; } else { B_firstFree_965 = (B_firstFree_965 - 1); this_690 = B_nextFree_872[B_firstFree_965]; B_typeId_204[this_690] = 2; }; return this_690; } function error178(string msg171) { $debugPrint158((msg_171 + (" " + #getStackTrace()))); }