chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] s11n among different chicken versions


From: felix winkelmann
Subject: Re: [Chicken-users] s11n among different chicken versions
Date: Mon, 7 Aug 2006 09:36:16 +0200

On 8/7/06, Daishi Kato <address@hidden> wrote:

If the procedure ID is really re-used, the fallback procedure is never
called, isn't it?

That's correct, unfortunately.


If I could not find any solution to this, my final resort would be
editting the binary dump file to change procedure IDs.

I think it would be better to write a custom version of
"deserialize", the last few lines look like this:

             (switch tag
             ...
               (procedure-tag
                (let ((id (fetch)))
               ;; >>>>>> do some custom processing here <<<<<<<<<<<
                  (cond ((##core#inline "set_procedure_ptr" x 
(##sys#make-c-string id))
                         (fetchslots x 1) )
                        (fallback
                         (let ((proc (fallback id)))
                           (vector-set! backrefs r proc)
                           proc) )
                        (else (error 'deserialize "unable to deserialize 
procedure - no
table entry found" id))) ) )
               (else (error 'deserialize "invalid tag" tag)) ) ) ) ) ) )
   (fetch) ) )

It shouldn't be to hard to add some hook there to do any custom
handling of specific IDs. But, again, it's slippy terrain you're moving
on.


cheers,
felix

--
http://galinha.ucpel.tche.br:8081/blog/blog.ssp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]