Skip to content

Commit 0ef8130

Browse files
Remove dependency between dotty-compiler and dotty-library
1 parent 22dcaa2 commit 0ef8130

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
@@ -72,8 +72,6 @@ import Decorators.SymbolIteratorDecorator
7272
*/
7373
object Denotations {
7474

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

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ object Names {
2929
def toTermName: TermName
3030
}
3131

32-
implicit def eqName: Eq[Name, Name] = Eq
33-
3432
/** A name is essentially a string, with three differences
3533
* 1. Names belong in one of two name spaces: they are type names or term names.
3634
* 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
@@ -379,8 +379,6 @@ trait Symbols { this: Context =>
379379

380380
object Symbols {
381381

382-
implicit def eqSymbol: Eq[Symbol, Symbol] = Eq
383-
384382
/** A Symbol represents a Scala definition/declaration or a package.
385383
* @param coord The coordinates of the symbol (a position or an index)
386384
* @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
@@ -41,8 +41,6 @@ object Types {
4141

4242
@sharable private var nextId = 0
4343

44-
implicit def eqType: Eq[Type, Type] = Eq
45-
4644
/** Main class representing types.
4745
*
4846
* 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
@@ -349,7 +349,8 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer {
349349
// compute or create appropriate offsetSymol, bitmap and bits used by current ValDef
350350
appendOffsetDefs.get(claz) match {
351351
case Some(info) =>
352-
val flagsPerLong = (64 / dotty.runtime.LazyVals.BITS_PER_LAZY_VAL).toInt
352+
val BITS_PER_LAZY_VAL = 2L // To be kept in sync with dotty.runtime.LazyVals.BITS_PER_LAZY_VAL
353+
val flagsPerLong = (64 / BITS_PER_LAZY_VAL).toInt
353354
info.ord += 1
354355
ord = info.ord % flagsPerLong
355356
val id = info.ord / flagsPerLong
@@ -400,14 +401,15 @@ class LazyVals extends MiniPhaseTransform with IdentityDenotTransformer {
400401
object LazyVals {
401402
object lazyNme {
402403
object RLazyVals {
403-
import dotty.runtime.LazyVals._
404-
val get = Names.get.toTermName
405-
val setFlag = Names.setFlag.toTermName
406-
val wait4Notification = Names.wait4Notification.toTermName
407-
val state = Names.state.toTermName
408-
val cas = Names.cas.toTermName
409-
val getOffset = Names.getOffset.toTermName
404+
// To be kept in sync with dotty.runtime.LazyVals.Names._
405+
val cas = "CAS".toTermName
406+
val get = "get".toTermName
407+
val getOffset = "getOffset".toTermName
408+
val setFlag = "setFlag".toTermName
409+
val state = "STATE".toTermName
410+
val wait4Notification = "wait4Notification".toTermName
410411
}
412+
411413
val flag = "flag".toTermName
412414
val result = "result".toTermName
413415
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)