array I_nextFree116 integer I_firstFree491 integer I_maxIndex187 array I_typeId203 integer wurst_stack_depth194 array wurst_stack159 integer I_firstFree491 = 0 integer I_maxIndex187 = 0 integer wurst_stack_depth194 = 0 function initGlobals124() { } function main553() { initGlobals124(); init_test157("when calling init_test in simple, line 1"); } function config149() { } function init_test157(string __wurst_stackPos194) { local integer i1188 local integer i2466 wurst_stack_159[wurst_stack_depth_194] = __wurst_stackPos_194; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); i1_188 = new_B222("when calling new_B in simple, line 12"); i2_466 = new_C977("when calling new_C in simple, line 13"); if ((dispatch_I_test_I_foo371(i1_188, "when calling foo in simple, line 14") == 2) and (dispatch_I_test_I_foo371(i2_466, "when calling foo in simple, line 14") == 3)) { testSuccess682(); } else { }; wurst_stack_depth_194 = (wurst_stack_depth_194 - 1); } IS_NATIVE function testSuccess682() { } function new_B222(string __wurst_stackPos107) returns integer { local integer this637 wurst_stack_159[wurst_stack_depth_194] = __wurst_stackPos_107; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); wurst_stack_159[wurst_stack_depth_194] = "when calling alloc_B in simple, line 5"; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); if (I_firstFree_491 == 0) { if (I_maxIndex_187 < 32768) { I_maxIndex_187 = (I_maxIndex_187 + 1); this_637 = I_maxIndex_187; I_typeId_203[this_637] = 2; } else { error398("Out of memory: Could not create B.", "when calling error in simple, line 5"); this_637 = 0; }; } else { I_firstFree_491 = (I_firstFree_491 - 1); this_637 = I_nextFree_116[I_firstFree_491]; I_typeId_203[this_637] = 2; }; wurst_stack_depth_194 = ((wurst_stack_depth_194 - 1) - 1); return this_637; } function new_C977(string __wurst_stackPos136) returns integer { local integer this549 wurst_stack_159[wurst_stack_depth_194] = __wurst_stackPos_136; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); wurst_stack_159[wurst_stack_depth_194] = "when calling alloc_C in simple, line 8"; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); if (I_firstFree_491 == 0) { if (I_maxIndex_187 < 32768) { I_maxIndex_187 = (I_maxIndex_187 + 1); this_549 = I_maxIndex_187; I_typeId_203[this_549] = 3; } else { error398("Out of memory: Could not create C.", "when calling error in simple, line 8"); this_549 = 0; }; } else { I_firstFree_491 = (I_firstFree_491 - 1); this_549 = I_nextFree_116[I_firstFree_491]; I_typeId_203[this_549] = 3; }; wurst_stack_depth_194 = ((wurst_stack_depth_194 - 1) - 1); return this_549; } function error398(string msg998, string __wurst_stackPos159) { local integer stacktraceIndex478 local integer stacktraceLimit206 wurst_stack_159[wurst_stack_depth_194] = __wurst_stackPos_159; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); __wurst_stackPos_159 = ""; stacktraceIndex_478 = wurst_stack_depth_194; stacktraceLimit_206 = 0; loop { stacktraceIndex_478 = (stacktraceIndex_478 - 1); stacktraceLimit_206 = (stacktraceLimit_206 + 1); exitwhen ((stacktraceLimit_206 > 20) or (stacktraceIndex_478 < 0)); __wurst_stackPos_159 = (__wurst_stackPos_159 + (" " + wurst_stack_159[stacktraceIndex_478])); }; $debugPrint146((msg_998 + (" " + __wurst_stackPos_159))); wurst_stack_depth_194 = (wurst_stack_depth_194 - 1); } function dispatch_I_test_I_foo371(integer this164, string __wurst_stackPos552) returns integer { wurst_stack_159[wurst_stack_depth_194] = __wurst_stackPos_552; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); if (I_typeId_203[this_164] == 0) { if (this_164 == 0) { error398("Nullpointer exception when calling I.foo", "when calling error in simple, line 4"); } else { error398("Called I.foo on invalid object.", "when calling error in simple, line 4"); }; } else { }; if (I_typeId_203[this_164] <= 2) { this_164 = 2; } else { this_164 = 3; }; wurst_stack_depth_194 = (wurst_stack_depth_194 - 1); return this_164; }