The powerful by-product of using bytecode for checkpoints is that checkpoints may be recovered by any virtual machine, even those without support for checkpointing. Of course, in this case, the recovered code will not checkpoint further. However, this is an extra degree of functionality. Allow objects to checkpoint themselves Conceptually, Java checkpointing can be viewed as invoking, for each accessible object, a checkpoint method that stores the object into a checkpoint, and a recover method that recovers the object from a checkpoint. There are default checkpointing methods for each primitive type, and the checkpointing of aggregate types is built on top of these primitive defaults.
Recovery is similar.
In Stage 3, we will allow the programmers to provide their own checkpoint and recover methods for objects that override the defaults. The reasons for this are twofold. First, programmers may exploit performance optimizations that arise because the default methods may save more than is necessary. For example, an object may be able to build significant parts of its state from a smaller part of its state. Thus the significant parts may be excluded from the checkpoint, and simply rebuilt upon recovery.