array I_nextFree165 integer I_firstFree190 integer I_maxIndex200 array I_typeId789 integer wurst_stack_depth139 array wurst_stack126 integer I_firstFree190 = 0 integer I_maxIndex200 = 0 integer wurst_stack_depth139 = 0 function initGlobals197() { } function main610() { initGlobals197(); init_test292("when calling init_test in exampleCode, line 1"); } function config958() { } function init_test292(string __wurst_stackPos204) { local integer i1493 local integer i2133 wurst_stack_126[wurst_stack_depth_139] = __wurst_stackPos_204; wurst_stack_depth_139 = (wurst_stack_depth_139 + 1); i1_493 = new_B596("when calling new_B in exampleCode, line 12"); i2_133 = new_C346("when calling new_C in exampleCode, line 13"); if ((dispatch_I_test_I_foo919(i1_493, "when calling foo in exampleCode, line 14") == 2) and (dispatch_I_test_I_foo919(i2_133, "when calling foo in exampleCode, line 14") == 3)) { testSuccess645(); } else { }; wurst_stack_depth_139 = (wurst_stack_depth_139 - 1); } IS_NATIVE function testSuccess645() { } function new_B596(string __wurst_stackPos201) returns integer { local integer this187 wurst_stack_126[wurst_stack_depth_139] = __wurst_stackPos_201; wurst_stack_depth_139 = (wurst_stack_depth_139 + 1); wurst_stack_126[wurst_stack_depth_139] = "when calling alloc_B in exampleCode, line 5"; wurst_stack_depth_139 = (wurst_stack_depth_139 + 1); if (I_firstFree_190 == 0) { if (I_maxIndex_200 < 32768) { I_maxIndex_200 = (I_maxIndex_200 + 1); this_187 = I_maxIndex_200; I_typeId_789[this_187] = 2; } else { error183("Out of memory: Could not create B.", "when calling error in exampleCode, line 5"); this_187 = 0; }; } else { I_firstFree_190 = (I_firstFree_190 - 1); this_187 = I_nextFree_165[I_firstFree_190]; I_typeId_789[this_187] = 2; }; wurst_stack_depth_139 = ((wurst_stack_depth_139 - 1) - 1); return this_187; } function new_C346(string __wurst_stackPos151) returns integer { local integer this305 wurst_stack_126[wurst_stack_depth_139] = __wurst_stackPos_151; wurst_stack_depth_139 = (wurst_stack_depth_139 + 1); wurst_stack_126[wurst_stack_depth_139] = "when calling alloc_C in exampleCode, line 8"; wurst_stack_depth_139 = (wurst_stack_depth_139 + 1); if (I_firstFree_190 == 0) { if (I_maxIndex_200 < 32768) { I_maxIndex_200 = (I_maxIndex_200 + 1); this_305 = I_maxIndex_200; I_typeId_789[this_305] = 3; } else { error183("Out of memory: Could not create C.", "when calling error in exampleCode, line 8"); this_305 = 0; }; } else { I_firstFree_190 = (I_firstFree_190 - 1); this_305 = I_nextFree_165[I_firstFree_190]; I_typeId_789[this_305] = 3; }; wurst_stack_depth_139 = ((wurst_stack_depth_139 - 1) - 1); return this_305; } function error183(string msg410, string __wurst_stackPos648) { local integer stacktraceIndex213 local integer stacktraceLimit634 wurst_stack_126[wurst_stack_depth_139] = __wurst_stackPos_648; wurst_stack_depth_139 = (wurst_stack_depth_139 + 1); __wurst_stackPos_648 = ""; stacktraceIndex_213 = wurst_stack_depth_139; stacktraceLimit_634 = 0; loop { stacktraceIndex_213 = (stacktraceIndex_213 - 1); stacktraceLimit_634 = (stacktraceLimit_634 + 1); exitwhen ((stacktraceLimit_634 > 20) or (stacktraceIndex_213 < 0)); __wurst_stackPos_648 = (__wurst_stackPos_648 + (" " + wurst_stack_126[stacktraceIndex_213])); }; $debugPrint197((msg_410 + (" " + __wurst_stackPos_648))); wurst_stack_depth_139 = (wurst_stack_depth_139 - 1); } function dispatch_I_test_I_foo919(integer this492, string __wurst_stackPos265) returns integer { wurst_stack_126[wurst_stack_depth_139] = __wurst_stackPos_265; wurst_stack_depth_139 = (wurst_stack_depth_139 + 1); if (I_typeId_789[this_492] == 0) { if (this_492 == 0) { error183("Nullpointer exception when calling I.foo", "when calling error in exampleCode, line 4"); } else { error183("Called I.foo on invalid object.", "when calling error in exampleCode, line 4"); }; } else { }; if (I_typeId_789[this_492] <= 2) { this_492 = 2; } else { this_492 = 3; }; wurst_stack_depth_139 = (wurst_stack_depth_139 - 1); return this_492; }