integer test_x261 array B_nextFree135 integer B_firstFree882 integer B_maxIndex196 array B_typeId147 integer wurst_stack_depth367 array wurst_stack184 integer test_x261 = 2 integer B_firstFree882 = 0 integer B_maxIndex196 = 0 integer wurst_stack_depth367 = 0 function initGlobals166() { } function main758() { initGlobals166(); wurst_stack_184[wurst_stack_depth_367] = "when calling init_test in ondestroy_dynamicdispatch4, line 1"; wurst_stack_depth_367 = (wurst_stack_depth_367 + 1); test_x_261 = 2; dispatch_A_destroyA143(new_X204("when calling new_X in ondestroy_dynamicdispatch4, line 12"), "when calling dispatch_A_destroyA in ondestroy_dynamicdispatch4, line 13"); if (test_x_261 == 6) { testSuccess175(); } else { }; wurst_stack_depth_367 = (wurst_stack_depth_367 - 1); } function config160() { } IS_NATIVE function testSuccess175() { } function new_X204(string __wurst_stackPos994) returns integer { local integer this124 wurst_stack_184[wurst_stack_depth_367] = __wurst_stackPos_994; wurst_stack_depth_367 = (wurst_stack_depth_367 + 1); wurst_stack_184[wurst_stack_depth_367] = "when calling alloc_X in ondestroy_dynamicdispatch4, line 10"; wurst_stack_depth_367 = (wurst_stack_depth_367 + 1); if (B_firstFree_882 == 0) { if (B_maxIndex_196 < 32768) { B_maxIndex_196 = (B_maxIndex_196 + 1); this_124 = B_maxIndex_196; B_typeId_147[this_124] = 3; } else { error264("Out of memory: Could not create X.", "when calling error in ondestroy_dynamicdispatch4, line 10"); this_124 = 0; }; } else { B_firstFree_882 = (B_firstFree_882 - 1); this_124 = B_nextFree_135[B_firstFree_882]; B_typeId_147[this_124] = 3; }; wurst_stack_depth_367 = ((wurst_stack_depth_367 - 1) - 1); return this_124; } function error264(string msg953, string __wurst_stackPos482) { local integer stacktraceIndex124 local integer stacktraceLimit150 wurst_stack_184[wurst_stack_depth_367] = __wurst_stackPos_482; wurst_stack_depth_367 = (wurst_stack_depth_367 + 1); __wurst_stackPos_482 = ""; stacktraceIndex_124 = wurst_stack_depth_367; stacktraceLimit_150 = 0; loop { stacktraceIndex_124 = (stacktraceIndex_124 - 1); stacktraceLimit_150 = (stacktraceLimit_150 + 1); exitwhen ((stacktraceLimit_150 > 20) or (stacktraceIndex_124 < 0)); __wurst_stackPos_482 = (__wurst_stackPos_482 + (" " + wurst_stack_184[stacktraceIndex_124])); }; $debugPrint143((msg_953 + (" " + __wurst_stackPos_482))); wurst_stack_depth_367 = (wurst_stack_depth_367 - 1); } function dispatch_A_destroyA143(integer this124, string __wurst_stackPos303) { wurst_stack_184[wurst_stack_depth_367] = __wurst_stackPos_303; wurst_stack_depth_367 = (wurst_stack_depth_367 + 1); if (B_typeId_147[this_124] == 0) { if (this_124 == 0) { error264("Nullpointer exception when calling A.A", "when calling error in ondestroy_dynamicdispatch4, line 7"); } else { error264("Called A.A on invalid object.", "when calling error in ondestroy_dynamicdispatch4, line 7"); }; } else { }; wurst_stack_184[wurst_stack_depth_367] = "when calling destroyA in ondestroy_dynamicdispatch4, line 7"; wurst_stack_depth_367 = (wurst_stack_depth_367 + 1); test_x_261 = ((test_x_261 + 1) * 2); wurst_stack_184[wurst_stack_depth_367] = "when calling dealloc_A in ondestroy_dynamicdispatch4, line 8"; wurst_stack_depth_367 = (wurst_stack_depth_367 + 1); if (B_typeId_147[this_124] == 0) { error264("Double free: object of type A", "when calling error in ondestroy_dynamicdispatch4, line 7"); } else { B_nextFree_135[B_firstFree_882] = this_124; B_firstFree_882 = (B_firstFree_882 + 1); B_typeId_147[this_124] = 0; }; wurst_stack_depth_367 = (((wurst_stack_depth_367 - 1) - 1) - 1); }