array A_nextFree111 integer A_firstFree724 integer A_maxIndex212 array A_typeId815 array B_nextFree638 integer B_firstFree193 integer B_maxIndex604 array B_typeId198 integer A_firstFree724 = 0 integer A_maxIndex212 = 0 integer B_firstFree193 = 0 integer B_maxIndex604 = 0 function initGlobals993() { } function main889() { initGlobals993(); init_test779(); } function config245() { } function init_test779() { local integer this146 this_146 = new_A144(); if (A_typeId_815[this_146] == 0) { if (this_146 == 0) { error697("Nullpointer exception when calling A.getB"); } else { error697("Called A.getB on invalid object."); }; } else { }; this_146 = new_B163(); if (B_typeId_198[this_146] == 0) { if (this_146 == 0) { error697("Nullpointer exception when calling B.foo"); } else { error697("Called B.foo on invalid object."); }; } else { }; testSuccess684(); } IS_NATIVE function testSuccess684() { } function new_A144() returns integer { local integer this187 if (A_firstFree_724 == 0) { if (A_maxIndex_212 < 32768) { A_maxIndex_212 = (A_maxIndex_212 + 1); this_187 = A_maxIndex_212; A_typeId_815[this_187] = 1; } else { error697("Out of memory: Could not create A."); this_187 = 0; }; } else { A_firstFree_724 = (A_firstFree_724 - 1); this_187 = A_nextFree_111[A_firstFree_724]; A_typeId_815[this_187] = 1; }; return this_187; } function new_B163() returns integer { local integer this322 if (B_firstFree_193 == 0) { if (B_maxIndex_604 < 32768) { B_maxIndex_604 = (B_maxIndex_604 + 1); this_322 = B_maxIndex_604; B_typeId_198[this_322] = 2; } else { error697("Out of memory: Could not create B."); this_322 = 0; }; } else { B_firstFree_193 = (B_firstFree_193 - 1); this_322 = B_nextFree_638[B_firstFree_193]; B_typeId_198[this_322] = 2; }; return this_322; } function error697(string msg101) { $debugPrint108((msg_101 + (" " + #getStackTrace()))); }