integer test_x629 array B_nextFree991 integer B_firstFree146 integer B_maxIndex677 array B_typeId231 integer wurst_stack_depth547 array wurst_stack479 integer test_x629 = 2 integer B_firstFree146 = 0 integer B_maxIndex677 = 0 integer wurst_stack_depth547 = 0 function initGlobals454() { } function main364() { initGlobals454(); wurst_stack_479[wurst_stack_depth_547] = "when calling init_test in ondestroy_dynamicdispatch, line 1"; wurst_stack_depth_547 = (wurst_stack_depth_547 + 1); test_x_629 = 2; dispatch_B_destroyB537(new_A213("when calling new_A in ondestroy_dynamicdispatch, line 11"), "when calling dispatch_B_destroyB in ondestroy_dynamicdispatch, line 12"); if (test_x_629 == 6) { testSuccess179(); } else { }; wurst_stack_depth_547 = (wurst_stack_depth_547 - 1); } function config210() { } IS_NATIVE function testSuccess179() { } function new_A213(string __wurst_stackPos104) returns integer { local integer this136 wurst_stack_479[wurst_stack_depth_547] = __wurst_stackPos_104; wurst_stack_depth_547 = (wurst_stack_depth_547 + 1); wurst_stack_479[wurst_stack_depth_547] = "when calling alloc_A in ondestroy_dynamicdispatch, line 7"; wurst_stack_depth_547 = (wurst_stack_depth_547 + 1); if (B_firstFree_146 == 0) { if (B_maxIndex_677 < 32768) { B_maxIndex_677 = (B_maxIndex_677 + 1); this_136 = B_maxIndex_677; B_typeId_231[this_136] = 2; } else { error386("Out of memory: Could not create A.", "when calling error in ondestroy_dynamicdispatch, line 7"); this_136 = 0; }; } else { B_firstFree_146 = (B_firstFree_146 - 1); this_136 = B_nextFree_991[B_firstFree_146]; B_typeId_231[this_136] = 2; }; wurst_stack_depth_547 = ((wurst_stack_depth_547 - 1) - 1); return this_136; } function error386(string msg256, string __wurst_stackPos693) { local integer stacktraceIndex667 local integer stacktraceLimit202 wurst_stack_479[wurst_stack_depth_547] = __wurst_stackPos_693; wurst_stack_depth_547 = (wurst_stack_depth_547 + 1); __wurst_stackPos_693 = ""; stacktraceIndex_667 = wurst_stack_depth_547; stacktraceLimit_202 = 0; loop { stacktraceIndex_667 = (stacktraceIndex_667 - 1); stacktraceLimit_202 = (stacktraceLimit_202 + 1); exitwhen ((stacktraceLimit_202 > 20) or (stacktraceIndex_667 < 0)); __wurst_stackPos_693 = (__wurst_stackPos_693 + (" " + wurst_stack_479[stacktraceIndex_667])); }; $debugPrint788((msg_256 + (" " + __wurst_stackPos_693))); wurst_stack_depth_547 = (wurst_stack_depth_547 - 1); } function dispatch_B_destroyB537(integer this120, string __wurst_stackPos198) { wurst_stack_479[wurst_stack_depth_547] = __wurst_stackPos_198; wurst_stack_depth_547 = (wurst_stack_depth_547 + 1); if (B_typeId_231[this_120] == 0) { if (this_120 == 0) { error386("Nullpointer exception when calling B.B", "when calling error in ondestroy_dynamicdispatch, line 4"); } else { error386("Called B.B on invalid object.", "when calling error in ondestroy_dynamicdispatch, line 4"); }; } else { }; if (B_typeId_231[this_120] <= 1) { wurst_stack_479[wurst_stack_depth_547] = "when calling destroyB in ondestroy_dynamicdispatch, line 4"; wurst_stack_depth_547 = (wurst_stack_depth_547 + 1); test_x_629 = (test_x_629 * 2); wurst_stack_479[wurst_stack_depth_547] = "when calling dealloc_B in ondestroy_dynamicdispatch, line 5"; wurst_stack_depth_547 = (wurst_stack_depth_547 + 1); if (B_typeId_231[this_120] == 0) { error386("Double free: object of type B", "when calling error in ondestroy_dynamicdispatch, line 4"); } else { B_nextFree_991[B_firstFree_146] = this_120; B_firstFree_146 = (B_firstFree_146 + 1); B_typeId_231[this_120] = 0; }; wurst_stack_depth_547 = ((wurst_stack_depth_547 - 1) - 1); } else { wurst_stack_479[wurst_stack_depth_547] = "when calling destroyA in ondestroy_dynamicdispatch, line 4"; wurst_stack_depth_547 = (wurst_stack_depth_547 + 1); test_x_629 = ((test_x_629 + 1) * 2); wurst_stack_479[wurst_stack_depth_547] = "when calling dealloc_A in ondestroy_dynamicdispatch, line 8"; wurst_stack_depth_547 = (wurst_stack_depth_547 + 1); if (B_typeId_231[this_120] == 0) { error386("Double free: object of type A", "when calling error in ondestroy_dynamicdispatch, line 7"); } else { B_nextFree_991[B_firstFree_146] = this_120; B_firstFree_146 = (B_firstFree_146 + 1); B_typeId_231[this_120] = 0; }; wurst_stack_depth_547 = ((wurst_stack_depth_547 - 1) - 1); }; wurst_stack_depth_547 = (wurst_stack_depth_547 - 1); }