Xref: utzoo comp.lang.scheme:2125 comp.lang.lisp:4597 comp.lang.smalltalk:2733 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!mikel From: mikel@Apple.COM (Mikel Evins) Newsgroups: comp.lang.scheme,comp.lang.lisp,comp.lang.smalltalk Subject: Re: implementing an interpreter Message-ID: <50211@apple.Apple.COM> Date: 13 Mar 91 19:08:50 GMT References: <1991Mar8.153120.19836@tripos.com> Distribution: comp Organization: Apple Computer Inc., Cupertino, CA Lines: 22 In article <1991Mar8.153120.19836@tripos.com> rick@tripos.com (Rick Moll) writes: >I have been thinking a lot about data-structures for implementing >a Scheme interpreter, and have the following question: > >There appears to be two fundamentally different approaches to the >design of language interpreters. > >1) Make all pointers to objects have a type tag. This is typical >in lisp and scheme. > >2) Make all pointers to objects be in index into an object table >that contains the type information. The object's data may be in >the object table for small objects, or point to a data-structure >elsewhere for large object types. This is typical in SmallTalk. A third approach is the Big Bag of Pages (BiBoP) arrangement, in which objects of various types are each allocated only in certain ranges of addresses. In this way, an object's type can be determined by examining its address. This scheme somewhat complicates an already somewhat complicated gc algorithm if you plan to use, let us say, generation scavenging, but type determination is fairly cheap.