array test_ar341 array I_nextFree812 integer I_firstFree350 integer I_maxIndex656 array I_typeId159 integer wurst_stack_depth118 array wurst_stack216 integer I_firstFree350 = 0 integer I_maxIndex656 = 0 integer wurst_stack_depth118 = 0 function initGlobals840() { } function main180() { initGlobals840(); init_test836("when calling init_test in swapArray, line 1"); } function config436() { } function init_test836(string __wurst_stackPos196) { local integer temp118 wurst_stack_216[wurst_stack_depth_118] = __wurst_stackPos_196; wurst_stack_depth_118 = (wurst_stack_depth_118 + 1); test_ar_341[5] = new_B170("when calling new_B in swapArray, line 13"); test_ar_341[6] = new_C148("when calling new_C in swapArray, line 14"); temp_118 = test_ar_341[6]; test_ar_341[6] = test_ar_341[5]; test_ar_341[5] = temp_118; if ((dispatch_I_test_I_foo125(test_ar_341[5], "when calling foo in swapArray, line 18") == 3) and (dispatch_I_test_I_foo125(test_ar_341[6], "when calling foo in swapArray, line 18") == 2)) { testSuccess209(); } else { }; wurst_stack_depth_118 = (wurst_stack_depth_118 - 1); } IS_NATIVE function testSuccess209() { } function new_B170(string __wurst_stackPos208) returns integer { local integer this141 wurst_stack_216[wurst_stack_depth_118] = __wurst_stackPos_208; wurst_stack_depth_118 = (wurst_stack_depth_118 + 1); wurst_stack_216[wurst_stack_depth_118] = "when calling alloc_B in swapArray, line 6"; wurst_stack_depth_118 = (wurst_stack_depth_118 + 1); if (I_firstFree_350 == 0) { if (I_maxIndex_656 < 32768) { I_maxIndex_656 = (I_maxIndex_656 + 1); this_141 = I_maxIndex_656; I_typeId_159[this_141] = 2; } else { error139("Out of memory: Could not create B.", "when calling error in swapArray, line 6"); this_141 = 0; }; } else { I_firstFree_350 = (I_firstFree_350 - 1); this_141 = I_nextFree_812[I_firstFree_350]; I_typeId_159[this_141] = 2; }; wurst_stack_depth_118 = ((wurst_stack_depth_118 - 1) - 1); return this_141; } function new_C148(string __wurst_stackPos173) returns integer { local integer this574 wurst_stack_216[wurst_stack_depth_118] = __wurst_stackPos_173; wurst_stack_depth_118 = (wurst_stack_depth_118 + 1); wurst_stack_216[wurst_stack_depth_118] = "when calling alloc_C in swapArray, line 9"; wurst_stack_depth_118 = (wurst_stack_depth_118 + 1); if (I_firstFree_350 == 0) { if (I_maxIndex_656 < 32768) { I_maxIndex_656 = (I_maxIndex_656 + 1); this_574 = I_maxIndex_656; I_typeId_159[this_574] = 3; } else { error139("Out of memory: Could not create C.", "when calling error in swapArray, line 9"); this_574 = 0; }; } else { I_firstFree_350 = (I_firstFree_350 - 1); this_574 = I_nextFree_812[I_firstFree_350]; I_typeId_159[this_574] = 3; }; wurst_stack_depth_118 = ((wurst_stack_depth_118 - 1) - 1); return this_574; } function error139(string msg620, string __wurst_stackPos219) { local integer stacktraceIndex211 local integer stacktraceLimit900 wurst_stack_216[wurst_stack_depth_118] = __wurst_stackPos_219; wurst_stack_depth_118 = (wurst_stack_depth_118 + 1); __wurst_stackPos_219 = ""; stacktraceIndex_211 = wurst_stack_depth_118; stacktraceLimit_900 = 0; loop { stacktraceIndex_211 = (stacktraceIndex_211 - 1); stacktraceLimit_900 = (stacktraceLimit_900 + 1); exitwhen ((stacktraceLimit_900 > 20) or (stacktraceIndex_211 < 0)); __wurst_stackPos_219 = (__wurst_stackPos_219 + (" " + wurst_stack_216[stacktraceIndex_211])); }; $debugPrint687((msg_620 + (" " + __wurst_stackPos_219))); wurst_stack_depth_118 = (wurst_stack_depth_118 - 1); } function dispatch_I_test_I_foo125(integer this112, string __wurst_stackPos459) returns integer { wurst_stack_216[wurst_stack_depth_118] = __wurst_stackPos_459; wurst_stack_depth_118 = (wurst_stack_depth_118 + 1); if (I_typeId_159[this_112] == 0) { if (this_112 == 0) { error139("Nullpointer exception when calling I.foo", "when calling error in swapArray, line 5"); } else { error139("Called I.foo on invalid object.", "when calling error in swapArray, line 5"); }; } else { }; if (I_typeId_159[this_112] <= 2) { this_112 = 2; } else { this_112 = 3; }; wurst_stack_depth_118 = (wurst_stack_depth_118 - 1); return this_112; }