array B_nextFree129 integer B_firstFree157 integer B_maxIndex151 array B_typeId553 integer B_firstFree157 = 0 integer B_maxIndex151 = 0 function initGlobals146() { } function main126() { initGlobals146(); init_test430(); } function config762() { } function init_test430() { local integer x1114 local integer x2200 local integer x3148 local integer x4184 x1_114 = new_C794(); x2_200 = new_D294(); x3_148 = new_C794(); x4_184 = new_D294(); if (dispatch_A_test_A_foo145(x1_114) != 1) { testFail186("1"); } else { }; if (dispatch_A_test_A_foo145(x2_200) != 2) { testFail186("2"); } else { }; if (dispatch_B_test_B_bar790(x3_148) != 3) { testFail186("3"); } else { }; if (dispatch_B_test_B_bar790(x4_184) != 4) { testFail186("4"); } else { }; testSuccess347(); } IS_NATIVE function testFail186(string s300) { } IS_NATIVE function testSuccess347() { } function new_C794() returns integer { local integer this880 local integer this984 if (B_firstFree_157 == 0) { if (B_maxIndex_151 < 32768) { B_maxIndex_151 = (B_maxIndex_151 + 1); this_984 = B_maxIndex_151; B_typeId_553[this_984] = 2; } else { error918("Out of memory: Could not create C."); this_984 = 0; }; } else { B_firstFree_157 = (B_firstFree_157 - 1); this_984 = B_nextFree_129[B_firstFree_157]; B_typeId_553[this_984] = 2; }; this_880 = this_984; return this_880; } function new_D294() returns integer { local integer this100 local integer this171 if (B_firstFree_157 == 0) { if (B_maxIndex_151 < 32768) { B_maxIndex_151 = (B_maxIndex_151 + 1); this_171 = B_maxIndex_151; B_typeId_553[this_171] = 3; } else { error918("Out of memory: Could not create D."); this_171 = 0; }; } else { B_firstFree_157 = (B_firstFree_157 - 1); this_171 = B_nextFree_129[B_firstFree_157]; B_typeId_553[this_171] = 3; }; this_100 = this_171; return this_100; } function error918(string msg121) { $debugPrint163((msg_121 + (" " + #getStackTrace()))); } function dispatch_A_test_A_foo145(integer this203) returns integer { local integer test_A_foo_result173 if (B_typeId_553[this_203] == 0) { if (this_203 == 0) { error918("Nullpointer exception when calling A.foo"); } else { error918("Called A.foo on invalid object."); }; } else { }; if (B_typeId_553[this_203] <= 2) { test_A_foo_result_173 = 1; } else { test_A_foo_result_173 = 2; }; return test_A_foo_result_173; } function dispatch_B_test_B_bar790(integer this209) returns integer { local integer test_B_bar_result257 if (B_typeId_553[this_209] == 0) { if (this_209 == 0) { error918("Nullpointer exception when calling B.bar"); } else { error918("Called B.bar on invalid object."); }; } else { }; if (B_typeId_553[this_209] <= 2) { test_B_bar_result_257 = 3; } else { test_B_bar_result_257 = 4; }; return test_B_bar_result_257; }