array I_nextFree102 integer I_firstFree425 integer I_maxIndex900 array I_typeId960 integer I_firstFree425 = 0 integer I_maxIndex900 = 0 function initGlobals201() { } function main164() { initGlobals201(); init_test189(); } function config144() { } function init_test189() { local integer c1201 local integer c2441 c1_201 = new_C106(); c2_441 = new_D150(); if ((dispatch_B_test1_B_foo160(c1_201) == 2) and (dispatch_B_test1_B_foo160(c2_441) == 2)) { testSuccess514(); } else { }; } IS_NATIVE function testSuccess514() { } function B_foo156(integer this529) returns integer { return 2; } function B_init243(integer this238) { } function construct_B818(integer this157) { B_init243(this_157); } function C_init184(integer this742) { } function new_C106() returns integer { local integer this240 this_240 = alloc_C281(); construct_C966(this_240); return this_240; } function construct_C966(integer this173) { construct_B818(this_173); C_init184(this_173); } function D_init147(integer this129) { } function new_D150() returns integer { local integer this746 this_746 = alloc_D203(); construct_D426(this_746); return this_746; } function construct_D426(integer this170) { construct_C966(this_170); D_init147(this_170); } function error174(string msg138) { $debugPrint999((msg_138 + (" " + #getStackTrace()))); } function alloc_C281() returns integer { local integer this264 if (I_firstFree_425 == 0) { if (I_maxIndex_900 < 32768) { I_maxIndex_900 = (I_maxIndex_900 + 1); this_264 = I_maxIndex_900; I_typeId_960[this_264] = 3; } else { error174("Out of memory: Could not create C."); this_264 = 0; }; } else { I_firstFree_425 = (I_firstFree_425 - 1); this_264 = I_nextFree_102[I_firstFree_425]; I_typeId_960[this_264] = 3; }; return this_264; } function alloc_D203() returns integer { local integer this211 if (I_firstFree_425 == 0) { if (I_maxIndex_900 < 32768) { I_maxIndex_900 = (I_maxIndex_900 + 1); this_211 = I_maxIndex_900; I_typeId_960[this_211] = 4; } else { error174("Out of memory: Could not create D."); this_211 = 0; }; } else { I_firstFree_425 = (I_firstFree_425 - 1); this_211 = I_nextFree_102[I_firstFree_425]; I_typeId_960[this_211] = 4; }; return this_211; } function dispatch_B_test1_B_foo160(integer this375) returns integer { if (I_typeId_960[this_375] == 0) { if (this_375 == 0) { error174("Nullpointer exception when calling B.foo"); } else { error174("Called B.foo on invalid object."); }; } else { }; return B_foo156(this_375); }