Symbolics

From: Sean 'Captain Napalm' Conner <spc_at_armigeron.com>
Date: Tue Feb 29 17:22:10 2000

It was thus said that the Great Shawn T. Rutledge once stated:
>
> On Tue, Feb 29, 2000 at 02:12:02AM -0500, Dave McGuire wrote:
> > On February 28, Shawn T. Rutledge wrote:
> > > > Hmm...what processor instructions might one create to deal with a
> > > > language with more parens than actual code? ;)
> > >
> > > I doubt that is an issue... I've never written a lisp interpreter (wish
> > > I'd had one of those CS classes where they do that) but I'd guess the
> > > ASCII source code gets tokenized into some kind of tree structure which
> > > is probably interpreted by doing a tree traversal, so the parens are all
> > > gone by that point (they just tell it how to build the tree). But I can't
> > > think of any hardware optimizations that help with trees, other than the
> > > concept of a "stack", which is hardly a new one. Evidently there are some
> > > though.
> >
> > 'Twas a joke, man...
>
> Well I knew you were being facetious, I just took the opportunity to try to
> bait whoever has an opinion or actual knowledge of how LISP gets interpreted.
> Any takers? :-)

  Sure, I'll bite (Hmmmmm, yummmmmm but what's this sharp pointy thing? 8-)

  Instructions to help with pointer manipulations. Also a typed
architecture would help as well. There isn't much in a LISP interpreter and
a fairly minimalistic one can be written in a few hundred lines of code
(although it'll probably be slow).

  The stack is implicit---you don't really use one explicitely (much like
you don't really notice the stack when you make subroutine calls but it's
used implicitely to keep track of return addresses).

  The basic storage unit (a cons cell is the traditional name) might look
something like:

                typedef struct conscell
                {
                  int type;
                  union alltypes data;
                  struct conscell *next;
                } conscell_t;

  A Lisp list is basically, a linked list of conscells with type
information. If you can keep all this in a single word of memory that helps
with memory consumption, and possibly specialized instructions to extract
the fields out to help with speed, and possibly instructions to insert,
delete and walk linked lists. I know the VAX had linked-list instructions.

  -spc (Have compiler, will code)
Received on Tue Feb 29 2000 - 17:22:10 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:32:54 BST