guile-devel
[Top][All Lists]
Advanced

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

Re: vm branch now uses vm repl by default


From: Ludovic Courtès
Subject: Re: vm branch now uses vm repl by default
Date: Tue, 09 Sep 2008 23:01:56 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Hello!

Andy Wingo <address@hidden> writes:

> On Tue 09 Sep 2008 10:41, address@hidden (Ludovic Courtès) writes:
>
>> So, previously, there was `variable-ref':
>
> There still is. It is used when a variable is bound immediately, when it
> is pushed on the stack by a link-now instruction.

OK, I see.

>> Now, there's also a vector associated with each closure to store
>> references to global variables, right?  Looks better!
>
> That's always been the case IIRC, only before it used to push and pop a
> bit more -- instead of
>
>     (late-variable-ref 0) 
>
> it would be
>
>     (object-ref 0)
>     (variable-ref)

Oh, right.

>> It'd be nice if we could find a way to "do something" with the
>> `current-reader' fluid at compilation time, like detecting top-level
>> `(fluid-set! current-reader ...)' statements and use that to switch the
>> compiler's reader (hacky...).
>
> Perhaps, there is already a repl-reader fluid for readline's benefit.
> Note also that languages have readers as well, so that e.g. elisp can
> read differently from scheme.

Right, but `current-reader' is a dynamic thing, which complicates the
situation.

A use case is the following:

  (define-module (foo))

  (fluid-set! current-reader %my-favorite-reader)

  ;; use non-standard syntax extensions from now on

I use it this way in Skribilo, but I may well be the only user, who
knows.  ;-)

Anyway, if we are to handle this at all, we're probably going to have to
pattern-match this in `translate.scm' and switch readers when we
encounter it.

Thanks,
Ludo'.





reply via email to

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