Skip to content

Commit 03b9887

Browse files
authored
Merge pull request #4545 from dotty-staging/opt/remove-DotClass
Remove DotClass
2 parents 67e2b6a + ecb69ee commit 03b9887

20 files changed

+28
-25
lines changed

compiler/src/dotty/tools/dotc/Driver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import fromtasty.TASTYCompiler
1616
* process, but in most cases you only need to call [[process]] on the
1717
* existing object [[Main]].
1818
*/
19-
class Driver extends DotClass {
19+
class Driver {
2020

2121
protected def newCompiler(implicit ctx: Context): Compiler =
2222
if (ctx.settings.fromTasty.value) new TASTYCompiler

compiler/src/dotty/tools/dotc/ast/Positioned.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import core.StdNames.nme
1010

1111
/** A base class for things that have positions (currently: modifiers and trees)
1212
*/
13-
abstract class Positioned extends DotClass with Product {
13+
abstract class Positioned extends Product {
1414

1515
private[this] var curPos: Position = _
1616

compiler/src/dotty/tools/dotc/ast/Trees.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ object Trees {
853853

854854
// ----- Generic Tree Instances, inherited from `tpt` and `untpd`.
855855

856-
abstract class Instance[T >: Untyped <: Type] extends DotClass { inst =>
856+
abstract class Instance[T >: Untyped <: Type] { inst =>
857857

858858
type Tree = Trees.Tree[T]
859859
type TypTree = Trees.TypTree[T]

compiler/src/dotty/tools/dotc/config/CompilerCommand.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Properties._
1010

1111
import scala.collection.JavaConverters._
1212

13-
object CompilerCommand extends DotClass {
13+
object CompilerCommand {
1414

1515
/** The name of the command */
1616
def cmdName = "dotc"

compiler/src/dotty/tools/dotc/core/Contexts.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ object Contexts {
710710
else assert(thread == Thread.currentThread(), "illegal multithreaded access to ContextBase")
711711
}
712712

713-
class GADTMap(initBounds: SimpleIdentityMap[Symbol, TypeBounds]) extends util.DotClass {
713+
class GADTMap(initBounds: SimpleIdentityMap[Symbol, TypeBounds]) {
714714
private[this] var myBounds = initBounds
715715
def setBounds(sym: Symbol, b: TypeBounds): Unit =
716716
myBounds = myBounds.updated(sym, b)

compiler/src/dotty/tools/dotc/core/Denotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ object Denotations {
7676
/** A PreDenotation represents a group of single denotations or a single multi-denotation
7777
* It is used as an optimization to avoid forming MultiDenotations too eagerly.
7878
*/
79-
abstract class PreDenotation extends util.DotClass {
79+
abstract class PreDenotation {
8080

8181
/** A denotation in the group exists */
8282
def exists: Boolean

compiler/src/dotty/tools/dotc/core/NameKinds.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ object NameKinds {
2525
@sharable private val uniqueNameKinds = new mutable.HashMap[String, UniqueNameKind]
2626

2727
/** A class for the info stored in a derived name */
28-
abstract class NameInfo extends DotClass {
28+
abstract class NameInfo {
2929
def kind: NameKind
3030
def mkString(underlying: TermName): String
3131
def map(f: SimpleName => SimpleName): NameInfo = this
3232
}
3333

3434
/** An abstract base class of classes that define the kind of a derived name info */
35-
abstract class NameKind(val tag: Int) extends DotClass { self =>
35+
abstract class NameKind(val tag: Int) { self =>
3636

3737
/** The info class defined by this kind */
3838
type ThisInfo <: Info

compiler/src/dotty/tools/dotc/core/Names.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ object Names {
3434
/** A common superclass of Name and Symbol. After bootstrap, this should be
3535
* just the type alias Name | Symbol
3636
*/
37-
abstract class Designator extends util.DotClass
37+
abstract class Designator
3838

3939
/** A name if either a term name or a type name. Term names can be simple
4040
* or derived. A simple term name is essentially an interned string stored

compiler/src/dotty/tools/dotc/core/Periods.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import dotty.tools.dotc.util.DotClass
88
* run ids represent compiler runs
99
* phase ids represent compiler phases
1010
*/
11-
abstract class Periods extends DotClass { self: Context =>
11+
abstract class Periods { self: Context =>
1212
import Periods._
1313

1414
/** The current phase identifier */

compiler/src/dotty/tools/dotc/core/Phases.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
package dotty.tools.dotc
1+
package dotty.tools
2+
package dotc
23
package core
34

45
import Periods._
@@ -263,7 +264,7 @@ object Phases {
263264
final def isAfterTyper(phase: Phase): Boolean = phase.id > typerPhase.id
264265
}
265266

266-
trait Phase extends DotClass {
267+
trait Phase {
267268

268269
/** A name given to the `Phase` that can be used to debug the compiler. For
269270
* instance, it is possible to print trees after a given phase using:

0 commit comments

Comments
 (0)