File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
compiler/src/dotty/tools/dotc/transform/init Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -204,9 +204,6 @@ object Semantic {
204
204
205
205
override def toString () = map.toString()
206
206
}
207
-
208
- /** Note: don't use `val` to avoid incorrect sharing */
209
- private [Semantic ] def empty : Heap = new Heap (Map .empty)
210
207
}
211
208
type Heap = Heap .Heap
212
209
@@ -389,8 +386,6 @@ object Semantic {
389
386
}
390
387
}
391
388
392
- val empty : Cache = new Cache ()
393
-
394
389
extension (cache : CacheStore )
395
390
def contains (value : Value , expr : Tree ) = cache.contains(value) && cache(value).contains(expr)
396
391
def get (value : Value , expr : Tree ): Value = cache(value)(expr)
@@ -975,7 +970,7 @@ object Semantic {
975
970
* }
976
971
*/
977
972
def withInitialState [T ](work : State ?=> T ): T = {
978
- val initialState = State (Cache .empty, Heap .empty, new WorkList )
973
+ val initialState = State (new Cache , new Heap ( Map .empty) , new WorkList )
979
974
work(using initialState)
980
975
}
981
976
You can’t perform that action at this time.
0 commit comments