array C_nextFree804 integer C_firstFree134 integer C_maxIndex162 array C_typeId842 integer C_firstFree134 = 0 integer C_maxIndex162 = 0 function initGlobals818() { } function main138() { initGlobals818(); init_test176(); } function config956() { } function init_test176() { local integer this156 this_156 = new_D168(); if (C_typeId_842[this_156] == 0) { if (this_156 == 0) { error402("Nullpointer exception when calling D.foo"); } else { error402("Called D.foo on invalid object."); }; } else { }; testSuccess165(); } IS_NATIVE function testSuccess165() { } function new_D168() returns integer { local integer this233 if (C_firstFree_134 == 0) { if (C_maxIndex_162 < 32768) { C_maxIndex_162 = (C_maxIndex_162 + 1); this_233 = C_maxIndex_162; C_typeId_842[this_233] = 2; } else { error402("Out of memory: Could not create D."); this_233 = 0; }; } else { C_firstFree_134 = (C_firstFree_134 - 1); this_233 = C_nextFree_804[C_firstFree_134]; C_typeId_842[this_233] = 2; }; return this_233; } function error402(string msg198) { $debugPrint159((msg_198 + (" " + #getStackTrace()))); }