>> 3. Is LLVM able to support advanced runtime features as continuations, >> garbage collection and resuming exception handling. Would there be >> anything in LLVM that would prevent these sorts of features? Is there >> anything in the LLVM runtime that is assumed (dynamic typing, etc). Or >> is LLVM as it's title sugests: Low-Level, so it won't get in your way? > > I believe that the only thing that we are presently missing is > guaranteed tail calls, but it will be added in the near future. LLVM > does not assume anything about your runtime, as you say, it doesn't > get in your way. :) >I would add a couple of minor caveats to this. Continuations are not a first-class feature in LLVM so any transformations that use them are not directly expressible - you would have to do those in a front-end if desired. Also, although you can *implement* any of the above language features in LLVM, I think the code for closures (and therefore any first-class functions) requires excessive use of void pointers and casts. --Vikram http://www.cs.uiuc.edu/~vadve http://llvm.cs.uiuc.edu/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: text/enriched Size: 1143 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20050116/91be0d9b/attachment.bin>
Le 17 janv. 05, à 00:38, Vikram Adve a écrit :> I think the code for closures (and therefore any first-class > functions) requires excessive use of void pointers and casts.And is there any chance that closure implementation could be made easier ? If LLVM is to be used as a platform for new computer languages, tis would be important. I think that closures would be on the top of the expected features list for a "modern" language. -- Sébastien -- «Le soleil est Dieu» <http://www.type-z.org> -- Turner, avant de mourir
On Mon, 17 Jan 2005, [ISO-8859-1] Sébastien Pierre wrote:> Le 17 janv. 05, à 00:38, Vikram Adve a écrit : >> I think the code for closures (and therefore any first-class functions) >> requires excessive use of void pointers and casts. > > And is there any chance that closure implementation could be made easier ?That is entirely possible. However, LLVM evolution is driven by experience. This means we prefer to implement something the straight-forward way using existing features if we can, instead of adding a bunch of stuff to LLVM all of the time. This shows us exactly what the problems are, and allows us to understand what a good solution would look like. If you propose a simple extension "in the spirit of LLVM" and demonstrate how it makes the produced code better in some way, there is a good chance that we'll accept it. However, if the extension is language or target specific, is not "low level", is complex, etc, we probably won't. -Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/