[virtmach] lambda

Dwight Hughes dwighth@ipa.net
Wed, 08 Dec 1999 15:28:12 -0600


I would say yes (or at least something close to it). In some Smalltalks
there is a #blockCopy: bytecode which is used to dynamically create a
BlockContext (Smalltalk blocks are essentially lambdas) during execution
of a method. You can see some of the details of how this was
accomplished in the original Smalltalk-80 VM at
http://users.ipa.net/~dwighth/smalltalk/bluebook/bluebook_imp_toc.html .
Another resource that may be of interest is "The CLISP bytecode
specification" at
http://midas.cs.ndsu.nodak.edu/doc/clisp/html/bytecode.html .

-- Dwight

Ceri Storey wrote:
> 
> in a bytecode based VM, is it possible to have a lambda opcode? (as in
> scheme/lisp/lambda calculus) woud it be a case of pushing a pre
> comipled function onto the stack (from a vector of constants, as in
> emacs) or can you create one from the nomal 'stream' of instructions?
> (i apologise for the pointless question, and for apologising. [stack
> overflow from exessive recursion])
> 
> --
> -----------| Ceri Storey
>    _\|/_   | http://cez.freeshell.org/
>   o(O O)o  |    {for geek code also}
> _o0O(_)O0o_| cez@nomorespam.freeserve.co.uk