array CounterImpl_nextFree431 integer CounterImpl_firstFree590 integer CounterImpl_maxIndex190 array CounterImpl_typeId974 array CounterImpl_Counter_count117 integer CounterImpl_firstFree590 = 0 integer CounterImpl_maxIndex190 = 0 function initGlobals108() { CounterImpl_firstFree_590 = 0; CounterImpl_maxIndex_190 = 0; } function main649() { initGlobals108(); init_test882(); } function config150() { } function init_test882() { local integer c209 c_209 = new_CounterImpl800(); dispatch_CounterImpl_test_CounterImpl_Counter_incCounter175(c_209); dispatch_CounterImpl_test_CounterImpl_Counter_incCounter175(c_209); if (dispatch_CounterImpl_test_CounterImpl_Counter_getCounter557(c_209) == 2) { testSuccess162(); } else { testFail215("defect in equality if"); }; } IS_NATIVE function testSuccess162() { } IS_NATIVE function testFail215(string msg180) { } function CounterImpl_Counter_incCounter113(integer this116) { CounterImpl_Counter_count_117[this_116] = (CounterImpl_Counter_count_117[this_116] + 1); } function CounterImpl_Counter_getCounter222(integer this155) returns integer { return CounterImpl_Counter_count_117[this_155]; } function CounterImpl_init160(integer this584) { CounterImpl_Counter_count_117[this_584] = 0; construct_CounterImpl_Counter168(this_584); } function construct_CounterImpl_Counter168(integer this129) { } function new_CounterImpl800() returns integer { local integer this701 this_701 = alloc_CounterImpl784(); construct_CounterImpl164(this_701); return this_701; } function construct_CounterImpl164(integer this329) { CounterImpl_init160(this_329); } function alloc_CounterImpl784() returns integer { local integer this178 if (CounterImpl_firstFree_590 == 0) { if (CounterImpl_maxIndex_190 < 32768) { CounterImpl_maxIndex_190 = (CounterImpl_maxIndex_190 + 1); this_178 = CounterImpl_maxIndex_190; CounterImpl_typeId_974[this_178] = 1; } else { error166("Out of memory: Could not create CounterImpl."); this_178 = 0; }; } else { CounterImpl_firstFree_590 = (CounterImpl_firstFree_590 - 1); this_178 = CounterImpl_nextFree_431[CounterImpl_firstFree_590]; CounterImpl_typeId_974[this_178] = 1; }; return this_178; } function error166(string msg799) { $debugPrint328((msg_799 + (" " + #getStackTrace()))); } function dispatch_CounterImpl_test_CounterImpl_Counter_incCounter175(integer this138) { if (CounterImpl_typeId_974[this_138] == 0) { if (this_138 == 0) { error166("Nullpointer exception when calling CounterImpl.incCounter"); } else { error166("Called CounterImpl.incCounter on invalid object."); }; } else { }; CounterImpl_Counter_incCounter113(this_138); } function dispatch_CounterImpl_test_CounterImpl_Counter_getCounter557(integer this922) returns integer { local integer test_CounterImpl_Counter_getCounter_result155 if (CounterImpl_typeId_974[this_922] == 0) { if (this_922 == 0) { error166("Nullpointer exception when calling CounterImpl.getCounter"); } else { error166("Called CounterImpl.getCounter on invalid object."); }; } else { }; test_CounterImpl_Counter_getCounter_result_155 = CounterImpl_Counter_getCounter222(this_922); return test_CounterImpl_Counter_getCounter_result_155; }