array I_nextFree385 integer I_firstFree493 integer I_maxIndex196 array I_typeId561 integer I_firstFree493 = 0 integer I_maxIndex196 = 0 function initGlobals915() { } function main202() { initGlobals915(); init_test138(); } function config300() { } function init_test138() { local integer c1166 local integer c2176 c1_166 = new_C179(); c2_176 = new_D104(); if (I_typeId_561[c1_166] == 0) { if (c1_166 == 0) { error881("Nullpointer exception when calling B.foo"); } else { error881("Called B.foo on invalid object."); }; } else { }; if (I_typeId_561[c2_176] == 0) { if (c2_176 == 0) { error881("Nullpointer exception when calling B.foo"); } else { error881("Called B.foo on invalid object."); }; } else { }; testSuccess993(); } IS_NATIVE function testSuccess993() { } function new_C179() returns integer { local integer this200 if (I_firstFree_493 == 0) { if (I_maxIndex_196 < 32768) { I_maxIndex_196 = (I_maxIndex_196 + 1); this_200 = I_maxIndex_196; I_typeId_561[this_200] = 3; } else { error881("Out of memory: Could not create C."); this_200 = 0; }; } else { I_firstFree_493 = (I_firstFree_493 - 1); this_200 = I_nextFree_385[I_firstFree_493]; I_typeId_561[this_200] = 3; }; return this_200; } function new_D104() returns integer { local integer this154 if (I_firstFree_493 == 0) { if (I_maxIndex_196 < 32768) { I_maxIndex_196 = (I_maxIndex_196 + 1); this_154 = I_maxIndex_196; I_typeId_561[this_154] = 4; } else { error881("Out of memory: Could not create D."); this_154 = 0; }; } else { I_firstFree_493 = (I_firstFree_493 - 1); this_154 = I_nextFree_385[I_firstFree_493]; I_typeId_561[this_154] = 4; }; return this_154; } function error881(string msg638) { $debugPrint542((msg_638 + (" " + #getStackTrace()))); }