array SimpleFunc_nextFree720 integer SimpleFunc_firstFree131 integer SimpleFunc_maxIndex426 array SimpleFunc_typeId507 array y205 integer SimpleFunc_firstFree131 = 0 integer SimpleFunc_maxIndex426 = 0 function initGlobals136() { } function main213() { initGlobals136(); init_test147(); } function config265() { } function init_test147() { local integer clVar262 clVar_262 = alloc_SimpleFunc_test750(); y_205[clVar_262] = 4; if (dispatch_SimpleFunc_test_SimpleFunc_apply194(clVar_262, 3) == 7) { testSuccess770(); } else { }; } IS_NATIVE function testSuccess770() { } function apply_test160(integer this214, integer x151) returns integer { return (y_205[this_214] + x_151); } function alloc_SimpleFunc_test750() returns integer { local integer this316 if (SimpleFunc_firstFree_131 == 0) { if (SimpleFunc_maxIndex_426 < 32768) { SimpleFunc_maxIndex_426 = (SimpleFunc_maxIndex_426 + 1); this_316 = SimpleFunc_maxIndex_426; SimpleFunc_typeId_507[this_316] = 2; } else { error150("Out of memory: Could not create SimpleFunc_test."); this_316 = 0; }; } else { SimpleFunc_firstFree_131 = (SimpleFunc_firstFree_131 - 1); this_316 = SimpleFunc_nextFree_720[SimpleFunc_firstFree_131]; SimpleFunc_typeId_507[this_316] = 2; }; return this_316; } function error150(string msg118) { $debugPrint202((msg_118 + (" " + #getStackTrace()))); } function dispatch_SimpleFunc_test_SimpleFunc_apply194(integer this655, integer x405) returns integer { if (SimpleFunc_typeId_507[this_655] == 0) { if (this_655 == 0) { error150("Nullpointer exception when calling SimpleFunc.apply"); } else { error150("Called SimpleFunc.apply on invalid object."); }; } else { }; return apply_test160(this_655, x_405); }