array test_ar153 array I_nextFree908 integer I_firstFree187 integer I_maxIndex255 array I_typeId180 integer wurst_stack_depth157 array wurst_stack177 integer I_firstFree187 = 0 integer I_maxIndex255 = 0 integer wurst_stack_depth157 = 0 function initGlobals104() { } function main105() { initGlobals104(); init_test126("when calling init_test in swapArray, line 1"); } function config128() { } function init_test126(string __wurst_stackPos230) { local integer temp131 wurst_stack_177[wurst_stack_depth_157] = __wurst_stackPos_230; wurst_stack_depth_157 = (wurst_stack_depth_157 + 1); test_ar_153[5] = new_B810("when calling new_B in swapArray, line 13"); test_ar_153[6] = new_C168("when calling new_C in swapArray, line 14"); temp_131 = test_ar_153[6]; test_ar_153[6] = test_ar_153[5]; test_ar_153[5] = temp_131; if ((dispatch_I_test_I_foo939(test_ar_153[5], "when calling foo in swapArray, line 18") == 3) and (dispatch_I_test_I_foo939(test_ar_153[6], "when calling foo in swapArray, line 18") == 2)) { testSuccess831(); } else { }; wurst_stack_depth_157 = (wurst_stack_depth_157 - 1); } IS_NATIVE function testSuccess831() { } function new_B810(string __wurst_stackPos382) returns integer { local integer this621 wurst_stack_177[wurst_stack_depth_157] = __wurst_stackPos_382; wurst_stack_depth_157 = (wurst_stack_depth_157 + 1); wurst_stack_177[wurst_stack_depth_157] = "when calling alloc_B in swapArray, line 6"; wurst_stack_depth_157 = (wurst_stack_depth_157 + 1); if (I_firstFree_187 == 0) { if (I_maxIndex_255 < 32768) { I_maxIndex_255 = (I_maxIndex_255 + 1); this_621 = I_maxIndex_255; I_typeId_180[this_621] = 2; } else { error163("Out of memory: Could not create B.", "when calling error in swapArray, line 6"); this_621 = 0; }; } else { I_firstFree_187 = (I_firstFree_187 - 1); this_621 = I_nextFree_908[I_firstFree_187]; I_typeId_180[this_621] = 2; }; wurst_stack_depth_157 = ((wurst_stack_depth_157 - 1) - 1); return this_621; } function new_C168(string __wurst_stackPos128) returns integer { local integer this176 wurst_stack_177[wurst_stack_depth_157] = __wurst_stackPos_128; wurst_stack_depth_157 = (wurst_stack_depth_157 + 1); wurst_stack_177[wurst_stack_depth_157] = "when calling alloc_C in swapArray, line 9"; wurst_stack_depth_157 = (wurst_stack_depth_157 + 1); if (I_firstFree_187 == 0) { if (I_maxIndex_255 < 32768) { I_maxIndex_255 = (I_maxIndex_255 + 1); this_176 = I_maxIndex_255; I_typeId_180[this_176] = 3; } else { error163("Out of memory: Could not create C.", "when calling error in swapArray, line 9"); this_176 = 0; }; } else { I_firstFree_187 = (I_firstFree_187 - 1); this_176 = I_nextFree_908[I_firstFree_187]; I_typeId_180[this_176] = 3; }; wurst_stack_depth_157 = ((wurst_stack_depth_157 - 1) - 1); return this_176; } function error163(string msg208, string __wurst_stackPos104) { local integer stacktraceIndex144 local integer stacktraceLimit426 wurst_stack_177[wurst_stack_depth_157] = __wurst_stackPos_104; wurst_stack_depth_157 = (wurst_stack_depth_157 + 1); __wurst_stackPos_104 = ""; stacktraceIndex_144 = wurst_stack_depth_157; stacktraceLimit_426 = 0; loop { stacktraceIndex_144 = (stacktraceIndex_144 - 1); stacktraceLimit_426 = (stacktraceLimit_426 + 1); exitwhen ((stacktraceLimit_426 > 20) or (stacktraceIndex_144 < 0)); __wurst_stackPos_104 = (__wurst_stackPos_104 + (" " + wurst_stack_177[stacktraceIndex_144])); }; $debugPrint661((msg_208 + (" " + __wurst_stackPos_104))); wurst_stack_depth_157 = (wurst_stack_depth_157 - 1); } function dispatch_I_test_I_foo939(integer this682, string __wurst_stackPos193) returns integer { wurst_stack_177[wurst_stack_depth_157] = __wurst_stackPos_193; wurst_stack_depth_157 = (wurst_stack_depth_157 + 1); if (I_typeId_180[this_682] == 0) { if (this_682 == 0) { error163("Nullpointer exception when calling I.foo", "when calling error in swapArray, line 5"); } else { error163("Called I.foo on invalid object.", "when calling error in swapArray, line 5"); }; } else { }; if (I_typeId_180[this_682] <= 2) { this_682 = 2; } else { this_682 = 3; }; wurst_stack_depth_157 = (wurst_stack_depth_157 - 1); return this_682; }