array I_nextFree104 integer I_firstFree189 integer I_maxIndex151 array I_typeId109 integer wurst_stack_depth151 array wurst_stack546 integer I_firstFree189 = 0 integer I_maxIndex151 = 0 integer wurst_stack_depth151 = 0 function initGlobals556() { } function main515() { initGlobals556(); init_test886("when calling init_test in swap, line 1"); } function config162() { } function init_test886(string __wurst_stackPos207) { local integer i1996 wurst_stack_546[wurst_stack_depth_151] = __wurst_stackPos_207; wurst_stack_depth_151 = (wurst_stack_depth_151 + 1); i1_996 = new_B746("when calling new_B in swap, line 12"); if ((dispatch_I_test_I_foo161(new_C160("when calling new_C in swap, line 13"), "when calling foo in swap, line 17") == 3) and (dispatch_I_test_I_foo161(i1_996, "when calling foo in swap, line 17") == 2)) { testSuccess104(); } else { }; wurst_stack_depth_151 = (wurst_stack_depth_151 - 1); } IS_NATIVE function testSuccess104() { } function new_B746(string __wurst_stackPos337) returns integer { local integer this284 wurst_stack_546[wurst_stack_depth_151] = __wurst_stackPos_337; wurst_stack_depth_151 = (wurst_stack_depth_151 + 1); wurst_stack_546[wurst_stack_depth_151] = "when calling alloc_B in swap, line 5"; wurst_stack_depth_151 = (wurst_stack_depth_151 + 1); if (I_firstFree_189 == 0) { if (I_maxIndex_151 < 32768) { I_maxIndex_151 = (I_maxIndex_151 + 1); this_284 = I_maxIndex_151; I_typeId_109[this_284] = 2; } else { error161("Out of memory: Could not create B.", "when calling error in swap, line 5"); this_284 = 0; }; } else { I_firstFree_189 = (I_firstFree_189 - 1); this_284 = I_nextFree_104[I_firstFree_189]; I_typeId_109[this_284] = 2; }; wurst_stack_depth_151 = ((wurst_stack_depth_151 - 1) - 1); return this_284; } function new_C160(string __wurst_stackPos319) returns integer { local integer this198 wurst_stack_546[wurst_stack_depth_151] = __wurst_stackPos_319; wurst_stack_depth_151 = (wurst_stack_depth_151 + 1); wurst_stack_546[wurst_stack_depth_151] = "when calling alloc_C in swap, line 8"; wurst_stack_depth_151 = (wurst_stack_depth_151 + 1); if (I_firstFree_189 == 0) { if (I_maxIndex_151 < 32768) { I_maxIndex_151 = (I_maxIndex_151 + 1); this_198 = I_maxIndex_151; I_typeId_109[this_198] = 3; } else { error161("Out of memory: Could not create C.", "when calling error in swap, line 8"); this_198 = 0; }; } else { I_firstFree_189 = (I_firstFree_189 - 1); this_198 = I_nextFree_104[I_firstFree_189]; I_typeId_109[this_198] = 3; }; wurst_stack_depth_151 = ((wurst_stack_depth_151 - 1) - 1); return this_198; } function error161(string msg191, string __wurst_stackPos184) { local integer stacktraceIndex189 local integer stacktraceLimit163 wurst_stack_546[wurst_stack_depth_151] = __wurst_stackPos_184; wurst_stack_depth_151 = (wurst_stack_depth_151 + 1); __wurst_stackPos_184 = ""; stacktraceIndex_189 = wurst_stack_depth_151; stacktraceLimit_163 = 0; loop { stacktraceIndex_189 = (stacktraceIndex_189 - 1); stacktraceLimit_163 = (stacktraceLimit_163 + 1); exitwhen ((stacktraceLimit_163 > 20) or (stacktraceIndex_189 < 0)); __wurst_stackPos_184 = (__wurst_stackPos_184 + (" " + wurst_stack_546[stacktraceIndex_189])); }; $debugPrint180((msg_191 + (" " + __wurst_stackPos_184))); wurst_stack_depth_151 = (wurst_stack_depth_151 - 1); } function dispatch_I_test_I_foo161(integer this186, string __wurst_stackPos127) returns integer { wurst_stack_546[wurst_stack_depth_151] = __wurst_stackPos_127; wurst_stack_depth_151 = (wurst_stack_depth_151 + 1); if (I_typeId_109[this_186] == 0) { if (this_186 == 0) { error161("Nullpointer exception when calling I.foo", "when calling error in swap, line 4"); } else { error161("Called I.foo on invalid object.", "when calling error in swap, line 4"); }; } else { }; if (I_typeId_109[this_186] <= 2) { this_186 = 2; } else { this_186 = 3; }; wurst_stack_depth_151 = (wurst_stack_depth_151 - 1); return this_186; }