array MyInterface_nextFree108 integer MyInterface_firstFree640 integer MyInterface_maxIndex130 array MyInterface_typeId107 integer MyInterface_firstFree640 = 0 integer MyInterface_maxIndex130 = 0 function initGlobals971() { MyInterface_firstFree_640 = 0; MyInterface_maxIndex_130 = 0; } function main212() { initGlobals971(); init_Test155(); } function config163() { } function init_Test155() { local integer a129 local integer b873 a_129 = new_MyInterfaceAbstractImpl520(); b_873 = new_MyInterfaceImpl160(); println678(dispatch_MyInterface_Test_MyInterface_getStr111(a_129)); println678(dispatch_MyInterface_Test_MyInterface_getStr111(b_873)); if ((dispatch_MyInterface_Test_MyInterface_getStr111(a_129) == "AAbstract") and (dispatch_MyInterface_Test_MyInterface_getStr111(b_873) == "MyInterfaceImpl")) { testSuccess115(); } else { }; } IS_NATIVE function println678(string s108) { } IS_NATIVE function testSuccess115() { } function MyInterfaceAbstract_getSome130(integer this657) returns string { return "AAbstract"; } function MyInterfaceAbstract_init719(integer this365) { } function construct_MyInterfaceAbstract107(integer this903) { MyInterfaceAbstract_init719(this_903); } function MyInterfaceAbstractImpl_getStr154(integer this179) returns string { return dispatch_MyInterfaceAbstract_Test_MyInterfaceAbstract_getSome132(this_179); } function MyInterfaceAbstractImpl_init766(integer this198) { } function new_MyInterfaceAbstractImpl520() returns integer { local integer this160 this_160 = alloc_MyInterfaceAbstractImpl221(); construct_MyInterfaceAbstractImpl180(this_160); return this_160; } function construct_MyInterfaceAbstractImpl180(integer this736) { construct_MyInterfaceAbstract107(this_736); MyInterfaceAbstractImpl_init766(this_736); } function MyInterfaceImpl_getStr135(integer this199) returns string { return "MyInterfaceImpl"; } function MyInterfaceImpl_init192(integer this743) { } function new_MyInterfaceImpl160() returns integer { local integer this114 this_114 = alloc_MyInterfaceImpl631(); construct_MyInterfaceImpl204(this_114); return this_114; } function construct_MyInterfaceImpl204(integer this108) { MyInterfaceImpl_init192(this_108); } function error536(string msg150) { $debugPrint160((msg_150 + (" " + #getStackTrace()))); } function alloc_MyInterfaceAbstractImpl221() returns integer { local integer this116 if (MyInterface_firstFree_640 == 0) { if (MyInterface_maxIndex_130 < 32768) { MyInterface_maxIndex_130 = (MyInterface_maxIndex_130 + 1); this_116 = MyInterface_maxIndex_130; MyInterface_typeId_107[this_116] = 3; } else { error536("Out of memory: Could not create MyInterfaceAbstractImpl."); this_116 = 0; }; } else { MyInterface_firstFree_640 = (MyInterface_firstFree_640 - 1); this_116 = MyInterface_nextFree_108[MyInterface_firstFree_640]; MyInterface_typeId_107[this_116] = 3; }; return this_116; } function alloc_MyInterfaceImpl631() returns integer { local integer this120 if (MyInterface_firstFree_640 == 0) { if (MyInterface_maxIndex_130 < 32768) { MyInterface_maxIndex_130 = (MyInterface_maxIndex_130 + 1); this_120 = MyInterface_maxIndex_130; MyInterface_typeId_107[this_120] = 4; } else { error536("Out of memory: Could not create MyInterfaceImpl."); this_120 = 0; }; } else { MyInterface_firstFree_640 = (MyInterface_firstFree_640 - 1); this_120 = MyInterface_nextFree_108[MyInterface_firstFree_640]; MyInterface_typeId_107[this_120] = 4; }; return this_120; } function dispatch_MyInterface_Test_MyInterface_getStr111(integer this127) returns string { local string Test_MyInterface_getStr_result118 if (MyInterface_typeId_107[this_127] == 0) { if (this_127 == 0) { error536("Nullpointer exception when calling MyInterface.getStr"); } else { error536("Called MyInterface.getStr on invalid object."); }; } else { }; if (MyInterface_typeId_107[this_127] <= 3) { Test_MyInterface_getStr_result_118 = MyInterfaceAbstractImpl_getStr154(this_127); } else { Test_MyInterface_getStr_result_118 = MyInterfaceImpl_getStr135(this_127); }; return Test_MyInterface_getStr_result_118; } function dispatch_MyInterfaceAbstract_Test_MyInterfaceAbstract_getSome132(integer this112) returns string { local string Test_MyInterfaceAbstract_getSome_result344 if (MyInterface_typeId_107[this_112] == 0) { if (this_112 == 0) { error536("Nullpointer exception when calling MyInterfaceAbstract.getSome"); } else { error536("Called MyInterfaceAbstract.getSome on invalid object."); }; } else { }; Test_MyInterfaceAbstract_getSome_result_344 = MyInterfaceAbstract_getSome130(this_112); return Test_MyInterfaceAbstract_getSome_result_344; }