I am trying to serialize continuations with the following code http://pastebin.com/m32acd9c2
It works correctly in gsi but when I compile with gsc I get this error :
can't serialize #<return #4>
Is it possible to serialize a continuation in compiled code?
Afficher les réponses par date
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>
On Thu, Feb 12, 2009 at 12:38 PM, Jeremie Lasalle Ratelle pouexmachinax@gmail.com wrote:
I am trying to serialize continuations with the following code http://pastebin.com/m32acd9c2
It works correctly in gsi but when I compile with gsc I get this error :
can't serialize #<return #4>
Is it possible to serialize a continuation in compiled code?
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