Data
dotty.tools.dotc.transform.init.Objects.Cache.Data
Members list
Value members
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
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.
Attributes
- Inherited from:
- Cache
In this article