array C_nextFree911 integer C_firstFree178 integer C_maxIndex564 array C_typeId356 integer wurst_stack_depth156 array wurst_stack709 integer C_firstFree178 = 0 integer C_maxIndex564 = 0 integer wurst_stack_depth156 = 0 function initGlobals128() { } function main137() { initGlobals128(); init_test606("when calling init_test in modules_import, line 6"); } function config683() { } function init_test606(string __wurst_stackPos858) { local integer c699 wurst_stack_709[wurst_stack_depth_156] = __wurst_stackPos_858; wurst_stack_depth_156 = (wurst_stack_depth_156 + 1); c_699 = new_C943("when calling new_C in modules_import, line 12"); wurst_stack_709[wurst_stack_depth_156] = "when calling foo in modules_import, line 13"; wurst_stack_depth_156 = (wurst_stack_depth_156 + 1); if (C_typeId_356[c_699] == 0) { if (c_699 == 0) { error171("Nullpointer exception when calling C.foo", "when calling error in modules_import, line 3"); } else { error171("Called C.foo on invalid object.", "when calling error in modules_import, line 3"); }; } else { }; wurst_stack_depth_156 = (wurst_stack_depth_156 - 1); testSuccess642(); wurst_stack_depth_156 = (wurst_stack_depth_156 - 1); } IS_NATIVE function testSuccess642() { } function new_C943(string __wurst_stackPos342) returns integer { local integer this134 wurst_stack_709[wurst_stack_depth_156] = __wurst_stackPos_342; wurst_stack_depth_156 = (wurst_stack_depth_156 + 1); wurst_stack_709[wurst_stack_depth_156] = "when calling alloc_C in modules_import, line 9"; wurst_stack_depth_156 = (wurst_stack_depth_156 + 1); if (C_firstFree_178 == 0) { if (C_maxIndex_564 < 32768) { C_maxIndex_564 = (C_maxIndex_564 + 1); this_134 = C_maxIndex_564; C_typeId_356[this_134] = 1; } else { error171("Out of memory: Could not create C.", "when calling error in modules_import, line 9"); this_134 = 0; }; } else { C_firstFree_178 = (C_firstFree_178 - 1); this_134 = C_nextFree_911[C_firstFree_178]; C_typeId_356[this_134] = 1; }; wurst_stack_depth_156 = ((wurst_stack_depth_156 - 1) - 1); return this_134; } function error171(string msg194, string __wurst_stackPos876) { local integer stacktraceIndex598 local integer stacktraceLimit208 wurst_stack_709[wurst_stack_depth_156] = __wurst_stackPos_876; wurst_stack_depth_156 = (wurst_stack_depth_156 + 1); __wurst_stackPos_876 = ""; stacktraceIndex_598 = wurst_stack_depth_156; stacktraceLimit_208 = 0; loop { stacktraceIndex_598 = (stacktraceIndex_598 - 1); stacktraceLimit_208 = (stacktraceLimit_208 + 1); exitwhen ((stacktraceLimit_208 > 20) or (stacktraceIndex_598 < 0)); __wurst_stackPos_876 = (__wurst_stackPos_876 + (" " + wurst_stack_709[stacktraceIndex_598])); }; $debugPrint233((msg_194 + (" " + __wurst_stackPos_876))); wurst_stack_depth_156 = (wurst_stack_depth_156 - 1); }