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 {
204204
205205 override def toString () = map.toString()
206206 }
207-
208- /** Note: don't use `val` to avoid incorrect sharing */
209- private [Semantic ] def empty : Heap = new Heap (Map .empty)
210207 }
211208 type Heap = Heap .Heap
212209
@@ -389,8 +386,6 @@ object Semantic {
389386 }
390387 }
391388
392- val empty : Cache = new Cache ()
393-
394389 extension (cache : CacheStore )
395390 def contains (value : Value , expr : Tree ) = cache.contains(value) && cache(value).contains(expr)
396391 def get (value : Value , expr : Tree ): Value = cache(value)(expr)
@@ -975,7 +970,7 @@ object Semantic {
975970 * }
976971 */
977972 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 )
979974 work(using initialState)
980975 }
981976
You can’t perform that action at this time.
0 commit comments