array SimpleFunc_nextFree180 integer SimpleFunc_firstFree127 integer SimpleFunc_maxIndex733 array SimpleFunc_typeId988 integer SimpleFunc_firstFree127 = 0 integer SimpleFunc_maxIndex733 = 0 function initGlobals147() { } function main188() { initGlobals147(); init_test201(); } function config208() { } function init_test201() { local integer g129 local integer this118 if (SimpleFunc_firstFree_127 == 0) { if (SimpleFunc_maxIndex_733 < 32768) { SimpleFunc_maxIndex_733 = (SimpleFunc_maxIndex_733 + 1); this_118 = SimpleFunc_maxIndex_733; SimpleFunc_typeId_988[this_118] = 2; } else { error182("Out of memory: Could not create SimpleFunc_test."); this_118 = 0; }; } else { SimpleFunc_firstFree_127 = (SimpleFunc_firstFree_127 - 1); this_118 = SimpleFunc_nextFree_180[SimpleFunc_firstFree_127]; SimpleFunc_typeId_988[this_118] = 2; }; g_129 = new_Test177(); if ((dispatch_SimpleFunc_test_SimpleFunc_apply141(this_118, 3, 4) == 7) and (dispatch_SimpleFunc_test_SimpleFunc_apply141(g_129, 3, 4) == 12)) { testSuccess160(); } else { }; } IS_NATIVE function testSuccess160() { } function new_Test177() returns integer { local integer this473 if (SimpleFunc_firstFree_127 == 0) { if (SimpleFunc_maxIndex_733 < 32768) { SimpleFunc_maxIndex_733 = (SimpleFunc_maxIndex_733 + 1); this_473 = SimpleFunc_maxIndex_733; SimpleFunc_typeId_988[this_473] = 3; } else { error182("Out of memory: Could not create Test."); this_473 = 0; }; } else { SimpleFunc_firstFree_127 = (SimpleFunc_firstFree_127 - 1); this_473 = SimpleFunc_nextFree_180[SimpleFunc_firstFree_127]; SimpleFunc_typeId_988[this_473] = 3; }; return this_473; } function error182(string msg206) { $debugPrint147((msg_206 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply141(integer this122, integer x833, integer y545) returns integer { if (SimpleFunc_typeId_988[this_122] == 0) { if (this_122 == 0) { error182("Nullpointer exception when calling SimpleFunc.apply"); } else { error182("Called SimpleFunc.apply on invalid object."); }; } else { }; if (SimpleFunc_typeId_988[this_122] <= 2) { this_122 = (x_833 + y_545); } else { this_122 = (x_833 * y_545); }; return this_122; }