Skip to content

Commit 8ab71d6

Browse files
Merge pull request #14872 from dotty-staging/remove-dead-code-compiler-internal-names
Remove dead-code compiler-internal names.
2 parents 91ad6a9 + b1ac317 commit 8ab71d6

File tree

4 files changed

+0
-37
lines changed

4 files changed

+0
-37
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeBodyBuilder.scala

-3
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,6 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
293293
lineNumber(tree)
294294

295295
tree match {
296-
case ValDef(nme.THIS, _, _) =>
297-
report.debuglog("skipping trivial assign to _$this: " + tree)
298-
299296
case tree@ValDef(_, _, _) =>
300297
val sym = tree.symbol
301298
/* most of the time, !locals.contains(sym), unless the current activation of genLoad() is being called

compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala

-5
Original file line numberDiff line numberDiff line change
@@ -1702,11 +1702,6 @@ class JSCodeGen()(using genCtx: Context) {
17021702
tree match {
17031703
/** Local val or var declaration */
17041704
case tree @ ValDef(name, _, _) =>
1705-
/* Must have been eliminated by the tail call transform performed
1706-
* by genMethodBody(). */
1707-
assert(name != nme.THIS,
1708-
s"ValDef(_, nme.THIS, _, _) found at ${tree.span}")
1709-
17101705
val sym = tree.symbol
17111706
val rhs = tree.rhs
17121707
val rhsTree = genExpr(rhs)

compiler/src/dotty/tools/dotc/ast/TreeInfo.scala

-7
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,6 @@ trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] =>
215215
case _ => false
216216
}
217217

218-
/** Is this pattern node a synthetic catch-all case, added during PartialFuction synthesis before we know
219-
* whether the user provided cases are exhaustive. */
220-
def isSyntheticDefaultCase(cdef: CaseDef): Boolean = unsplice(cdef) match {
221-
case CaseDef(Bind(nme.DEFAULT_CASE, _), EmptyTree, _) => true
222-
case _ => false
223-
}
224-
225218
/** Does this CaseDef catch Throwable? */
226219
def catchesThrowable(cdef: CaseDef)(using Context): Boolean =
227220
catchesAllOf(cdef, defn.ThrowableType)

compiler/src/dotty/tools/dotc/core/StdNames.scala

-22
Original file line numberDiff line numberDiff line change
@@ -281,46 +281,24 @@ object StdNames {
281281
// ----- Term names -----------------------------------------
282282

283283
// Compiler-internal
284-
val ANYname: N = "<anyname>"
285-
val COMPANION: N = "<companion>"
286284
val CONSTRUCTOR: N = "<init>"
287285
val STATIC_CONSTRUCTOR: N = "<clinit>"
288-
val DEFAULT_CASE: N = "defaultCase$"
289286
val EVT2U: N = "evt2u$"
290287
val EQEQ_LOCAL_VAR: N = "eqEqTemp$"
291-
val FAKE_LOCAL_THIS: N = "this$"
292288
val LAZY_FIELD_OFFSET: N = "OFFSET$"
293-
val LAZY_SLOW_SUFFIX: N = "$lzycompute"
294-
val UNIVERSE_BUILD_PREFIX: N = "$u.build."
295-
val UNIVERSE_BUILD: N = "$u.build"
296-
val UNIVERSE_PREFIX: N = "$u."
297-
val UNIVERSE_SHORT: N = "$u"
298-
val MIRROR_PREFIX: N = "$m."
299-
val MIRROR_SHORT: N = "$m"
300-
val MIRROR_UNTYPED: N = "$m$untyped"
301-
val NOT_NULL: N = "$nn"
302-
val REIFY_FREE_PREFIX: N = "free$"
303-
val REIFY_FREE_THIS_SUFFIX: N = "$this"
304-
val REIFY_FREE_VALUE_SUFFIX: N = "$value"
305-
val REIFY_SYMDEF_PREFIX: N = "symdef$"
306289
val OUTER: N = "$outer"
307290
val REFINE_CLASS: N = "<refinement>"
308291
val ROOTPKG: N = "_root_"
309-
val SELECTOR_DUMMY: N = "<unapply-selector>"
310292
val SELF: N = "$this"
311293
val SKOLEM: N = "<skolem>"
312-
val SPECIALIZED_INSTANCE: N = "specInstance$"
313-
val THIS: N = "_$this"
314294
val TRAIT_CONSTRUCTOR: N = "$init$"
315295
val THROWS: N = "$throws"
316296
val U2EVT: N = "u2evt$"
317297
val ALLARGS: N = "$allArgs"
318298

319299
final val Nil: N = "Nil"
320300
final val Predef: N = "Predef"
321-
final val ScalaRunTime: N = "ScalaRunTime"
322301
final val BoxedUnit: N = "BoxedUnit"
323-
final val Some: N = "Some"
324302

325303
val x_0 : N = "x$0"
326304
val x_1 : N = "x$1"

0 commit comments

Comments
 (0)