On Monday 10 December 2007 23:52, Gordon Henriksen wrote:> On 2007-12-10, at 18:28, Jon Harrop wrote: > > Incidentally, should more OCaml stuff beyond the bindings be part of > > LLVM or would it be better to fork them into a separate project > > Can you be more specific than "stuff"?I'm thinking of a library that compiles an AST represented by an OCaml data structure into the appropriate calls to LLVM. Ultimately, with support for exceptions and a run-time.> > and alleviate some stress from Chris et al? Might be easier if a > > community want to tinker with ideas, e.g. for a higher-level > > interface. > > Chris doesn't have Ocaml installed, AFAIK, so I don't know how much of > a concern that is. ;) I'd probably be the first line of review.Wow, how does he autogenerate that C++ code without OCaml? ;-) -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e
On Dec 12, 2007, at 08:16, Jon Harrop wrote:> On Monday 10 December 2007 23:52, Gordon Henriksen wrote: > >> On 2007-12-10, at 18:28, Jon Harrop wrote: >> >>> Incidentally, should more OCaml stuff beyond the bindings be part >>> of LLVM or would it be better to fork them into a separate project >> >> Can you be more specific than "stuff"? > > I'm thinking of a library that compiles an AST represented by an > OCaml data structure into the appropriate calls to LLVM. Ultimately, > with support for exceptions and a run-time.Since that ASTs are by definition language-specific, such should probably be a separate project because LLVM itself is language-agnostic. — Gordon
On Wednesday 12 December 2007 13:39, Gordon Henriksen wrote:> Since that ASTs are by definition language-specific, such should > probably be a separate project because LLVM itself is language-agnostic.Well, I'd like this to factor out commonality from the implementations of all managed languages (everything from C++ to Lisp) so I think it should express a typed language with typical control-flow constructs (including exceptions), only first-order functions and parametric polymorphism/generics. The generics should be handled by JIT compiling type-specialized functions on demand. This representation should also be cross-platform. This could be a language in itself, of course, just as MSIL is but I think you'd want to add pattern match compilation, higher-order functions, an object system and so forth on top of this to make it useful. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/products/?e