array B_nextFree154 integer B_firstFree120 integer B_maxIndex157 array B_typeId185 integer wurst_stack_depth117 array wurst_stack205 integer B_firstFree120 = 0 integer B_maxIndex157 = 0 integer wurst_stack_depth117 = 0 function initGlobals454() { } function main161() { initGlobals454(); init_A156("when calling init_A in testDispatch, line 1"); } function config409() { } function init_A156(string __wurst_stackPos526) { local integer this396 wurst_stack_205[wurst_stack_depth_117] = __wurst_stackPos_526; wurst_stack_depth_117 = (wurst_stack_depth_117 + 1); wurst_stack_205[wurst_stack_depth_117] = "when calling alloc_B_bar_A in testDispatch, line 8"; wurst_stack_depth_117 = (wurst_stack_depth_117 + 1); if (B_firstFree_120 == 0) { if (B_maxIndex_157 < 32768) { B_maxIndex_157 = (B_maxIndex_157 + 1); this_396 = B_maxIndex_157; B_typeId_185[this_396] = 3; } else { error211("Out of memory: Could not create B_bar_A.", "when calling error in testDispatch, line 8"); this_396 = 0; }; } else { B_firstFree_120 = (B_firstFree_120 - 1); this_396 = B_nextFree_154[B_firstFree_120]; B_typeId_185[this_396] = 3; }; wurst_stack_depth_117 = (wurst_stack_depth_117 - 1); wurst_stack_205[wurst_stack_depth_117] = "when calling bar in testDispatch, line 8"; wurst_stack_depth_117 = (wurst_stack_depth_117 + 1); dispatch_B_destroyB134(this_396, "when calling dispatch_B_destroyB in testDispatch, line 6"); wurst_stack_depth_117 = (wurst_stack_depth_117 - 1); wurst_stack_205[wurst_stack_depth_117] = "when calling alloc_B_A in testDispatch, line 9"; wurst_stack_depth_117 = (wurst_stack_depth_117 + 1); if (B_firstFree_120 == 0) { if (B_maxIndex_157 < 32768) { B_maxIndex_157 = (B_maxIndex_157 + 1); this_396 = B_maxIndex_157; B_typeId_185[this_396] = 2; } else { error211("Out of memory: Could not create B_A.", "when calling error in testDispatch, line 9"); this_396 = 0; }; } else { B_firstFree_120 = (B_firstFree_120 - 1); this_396 = B_nextFree_154[B_firstFree_120]; B_typeId_185[this_396] = 2; }; wurst_stack_depth_117 = (wurst_stack_depth_117 - 1); if ((this_396 castTo integer) == 1) { testSuccess154(); } else { }; wurst_stack_depth_117 = (wurst_stack_depth_117 - 1); } IS_NATIVE function testSuccess154() { } function error211(string msg175, string __wurst_stackPos104) { local integer stacktraceIndex125 local integer stacktraceLimit149 wurst_stack_205[wurst_stack_depth_117] = __wurst_stackPos_104; wurst_stack_depth_117 = (wurst_stack_depth_117 + 1); __wurst_stackPos_104 = ""; stacktraceIndex_125 = wurst_stack_depth_117; stacktraceLimit_149 = 0; loop { stacktraceIndex_125 = (stacktraceIndex_125 - 1); stacktraceLimit_149 = (stacktraceLimit_149 + 1); exitwhen ((stacktraceLimit_149 > 20) or (stacktraceIndex_125 < 0)); __wurst_stackPos_104 = (__wurst_stackPos_104 + (" " + wurst_stack_205[stacktraceIndex_125])); }; $debugPrint111((msg_175 + (" " + __wurst_stackPos_104))); wurst_stack_depth_117 = (wurst_stack_depth_117 - 1); } function dispatch_B_destroyB134(integer this193, string __wurst_stackPos828) { wurst_stack_205[wurst_stack_depth_117] = __wurst_stackPos_828; wurst_stack_depth_117 = (wurst_stack_depth_117 + 1); if (B_typeId_185[this_193] == 0) { if (this_193 == 0) { error211("Nullpointer exception when calling B.B", "when calling error in testDispatch, line 3"); } else { error211("Called B.B on invalid object.", "when calling error in testDispatch, line 3"); }; } else { }; wurst_stack_205[wurst_stack_depth_117] = "when calling destroyB in testDispatch, line 3"; wurst_stack_depth_117 = (wurst_stack_depth_117 + 1); wurst_stack_205[wurst_stack_depth_117] = "when calling dealloc_B in testDispatch, line 3"; wurst_stack_depth_117 = (wurst_stack_depth_117 + 1); if (B_typeId_185[this_193] == 0) { error211("Double free: object of type B", "when calling error in testDispatch, line 3"); } else { B_nextFree_154[B_firstFree_120] = this_193; B_firstFree_120 = (B_firstFree_120 + 1); B_typeId_185[this_193] = 0; }; wurst_stack_depth_117 = (((wurst_stack_depth_117 - 1) - 1) - 1); }