array D_nextFree200 integer D_firstFree830 integer D_maxIndex103 array D_typeId856 array D_B_A_x186 integer D_firstFree830 = 0 integer D_maxIndex103 = 0 function initGlobals117() { D_firstFree_830 = 0; D_maxIndex_103 = 0; } function main469() { initGlobals117(); init_test722(); } function config178() { } function init_test722() { local integer d121 d_121 = new_D196(); dispatch_D_test_D_setX134(d_121, 4); if (dispatch_D_test_D_getX175(d_121) != 4) { testFail400("foo fail"); } else { }; testSuccess171(); } IS_NATIVE function testFail400(string msg989) { } IS_NATIVE function testSuccess171() { } function D_setX202(integer this128, integer x166) { D_B_A_setX356(this_128, x_166); } function D_B_A_setX356(integer this437, integer x372) { D_B_A_x_186[this_437] = x_372; } function D_getX127(integer this206) returns integer { return D_B_A_getX451(this_206); } function D_B_A_getX451(integer this676) returns integer { return D_B_A_x_186[this_676]; } function D_init701(integer this841) { construct_D_B157(this_841); construct_D_C392(this_841); } function construct_D_B157(integer this191) { construct_D_B_A174(this_191); } function construct_D_C392(integer this192) { construct_D_C_A922(this_192); } function construct_D_B_A174(integer this203) { } function construct_D_C_A922(integer this525) { } function new_D196() returns integer { local integer this104 this_104 = alloc_D170(); construct_D331(this_104); return this_104; } function construct_D331(integer this111) { D_init701(this_111); } function alloc_D170() returns integer { local integer this907 if (D_firstFree_830 == 0) { if (D_maxIndex_103 < 32768) { D_maxIndex_103 = (D_maxIndex_103 + 1); this_907 = D_maxIndex_103; D_typeId_856[this_907] = 1; } else { error155("Out of memory: Could not create D."); this_907 = 0; }; } else { D_firstFree_830 = (D_firstFree_830 - 1); this_907 = D_nextFree_200[D_firstFree_830]; D_typeId_856[this_907] = 1; }; return this_907; } function error155(string msg140) { $debugPrint277((msg_140 + (" " + #getStackTrace()))); } function dispatch_D_test_D_setX134(integer this177, integer x958) { if (D_typeId_856[this_177] == 0) { if (this_177 == 0) { error155("Nullpointer exception when calling D.setX"); } else { error155("Called D.setX on invalid object."); }; } else { }; D_setX202(this_177, x_958); } function dispatch_D_test_D_getX175(integer this474) returns integer { local integer test_D_getX_result744 if (D_typeId_856[this_474] == 0) { if (this_474 == 0) { error155("Nullpointer exception when calling D.getX"); } else { error155("Called D.getX on invalid object."); }; } else { }; test_D_getX_result_744 = D_getX127(this_474); return test_D_getX_result_744; }