[Top][All Lists]

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

Re: local-eval and bytecompilation

From: Keisuke Nishida
Subject: Re: local-eval and bytecompilation
Date: 08 Oct 2000 15:55:37 -0400
User-agent: T-gnus/6.14.4 (based on Gnus v5.8.6) (revision 02) SEMI/1.13.7 (Awazu) Chao/1.14.0 (Momoyama) Emacs/20.7 (i686-pc-linux-gnu) MULE/4.1 (AOI)

Klaus Schilling <address@hidden> writes:

> Is the forthcoming byte compiler for guile able to treat local-eval ?
> Clisp does not achieve that.

What local-eval does exactly?  Does it evaluate an expression
in the lexical environment like this?

  (define foo 1)
  (let ((foo 2)) (local-eval 'foo)) => 2

I guess it is possible by dynamically compiling the expression.
Currently, I'm going to implement eval as follows:

  (define (eval x e)
    ((make-vm) ((make-compiler) (scheme-translater x e) e)))

A possible implementation of local-eval would look like this:

  (define (local-eval x)
    (eval x (local-environment)))

Actually you don't need local-eval if you have local-environment.
At the moment local-environment cannot be implement with my VM
because bytecodes loose binding names.  I'll somehow support
dynamic access to local binding names because it is needed for
debugging and dynamic scoping.  I'll put it in my mind.

reply via email to

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