Bob Ippolito wrote:
oops, ok, this need some words, still.
Ok, then I am mistaken. I thought I had seen a commit message that said it was made non-recursive. Either way, it's possible to write a non-recursive version of map or anything else, it's just a bit of work.
I had that in 1.0, and I don't plan to do it again, although it is simple, now.
I don't think so, because the C stack should never run too deep, since most code that is going to recurse (from the python-view) will do it non-recursively (from the C-view).
You can create such situations. Until Stackless 3.0, it was possible to do very deep explicit calls to the __call__ wrapper, for instance, and wrappers were not supported. Stackless 3.1 which is about to be announced has full support for all slots and all methods by the machinery. Supported are all tail-recursive calls (like __call__), because this is very cheap to do. But it is possible to implement as many of special method handlers and wrapper handlers as one wishes; I have the infrastructure ready for this.
Anyway, for this rare artificial case, I have a check built in that measures stack size instead of recursion counting, and it will save the stack if necessary. Of course this is platform dependent, but my, if we switch this off for non-supported platforms, what do we loose?
[C++ exception issues]
I don't think that the entire exception handling mechanism gets corrupted. Each tasklet should always have a consistent view of the C stack. Anyway, I don't think we need to discuss it any further unless someone writes a failing test... and if that is indeed the case, then the discussion should be taken to the stackless list.
Good idea, see you there! cheers - chris