array A_nextFree134 integer A_firstFree614 integer A_maxIndex127 array A_typeId618 array B_nextFree159 integer B_firstFree206 integer B_maxIndex425 array B_typeId413 integer A_firstFree614 = 0 integer A_maxIndex127 = 0 integer B_firstFree206 = 0 integer B_maxIndex425 = 0 function initGlobals196() { } function main113() { initGlobals196(); init_test151(); } function config146() { } function init_test151() { local integer this128 this_128 = new_A939(); if (A_typeId_618[this_128] == 0) { if (this_128 == 0) { error188("Nullpointer exception when calling A.bar"); } else { error188("Called A.bar on invalid object."); }; } else { }; this_128 = A_bar186(this_128); if (this_128 == 42) { testSuccess566(); } else { }; } IS_NATIVE function testSuccess566() { } function A_bar186(integer this183) returns integer { this_183 = new_B462(); if (B_typeId_413[this_183] == 0) { if (this_183 == 0) { error188("Nullpointer exception when calling B.foo"); } else { error188("Called B.foo on invalid object."); }; } else { }; return 42; } function new_A939() returns integer { local integer this201 if (A_firstFree_614 == 0) { if (A_maxIndex_127 < 32768) { A_maxIndex_127 = (A_maxIndex_127 + 1); this_201 = A_maxIndex_127; A_typeId_618[this_201] = 1; } else { error188("Out of memory: Could not create A."); this_201 = 0; }; } else { A_firstFree_614 = (A_firstFree_614 - 1); this_201 = A_nextFree_134[A_firstFree_614]; A_typeId_618[this_201] = 1; }; return this_201; } function new_B462() returns integer { local integer this203 if (B_firstFree_206 == 0) { if (B_maxIndex_425 < 32768) { B_maxIndex_425 = (B_maxIndex_425 + 1); this_203 = B_maxIndex_425; B_typeId_413[this_203] = 2; } else { error188("Out of memory: Could not create B."); this_203 = 0; }; } else { B_firstFree_206 = (B_firstFree_206 - 1); this_203 = B_nextFree_159[B_firstFree_206]; B_typeId_413[this_203] = 2; }; return this_203; } function error188(string msg352) { $debugPrint319((msg_352 + (" " + #getStackTrace()))); }