GC-Safe Interprocedural Unboxing

  • Leaf Petersen
  • Neal Glew
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7210)


Modern approaches to garbage collection (GC) require information about which variables and fields contain GC-managed pointers. Interprocedural flow analysis can be used to eliminate otherwise unnecessary heap allocated objects (unboxing), but must maintain the necessary GC information. We define a core language which models compiler correctness with respect to the GC, and develop a correctness specification for interprocedural unboxing optimizations. We prove that any optimization which satisfies our specification will preserve GC safety properties and program semantics, and give a practical unboxing algorithm satisfying this specification.


Equivalence Class Operational Semantic Garbage Collection Dynamic Semantic Garbage Collector 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Harper, R., Morrisett, G.: Compiling polymorphism using intensional type analysis. In: Twenty-Second ACM Symposium on Principles of Programming Languages, San Francisco, CA, pp. 130–141 (January 1995)Google Scholar
  2. 2.
    Henglein, F., Jørgensen, J.: Formally optimal boxing. In: Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1994, pp. 213–226. ACM, New York (1994)CrossRefGoogle Scholar
  3. 3.
    Jones, S.L.P., Launchbury, J.: Unboxed Values as First Class Citizens in a Non-Strict Functional Language. In: Hughes, J. (ed.) FPCA 1991. LNCS, vol. 523, pp. 636–666. Springer, Heidelberg (1991)CrossRefGoogle Scholar
  4. 4.
    Leroy, X.: Unboxed objects and polymorphic typing. In: Proceedings of the 19th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1992, pp. 177–188. ACM, New York (1992)CrossRefGoogle Scholar
  5. 5.
    Leroy, X.: The effectiveness of type-based unboxing. Tech. rep., Boston College, Computer Science Department (1997)Google Scholar
  6. 6.
    Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer-Verlag New York, Inc., Secaucus (1999)zbMATHGoogle Scholar
  7. 7.
    Petersen, L., Glew, N.: GC-safe interprocedural unboxing: Extended version (2012),
  8. 8.
    Serrano, M., Feeley, M.: Storage use analysis and its applications. In: Proceedings of the First ACM SIGPLAN International Conference on Functional Programming, ICFP 1996, pp. 50–61. ACM, New York (1996)CrossRefGoogle Scholar
  9. 9.
    Tarditi, D., Morrisett, G., Cheng, P., Stone, C., Harper, R., Lee, P.: Til: a type-directed, optimizing compiler for ml. SIGPLAN Not. 39, 554–567 (2004)CrossRefGoogle Scholar
  10. 10.
    Weeks, S.: Whole-program compilation in MLton. In: Proceedings of the 2006 Workshop on ML, ML 2006, p. 1. ACM, New York (2006)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Leaf Petersen
    • 1
  • Neal Glew
    • 1
  1. 1.Intel LabsSanta ClaraUSA

Personalised recommendations