ACM Home Page
Please provide us with feedback. Feedback
Space-efficient closure representations
Full text PdfPdf (1.26 MB)
Source Conference on LISP and Functional Programming archive
Proceedings of the 1994 ACM conference on LISP and functional programming table of contents
Orlando, Florida, United States
Pages: 150 - 161  
Year of Publication: 1994
ISBN:0-89791-643-3
Also published in ...
Authors
Sponsors
SIGACT: ACM Special Interest Group on Algorithms and Computation Theory
SIGART: ACM Special Interest Group on Artificial Intelligence
SIGPLAN: ACM Special Interest Group on Programming Languages
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 7,   Downloads (12 Months): 46,   Citation Count: 29
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/182409.156783
What is a DOI?

ABSTRACT

Many modern compilers implement function calls (or returns) in two steps: first, a closure environment is properly installed to provide access for free variables in the target program fragment; second, the control is transferred to the target by a “jump with arguments (or results)”. Closure conversion, which decides where and how to represent closures at runtime, is a crucial step in compilation of functional languages. We have a new algorithm that exploits the use of compile-time control and data flow information to optimize closure representations. By extensive closure sharing and allocating as many closures in registers as possible, our new closure conversion algorithm reduces heap allocation by 36% and memory fetches for local/global variables by 43%; and improves the already-efficient code generated by the Standard ML of New Jersey compiler by about 17% on a DECstation 5000. Moreover, unlike most other approaches, our new closure allocation scheme satisfies the strong “safe for space complexity” rule, thus achieving good asymptotic space usage.


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
 
3
Andrew W. Appel and Trevor Jim. Optimizing closure environment representations. Technical Report 168, Dept. of Computer Science, Princeton University, Princeton, N J, 1988.
4
 
5
Andrew W. Appel and David B. MacQueen. Standard ML of New Jersey. In Martin Wirsing, editor, Third Int'I Syrup. on Prog. Lang. Implementation and Logic Programming, pages 1-13, New York, August 1991. Springer-Verlag.
 
6
 
7
Andrew W. Appel and Zhong Shao. An empirical and analytic study of stack vs. heap cost for languages with closures. Technical Report CS-TR-450-94, Princeton University, Department of Computer Science, Princeton, N J, March 1994.
 
8
Lennart Augustsson. Garbage collection in the < v,g >- machine. Technical Report PMG memo 73, Dept. of Computer Sciences, Chalmers University of Technology, Goteborg, Sweden, December 1989.
 
9
Henry G. Baker. The buried binding and stale binding problems of LISP 1.5. unpublished, undistributed paper, June 1976.
10
11
12
13
 
14
15
16
 
17
18
19
20
21
 
22
23
24
25
 
26
 
27
P. J. Landin. The mechanical evaluation of expressions. Computer Journal, 6(4):308-20, 1964.
28
 
29
 
30
Guillermo Juan Rozas. Liar, an algoblike compiler for scheme. S.B. thesis, MIT Dept. of Computer Science and Electrical Engineering, June 1984.
31
 
32
 
33
 
34
Robert E. Tarjan. Testing flow graph reducibility. Journal of Compuier and System Science, 9(3):355-365, December 1974.
35
 
36

CITED BY  29

Collaborative Colleagues:
Zhong Shao: colleagues
Andrew W. Appel: colleagues