array MyInterface_nextFree117 integer MyInterface_firstFree985 integer MyInterface_maxIndex200 array MyInterface_typeId531 integer MyInterface_firstFree985 = 0 integer MyInterface_maxIndex200 = 0 function initGlobals166() { } function main347() { initGlobals166(); init_Test207(); } function config928() { } function init_Test207() { local integer a137 local integer b650 a_137 = new_MyInterfaceAbstractImpl130(); b_650 = new_MyInterfaceImpl553(); println870(dispatch_MyInterface_Test_MyInterface_getStr163(a_137)); println870(dispatch_MyInterface_Test_MyInterface_getStr163(b_650)); if ((dispatch_MyInterface_Test_MyInterface_getStr163(a_137) == "AAbstract") and (dispatch_MyInterface_Test_MyInterface_getStr163(b_650) == "MyInterfaceImpl")) { testSuccess192(); } else { }; } IS_NATIVE function println870(string s193) { } IS_NATIVE function testSuccess192() { } function new_MyInterfaceAbstractImpl130() returns integer { local integer this514 local integer this363 if (MyInterface_firstFree_985 == 0) { if (MyInterface_maxIndex_200 < 32768) { MyInterface_maxIndex_200 = (MyInterface_maxIndex_200 + 1); this_363 = MyInterface_maxIndex_200; MyInterface_typeId_531[this_363] = 3; } else { error106("Out of memory: Could not create MyInterfaceAbstractImpl."); this_363 = 0; }; } else { MyInterface_firstFree_985 = (MyInterface_firstFree_985 - 1); this_363 = MyInterface_nextFree_117[MyInterface_firstFree_985]; MyInterface_typeId_531[this_363] = 3; }; this_514 = this_363; return this_514; } function new_MyInterfaceImpl553() returns integer { local integer this126 local integer this126 if (MyInterface_firstFree_985 == 0) { if (MyInterface_maxIndex_200 < 32768) { MyInterface_maxIndex_200 = (MyInterface_maxIndex_200 + 1); this_126 = MyInterface_maxIndex_200; MyInterface_typeId_531[this_126] = 4; } else { error106("Out of memory: Could not create MyInterfaceImpl."); this_126 = 0; }; } else { MyInterface_firstFree_985 = (MyInterface_firstFree_985 - 1); this_126 = MyInterface_nextFree_117[MyInterface_firstFree_985]; MyInterface_typeId_531[this_126] = 4; }; this_126 = this_126; return this_126; } function error106(string msg125) { $debugPrint134((msg_125 + (" " + #getStackTrace()))); } function dispatch_MyInterface_Test_MyInterface_getStr163(integer this652) returns string { local string Test_MyInterface_getStr_result126 local integer this957 local integer this488 local string Test_MyInterfaceAbstract_getSome_result994 if (MyInterface_typeId_531[this_652] == 0) { if (this_652 == 0) { error106("Nullpointer exception when calling MyInterface.getStr"); } else { error106("Called MyInterface.getStr on invalid object."); }; } else { }; if (MyInterface_typeId_531[this_652] <= 3) { this_957 = this_652; this_488 = this_957; if (MyInterface_typeId_531[this_488] == 0) { if (this_488 == 0) { error106("Nullpointer exception when calling MyInterfaceAbstract.getSome"); } else { error106("Called MyInterfaceAbstract.getSome on invalid object."); }; } else { }; Test_MyInterfaceAbstract_getSome_result_994 = "AAbstract"; Test_MyInterface_getStr_result_126 = Test_MyInterfaceAbstract_getSome_result_994; } else { Test_MyInterface_getStr_result_126 = "MyInterfaceImpl"; }; return Test_MyInterface_getStr_result_126; }