array SimpleFunc_nextFree576 integer SimpleFunc_firstFree611 integer SimpleFunc_maxIndex140 array SimpleFunc_typeId108 integer wurst_stack_depth123 array wurst_stack427 integer SimpleFunc_firstFree611 = 0 integer SimpleFunc_maxIndex140 = 0 integer wurst_stack_depth123 = 0 function initGlobals184() { } function main147() { initGlobals184(); init_test275("when calling init_test in closure2, line 1"); } function config611() { } function init_test275(string __wurst_stackPos108) { local integer g485 local integer this107 wurst_stack_427[wurst_stack_depth_123] = __wurst_stackPos_108; wurst_stack_depth_123 = (wurst_stack_depth_123 + 1); wurst_stack_427[wurst_stack_depth_123] = "when calling alloc_SimpleFunc_test in closure2, line 9"; wurst_stack_depth_123 = (wurst_stack_depth_123 + 1); if (SimpleFunc_firstFree_611 == 0) { if (SimpleFunc_maxIndex_140 < 32768) { SimpleFunc_maxIndex_140 = (SimpleFunc_maxIndex_140 + 1); this_107 = SimpleFunc_maxIndex_140; SimpleFunc_typeId_108[this_107] = 2; } else { error126("Out of memory: Could not create SimpleFunc_test.", "when calling error in closure2, line 9"); this_107 = 0; }; } else { SimpleFunc_firstFree_611 = (SimpleFunc_firstFree_611 - 1); this_107 = SimpleFunc_nextFree_576[SimpleFunc_firstFree_611]; SimpleFunc_typeId_108[this_107] = 2; }; wurst_stack_depth_123 = (wurst_stack_depth_123 - 1); g_485 = new_Test778("when calling new_Test in closure2, line 10"); if ((dispatch_SimpleFunc_test_SimpleFunc_apply789(this_107, 3, 4, "when calling apply in closure2, line 11") == 7) and (dispatch_SimpleFunc_test_SimpleFunc_apply789(g_485, 3, 4, "when calling apply in closure2, line 11") == 12)) { testSuccess185(); } else { }; wurst_stack_depth_123 = (wurst_stack_depth_123 - 1); } IS_NATIVE function testSuccess185() { } function new_Test778(string __wurst_stackPos128) returns integer { local integer this139 wurst_stack_427[wurst_stack_depth_123] = __wurst_stackPos_128; wurst_stack_depth_123 = (wurst_stack_depth_123 + 1); wurst_stack_427[wurst_stack_depth_123] = "when calling alloc_Test in closure2, line 5"; wurst_stack_depth_123 = (wurst_stack_depth_123 + 1); if (SimpleFunc_firstFree_611 == 0) { if (SimpleFunc_maxIndex_140 < 32768) { SimpleFunc_maxIndex_140 = (SimpleFunc_maxIndex_140 + 1); this_139 = SimpleFunc_maxIndex_140; SimpleFunc_typeId_108[this_139] = 3; } else { error126("Out of memory: Could not create Test.", "when calling error in closure2, line 5"); this_139 = 0; }; } else { SimpleFunc_firstFree_611 = (SimpleFunc_firstFree_611 - 1); this_139 = SimpleFunc_nextFree_576[SimpleFunc_firstFree_611]; SimpleFunc_typeId_108[this_139] = 3; }; wurst_stack_depth_123 = ((wurst_stack_depth_123 - 1) - 1); return this_139; } function error126(string msg143, string __wurst_stackPos381) { local integer stacktraceIndex504 local integer stacktraceLimit186 wurst_stack_427[wurst_stack_depth_123] = __wurst_stackPos_381; wurst_stack_depth_123 = (wurst_stack_depth_123 + 1); __wurst_stackPos_381 = ""; stacktraceIndex_504 = wurst_stack_depth_123; stacktraceLimit_186 = 0; loop { stacktraceIndex_504 = (stacktraceIndex_504 - 1); stacktraceLimit_186 = (stacktraceLimit_186 + 1); exitwhen ((stacktraceLimit_186 > 20) or (stacktraceIndex_504 < 0)); __wurst_stackPos_381 = (__wurst_stackPos_381 + (" " + wurst_stack_427[stacktraceIndex_504])); }; $debugPrint111((msg_143 + (" " + __wurst_stackPos_381))); wurst_stack_depth_123 = (wurst_stack_depth_123 - 1); } function dispatch_SimpleFunc_test_SimpleFunc_apply789(integer this170, integer x757, integer y190, string __wurst_stackPos148) returns integer { wurst_stack_427[wurst_stack_depth_123] = __wurst_stackPos_148; wurst_stack_depth_123 = (wurst_stack_depth_123 + 1); if (SimpleFunc_typeId_108[this_170] == 0) { if (this_170 == 0) { error126("Nullpointer exception when calling SimpleFunc.apply", "when calling error in closure2, line 4"); } else { error126("Called SimpleFunc.apply on invalid object.", "when calling error in closure2, line 4"); }; } else { }; if (SimpleFunc_typeId_108[this_170] <= 2) { this_170 = (x_757 + y_190); } else { this_170 = (x_757 * y_190); }; wurst_stack_depth_123 = (wurst_stack_depth_123 - 1); return this_170; }