guile-devel
[Top][All Lists]
Advanced

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

Re: Several questions.


From: Dirk Herrmann
Subject: Re: Several questions.
Date: Sat, 21 Apr 2001 22:48:35 +0200 (MEST)

On 21 Apr 2001, Neil Jerram wrote:

> >>>>> "Dirk" == Dirk Herrmann <address@hidden> writes:
> 
>     Dirk> The problem comes from the fact that SCM_DEBUG=1 also makes
>     Dirk> sure that no deprecated code is compiled into guile.  But,
>     Dirk> we don't have a possibility yet to make sure that deprecated
>     Dirk> code is also taken out from the scheme code.  Therefore, the
>     Dirk> problem that you have encountered indicates that there is a
>     Dirk> scheme level reference to something that is deprecated on
>     Dirk> the C level.  Unfortunately, the scheme reference cannot
>     Dirk> easily be removed without breaking backwards compatibility.
> 
> *top-level-lookup-closure* is used by set-current-module in
> boot-9.scm.  But doesn't our definition of deprecation mean that there
> must be an alternative, non-deprecated way of achieving the same
> thing?  So it should be possible to rewrite set-current-module without
> referring to *top-level-lookup-closure*.

The following patch would do it:

 (define (set-current-module m)
   (fluid-set! the-module m)
   (if m
-      (begin
-       ;; *top-level-lookup-closure* is now deprecated
-       (fluid-set! *top-level-lookup-closure*
-                   (module-eval-closure (fluid-ref the-module)))
-       (fluid-set! scm:eval-transformer (module-transformer (fluid-ref
the-modu
-      (fluid-set! *top-level-lookup-closure* #f)))
+      (fluid-set! scm:eval-transformer 
+                 (module-transformer (fluid-ref the-module)))))

But the problem is, that there might be code that uses the value of
*top-level-lookup-closure*.  This is AFAIK the only reason that the
identifier is kept up to date.

Best regards,
Dirk Herrmann




reply via email to

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