Skip to content

Commit fe7c711

Browse files
hamzaremmalsjrd
authored andcommitted
fix: also do specialisation during Scala.js
1 parent e3f1aa1 commit fe7c711

File tree

3 files changed

+0
-7
lines changed

3 files changed

+0
-7
lines changed

compiler/src/dotty/tools/dotc/transform/SpecializeApplyMethods.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ class SpecializeApplyMethods extends MiniPhase with InfoTransformer {
2525

2626
override def description: String = SpecializeApplyMethods.description
2727

28-
override def isEnabled(using Context): Boolean =
29-
!ctx.settings.scalajs.value && !Feature.shouldBehaveAsScala2
30-
3128
private def specApplySymbol(sym: Symbol, args: List[Type], ret: Type)(using Context): Symbol = {
3229
val name = nme.apply.specializedFunction(ret, args)
3330
// Create the symbol at the next phase, so that it is a valid member of the

compiler/src/dotty/tools/dotc/transform/SpecializeFunctions.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ class SpecializeFunctions extends MiniPhase {
1919

2020
override def runsAfter = Set(ElimByName.name)
2121

22-
override def isEnabled(using Context): Boolean =
23-
!ctx.settings.scalajs.value
24-
2522
/** Create forwarders from the generic applys to the specialized ones.
2623
*/
2724
override def transformDefDef(ddef: DefDef)(using Context) = {

compiler/src/dotty/tools/dotc/transform/SpecializeTuples.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class SpecializeTuples extends MiniPhase:
2020

2121
override def phaseName: String = SpecializeTuples.name
2222
override def description: String = SpecializeTuples.description
23-
override def isEnabled(using Context): Boolean = !ctx.settings.scalajs.value
2423

2524
override def transformApply(tree: Apply)(using Context): Tree = tree match
2625
case Apply(TypeApply(fun: NameTree, targs), args)

0 commit comments

Comments
 (0)