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 1 commit
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
10 changes: 5 additions & 5 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 @@ -122,14 +122,14 @@ class Compiler {
new ExpandPrivate, // Widen private definitions accessed from nested classes
new RestoreScopes, // Repair scopes rendered invalid by moving definitions in prior phases of the group
new SelectStatic, // get rid of selects that would be compiled into GetStatic
new sjs.JUnitBootstrappers, // Generate JUnit-specific bootstrapper classes for Scala.js (not enabled by default)
new backend.sjs.JUnitBootstrappers, // Generate JUnit-specific bootstrapper classes for Scala.js (not enabled by default)
new CollectSuperCalls) :: // Find classes that are called with super
Nil

/** 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