array A_nextFree196 integer A_firstFree129 integer A_maxIndex109 array A_typeId860 array B_nextFree607 integer B_firstFree524 integer B_maxIndex611 array B_typeId157 integer A_firstFree129 = 0 integer A_maxIndex109 = 0 integer B_firstFree524 = 0 integer B_maxIndex611 = 0 function initGlobals662() { } function main106() { initGlobals662(); init_test442(); } function config195() { } function init_test442() { local integer this883 this_883 = new_A932(); if (A_typeId_860[this_883] == 0) { if (this_883 == 0) { error150("Nullpointer exception when calling A.bar"); } else { error150("Called A.bar on invalid object."); }; } else { }; this_883 = A_M_bar554(this_883); if (this_883 == 42) { testSuccess212(); } else { }; } IS_NATIVE function testSuccess212() { } function A_M_bar554(integer this974) returns integer { this_974 = new_B202(); if (B_typeId_157[this_974] == 0) { if (this_974 == 0) { error150("Nullpointer exception when calling B.foo"); } else { error150("Called B.foo on invalid object."); }; } else { }; return 42; } function new_A932() returns integer { local integer this124 if (A_firstFree_129 == 0) { if (A_maxIndex_109 < 32768) { A_maxIndex_109 = (A_maxIndex_109 + 1); this_124 = A_maxIndex_109; A_typeId_860[this_124] = 1; } else { error150("Out of memory: Could not create A."); this_124 = 0; }; } else { A_firstFree_129 = (A_firstFree_129 - 1); this_124 = A_nextFree_196[A_firstFree_129]; A_typeId_860[this_124] = 1; }; return this_124; } function new_B202() returns integer { local integer this156 if (B_firstFree_524 == 0) { if (B_maxIndex_611 < 32768) { B_maxIndex_611 = (B_maxIndex_611 + 1); this_156 = B_maxIndex_611; B_typeId_157[this_156] = 2; } else { error150("Out of memory: Could not create B."); this_156 = 0; }; } else { B_firstFree_524 = (B_firstFree_524 - 1); this_156 = B_nextFree_607[B_firstFree_524]; B_typeId_157[this_156] = 2; }; return this_156; } function error150(string msg808) { $debugPrint157((msg_808 + (" " + #getStackTrace()))); }