integer test_x144 array B_nextFree948 integer B_firstFree161 integer B_maxIndex790 array B_typeId198 integer wurst_stack_depth105 array wurst_stack164 integer test_x144 = 2 integer B_firstFree161 = 0 integer B_maxIndex790 = 0 integer wurst_stack_depth105 = 0 function initGlobals212() { } function main193() { initGlobals212(); wurst_stack_164[wurst_stack_depth_105] = "when calling init_test in ondestroy_dynamicdispatch, line 1"; wurst_stack_depth_105 = (wurst_stack_depth_105 + 1); test_x_144 = 2; dispatch_B_destroyB939(new_A690("when calling new_A in ondestroy_dynamicdispatch, line 11"), "when calling dispatch_B_destroyB in ondestroy_dynamicdispatch, line 12"); if (test_x_144 == 6) { testSuccess397(); } else { }; wurst_stack_depth_105 = (wurst_stack_depth_105 - 1); } function config132() { } IS_NATIVE function testSuccess397() { } function new_A690(string __wurst_stackPos354) returns integer { local integer this195 wurst_stack_164[wurst_stack_depth_105] = __wurst_stackPos_354; wurst_stack_depth_105 = (wurst_stack_depth_105 + 1); wurst_stack_164[wurst_stack_depth_105] = "when calling alloc_A in ondestroy_dynamicdispatch, line 7"; wurst_stack_depth_105 = (wurst_stack_depth_105 + 1); if (B_firstFree_161 == 0) { if (B_maxIndex_790 < 32768) { B_maxIndex_790 = (B_maxIndex_790 + 1); this_195 = B_maxIndex_790; B_typeId_198[this_195] = 2; } else { error572("Out of memory: Could not create A.", "when calling error in ondestroy_dynamicdispatch, line 7"); this_195 = 0; }; } else { B_firstFree_161 = (B_firstFree_161 - 1); this_195 = B_nextFree_948[B_firstFree_161]; B_typeId_198[this_195] = 2; }; wurst_stack_depth_105 = ((wurst_stack_depth_105 - 1) - 1); return this_195; } function error572(string msg611, string __wurst_stackPos896) { local integer stacktraceIndex925 local integer stacktraceLimit182 wurst_stack_164[wurst_stack_depth_105] = __wurst_stackPos_896; wurst_stack_depth_105 = (wurst_stack_depth_105 + 1); __wurst_stackPos_896 = ""; stacktraceIndex_925 = wurst_stack_depth_105; stacktraceLimit_182 = 0; loop { stacktraceIndex_925 = (stacktraceIndex_925 - 1); stacktraceLimit_182 = (stacktraceLimit_182 + 1); exitwhen ((stacktraceLimit_182 > 20) or (stacktraceIndex_925 < 0)); __wurst_stackPos_896 = (__wurst_stackPos_896 + (" " + wurst_stack_164[stacktraceIndex_925])); }; $debugPrint198((msg_611 + (" " + __wurst_stackPos_896))); wurst_stack_depth_105 = (wurst_stack_depth_105 - 1); } function dispatch_B_destroyB939(integer this171, string __wurst_stackPos210) { wurst_stack_164[wurst_stack_depth_105] = __wurst_stackPos_210; wurst_stack_depth_105 = (wurst_stack_depth_105 + 1); if (B_typeId_198[this_171] == 0) { if (this_171 == 0) { error572("Nullpointer exception when calling B.B", "when calling error in ondestroy_dynamicdispatch, line 4"); } else { error572("Called B.B on invalid object.", "when calling error in ondestroy_dynamicdispatch, line 4"); }; } else { }; if (B_typeId_198[this_171] <= 1) { wurst_stack_164[wurst_stack_depth_105] = "when calling destroyB in ondestroy_dynamicdispatch, line 4"; wurst_stack_depth_105 = (wurst_stack_depth_105 + 1); test_x_144 = (test_x_144 * 2); wurst_stack_164[wurst_stack_depth_105] = "when calling dealloc_B in ondestroy_dynamicdispatch, line 5"; wurst_stack_depth_105 = (wurst_stack_depth_105 + 1); if (B_typeId_198[this_171] == 0) { error572("Double free: object of type B", "when calling error in ondestroy_dynamicdispatch, line 4"); } else { B_nextFree_948[B_firstFree_161] = this_171; B_firstFree_161 = (B_firstFree_161 + 1); B_typeId_198[this_171] = 0; }; wurst_stack_depth_105 = ((wurst_stack_depth_105 - 1) - 1); } else { wurst_stack_164[wurst_stack_depth_105] = "when calling destroyA in ondestroy_dynamicdispatch, line 4"; wurst_stack_depth_105 = (wurst_stack_depth_105 + 1); test_x_144 = ((test_x_144 + 1) * 2); wurst_stack_164[wurst_stack_depth_105] = "when calling dealloc_A in ondestroy_dynamicdispatch, line 8"; wurst_stack_depth_105 = (wurst_stack_depth_105 + 1); if (B_typeId_198[this_171] == 0) { error572("Double free: object of type A", "when calling error in ondestroy_dynamicdispatch, line 7"); } else { B_nextFree_948[B_firstFree_161] = this_171; B_firstFree_161 = (B_firstFree_161 + 1); B_typeId_198[this_171] = 0; }; wurst_stack_depth_105 = ((wurst_stack_depth_105 - 1) - 1); }; wurst_stack_depth_105 = (wurst_stack_depth_105 - 1); }