On 09/30/2017 12:39 AM, Marc Nieper-Wißkirchen wrote:
> How do you deal with call/cc (as far it can be supported by Kawa)? Every continuation created by call/cc needs to save its current map of parameter bindings, so how can this be done without copying?
Normal Kawa only supports call/cc for exits/returns. When it isn't inlined by the compiler, it is implemented
by throwing a special exception. When the exception passes through a 'parameterize' the latter's exception
or finally handler will revert the parameter binding.
Do you store a copy of the parameter binding hash map or do you revert the bindings one by one. The same mechanism could be used for SRFI 154, couldn't it? It wouldn't be less performant than call/cc itself then.
Marc