Patch for mono-cxxi, to improve substitution for Itanium C++ ABI

83 views
Skip to first unread message

Steven Boswell II

unread,
May 29, 2012, 9:57:02 PM5/29/12
to mono...@googlegroups.com
I'll just assume for the sake of argument that there's someone listening on the other side... :-)

Enclosed is a patch that significantly improves the implementation of substitution in the Itanium C++ ABI code.  Now the "hello" demo can resolve the call to QObject::Connect(), and Tests.ManglingTests.TestCompression completes successfully.  It also fixes several bugs in the existing implementation.

I decided to try to add more classes to the QtGui binding, with the goal of getting larger Qt programs to run, but got stuck at QMainWindow.  I couldn't get it to handle the QFlags<Qt.Gui.Qt.WindowType> parameter to the QMainWindow constructor.  It was easy enough to add '<External implementation="struct">QFlags&lt;Qt::WindowType&gt;</External>' to examples/qt/qt-gui-filters.xml, and to create a local variable of that type, but I couldn't create the mangled C++ name of the constructor method.  It appears that src/generator/Generator.cs isn't adding template-modifiers to CppType, and from reading the gccxml FAQ, it appears that its handling of templates is incomplete.  It still should handle instantiated templates, though, if not the generic version.  It appears straightforward enough to add support for simple templates to src/Mono.Cxxi/Abi/Impl/ItaniumAbi.cs .

So...any suggestions on how to move forward?  Is it as easy as fixing src/generator/Generator.cs to pass along information on template-modifiers?  And is anyone else working on these issues?

Steven Boswell

cxxi-itanium-abi.patch

Steve Browne

unread,
May 30, 2012, 9:36:34 AM5/30/12
to mono...@googlegroups.com, Steven Boswell II
Have you looked at the work that Kevin Thompson and I have done in our fork? I haven't tested the Qt binding, but basically we had all the unit tests passing on Itanium and MSVC and we've added additional tests. I also have some really basic template support done, but there are still some issues with it. The main problems with it are when it comes to nesting template types. We also have a more up-to-date list of issues that need to be resolved. We haven't been doing a lot of active work lately though. I'm holding back a bit for now until the original developers get more active again and bring in some of our work.

Steven Boswell II

unread,
May 30, 2012, 9:35:12 PM5/30/12
to mono...@googlegroups.com
I have just download your fork and will look at it.
Where can I find your up-to-date list of issues?
Sounds like I'll be working in your project until the original developers get active again.

Thanks for writing back.

Steven Boswell


From: Steve Browne <amn...@gmail.com>
To: mono...@googlegroups.com
Cc: Steven Boswell II <ula...@yahoo.com>
Sent: Wednesday, May 30, 2012 6:36 AM
Subject: [mono-cxxi] Re: Patch for mono-cxxi, to improve substitution for Itanium C++ ABI

Have you looked at the work that Kevin Thompson and I have done in our fork? I haven't tested the Qt binding, but basically we had all the unit tests passing on Itanium and MSVC and we've added additional tests. I also have some really basic template support done, but there are still some issues with it. The main problems with it are when it comes to nesting template types. We also have a more up-to-date list of issues that need to be resolved. We haven't been doing a lot of active work lately though. I'm holding back a bit for now until the original developers get more active again and bring in some of our work.

On Tuesday, May 29, 2012 9:57:02 PM UTC-4, Steve wrote:
I'll just assume for the sake of argument that there's someone listening on the other side... :-)

Enclosed is a patch that significantly improves the implementation of substitution in the Itanium C++ ABI code.  Now the "hello" demo can resolve the call to QObject::Connect(), and Tests.ManglingTests. TestCompression completes successfully.  It also fixes several bugs in the existing implementation.

I decided to try to add more classes to the QtGui binding, with the goal of getting larger Qt programs to run, but got stuck at QMainWindow.  I couldn't get it to handle the QFlags<Qt.Gui.Qt. WindowType> parameter to the QMainWindow constructor.  It was easy enough to add '<External implementation="struct"> QFlags&lt;Qt::WindowType&gt;</ External>' to examples/qt/qt-gui-filters. xml, and to create a local variable of that type, but I couldn't create the mangled C++ name of the constructor method.  It appears that src/generator/Generator. cs isn't adding template-modifiers to CppType, and from reading the gccxml FAQ, it appears that its handling of templates is incomplete.  It still should handle instantiated templates, though, if not the generic version.  It appears straightforward enough to add support for simple templates to src/Mono.Cxxi/Abi/Impl/ ItaniumAbi.cs .

So...any suggestions on how to move forward?  Is it as easy as fixing src/generator/ Generator.cs to pass along information on template-modifiers?  And is anyone else working on these issues?

Steven Boswell



Steve Browne

unread,
May 31, 2012, 10:20:00 AM5/31/12
to mono...@googlegroups.com, Steven Boswell II
Our known issues are listed under the issues tab on github.

If you find anything else then please report it there as well. I actually need to address some of those, but I haven't been very active lately. I really want to improve the template support and support wchar_t so we can get std::string working. I think those are the biggest two issues currently. Although I think wchar_t is going to be a pain in the ass, but definitely needs to be done.

Feel free to add any more unit tests too. I know we could definitely use more and we don't account for everything yet.
Reply all
Reply to author
Forward
0 new messages