array A_nextFree837 integer A_firstFree181 integer A_maxIndex324 array A_typeId175 array A_M_i160 integer A_firstFree181 = 0 integer A_maxIndex324 = 0 function initGlobals990() { } function main403() { initGlobals990(); init_Test277(); } function config175() { } function init_Test277() { local integer b111 local integer a525 b_111 = new_B822(); a_525 = b_111; dispatch_A_Test_A_f113(a_525); dispatch_B_Test_B_g749(b_111); if (A_M_i_160[a_525] != 5) { testFail212("foo"); } else { }; testSuccess165(); } IS_NATIVE function testFail212(string message272) { } IS_NATIVE function testSuccess165() { } function new_B822() returns integer { local integer this167 local integer this114 local integer this179 local integer this793 local integer this640 if (A_firstFree_181 == 0) { if (A_maxIndex_324 < 32768) { A_maxIndex_324 = (A_maxIndex_324 + 1); this_114 = A_maxIndex_324; A_typeId_175[this_114] = 2; } else { error158("Out of memory: Could not create B."); this_114 = 0; }; } else { A_firstFree_181 = (A_firstFree_181 - 1); this_114 = A_nextFree_837[A_firstFree_181]; A_typeId_175[this_114] = 2; }; this_167 = this_114; this_179 = this_167; this_793 = this_179; this_640 = this_793; A_M_i_160[this_640] = 0; return this_167; } function error158(string msg133) { $debugPrint198((msg_133 + (" " + #getStackTrace()))); } function dispatch_A_Test_A_f113(integer this121) { local integer this160 if (A_typeId_175[this_121] == 0) { if (this_121 == 0) { error158("Nullpointer exception when calling A.f"); } else { error158("Called A.f on invalid object."); }; } else { }; this_160 = this_121; A_M_i_160[this_160] = (A_M_i_160[this_160] + 1); A_M_i_160[this_160] = (A_M_i_160[this_160] + 1); } function dispatch_B_Test_B_g749(integer this923) { local integer this156 if (A_typeId_175[this_923] == 0) { if (this_923 == 0) { error158("Nullpointer exception when calling B.g"); } else { error158("Called B.g on invalid object."); }; } else { }; this_156 = this_923; A_M_i_160[this_156] = (A_M_i_160[this_156] + 1); A_M_i_160[this_156] = (A_M_i_160[this_156] + 1); A_M_i_160[this_156] = (A_M_i_160[this_156] + 1); }