array test_b208 array Blub_nextFree818 integer Blub_firstFree177 integer Blub_maxIndex112 array Blub_typeId896 array Blub_x130 integer Blub_firstFree177 = 0 integer Blub_maxIndex112 = 0 function initGlobals367() { } function main156() { initGlobals367(); init_test408(); } function config206() { } function init_test408() { local integer this188 if (Blub_firstFree_177 == 0) { if (Blub_maxIndex_112 < 32768) { Blub_maxIndex_112 = (Blub_maxIndex_112 + 1); this_188 = Blub_maxIndex_112; Blub_typeId_896[this_188] = 1; } else { error106("Out of memory: Could not create Blub."); this_188 = 0; }; } else { Blub_firstFree_177 = (Blub_firstFree_177 - 1); this_188 = Blub_nextFree_818[Blub_firstFree_177]; Blub_typeId_896[this_188] = 1; }; Blub_x_130[this_188] = 0; test_b_208[0] = this_188; if (Blub_firstFree_177 == 0) { if (Blub_maxIndex_112 < 32768) { Blub_maxIndex_112 = (Blub_maxIndex_112 + 1); this_188 = Blub_maxIndex_112; Blub_typeId_896[this_188] = 1; } else { error106("Out of memory: Could not create Blub."); this_188 = 0; }; } else { Blub_firstFree_177 = (Blub_firstFree_177 - 1); this_188 = Blub_nextFree_818[Blub_firstFree_177]; Blub_typeId_896[this_188] = 1; }; Blub_x_130[this_188] = 1; test_b_208[1] = this_188; if (Blub_firstFree_177 == 0) { if (Blub_maxIndex_112 < 32768) { Blub_maxIndex_112 = (Blub_maxIndex_112 + 1); this_188 = Blub_maxIndex_112; Blub_typeId_896[this_188] = 1; } else { error106("Out of memory: Could not create Blub."); this_188 = 0; }; } else { Blub_firstFree_177 = (Blub_firstFree_177 - 1); this_188 = Blub_nextFree_818[Blub_firstFree_177]; Blub_typeId_896[this_188] = 1; }; Blub_x_130[this_188] = 2; test_b_208[2] = this_188; if (Blub_firstFree_177 == 0) { if (Blub_maxIndex_112 < 32768) { Blub_maxIndex_112 = (Blub_maxIndex_112 + 1); this_188 = Blub_maxIndex_112; Blub_typeId_896[this_188] = 1; } else { error106("Out of memory: Could not create Blub."); this_188 = 0; }; } else { Blub_firstFree_177 = (Blub_firstFree_177 - 1); this_188 = Blub_nextFree_818[Blub_firstFree_177]; Blub_typeId_896[this_188] = 1; }; Blub_x_130[this_188] = 3; test_b_208[3] = this_188; if (Blub_firstFree_177 == 0) { if (Blub_maxIndex_112 < 32768) { Blub_maxIndex_112 = (Blub_maxIndex_112 + 1); this_188 = Blub_maxIndex_112; Blub_typeId_896[this_188] = 1; } else { error106("Out of memory: Could not create Blub."); this_188 = 0; }; } else { Blub_firstFree_177 = (Blub_firstFree_177 - 1); this_188 = Blub_nextFree_818[Blub_firstFree_177]; Blub_typeId_896[this_188] = 1; }; Blub_x_130[this_188] = 4; test_b_208[4] = this_188; if (Blub_firstFree_177 == 0) { if (Blub_maxIndex_112 < 32768) { Blub_maxIndex_112 = (Blub_maxIndex_112 + 1); this_188 = Blub_maxIndex_112; Blub_typeId_896[this_188] = 1; } else { error106("Out of memory: Could not create Blub."); this_188 = 0; }; } else { Blub_firstFree_177 = (Blub_firstFree_177 - 1); this_188 = Blub_nextFree_818[Blub_firstFree_177]; Blub_typeId_896[this_188] = 1; }; Blub_x_130[this_188] = 5; test_b_208[5] = this_188; if (Blub_firstFree_177 == 0) { if (Blub_maxIndex_112 < 32768) { Blub_maxIndex_112 = (Blub_maxIndex_112 + 1); this_188 = Blub_maxIndex_112; Blub_typeId_896[this_188] = 1; } else { error106("Out of memory: Could not create Blub."); this_188 = 0; }; } else { Blub_firstFree_177 = (Blub_firstFree_177 - 1); this_188 = Blub_nextFree_818[Blub_firstFree_177]; Blub_typeId_896[this_188] = 1; }; Blub_x_130[this_188] = 6; test_b_208[6] = this_188; if (Blub_firstFree_177 == 0) { if (Blub_maxIndex_112 < 32768) { Blub_maxIndex_112 = (Blub_maxIndex_112 + 1); this_188 = Blub_maxIndex_112; Blub_typeId_896[this_188] = 1; } else { error106("Out of memory: Could not create Blub."); this_188 = 0; }; } else { Blub_firstFree_177 = (Blub_firstFree_177 - 1); this_188 = Blub_nextFree_818[Blub_firstFree_177]; Blub_typeId_896[this_188] = 1; }; Blub_x_130[this_188] = 7; test_b_208[7] = this_188; dispatch_Blub_destroyBlub124(test_b_208[0]); dispatch_Blub_destroyBlub124(test_b_208[6]); dispatch_Blub_destroyBlub124(test_b_208[2]); dispatch_Blub_destroyBlub124(test_b_208[4]); if (Blub_firstFree_177 == 0) { if (Blub_maxIndex_112 < 32768) { Blub_maxIndex_112 = (Blub_maxIndex_112 + 1); this_188 = Blub_maxIndex_112; Blub_typeId_896[this_188] = 1; } else { error106("Out of memory: Could not create Blub."); this_188 = 0; }; } else { Blub_firstFree_177 = (Blub_firstFree_177 - 1); this_188 = Blub_nextFree_818[Blub_firstFree_177]; Blub_typeId_896[this_188] = 1; }; Blub_x_130[this_188] = 8; test_b_208[8] = this_188; if (Blub_firstFree_177 == 0) { if (Blub_maxIndex_112 < 32768) { Blub_maxIndex_112 = (Blub_maxIndex_112 + 1); this_188 = Blub_maxIndex_112; Blub_typeId_896[this_188] = 1; } else { error106("Out of memory: Could not create Blub."); this_188 = 0; }; } else { Blub_firstFree_177 = (Blub_firstFree_177 - 1); this_188 = Blub_nextFree_818[Blub_firstFree_177]; Blub_typeId_896[this_188] = 1; }; Blub_x_130[this_188] = 9; test_b_208[9] = this_188; this_188 = 0; loop { exitwhen (this_188 >= 10); if (((this_188 mod 2) == 1) and (Blub_x_130[test_b_208[this_188]] != this_188)) { testFail131(((("fail " + I2S149(this_188)) + ", ") + I2S149(Blub_x_130[test_b_208[this_188]]))); } else { }; this_188 = (this_188 + 1); }; testSuccess226(); } IS_NATIVE IS_EXTERN @extern function I2S149(integer i109) returns string { } IS_NATIVE function testFail131(string msg118) { } IS_NATIVE function testSuccess226() { } function error106(string msg289) { $debugPrint457((msg_289 + (" " + #getStackTrace()))); } function dispatch_Blub_destroyBlub124(integer this929) { if (Blub_typeId_896[this_929] == 0) { if (this_929 == 0) { error106("Nullpointer exception when calling Blub.Blub"); } else { error106("Called Blub.Blub on invalid object."); }; } else { }; if (Blub_typeId_896[this_929] == 0) { error106("Double free: object of type Blub"); } else { Blub_nextFree_818[Blub_firstFree_177] = this_929; Blub_firstFree_177 = (Blub_firstFree_177 + 1); Blub_typeId_896[this_929] = 0; }; }