string test_s592 array T_nextFree924 integer T_firstFree166 integer T_maxIndex113 array T_typeId225 string test_s592 = "" integer T_firstFree166 = 0 integer T_maxIndex113 = 0 function initGlobals167() { } function main624() { initGlobals167(); init_test169(); } function config128() { } function init_test169() { test_s_592 = ""; dispatch_T_destroyT131(new_A852()); if (test_s_592 == "") { testSuccess112(); } else { }; } IS_NATIVE function testSuccess112() { } function A_init776(integer this131) { } function new_A852() returns integer { local integer this194 this_194 = alloc_A284(); construct_A137(this_194); return this_194; } function construct_A137(integer this358) { construct_T101(this_358); A_init776(this_358); } function destroyB200(integer this184) { B_onDestroy100(this_184); dealloc_B557(this_184); } function B_onDestroy100(integer this165) { test_s_592 = (test_s_592 + "B"); T_onDestroy132(this_165); } function T_init210(integer this209) { } function construct_T101(integer this151) { T_init210(this_151); } function T_onDestroy132(integer this131) { } function destroyT134(integer this112) { T_onDestroy132(this_112); dealloc_T751(this_112); } function alloc_A284() returns integer { local integer this731 if (T_firstFree_166 == 0) { if (T_maxIndex_113 < 32768) { T_maxIndex_113 = (T_maxIndex_113 + 1); this_731 = T_maxIndex_113; T_typeId_225[this_731] = 2; } else { error188("Out of memory: Could not create A."); this_731 = 0; }; } else { T_firstFree_166 = (T_firstFree_166 - 1); this_731 = T_nextFree_924[T_firstFree_166]; T_typeId_225[this_731] = 2; }; return this_731; } function error188(string msg195) { $debugPrint224((msg_195 + (" " + #getStackTrace()))); } function dealloc_B557(integer obj932) { if (T_typeId_225[obj_932] == 0) { error188("Double free: object of type B"); } else { T_nextFree_924[T_firstFree_166] = obj_932; T_firstFree_166 = (T_firstFree_166 + 1); T_typeId_225[obj_932] = 0; }; } function dealloc_T751(integer obj250) { if (T_typeId_225[obj_250] == 0) { error188("Double free: object of type T"); } else { T_nextFree_924[T_firstFree_166] = obj_250; T_firstFree_166 = (T_firstFree_166 + 1); T_typeId_225[obj_250] = 0; }; } function dispatch_T_destroyT131(integer this145) { if (T_typeId_225[this_145] == 0) { if (this_145 == 0) { error188("Nullpointer exception when calling T.T"); } else { error188("Called T.T on invalid object."); }; } else { }; if (T_typeId_225[this_145] <= 2) { destroyT134(this_145); } else { destroyB200(this_145); }; }