@@ -61,7 +61,6 @@ object NameOps {
61
61
def isReplWrapperName = name.toSimpleName containsSlice INTERPRETER_IMPORT_WRAPPER
62
62
def isSetterName = name endsWith SETTER_SUFFIX
63
63
def isScala2LocalSuffix = name.endsWith(" " )
64
- def isModuleVarName (name : Name ): Boolean = name.exclude(UniqueName ).is(ModuleVarName )
65
64
def isSelectorName = name.startsWith(" _" ) && name.tail.forall(_.isDigit)
66
65
67
66
/** Is name a variable name? */
@@ -105,9 +104,6 @@ object NameOps {
105
104
else name.toTermName.exclude(AvoidClashName )
106
105
}
107
106
108
- /** The superaccessor for method with given name */
109
- def superName : TermName = SuperAccessorName (name.toTermName)
110
-
111
107
def expandedName (base : Symbol , kind : QualifiedNameKind = ExpandedName )(implicit ctx : Context ): N = {
112
108
val prefix =
113
109
if (base.name.is(ExpandedName )) base.name else base.fullNameSeparated(ExpandPrefixName )
@@ -274,17 +270,6 @@ object NameOps {
274
270
}
275
271
}
276
272
277
- // needed???
278
- private val Boxed = Map [TypeName , TypeName ](
279
- tpnme.Boolean -> jtpnme.BoxedBoolean ,
280
- tpnme.Byte -> jtpnme.BoxedByte ,
281
- tpnme.Char -> jtpnme.BoxedCharacter ,
282
- tpnme.Short -> jtpnme.BoxedShort ,
283
- tpnme.Int -> jtpnme.BoxedInteger ,
284
- tpnme.Long -> jtpnme.BoxedLong ,
285
- tpnme.Float -> jtpnme.BoxedFloat ,
286
- tpnme.Double -> jtpnme.BoxedDouble )
287
-
288
273
implicit class TermNameDecorator (val name : TermName ) extends AnyVal {
289
274
import nme ._
290
275
@@ -305,18 +290,6 @@ object NameOps {
305
290
}
306
291
else FieldName (name)
307
292
308
- /** Nominally, name from name$default$N, CONSTRUCTOR for <init> */
309
- def defaultGetterToMethod : TermName =
310
- name rewrite {
311
- case DefaultGetterName (methName, _) => methName
312
- }
313
-
314
- /** If this is a default getter, its index (starting from 0), else -1 */
315
- def defaultGetterIndex : Int =
316
- name collect {
317
- case DefaultGetterName (_, num) => num
318
- } getOrElse - 1
319
-
320
293
def stripScala2LocalSuffix : TermName =
321
294
if (name.isScala2LocalSuffix) name.init.asTermName else name
322
295
@@ -328,57 +301,5 @@ object NameOps {
328
301
case raw.BANG => UNARY_!
329
302
case _ => name
330
303
}
331
-
332
- /** The name of a method which stands in for a primitive operation
333
- * during structural type dispatch.
334
- */
335
- def primitiveInfixMethodName : TermName = name match {
336
- case OR => takeOr
337
- case XOR => takeXor
338
- case AND => takeAnd
339
- case EQ => testEqual
340
- case NE => testNotEqual
341
- case ADD => add
342
- case SUB => subtract
343
- case MUL => multiply
344
- case DIV => divide
345
- case MOD => takeModulo
346
- case LSL => shiftSignedLeft
347
- case LSR => shiftLogicalRight
348
- case ASR => shiftSignedRight
349
- case LT => testLessThan
350
- case LE => testLessOrEqualThan
351
- case GE => testGreaterOrEqualThan
352
- case GT => testGreaterThan
353
- case ZOR => takeConditionalOr
354
- case ZAND => takeConditionalAnd
355
- case _ => NO_NAME
356
- }
357
-
358
- /** Postfix/prefix, really.
359
- */
360
- def primitivePostfixMethodName : TermName = name match {
361
- case UNARY_! => takeNot
362
- case UNARY_+ => positive
363
- case UNARY_- => negate
364
- case UNARY_~ => complement
365
- case `toByte` => toByte
366
- case `toShort` => toShort
367
- case `toChar` => toCharacter
368
- case `toInt` => toInteger
369
- case `toLong` => toLong
370
- case `toFloat` => toFloat
371
- case `toDouble` => toDouble
372
- case _ => NO_NAME
373
- }
374
-
375
- def primitiveMethodName : TermName =
376
- primitiveInfixMethodName match {
377
- case NO_NAME => primitivePostfixMethodName
378
- case name => name
379
- }
380
304
}
381
-
382
- private final val FalseSuper = " $$super" .toTermName
383
- private val FalseSuperLength = FalseSuper .length
384
305
}
0 commit comments