array A_nextFree130 integer A_firstFree186 integer A_maxIndex432 array A_typeId208 array B_nextFree145 integer B_firstFree697 integer B_maxIndex193 array B_typeId114 integer A_firstFree186 = 0 integer A_maxIndex432 = 0 integer B_firstFree697 = 0 integer B_maxIndex193 = 0 function initGlobals206() { } function main144() { initGlobals206(); init_test173(); } function config211() { } function init_test173() { local integer this697 this_697 = new_A408(); if (A_typeId_208[this_697] == 0) { if (this_697 == 0) { error163("Nullpointer exception when calling A.bar"); } else { error163("Called A.bar on invalid object."); }; } else { }; this_697 = A_bar257(this_697); if (this_697 == 42) { testSuccess114(); } else { }; } IS_NATIVE function testSuccess114() { } function A_bar257(integer this192) returns integer { this_192 = new_B451(); if (B_typeId_114[this_192] == 0) { if (this_192 == 0) { error163("Nullpointer exception when calling B.foo"); } else { error163("Called B.foo on invalid object."); }; } else { }; return 42; } function new_A408() returns integer { local integer this597 if (A_firstFree_186 == 0) { if (A_maxIndex_432 < 32768) { A_maxIndex_432 = (A_maxIndex_432 + 1); this_597 = A_maxIndex_432; A_typeId_208[this_597] = 1; } else { error163("Out of memory: Could not create A."); this_597 = 0; }; } else { A_firstFree_186 = (A_firstFree_186 - 1); this_597 = A_nextFree_130[A_firstFree_186]; A_typeId_208[this_597] = 1; }; return this_597; } function new_B451() returns integer { local integer this175 if (B_firstFree_697 == 0) { if (B_maxIndex_193 < 32768) { B_maxIndex_193 = (B_maxIndex_193 + 1); this_175 = B_maxIndex_193; B_typeId_114[this_175] = 2; } else { error163("Out of memory: Could not create B."); this_175 = 0; }; } else { B_firstFree_697 = (B_firstFree_697 - 1); this_175 = B_nextFree_145[B_firstFree_697]; B_typeId_114[this_175] = 2; }; return this_175; } function error163(string msg637) { $debugPrint183((msg_637 + (" " + #getStackTrace()))); }