integer test_x744 array B_nextFree213 integer B_firstFree119 integer B_maxIndex206 array B_typeId204 integer wurst_stack_depth120 array wurst_stack464 integer test_x744 = 2 integer B_firstFree119 = 0 integer B_maxIndex206 = 0 integer wurst_stack_depth120 = 0 function initGlobals102() { } function main208() { initGlobals102(); init_test213("when calling init_test in ondestroy_withVar, line 1"); } function config211() { } function init_test213(string __wurst_stackPos195) { local integer a107 wurst_stack_464[wurst_stack_depth_120] = __wurst_stackPos_195; wurst_stack_depth_120 = (wurst_stack_depth_120 + 1); test_x_744 = 2; a_107 = new_X671("when calling new_X in ondestroy_withVar, line 14"); wurst_stack_464[wurst_stack_depth_120] = "when calling dispatch_X_destroyX in ondestroy_withVar, line 15"; wurst_stack_depth_120 = (wurst_stack_depth_120 + 1); if (B_typeId_204[a_107] == 0) { if (a_107 == 0) { error815("Nullpointer exception when calling X.X", "when calling error in ondestroy_withVar, line 12"); } else { error815("Called X.X on invalid object.", "when calling error in ondestroy_withVar, line 12"); }; } else { }; destroyX135(a_107, "when calling destroyX in ondestroy_withVar, line 12"); wurst_stack_depth_120 = (wurst_stack_depth_120 - 1); if (test_x_744 == 6) { testSuccess121(); } else { }; wurst_stack_depth_120 = (wurst_stack_depth_120 - 1); } IS_NATIVE function testSuccess121() { } function destroyX135(integer this118, string __wurst_stackPos273) { wurst_stack_464[wurst_stack_depth_120] = __wurst_stackPos_273; wurst_stack_depth_120 = (wurst_stack_depth_120 + 1); test_x_744 = ((test_x_744 + 1) * 2); wurst_stack_464[wurst_stack_depth_120] = "when calling dealloc_X in ondestroy_withVar, line 12"; wurst_stack_depth_120 = (wurst_stack_depth_120 + 1); if (B_typeId_204[this_118] == 0) { error815("Double free: object of type X", "when calling error in ondestroy_withVar, line 12"); } else { B_nextFree_213[B_firstFree_119] = this_118; B_firstFree_119 = (B_firstFree_119 + 1); B_typeId_204[this_118] = 0; }; wurst_stack_depth_120 = ((wurst_stack_depth_120 - 1) - 1); } function new_X671(string __wurst_stackPos115) returns integer { local integer this955 wurst_stack_464[wurst_stack_depth_120] = __wurst_stackPos_115; wurst_stack_depth_120 = (wurst_stack_depth_120 + 1); wurst_stack_464[wurst_stack_depth_120] = "when calling alloc_X in ondestroy_withVar, line 12"; wurst_stack_depth_120 = (wurst_stack_depth_120 + 1); if (B_firstFree_119 == 0) { if (B_maxIndex_206 < 32768) { B_maxIndex_206 = (B_maxIndex_206 + 1); this_955 = B_maxIndex_206; B_typeId_204[this_955] = 3; } else { error815("Out of memory: Could not create X.", "when calling error in ondestroy_withVar, line 12"); this_955 = 0; }; } else { B_firstFree_119 = (B_firstFree_119 - 1); this_955 = B_nextFree_213[B_firstFree_119]; B_typeId_204[this_955] = 3; }; wurst_stack_depth_120 = ((wurst_stack_depth_120 - 1) - 1); return this_955; } function error815(string msg472, string __wurst_stackPos213) { local integer stacktraceIndex213 local integer stacktraceLimit142 wurst_stack_464[wurst_stack_depth_120] = __wurst_stackPos_213; wurst_stack_depth_120 = (wurst_stack_depth_120 + 1); __wurst_stackPos_213 = ""; stacktraceIndex_213 = wurst_stack_depth_120; stacktraceLimit_142 = 0; loop { stacktraceIndex_213 = (stacktraceIndex_213 - 1); stacktraceLimit_142 = (stacktraceLimit_142 + 1); exitwhen ((stacktraceLimit_142 > 20) or (stacktraceIndex_213 < 0)); __wurst_stackPos_213 = (__wurst_stackPos_213 + (" " + wurst_stack_464[stacktraceIndex_213])); }; $debugPrint362((msg_472 + (" " + __wurst_stackPos_213))); wurst_stack_depth_120 = (wurst_stack_depth_120 - 1); }