search for: upvalues

Displaying 4 results from an estimated 4 matches for "upvalues".

Did you mean: pvalues
2013 Jan 26
0
[LLVMdev] Closures, newbie question
...are, (i think) but maybe someone could point me to where to read about how to do them in llvm. I've implemented closures in the past --- it's fiddly and a surprising amount of work, but not actually hard. Basically: - do static analysis of your code to determine what functions import what upvalues from where and what functions export upvalues to where. - any function exporting upvalues needs to allocate its stack frame (or at least, enough of its stack frame to contain the upvalues) from the heap. - any function which imports upvalues must take an extra parameter pointing to the imported s...
2013 Jan 26
2
[LLVMdev] Closures, newbie question
So I read the Kaleidoscope tutorial, big thanks to Chris Latter. Good pace, still excellent coverage. Just at the end it mentions closures and I was wondering how those are done in llvm. The link was to wikipedia, and i do know what closures/blocks/continuations are, (i think) but maybe someone could point me to where to read about how to do them in llvm. Thanks Torsten
2010 Aug 28
2
[LLVMdev] Dataflow analysis based optimisations
...compiler for a very closure-centric language. It's becoming apparent that it's going to suffer heavily from garbage collector churn, as all the useful programming idioms the language makes possible are going to involve memory allocations, either to create objects or to allocate storage for upvalues. However, it's possible to optimise away a lot of heap allocations, and replace them with allocas instead, *if* we know that the lifetime of the object is going to be shorter than the lifetime of the stack frame --- in other words, the object will be used strictly inside the function and nowhe...
2010 Aug 28
0
[LLVMdev] Dataflow analysis based optimisations
...closure-centric > language. It's becoming apparent that it's going to suffer heavily from > garbage collector churn, as all the useful programming idioms the > language makes possible are going to involve memory allocations, either > to create objects or to allocate storage for upvalues. > > However, it's possible to optimise away a lot of heap allocations, and > replace them with allocas instead, *if* we know that the lifetime of the > object is going to be shorter than the lifetime of the stack frame --- > in other words, the object will be used strictly insid...