array CounterImpl_nextFree722 integer CounterImpl_firstFree103 integer CounterImpl_maxIndex138 array CounterImpl_typeId204 array CounterImpl_Counter_count193 integer CounterImpl_firstFree103 = 0 integer CounterImpl_maxIndex138 = 0 function initGlobals182() { CounterImpl_firstFree_103 = 0; CounterImpl_maxIndex_138 = 0; } function main281() { initGlobals182(); init_test111(); } function config923() { } function init_test111() { local integer c494 c_494 = new_CounterImpl138(); dispatch_CounterImpl_test_CounterImpl_Counter_incCounter337(c_494); dispatch_CounterImpl_test_CounterImpl_Counter_incCounter337(c_494); if (dispatch_CounterImpl_test_CounterImpl_Counter_getCounter108(c_494) == 2) { testSuccess984(); } else { testFail394("defect in equality if"); }; } IS_NATIVE function testSuccess984() { } IS_NATIVE function testFail394(string msg209) { } function CounterImpl_Counter_incCounter630(integer this183) { CounterImpl_Counter_count_193[this_183] = (CounterImpl_Counter_count_193[this_183] + 1); } function CounterImpl_Counter_getCounter207(integer this191) returns integer { return CounterImpl_Counter_count_193[this_191]; } function CounterImpl_init122(integer this198) { CounterImpl_Counter_count_193[this_198] = 0; construct_CounterImpl_Counter179(this_198); } function construct_CounterImpl_Counter179(integer this159) { } function new_CounterImpl138() returns integer { local integer this729 this_729 = alloc_CounterImpl349(); construct_CounterImpl840(this_729); return this_729; } function construct_CounterImpl840(integer this406) { CounterImpl_init122(this_406); } function alloc_CounterImpl349() returns integer { local integer this196 if (CounterImpl_firstFree_103 == 0) { if (CounterImpl_maxIndex_138 < 32768) { CounterImpl_maxIndex_138 = (CounterImpl_maxIndex_138 + 1); this_196 = CounterImpl_maxIndex_138; CounterImpl_typeId_204[this_196] = 1; } else { error347("Out of memory: Could not create CounterImpl."); this_196 = 0; }; } else { CounterImpl_firstFree_103 = (CounterImpl_firstFree_103 - 1); this_196 = CounterImpl_nextFree_722[CounterImpl_firstFree_103]; CounterImpl_typeId_204[this_196] = 1; }; return this_196; } function error347(string msg138) { $debugPrint528((msg_138 + (" " + #getStackTrace()))); } function dispatch_CounterImpl_test_CounterImpl_Counter_incCounter337(integer this182) { if (CounterImpl_typeId_204[this_182] == 0) { if (this_182 == 0) { error347("Nullpointer exception when calling CounterImpl.incCounter"); } else { error347("Called CounterImpl.incCounter on invalid object."); }; } else { }; CounterImpl_Counter_incCounter630(this_182); } function dispatch_CounterImpl_test_CounterImpl_Counter_getCounter108(integer this185) returns integer { local integer test_CounterImpl_Counter_getCounter_result205 if (CounterImpl_typeId_204[this_185] == 0) { if (this_185 == 0) { error347("Nullpointer exception when calling CounterImpl.getCounter"); } else { error347("Called CounterImpl.getCounter on invalid object."); }; } else { }; test_CounterImpl_Counter_getCounter_result_205 = CounterImpl_Counter_getCounter207(this_185); return test_CounterImpl_Counter_getCounter_result_205; }