integer test_x312 array B_nextFree211 integer B_firstFree716 integer B_maxIndex732 array B_typeId152 integer wurst_stack_depth402 array wurst_stack766 integer test_x312 = 2 integer B_firstFree716 = 0 integer B_maxIndex732 = 0 integer wurst_stack_depth402 = 0 function initGlobals189() { } function main687() { initGlobals189(); init_test120("when calling init_test in ondestroy_dynamicdispatch5, line 1"); } function config192() { } function init_test120(string __wurst_stackPos208) { local integer a602 wurst_stack_766[wurst_stack_depth_402] = __wurst_stackPos_208; wurst_stack_depth_402 = (wurst_stack_depth_402 + 1); test_x_312 = 2; a_602 = new_X142("when calling new_X in ondestroy_dynamicdispatch5, line 12"); wurst_stack_766[wurst_stack_depth_402] = "when calling dispatch_X_destroyX in ondestroy_dynamicdispatch5, line 13"; wurst_stack_depth_402 = (wurst_stack_depth_402 + 1); if (B_typeId_152[a_602] == 0) { if (a_602 == 0) { error197("Nullpointer exception when calling X.X", "when calling error in ondestroy_dynamicdispatch5, line 10"); } else { error197("Called X.X on invalid object.", "when calling error in ondestroy_dynamicdispatch5, line 10"); }; } else { }; destroyX183(a_602, "when calling destroyX in ondestroy_dynamicdispatch5, line 10"); wurst_stack_depth_402 = (wurst_stack_depth_402 - 1); if (test_x_312 == 6) { testSuccess990(); } else { }; wurst_stack_depth_402 = (wurst_stack_depth_402 - 1); } IS_NATIVE function testSuccess990() { } function destroyX183(integer this714, string __wurst_stackPos168) { wurst_stack_766[wurst_stack_depth_402] = __wurst_stackPos_168; wurst_stack_depth_402 = (wurst_stack_depth_402 + 1); test_x_312 = ((test_x_312 + 1) * 2); wurst_stack_766[wurst_stack_depth_402] = "when calling dealloc_X in ondestroy_dynamicdispatch5, line 10"; wurst_stack_depth_402 = (wurst_stack_depth_402 + 1); if (B_typeId_152[this_714] == 0) { error197("Double free: object of type X", "when calling error in ondestroy_dynamicdispatch5, line 10"); } else { B_nextFree_211[B_firstFree_716] = this_714; B_firstFree_716 = (B_firstFree_716 + 1); B_typeId_152[this_714] = 0; }; wurst_stack_depth_402 = ((wurst_stack_depth_402 - 1) - 1); } function new_X142(string __wurst_stackPos461) returns integer { local integer this108 wurst_stack_766[wurst_stack_depth_402] = __wurst_stackPos_461; wurst_stack_depth_402 = (wurst_stack_depth_402 + 1); wurst_stack_766[wurst_stack_depth_402] = "when calling alloc_X in ondestroy_dynamicdispatch5, line 10"; wurst_stack_depth_402 = (wurst_stack_depth_402 + 1); if (B_firstFree_716 == 0) { if (B_maxIndex_732 < 32768) { B_maxIndex_732 = (B_maxIndex_732 + 1); this_108 = B_maxIndex_732; B_typeId_152[this_108] = 3; } else { error197("Out of memory: Could not create X.", "when calling error in ondestroy_dynamicdispatch5, line 10"); this_108 = 0; }; } else { B_firstFree_716 = (B_firstFree_716 - 1); this_108 = B_nextFree_211[B_firstFree_716]; B_typeId_152[this_108] = 3; }; wurst_stack_depth_402 = ((wurst_stack_depth_402 - 1) - 1); return this_108; } function error197(string msg108, string __wurst_stackPos506) { local integer stacktraceIndex200 local integer stacktraceLimit201 wurst_stack_766[wurst_stack_depth_402] = __wurst_stackPos_506; wurst_stack_depth_402 = (wurst_stack_depth_402 + 1); __wurst_stackPos_506 = ""; stacktraceIndex_200 = wurst_stack_depth_402; stacktraceLimit_201 = 0; loop { stacktraceIndex_200 = (stacktraceIndex_200 - 1); stacktraceLimit_201 = (stacktraceLimit_201 + 1); exitwhen ((stacktraceLimit_201 > 20) or (stacktraceIndex_200 < 0)); __wurst_stackPos_506 = (__wurst_stackPos_506 + (" " + wurst_stack_766[stacktraceIndex_200])); }; $debugPrint152((msg_108 + (" " + __wurst_stackPos_506))); wurst_stack_depth_402 = (wurst_stack_depth_402 - 1); }