|
ABSTRACT
Lexically-scoped LISP dialects offer great flexibility and expressive power. Unfortunately, they tend to be inefficiently implemented, because many interpreter structures such as variable binding environments must be allocated in the heap rather than on the stack. One solution to this problem is to allocate them on the stack, then move them to the heap if necessary. This means moving the environment of a function only if it passes an environment pointer to the last function it calls, returns an environment pointer as a value, sets a global variable to one, or CONSes one into a list structures. To make this work, the interpreter must be able to tell which current environments a function call is the last function call of, and must know exactly what parts of the stack can be moved. This approach saves dramatically on garbage collections, at the price of increasing function application time a bit. It is worth doing if free storage is not abundant, or if it is important to avoid garbage collections.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
Carl Hewitt 1977 Viewing control structures as patterns of passing messages, AI J. 8, no. 3, pp. 323-364
|
| |
3
|
|
| |
4
|
|
| |
5
|
|
| |
6
|
|
| |
7
|
Guy L. Steele Jr. and Gerald J. Sussman 1978a The revised report on SCHEME, a dialect of LISP, Cambridge: MIT AI Laboratory Memo 452
|
| |
8
|
Guy L. Steele Jr. and Gerald J. Sussman 1978b The art of the interpreter, Cambridge: MIT AI Laboratory Memo 453
|
| |
9
|
|
CITED BY 13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
H. Abelson , R. K. Dybvig , C. T. Haynes , G. J. Rozas , N. I. Adams, IV , D. P. Friedman , E. Kohlbecker , G. L. Steele, Jr. , D. H. Bartley , R. Halstead , D. Oxley , G. J. Sussman , G. Brooks , C. Hanson , K. M. Pitman , M. Wand , William Clinger , Jonathan Rees, Revised report on the algorithmic language scheme, ACM SIGPLAN Lisp Pointers, v.IV n.3, p.1-55, July, 1991
|
|
|
|
|
|
|
|
|
|
|
|
|
|