integer test_x337 array B_nextFree127 integer B_firstFree842 integer B_maxIndex197 array B_typeId293 integer wurst_stack_depth210 array wurst_stack196 integer test_x337 = 2 integer B_firstFree842 = 0 integer B_maxIndex197 = 0 integer wurst_stack_depth210 = 0 function initGlobals297() { } function main138() { initGlobals297(); wurst_stack_196[wurst_stack_depth_210] = "when calling init_test in ondestroy_dynamicdispatch3, line 1"; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); test_x_337 = 2; dispatch_B_destroyB696(new_X125("when calling new_X in ondestroy_dynamicdispatch3, line 12"), "when calling dispatch_B_destroyB in ondestroy_dynamicdispatch3, line 13"); if (test_x_337 == 6) { testSuccess857(); } else { }; wurst_stack_depth_210 = (wurst_stack_depth_210 - 1); } function config154() { } IS_NATIVE function testSuccess857() { } function destroyX691(integer this157, string __wurst_stackPos118) { wurst_stack_196[wurst_stack_depth_210] = __wurst_stackPos_118; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); test_x_337 = ((test_x_337 + 1) * 2); wurst_stack_196[wurst_stack_depth_210] = "when calling dealloc_X in ondestroy_dynamicdispatch3, line 10"; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); if (B_typeId_293[this_157] == 0) { error109("Double free: object of type X", "when calling error in ondestroy_dynamicdispatch3, line 10"); } else { B_nextFree_127[B_firstFree_842] = this_157; B_firstFree_842 = (B_firstFree_842 + 1); B_typeId_293[this_157] = 0; }; wurst_stack_depth_210 = ((wurst_stack_depth_210 - 1) - 1); } function new_X125(string __wurst_stackPos859) returns integer { local integer this171 wurst_stack_196[wurst_stack_depth_210] = __wurst_stackPos_859; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); wurst_stack_196[wurst_stack_depth_210] = "when calling alloc_X in ondestroy_dynamicdispatch3, line 10"; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); if (B_firstFree_842 == 0) { if (B_maxIndex_197 < 32768) { B_maxIndex_197 = (B_maxIndex_197 + 1); this_171 = B_maxIndex_197; B_typeId_293[this_171] = 3; } else { error109("Out of memory: Could not create X.", "when calling error in ondestroy_dynamicdispatch3, line 10"); this_171 = 0; }; } else { B_firstFree_842 = (B_firstFree_842 - 1); this_171 = B_nextFree_127[B_firstFree_842]; B_typeId_293[this_171] = 3; }; wurst_stack_depth_210 = ((wurst_stack_depth_210 - 1) - 1); return this_171; } function error109(string msg113, string __wurst_stackPos863) { local integer stacktraceIndex704 local integer stacktraceLimit113 wurst_stack_196[wurst_stack_depth_210] = __wurst_stackPos_863; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); __wurst_stackPos_863 = ""; stacktraceIndex_704 = wurst_stack_depth_210; stacktraceLimit_113 = 0; loop { stacktraceIndex_704 = (stacktraceIndex_704 - 1); stacktraceLimit_113 = (stacktraceLimit_113 + 1); exitwhen ((stacktraceLimit_113 > 20) or (stacktraceIndex_704 < 0)); __wurst_stackPos_863 = (__wurst_stackPos_863 + (" " + wurst_stack_196[stacktraceIndex_704])); }; $debugPrint209((msg_113 + (" " + __wurst_stackPos_863))); wurst_stack_depth_210 = (wurst_stack_depth_210 - 1); } function dispatch_B_destroyB696(integer this191, string __wurst_stackPos144) { wurst_stack_196[wurst_stack_depth_210] = __wurst_stackPos_144; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); if (B_typeId_293[this_191] == 0) { if (this_191 == 0) { error109("Nullpointer exception when calling B.B", "when calling error in ondestroy_dynamicdispatch3, line 4"); } else { error109("Called B.B on invalid object.", "when calling error in ondestroy_dynamicdispatch3, line 4"); }; } else { }; if (B_typeId_293[this_191] <= 2) { if (B_typeId_293[this_191] <= 1) { wurst_stack_196[wurst_stack_depth_210] = "when calling destroyB in ondestroy_dynamicdispatch3, line 4"; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); test_x_337 = (test_x_337 * 2); wurst_stack_196[wurst_stack_depth_210] = "when calling dealloc_B in ondestroy_dynamicdispatch3, line 5"; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); if (B_typeId_293[this_191] == 0) { error109("Double free: object of type B", "when calling error in ondestroy_dynamicdispatch3, line 4"); } else { B_nextFree_127[B_firstFree_842] = this_191; B_firstFree_842 = (B_firstFree_842 + 1); B_typeId_293[this_191] = 0; }; wurst_stack_depth_210 = ((wurst_stack_depth_210 - 1) - 1); } else { wurst_stack_196[wurst_stack_depth_210] = "when calling destroyA in ondestroy_dynamicdispatch3, line 4"; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); test_x_337 = ((test_x_337 + 1) * 2); wurst_stack_196[wurst_stack_depth_210] = "when calling dealloc_A in ondestroy_dynamicdispatch3, line 8"; wurst_stack_depth_210 = (wurst_stack_depth_210 + 1); if (B_typeId_293[this_191] == 0) { error109("Double free: object of type A", "when calling error in ondestroy_dynamicdispatch3, line 7"); } else { B_nextFree_127[B_firstFree_842] = this_191; B_firstFree_842 = (B_firstFree_842 + 1); B_typeId_293[this_191] = 0; }; wurst_stack_depth_210 = ((wurst_stack_depth_210 - 1) - 1); }; } else { destroyX691(this_191, "when calling destroyX in ondestroy_dynamicdispatch3, line 4"); }; wurst_stack_depth_210 = (wurst_stack_depth_210 - 1); }