[gambit-list] Serialization of continuations

Marc Feeley feeley at iro.umontreal.ca
Thu Feb 12 12:58:32 EST 2009


On 12-Feb-09, at 12:43 PM, Jeremie Lasalle Ratelle wrote:

> Well in fact is it even possible to serialize a compiled procedure?
>
> (define (test) (object->u8vector (lambda (x) (+ x x))))
>
> If I compile and run this I get
>
> *** ERROR IN ##object->u8vector -- can't serialize #<procedure #2>

To serialize compiled code, you need to compile the code with a  
(declare (block)).

With a block declaration the compiler can assign a name to each of the  
pieces of code, so that there is a way to identify these pieces of  
code in the serialized representation.

Marc




More information about the Gambit-list mailing list