Skip to content

Commit da99c31

Browse files
committed
[wip, benchmarking] Remove DotClass
1 parent 297e9fc commit da99c31

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
@@ -14,7 +14,7 @@ import fromtasty.TASTYCompiler
1414
* process, but in most cases you only need to call [[process]] on the
1515
* existing object [[Main]].
1616
*/
17-
class Driver extends DotClass {
17+
class Driver {
1818

1919
protected def newCompiler(implicit ctx: Context): Compiler =
2020
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
@@ -821,7 +821,7 @@ object Trees {
821821

822822
// ----- Generic Tree Instances, inherited from `tpt` and `untpd`.
823823

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

826826
type Tree = Trees.Tree[T]
827827
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
@@ -693,7 +693,7 @@ object Contexts {
693693
// @sharable val theBase = new ContextBase // !!! DEBUG, so that we can use a minimal context for reporting even in code that normally cannot access a context
694694
}
695695

696-
class GADTMap(initBounds: SimpleIdentityMap[Symbol, TypeBounds]) extends util.DotClass {
696+
class GADTMap(initBounds: SimpleIdentityMap[Symbol, TypeBounds]) {
697697
private[this] var myBounds = initBounds
698698
def setBounds(sym: Symbol, b: TypeBounds): Unit =
699699
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
@@ -75,7 +75,7 @@ object Denotations {
7575
/** A PreDenotation represents a group of single denotations or a single multi-denotation
7676
* It is used as an optimization to avoid forming MultiDenotations too eagerly.
7777
*/
78-
abstract class PreDenotation extends util.DotClass {
78+
abstract class PreDenotation {
7979

8080
/** A denotation in the group exists */
8181
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
@@ -23,14 +23,14 @@ object NameKinds {
2323
@sharable private val uniqueNameKinds = new mutable.HashMap[String, UniqueNameKind]
2424

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

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

3535
/** The info class defined by this kind */
3636
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
@@ -32,7 +32,7 @@ object Names {
3232
/** A common superclass of Name and Symbol. After bootstrap, this should be
3333
* just the type alias Name | Symbol
3434
*/
35-
abstract class Designator extends util.DotClass
35+
abstract class Designator
3636

3737
/** A name if either a term name or a type name. Term names can be simple
3838
* 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)