array C_nextFree643 integer C_firstFree128 integer C_maxIndex201 array C_typeId115 integer C_firstFree128 = 0 integer C_maxIndex201 = 0 function initGlobals184() { C_firstFree_128 = 0; C_maxIndex_201 = 0; } function main590() { initGlobals184(); init_test115(); } function config208() { } function init_test115() { local integer c981 c_981 = new_C115(); if (dispatch_C_test_C_B_foo923(c_981) != 3) { testFail184("foo fail"); } else { }; if (dispatch_C_test_C_B_A_bar332(c_981) != 2) { testFail184("bar fail"); } else { }; testSuccess281(); } IS_NATIVE function testFail184(string msg115) { } IS_NATIVE function testSuccess281() { } function C_B_foo137(integer this167) returns integer { return 3; } function C_B_A_bar134(integer this188) returns integer { return 2; } function C_init206(integer this122) { construct_C_B153(this_122); } function construct_C_B153(integer this399) { construct_C_B_A101(this_399); } function construct_C_B_A101(integer this100) { } function new_C115() returns integer { local integer this618 this_618 = alloc_C148(); construct_C252(this_618); return this_618; } function construct_C252(integer this135) { C_init206(this_135); } function alloc_C148() returns integer { local integer this167 if (C_firstFree_128 == 0) { if (C_maxIndex_201 < 32768) { C_maxIndex_201 = (C_maxIndex_201 + 1); this_167 = C_maxIndex_201; C_typeId_115[this_167] = 1; } else { error142("Out of memory: Could not create C."); this_167 = 0; }; } else { C_firstFree_128 = (C_firstFree_128 - 1); this_167 = C_nextFree_643[C_firstFree_128]; C_typeId_115[this_167] = 1; }; return this_167; } function error142(string msg113) { $debugPrint707((msg_113 + (" " + #getStackTrace()))); } function dispatch_C_test_C_B_foo923(integer this862) returns integer { local integer test_C_B_foo_result133 if (C_typeId_115[this_862] == 0) { if (this_862 == 0) { error142("Nullpointer exception when calling C.foo"); } else { error142("Called C.foo on invalid object."); }; } else { }; test_C_B_foo_result_133 = C_B_foo137(this_862); return test_C_B_foo_result_133; } function dispatch_C_test_C_B_A_bar332(integer this535) returns integer { local integer test_C_B_A_bar_result792 if (C_typeId_115[this_535] == 0) { if (this_535 == 0) { error142("Nullpointer exception when calling C.bar"); } else { error142("Called C.bar on invalid object."); }; } else { }; test_C_B_A_bar_result_792 = C_B_A_bar134(this_535); return test_C_B_A_bar_result_792; }