array A_nextFree182 integer A_firstFree113 integer A_maxIndex948 array Cell_nextFree108 integer Cell_firstFree129 integer Cell_maxIndex107 array Cell_typeId150 array A_x187 array Cell_x128 integer wurst_stack_depth194 array wurst_stack276 integer A_firstFree113 = 0 integer A_maxIndex948 = 0 integer Cell_firstFree129 = 0 integer Cell_maxIndex107 = 0 integer wurst_stack_depth194 = 0 function initGlobals103() { } function main861() { initGlobals103(); init_test183("when calling init_test in castToIntGenerics2, line 1"); } function config150() { } function init_test183(string __wurst_stackPos850) { local integer a208 local integer c182 local any test_Cell_get_result155 wurst_stack_276[wurst_stack_depth_194] = __wurst_stackPos_850; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); a_208 = new_A183(42, "when calling new_A in castToIntGenerics2, line 14"); c_182 = new_Cell172("when calling new_Cell in castToIntGenerics2, line 15"); wurst_stack_276[wurst_stack_depth_194] = "when calling set in castToIntGenerics2, line 16"; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); if (Cell_typeId_150[c_182] == 0) { if (c_182 == 0) { error893("Nullpointer exception when calling Cell.set", "when calling error in castToIntGenerics2, line 9"); } else { error893("Called Cell.set on invalid object.", "when calling error in castToIntGenerics2, line 9"); }; } else { }; Cell_x_128[c_182] = (a_208 castTo integer); wurst_stack_depth_194 = (wurst_stack_depth_194 - 1); wurst_stack_276[wurst_stack_depth_194] = "when calling get in castToIntGenerics2, line 17"; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); if (Cell_typeId_150[c_182] == 0) { if (c_182 == 0) { error893("Nullpointer exception when calling Cell.get", "when calling error in castToIntGenerics2, line 11"); } else { error893("Called Cell.get on invalid object.", "when calling error in castToIntGenerics2, line 11"); }; } else { }; test_Cell_get_result_155 = (Cell_x_128[c_182] castTo any); wurst_stack_depth_194 = (wurst_stack_depth_194 - 1); if (A_x_187[test_Cell_get_result_155] == 42) { testSuccess177(); } else { }; wurst_stack_depth_194 = (wurst_stack_depth_194 - 1); } IS_NATIVE function testSuccess177() { } function new_A183(integer x159, string __wurst_stackPos202) returns integer { local integer this904 wurst_stack_276[wurst_stack_depth_194] = __wurst_stackPos_202; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); wurst_stack_276[wurst_stack_depth_194] = "when calling alloc_A in castToIntGenerics2, line 5"; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); if (A_firstFree_113 == 0) { if (A_maxIndex_948 < 32768) { A_maxIndex_948 = (A_maxIndex_948 + 1); this_904 = A_maxIndex_948; } else { error893("Out of memory: Could not create A.", "when calling error in castToIntGenerics2, line 3"); this_904 = 0; }; } else { A_firstFree_113 = (A_firstFree_113 - 1); this_904 = A_nextFree_182[A_firstFree_113]; }; wurst_stack_depth_194 = (wurst_stack_depth_194 - 1); A_x_187[this_904] = 1; A_x_187[this_904] = x_159; wurst_stack_depth_194 = (wurst_stack_depth_194 - 1); return this_904; } function new_Cell172(string __wurst_stackPos200) returns integer { local integer this212 wurst_stack_276[wurst_stack_depth_194] = __wurst_stackPos_200; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); wurst_stack_276[wurst_stack_depth_194] = "when calling alloc_Cell in castToIntGenerics2, line 7"; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); if (Cell_firstFree_129 == 0) { if (Cell_maxIndex_107 < 32768) { Cell_maxIndex_107 = (Cell_maxIndex_107 + 1); this_212 = Cell_maxIndex_107; Cell_typeId_150[this_212] = 2; } else { error893("Out of memory: Could not create Cell.", "when calling error in castToIntGenerics2, line 7"); this_212 = 0; }; } else { Cell_firstFree_129 = (Cell_firstFree_129 - 1); this_212 = Cell_nextFree_108[Cell_firstFree_129]; Cell_typeId_150[this_212] = 2; }; wurst_stack_depth_194 = ((wurst_stack_depth_194 - 1) - 1); return this_212; } function error893(string msg202, string __wurst_stackPos858) { local integer stacktraceIndex266 local integer stacktraceLimit279 wurst_stack_276[wurst_stack_depth_194] = __wurst_stackPos_858; wurst_stack_depth_194 = (wurst_stack_depth_194 + 1); __wurst_stackPos_858 = ""; stacktraceIndex_266 = wurst_stack_depth_194; stacktraceLimit_279 = 0; loop { stacktraceIndex_266 = (stacktraceIndex_266 - 1); stacktraceLimit_279 = (stacktraceLimit_279 + 1); exitwhen ((stacktraceLimit_279 > 20) or (stacktraceIndex_266 < 0)); __wurst_stackPos_858 = (__wurst_stackPos_858 + (" " + wurst_stack_276[stacktraceIndex_266])); }; $debugPrint764((msg_202 + (" " + __wurst_stackPos_858))); wurst_stack_depth_194 = (wurst_stack_depth_194 - 1); }