emacs-devel
[Top][All Lists]
Advanced

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

Re: User-reserved element in byte code vectors


From: Miles Bader
Subject: Re: User-reserved element in byte code vectors
Date: 21 May 2004 10:28:43 +0900

Richard Stallman <address@hidden> writes:
>     Essentially:
> 
>        (let ((env (vector 0)))
>        (curry env (lambda (env) (aset env 0 (+ (aref env 0) 1)))))
> 
>     [of course, `env' is not visible to the user code]
> 
> The word "essentially" means that this isn't really
> the answer to the question.  What precisely are the Lisp
> objects produced?

The above code should be exact, except that `env' never exists a normal
named variable -- in the compiler it's a variable with a funny (not a
symbol) name, and at runtime, it's just a stack location (like other
"local" variables).

> Why use `curry' for this at all, rather than implementing
> a `closure' funcvec type?

Well, I have nothing particularly against a special closure type; it's
just that in this case it's not necessary -- curry provides exactly the
functionality I need.

I suppose I could make a special `closure' funvec type that actually
shared all its code with that for `curry', if secondary effects are an
issue (e.g., what describe-function says, etc).

Currently my compiler doesn't even compile such things properly, so
things are kind of off my radar... :-/

-Miles
-- 
=====
(^o^;
(()))
*This is the cute octopus virus, please copy it into your sig so it can spread.




reply via email to

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