[cfe-dev] C++ to Python Project Proposal
jdkunk3 at gmail.com
Fri Nov 5 18:38:23 CDT 2010
Aye, you said it stops before CodeGen. I was going to replace the llvm code
gen to an output a near source translation with boost::python components
being added in as needed. I am just having a hard time figuring where to
hook into the code.
Basically Clang completes the AST. Then Clang informs Clang-CodeGen that it
is complete and it may generate code for this module. I would like to hook
into this code gen step and replace it. Unfortunately, I cannot see how it
is hooked in. I cannot see the joint which connect CodeGen and the AST
Second, from the comments so far, I think this is a worthy
project. Unfortunately, the time it would take to reinvent what
boost::python does with CPython might be a bear in its own right. However,
the library will be made with the hope that the boost::python calls may be
replaced with strait CPython.
On Fri, Nov 5, 2010 at 7:07 PM, Cédric Venet <cedric.venet at laposte.net>wrote:
> Le 05/11/2010 22:38, Jeff Kunkel a écrit :
> > Stefan,
> > Aye, I agree. But, until that environment exists, I cannot use it.
> > Oh, any advice on a starting point? I am floundering about the
> > clangCodeGen library, but I am not sure this is the correct place to
> > insert my translation.
> I am no expert but I do not think its the good place. The simplest
> things would probably be to build the ast (ie a standard compilation
> which stop before codegen) and then walk the list of
> definition/declaration and emit your binding for each. you may want to
> look at various ast consumers as examples (don't know if it is better to
> do as ast consumer or to walk the ast yourself.)
> No a lot of information here, but it may answer your initial question
> better than the other (interesting) discutions.
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev