Cache
class Cache
Value members
Concrete methods
Copy the value of (value, expr)
from the last cache to the current cache
Copy the value of (value, expr)
from the last cache to the current cache
It assumes the value is Hot
if it doesn't exist in the last cache.
It updates the current caches if the values change.
The two caches are required because we want to make sure in a new iteration, an expression is evaluated once.
Backup the state of the cache
Backup the state of the cache
All the shared data structures must be immutable.
Prepare for checking next class
Prepare for checking next class
-
Reset changed flag.
-
Commit current cache to stable cache if not changed.
-
Update stable heap if not changed.
-
Reset last cache.