array A_nextFree574 integer A_firstFree119 integer A_maxIndex129 array A_typeId212 array B_nextFree643 integer B_firstFree587 integer B_maxIndex188 array B_typeId178 integer A_firstFree119 = 0 integer A_maxIndex129 = 0 integer B_firstFree587 = 0 integer B_maxIndex188 = 0 function initGlobals189() { } function main112() { initGlobals189(); init_test128(); } function config131() { } function init_test128() { local integer this814 this_814 = new_A946(); if (A_typeId_212[this_814] == 0) { if (this_814 == 0) { error431("Nullpointer exception when calling A.bar"); } else { error431("Called A.bar on invalid object."); }; } else { }; this_814 = A_M_bar188(this_814); if (this_814 == 42) { testSuccess379(); } else { }; } IS_NATIVE function testSuccess379() { } function A_M_bar188(integer this109) returns integer { this_109 = new_B105(); if (B_typeId_178[this_109] == 0) { if (this_109 == 0) { error431("Nullpointer exception when calling B.foo"); } else { error431("Called B.foo on invalid object."); }; } else { }; return 42; } function new_A946() returns integer { local integer this326 if (A_firstFree_119 == 0) { if (A_maxIndex_129 < 32768) { A_maxIndex_129 = (A_maxIndex_129 + 1); this_326 = A_maxIndex_129; A_typeId_212[this_326] = 1; } else { error431("Out of memory: Could not create A."); this_326 = 0; }; } else { A_firstFree_119 = (A_firstFree_119 - 1); this_326 = A_nextFree_574[A_firstFree_119]; A_typeId_212[this_326] = 1; }; return this_326; } function new_B105() returns integer { local integer this145 if (B_firstFree_587 == 0) { if (B_maxIndex_188 < 32768) { B_maxIndex_188 = (B_maxIndex_188 + 1); this_145 = B_maxIndex_188; B_typeId_178[this_145] = 2; } else { error431("Out of memory: Could not create B."); this_145 = 0; }; } else { B_firstFree_587 = (B_firstFree_587 - 1); this_145 = B_nextFree_643[B_firstFree_587]; B_typeId_178[this_145] = 2; }; return this_145; } function error431(string msg133) { $debugPrint825((msg_133 + (" " + #getStackTrace()))); }