Skip to content

Move Scala.js-specific transforms to the subpackage transform.sjs. #9705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions compiler/src/dotty/tools/dotc/Compiler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dotty.tools
package dotc
package transform
package sjs

import MegaPhase._
import core.DenotTransformers._
Expand Down
Original file line number Diff line number Diff line change
@@ -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._
Expand All @@ -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
Expand Down Expand Up @@ -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"

Expand Down