array I_nextFree106 integer I_firstFree372 integer I_maxIndex175 array I_typeId572 integer wurst_stack_depth135 array wurst_stack168 integer I_firstFree372 = 0 integer I_maxIndex175 = 0 integer wurst_stack_depth135 = 0 function initGlobals627() { } function main175() { initGlobals627(); init_test430("when calling init_test in simple, line 1"); } function config124() { } function init_test430(string __wurst_stackPos226) { local integer i1187 local integer i2126 wurst_stack_168[wurst_stack_depth_135] = __wurst_stackPos_226; wurst_stack_depth_135 = (wurst_stack_depth_135 + 1); i1_187 = new_B174("when calling new_B in simple, line 12"); i2_126 = new_C270("when calling new_C in simple, line 13"); if ((dispatch_I_test_I_foo124(i1_187, "when calling foo in simple, line 14") == 2) and (dispatch_I_test_I_foo124(i2_126, "when calling foo in simple, line 14") == 3)) { testSuccess135(); } else { }; wurst_stack_depth_135 = (wurst_stack_depth_135 - 1); } IS_NATIVE function testSuccess135() { } function new_B174(string __wurst_stackPos130) returns integer { local integer this194 wurst_stack_168[wurst_stack_depth_135] = __wurst_stackPos_130; wurst_stack_depth_135 = (wurst_stack_depth_135 + 1); wurst_stack_168[wurst_stack_depth_135] = "when calling alloc_B in simple, line 5"; wurst_stack_depth_135 = (wurst_stack_depth_135 + 1); if (I_firstFree_372 == 0) { if (I_maxIndex_175 < 32768) { I_maxIndex_175 = (I_maxIndex_175 + 1); this_194 = I_maxIndex_175; I_typeId_572[this_194] = 2; } else { error150("Out of memory: Could not create B.", "when calling error in simple, line 5"); this_194 = 0; }; } else { I_firstFree_372 = (I_firstFree_372 - 1); this_194 = I_nextFree_106[I_firstFree_372]; I_typeId_572[this_194] = 2; }; wurst_stack_depth_135 = ((wurst_stack_depth_135 - 1) - 1); return this_194; } function new_C270(string __wurst_stackPos849) returns integer { local integer this153 wurst_stack_168[wurst_stack_depth_135] = __wurst_stackPos_849; wurst_stack_depth_135 = (wurst_stack_depth_135 + 1); wurst_stack_168[wurst_stack_depth_135] = "when calling alloc_C in simple, line 8"; wurst_stack_depth_135 = (wurst_stack_depth_135 + 1); if (I_firstFree_372 == 0) { if (I_maxIndex_175 < 32768) { I_maxIndex_175 = (I_maxIndex_175 + 1); this_153 = I_maxIndex_175; I_typeId_572[this_153] = 3; } else { error150("Out of memory: Could not create C.", "when calling error in simple, line 8"); this_153 = 0; }; } else { I_firstFree_372 = (I_firstFree_372 - 1); this_153 = I_nextFree_106[I_firstFree_372]; I_typeId_572[this_153] = 3; }; wurst_stack_depth_135 = ((wurst_stack_depth_135 - 1) - 1); return this_153; } function error150(string msg171, string __wurst_stackPos109) { local integer stacktraceIndex203 local integer stacktraceLimit685 wurst_stack_168[wurst_stack_depth_135] = __wurst_stackPos_109; wurst_stack_depth_135 = (wurst_stack_depth_135 + 1); __wurst_stackPos_109 = ""; stacktraceIndex_203 = wurst_stack_depth_135; stacktraceLimit_685 = 0; loop { stacktraceIndex_203 = (stacktraceIndex_203 - 1); stacktraceLimit_685 = (stacktraceLimit_685 + 1); exitwhen ((stacktraceLimit_685 > 20) or (stacktraceIndex_203 < 0)); __wurst_stackPos_109 = (__wurst_stackPos_109 + (" " + wurst_stack_168[stacktraceIndex_203])); }; $debugPrint883((msg_171 + (" " + __wurst_stackPos_109))); wurst_stack_depth_135 = (wurst_stack_depth_135 - 1); } function dispatch_I_test_I_foo124(integer this203, string __wurst_stackPos213) returns integer { wurst_stack_168[wurst_stack_depth_135] = __wurst_stackPos_213; wurst_stack_depth_135 = (wurst_stack_depth_135 + 1); if (I_typeId_572[this_203] == 0) { if (this_203 == 0) { error150("Nullpointer exception when calling I.foo", "when calling error in simple, line 4"); } else { error150("Called I.foo on invalid object.", "when calling error in simple, line 4"); }; } else { }; if (I_typeId_572[this_203] <= 2) { this_203 = 2; } else { this_203 = 3; }; wurst_stack_depth_135 = (wurst_stack_depth_135 - 1); return this_203; }