> Okay, at the moment I'm working on getting an implementation of > classes and objects working. I'm also taking a look at calling speed, > as I'd really like to not suck with our call times. :) > > First off, the core stuff looks good. I'd not really looked at it > until now, but now that I have, well... good job folks. I put in a > minor tweak that may or may not speed things up (basically checking > for the COW flag on stack chunks and bailing on the walk up if > they're already marked) depending on what's resident in the L1/L2 > cache. We'll see. > > Second, I see that the registers themselves are in the context > structure. I think this may be a good part of our speed problem with > taking continuations. Now, continuations should *not* restore the > registers, so this strikes me as an incorrect thing to do, but before > I twiddle the context structure some and remove them, I want to check > and make sure that there's not a good reason to have them in.
Well, aren't the registers really part of the context? Saving the registers to a stack and then not using a stack for control flow seems kind of convoluted. I'd prefer that the context does restore the registers, and that C<saveall> / C<restoreall> not be part of the calling convention. CPS puts the call stack into the register stack. But, if you put the register context into the continuation, then everything about the current execution context is inside P0, and you needn't write code to mess with stacks. This seems to make more sense if you use continuations for more than just pure stack-based execution. Luke