array I_nextFree106 integer I_firstFree223 integer I_maxIndex692 array I_typeId172 integer I_firstFree223 = 0 integer I_maxIndex692 = 0 function initGlobals145() { I_firstFree_223 = 0; I_maxIndex_692 = 0; } function main726() { initGlobals145(); init_test146(); } function config183() { } function init_test146() { local integer b162 local integer c822 local integer d647 b_162 = new_B109(); c_822 = new_C475(); d_647 = new_D108(); if (((dispatch_B_test_B_foo213(b_162) == 2) and (dispatch_I_test_I_foo221(c_822) == 5)) and (dispatch_I_test_I_foo221(d_647) == 3)) { testSuccess740(); } else { }; } IS_NATIVE function testSuccess740() { } function B_foo102(integer this470) returns integer { return 2; } function B_init174(integer this321) { } function new_B109() returns integer { local integer this192 this_192 = alloc_B261(); construct_B582(this_192); return this_192; } function construct_B582(integer this126) { B_init174(this_126); } function C_init315(integer this138) { } function new_C475() returns integer { local integer this785 this_785 = alloc_C167(); construct_C213(this_785); return this_785; } function construct_C213(integer this666) { C_init315(this_666); } function D_bar195(integer this133) returns integer { return 3; } function D_init152(integer this253) { } function new_D108() returns integer { local integer this640 this_640 = alloc_D116(); construct_D608(this_640); return this_640; } function construct_D608(integer this319) { D_init152(this_319); } function I_foo131(integer this102) returns integer { return dispatch_I_test_I_bar830(this_102); } function I_bar195(integer this205) returns integer { return 5; } function alloc_B261() returns integer { local integer this769 if (I_firstFree_223 == 0) { if (I_maxIndex_692 < 32768) { I_maxIndex_692 = (I_maxIndex_692 + 1); this_769 = I_maxIndex_692; I_typeId_172[this_769] = 2; } else { error162("Out of memory: Could not create B."); this_769 = 0; }; } else { I_firstFree_223 = (I_firstFree_223 - 1); this_769 = I_nextFree_106[I_firstFree_223]; I_typeId_172[this_769] = 2; }; return this_769; } function error162(string msg105) { $debugPrint656((msg_105 + (" " + #getStackTrace()))); } function alloc_C167() returns integer { local integer this172 if (I_firstFree_223 == 0) { if (I_maxIndex_692 < 32768) { I_maxIndex_692 = (I_maxIndex_692 + 1); this_172 = I_maxIndex_692; I_typeId_172[this_172] = 3; } else { error162("Out of memory: Could not create C."); this_172 = 0; }; } else { I_firstFree_223 = (I_firstFree_223 - 1); this_172 = I_nextFree_106[I_firstFree_223]; I_typeId_172[this_172] = 3; }; return this_172; } function alloc_D116() returns integer { local integer this123 if (I_firstFree_223 == 0) { if (I_maxIndex_692 < 32768) { I_maxIndex_692 = (I_maxIndex_692 + 1); this_123 = I_maxIndex_692; I_typeId_172[this_123] = 4; } else { error162("Out of memory: Could not create D."); this_123 = 0; }; } else { I_firstFree_223 = (I_firstFree_223 - 1); this_123 = I_nextFree_106[I_firstFree_223]; I_typeId_172[this_123] = 4; }; return this_123; } function dispatch_B_test_B_foo213(integer this194) returns integer { local integer test_B_foo_result443 if (I_typeId_172[this_194] == 0) { if (this_194 == 0) { error162("Nullpointer exception when calling B.foo"); } else { error162("Called B.foo on invalid object."); }; } else { }; test_B_foo_result_443 = B_foo102(this_194); return test_B_foo_result_443; } function dispatch_I_test_I_foo221(integer this124) returns integer { local integer test_I_foo_result295 if (I_typeId_172[this_124] == 0) { if (this_124 == 0) { error162("Nullpointer exception when calling I.foo"); } else { error162("Called I.foo on invalid object."); }; } else { }; if (I_typeId_172[this_124] <= 2) { if (I_typeId_172[this_124] <= 1) { test_I_foo_result_295 = I_foo131(this_124); } else { test_I_foo_result_295 = B_foo102(this_124); }; } else { test_I_foo_result_295 = I_foo131(this_124); }; return test_I_foo_result_295; } function dispatch_I_test_I_bar830(integer this122) returns integer { local integer test_I_bar_result916 if (I_typeId_172[this_122] == 0) { if (this_122 == 0) { error162("Nullpointer exception when calling I.bar"); } else { error162("Called I.bar on invalid object."); }; } else { }; if (I_typeId_172[this_122] <= 3) { test_I_bar_result_916 = I_bar195(this_122); } else { test_I_bar_result_916 = D_bar195(this_122); }; return test_I_bar_result_916; }