integer BugClass_mws742 array MiddlewareUnary_nextFree169 integer MiddlewareUnary_firstFree185 integer MiddlewareUnary_maxIndex127 array MiddlewareUnary_typeId156 array CallbackUnary_nextFree269 integer CallbackUnary_firstFree193 integer CallbackUnary_maxIndex927 array CallbackUnary_typeId161 array BugClass_nextFree120 integer BugClass_firstFree135 integer BugClass_maxIndex200 array LinkedList_nextFree183 integer LinkedList_firstFree871 integer LinkedList_maxIndex192 array LinkedList_typeId201 array cb757 array cb_18126 array LinkedList_elem202 integer BugClass_mws742 = new_LinkedList103() integer MiddlewareUnary_firstFree185 = 0 integer MiddlewareUnary_maxIndex127 = 0 integer CallbackUnary_firstFree193 = 0 integer CallbackUnary_maxIndex927 = 0 integer BugClass_firstFree135 = 0 integer BugClass_maxIndex200 = 0 integer CallbackNullary_firstFree641 = 0 integer CallbackNullary_maxIndex304 = 0 integer LinkedList_firstFree871 = 0 integer LinkedList_maxIndex192 = 0 function initGlobals825() { MiddlewareUnary_firstFree_185 = 0; MiddlewareUnary_maxIndex_127 = 0; CallbackUnary_firstFree_193 = 0; CallbackUnary_maxIndex_927 = 0; BugClass_firstFree_135 = 0; BugClass_maxIndex_200 = 0; LinkedList_firstFree_871 = 0; LinkedList_maxIndex_192 = 0; } function main150() { initGlobals825(); init_Bug108(); } function config174() { } function init_Bug108() { local integer clVar284 local integer temp121 BugClass_mws_742 = new_LinkedList103(); temp_121 = BugClass_mws_742; clVar_284 = alloc_CallbackUnary_add_Bug903(); LinkedList_add_1360(temp_121, clVar_284); LinkedList_call979(BugClass_mws_742, new_BugClass734()); } function mwUnary193(integer cb123) returns integer { local integer clVar166 clVar_166 = alloc_MiddlewareUnary_Bug528(); cb_18_126[clVar_166] = cb_123; return clVar_166; } function LinkedList_call979(integer this123, any t0203) { local integer clVar124 local any temp120 local any temp394 temp_120 = LinkedList_elem_202[this_123]; temp_394 = t0_203; clVar_124 = alloc_CallbackUnary_call_Bug206(); dispatch_MiddlewareUnary_Bug_MiddlewareUnary_call100(temp_120, temp_394, clVar_124); } IS_NATIVE function println114(string msg519) { } IS_NATIVE function testSuccess142() { } function call_Bug301(integer this162, any t151, integer mwCb193) { dispatch_CallbackNullary_Bug_CallbackNullary_call210(cb_757[this_162]); dispatch_CallbackUnary_Bug_CallbackUnary_callAndDestroy960(mwCb_193, t_151); } function call_Bug_12534(integer this682, any t704, integer mwCb339) { dispatch_CallbackUnary_Bug_CallbackUnary_call116(cb_18_126[this_682], t_704); dispatch_CallbackUnary_Bug_CallbackUnary_callAndDestroy960(mwCb_339, t_704); } function call_call_Bug297(integer this150, any e123) { println114("called"); } function call_add_Bug928(integer this179, integer i477) { testSuccess142(); } function BugClass_init141(integer this113) { } function new_BugClass734() returns integer { local integer this480 this_480 = alloc_BugClass326(); construct_BugClass132(this_480); return this_480; } function construct_BugClass132(integer this584) { BugClass_init141(this_584); } function CallbackUnary_callAndDestroy448(integer this167, any t727) { dispatch_CallbackUnary_Bug_CallbackUnary_call116(this_167, t_727); dispatch_CallbackUnary_destroyCallbackUnary576(this_167); } function destroyCallbackUnary452(integer this964) { dealloc_CallbackUnary109(this_964); } function LinkedList_add865(integer this643, any t195) { LinkedList_elem_202[this_643] = t_195; } function LinkedList_init621(integer this907) { } function new_LinkedList103() returns integer { local integer this193 this_193 = alloc_LinkedList186(); construct_LinkedList155(this_193); return this_193; } function construct_LinkedList155(integer this279) { LinkedList_init621(this_279); } function error151(string msg205) { $debugPrint277((msg_205 + (" " + #getStackTrace()))); } function alloc_MiddlewareUnary_Bug528() returns integer { local integer this648 if (MiddlewareUnary_firstFree_185 == 0) { if (MiddlewareUnary_maxIndex_127 < 32768) { MiddlewareUnary_maxIndex_127 = (MiddlewareUnary_maxIndex_127 + 1); this_648 = MiddlewareUnary_maxIndex_127; MiddlewareUnary_typeId_156[this_648] = 9; } else { error151("Out of memory: Could not create MiddlewareUnary_Bug."); this_648 = 0; }; } else { MiddlewareUnary_firstFree_185 = (MiddlewareUnary_firstFree_185 - 1); this_648 = MiddlewareUnary_nextFree_169[MiddlewareUnary_firstFree_185]; MiddlewareUnary_typeId_156[this_648] = 9; }; return this_648; } function alloc_CallbackUnary_call_Bug206() returns integer { local integer this114 if (CallbackUnary_firstFree_193 == 0) { if (CallbackUnary_maxIndex_927 < 32768) { CallbackUnary_maxIndex_927 = (CallbackUnary_maxIndex_927 + 1); this_114 = CallbackUnary_maxIndex_927; CallbackUnary_typeId_161[this_114] = 5; } else { error151("Out of memory: Could not create CallbackUnary_call_Bug."); this_114 = 0; }; } else { CallbackUnary_firstFree_193 = (CallbackUnary_firstFree_193 - 1); this_114 = CallbackUnary_nextFree_269[CallbackUnary_firstFree_193]; CallbackUnary_typeId_161[this_114] = 5; }; return this_114; } function alloc_CallbackUnary_add_Bug903() returns integer { local integer this123 if (CallbackUnary_firstFree_193 == 0) { if (CallbackUnary_maxIndex_927 < 32768) { CallbackUnary_maxIndex_927 = (CallbackUnary_maxIndex_927 + 1); this_123 = CallbackUnary_maxIndex_927; CallbackUnary_typeId_161[this_123] = 4; } else { error151("Out of memory: Could not create CallbackUnary_add_Bug."); this_123 = 0; }; } else { CallbackUnary_firstFree_193 = (CallbackUnary_firstFree_193 - 1); this_123 = CallbackUnary_nextFree_269[CallbackUnary_firstFree_193]; CallbackUnary_typeId_161[this_123] = 4; }; return this_123; } function alloc_BugClass326() returns integer { local integer this201 if (BugClass_firstFree_135 == 0) { if (BugClass_maxIndex_200 < 32768) { BugClass_maxIndex_200 = (BugClass_maxIndex_200 + 1); this_201 = BugClass_maxIndex_200; } else { error151("Out of memory: Could not create BugClass."); this_201 = 0; }; } else { BugClass_firstFree_135 = (BugClass_firstFree_135 - 1); this_201 = BugClass_nextFree_120[BugClass_firstFree_135]; }; return this_201; } function dealloc_CallbackUnary109(integer obj343) { if (CallbackUnary_typeId_161[obj_343] == 0) { error151("Double free: object of type CallbackUnary"); } else { CallbackUnary_nextFree_269[CallbackUnary_firstFree_193] = obj_343; CallbackUnary_firstFree_193 = (CallbackUnary_firstFree_193 + 1); CallbackUnary_typeId_161[obj_343] = 0; }; } function alloc_LinkedList186() returns integer { local integer this596 if (LinkedList_firstFree_871 == 0) { if (LinkedList_maxIndex_192 < 32768) { LinkedList_maxIndex_192 = (LinkedList_maxIndex_192 + 1); this_596 = LinkedList_maxIndex_192; LinkedList_typeId_201[this_596] = 6; } else { error151("Out of memory: Could not create LinkedList."); this_596 = 0; }; } else { LinkedList_firstFree_871 = (LinkedList_firstFree_871 - 1); this_596 = LinkedList_nextFree_183[LinkedList_firstFree_871]; LinkedList_typeId_201[this_596] = 6; }; return this_596; } function dispatch_CallbackNullary_Bug_CallbackNullary_call210(integer this323) { } function dispatch_CallbackUnary_destroyCallbackUnary576(integer this173) { if (CallbackUnary_typeId_161[this_173] == 0) { if (this_173 == 0) { error151("Nullpointer exception when calling CallbackUnary.CallbackUnary"); } else { error151("Called CallbackUnary.CallbackUnary on invalid object."); }; } else { }; destroyCallbackUnary452(this_173); } function dispatch_CallbackUnary_Bug_CallbackUnary_call116(integer this193, any t172) { if (CallbackUnary_typeId_161[this_193] == 0) { if (this_193 == 0) { error151("Nullpointer exception when calling CallbackUnary.call"); } else { error151("Called CallbackUnary.call on invalid object."); }; } else { }; if (CallbackUnary_typeId_161[this_193] <= 4) { call_add_Bug928(this_193, t_172); } else { call_call_Bug297(this_193, t_172); }; } function dispatch_CallbackUnary_Bug_CallbackUnary_callAndDestroy960(integer this262, any t164) { if (CallbackUnary_typeId_161[this_262] == 0) { if (this_262 == 0) { error151("Nullpointer exception when calling CallbackUnary.callAndDestroy"); } else { error151("Called CallbackUnary.callAndDestroy on invalid object."); }; } else { }; CallbackUnary_callAndDestroy448(this_262, t_164); } function dispatch_LinkedList_Bug_LinkedList_add164(integer this683, any t757) { if (LinkedList_typeId_201[this_683] == 0) { if (this_683 == 0) { error151("Nullpointer exception when calling LinkedList.add"); } else { error151("Called LinkedList.add on invalid object."); }; } else { }; LinkedList_add865(this_683, t_757); } function dispatch_MiddlewareUnary_Bug_MiddlewareUnary_call100(integer this147, any t698, integer cb514) { if (MiddlewareUnary_typeId_156[this_147] == 0) { if (this_147 == 0) { error151("Nullpointer exception when calling MiddlewareUnary.call"); } else { error151("Called MiddlewareUnary.call on invalid object."); }; } else { }; if (MiddlewareUnary_typeId_156[this_147] <= 8) { call_Bug301(this_147, t_698, cb_514); } else { call_Bug_12534(this_147, t_698, cb_514); }; } function LinkedList_add_1360(integer this142, integer cbs_0119) { dispatch_LinkedList_Bug_LinkedList_add164(this_142, mwUnary193(cbs_0_119)); }