integer test_x159 array B_nextFree100 integer B_firstFree196 integer B_maxIndex860 array B_typeId129 integer wurst_stack_depth987 array wurst_stack195 integer test_x159 = 2 integer B_firstFree196 = 0 integer B_maxIndex860 = 0 integer wurst_stack_depth987 = 0 function initGlobals214() { } function main792() { initGlobals214(); wurst_stack_195[wurst_stack_depth_987] = "when calling init_test in ondestroy_dynamicdispatch4, line 1"; wurst_stack_depth_987 = (wurst_stack_depth_987 + 1); test_x_159 = 2; dispatch_A_destroyA232(new_X136("when calling new_X in ondestroy_dynamicdispatch4, line 12"), "when calling dispatch_A_destroyA in ondestroy_dynamicdispatch4, line 13"); if (test_x_159 == 6) { testSuccess201(); } else { }; wurst_stack_depth_987 = (wurst_stack_depth_987 - 1); } function config120() { } IS_NATIVE function testSuccess201() { } function new_X136(string __wurst_stackPos457) returns integer { local integer this194 wurst_stack_195[wurst_stack_depth_987] = __wurst_stackPos_457; wurst_stack_depth_987 = (wurst_stack_depth_987 + 1); wurst_stack_195[wurst_stack_depth_987] = "when calling alloc_X in ondestroy_dynamicdispatch4, line 10"; wurst_stack_depth_987 = (wurst_stack_depth_987 + 1); if (B_firstFree_196 == 0) { if (B_maxIndex_860 < 32768) { B_maxIndex_860 = (B_maxIndex_860 + 1); this_194 = B_maxIndex_860; B_typeId_129[this_194] = 3; } else { error935("Out of memory: Could not create X.", "when calling error in ondestroy_dynamicdispatch4, line 10"); this_194 = 0; }; } else { B_firstFree_196 = (B_firstFree_196 - 1); this_194 = B_nextFree_100[B_firstFree_196]; B_typeId_129[this_194] = 3; }; wurst_stack_depth_987 = ((wurst_stack_depth_987 - 1) - 1); return this_194; } function error935(string msg218, string __wurst_stackPos207) { local integer stacktraceIndex163 local integer stacktraceLimit664 wurst_stack_195[wurst_stack_depth_987] = __wurst_stackPos_207; wurst_stack_depth_987 = (wurst_stack_depth_987 + 1); __wurst_stackPos_207 = ""; stacktraceIndex_163 = wurst_stack_depth_987; stacktraceLimit_664 = 0; loop { stacktraceIndex_163 = (stacktraceIndex_163 - 1); stacktraceLimit_664 = (stacktraceLimit_664 + 1); exitwhen ((stacktraceLimit_664 > 20) or (stacktraceIndex_163 < 0)); __wurst_stackPos_207 = (__wurst_stackPos_207 + (" " + wurst_stack_195[stacktraceIndex_163])); }; $debugPrint112((msg_218 + (" " + __wurst_stackPos_207))); wurst_stack_depth_987 = (wurst_stack_depth_987 - 1); } function dispatch_A_destroyA232(integer this203, string __wurst_stackPos906) { wurst_stack_195[wurst_stack_depth_987] = __wurst_stackPos_906; wurst_stack_depth_987 = (wurst_stack_depth_987 + 1); if (B_typeId_129[this_203] == 0) { if (this_203 == 0) { error935("Nullpointer exception when calling A.A", "when calling error in ondestroy_dynamicdispatch4, line 7"); } else { error935("Called A.A on invalid object.", "when calling error in ondestroy_dynamicdispatch4, line 7"); }; } else { }; wurst_stack_195[wurst_stack_depth_987] = "when calling destroyA in ondestroy_dynamicdispatch4, line 7"; wurst_stack_depth_987 = (wurst_stack_depth_987 + 1); test_x_159 = ((test_x_159 + 1) * 2); wurst_stack_195[wurst_stack_depth_987] = "when calling dealloc_A in ondestroy_dynamicdispatch4, line 8"; wurst_stack_depth_987 = (wurst_stack_depth_987 + 1); if (B_typeId_129[this_203] == 0) { error935("Double free: object of type A", "when calling error in ondestroy_dynamicdispatch4, line 7"); } else { B_nextFree_100[B_firstFree_196] = this_203; B_firstFree_196 = (B_firstFree_196 + 1); B_typeId_129[this_203] = 0; }; wurst_stack_depth_987 = (((wurst_stack_depth_987 - 1) - 1) - 1); }