array B_nextFree125 integer B_firstFree148 integer B_maxIndex195 array B_typeId194 integer wurst_stack_depth115 array wurst_stack131 integer B_firstFree148 = 0 integer B_maxIndex195 = 0 integer wurst_stack_depth115 = 0 function initGlobals443() { } function main117() { initGlobals443(); init_A705("when calling init_A in testDispatch, line 1"); } function config115() { } function init_A705(string __wurst_stackPos169) { local integer this109 wurst_stack_131[wurst_stack_depth_115] = __wurst_stackPos_169; wurst_stack_depth_115 = (wurst_stack_depth_115 + 1); wurst_stack_131[wurst_stack_depth_115] = "when calling alloc_B_bar_A in testDispatch, line 8"; wurst_stack_depth_115 = (wurst_stack_depth_115 + 1); if (B_firstFree_148 == 0) { if (B_maxIndex_195 < 32768) { B_maxIndex_195 = (B_maxIndex_195 + 1); this_109 = B_maxIndex_195; B_typeId_194[this_109] = 3; } else { error163("Out of memory: Could not create B_bar_A.", "when calling error in testDispatch, line 8"); this_109 = 0; }; } else { B_firstFree_148 = (B_firstFree_148 - 1); this_109 = B_nextFree_125[B_firstFree_148]; B_typeId_194[this_109] = 3; }; wurst_stack_depth_115 = (wurst_stack_depth_115 - 1); wurst_stack_131[wurst_stack_depth_115] = "when calling bar in testDispatch, line 8"; wurst_stack_depth_115 = (wurst_stack_depth_115 + 1); dispatch_B_destroyB212(this_109, "when calling dispatch_B_destroyB in testDispatch, line 6"); wurst_stack_depth_115 = (wurst_stack_depth_115 - 1); wurst_stack_131[wurst_stack_depth_115] = "when calling alloc_B_A in testDispatch, line 9"; wurst_stack_depth_115 = (wurst_stack_depth_115 + 1); if (B_firstFree_148 == 0) { if (B_maxIndex_195 < 32768) { B_maxIndex_195 = (B_maxIndex_195 + 1); this_109 = B_maxIndex_195; B_typeId_194[this_109] = 2; } else { error163("Out of memory: Could not create B_A.", "when calling error in testDispatch, line 9"); this_109 = 0; }; } else { B_firstFree_148 = (B_firstFree_148 - 1); this_109 = B_nextFree_125[B_firstFree_148]; B_typeId_194[this_109] = 2; }; wurst_stack_depth_115 = (wurst_stack_depth_115 - 1); if ((this_109 castTo integer) == 1) { testSuccess140(); } else { }; wurst_stack_depth_115 = (wurst_stack_depth_115 - 1); } IS_NATIVE function testSuccess140() { } function error163(string msg109, string __wurst_stackPos967) { local integer stacktraceIndex935 local integer stacktraceLimit146 wurst_stack_131[wurst_stack_depth_115] = __wurst_stackPos_967; wurst_stack_depth_115 = (wurst_stack_depth_115 + 1); __wurst_stackPos_967 = ""; stacktraceIndex_935 = wurst_stack_depth_115; stacktraceLimit_146 = 0; loop { stacktraceIndex_935 = (stacktraceIndex_935 - 1); stacktraceLimit_146 = (stacktraceLimit_146 + 1); exitwhen ((stacktraceLimit_146 > 20) or (stacktraceIndex_935 < 0)); __wurst_stackPos_967 = (__wurst_stackPos_967 + (" " + wurst_stack_131[stacktraceIndex_935])); }; $debugPrint197((msg_109 + (" " + __wurst_stackPos_967))); wurst_stack_depth_115 = (wurst_stack_depth_115 - 1); } function dispatch_B_destroyB212(integer this179, string __wurst_stackPos166) { wurst_stack_131[wurst_stack_depth_115] = __wurst_stackPos_166; wurst_stack_depth_115 = (wurst_stack_depth_115 + 1); if (B_typeId_194[this_179] == 0) { if (this_179 == 0) { error163("Nullpointer exception when calling B.B", "when calling error in testDispatch, line 3"); } else { error163("Called B.B on invalid object.", "when calling error in testDispatch, line 3"); }; } else { }; wurst_stack_131[wurst_stack_depth_115] = "when calling destroyB in testDispatch, line 3"; wurst_stack_depth_115 = (wurst_stack_depth_115 + 1); wurst_stack_131[wurst_stack_depth_115] = "when calling dealloc_B in testDispatch, line 3"; wurst_stack_depth_115 = (wurst_stack_depth_115 + 1); if (B_typeId_194[this_179] == 0) { error163("Double free: object of type B", "when calling error in testDispatch, line 3"); } else { B_nextFree_125[B_firstFree_148] = this_179; B_firstFree_148 = (B_firstFree_148 + 1); B_typeId_194[this_179] = 0; }; wurst_stack_depth_115 = (((wurst_stack_depth_115 - 1) - 1) - 1); }