integer test_x794 array B_nextFree175 integer B_firstFree196 integer B_maxIndex142 array B_typeId129 integer wurst_stack_depth442 array wurst_stack214 integer test_x794 = 2 integer B_firstFree196 = 0 integer B_maxIndex142 = 0 integer wurst_stack_depth442 = 0 function initGlobals757() { } function main127() { initGlobals757(); wurst_stack_214[wurst_stack_depth_442] = "when calling init_test in ondestroy_dynamicdispatch2, line 1"; wurst_stack_depth_442 = (wurst_stack_depth_442 + 1); test_x_794 = 2; dispatch_B_destroyB248(new_X207("when calling new_X in ondestroy_dynamicdispatch2, line 12"), "when calling dispatch_B_destroyB in ondestroy_dynamicdispatch2, line 13"); if (test_x_794 == 6) { testSuccess135(); } else { }; wurst_stack_depth_442 = (wurst_stack_depth_442 - 1); } function config759() { } IS_NATIVE function testSuccess135() { } function destroyX728(integer this177, string __wurst_stackPos214) { wurst_stack_214[wurst_stack_depth_442] = __wurst_stackPos_214; wurst_stack_depth_442 = (wurst_stack_depth_442 + 1); test_x_794 = ((test_x_794 + 1) * 2); wurst_stack_214[wurst_stack_depth_442] = "when calling dealloc_X in ondestroy_dynamicdispatch2, line 9"; wurst_stack_depth_442 = (wurst_stack_depth_442 + 1); if (B_typeId_129[this_177] == 0) { error994("Double free: object of type X", "when calling error in ondestroy_dynamicdispatch2, line 8"); } else { B_nextFree_175[B_firstFree_196] = this_177; B_firstFree_196 = (B_firstFree_196 + 1); B_typeId_129[this_177] = 0; }; wurst_stack_depth_442 = ((wurst_stack_depth_442 - 1) - 1); } function new_X207(string __wurst_stackPos169) returns integer { local integer this185 wurst_stack_214[wurst_stack_depth_442] = __wurst_stackPos_169; wurst_stack_depth_442 = (wurst_stack_depth_442 + 1); wurst_stack_214[wurst_stack_depth_442] = "when calling alloc_X in ondestroy_dynamicdispatch2, line 8"; wurst_stack_depth_442 = (wurst_stack_depth_442 + 1); if (B_firstFree_196 == 0) { if (B_maxIndex_142 < 32768) { B_maxIndex_142 = (B_maxIndex_142 + 1); this_185 = B_maxIndex_142; B_typeId_129[this_185] = 3; } else { error994("Out of memory: Could not create X.", "when calling error in ondestroy_dynamicdispatch2, line 8"); this_185 = 0; }; } else { B_firstFree_196 = (B_firstFree_196 - 1); this_185 = B_nextFree_175[B_firstFree_196]; B_typeId_129[this_185] = 3; }; wurst_stack_depth_442 = ((wurst_stack_depth_442 - 1) - 1); return this_185; } function error994(string msg158, string __wurst_stackPos103) { local integer stacktraceIndex209 local integer stacktraceLimit160 wurst_stack_214[wurst_stack_depth_442] = __wurst_stackPos_103; wurst_stack_depth_442 = (wurst_stack_depth_442 + 1); __wurst_stackPos_103 = ""; stacktraceIndex_209 = wurst_stack_depth_442; stacktraceLimit_160 = 0; loop { stacktraceIndex_209 = (stacktraceIndex_209 - 1); stacktraceLimit_160 = (stacktraceLimit_160 + 1); exitwhen ((stacktraceLimit_160 > 20) or (stacktraceIndex_209 < 0)); __wurst_stackPos_103 = (__wurst_stackPos_103 + (" " + wurst_stack_214[stacktraceIndex_209])); }; $debugPrint106((msg_158 + (" " + __wurst_stackPos_103))); wurst_stack_depth_442 = (wurst_stack_depth_442 - 1); } function dispatch_B_destroyB248(integer this920, string __wurst_stackPos138) { wurst_stack_214[wurst_stack_depth_442] = __wurst_stackPos_138; wurst_stack_depth_442 = (wurst_stack_depth_442 + 1); if (B_typeId_129[this_920] == 0) { if (this_920 == 0) { error994("Nullpointer exception when calling B.B", "when calling error in ondestroy_dynamicdispatch2, line 4"); } else { error994("Called B.B on invalid object.", "when calling error in ondestroy_dynamicdispatch2, line 4"); }; } else { }; if (B_typeId_129[this_920] <= 2) { wurst_stack_214[wurst_stack_depth_442] = "when calling destroyB in ondestroy_dynamicdispatch2, line 4"; wurst_stack_depth_442 = (wurst_stack_depth_442 + 1); test_x_794 = (test_x_794 * 2); wurst_stack_214[wurst_stack_depth_442] = "when calling dealloc_B in ondestroy_dynamicdispatch2, line 5"; wurst_stack_depth_442 = (wurst_stack_depth_442 + 1); if (B_typeId_129[this_920] == 0) { error994("Double free: object of type B", "when calling error in ondestroy_dynamicdispatch2, line 4"); } else { B_nextFree_175[B_firstFree_196] = this_920; B_firstFree_196 = (B_firstFree_196 + 1); B_typeId_129[this_920] = 0; }; wurst_stack_depth_442 = ((wurst_stack_depth_442 - 1) - 1); } else { destroyX728(this_920, "when calling destroyX in ondestroy_dynamicdispatch2, line 4"); }; wurst_stack_depth_442 = (wurst_stack_depth_442 - 1); }