Representing Type Information in Dynamically Typed Languages

This report is a discussion of various techniques for representing type information in dynamically typed languages, as implemented on general-purpose machines (and costs are discussed in terms of modern RISC machines). It is intended to make readily available a large body of knowledge that currently has to be absorbed piecemeal from the literature or re-invented by each language implementer. This discussion covers not only tagging schemes but other forms of representation as well, although the discussion is strictly limited to the representation of type information. It should also be noted that this report does not purport to contain a survey of the relevant literature. Instead, this report gathers together a body of folklore, organizes it into a logical structure, makes some generalizations, and then discusses the results in terms of modern hardware.

[1]  Robert R. Kessler,et al.  Implementing primitive datatypes for higher level languages , 1988 .

[2]  Kenneth William Walker The implementation of an optimizing compiler for ICON , 1992 .

[3]  Simon L. Peyton Jones,et al.  Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine , 1992, Journal of Functional Programming.

[4]  Ralph E. Griswold,et al.  The implementation of the Icon programming language , 1986 .

[5]  Robert L. Bernstein Producing good code for the case statement , 1985, Softw. Pract. Exp..

[6]  Guy L. Steele Data Representations in PDP-10 MACLISP , 1977 .

[7]  Richard P. Gabriel,et al.  Performance and evaluation of Lisp systems , 1985 .

[8]  Michael O. Newton A High Performance Implementation of Prolog , 1987 .

[9]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[10]  Douglas Johnson,et al.  Trap architectures for Lisp systems , 1990, LISP and Functional Programming.

[11]  Junichi Takahashi,et al.  Tachyon Common Lisp: an efficient and portable implementation of CLtL2 , 1992, LFP '92.

[12]  Kevin Hammond The Spineless Tagless G-Machine NOT , 1993 .

[13]  Peter Steenkiste,et al.  Tags and type checking in LISP: hardware and software approaches , 1987, ASPLOS.

[14]  Robert R. Kessler,et al.  Automatic design and implementation of language data types , 1987, PLDI.

[15]  David A. Patterson,et al.  Computer Architecture: A Quantitative Approach , 1969 .

[16]  Koen De Bosschere,et al.  jc: An Efficient and Portable Sequential Implementation of Janus , 1992, JICSLP.

[17]  Benjamin Goldberg,et al.  Polymorphic type reconstruction for garbage collection without tags , 1992, LFP '92.

[18]  Sampath Kannan,et al.  Call forwarding: a simple interprocedural optimization technique for dynamically typed languages , 1994, POPL '94.