array I_nextFree918 integer I_firstFree261 integer I_maxIndex171 array I_typeId139 integer I_firstFree261 = 0 integer I_maxIndex171 = 0 function initGlobals822() { } function main118() { initGlobals822(); init_test628(); } function config471() { } function init_test628() { local integer b115 local integer c142 local integer d117 b_115 = new_B645(); c_142 = new_C763(); d_117 = new_D829(); if (((dispatch_B_test_B_foo573(b_115) == 2) and (dispatch_I_test_I_foo377(c_142) == 5)) and (dispatch_I_test_I_foo377(d_117) == 3)) { testSuccess205(); } else { }; } IS_NATIVE function testSuccess205() { } function B_foo165(integer this138) returns integer { return 2; } function B_init212(integer this168) { } function new_B645() returns integer { local integer this558 this_558 = alloc_B149(); construct_B161(this_558); return this_558; } function construct_B161(integer this801) { B_init212(this_801); } function C_init140(integer this345) { } function new_C763() returns integer { local integer this164 this_164 = alloc_C190(); construct_C168(this_164); return this_164; } function construct_C168(integer this195) { C_init140(this_195); } function D_bar169(integer this101) returns integer { return 3; } function D_init204(integer this142) { } function new_D829() returns integer { local integer this121 this_121 = alloc_D653(); construct_D205(this_121); return this_121; } function construct_D205(integer this124) { D_init204(this_124); } function I_foo147(integer this295) returns integer { return dispatch_I_test_I_bar205(this_295); } function I_bar178(integer this975) returns integer { return 5; } function alloc_B149() returns integer { local integer this127 if (I_firstFree_261 == 0) { if (I_maxIndex_171 < 32768) { I_maxIndex_171 = (I_maxIndex_171 + 1); this_127 = I_maxIndex_171; I_typeId_139[this_127] = 2; } else { error191("Out of memory: Could not create B."); this_127 = 0; }; } else { I_firstFree_261 = (I_firstFree_261 - 1); this_127 = I_nextFree_918[I_firstFree_261]; I_typeId_139[this_127] = 2; }; return this_127; } function error191(string msg102) { $debugPrint142((msg_102 + (" " + #getStackTrace()))); } function alloc_C190() returns integer { local integer this673 if (I_firstFree_261 == 0) { if (I_maxIndex_171 < 32768) { I_maxIndex_171 = (I_maxIndex_171 + 1); this_673 = I_maxIndex_171; I_typeId_139[this_673] = 3; } else { error191("Out of memory: Could not create C."); this_673 = 0; }; } else { I_firstFree_261 = (I_firstFree_261 - 1); this_673 = I_nextFree_918[I_firstFree_261]; I_typeId_139[this_673] = 3; }; return this_673; } function alloc_D653() returns integer { local integer this536 if (I_firstFree_261 == 0) { if (I_maxIndex_171 < 32768) { I_maxIndex_171 = (I_maxIndex_171 + 1); this_536 = I_maxIndex_171; I_typeId_139[this_536] = 4; } else { error191("Out of memory: Could not create D."); this_536 = 0; }; } else { I_firstFree_261 = (I_firstFree_261 - 1); this_536 = I_nextFree_918[I_firstFree_261]; I_typeId_139[this_536] = 4; }; return this_536; } function dispatch_B_test_B_foo573(integer this316) returns integer { if (I_typeId_139[this_316] == 0) { if (this_316 == 0) { error191("Nullpointer exception when calling B.foo"); } else { error191("Called B.foo on invalid object."); }; } else { }; return B_foo165(this_316); } function dispatch_I_test_I_foo377(integer this139) returns integer { if (I_typeId_139[this_139] == 0) { if (this_139 == 0) { error191("Nullpointer exception when calling I.foo"); } else { error191("Called I.foo on invalid object."); }; } else { }; if (I_typeId_139[this_139] <= 2) { if (I_typeId_139[this_139] <= 1) { this_139 = I_foo147(this_139); } else { this_139 = B_foo165(this_139); }; } else { this_139 = I_foo147(this_139); }; return this_139; } function dispatch_I_test_I_bar205(integer this153) returns integer { if (I_typeId_139[this_153] == 0) { if (this_153 == 0) { error191("Nullpointer exception when calling I.bar"); } else { error191("Called I.bar on invalid object."); }; } else { }; if (I_typeId_139[this_153] <= 3) { this_153 = I_bar178(this_153); } else { this_153 = D_bar169(this_153); }; return this_153; }