Jonathan Sillito writes: > Here is another suggestion (I think I mentioned this in another email) we > could support a few different types of continuations. The simplest > continuation could be just a saved return address (i.e. an opcode_t*). > This would be roughly as lightweight as the current implementation, I > think. What do you think? I am thinking it would be easier to have one > calling convention then callees know what to expect. > > invokecc .LiteContinuation # or something ...
I like the idea. One big thing that was discussed over on p6l is that we want to make "good coding style" not incur a big performance penalty, like may other languages do. Considering the common definition of "good coding style", this means sub calls have to be as cheap as possible. One thing that worries me about the idea is whether it defeats the benefits of a continuation passing style. You can't bottle up a LiteContinuation which only has the return address saved and store it for later. But then again, you can easily promote it if you need to, by making a full-blown continuation that just returns to that spot. I think with this style, though, that it's silly to use the register stacks for sub calls... shouldn't those be stored in the continuation instead? I don't know how this would measure up performance-wise. Anybody? Luke