array A_nextFree446 integer A_firstFree107 integer A_maxIndex235 array Cell_nextFree151 integer Cell_firstFree193 integer Cell_maxIndex756 array Cell_typeId205 array A_x111 array Cell_x897 integer wurst_stack_depth201 array wurst_stack213 integer A_firstFree107 = 0 integer A_maxIndex235 = 0 integer Cell_firstFree193 = 0 integer Cell_maxIndex756 = 0 integer wurst_stack_depth201 = 0 function initGlobals246() { } function main532() { initGlobals246(); init_test584("when calling init_test in castToIntGenerics2, line 1"); } function config156() { } function init_test584(string __wurst_stackPos182) { local integer a260 local integer c116 local any test_Cell_get_result529 wurst_stack_213[wurst_stack_depth_201] = __wurst_stackPos_182; wurst_stack_depth_201 = (wurst_stack_depth_201 + 1); a_260 = new_A548(42, "when calling new_A in castToIntGenerics2, line 14"); c_116 = new_Cell462("when calling new_Cell in castToIntGenerics2, line 15"); wurst_stack_213[wurst_stack_depth_201] = "when calling set in castToIntGenerics2, line 16"; wurst_stack_depth_201 = (wurst_stack_depth_201 + 1); if (Cell_typeId_205[c_116] == 0) { if (c_116 == 0) { error923("Nullpointer exception when calling Cell.set", "when calling error in castToIntGenerics2, line 9"); } else { error923("Called Cell.set on invalid object.", "when calling error in castToIntGenerics2, line 9"); }; } else { }; Cell_x_897[c_116] = (a_260 castTo integer); wurst_stack_depth_201 = (wurst_stack_depth_201 - 1); wurst_stack_213[wurst_stack_depth_201] = "when calling get in castToIntGenerics2, line 17"; wurst_stack_depth_201 = (wurst_stack_depth_201 + 1); if (Cell_typeId_205[c_116] == 0) { if (c_116 == 0) { error923("Nullpointer exception when calling Cell.get", "when calling error in castToIntGenerics2, line 11"); } else { error923("Called Cell.get on invalid object.", "when calling error in castToIntGenerics2, line 11"); }; } else { }; test_Cell_get_result_529 = (Cell_x_897[c_116] castTo any); wurst_stack_depth_201 = (wurst_stack_depth_201 - 1); if (A_x_111[test_Cell_get_result_529] == 42) { testSuccess106(); } else { }; wurst_stack_depth_201 = (wurst_stack_depth_201 - 1); } IS_NATIVE function testSuccess106() { } function new_A548(integer x932, string __wurst_stackPos730) returns integer { local integer this172 wurst_stack_213[wurst_stack_depth_201] = __wurst_stackPos_730; wurst_stack_depth_201 = (wurst_stack_depth_201 + 1); wurst_stack_213[wurst_stack_depth_201] = "when calling alloc_A in castToIntGenerics2, line 5"; wurst_stack_depth_201 = (wurst_stack_depth_201 + 1); if (A_firstFree_107 == 0) { if (A_maxIndex_235 < 32768) { A_maxIndex_235 = (A_maxIndex_235 + 1); this_172 = A_maxIndex_235; } else { error923("Out of memory: Could not create A.", "when calling error in castToIntGenerics2, line 3"); this_172 = 0; }; } else { A_firstFree_107 = (A_firstFree_107 - 1); this_172 = A_nextFree_446[A_firstFree_107]; }; wurst_stack_depth_201 = (wurst_stack_depth_201 - 1); A_x_111[this_172] = 1; A_x_111[this_172] = x_932; wurst_stack_depth_201 = (wurst_stack_depth_201 - 1); return this_172; } function new_Cell462(string __wurst_stackPos184) returns integer { local integer this138 wurst_stack_213[wurst_stack_depth_201] = __wurst_stackPos_184; wurst_stack_depth_201 = (wurst_stack_depth_201 + 1); wurst_stack_213[wurst_stack_depth_201] = "when calling alloc_Cell in castToIntGenerics2, line 7"; wurst_stack_depth_201 = (wurst_stack_depth_201 + 1); if (Cell_firstFree_193 == 0) { if (Cell_maxIndex_756 < 32768) { Cell_maxIndex_756 = (Cell_maxIndex_756 + 1); this_138 = Cell_maxIndex_756; Cell_typeId_205[this_138] = 2; } else { error923("Out of memory: Could not create Cell.", "when calling error in castToIntGenerics2, line 7"); this_138 = 0; }; } else { Cell_firstFree_193 = (Cell_firstFree_193 - 1); this_138 = Cell_nextFree_151[Cell_firstFree_193]; Cell_typeId_205[this_138] = 2; }; wurst_stack_depth_201 = ((wurst_stack_depth_201 - 1) - 1); return this_138; } function error923(string msg161, string __wurst_stackPos103) { local integer stacktraceIndex421 local integer stacktraceLimit198 wurst_stack_213[wurst_stack_depth_201] = __wurst_stackPos_103; wurst_stack_depth_201 = (wurst_stack_depth_201 + 1); __wurst_stackPos_103 = ""; stacktraceIndex_421 = wurst_stack_depth_201; stacktraceLimit_198 = 0; loop { stacktraceIndex_421 = (stacktraceIndex_421 - 1); stacktraceLimit_198 = (stacktraceLimit_198 + 1); exitwhen ((stacktraceLimit_198 > 20) or (stacktraceIndex_421 < 0)); __wurst_stackPos_103 = (__wurst_stackPos_103 + (" " + wurst_stack_213[stacktraceIndex_421])); }; $debugPrint119((msg_161 + (" " + __wurst_stackPos_103))); wurst_stack_depth_201 = (wurst_stack_depth_201 - 1); }