Hello, Yes, I completely agree with this. I didn't do that immediately because I'm trying to get the infrastructure for the general case working. I plan to implement un-boxing in CPS. The real reason not to do it yet is that the tree-il-CPS compiler can't compile any examples that would actually need boxes. (But it will be able to soon!)
Noah On Tue, Feb 19, 2013 at 12:53 AM, Mark H Weaver <[email protected]> wrote: > Hi Noah, > > "Noah Lavine" <[email protected]> writes: > > commit 0d0808ae3f7390ffb250b9deb6706ad4158cce0e > > Author: Noah Lavine <[email protected]> > > Date: Mon Feb 18 14:10:58 2013 -0500 > > > > Make Lambda Arguments Mutable > > > > * module/language/cps.scm: let variable objects come with an > > initialization value. > > * module/language/tree-il/compile-cps.scm: put all lambda arguments > in > > variable boxes, so they are mutable. > > Lambda arguments (and all other lexical variables) should only be put > into boxes if they are 'set!' somewhere within their lexical scope. > This can always be determined at compile time. It is crucial that we > minimize the number of mutable variables, since they inhibit most > optimizations. > > The required analysis is already implemented in tree-il/analyze.scm. > > Regards, > Mark >
