array I_nextFree213 integer I_firstFree177 integer I_maxIndex267 array I_typeId135 integer wurst_stack_depth159 array wurst_stack210 integer I_firstFree177 = 0 integer I_maxIndex267 = 0 integer wurst_stack_depth159 = 0 function initGlobals516() { } function main491() { initGlobals516(); init_test282("when calling init_test in defaultImplInClass, line 1"); } function config125() { } function init_test282(string __wurst_stackPos101) { local integer b200 local integer c973 local integer d432 local boolean andLeft207 wurst_stack_210[wurst_stack_depth_159] = __wurst_stackPos_101; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); b_200 = new_B165("when calling new_B in defaultImplInClass, line 14"); c_973 = new_C780("when calling new_C in defaultImplInClass, line 15"); d_432 = new_D111("when calling new_D in defaultImplInClass, line 16"); wurst_stack_210[wurst_stack_depth_159] = "when calling foo in defaultImplInClass, line 17"; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); if (I_typeId_135[b_200] == 0) { if (b_200 == 0) { error686("Nullpointer exception when calling B.foo", "when calling error in defaultImplInClass, line 7"); } else { error686("Called B.foo on invalid object.", "when calling error in defaultImplInClass, line 7"); }; } else { }; wurst_stack_depth_159 = (wurst_stack_depth_159 - 1); if (dispatch_I_test_I_foo155(c_973, "when calling foo in defaultImplInClass, line 17") == 5) { wurst_stack_210[wurst_stack_depth_159] = "when calling foo in defaultImplInClass, line 17"; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); if (I_typeId_135[d_432] == 0) { if (d_432 == 0) { error686("Nullpointer exception when calling D.foo", "when calling error in defaultImplInClass, line 11"); } else { error686("Called D.foo on invalid object.", "when calling error in defaultImplInClass, line 11"); }; } else { }; wurst_stack_depth_159 = (wurst_stack_depth_159 - 1); andLeft_207 = true; } else { andLeft_207 = false; }; if andLeft_207 { testSuccess100(); } else { }; wurst_stack_depth_159 = (wurst_stack_depth_159 - 1); } IS_NATIVE function testSuccess100() { } function new_B165(string __wurst_stackPos141) returns integer { local integer this889 wurst_stack_210[wurst_stack_depth_159] = __wurst_stackPos_141; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); wurst_stack_210[wurst_stack_depth_159] = "when calling alloc_B in defaultImplInClass, line 6"; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); if (I_firstFree_177 == 0) { if (I_maxIndex_267 < 32768) { I_maxIndex_267 = (I_maxIndex_267 + 1); this_889 = I_maxIndex_267; I_typeId_135[this_889] = 2; } else { error686("Out of memory: Could not create B.", "when calling error in defaultImplInClass, line 6"); this_889 = 0; }; } else { I_firstFree_177 = (I_firstFree_177 - 1); this_889 = I_nextFree_213[I_firstFree_177]; I_typeId_135[this_889] = 2; }; wurst_stack_depth_159 = ((wurst_stack_depth_159 - 1) - 1); return this_889; } function new_C780(string __wurst_stackPos198) returns integer { local integer this881 wurst_stack_210[wurst_stack_depth_159] = __wurst_stackPos_198; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); wurst_stack_210[wurst_stack_depth_159] = "when calling alloc_C in defaultImplInClass, line 9"; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); if (I_firstFree_177 == 0) { if (I_maxIndex_267 < 32768) { I_maxIndex_267 = (I_maxIndex_267 + 1); this_881 = I_maxIndex_267; I_typeId_135[this_881] = 3; } else { error686("Out of memory: Could not create C.", "when calling error in defaultImplInClass, line 9"); this_881 = 0; }; } else { I_firstFree_177 = (I_firstFree_177 - 1); this_881 = I_nextFree_213[I_firstFree_177]; I_typeId_135[this_881] = 3; }; wurst_stack_depth_159 = ((wurst_stack_depth_159 - 1) - 1); return this_881; } function new_D111(string __wurst_stackPos572) returns integer { local integer this198 wurst_stack_210[wurst_stack_depth_159] = __wurst_stackPos_572; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); wurst_stack_210[wurst_stack_depth_159] = "when calling alloc_D in defaultImplInClass, line 10"; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); if (I_firstFree_177 == 0) { if (I_maxIndex_267 < 32768) { I_maxIndex_267 = (I_maxIndex_267 + 1); this_198 = I_maxIndex_267; I_typeId_135[this_198] = 4; } else { error686("Out of memory: Could not create D.", "when calling error in defaultImplInClass, line 10"); this_198 = 0; }; } else { I_firstFree_177 = (I_firstFree_177 - 1); this_198 = I_nextFree_213[I_firstFree_177]; I_typeId_135[this_198] = 4; }; wurst_stack_depth_159 = ((wurst_stack_depth_159 - 1) - 1); return this_198; } function error686(string msg341, string __wurst_stackPos168) { local integer stacktraceIndex339 local integer stacktraceLimit433 wurst_stack_210[wurst_stack_depth_159] = __wurst_stackPos_168; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); __wurst_stackPos_168 = ""; stacktraceIndex_339 = wurst_stack_depth_159; stacktraceLimit_433 = 0; loop { stacktraceIndex_339 = (stacktraceIndex_339 - 1); stacktraceLimit_433 = (stacktraceLimit_433 + 1); exitwhen ((stacktraceLimit_433 > 20) or (stacktraceIndex_339 < 0)); __wurst_stackPos_168 = (__wurst_stackPos_168 + (" " + wurst_stack_210[stacktraceIndex_339])); }; $debugPrint494((msg_341 + (" " + __wurst_stackPos_168))); wurst_stack_depth_159 = (wurst_stack_depth_159 - 1); } function dispatch_I_test_I_foo155(integer this213, string __wurst_stackPos128) returns integer { wurst_stack_210[wurst_stack_depth_159] = __wurst_stackPos_128; wurst_stack_depth_159 = (wurst_stack_depth_159 + 1); if (I_typeId_135[this_213] == 0) { if (this_213 == 0) { error686("Nullpointer exception when calling I.foo", "when calling error in defaultImplInClass, line 4"); } else { error686("Called I.foo on invalid object.", "when calling error in defaultImplInClass, line 4"); }; } else { }; if (I_typeId_135[this_213] <= 2) { if (I_typeId_135[this_213] <= 1) { this_213 = 5; } else { this_213 = 2; }; } else { if (I_typeId_135[this_213] <= 3) { this_213 = 5; } else { this_213 = 3; }; }; wurst_stack_depth_159 = (wurst_stack_depth_159 - 1); return this_213; }