array A_nextFree196 integer A_firstFree146 integer A_maxIndex207 array A_typeId380 integer A_firstFree146 = 0 integer A_maxIndex207 = 0 function initGlobals654() { } function main213() { initGlobals654(); init_test593(); } function config473() { } function init_test593() { local integer a205 a_205 = new_C11562(); if (dispatch_A_test_A_foo760(a_205) != 9) { testFail171("c11"); } else { }; a_205 = new_B11117(); if (dispatch_A_test_A_foo760(a_205) != 8) { testFail171("b11"); } else { }; a_205 = new_C156(); if (dispatch_A_test_A_foo760(a_205) != 9) { testFail171("C"); } else { }; a_205 = new_A161(); if (dispatch_A_test_A_foo760(a_205) != 7) { testFail171("A"); } else { }; testSuccess149(); } IS_NATIVE function testFail171(string msg101) { } IS_NATIVE function testSuccess149() { } function A_foo522(integer this173) returns integer { return 7; } function A_init430(integer this585) { } function new_A161() returns integer { local integer this183 this_183 = alloc_A462(); construct_A478(this_183); return this_183; } function construct_A478(integer this102) { A_init430(this_102); } function B_foo287(integer this632) returns integer { return 8; } function B_init105(integer this149) { } function construct_B668(integer this171) { construct_A478(this_171); B_init105(this_171); } function B1_init262(integer this183) { } function construct_B1549(integer this141) { construct_B668(this_141); B1_init262(this_141); } function B11_init739(integer this168) { } function new_B11117() returns integer { local integer this988 this_988 = alloc_B11197(); construct_B11201(this_988); return this_988; } function construct_B11201(integer this853) { construct_B1549(this_853); B11_init739(this_853); } function C_foo160(integer this560) returns integer { return 9; } function C_init342(integer this246) { } function new_C156() returns integer { local integer this676 this_676 = alloc_C692(); construct_C376(this_676); return this_676; } function construct_C376(integer this152) { construct_A478(this_152); C_init342(this_152); } function C1_init824(integer this473) { } function construct_C1117(integer this178) { construct_C376(this_178); C1_init824(this_178); } function C11_init132(integer this779) { } function new_C11562() returns integer { local integer this524 this_524 = alloc_C11173(); construct_C11213(this_524); return this_524; } function construct_C11213(integer this118) { construct_C1117(this_118); C11_init132(this_118); } function alloc_A462() returns integer { local integer this140 if (A_firstFree_146 == 0) { if (A_maxIndex_207 < 32768) { A_maxIndex_207 = (A_maxIndex_207 + 1); this_140 = A_maxIndex_207; A_typeId_380[this_140] = 1; } else { error980("Out of memory: Could not create A."); this_140 = 0; }; } else { A_firstFree_146 = (A_firstFree_146 - 1); this_140 = A_nextFree_196[A_firstFree_146]; A_typeId_380[this_140] = 1; }; return this_140; } function error980(string msg355) { $debugPrint118((msg_355 + (" " + #getStackTrace()))); } function alloc_B11197() returns integer { local integer this209 if (A_firstFree_146 == 0) { if (A_maxIndex_207 < 32768) { A_maxIndex_207 = (A_maxIndex_207 + 1); this_209 = A_maxIndex_207; A_typeId_380[this_209] = 4; } else { error980("Out of memory: Could not create B11."); this_209 = 0; }; } else { A_firstFree_146 = (A_firstFree_146 - 1); this_209 = A_nextFree_196[A_firstFree_146]; A_typeId_380[this_209] = 4; }; return this_209; } function alloc_C692() returns integer { local integer this102 if (A_firstFree_146 == 0) { if (A_maxIndex_207 < 32768) { A_maxIndex_207 = (A_maxIndex_207 + 1); this_102 = A_maxIndex_207; A_typeId_380[this_102] = 7; } else { error980("Out of memory: Could not create C."); this_102 = 0; }; } else { A_firstFree_146 = (A_firstFree_146 - 1); this_102 = A_nextFree_196[A_firstFree_146]; A_typeId_380[this_102] = 7; }; return this_102; } function alloc_C11173() returns integer { local integer this201 if (A_firstFree_146 == 0) { if (A_maxIndex_207 < 32768) { A_maxIndex_207 = (A_maxIndex_207 + 1); this_201 = A_maxIndex_207; A_typeId_380[this_201] = 9; } else { error980("Out of memory: Could not create C11."); this_201 = 0; }; } else { A_firstFree_146 = (A_firstFree_146 - 1); this_201 = A_nextFree_196[A_firstFree_146]; A_typeId_380[this_201] = 9; }; return this_201; } function dispatch_A_test_A_foo760(integer this895) returns integer { if (A_typeId_380[this_895] == 0) { if (this_895 == 0) { error980("Nullpointer exception when calling A.foo"); } else { error980("Called A.foo on invalid object."); }; } else { }; if (A_typeId_380[this_895] <= 6) { if (A_typeId_380[this_895] <= 1) { this_895 = A_foo522(this_895); } else { this_895 = B_foo287(this_895); }; } else { this_895 = C_foo160(this_895); }; return this_895; }