array test_s126 integer test_s_max397 array FoldClosure_nextFree161 integer FoldClosure_firstFree387 integer FoldClosure_maxIndex970 array FoldClosure_typeId174 array LinkedList_nextFree211 integer LinkedList_firstFree707 integer LinkedList_maxIndex111 array LinkedList_typeId202 array LinkedList_x173 integer test_s_max397 = -1 integer FoldClosure_firstFree387 = 0 integer FoldClosure_maxIndex970 = 0 integer LinkedList_firstFree707 = 0 integer LinkedList_maxIndex111 = 0 function initGlobals767() { FoldClosure_firstFree_387 = 0; FoldClosure_maxIndex_970 = 0; LinkedList_firstFree_707 = 0; LinkedList_maxIndex_111 = 0; } function main151() { initGlobals767(); init_test772(); } function config586() { } function init_test772() { local integer x151 test_s_max_397 = -1; x_151 = new_LinkedList179(); LinkedList_x_173[x_151] = 5; if (dispatch_LinkedList_test_LinkedList_toString373(x_151) == "[5,]") { testSuccess191(); } else { }; } function stringToIndex564(string b104) returns integer { test_s_max_397 = (test_s_max_397 + 1); test_s_126[test_s_max_397] = b_104; return test_s_max_397; } function stringFromIndex771(integer i211) returns string { return test_s_126[i_211]; } IS_NATIVE IS_EXTERN @extern function I2S354(integer i140) returns string { } IS_NATIVE function testSuccess191() { } function run_wrapper662(integer this415, any t126, any q113) returns any { return stringToIndex564(run_foldl_LinkedList_test103(this_415, t_126, stringFromIndex771(q_113))); } function LinkedList_foldl591(integer this185, any startValue275, integer predicate689) returns any { return dispatch_FoldClosure_test_FoldClosure_run157(predicate_689, LinkedList_x_173[this_185], startValue_275); } function LinkedList_toString138(integer this157) returns string { local string fold117 local integer clVar173 local integer temp193 local integer temp988 temp_193 = this_157; temp_988 = stringToIndex564("["); clVar_173 = alloc_FoldClosure_foldl_LinkedList_test152(); fold_117 = stringFromIndex771(dispatch_LinkedList_test_LinkedList_foldl944(temp_193, temp_988, clVar_173)); return (fold_117 + "]"); } function LinkedList_init810(integer this114) { } function new_LinkedList179() returns integer { local integer this136 this_136 = alloc_LinkedList207(); construct_LinkedList338(this_136); return this_136; } function construct_LinkedList338(integer this189) { LinkedList_init810(this_189); } function run_foldl_LinkedList_test103(integer this137, any i161, string q184) returns string { return ((q_184 + I2S354((i_161 castTo integer))) + ","); } function error639(string msg198) { $debugPrint162((msg_198 + (" " + #getStackTrace()))); } function alloc_LinkedList207() returns integer { local integer this112 if (LinkedList_firstFree_707 == 0) { if (LinkedList_maxIndex_111 < 32768) { LinkedList_maxIndex_111 = (LinkedList_maxIndex_111 + 1); this_112 = LinkedList_maxIndex_111; LinkedList_typeId_202[this_112] = 3; } else { error639("Out of memory: Could not create LinkedList."); this_112 = 0; }; } else { LinkedList_firstFree_707 = (LinkedList_firstFree_707 - 1); this_112 = LinkedList_nextFree_211[LinkedList_firstFree_707]; LinkedList_typeId_202[this_112] = 3; }; return this_112; } function alloc_FoldClosure_foldl_LinkedList_test152() returns integer { local integer this214 if (FoldClosure_firstFree_387 == 0) { if (FoldClosure_maxIndex_970 < 32768) { FoldClosure_maxIndex_970 = (FoldClosure_maxIndex_970 + 1); this_214 = FoldClosure_maxIndex_970; FoldClosure_typeId_174[this_214] = 2; } else { error639("Out of memory: Could not create FoldClosure_foldl_LinkedList_test."); this_214 = 0; }; } else { FoldClosure_firstFree_387 = (FoldClosure_firstFree_387 - 1); this_214 = FoldClosure_nextFree_161[FoldClosure_firstFree_387]; FoldClosure_typeId_174[this_214] = 2; }; return this_214; } function dispatch_FoldClosure_test_FoldClosure_run157(integer this532, any t870, any q121) returns any { local any test_FoldClosure_run_result136 if (FoldClosure_typeId_174[this_532] == 0) { if (this_532 == 0) { error639("Nullpointer exception when calling FoldClosure.run"); } else { error639("Called FoldClosure.run on invalid object."); }; } else { }; test_FoldClosure_run_result_136 = run_wrapper662(this_532, t_870, q_121); return test_FoldClosure_run_result_136; } function dispatch_LinkedList_test_LinkedList_foldl944(integer this130, any startValue201, integer predicate101) returns any { local any test_LinkedList_foldl_result154 if (LinkedList_typeId_202[this_130] == 0) { if (this_130 == 0) { error639("Nullpointer exception when calling LinkedList.foldl"); } else { error639("Called LinkedList.foldl on invalid object."); }; } else { }; test_LinkedList_foldl_result_154 = LinkedList_foldl591(this_130, startValue_201, predicate_101); return test_LinkedList_foldl_result_154; } function dispatch_LinkedList_test_LinkedList_toString373(integer this181) returns string { local string test_LinkedList_toString_result203 if (LinkedList_typeId_202[this_181] == 0) { if (this_181 == 0) { error639("Nullpointer exception when calling LinkedList.toString"); } else { error639("Called LinkedList.toString on invalid object."); }; } else { }; test_LinkedList_toString_result_203 = LinkedList_toString138(this_181); return test_LinkedList_toString_result_203; }