array C_nextFree145 integer C_firstFree639 integer C_maxIndex473 array C_typeId148 integer C_firstFree639 = 0 integer C_maxIndex473 = 0 function initGlobals104() { } function main992() { initGlobals104(); init_test730(); } function config141() { } function init_test730() { local integer c137 c_137 = new_C142(); if (dispatch_C_test_C_B_foo995(c_137) != 3) { testFail548("foo fail"); } else { }; if (dispatch_C_test_C_B_A_bar657(c_137) != 2) { testFail548("bar fail"); } else { }; testSuccess202(); } IS_NATIVE function testFail548(string msg695) { } IS_NATIVE function testSuccess202() { } function C_B_foo122(integer this656) returns integer { return 3; } function C_B_A_bar200(integer this700) returns integer { return 2; } function C_init152(integer this161) { construct_C_B796(this_161); } function construct_C_B796(integer this201) { construct_C_B_A202(this_201); } function construct_C_B_A202(integer this210) { } function new_C142() returns integer { local integer this190 this_190 = alloc_C175(); construct_C202(this_190); return this_190; } function construct_C202(integer this183) { C_init152(this_183); } function alloc_C175() returns integer { local integer this415 if (C_firstFree_639 == 0) { if (C_maxIndex_473 < 32768) { C_maxIndex_473 = (C_maxIndex_473 + 1); this_415 = C_maxIndex_473; C_typeId_148[this_415] = 1; } else { error167("Out of memory: Could not create C."); this_415 = 0; }; } else { C_firstFree_639 = (C_firstFree_639 - 1); this_415 = C_nextFree_145[C_firstFree_639]; C_typeId_148[this_415] = 1; }; return this_415; } function error167(string msg108) { $debugPrint151((msg_108 + (" " + #getStackTrace()))); } function dispatch_C_test_C_B_foo995(integer this154) returns integer { if (C_typeId_148[this_154] == 0) { if (this_154 == 0) { error167("Nullpointer exception when calling C.foo"); } else { error167("Called C.foo on invalid object."); }; } else { }; return C_B_foo122(this_154); } function dispatch_C_test_C_B_A_bar657(integer this257) returns integer { if (C_typeId_148[this_257] == 0) { if (this_257 == 0) { error167("Nullpointer exception when calling C.bar"); } else { error167("Called C.bar on invalid object."); }; } else { }; return C_B_A_bar200(this_257); }