// this script was compiled with wurst 1.8.1.0-jenkins-Wurst-1365 globals integer A_x=0 integer array Runnable_nextFree integer Runnable_firstFree=0 integer Runnable_maxIndex=0 integer array Runnable_typeId endglobals native testSuccess takes nothing returns nothing function initGlobals takes nothing returns nothing endfunction function error takes string msg returns nothing call BJDebugMsg(msg + "\n" + "") endfunction function alloc_Runnable_twice_A takes nothing returns integer local integer this if Runnable_firstFree == 0 then if Runnable_maxIndex < 32768 then set Runnable_maxIndex = Runnable_maxIndex + 1 set this = Runnable_maxIndex set Runnable_typeId[this] = 2 else call error("Out of memory: Could not create Runnable_twice_A.") set this = 0 endif else set Runnable_firstFree = Runnable_firstFree - 1 set this = Runnable_nextFree[Runnable_firstFree] set Runnable_typeId[this] = 2 endif return this endfunction function run_twice_A takes integer this returns nothing set A_x = A_x + 1 endfunction function dispatch_Runnable_A_Runnable_run takes integer this returns nothing if Runnable_typeId[this] == 0 then if this == 0 then call error("Nullpointer exception when calling Runnable.run") else call error("Called Runnable.run on invalid object.") endif endif call run_twice_A(this) endfunction function twice takes integer r returns nothing call dispatch_Runnable_A_Runnable_run(r) call dispatch_Runnable_A_Runnable_run(r) endfunction function init_A takes nothing returns nothing call twice(alloc_Runnable_twice_A()) if A_x == 2 then call testSuccess() endif endfunction function main takes nothing returns nothing call initGlobals() call init_A() endfunction function config takes nothing returns nothing endfunction