array C_nextFree429 integer C_firstFree196 integer C_maxIndex388 array C_typeId132 integer wurst_stack_depth448 array wurst_stack854 integer C_firstFree196 = 0 integer C_maxIndex388 = 0 integer wurst_stack_depth448 = 0 function initGlobals180() { } function main117() { initGlobals180(); init_test156("when calling init_test in modules_call_global, line 5"); } function config197() { } function init_test156(string __wurst_stackPos998) { local integer c190 wurst_stack_854[wurst_stack_depth_448] = __wurst_stackPos_998; wurst_stack_depth_448 = (wurst_stack_depth_448 + 1); c_190 = new_C466("when calling new_C in modules_call_global, line 13"); wurst_stack_854[wurst_stack_depth_448] = "when calling foo in modules_call_global, line 14"; wurst_stack_depth_448 = (wurst_stack_depth_448 + 1); if (C_typeId_132[c_190] == 0) { if (c_190 == 0) { error510("Nullpointer exception when calling C.foo", "when calling error in modules_call_global, line 8"); } else { error510("Called C.foo on invalid object.", "when calling error in modules_call_global, line 8"); }; } else { }; wurst_stack_depth_448 = (wurst_stack_depth_448 - 1); testSuccess507(); wurst_stack_depth_448 = (wurst_stack_depth_448 - 1); } IS_NATIVE function testSuccess507() { } function new_C466(string __wurst_stackPos164) returns integer { local integer this180 wurst_stack_854[wurst_stack_depth_448] = __wurst_stackPos_164; wurst_stack_depth_448 = (wurst_stack_depth_448 + 1); wurst_stack_854[wurst_stack_depth_448] = "when calling alloc_C in modules_call_global, line 10"; wurst_stack_depth_448 = (wurst_stack_depth_448 + 1); if (C_firstFree_196 == 0) { if (C_maxIndex_388 < 32768) { C_maxIndex_388 = (C_maxIndex_388 + 1); this_180 = C_maxIndex_388; C_typeId_132[this_180] = 1; } else { error510("Out of memory: Could not create C.", "when calling error in modules_call_global, line 10"); this_180 = 0; }; } else { C_firstFree_196 = (C_firstFree_196 - 1); this_180 = C_nextFree_429[C_firstFree_196]; C_typeId_132[this_180] = 1; }; wurst_stack_depth_448 = ((wurst_stack_depth_448 - 1) - 1); return this_180; } function error510(string msg863, string __wurst_stackPos173) { local integer stacktraceIndex109 local integer stacktraceLimit209 wurst_stack_854[wurst_stack_depth_448] = __wurst_stackPos_173; wurst_stack_depth_448 = (wurst_stack_depth_448 + 1); __wurst_stackPos_173 = ""; stacktraceIndex_109 = wurst_stack_depth_448; stacktraceLimit_209 = 0; loop { stacktraceIndex_109 = (stacktraceIndex_109 - 1); stacktraceLimit_209 = (stacktraceLimit_209 + 1); exitwhen ((stacktraceLimit_209 > 20) or (stacktraceIndex_109 < 0)); __wurst_stackPos_173 = (__wurst_stackPos_173 + (" " + wurst_stack_854[stacktraceIndex_109])); }; $debugPrint197((msg_863 + (" " + __wurst_stackPos_173))); wurst_stack_depth_448 = (wurst_stack_depth_448 - 1); }