integer BugClass_mws735 array MiddlewareUnary_nextFree121 integer MiddlewareUnary_firstFree165 integer MiddlewareUnary_maxIndex109 array MiddlewareUnary_typeId127 array CallbackUnary_nextFree211 integer CallbackUnary_firstFree691 integer CallbackUnary_maxIndex369 array CallbackUnary_typeId139 array BugClass_nextFree634 integer BugClass_firstFree267 integer BugClass_maxIndex743 array LinkedList_nextFree999 integer LinkedList_firstFree614 integer LinkedList_maxIndex147 array LinkedList_typeId905 array cb146 array cb_18118 array LinkedList_elem100 integer BugClass_mws735 = new_LinkedList155() integer MiddlewareUnary_firstFree165 = 0 integer MiddlewareUnary_maxIndex109 = 0 integer CallbackUnary_firstFree691 = 0 integer CallbackUnary_maxIndex369 = 0 integer BugClass_firstFree267 = 0 integer BugClass_maxIndex743 = 0 integer CallbackNullary_firstFree760 = 0 integer CallbackNullary_maxIndex162 = 0 integer LinkedList_firstFree614 = 0 integer LinkedList_maxIndex147 = 0 function initGlobals208() { MiddlewareUnary_firstFree_165 = 0; MiddlewareUnary_maxIndex_109 = 0; CallbackUnary_firstFree_691 = 0; CallbackUnary_maxIndex_369 = 0; BugClass_firstFree_267 = 0; BugClass_maxIndex_743 = 0; LinkedList_firstFree_614 = 0; LinkedList_maxIndex_147 = 0; } function main212() { initGlobals208(); init_Bug174(); } function config676() { } function init_Bug174() { local integer clVar172 local integer temp563 BugClass_mws_735 = new_LinkedList155(); temp_563 = BugClass_mws_735; clVar_172 = alloc_CallbackUnary_add_Bug686(); LinkedList_add_1166(temp_563, clVar_172); LinkedList_call928(BugClass_mws_735, new_BugClass132()); } function mwUnary169(integer cb189) returns integer { local integer clVar120 clVar_120 = alloc_MiddlewareUnary_Bug170(); cb_18_118[clVar_120] = cb_189; return clVar_120; } function LinkedList_call928(integer this143, any t0623) { local integer clVar160 local any temp159 local any temp261 temp_159 = LinkedList_elem_100[this_143]; temp_261 = t0_623; clVar_160 = alloc_CallbackUnary_call_Bug162(); dispatch_MiddlewareUnary_Bug_MiddlewareUnary_call121(temp_159, temp_261, clVar_160); } IS_NATIVE function println204(string msg272) { } IS_NATIVE function testSuccess144() { } function call_Bug134(integer this607, any t912, integer mwCb169) { dispatch_CallbackNullary_Bug_CallbackNullary_call112(cb_146[this_607]); dispatch_CallbackUnary_Bug_CallbackUnary_callAndDestroy156(mwCb_169, t_912); } function call_Bug_12187(integer this157, any t225, integer mwCb207) { dispatch_CallbackUnary_Bug_CallbackUnary_call150(cb_18_118[this_157], t_225); dispatch_CallbackUnary_Bug_CallbackUnary_callAndDestroy156(mwCb_207, t_225); } function call_call_Bug175(integer this141, any e108) { println204("called"); } function call_add_Bug148(integer this198, integer i112) { testSuccess144(); } function BugClass_init753(integer this548) { } function new_BugClass132() returns integer { local integer this107 this_107 = alloc_BugClass227(); construct_BugClass806(this_107); return this_107; } function construct_BugClass806(integer this129) { BugClass_init753(this_129); } function CallbackUnary_callAndDestroy183(integer this123, any t122) { dispatch_CallbackUnary_Bug_CallbackUnary_call150(this_123, t_122); dispatch_CallbackUnary_destroyCallbackUnary111(this_123); } function destroyCallbackUnary699(integer this212) { dealloc_CallbackUnary912(this_212); } function LinkedList_add138(integer this185, any t518) { LinkedList_elem_100[this_185] = t_518; } function LinkedList_init137(integer this112) { } function new_LinkedList155() returns integer { local integer this149 this_149 = alloc_LinkedList317(); construct_LinkedList189(this_149); return this_149; } function construct_LinkedList189(integer this186) { LinkedList_init137(this_186); } function error845(string msg166) { $debugPrint815((msg_166 + (" " + #getStackTrace()))); } function alloc_MiddlewareUnary_Bug170() returns integer { local integer this185 if (MiddlewareUnary_firstFree_165 == 0) { if (MiddlewareUnary_maxIndex_109 < 32768) { MiddlewareUnary_maxIndex_109 = (MiddlewareUnary_maxIndex_109 + 1); this_185 = MiddlewareUnary_maxIndex_109; MiddlewareUnary_typeId_127[this_185] = 9; } else { error845("Out of memory: Could not create MiddlewareUnary_Bug."); this_185 = 0; }; } else { MiddlewareUnary_firstFree_165 = (MiddlewareUnary_firstFree_165 - 1); this_185 = MiddlewareUnary_nextFree_121[MiddlewareUnary_firstFree_165]; MiddlewareUnary_typeId_127[this_185] = 9; }; return this_185; } function alloc_CallbackUnary_call_Bug162() returns integer { local integer this146 if (CallbackUnary_firstFree_691 == 0) { if (CallbackUnary_maxIndex_369 < 32768) { CallbackUnary_maxIndex_369 = (CallbackUnary_maxIndex_369 + 1); this_146 = CallbackUnary_maxIndex_369; CallbackUnary_typeId_139[this_146] = 5; } else { error845("Out of memory: Could not create CallbackUnary_call_Bug."); this_146 = 0; }; } else { CallbackUnary_firstFree_691 = (CallbackUnary_firstFree_691 - 1); this_146 = CallbackUnary_nextFree_211[CallbackUnary_firstFree_691]; CallbackUnary_typeId_139[this_146] = 5; }; return this_146; } function alloc_CallbackUnary_add_Bug686() returns integer { local integer this166 if (CallbackUnary_firstFree_691 == 0) { if (CallbackUnary_maxIndex_369 < 32768) { CallbackUnary_maxIndex_369 = (CallbackUnary_maxIndex_369 + 1); this_166 = CallbackUnary_maxIndex_369; CallbackUnary_typeId_139[this_166] = 4; } else { error845("Out of memory: Could not create CallbackUnary_add_Bug."); this_166 = 0; }; } else { CallbackUnary_firstFree_691 = (CallbackUnary_firstFree_691 - 1); this_166 = CallbackUnary_nextFree_211[CallbackUnary_firstFree_691]; CallbackUnary_typeId_139[this_166] = 4; }; return this_166; } function alloc_BugClass227() returns integer { local integer this825 if (BugClass_firstFree_267 == 0) { if (BugClass_maxIndex_743 < 32768) { BugClass_maxIndex_743 = (BugClass_maxIndex_743 + 1); this_825 = BugClass_maxIndex_743; } else { error845("Out of memory: Could not create BugClass."); this_825 = 0; }; } else { BugClass_firstFree_267 = (BugClass_firstFree_267 - 1); this_825 = BugClass_nextFree_634[BugClass_firstFree_267]; }; return this_825; } function dealloc_CallbackUnary912(integer obj171) { if (CallbackUnary_typeId_139[obj_171] == 0) { error845("Double free: object of type CallbackUnary"); } else { CallbackUnary_nextFree_211[CallbackUnary_firstFree_691] = obj_171; CallbackUnary_firstFree_691 = (CallbackUnary_firstFree_691 + 1); CallbackUnary_typeId_139[obj_171] = 0; }; } function alloc_LinkedList317() returns integer { local integer this173 if (LinkedList_firstFree_614 == 0) { if (LinkedList_maxIndex_147 < 32768) { LinkedList_maxIndex_147 = (LinkedList_maxIndex_147 + 1); this_173 = LinkedList_maxIndex_147; LinkedList_typeId_905[this_173] = 6; } else { error845("Out of memory: Could not create LinkedList."); this_173 = 0; }; } else { LinkedList_firstFree_614 = (LinkedList_firstFree_614 - 1); this_173 = LinkedList_nextFree_999[LinkedList_firstFree_614]; LinkedList_typeId_905[this_173] = 6; }; return this_173; } function dispatch_CallbackNullary_Bug_CallbackNullary_call112(integer this185) { } function dispatch_CallbackUnary_destroyCallbackUnary111(integer this373) { if (CallbackUnary_typeId_139[this_373] == 0) { if (this_373 == 0) { error845("Nullpointer exception when calling CallbackUnary.CallbackUnary"); } else { error845("Called CallbackUnary.CallbackUnary on invalid object."); }; } else { }; destroyCallbackUnary699(this_373); } function dispatch_CallbackUnary_Bug_CallbackUnary_call150(integer this142, any t348) { if (CallbackUnary_typeId_139[this_142] == 0) { if (this_142 == 0) { error845("Nullpointer exception when calling CallbackUnary.call"); } else { error845("Called CallbackUnary.call on invalid object."); }; } else { }; if (CallbackUnary_typeId_139[this_142] <= 4) { call_add_Bug148(this_142, t_348); } else { call_call_Bug175(this_142, t_348); }; } function dispatch_CallbackUnary_Bug_CallbackUnary_callAndDestroy156(integer this202, any t204) { if (CallbackUnary_typeId_139[this_202] == 0) { if (this_202 == 0) { error845("Nullpointer exception when calling CallbackUnary.callAndDestroy"); } else { error845("Called CallbackUnary.callAndDestroy on invalid object."); }; } else { }; CallbackUnary_callAndDestroy183(this_202, t_204); } function dispatch_LinkedList_Bug_LinkedList_add137(integer this224, any t108) { if (LinkedList_typeId_905[this_224] == 0) { if (this_224 == 0) { error845("Nullpointer exception when calling LinkedList.add"); } else { error845("Called LinkedList.add on invalid object."); }; } else { }; LinkedList_add138(this_224, t_108); } function dispatch_MiddlewareUnary_Bug_MiddlewareUnary_call121(integer this928, any t805, integer cb115) { if (MiddlewareUnary_typeId_127[this_928] == 0) { if (this_928 == 0) { error845("Nullpointer exception when calling MiddlewareUnary.call"); } else { error845("Called MiddlewareUnary.call on invalid object."); }; } else { }; if (MiddlewareUnary_typeId_127[this_928] <= 8) { call_Bug134(this_928, t_805, cb_115); } else { call_Bug_12187(this_928, t_805, cb_115); }; } function LinkedList_add_1166(integer this144, integer cbs_0122) { dispatch_LinkedList_Bug_LinkedList_add137(this_144, mwUnary169(cbs_0_122)); }