array I_nextFree179 integer I_firstFree106 integer I_maxIndex113 array I_typeId131 integer I_firstFree106 = 0 integer I_maxIndex113 = 0 function initGlobals800() { } function main160() { initGlobals800(); init_test111(); } function config157() { } function init_test111() { local integer i1157 local integer i2522 i1_157 = new_B142(); i2_522 = new_C127(); if ((dispatch_I_test_I_foo170(i1_157) == 2) and (dispatch_I_test_I_foo170(i2_522) == 3)) { testSuccess967(); } else { }; } IS_NATIVE function testSuccess967() { } function new_B142() returns integer { local integer this687 if (I_firstFree_106 == 0) { if (I_maxIndex_113 < 32768) { I_maxIndex_113 = (I_maxIndex_113 + 1); this_687 = I_maxIndex_113; I_typeId_131[this_687] = 2; } else { error172("Out of memory: Could not create B."); this_687 = 0; }; } else { I_firstFree_106 = (I_firstFree_106 - 1); this_687 = I_nextFree_179[I_firstFree_106]; I_typeId_131[this_687] = 2; }; return this_687; } function new_C127() returns integer { local integer this152 if (I_firstFree_106 == 0) { if (I_maxIndex_113 < 32768) { I_maxIndex_113 = (I_maxIndex_113 + 1); this_152 = I_maxIndex_113; I_typeId_131[this_152] = 3; } else { error172("Out of memory: Could not create C."); this_152 = 0; }; } else { I_firstFree_106 = (I_firstFree_106 - 1); this_152 = I_nextFree_179[I_firstFree_106]; I_typeId_131[this_152] = 3; }; return this_152; } function error172(string msg185) { $debugPrint123((msg_185 + (" " + #getStackTrace()))); } function dispatch_I_test_I_foo170(integer this203) returns integer { if (I_typeId_131[this_203] == 0) { if (this_203 == 0) { error172("Nullpointer exception when calling I.foo"); } else { error172("Called I.foo on invalid object."); }; } else { }; if (I_typeId_131[this_203] <= 2) { this_203 = 2; } else { this_203 = 3; }; return this_203; }