diff --git a/compiler/src/dotty/tools/dotc/Compiler.scala b/compiler/src/dotty/tools/dotc/Compiler.scala index 48290ac3fb2f..0d87e146fc75 100644 --- a/compiler/src/dotty/tools/dotc/Compiler.scala +++ b/compiler/src/dotty/tools/dotc/Compiler.scala @@ -7,7 +7,7 @@ import typer.{FrontEnd, RefChecks} import Phases.Phase import transform._ import dotty.tools.backend.jvm.{CollectSuperCalls, GenBCode} -import dotty.tools.backend.sjs +import dotty.tools.backend import dotty.tools.dotc.transform.localopt.StringInterpolatorOpt /** The central class of the dotc compiler. The job of a compiler is to create @@ -72,7 +72,7 @@ class Compiler { List(new ElimOpaque, // Turn opaque into normal aliases new TryCatchPatterns, // Compile cases in try/catch new PatternMatcher, // Compile pattern matches - new ExplicitJSClasses, // Make all JS classes explicit (Scala.js only) + new sjs.ExplicitJSClasses, // Make all JS classes explicit (Scala.js only) new ExplicitOuter, // Add accessors to outer classes from nested ones. new ExplicitSelf, // Make references to non-trivial self types explicit as casts new StringInterpolatorOpt, // Optimizes raw and s string interpolators by rewriting them to string concatentations @@ -128,8 +128,8 @@ class Compiler { /** Generate the output of the compilation */ protected def backendPhases: List[List[Phase]] = - List(new sjs.GenSJSIR) :: // Generate .sjsir files for Scala.js (not enabled by default) - List(new GenBCode) :: // Generate JVM bytecode + List(new backend.sjs.GenSJSIR) :: // Generate .sjsir files for Scala.js (not enabled by default) + List(new GenBCode) :: // Generate JVM bytecode Nil var runId: Int = 1 diff --git a/compiler/src/dotty/tools/dotc/transform/ExplicitJSClasses.scala b/compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala similarity index 99% rename from compiler/src/dotty/tools/dotc/transform/ExplicitJSClasses.scala rename to compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala index 8458edc9fa2c..a77916bd8aa1 100644 --- a/compiler/src/dotty/tools/dotc/transform/ExplicitJSClasses.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala @@ -1,6 +1,7 @@ package dotty.tools package dotc package transform +package sjs import MegaPhase._ import core.DenotTransformers._ diff --git a/compiler/src/dotty/tools/backend/sjs/JUnitBootstrappers.scala b/compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala similarity index 99% rename from compiler/src/dotty/tools/backend/sjs/JUnitBootstrappers.scala rename to compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala index 1c14780277d7..b1caa01ca5c7 100644 --- a/compiler/src/dotty/tools/backend/sjs/JUnitBootstrappers.scala +++ b/compiler/src/dotty/tools/dotc/transform/sjs/JUnitBootstrappers.scala @@ -1,9 +1,9 @@ -package dotty.tools.backend.sjs +package dotty.tools.dotc +package transform +package sjs import scala.annotation.tailrec -import dotty.tools.dotc._ - import dotty.tools.dotc.core._ import Constants._ import Contexts._ @@ -19,6 +19,8 @@ import Types._ import dotty.tools.dotc.transform.MegaPhase._ +import dotty.tools.backend.sjs.JSDefinitions.jsdefn + /** Generates JUnit bootstrapper objects for Scala.js. * * On the JVM, JUnit uses run-time reflection to list and invoke JUnit-related @@ -108,7 +110,6 @@ import dotty.tools.dotc.transform.MegaPhase._ class JUnitBootstrappers extends MiniPhase { import JUnitBootstrappers._ import ast.tpd._ - import JSDefinitions.jsdefn def phaseName: String = "junitBootstrappers"