@@ -76,19 +76,6 @@ class DottyBackendInterface(val outputDirectory: AbstractFile, val superCallsMap
76
76
annot.tree.tpe.typeSymbol.getAnnotation(AnnotationRetentionAttr ).
77
77
flatMap(_.argumentConstant(0 ).map(_.symbolValue)).getOrElse(AnnotationRetentionClassAttr )
78
78
79
- private def normalizeArgument (arg : Tree ): Tree = arg match {
80
- case Trees .NamedArg (_, arg1) => normalizeArgument(arg1)
81
- case Trees .Typed (arg1, _) => normalizeArgument(arg1)
82
- case _ => arg
83
- }
84
-
85
- def getAnnotPickle (jclassName : String , sym : Symbol ): Option [Annotation ] = None
86
-
87
-
88
- def getRequiredClass (fullname : String ): Symbol = ctx.requiredClass(fullname)
89
-
90
- def getClassIfDefined (fullname : String ): Symbol = NoSymbol // used only for android. todo: implement
91
-
92
79
private def erasureString (clazz : Class [_]): String = {
93
80
if (clazz.isArray) " Array[" + erasureString(clazz.getComponentType) + " ]"
94
81
else clazz.getName
@@ -153,8 +140,6 @@ class DottyBackendInterface(val outputDirectory: AbstractFile, val superCallsMap
153
140
(sym derivesFrom defn.BoxedBooleanClass )
154
141
}
155
142
156
- def getSingleOutput : Option [AbstractFile ] = None // todo: implement
157
-
158
143
// @M don't generate java generics sigs for (members of) implementation
159
144
// classes, as they are monomorphic (TODO: ok?)
160
145
private final def needsGenericSignature (sym : Symbol ): Boolean = ! (
@@ -417,7 +402,7 @@ class DottyBackendInterface(val outputDirectory: AbstractFile, val superCallsMap
417
402
*/
418
403
def primitiveOrClassToBType (sym : Symbol ): BType = {
419
404
assert(sym.isClass, sym)
420
- assert(sym != defn.ArrayClass || isCompilingArray , sym)
405
+ assert(sym != defn.ArrayClass || ctx.compilationUnit.source.file.name == " Array.scala " , sym)
421
406
primitiveTypeMap.getOrElse(sym.asInstanceOf [ct.bTypes.coreBTypes.bTypes.int.Symbol ],
422
407
storage.getClassBTypeAndRegisterInnerClass(sym.asInstanceOf [ct.int.Symbol ])).asInstanceOf [BType ]
423
408
}
@@ -427,7 +412,7 @@ class DottyBackendInterface(val outputDirectory: AbstractFile, val superCallsMap
427
412
* signatures, e.g. `def apply(i: Int): T`. A TyperRef to T is replaced by ObjectReference.
428
413
*/
429
414
def nonClassTypeRefToBType (sym : Symbol ): ClassBType = {
430
- assert(sym.isType && isCompilingArray , sym)
415
+ assert(sym.isType && ctx.compilationUnit.source.file.name == " Array.scala " , sym)
431
416
ObjectReference .asInstanceOf [ct.bTypes.ClassBType ]
432
417
}
433
418
@@ -587,9 +572,6 @@ class DottyBackendInterface(val outputDirectory: AbstractFile, val superCallsMap
587
572
primitiveCompilationUnits(ctx.compilationUnit.source.file.name)
588
573
}
589
574
590
- def isCompilingArray = {
591
- ctx.compilationUnit.source.file.name == " Array.scala"
592
- }
593
575
}
594
576
595
577
object DottyBackendInterface {
0 commit comments