File tree Expand file tree Collapse file tree 2 files changed +0
-44
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +0
-44
lines changed Original file line number Diff line number Diff line change @@ -597,26 +597,6 @@ object Contexts {
597
597
598
598
def nextId = { _nextId += 1 ; _nextId }
599
599
600
- /** A map from a superclass id to the typeref of the class that has it */
601
- private [core] var classOfId = new Array [ClassSymbol ](Config .InitialSuperIdsSize )
602
-
603
- /** A map from a the typeref of a class to its superclass id */
604
- private [core] val superIdOfClass = new mutable.AnyRefMap [ClassSymbol , Int ]
605
-
606
- /** The last allocated superclass id */
607
- private [core] var lastSuperId = - 1
608
-
609
- /** Allocate and return next free superclass id */
610
- private [core] def nextSuperId : Int = {
611
- lastSuperId += 1
612
- if (lastSuperId >= classOfId.length) {
613
- val tmp = new Array [ClassSymbol ](classOfId.length * 2 )
614
- classOfId.copyToArray(tmp)
615
- classOfId = tmp
616
- }
617
- lastSuperId
618
- }
619
-
620
600
// Types state
621
601
/** A table for hash consing unique types */
622
602
private [core] val uniques = new util.HashSet [Type ](Config .initialUniquesCapacity) {
@@ -682,9 +662,6 @@ object Contexts {
682
662
683
663
def reset () = {
684
664
for ((_, set) <- uniqueSets) set.clear()
685
- for (i <- 0 until classOfId.length) classOfId(i) = null
686
- superIdOfClass.clear()
687
- lastSuperId = - 1
688
665
}
689
666
690
667
// Test that access is single threaded
Original file line number Diff line number Diff line change @@ -562,27 +562,6 @@ object Symbols {
562
562
final def classDenot (implicit ctx : Context ): ClassDenotation =
563
563
denot.asInstanceOf [ClassDenotation ]
564
564
565
- private var superIdHint : Int = - 1
566
-
567
- override def superId (implicit ctx : Context ): Int = {
568
- val hint = superIdHint
569
- if (hint >= 0 && hint <= ctx.lastSuperId && (ctx.classOfId(hint) eq this ))
570
- hint
571
- else {
572
- val id = ctx.superIdOfClass get this match {
573
- case Some (id) =>
574
- id
575
- case None =>
576
- val id = ctx.nextSuperId
577
- ctx.superIdOfClass(this ) = id
578
- ctx.classOfId(id) = this
579
- id
580
- }
581
- superIdHint = id
582
- id
583
- }
584
- }
585
-
586
565
override protected def prefixString = " ClassSymbol"
587
566
}
588
567
You can’t perform that action at this time.
0 commit comments