8000 Remove dead code in `OptimizerCore`. · scala-js/scala-js@de3a015 · GitHub
[go: up one dir, main page]

Skip to content

Commit de3a015

Browse files
committed
Remove dead code in OptimizerCore.
1 parent 8782649 commit de3a015

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

linker/shared/src/main/scala/org/scalajs/linker/frontend/optimizer/OptimizerCore.scala

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5725,8 +5725,6 @@ private[optimizer] object OptimizerCore {
57255725
private final class TooManyRollbacksException
57265726
extends scala.util.control.ControlThrowable
57275727

5728-
private val AnonFunctionClassPrefix = "sjsr_AnonFunction"
5729-
57305728
private type CancelFun = () => Nothing
57315729
private type PreTransCont = PreTransform => TailRec[Tree]
57325730

@@ -5736,12 +5734,6 @@ private[optimizer] object OptimizerCore {
57365734
def isNullable: Boolean = base.isNullable
57375735

57385736
def isNothingType: Boolean = base == NothingType
5739-
5740-
def toNonNullable: RefinedType = {
5741-
if (!isNullable) this
5742-
else if (base == NullType) RefinedType.Nothing
5743-
else RefinedType(base.toNonNullable, isExact, allocationSite)
5744-
}
57455737
}
57465738

57475739
private object RefinedType {
@@ -5768,7 +5760,6 @@ private[optimizer] object OptimizerCore {
57685760
}
57695761

57705762
val NoRefinedType = RefinedType(VoidType)
5771-
val Nothing = RefinedType(NothingType)
57725763
}
57735764

57745765
/**
@@ -6018,12 +6009,6 @@ private[optimizer] object OptimizerCore {
60186009
copy(implsBeingInlined = implsBeingInlined + impl)
60196010
}
60206011

6021-
def inlining(impls: Set[Scope.InliningID]): Scope = {
6022-
val intersection = implsBeingInlined.intersect(impls)
6023-
assert(intersection.isEmpty, s"Circular inlining of $intersection")
6024-
copy(implsBeingInlined = implsBeingInlined ++ impls)
6025-
}
6026-
60276012
def withImportReplacement(importReplacement: ImportReplacement): Scope = {
60286013
assert(this.importReplacement.isEmpty, "Alreadying replacing " +
60296014
s"$this.importReplacement while trying to replace $importReplacement")
@@ -6418,10 +6403,6 @@ private[optimizer] object OptimizerCore {
64186403
if (y >= 0) x-y <= x
64196404
else x-y > x
64206405

6421-
/** Tests whether `-x` is valid without falling out of range. */
6422-
private def canNegateLong(x: Long): Boolean =
6423-
x != Long.MinValue
6424-
64256406
private final class Intrinsics(intrinsicsMap: Map[(ClassName, MethodName), Int]) {
64266407
def apply(flags: ApplyFlags, target: AbstractMethodID): Int = {
64276408
if (flags.isPrivate || flags.isConstructor) {

0 commit comments

Comments
 (0)
0