GListDoc.tioga
Bertrand Serlet, July 31, 1986 0:22:20 am PDT
GList
CEDAR 6.1 — FOR INTERNAL XEROX USE ONLY
GList
Cheap Type Genericity in Cedar
Bertrand Serlet
© Copyright 1986 Xerox Corporation. All rights reserved.
Abstract: GList is an interface for dealing with lists. Lists must be of the form LIST OF REF <AType>. Contrarily to List.mesa, you can really use this interface, since it takes REFs as arguments instead of LORA. Speed measurement indicate that GList is only a few % slower than inline code. Implementation of GList uses 2 LOOPHOLEs, but usage is entirely safe. Current restrictions in the abstract machine forbids using GList on LIST OF ROPE.
Created by: Bertrand Serlet
Maintained by: Bertrand Serlet <Serlet.pa>
Keywords: Genericity, Lisp, List, Type Generic
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
The load file GList.load starts GList.
The test program GListTest.mesa included in the package shows how to use GList.
GListImpl uses AMTypes.Range that does NOT work on ROPE (for no good reason I believe). Anyway, comments and name of this proc are obviously wrong. There should be in AMTypes a proc like:
Referent: PROC [type: Type] RETURNS [Type];
domain: UnderClass[type]  {ref, atom, rope}
if type = CODE[REF X], Range[type] = CODE[X], and the appropriate stuff for atom and rope
To test GList itself, start GList and (compile and) run GListTest. A command named GListTest is then registered.