array CounterImpl_nextFree247 integer CounterImpl_firstFree186 integer CounterImpl_maxIndex453 array CounterImpl_typeId882 array CounterImpl_Counter_count267 integer CounterImpl_firstFree186 = 0 integer CounterImpl_maxIndex453 = 0 function initGlobals747() { } function main181() { initGlobals747(); init_test142(); } function config311() { } function init_test142() { local integer c182 c_182 = new_CounterImpl119(); dispatch_CounterImpl_test_CounterImpl_Counter_incCounter139(c_182); dispatch_CounterImpl_test_CounterImpl_Counter_incCounter139(c_182); if (dispatch_CounterImpl_test_CounterImpl_Counter_getCounter208(c_182) == 2) { testSuccess198(); } else { testFail163("defect in equality if"); }; } IS_NATIVE function testSuccess198() { } IS_NATIVE function testFail163(string msg172) { } function CounterImpl_Counter_incCounter196(integer this363) { CounterImpl_Counter_count_267[this_363] = (CounterImpl_Counter_count_267[this_363] + 1); } function CounterImpl_Counter_getCounter150(integer this199) returns integer { return CounterImpl_Counter_count_267[this_199]; } function CounterImpl_init633(integer this512) { CounterImpl_Counter_count_267[this_512] = 0; construct_CounterImpl_Counter285(this_512); } function construct_CounterImpl_Counter285(integer this362) { } function new_CounterImpl119() returns integer { local integer this185 this_185 = alloc_CounterImpl746(); construct_CounterImpl145(this_185); return this_185; } function construct_CounterImpl145(integer this645) { CounterImpl_init633(this_645); } function alloc_CounterImpl746() returns integer { local integer this615 if (CounterImpl_firstFree_186 == 0) { if (CounterImpl_maxIndex_453 < 32768) { CounterImpl_maxIndex_453 = (CounterImpl_maxIndex_453 + 1); this_615 = CounterImpl_maxIndex_453; CounterImpl_typeId_882[this_615] = 1; } else { error102("Out of memory: Could not create CounterImpl."); this_615 = 0; }; } else { CounterImpl_firstFree_186 = (CounterImpl_firstFree_186 - 1); this_615 = CounterImpl_nextFree_247[CounterImpl_firstFree_186]; CounterImpl_typeId_882[this_615] = 1; }; return this_615; } function error102(string msg152) { $debugPrint114((msg_152 + (" " + #getStackTrace()))); } function dispatch_CounterImpl_test_CounterImpl_Counter_incCounter139(integer this114) { if (CounterImpl_typeId_882[this_114] == 0) { if (this_114 == 0) { error102("Nullpointer exception when calling CounterImpl.incCounter"); } else { error102("Called CounterImpl.incCounter on invalid object."); }; } else { }; CounterImpl_Counter_incCounter196(this_114); } function dispatch_CounterImpl_test_CounterImpl_Counter_getCounter208(integer this149) returns integer { if (CounterImpl_typeId_882[this_149] == 0) { if (this_149 == 0) { error102("Nullpointer exception when calling CounterImpl.getCounter"); } else { error102("Called CounterImpl.getCounter on invalid object."); }; } else { }; return CounterImpl_Counter_getCounter150(this_149); }