array SimpleFunc_nextFree200 integer SimpleFunc_firstFree173 integer SimpleFunc_maxIndex124 array SimpleFunc_typeId170 integer SimpleFunc_firstFree173 = 0 integer SimpleFunc_maxIndex124 = 0 function initGlobals210() { } function main164() { initGlobals210(); init_test102(); } function config698() { } function init_test102() { local integer g123 local integer this183 if (SimpleFunc_firstFree_173 == 0) { if (SimpleFunc_maxIndex_124 < 32768) { SimpleFunc_maxIndex_124 = (SimpleFunc_maxIndex_124 + 1); this_183 = SimpleFunc_maxIndex_124; SimpleFunc_typeId_170[this_183] = 2; } else { error173("Out of memory: Could not create SimpleFunc_test."); this_183 = 0; }; } else { SimpleFunc_firstFree_173 = (SimpleFunc_firstFree_173 - 1); this_183 = SimpleFunc_nextFree_200[SimpleFunc_firstFree_173]; SimpleFunc_typeId_170[this_183] = 2; }; g_123 = new_Test176(); if ((dispatch_SimpleFunc_test_SimpleFunc_apply926(this_183, 3, 4) == 7) and (dispatch_SimpleFunc_test_SimpleFunc_apply926(g_123, 3, 4) == 12)) { testSuccess446(); } else { }; } IS_NATIVE function testSuccess446() { } function new_Test176() returns integer { local integer this152 if (SimpleFunc_firstFree_173 == 0) { if (SimpleFunc_maxIndex_124 < 32768) { SimpleFunc_maxIndex_124 = (SimpleFunc_maxIndex_124 + 1); this_152 = SimpleFunc_maxIndex_124; SimpleFunc_typeId_170[this_152] = 3; } else { error173("Out of memory: Could not create Test."); this_152 = 0; }; } else { SimpleFunc_firstFree_173 = (SimpleFunc_firstFree_173 - 1); this_152 = SimpleFunc_nextFree_200[SimpleFunc_firstFree_173]; SimpleFunc_typeId_170[this_152] = 3; }; return this_152; } function error173(string msg795) { $debugPrint771((msg_795 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply926(integer this188, integer x166, integer y194) returns integer { if (SimpleFunc_typeId_170[this_188] == 0) { if (this_188 == 0) { error173("Nullpointer exception when calling SimpleFunc.apply"); } else { error173("Called SimpleFunc.apply on invalid object."); }; } else { }; if (SimpleFunc_typeId_170[this_188] <= 2) { this_188 = (x_166 + y_194); } else { this_188 = (x_166 * y_194); }; return this_188; }