array CounterImpl_nextFree208 integer CounterImpl_firstFree180 integer CounterImpl_maxIndex131 array CounterImpl_typeId104 array CounterImpl_Counter_count210 integer CounterImpl_firstFree180 = 0 integer CounterImpl_maxIndex131 = 0 function initGlobals785() { CounterImpl_firstFree_180 = 0; CounterImpl_maxIndex_131 = 0; } function main205() { initGlobals785(); init_test147(); } function config751() { } function init_test147() { local integer c789 c_789 = new_CounterImpl894(); dispatch_CounterImpl_test_CounterImpl_Counter_incCounter143(c_789); dispatch_CounterImpl_test_CounterImpl_Counter_incCounter143(c_789); if (dispatch_CounterImpl_test_CounterImpl_Counter_getCounter117(c_789) == 2) { testSuccess202(); } else { testFail188("defect in equality if"); }; } IS_NATIVE function testSuccess202() { } IS_NATIVE function testFail188(string msg186) { } function CounterImpl_Counter_incCounter192(integer this450) { CounterImpl_Counter_count_210[this_450] = (CounterImpl_Counter_count_210[this_450] + 1); } function CounterImpl_Counter_getCounter341(integer this122) returns integer { return CounterImpl_Counter_count_210[this_122]; } function CounterImpl_init143(integer this178) { CounterImpl_Counter_count_210[this_178] = 0; construct_CounterImpl_Counter152(this_178); } function construct_CounterImpl_Counter152(integer this146) { } function new_CounterImpl894() returns integer { local integer this175 this_175 = alloc_CounterImpl305(); construct_CounterImpl201(this_175); return this_175; } function construct_CounterImpl201(integer this158) { CounterImpl_init143(this_158); } function alloc_CounterImpl305() returns integer { local integer this214 if (CounterImpl_firstFree_180 == 0) { if (CounterImpl_maxIndex_131 < 32768) { CounterImpl_maxIndex_131 = (CounterImpl_maxIndex_131 + 1); this_214 = CounterImpl_maxIndex_131; CounterImpl_typeId_104[this_214] = 1; } else { error215("Out of memory: Could not create CounterImpl."); this_214 = 0; }; } else { CounterImpl_firstFree_180 = (CounterImpl_firstFree_180 - 1); this_214 = CounterImpl_nextFree_208[CounterImpl_firstFree_180]; CounterImpl_typeId_104[this_214] = 1; }; return this_214; } function error215(string msg125) { $debugPrint206((msg_125 + (" " + #getStackTrace()))); } function dispatch_CounterImpl_test_CounterImpl_Counter_incCounter143(integer this265) { if (CounterImpl_typeId_104[this_265] == 0) { if (this_265 == 0) { error215("Nullpointer exception when calling CounterImpl.incCounter"); } else { error215("Called CounterImpl.incCounter on invalid object."); }; } else { }; CounterImpl_Counter_incCounter192(this_265); } function dispatch_CounterImpl_test_CounterImpl_Counter_getCounter117(integer this164) returns integer { local integer test_CounterImpl_Counter_getCounter_result100 if (CounterImpl_typeId_104[this_164] == 0) { if (this_164 == 0) { error215("Nullpointer exception when calling CounterImpl.getCounter"); } else { error215("Called CounterImpl.getCounter on invalid object."); }; } else { }; test_CounterImpl_Counter_getCounter_result_100 = CounterImpl_Counter_getCounter341(this_164); return test_CounterImpl_Counter_getCounter_result_100; }