array SimpleFunc_nextFree140 integer SimpleFunc_firstFree180 integer SimpleFunc_maxIndex485 array SimpleFunc_typeId915 integer SimpleFunc_firstFree180 = 0 integer SimpleFunc_maxIndex485 = 0 function initGlobals493() { } function main472() { initGlobals493(); init_test159(); } function config175() { } function init_test159() { local integer clVar146 local integer g239 clVar_146 = alloc_SimpleFunc_test149(); g_239 = new_Test289(); if ((dispatch_SimpleFunc_test_SimpleFunc_apply468(clVar_146, 3, 4) == 7) and (dispatch_SimpleFunc_test_SimpleFunc_apply468(g_239, 3, 4) == 12)) { testSuccess748(); } else { }; } IS_NATIVE function testSuccess748() { } function apply_test214(integer this137, integer x183, integer y211) returns integer { return (x_183 + y_211); } function Test_apply358(integer this545, integer x936, integer y362) returns integer { return (x_936 * y_362); } function Test_init655(integer this183) { } function new_Test289() returns integer { local integer this787 this_787 = alloc_Test163(); construct_Test873(this_787); return this_787; } function construct_Test873(integer this154) { Test_init655(this_154); } function alloc_SimpleFunc_test149() returns integer { local integer this127 if (SimpleFunc_firstFree_180 == 0) { if (SimpleFunc_maxIndex_485 < 32768) { SimpleFunc_maxIndex_485 = (SimpleFunc_maxIndex_485 + 1); this_127 = SimpleFunc_maxIndex_485; SimpleFunc_typeId_915[this_127] = 2; } else { error119("Out of memory: Could not create SimpleFunc_test."); this_127 = 0; }; } else { SimpleFunc_firstFree_180 = (SimpleFunc_firstFree_180 - 1); this_127 = SimpleFunc_nextFree_140[SimpleFunc_firstFree_180]; SimpleFunc_typeId_915[this_127] = 2; }; return this_127; } function error119(string msg104) { $debugPrint595((msg_104 + (" " + #getStackTrace()))); } function alloc_Test163() returns integer { local integer this303 if (SimpleFunc_firstFree_180 == 0) { if (SimpleFunc_maxIndex_485 < 32768) { SimpleFunc_maxIndex_485 = (SimpleFunc_maxIndex_485 + 1); this_303 = SimpleFunc_maxIndex_485; SimpleFunc_typeId_915[this_303] = 3; } else { error119("Out of memory: Could not create Test."); this_303 = 0; }; } else { SimpleFunc_firstFree_180 = (SimpleFunc_firstFree_180 - 1); this_303 = SimpleFunc_nextFree_140[SimpleFunc_firstFree_180]; SimpleFunc_typeId_915[this_303] = 3; }; return this_303; } function dispatch_SimpleFunc_test_SimpleFunc_apply468(integer this205, integer x569, integer y119) returns integer { if (SimpleFunc_typeId_915[this_205] == 0) { if (this_205 == 0) { error119("Nullpointer exception when calling SimpleFunc.apply"); } else { error119("Called SimpleFunc.apply on invalid object."); }; } else { }; if (SimpleFunc_typeId_915[this_205] <= 2) { this_205 = apply_test214(this_205, x_569, y_119); } else { this_205 = Test_apply358(this_205, x_569, y_119); }; return this_205; }