Skip to content

Commit 2085001

Browse files
committed
Move the ExplicitJSClasses transform to the subpackage sjs.
We will keep Scala.js-specific phases in that subpackage.
1 parent 0d22c74 commit 2085001

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

compiler/src/dotty/tools/dotc/Compiler.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import typer.{FrontEnd, RefChecks}
77
import Phases.Phase
88
import transform._
99
import dotty.tools.backend.jvm.{CollectSuperCalls, GenBCode}
10-
import dotty.tools.backend.sjs
10+
import dotty.tools.backend
1111
import dotty.tools.dotc.transform.localopt.StringInterpolatorOpt
1212

1313
/** The central class of the dotc compiler. The job of a compiler is to create
@@ -72,7 +72,7 @@ class Compiler {
7272
List(new ElimOpaque, // Turn opaque into normal aliases
7373
new TryCatchPatterns, // Compile cases in try/catch
7474
new PatternMatcher, // Compile pattern matches
75-
new ExplicitJSClasses, // Make all JS classes explicit (Scala.js only)
75+
new sjs.ExplicitJSClasses, // Make all JS classes explicit (Scala.js only)
7676
new ExplicitOuter, // Add accessors to outer classes from nested ones.
7777
new ExplicitSelf, // Make references to non-trivial self types explicit as casts
7878
new StringInterpolatorOpt, // Optimizes raw and s string interpolators by rewriting them to string concatentations
@@ -122,14 +122,14 @@ class Compiler {
122122
new ExpandPrivate, // Widen private definitions accessed from nested classes
123123
new RestoreScopes, // Repair scopes rendered invalid by moving definitions in prior phases of the group
124124
new SelectStatic, // get rid of selects that would be compiled into GetStatic
125-
new sjs.JUnitBootstrappers, // Generate JUnit-specific bootstrapper classes for Scala.js (not enabled by default)
125+
new backend.sjs.JUnitBootstrappers, // Generate JUnit-specific bootstrapper classes for Scala.js (not enabled by default)
126126
new CollectSuperCalls) :: // Find classes that are called with super
127127
Nil
128128

129129
/** Generate the output of the compilation */
130130
protected def backendPhases: List[List[Phase]] =
131-
List(new sjs.GenSJSIR) :: // Generate .sjsir files for Scala.js (not enabled by default)
132-
List(new GenBCode) :: // Generate JVM bytecode
131+
List(new backend.sjs.GenSJSIR) :: // Generate .sjsir files for Scala.js (not enabled by default)
132+
List(new GenBCode) :: // Generate JVM bytecode
133133
Nil
134134

135135
var runId: Int = 1

compiler/src/dotty/tools/dotc/transform/ExplicitJSClasses.scala renamed to compiler/src/dotty/tools/dotc/transform/sjs/ExplicitJSClasses.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package dotty.tools
22
package dotc
33
package transform
4+
package sjs
45

56
import MegaPhase._
67
import core.DenotTransformers._

0 commit comments

Comments
 (0)