Data
dotty.tools.dotc.transform.init.Semantic.Cache.Data
Members list
Value members
Concrete methods
Backup the state of the cache
Backup the state of the cache
All the shared data structures must be immutable.
Attributes
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.
Attributes
Prepare cache for the next iteration
Prepare cache for the next iteration
-
Reset changed flag.
-
Use current cache as last cache and set current cache to be empty.
-
Revert heap to stable.
Attributes
- Definition Classes
Inherited methods
Evaluate an expression with cache
Evaluate an expression with cache
The algorithmic skeleton is as follows:
if don't cache result then
return eval(expr)
if this.current.contains(config, expr) then
return cached value
else
val assumed = this.last(config, expr) or bottom value if absent
this.current(config, expr) = assumed
val actual = eval(expr)
if assumed != actual then
this.changed = true
this.current(config, expr) = actual
Attributes
- Inherited from:
- Cache
Attributes
- Inherited from:
- Cache
In this article