Skip to content

Commit 81896f7

Browse files
committed
Disable classes referencing Global in files needed for the backend
These classes cannot be compiled as part of dotty since we don't compile dotty, but we still need to compile the files containing these classes because their companion objects are referenced in other parts of the backend.
1 parent d6b5e8e commit 81896f7

File tree

7 files changed

+9
-4
lines changed

7 files changed

+9
-4
lines changed

src/compiler/scala/tools/nsc/backend/ScalaPrimitives.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import scala.collection.{ mutable, immutable }
2626
*
2727
* Inspired from the `scalac` compiler.
2828
*/
29+
/*
2930
abstract class ScalaPrimitives {
3031
val global: Global
3132
@@ -407,6 +408,7 @@ abstract class ScalaPrimitives {
407408
}
408409
409410
}
411+
*/
410412

411413
object ScalaPrimitives {
412414
// Arithmetic unary operations

src/compiler/scala/tools/nsc/backend/icode/Opcodes.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import Primitives._
6464
* erased types of Scala and references Symbols to refer named entities
6565
* in the source files.
6666
*/
67+
/*
6768
trait Opcodes { self: ICodes =>
6869
import global.{Symbol, NoSymbol, Name, Constant}
6970
import Opcodes._
@@ -719,6 +720,7 @@ trait Opcodes { self: ICodes =>
719720
}
720721
}
721722
}
723+
*/
722724

723725
object Opcodes{
724726

src/compiler/scala/tools/nsc/backend/icode/Primitives.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ package icode
1010

1111
import java.io.PrintWriter
1212

13+
/*
1314
trait Primitives { self: ICodes =>
1415
import Primitives._
1516
@@ -59,6 +60,7 @@ trait Primitives { self: ICodes =>
5960
// jvm : It should call the appropiate 'append' method on StringBuffer
6061
case class StringConcat(el: TypeKind) extends Primitive
6162
}
63+
*/
6264

6365
object Primitives {
6466
/** This class represents a primitive operation. */
@@ -244,4 +246,4 @@ object Primitives {
244246

245247
/** A comparison operation with +1 default for NaNs */
246248
case object CMPG extends ComparisonOp
247-
}
249+
}

src/compiler/scala/tools/nsc/backend/jvm/BCodeAsmCommon.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
package scala.tools.nsc.backend.jvm
77

88
import scala.reflect.internal.AnnotationInfos
9-
import scala.tools.nsc.Global
109

1110
/**
1211
* This trait contains code shared between GenBCode and GenASM that depends on types defined in

src/compiler/scala/tools/nsc/backend/jvm/BCodeSkelBuilder.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ package backend
1010
package jvm
1111

1212
import scala.collection.{ mutable, immutable }
13-
import scala.tools.nsc.symtab._
1413
import scala.annotation.switch
1514

1615
import scala.tools.asm

src/compiler/scala/tools/nsc/backend/jvm/BackendInterface.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package scala.tools.nsc.backend.jvm
33
import scala.collection.generic.Clearable
44
import scala.reflect.ClassTag
55
import scala.reflect.io.AbstractFile
6-
import scala.tools.nsc.Global
76
import scala.language.implicitConversions
87
import scala.tools.asm
98

src/compiler/scala/tools/nsc/backend/jvm/GenBCode.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import scala.reflect.internal.util.Statistics
1414

1515
import scala.tools.asm
1616
import scala.tools.asm.tree.ClassNode
17+
/*
1718
import scala.tools.nsc.backend.jvm.opt.LocalOpt
1819
1920
/*
@@ -409,6 +410,7 @@ abstract class GenBCode extends SubComponent with BCodeSyncAndTry {
409410
} // end of class BCodePhase
410411
411412
} // end of class GenBCode
413+
*/
412414

413415
object GenBCode {
414416
def mkFlags(args: Int*) = args.foldLeft(0)(_ | _)

0 commit comments

Comments
 (0)