From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-10-04 01:57:08
Doug Gregor wrote:
[LLVM-ers: I CC this message since I explicity mention the LLVM project]
> >> From: David Abrahams [mailto:dave_at_[hidden]]
> >> Stefan has recently been trying to get compile-time constants from
> >> sizeof() into the parser. As he knows, this is going to mean handling
> >> such things as template instantiation and overload resolution. This
> >> is a great opportunity to learn more about how C++ works and to create
> >> a compiler platform that's actually usable by C++ programmers
> > I should mention that the design of the C++ parser allows to manipulate
> > the generated parse tree in-memory and write it out into a file again
> > in
> > a non-lossy way, i.e. it could indeed be used as a source-to-source
> > compiler.
> That's an excellent goal, and you have me interested. It's a huge task,
> requiring a great deal of expertise (collectively, we have that) and
> will require a lot of time.
However, if we have a C++ parser, then we should be able to hook it with LLVM
compiler infrastructure (http://llvm.cs.uiuc.edu/) and have a complete C++
compiler. LLVM already has intermediate program representation and an
impressive set of optimizations, as well as code generators for x86, PPC and
Spart, and also JIT support.
They use modified gcc as C++ frontend, but I know some of the developers are
interested in a new frontend.
Maybe I'm dreaming, but the goal is interesting.
> I think it would be wise to attempt to
> isolate some of the interesting-but-disjoint problems early, so we can
> put out a "request for libraries" of some sort. Things that come to
> mind quickly: a unification algorithm (for template
> instantiation/partial ordering), a tree manipulation/rewriting library
> (for AST transformations), and a flexible symbol table library.
And overload resulution, too. Maybe, we should put up a page somewhere (Boost
Wiki?), with the list of tasks, and one it's finished put the "request for
libraries", as you put it?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk