array I_nextFree150 integer I_firstFree165 integer I_maxIndex155 array I_typeId699 integer wurst_stack_depth993 array wurst_stack148 integer I_firstFree165 = 0 integer I_maxIndex155 = 0 integer wurst_stack_depth993 = 0 function initGlobals516() { } function main143() { initGlobals516(); init_test158("when calling init_test in defaultImplInClass, line 1"); } function config366() { } function init_test158(string __wurst_stackPos721) { local integer b113 local integer c203 local integer d351 local boolean andLeft135 wurst_stack_148[wurst_stack_depth_993] = __wurst_stackPos_721; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); b_113 = new_B164("when calling new_B in defaultImplInClass, line 14"); c_203 = new_C447("when calling new_C in defaultImplInClass, line 15"); d_351 = new_D150("when calling new_D in defaultImplInClass, line 16"); wurst_stack_148[wurst_stack_depth_993] = "when calling foo in defaultImplInClass, line 17"; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); if (I_typeId_699[b_113] == 0) { if (b_113 == 0) { error143("Nullpointer exception when calling B.foo", "when calling error in defaultImplInClass, line 7"); } else { error143("Called B.foo on invalid object.", "when calling error in defaultImplInClass, line 7"); }; } else { }; wurst_stack_depth_993 = (wurst_stack_depth_993 - 1); if (dispatch_I_test_I_foo863(c_203, "when calling foo in defaultImplInClass, line 17") == 5) { wurst_stack_148[wurst_stack_depth_993] = "when calling foo in defaultImplInClass, line 17"; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); if (I_typeId_699[d_351] == 0) { if (d_351 == 0) { error143("Nullpointer exception when calling D.foo", "when calling error in defaultImplInClass, line 11"); } else { error143("Called D.foo on invalid object.", "when calling error in defaultImplInClass, line 11"); }; } else { }; wurst_stack_depth_993 = (wurst_stack_depth_993 - 1); andLeft_135 = true; } else { andLeft_135 = false; }; if andLeft_135 { testSuccess387(); } else { }; wurst_stack_depth_993 = (wurst_stack_depth_993 - 1); } IS_NATIVE function testSuccess387() { } function new_B164(string __wurst_stackPos327) returns integer { local integer this147 wurst_stack_148[wurst_stack_depth_993] = __wurst_stackPos_327; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); wurst_stack_148[wurst_stack_depth_993] = "when calling alloc_B in defaultImplInClass, line 6"; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); if (I_firstFree_165 == 0) { if (I_maxIndex_155 < 32768) { I_maxIndex_155 = (I_maxIndex_155 + 1); this_147 = I_maxIndex_155; I_typeId_699[this_147] = 2; } else { error143("Out of memory: Could not create B.", "when calling error in defaultImplInClass, line 6"); this_147 = 0; }; } else { I_firstFree_165 = (I_firstFree_165 - 1); this_147 = I_nextFree_150[I_firstFree_165]; I_typeId_699[this_147] = 2; }; wurst_stack_depth_993 = ((wurst_stack_depth_993 - 1) - 1); return this_147; } function new_C447(string __wurst_stackPos932) returns integer { local integer this184 wurst_stack_148[wurst_stack_depth_993] = __wurst_stackPos_932; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); wurst_stack_148[wurst_stack_depth_993] = "when calling alloc_C in defaultImplInClass, line 9"; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); if (I_firstFree_165 == 0) { if (I_maxIndex_155 < 32768) { I_maxIndex_155 = (I_maxIndex_155 + 1); this_184 = I_maxIndex_155; I_typeId_699[this_184] = 3; } else { error143("Out of memory: Could not create C.", "when calling error in defaultImplInClass, line 9"); this_184 = 0; }; } else { I_firstFree_165 = (I_firstFree_165 - 1); this_184 = I_nextFree_150[I_firstFree_165]; I_typeId_699[this_184] = 3; }; wurst_stack_depth_993 = ((wurst_stack_depth_993 - 1) - 1); return this_184; } function new_D150(string __wurst_stackPos211) returns integer { local integer this130 wurst_stack_148[wurst_stack_depth_993] = __wurst_stackPos_211; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); wurst_stack_148[wurst_stack_depth_993] = "when calling alloc_D in defaultImplInClass, line 10"; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); if (I_firstFree_165 == 0) { if (I_maxIndex_155 < 32768) { I_maxIndex_155 = (I_maxIndex_155 + 1); this_130 = I_maxIndex_155; I_typeId_699[this_130] = 4; } else { error143("Out of memory: Could not create D.", "when calling error in defaultImplInClass, line 10"); this_130 = 0; }; } else { I_firstFree_165 = (I_firstFree_165 - 1); this_130 = I_nextFree_150[I_firstFree_165]; I_typeId_699[this_130] = 4; }; wurst_stack_depth_993 = ((wurst_stack_depth_993 - 1) - 1); return this_130; } function error143(string msg160, string __wurst_stackPos157) { local integer stacktraceIndex499 local integer stacktraceLimit114 wurst_stack_148[wurst_stack_depth_993] = __wurst_stackPos_157; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); __wurst_stackPos_157 = ""; stacktraceIndex_499 = wurst_stack_depth_993; stacktraceLimit_114 = 0; loop { stacktraceIndex_499 = (stacktraceIndex_499 - 1); stacktraceLimit_114 = (stacktraceLimit_114 + 1); exitwhen ((stacktraceLimit_114 > 20) or (stacktraceIndex_499 < 0)); __wurst_stackPos_157 = (__wurst_stackPos_157 + (" " + wurst_stack_148[stacktraceIndex_499])); }; $debugPrint991((msg_160 + (" " + __wurst_stackPos_157))); wurst_stack_depth_993 = (wurst_stack_depth_993 - 1); } function dispatch_I_test_I_foo863(integer this178, string __wurst_stackPos177) returns integer { wurst_stack_148[wurst_stack_depth_993] = __wurst_stackPos_177; wurst_stack_depth_993 = (wurst_stack_depth_993 + 1); if (I_typeId_699[this_178] == 0) { if (this_178 == 0) { error143("Nullpointer exception when calling I.foo", "when calling error in defaultImplInClass, line 4"); } else { error143("Called I.foo on invalid object.", "when calling error in defaultImplInClass, line 4"); }; } else { }; if (I_typeId_699[this_178] <= 2) { if (I_typeId_699[this_178] <= 1) { this_178 = 5; } else { this_178 = 2; }; } else { if (I_typeId_699[this_178] <= 3) { this_178 = 5; } else { this_178 = 3; }; }; wurst_stack_depth_993 = (wurst_stack_depth_993 - 1); return this_178; }