array SimpleFunc_nextFree767 integer SimpleFunc_firstFree933 integer SimpleFunc_maxIndex124 array SimpleFunc_typeId122 integer SimpleFunc_firstFree933 = 0 integer SimpleFunc_maxIndex124 = 0 function initGlobals112() { SimpleFunc_firstFree_933 = 0; SimpleFunc_maxIndex_124 = 0; } function main112() { initGlobals112(); init_test165(); } function config435() { } function init_test165() { local integer f840 local integer clVar780 local integer g422 clVar_780 = alloc_SimpleFunc_test177(); f_840 = clVar_780; g_422 = new_Test160(); if ((dispatch_SimpleFunc_test_SimpleFunc_apply691(f_840, 3, 4) == 7) and (dispatch_SimpleFunc_test_SimpleFunc_apply691(g_422, 3, 4) == 12)) { testSuccess757(); } else { }; } IS_NATIVE function testSuccess757() { } function apply_test449(integer this132, integer x798, integer y134) returns integer { return (x_798 + y_134); } function Test_apply162(integer this831, integer x206, integer y830) returns integer { return (x_206 * y_830); } function Test_init181(integer this154) { } function new_Test160() returns integer { local integer this494 this_494 = alloc_Test213(); construct_Test233(this_494); return this_494; } function construct_Test233(integer this132) { Test_init181(this_132); } function alloc_SimpleFunc_test177() returns integer { local integer this165 if (SimpleFunc_firstFree_933 == 0) { if (SimpleFunc_maxIndex_124 < 32768) { SimpleFunc_maxIndex_124 = (SimpleFunc_maxIndex_124 + 1); this_165 = SimpleFunc_maxIndex_124; SimpleFunc_typeId_122[this_165] = 2; } else { error338("Out of memory: Could not create SimpleFunc_test."); this_165 = 0; }; } else { SimpleFunc_firstFree_933 = (SimpleFunc_firstFree_933 - 1); this_165 = SimpleFunc_nextFree_767[SimpleFunc_firstFree_933]; SimpleFunc_typeId_122[this_165] = 2; }; return this_165; } function error338(string msg179) { $debugPrint120((msg_179 + (" " + #getStackTrace()))); } function alloc_Test213() returns integer { local integer this170 if (SimpleFunc_firstFree_933 == 0) { if (SimpleFunc_maxIndex_124 < 32768) { SimpleFunc_maxIndex_124 = (SimpleFunc_maxIndex_124 + 1); this_170 = SimpleFunc_maxIndex_124; SimpleFunc_typeId_122[this_170] = 3; } else { error338("Out of memory: Could not create Test."); this_170 = 0; }; } else { SimpleFunc_firstFree_933 = (SimpleFunc_firstFree_933 - 1); this_170 = SimpleFunc_nextFree_767[SimpleFunc_firstFree_933]; SimpleFunc_typeId_122[this_170] = 3; }; return this_170; } function dispatch_SimpleFunc_test_SimpleFunc_apply691(integer this577, integer x105, integer y236) returns integer { local integer test_SimpleFunc_apply_result111 if (SimpleFunc_typeId_122[this_577] == 0) { if (this_577 == 0) { error338("Nullpointer exception when calling SimpleFunc.apply"); } else { error338("Called SimpleFunc.apply on invalid object."); }; } else { }; if (SimpleFunc_typeId_122[this_577] <= 2) { test_SimpleFunc_apply_result_111 = apply_test449(this_577, x_105, y_236); } else { test_SimpleFunc_apply_result_111 = Test_apply162(this_577, x_105, y_236); }; return test_SimpleFunc_apply_result_111; }