Polymorphic type reconstruction for garbage collection without tags

  • Authors:
  • Benjamin Goldberg;Michael Gloger

  • Affiliations:
  • -;-

  • Venue:
  • LFP '92 Proceedings of the 1992 ACM conference on LISP and functional programming
  • Year:
  • 1992

Quantified Score

Hi-index 0.00

Visualization

Abstract

Several papers, have recently claimed that garbage collection can be performed on untagged data in the presence of ML-style type polymorphism. They rely on the ability to reconstruct the type of any reachable object during garbage collection. The bad news is that this is false—there can be reachable objects in the program whose type cannot be determined by the garbage collector. The good news is that tag-free garbage collection can be performed anyway—any object whose type cannot be determined by the collector is, in fact, garbage. Such objects can be discarded by the collector. This is the key result of this paper.We present a type reconstruction algorithm that can determine the type of any non-garbage object. Unfortunately, the implementation of the tag-free collector for a polymorphically typed language is difficult in ways that were not described in the previous papers, and we address some implementation issues as well. However, we mainly describe how to perform type reconstruction during garbage collection and do not attempt to address practical issues of the garbage collection process.