array A_nextFree186 integer A_firstFree103 integer A_maxIndex504 array A_typeId132 array A_M_i392 integer A_firstFree103 = 0 integer A_maxIndex504 = 0 function initGlobals165() { A_firstFree_103 = 0; A_maxIndex_504 = 0; } function main188() { initGlobals165(); init_Test115(); } function config126() { } function init_Test115() { local integer b187 local integer a498 b_187 = new_B505(); a_498 = b_187; dispatch_A_Test_A_f107(a_498); dispatch_B_Test_B_g184(b_187); if (A_M_i_392[a_498] != 5) { testFail749("foo"); } else { }; testSuccess148(); } IS_NATIVE function testFail749(string message195) { } IS_NATIVE function testSuccess148() { } function A_f153(integer this175) { A_M_i_392[this_175] = (A_M_i_392[this_175] + 1); A_M_i_392[this_175] = (A_M_i_392[this_175] + 1); } function A_init628(integer this725) { A_M_i_392[this_725] = 0; construct_A_M213(this_725); } function construct_A_M213(integer this136) { } function construct_A188(integer this188) { A_init628(this_188); } function B_g409(integer this613) { A_M_i_392[this_613] = (A_M_i_392[this_613] + 1); A_M_i_392[this_613] = (A_M_i_392[this_613] + 1); A_M_i_392[this_613] = (A_M_i_392[this_613] + 1); } function B_init488(integer this451) { } function new_B505() returns integer { local integer this110 this_110 = alloc_B980(); construct_B106(this_110); return this_110; } function construct_B106(integer this550) { construct_A188(this_550); B_init488(this_550); } function error102(string msg198) { $debugPrint555((msg_198 + (" " + #getStackTrace()))); } function alloc_B980() returns integer { local integer this147 if (A_firstFree_103 == 0) { if (A_maxIndex_504 < 32768) { A_maxIndex_504 = (A_maxIndex_504 + 1); this_147 = A_maxIndex_504; A_typeId_132[this_147] = 2; } else { error102("Out of memory: Could not create B."); this_147 = 0; }; } else { A_firstFree_103 = (A_firstFree_103 - 1); this_147 = A_nextFree_186[A_firstFree_103]; A_typeId_132[this_147] = 2; }; return this_147; } function dispatch_A_Test_A_f107(integer this464) { if (A_typeId_132[this_464] == 0) { if (this_464 == 0) { error102("Nullpointer exception when calling A.f"); } else { error102("Called A.f on invalid object."); }; } else { }; A_f153(this_464); } function dispatch_B_Test_B_g184(integer this185) { if (A_typeId_132[this_185] == 0) { if (this_185 == 0) { error102("Nullpointer exception when calling B.g"); } else { error102("Called B.g on invalid object."); }; } else { }; B_g409(this_185); }