array E_nextFree500 integer E_firstFree124 integer E_maxIndex103 array E_typeId976 integer E_firstFree124 = 0 integer E_maxIndex103 = 0 function initGlobals915() { } function main207() { initGlobals915(); init_test992(); } function config164() { } function init_test992() { local integer e112 e_112 = new_E743(); if (E_typeId_976[e_112] == 0) { if (e_112 == 0) { error202("Nullpointer exception when calling E.foo"); } else { error202("Called E.foo on invalid object."); }; } else { }; if (E_typeId_976[e_112] == 0) { if (e_112 == 0) { error202("Nullpointer exception when calling E.bar"); } else { error202("Called E.bar on invalid object."); }; } else { }; testSuccess167(); } IS_NATIVE function testSuccess167() { } function new_E743() returns integer { local integer this272 if (E_firstFree_124 == 0) { if (E_maxIndex_103 < 32768) { E_maxIndex_103 = (E_maxIndex_103 + 1); this_272 = E_maxIndex_103; E_typeId_976[this_272] = 1; } else { error202("Out of memory: Could not create E."); this_272 = 0; }; } else { E_firstFree_124 = (E_firstFree_124 - 1); this_272 = E_nextFree_500[E_firstFree_124]; E_typeId_976[this_272] = 1; }; return this_272; } function error202(string msg796) { $debugPrint204((msg_796 + (" " + #getStackTrace()))); }