Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support compilation of C++ package sources #119

Closed
akbertram opened this issue Oct 7, 2015 · 5 comments
Closed

Support compilation of C++ package sources #119

akbertram opened this issue Oct 7, 2015 · 5 comments
Milestone

Comments

@akbertram
Copy link
Member

In principle, our gcc-based native source compilation toolchain should be able to handle C++ as well as C because both are reduced to the Gimple IR by GCC.

The gimple output from a C++ program, however, does include vtables which are more complicated structures than we have currently implemented.

@akbertram
Copy link
Member Author

I think we've made good progress on this. But I think the one major change that we need to make is to get plugin.c to emit the mangled names. Otherwise we will have to deal with all of the complexity of matching function calls to their proper C++ overload. I've also seen in a few tests that we run into problems when you have different overloads that erase to the same JVM type signature - for example if both overloads point to structures that then they will both have signatures of (Lorg.renjin.gcc.runtime.ObjectPtr;)V and we'll generate an invalid classfile.

@akbertram
Copy link
Member Author

@hwvenancio FYI I have made some progress with virtual methods

@hwvenancio
Copy link
Contributor

Nice! I'll take a look, and maybe work on some more contributions. Haven't been able to dedicate time to other projects lately.

@akbertram
Copy link
Member Author

Note to self: c++ exceptions are up next:
Useful blog series on how they are implemented by GCC: C++ Exceptions under the hood

@akbertram
Copy link
Member Author

C++ compilation is now turned on for all CRAN/BioConductor packages. Will open further tickets for specific issues affecting C or C++ code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants