array C_nextFree507 integer C_firstFree122 integer C_maxIndex308 array C_typeId106 integer wurst_stack_depth199 array wurst_stack831 integer C_firstFree122 = 0 integer C_maxIndex308 = 0 integer wurst_stack_depth199 = 0 function initGlobals758() { } function main384() { initGlobals758(); init_test175("when calling init_test in modules_import, line 6"); } function config197() { } function init_test175(string __wurst_stackPos177) { local integer c119 wurst_stack_831[wurst_stack_depth_199] = __wurst_stackPos_177; wurst_stack_depth_199 = (wurst_stack_depth_199 + 1); c_119 = new_C154("when calling new_C in modules_import, line 12"); wurst_stack_831[wurst_stack_depth_199] = "when calling foo in modules_import, line 13"; wurst_stack_depth_199 = (wurst_stack_depth_199 + 1); if (C_typeId_106[c_119] == 0) { if (c_119 == 0) { error102("Nullpointer exception when calling C.foo", "when calling error in modules_import, line 3"); } else { error102("Called C.foo on invalid object.", "when calling error in modules_import, line 3"); }; } else { }; wurst_stack_depth_199 = (wurst_stack_depth_199 - 1); testSuccess205(); wurst_stack_depth_199 = (wurst_stack_depth_199 - 1); } IS_NATIVE function testSuccess205() { } function new_C154(string __wurst_stackPos136) returns integer { local integer this943 wurst_stack_831[wurst_stack_depth_199] = __wurst_stackPos_136; wurst_stack_depth_199 = (wurst_stack_depth_199 + 1); wurst_stack_831[wurst_stack_depth_199] = "when calling alloc_C in modules_import, line 9"; wurst_stack_depth_199 = (wurst_stack_depth_199 + 1); if (C_firstFree_122 == 0) { if (C_maxIndex_308 < 32768) { C_maxIndex_308 = (C_maxIndex_308 + 1); this_943 = C_maxIndex_308; C_typeId_106[this_943] = 1; } else { error102("Out of memory: Could not create C.", "when calling error in modules_import, line 9"); this_943 = 0; }; } else { C_firstFree_122 = (C_firstFree_122 - 1); this_943 = C_nextFree_507[C_firstFree_122]; C_typeId_106[this_943] = 1; }; wurst_stack_depth_199 = ((wurst_stack_depth_199 - 1) - 1); return this_943; } function error102(string msg209, string __wurst_stackPos917) { local integer stacktraceIndex175 local integer stacktraceLimit129 wurst_stack_831[wurst_stack_depth_199] = __wurst_stackPos_917; wurst_stack_depth_199 = (wurst_stack_depth_199 + 1); __wurst_stackPos_917 = ""; stacktraceIndex_175 = wurst_stack_depth_199; stacktraceLimit_129 = 0; loop { stacktraceIndex_175 = (stacktraceIndex_175 - 1); stacktraceLimit_129 = (stacktraceLimit_129 + 1); exitwhen ((stacktraceLimit_129 > 20) or (stacktraceIndex_175 < 0)); __wurst_stackPos_917 = (__wurst_stackPos_917 + (" " + wurst_stack_831[stacktraceIndex_175])); }; $debugPrint182((msg_209 + (" " + __wurst_stackPos_917))); wurst_stack_depth_199 = (wurst_stack_depth_199 - 1); }