array C_nextFree182 integer C_firstFree116 integer C_maxIndex189 array C_typeId116 integer C_firstFree116 = 0 integer C_maxIndex189 = 0 function initGlobals306() { } function main191() { initGlobals306(); init_test510(); } function config385() { } function init_test510() { local integer c924 local integer this580 local integer test_C_foo_result130 c_924 = new_C279(); this_580 = c_924; if (C_typeId_116[this_580] == 0) { if (this_580 == 0) { error129("Nullpointer exception when calling C.foo"); } else { error129("Called C.foo on invalid object."); }; } else { }; test_C_foo_result_130 = 4; if (test_C_foo_result_130 != 4) { testFail361("foo fail"); } else { }; testSuccess108(); } IS_NATIVE function testFail361(string msg156) { } IS_NATIVE function testSuccess108() { } function new_C279() returns integer { local integer this966 local integer this175 if (C_firstFree_116 == 0) { if (C_maxIndex_189 < 32768) { C_maxIndex_189 = (C_maxIndex_189 + 1); this_175 = C_maxIndex_189; C_typeId_116[this_175] = 1; } else { error129("Out of memory: Could not create C."); this_175 = 0; }; } else { C_firstFree_116 = (C_firstFree_116 - 1); this_175 = C_nextFree_182[C_firstFree_116]; C_typeId_116[this_175] = 1; }; this_966 = this_175; return this_966; } function error129(string msg193) { $debugPrint181((msg_193 + (" " + #getStackTrace()))); }