Skip to content

Commit ac70b31

Browse files
Remove dependency between dotty-compiler and dotty-library
1 parent 5bbf4ea commit ac70b31

File tree

6 files changed

+12
-18
lines changed

6 files changed

+12
-18
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ import Decorators.SymbolIteratorDecorator
7171
*/
7272
object Denotations {
7373

74-
implicit def eqDenotation: Eq[Denotation, Denotation] = Eq
75-
7674
/** A denotation is the result of resolving
7775
* a name (either simple identifier or select) during a given period.
7876
*

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ object Names {
2626
def toTermName: TermName
2727
}
2828

29-
implicit def eqName: Eq[Name, Name] = Eq
30-
3129
/** A name is essentially a string, with three differences
3230
* 1. Names belong in one of two name spaces: they are type names or term names.
3331
* Term names have a sub-category of "local" field names.

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,6 @@ trait Symbols { this: Context =>
378378

379379
object Symbols {
380380

381-
implicit def eqSymbol: Eq[Symbol, Symbol] = Eq
382-
383381
/** A Symbol represents a Scala definition/declaration or a package.
384382
* @param coord The coordinates of the symbol (a position or an index)
385383
* @param id A unique identifier of the symbol (unique per ContextBase)

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ object Types {
4040

4141
@sharable private var nextId = 0
4242

43-
implicit def eqType: Eq[Type, Type] = Eq
44-
4543
/** Main class representing types.
4644
*
4745
* The principal subclasses and sub-objects are as follows:

compiler/src/dotty/tools/dotc/transform/LazyVals.scala

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,8 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer {
347347
// compute or create appropriate offsetSymol, bitmap and bits used by current ValDef
348348
appendOffsetDefs.get(claz) match {
349349
case Some(info) =>
350-
val flagsPerLong = (64 / dotty.runtime.LazyVals.BITS_PER_LAZY_VAL).toInt
350+
val BITS_PER_LAZY_VAL = 2L // To be kept in sync with dotty.runtime.LazyVals.BITS_PER_LAZY_VAL
351+
val flagsPerLong = (64 / BITS_PER_LAZY_VAL).toInt
351352
info.ord += 1
352353
ord = info.ord % flagsPerLong
353354
val id = info.ord / flagsPerLong
@@ -398,14 +399,15 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer {
398399
object LazyVals {
399400
object lazyNme {
400401
object RLazyVals {
401-
import dotty.runtime.LazyVals._
402-
val get = Names.get.toTermName
403-
val setFlag = Names.setFlag.toTermName
404-
val wait4Notification = Names.wait4Notification.toTermName
405-
val state = Names.state.toTermName
406-
val cas = Names.cas.toTermName
407-
val getOffset = Names.getOffset.toTermName
402+
// To be kept in sync with dotty.runtime.LazyVals.Names._
403+
val cas = "CAS".toTermName
404+
val get = "get".toTermName
405+
val getOffset = "getOffset".toTermName
406+
val setFlag = "setFlag".toTermName
407+
val state = "STATE".toTermName
408+
val wait4Notification = "wait4Notification".toTermName
408409
}
410+
409411
val flag = "flag".toTermName
410412
val result = "result".toTermName
411413
val value = "value".toTermName

library/src/dotty/runtime/LazyVals.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import scala.annotation.tailrec
88
object LazyVals {
99
private val unsafe = scala.concurrent.util.Unsafe.instance
1010

11-
final val BITS_PER_LAZY_VAL = 2L
11+
final val BITS_PER_LAZY_VAL = 2L // To be kept in sync with dotty/tools/dotc/transform/LazyVals.scala
1212
final val LAZY_VAL_MASK = 3L
1313
final val debug = false
1414

@@ -91,7 +91,7 @@ object LazyVals {
9191
r
9292
}
9393

94-
object Names {
94+
object Names { // To be kept in sync with dotty/tools/dotc/transform/LazyVals.scala
9595
final val state = "STATE"
9696
final val cas = "CAS"
9797
final val setFlag = "setFlag"

0 commit comments

Comments
 (0)