array A_nextFree834 integer A_firstFree761 integer A_maxIndex139 array A_typeId967 array B_nextFree162 integer B_firstFree145 integer B_maxIndex399 array B_typeId147 integer A_firstFree761 = 0 integer A_maxIndex139 = 0 integer B_firstFree145 = 0 integer B_maxIndex399 = 0 function initGlobals151() { } function main626() { initGlobals151(); init_test182(); } function config285() { } function init_test182() { local integer i200 local integer this934 local integer test_A_M_bar_result122 this_934 = new_A441(); if (A_typeId_967[this_934] == 0) { if (this_934 == 0) { error155("Nullpointer exception when calling A.bar"); } else { error155("Called A.bar on invalid object."); }; } else { }; test_A_M_bar_result_122 = A_M_bar144(this_934); i_200 = test_A_M_bar_result_122; if (i_200 == 42) { testSuccess106(); } else { }; } IS_NATIVE function testSuccess106() { } function A_M_bar144(integer this191) returns integer { local integer b299 local integer this465 local integer test_A_M_B_foo_result154 b_299 = new_B959(); this_465 = b_299; if (B_typeId_147[this_465] == 0) { if (this_465 == 0) { error155("Nullpointer exception when calling B.foo"); } else { error155("Called B.foo on invalid object."); }; } else { }; test_A_M_B_foo_result_154 = 4; return ((test_A_M_B_foo_result_154 * 10) + 2); } function new_A441() returns integer { local integer this150 local integer this179 if (A_firstFree_761 == 0) { if (A_maxIndex_139 < 32768) { A_maxIndex_139 = (A_maxIndex_139 + 1); this_179 = A_maxIndex_139; A_typeId_967[this_179] = 1; } else { error155("Out of memory: Could not create A."); this_179 = 0; }; } else { A_firstFree_761 = (A_firstFree_761 - 1); this_179 = A_nextFree_834[A_firstFree_761]; A_typeId_967[this_179] = 1; }; this_150 = this_179; return this_150; } function new_B959() returns integer { local integer this595 local integer this196 if (B_firstFree_145 == 0) { if (B_maxIndex_399 < 32768) { B_maxIndex_399 = (B_maxIndex_399 + 1); this_196 = B_maxIndex_399; B_typeId_147[this_196] = 2; } else { error155("Out of memory: Could not create B."); this_196 = 0; }; } else { B_firstFree_145 = (B_firstFree_145 - 1); this_196 = B_nextFree_162[B_firstFree_145]; B_typeId_147[this_196] = 2; }; this_595 = this_196; return this_595; } function error155(string msg781) { $debugPrint181((msg_781 + (" " + #getStackTrace()))); }