array I_nextFree124 integer I_firstFree223 integer I_maxIndex298 array I_typeId115 integer wurst_stack_depth142 array wurst_stack112 integer I_firstFree223 = 0 integer I_maxIndex298 = 0 integer wurst_stack_depth142 = 0 function initGlobals200() { } function main178() { initGlobals200(); init_test905("when calling init_test in exampleCode, line 1"); } function config146() { } function init_test905(string __wurst_stackPos102) { local integer i1190 local integer i2167 wurst_stack_112[wurst_stack_depth_142] = __wurst_stackPos_102; wurst_stack_depth_142 = (wurst_stack_depth_142 + 1); i1_190 = new_B196("when calling new_B in exampleCode, line 12"); i2_167 = new_C183("when calling new_C in exampleCode, line 13"); if ((dispatch_I_test_I_foo107(i1_190, "when calling foo in exampleCode, line 14") == 2) and (dispatch_I_test_I_foo107(i2_167, "when calling foo in exampleCode, line 14") == 3)) { testSuccess147(); } else { }; wurst_stack_depth_142 = (wurst_stack_depth_142 - 1); } IS_NATIVE function testSuccess147() { } function new_B196(string __wurst_stackPos795) returns integer { local integer this102 wurst_stack_112[wurst_stack_depth_142] = __wurst_stackPos_795; wurst_stack_depth_142 = (wurst_stack_depth_142 + 1); wurst_stack_112[wurst_stack_depth_142] = "when calling alloc_B in exampleCode, line 5"; wurst_stack_depth_142 = (wurst_stack_depth_142 + 1); if (I_firstFree_223 == 0) { if (I_maxIndex_298 < 32768) { I_maxIndex_298 = (I_maxIndex_298 + 1); this_102 = I_maxIndex_298; I_typeId_115[this_102] = 2; } else { error567("Out of memory: Could not create B.", "when calling error in exampleCode, line 5"); this_102 = 0; }; } else { I_firstFree_223 = (I_firstFree_223 - 1); this_102 = I_nextFree_124[I_firstFree_223]; I_typeId_115[this_102] = 2; }; wurst_stack_depth_142 = ((wurst_stack_depth_142 - 1) - 1); return this_102; } function new_C183(string __wurst_stackPos645) returns integer { local integer this454 wurst_stack_112[wurst_stack_depth_142] = __wurst_stackPos_645; wurst_stack_depth_142 = (wurst_stack_depth_142 + 1); wurst_stack_112[wurst_stack_depth_142] = "when calling alloc_C in exampleCode, line 8"; wurst_stack_depth_142 = (wurst_stack_depth_142 + 1); if (I_firstFree_223 == 0) { if (I_maxIndex_298 < 32768) { I_maxIndex_298 = (I_maxIndex_298 + 1); this_454 = I_maxIndex_298; I_typeId_115[this_454] = 3; } else { error567("Out of memory: Could not create C.", "when calling error in exampleCode, line 8"); this_454 = 0; }; } else { I_firstFree_223 = (I_firstFree_223 - 1); this_454 = I_nextFree_124[I_firstFree_223]; I_typeId_115[this_454] = 3; }; wurst_stack_depth_142 = ((wurst_stack_depth_142 - 1) - 1); return this_454; } function error567(string msg187, string __wurst_stackPos209) { local integer stacktraceIndex105 local integer stacktraceLimit513 wurst_stack_112[wurst_stack_depth_142] = __wurst_stackPos_209; wurst_stack_depth_142 = (wurst_stack_depth_142 + 1); __wurst_stackPos_209 = ""; stacktraceIndex_105 = wurst_stack_depth_142; stacktraceLimit_513 = 0; loop { stacktraceIndex_105 = (stacktraceIndex_105 - 1); stacktraceLimit_513 = (stacktraceLimit_513 + 1); exitwhen ((stacktraceLimit_513 > 20) or (stacktraceIndex_105 < 0)); __wurst_stackPos_209 = (__wurst_stackPos_209 + (" " + wurst_stack_112[stacktraceIndex_105])); }; $debugPrint132((msg_187 + (" " + __wurst_stackPos_209))); wurst_stack_depth_142 = (wurst_stack_depth_142 - 1); } function dispatch_I_test_I_foo107(integer this117, string __wurst_stackPos277) returns integer { wurst_stack_112[wurst_stack_depth_142] = __wurst_stackPos_277; wurst_stack_depth_142 = (wurst_stack_depth_142 + 1); if (I_typeId_115[this_117] == 0) { if (this_117 == 0) { error567("Nullpointer exception when calling I.foo", "when calling error in exampleCode, line 4"); } else { error567("Called I.foo on invalid object.", "when calling error in exampleCode, line 4"); }; } else { }; if (I_typeId_115[this_117] <= 2) { this_117 = 2; } else { this_117 = 3; }; wurst_stack_depth_142 = (wurst_stack_depth_142 - 1); return this_117; }