array C_nextFree811 integer C_firstFree116 integer C_maxIndex420 array C_typeId122 integer C_firstFree116 = 0 integer C_maxIndex420 = 0 function initGlobals176() { } function main121() { initGlobals176(); init_test480(); } function config363() { } function init_test480() { local integer c124 local integer this445 local integer test_C_B_foo_result211 local integer this423 local integer test_C_B_A_bar_result584 c_124 = new_C948(); this_445 = c_124; if (C_typeId_122[this_445] == 0) { if (this_445 == 0) { error194("Nullpointer exception when calling C.foo"); } else { error194("Called C.foo on invalid object."); }; } else { }; test_C_B_foo_result_211 = 3; if (test_C_B_foo_result_211 != 3) { testFail208("foo fail"); } else { }; this_423 = c_124; if (C_typeId_122[this_423] == 0) { if (this_423 == 0) { error194("Nullpointer exception when calling C.bar"); } else { error194("Called C.bar on invalid object."); }; } else { }; test_C_B_A_bar_result_584 = 2; if (test_C_B_A_bar_result_584 != 2) { testFail208("bar fail"); } else { }; testSuccess338(); } IS_NATIVE function testFail208(string msg950) { } IS_NATIVE function testSuccess338() { } function new_C948() returns integer { local integer this189 local integer this198 local integer this208 if (C_firstFree_116 == 0) { if (C_maxIndex_420 < 32768) { C_maxIndex_420 = (C_maxIndex_420 + 1); this_198 = C_maxIndex_420; C_typeId_122[this_198] = 1; } else { error194("Out of memory: Could not create C."); this_198 = 0; }; } else { C_firstFree_116 = (C_firstFree_116 - 1); this_198 = C_nextFree_811[C_firstFree_116]; C_typeId_122[this_198] = 1; }; this_189 = this_198; this_208 = this_189; return this_189; } function error194(string msg191) { $debugPrint192((msg_191 + (" " + #getStackTrace()))); }