[virtmach] Scheme Closure Byte Codes
Peter_Murray@allegiance.com.au
Peter_Murray@allegiance.com.au
Fri, 10 Dec 1999 10:19:06 +1000
> i guess what i was looking for is an opcode that would take an arbitrary
> number of opcodes from the instruction stream, an d make a closure from
them.
Have you read Quiennecs's book "Lisp In Small Pieces"? It details a simple
scheme bytecode generator and executor. It has a couple of bytecodes you
might be interested in;
CREATE_CLOSURE_AND_SHORT_GOTO_FORWARD
CREATE_CLOSURE_AND_LONG_GOTO_FORWARD
CREATE_CLOSURE_AND_LONG_LONG_GOTO_FORWARD
Despite its name, this book is largely about implementing scheme, although
it does discuss Lisp alternatives. All the source code for the byte code
machines he discusses is available on his web site (sorry, I don't have the
address handy).
There is also a large online book; "An Introduction to Scheme and its
Implementation" available at;
http://www.cs.utexas.edu/users/wilson/schintro/schintro_toc.html
I don't know if it discusses bytecoes though. The Quiennec book is
probably best for that.
I hope I haven't repeated stuff you already know about.
Regards,
- Peter