[LLVMdev] accessing a bitcode library exported from C++ using the JIT

OvermindDL1 overminddl1 at gmail.com
Tue Sep 1 08:59:51 PDT 2009


On Tue, Sep 1, 2009 at 6:12 AM, Samuel Crow<samuraileumas at yahoo.com> wrote:
> We are implementing an extensible language.  That's one where you can add commands and constructs to the language without having to recompile the parser.  We want compilation of the parser in order to "freeze" it but only as an option.  One goal is to eventually get the macro functions of our language to the point where they are equivalent to the template functions of C++ so we can make a self-hosting langauge.

Ah, I have been doing the same thing, letting read-macro's and macro's
(ala lisp/scheme style), but I created a new terminal in Spirit that
can do the callbacks, but yea, I intend to re-implement the PEG parser
as read-macro's in my language and re-implement the whole spirit
parser in there, intending for the whole thing to become self-hosting
in LLVM by the end.  :)


On Tue, Sep 1, 2009 at 6:12 AM, Samuel Crow<samuraileumas at yahoo.com> wrote:
> Also, all of the action nodes in our example PEG parser are written in LLVM Assembly rather than only C++ (although they call functions from a C++ library) so I doubt it would work in Spirit2.1 without writing a syntax converter.  The syntax converter may come in time but it's only optional.  If you're really interested in a partially finished example parser, it is at http://mattathias.cvs.sourceforge.net/viewvc/mattathias/mattathias/modules/front_ends/Amos/ .  It contains a PEG parser file and the source to a C++ library included in that PEG file.

Actually, creating a new terminal (as I did) in Spirit 2.1 is
extremely easy now (compared to previous spirit's, 2.0, 1.x), that is
how I handled it, but yea, as stated, I intend to eventually move to
to completely self-hosted LLVM code, have the interpreter interpret
itself.

I will take a look at your link later though, curious as to what you
are making.  :)




More information about the llvm-dev mailing list