integer test_x296 array B_nextFree977 integer B_firstFree399 integer B_maxIndex616 array B_typeId841 integer wurst_stack_depth580 array wurst_stack181 integer test_x296 = 2 integer B_firstFree399 = 0 integer B_maxIndex616 = 0 integer wurst_stack_depth580 = 0 function initGlobals151() { } function main206() { initGlobals151(); wurst_stack_181[wurst_stack_depth_580] = "when calling init_test in ondestroy_dynamicdispatch2, line 1"; wurst_stack_depth_580 = (wurst_stack_depth_580 + 1); test_x_296 = 2; dispatch_B_destroyB192(new_X657("when calling new_X in ondestroy_dynamicdispatch2, line 12"), "when calling dispatch_B_destroyB in ondestroy_dynamicdispatch2, line 13"); if (test_x_296 == 6) { testSuccess143(); } else { }; wurst_stack_depth_580 = (wurst_stack_depth_580 - 1); } function config943() { } IS_NATIVE function testSuccess143() { } function destroyX188(integer this126, string __wurst_stackPos126) { wurst_stack_181[wurst_stack_depth_580] = __wurst_stackPos_126; wurst_stack_depth_580 = (wurst_stack_depth_580 + 1); test_x_296 = ((test_x_296 + 1) * 2); wurst_stack_181[wurst_stack_depth_580] = "when calling dealloc_X in ondestroy_dynamicdispatch2, line 9"; wurst_stack_depth_580 = (wurst_stack_depth_580 + 1); if (B_typeId_841[this_126] == 0) { error112("Double free: object of type X", "when calling error in ondestroy_dynamicdispatch2, line 8"); } else { B_nextFree_977[B_firstFree_399] = this_126; B_firstFree_399 = (B_firstFree_399 + 1); B_typeId_841[this_126] = 0; }; wurst_stack_depth_580 = ((wurst_stack_depth_580 - 1) - 1); } function new_X657(string __wurst_stackPos136) returns integer { local integer this292 wurst_stack_181[wurst_stack_depth_580] = __wurst_stackPos_136; wurst_stack_depth_580 = (wurst_stack_depth_580 + 1); wurst_stack_181[wurst_stack_depth_580] = "when calling alloc_X in ondestroy_dynamicdispatch2, line 8"; wurst_stack_depth_580 = (wurst_stack_depth_580 + 1); if (B_firstFree_399 == 0) { if (B_maxIndex_616 < 32768) { B_maxIndex_616 = (B_maxIndex_616 + 1); this_292 = B_maxIndex_616; B_typeId_841[this_292] = 3; } else { error112("Out of memory: Could not create X.", "when calling error in ondestroy_dynamicdispatch2, line 8"); this_292 = 0; }; } else { B_firstFree_399 = (B_firstFree_399 - 1); this_292 = B_nextFree_977[B_firstFree_399]; B_typeId_841[this_292] = 3; }; wurst_stack_depth_580 = ((wurst_stack_depth_580 - 1) - 1); return this_292; } function error112(string msg154, string __wurst_stackPos146) { local integer stacktraceIndex110 local integer stacktraceLimit944 wurst_stack_181[wurst_stack_depth_580] = __wurst_stackPos_146; wurst_stack_depth_580 = (wurst_stack_depth_580 + 1); __wurst_stackPos_146 = ""; stacktraceIndex_110 = wurst_stack_depth_580; stacktraceLimit_944 = 0; loop { stacktraceIndex_110 = (stacktraceIndex_110 - 1); stacktraceLimit_944 = (stacktraceLimit_944 + 1); exitwhen ((stacktraceLimit_944 > 20) or (stacktraceIndex_110 < 0)); __wurst_stackPos_146 = (__wurst_stackPos_146 + (" " + wurst_stack_181[stacktraceIndex_110])); }; $debugPrint576((msg_154 + (" " + __wurst_stackPos_146))); wurst_stack_depth_580 = (wurst_stack_depth_580 - 1); } function dispatch_B_destroyB192(integer this133, string __wurst_stackPos117) { wurst_stack_181[wurst_stack_depth_580] = __wurst_stackPos_117; wurst_stack_depth_580 = (wurst_stack_depth_580 + 1); if (B_typeId_841[this_133] == 0) { if (this_133 == 0) { error112("Nullpointer exception when calling B.B", "when calling error in ondestroy_dynamicdispatch2, line 4"); } else { error112("Called B.B on invalid object.", "when calling error in ondestroy_dynamicdispatch2, line 4"); }; } else { }; if (B_typeId_841[this_133] <= 2) { wurst_stack_181[wurst_stack_depth_580] = "when calling destroyB in ondestroy_dynamicdispatch2, line 4"; wurst_stack_depth_580 = (wurst_stack_depth_580 + 1); test_x_296 = (test_x_296 * 2); wurst_stack_181[wurst_stack_depth_580] = "when calling dealloc_B in ondestroy_dynamicdispatch2, line 5"; wurst_stack_depth_580 = (wurst_stack_depth_580 + 1); if (B_typeId_841[this_133] == 0) { error112("Double free: object of type B", "when calling error in ondestroy_dynamicdispatch2, line 4"); } else { B_nextFree_977[B_firstFree_399] = this_133; B_firstFree_399 = (B_firstFree_399 + 1); B_typeId_841[this_133] = 0; }; wurst_stack_depth_580 = ((wurst_stack_depth_580 - 1) - 1); } else { destroyX188(this_133, "when calling destroyX in ondestroy_dynamicdispatch2, line 4"); }; wurst_stack_depth_580 = (wurst_stack_depth_580 - 1); }