// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals integer array ToStringClosure_nextFree integer ToStringClosure_firstFree=0 integer ToStringClosure_maxIndex=0 integer array LinkedList_nextFree integer LinkedList_firstFree=0 integer LinkedList_maxIndex=0 endglobals function initGlobals takes nothing returns nothing set ToStringClosure_firstFree = 0 set ToStringClosure_maxIndex = 0 set LinkedList_firstFree = 0 set LinkedList_maxIndex = 0 endfunction function LinkedList_foo2 takes integer this, integer cls, string separator returns nothing endfunction function LinkedList_foo_1 takes integer this, integer cls, string separator returns nothing endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function alloc_ToStringClosure_foo2_test takes nothing returns integer local integer this if ToStringClosure_firstFree == 0 then if ToStringClosure_maxIndex < 32768 then set ToStringClosure_maxIndex = ToStringClosure_maxIndex + 1 set this = ToStringClosure_maxIndex else call error("Out of memory: Could not create ToStringClosure_foo2_test.") set this = 0 endif else set ToStringClosure_firstFree = ToStringClosure_firstFree - 1 set this = ToStringClosure_nextFree[ToStringClosure_firstFree] endif return this endfunction function alloc_ToStringClosure_foo_test takes nothing returns integer local integer this if ToStringClosure_firstFree == 0 then if ToStringClosure_maxIndex < 32768 then set ToStringClosure_maxIndex = ToStringClosure_maxIndex + 1 set this = ToStringClosure_maxIndex else call error("Out of memory: Could not create ToStringClosure_foo_test.") set this = 0 endif else set ToStringClosure_firstFree = ToStringClosure_firstFree - 1 set this = ToStringClosure_nextFree[ToStringClosure_firstFree] endif return this endfunction function LinkedList_foo takes integer this, string separator returns string local integer temp = this local integer clVar = alloc_ToStringClosure_foo_test() local integer clVar_1 local integer temp_1 call LinkedList_foo_1(temp, clVar, separator) set temp_1 = this set clVar_1 = alloc_ToStringClosure_foo2_test() call LinkedList_foo2(temp_1, clVar_1, separator) return separator endfunction function alloc_LinkedList takes nothing returns integer local integer this if LinkedList_firstFree == 0 then if LinkedList_maxIndex < 32768 then set LinkedList_maxIndex = LinkedList_maxIndex + 1 set this = LinkedList_maxIndex else call error("Out of memory: Could not create LinkedList.") set this = 0 endif else set LinkedList_firstFree = LinkedList_firstFree - 1 set this = LinkedList_nextFree[LinkedList_firstFree] endif return this endfunction function LinkedList_init takes integer this returns nothing endfunction function construct_LinkedList takes integer this returns nothing call LinkedList_init(this) endfunction function new_LinkedList takes nothing returns integer local integer this = alloc_LinkedList() call construct_LinkedList(this) return this endfunction function init_test takes nothing returns nothing local integer x = new_LinkedList() call LinkedList_foo(x, "a") endfunction function main takes nothing returns nothing call initGlobals() call init_test() endfunction function config takes nothing returns nothing endfunction