Implement simple stop-the-world tracing for all objects in all blocks, including large objects.
This code should live on the interpreter side as the entry point to tracing an object is the object header, which is implemented on the interpreter side.
Use "white/gray/black" terminology in the code.
Each object type should implement a Trace trait with a trace() method. Objects such as symbols and integers that do not get traced into may have a default no-op implementation of this method.
The trace() method should call ObjectHeader::mark() on the object.
The trace() method may append passed-in objects to a Vec argument to maintain a gray list. There are probably other ways to do this.
Lines must be marked too (conservatively for small objects.)
Implement simple stop-the-world tracing for all objects in all blocks, including large objects.
This code should live on the interpreter side as the entry point to tracing an object is the object header, which is implemented on the interpreter side.
Trace
trait with atrace()
method. Objects such as symbols and integers that do not get traced into may have a default no-op implementation of this method.trace()
method should callObjectHeader::mark()
on the object.trace()
method may append passed-in objects to aVec
argument to maintain a gray list. There are probably other ways to do this.