uhmanoa-transpiler-project / shaka-scheme

The official repository for the UH Manoa Transpiler Project's Scheme interpreter, Shaka Scheme.
32 stars 24 forks source link

Pull request for GCData Implementation #55

Closed btwooton closed 6 years ago

btwooton commented 6 years ago

This pull request is for the implementation of the GCData class. GCData represents the heap allocated memory nodes that will comprise the memory graph of our runtime system. GCData maintains an internal field that stores the actual shaka::Data objects. Additionally, a mark bit is maintained to facilitate the GC algorithms of mark-and-sweep. GCData also maintains a next pointer to a GCData allowing GCData to be linked together inside of GCList, the means by which the garbage collector will maintain access to all heap allocated objects within our system. The actual implementation is quite simple. Helper methods to return either a reference, or a pointer to the internal data were added to facilitate the overloads of -> and * operators on GCNode, which will wrap over GCData. Please review this pull request at your earliest convenience. Thank you.