array SimpleFunc_nextFree354 integer SimpleFunc_firstFree895 integer SimpleFunc_maxIndex148 array SimpleFunc_typeId693 array y230 integer SimpleFunc_firstFree895 = 0 integer SimpleFunc_maxIndex148 = 0 function initGlobals343() { SimpleFunc_firstFree_895 = 0; SimpleFunc_maxIndex_148 = 0; } function main943() { initGlobals343(); init_test175(); } function config158() { } function init_test175() { local integer y193 local integer f158 local integer clVar201 y_193 = 4; clVar_201 = alloc_SimpleFunc_test531(); y_230[clVar_201] = y_193; f_158 = clVar_201; if (dispatch_SimpleFunc_test_SimpleFunc_apply120(f_158, 3) == 7) { testSuccess566(); } else { }; } IS_NATIVE function testSuccess566() { } function apply_test999(integer this213, integer x426) returns integer { return (x_426 + y_230[this_213]); } function alloc_SimpleFunc_test531() returns integer { local integer this177 if (SimpleFunc_firstFree_895 == 0) { if (SimpleFunc_maxIndex_148 < 32768) { SimpleFunc_maxIndex_148 = (SimpleFunc_maxIndex_148 + 1); this_177 = SimpleFunc_maxIndex_148; SimpleFunc_typeId_693[this_177] = 2; } else { error729("Out of memory: Could not create SimpleFunc_test."); this_177 = 0; }; } else { SimpleFunc_firstFree_895 = (SimpleFunc_firstFree_895 - 1); this_177 = SimpleFunc_nextFree_354[SimpleFunc_firstFree_895]; SimpleFunc_typeId_693[this_177] = 2; }; return this_177; } function error729(string msg875) { $debugPrint182((msg_875 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply120(integer this832, integer x191) returns integer { local integer test_SimpleFunc_apply_result241 if (SimpleFunc_typeId_693[this_832] == 0) { if (this_832 == 0) { error729("Nullpointer exception when calling SimpleFunc.apply"); } else { error729("Called SimpleFunc.apply on invalid object."); }; } else { }; test_SimpleFunc_apply_result_241 = apply_test999(this_832, x_191); return test_SimpleFunc_apply_result_241; }