// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1366 globals integer array F_nextFree integer F_firstFree=0 integer F_maxIndex=0 integer array F_typeId integer array Cell_nextFree integer Cell_firstFree=0 integer Cell_maxIndex=0 integer array Cell_typeId integer array Cell_elem integer wurst_stack_depth=0 string array wurst_stack endglobals native println takes string s returns nothing native testSuccess takes nothing returns nothing function initGlobals takes nothing returns nothing endfunction function error takes string msg, string w__wurst_stackPos returns nothing local integer stacktraceIndex local integer stacktraceLimit set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set w__wurst_stackPos = "" set stacktraceIndex = wurst_stack_depth set stacktraceLimit = 0 loop set stacktraceIndex = stacktraceIndex - 1 set stacktraceLimit = stacktraceLimit + 1 exitwhen stacktraceLimit > 20 or stacktraceIndex < 0 set w__wurst_stackPos = w__wurst_stackPos + "\n " + wurst_stack[stacktraceIndex] endloop call BJDebugMsg(msg + "\n" + w__wurst_stackPos) set wurst_stack_depth = wurst_stack_depth - 1 endfunction function new_Cell takes integer t, string w__wurst_stackPos returns integer local integer this set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set wurst_stack[wurst_stack_depth] = "when calling alloc_Cell in implicitConversions5, line 14" set wurst_stack_depth = wurst_stack_depth + 1 if Cell_firstFree == 0 then if Cell_maxIndex < 32768 then set Cell_maxIndex = Cell_maxIndex + 1 set this = Cell_maxIndex set Cell_typeId[this] = 1 else call error("Out of memory: Could not create Cell.", "when calling error in implicitConversions5, line 12") set this = 0 endif else set Cell_firstFree = Cell_firstFree - 1 set this = Cell_nextFree[Cell_firstFree] set Cell_typeId[this] = 1 endif set wurst_stack_depth = wurst_stack_depth - 1 set Cell_elem[this] = t set wurst_stack_depth = wurst_stack_depth - 1 return this endfunction function Cell_map takes integer this, integer f, string w__wurst_stackPos returns integer local integer a set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set a = Cell_elem[this] set wurst_stack[wurst_stack_depth] = "when calling apply in implicitConversions5, line 19" set wurst_stack_depth = wurst_stack_depth + 1 if F_typeId[f] == 0 then if f == 0 then call error("Nullpointer exception when calling F.apply", "when calling error in implicitConversions5, line 11") else call error("Called F.apply on invalid object.", "when calling error in implicitConversions5, line 11") endif endif set a = R2I(a * 10. * 1000.) set wurst_stack_depth = wurst_stack_depth - 1 set this = new_Cell(a, "when calling new_Cell in implicitConversions5, line 19") set wurst_stack_depth = wurst_stack_depth - 1 return this endfunction function init_test takes string w__wurst_stackPos returns nothing local integer a local integer this local real this_1 local integer test_Cell_get_result set wurst_stack[wurst_stack_depth] = w__wurst_stackPos set wurst_stack_depth = wurst_stack_depth + 1 set a = new_Cell(5, "when calling new_Cell in implicitConversions5, line 26") set wurst_stack[wurst_stack_depth] = "when calling alloc_F_map_test in implicitConversions5, line 27" set wurst_stack_depth = wurst_stack_depth + 1 if F_firstFree == 0 then if F_maxIndex < 32768 then set F_maxIndex = F_maxIndex + 1 set this = F_maxIndex set F_typeId[this] = 3 else call error("Out of memory: Could not create F_map_test.", "when calling error in implicitConversions5, line 27") set this = 0 endif else set F_firstFree = F_firstFree - 1 set this = F_nextFree[F_firstFree] set F_typeId[this] = 3 endif set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling map in implicitConversions5, line 27" set wurst_stack_depth = wurst_stack_depth + 1 if Cell_typeId[a] == 0 then if a == 0 then call error("Nullpointer exception when calling Cell.map", "when calling error in implicitConversions5, line 18") else call error("Called Cell.map on invalid object.", "when calling error in implicitConversions5, line 18") endif endif set a = Cell_map(a, this, "when calling map in implicitConversions5, line 18") set wurst_stack_depth = wurst_stack_depth - 1 set wurst_stack[wurst_stack_depth] = "when calling get in implicitConversions5, line 28" set wurst_stack_depth = wurst_stack_depth + 1 if Cell_typeId[a] == 0 then if a == 0 then call error("Nullpointer exception when calling Cell.get", "when calling error in implicitConversions5, line 16") else call error("Called Cell.get on invalid object.", "when calling error in implicitConversions5, line 16") endif endif set test_Cell_get_result = Cell_elem[a] set wurst_stack_depth = wurst_stack_depth - 1 set this_1 = test_Cell_get_result / 1000. if this_1 == 50. then call testSuccess() else call println(R2S(this_1)) endif set wurst_stack_depth = wurst_stack_depth - 1 endfunction function main takes nothing returns nothing call initGlobals() call init_test("when calling init_test in implicitConversions5, line 1") endfunction function config takes nothing returns nothing endfunction