integer test_x126 array B_nextFree955 integer B_firstFree188 integer B_maxIndex166 array B_typeId144 integer wurst_stack_depth102 array wurst_stack202 integer test_x126 = 2 integer B_firstFree188 = 0 integer B_maxIndex166 = 0 integer wurst_stack_depth102 = 0 function initGlobals637() { } function main182() { initGlobals637(); wurst_stack_202[wurst_stack_depth_102] = "when calling init_test in ondestroy_dynamicdispatch3, line 1"; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); test_x_126 = 2; dispatch_B_destroyB159(new_X437("when calling new_X in ondestroy_dynamicdispatch3, line 12"), "when calling dispatch_B_destroyB in ondestroy_dynamicdispatch3, line 13"); if (test_x_126 == 6) { testSuccess117(); } else { }; wurst_stack_depth_102 = (wurst_stack_depth_102 - 1); } function config170() { } IS_NATIVE function testSuccess117() { } function destroyX235(integer this108, string __wurst_stackPos848) { wurst_stack_202[wurst_stack_depth_102] = __wurst_stackPos_848; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); test_x_126 = ((test_x_126 + 1) * 2); wurst_stack_202[wurst_stack_depth_102] = "when calling dealloc_X in ondestroy_dynamicdispatch3, line 10"; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); if (B_typeId_144[this_108] == 0) { error187("Double free: object of type X", "when calling error in ondestroy_dynamicdispatch3, line 10"); } else { B_nextFree_955[B_firstFree_188] = this_108; B_firstFree_188 = (B_firstFree_188 + 1); B_typeId_144[this_108] = 0; }; wurst_stack_depth_102 = ((wurst_stack_depth_102 - 1) - 1); } function new_X437(string __wurst_stackPos210) returns integer { local integer this729 wurst_stack_202[wurst_stack_depth_102] = __wurst_stackPos_210; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); wurst_stack_202[wurst_stack_depth_102] = "when calling alloc_X in ondestroy_dynamicdispatch3, line 10"; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); if (B_firstFree_188 == 0) { if (B_maxIndex_166 < 32768) { B_maxIndex_166 = (B_maxIndex_166 + 1); this_729 = B_maxIndex_166; B_typeId_144[this_729] = 3; } else { error187("Out of memory: Could not create X.", "when calling error in ondestroy_dynamicdispatch3, line 10"); this_729 = 0; }; } else { B_firstFree_188 = (B_firstFree_188 - 1); this_729 = B_nextFree_955[B_firstFree_188]; B_typeId_144[this_729] = 3; }; wurst_stack_depth_102 = ((wurst_stack_depth_102 - 1) - 1); return this_729; } function error187(string msg202, string __wurst_stackPos248) { local integer stacktraceIndex570 local integer stacktraceLimit191 wurst_stack_202[wurst_stack_depth_102] = __wurst_stackPos_248; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); __wurst_stackPos_248 = ""; stacktraceIndex_570 = wurst_stack_depth_102; stacktraceLimit_191 = 0; loop { stacktraceIndex_570 = (stacktraceIndex_570 - 1); stacktraceLimit_191 = (stacktraceLimit_191 + 1); exitwhen ((stacktraceLimit_191 > 20) or (stacktraceIndex_570 < 0)); __wurst_stackPos_248 = (__wurst_stackPos_248 + (" " + wurst_stack_202[stacktraceIndex_570])); }; $debugPrint330((msg_202 + (" " + __wurst_stackPos_248))); wurst_stack_depth_102 = (wurst_stack_depth_102 - 1); } function dispatch_B_destroyB159(integer this110, string __wurst_stackPos817) { wurst_stack_202[wurst_stack_depth_102] = __wurst_stackPos_817; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); if (B_typeId_144[this_110] == 0) { if (this_110 == 0) { error187("Nullpointer exception when calling B.B", "when calling error in ondestroy_dynamicdispatch3, line 4"); } else { error187("Called B.B on invalid object.", "when calling error in ondestroy_dynamicdispatch3, line 4"); }; } else { }; if (B_typeId_144[this_110] <= 2) { if (B_typeId_144[this_110] <= 1) { wurst_stack_202[wurst_stack_depth_102] = "when calling destroyB in ondestroy_dynamicdispatch3, line 4"; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); test_x_126 = (test_x_126 * 2); wurst_stack_202[wurst_stack_depth_102] = "when calling dealloc_B in ondestroy_dynamicdispatch3, line 5"; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); if (B_typeId_144[this_110] == 0) { error187("Double free: object of type B", "when calling error in ondestroy_dynamicdispatch3, line 4"); } else { B_nextFree_955[B_firstFree_188] = this_110; B_firstFree_188 = (B_firstFree_188 + 1); B_typeId_144[this_110] = 0; }; wurst_stack_depth_102 = ((wurst_stack_depth_102 - 1) - 1); } else { wurst_stack_202[wurst_stack_depth_102] = "when calling destroyA in ondestroy_dynamicdispatch3, line 4"; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); test_x_126 = ((test_x_126 + 1) * 2); wurst_stack_202[wurst_stack_depth_102] = "when calling dealloc_A in ondestroy_dynamicdispatch3, line 8"; wurst_stack_depth_102 = (wurst_stack_depth_102 + 1); if (B_typeId_144[this_110] == 0) { error187("Double free: object of type A", "when calling error in ondestroy_dynamicdispatch3, line 7"); } else { B_nextFree_955[B_firstFree_188] = this_110; B_firstFree_188 = (B_firstFree_188 + 1); B_typeId_144[this_110] = 0; }; wurst_stack_depth_102 = ((wurst_stack_depth_102 - 1) - 1); }; } else { destroyX235(this_110, "when calling destroyX in ondestroy_dynamicdispatch3, line 4"); }; wurst_stack_depth_102 = (wurst_stack_depth_102 - 1); }