diff options
Diffstat (limited to 'compiler/src')
-rw-r--r-- | compiler/src/dotty/tools/backend/jvm/GenBCode.scala | 6 | ||||
-rw-r--r-- | compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala | 2 | ||||
-rw-r--r-- | compiler/src/scala/tools/nsc/io/package.scala | 27 |
3 files changed, 30 insertions, 5 deletions
diff --git a/compiler/src/dotty/tools/backend/jvm/GenBCode.scala b/compiler/src/dotty/tools/backend/jvm/GenBCode.scala index 8fd6d1bc0..25a8061ac 100644 --- a/compiler/src/dotty/tools/backend/jvm/GenBCode.scala +++ b/compiler/src/dotty/tools/backend/jvm/GenBCode.scala @@ -8,7 +8,6 @@ import dotty.tools.dotc.core.Names.TypeName import scala.collection.mutable import scala.tools.asm.{ClassVisitor, CustomAttr, FieldVisitor, MethodVisitor} -import scala.tools.nsc.Settings import scala.tools.nsc.backend.jvm._ import dotty.tools.dotc import dotty.tools.dotc.backend.jvm.DottyPrimitives @@ -35,7 +34,6 @@ import tpd._ import StdNames._ import scala.reflect.io.{AbstractFile, Directory, PlainDirectory} -import scala.tools.nsc.backend.jvm.opt.LocalOpt class GenBCode extends Phase { def phaseName: String = "genBCode" @@ -246,10 +244,10 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter * - converting the plain ClassNode to byte array and placing it on queue-3 */ class Worker2 { - lazy val localOpt = new LocalOpt(new Settings()) + // lazy val localOpt = new LocalOpt(new Settings()) def localOptimizations(classNode: ClassNode): Unit = { - /*BackendStats.timed(BackendStats.methodOptTimer)*/(localOpt.methodOptimizations(classNode)) + // BackendStats.timed(BackendStats.methodOptTimer)(localOpt.methodOptimizations(classNode)) } def run(): Unit = { diff --git a/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala b/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala index 7beae90c4..851cacaa2 100644 --- a/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala +++ b/compiler/src/dotty/tools/backend/jvm/scalaPrimitives.scala @@ -37,7 +37,7 @@ import core.Symbols.{Symbol, NoSymbol} * Inspired from the `scalac` compiler. */ class DottyPrimitives(ctx: Context) { - import scala.tools.nsc.backend.ScalaPrimitives._ + import scala.tools.nsc.backend.ScalaPrimitivesOps._ private lazy val primitives: immutable.Map[Symbol, Int] = init diff --git a/compiler/src/scala/tools/nsc/io/package.scala b/compiler/src/scala/tools/nsc/io/package.scala new file mode 100644 index 000000000..6b30e5441 --- /dev/null +++ b/compiler/src/scala/tools/nsc/io/package.scala @@ -0,0 +1,27 @@ +package scala.tools.nsc + +/** + * Compatibility layer needed for the backend. + * + * Our backend is based on the Scala 2.11 GenBCode backend and modified so that + * it compiles both with dotty and scalac, since the backend uses + * scala.tools.nsc.io.*, we need to also provide it. + * + * See http://dotty.epfl.ch/docs/contributing/backend.html for more information. + */ +package object io { + type AbstractFile = scala.reflect.io.AbstractFile + val AbstractFile = scala.reflect.io.AbstractFile + + type Directory = scala.reflect.io.Directory + val Directory = scala.reflect.io.Directory + + type Path = scala.reflect.io.Path + val Path = scala.reflect.io.Path + + type File = scala.reflect.io.File + val File = scala.reflect.io.File + + type Jar = dotty.tools.io.Jar + val Jar = dotty.tools.io.Jar +} |