Polymorphic type reconstruction for garbage collection without tags

Benjamin Goldberg, Michael Gloger
1992 Proceedings of the 1992 ACM conference on LISP and functional programming - LFP '92  
Several papers ([Appe189],[Goldberg9 1]) 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
more » ... 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 dur-
doi:10.1145/141471.141504 dblp:conf/lfp/GoldbergG92 fatcat:6xp7pv572jgzdgraxo5fsay25u