File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed
src/dotty/tools/dotc/backend/jvm Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -405,14 +405,14 @@ abstract class BCodeHelpers extends BCodeTypes with BytecodeWriters {
405
405
*
406
406
* must-single-thread
407
407
*/
408
- final def internalName (sym : Symbol ): String = { asmClassType(sym).getInternalName }
408
+ final def internalName (sym : Symbol )( implicit ctx : core. Contexts . Context ) : String = asmClassType(sym).getInternalName
409
409
410
410
/*
411
411
* Tracks (if needed) the inner class given by `sym`.
412
412
*
413
413
* must-single-thread
414
414
*/
415
- final def asmClassType (sym : Symbol ): BType = {
415
+ final def asmClassType (sym : Symbol )( implicit ctx : core. Contexts . Context ) : BType = {
416
416
assert(
417
417
hasInternalName(sym),
418
418
{
@@ -489,16 +489,17 @@ abstract class BCodeHelpers extends BCodeTypes with BytecodeWriters {
489
489
}
490
490
491
491
def primitiveOrRefType2 (sym : Symbol ): BType = {
492
+ import core .Symbols .defn
493
+
492
494
primitiveTypeMap.get(sym) match {
493
495
case Some (pt) => pt
494
496
case None =>
495
- sym match {
496
- case definitions.NullClass => RT_NULL
497
- case definitions.NothingClass => RT_NOTHING
498
- case _ if sym.isClass => newReference(sym)
499
- case _ =>
500
- assert(sym.isType, sym) // it must be compiling Array[a]
501
- ObjectReference
497
+ if (sym == defn.NullClass ) RT_NULL
498
+ else if (sym == defn.NothingClass ) RT_NOTHING
499
+ else if (sym.isClass) newReference(sym)
500
+ else {
501
+ assert(sym.isType, sym) // it must be compiling Array[a]
502
+ ObjectReference
502
503
}
503
504
}
504
505
}
Original file line number Diff line number Diff line change @@ -334,7 +334,10 @@ abstract class BCodeTypes extends BCodeIdiomatic {
334
334
final def isDeprecated (sym : Symbol ): Boolean = { sym.annotations exists (_ matches definitions.DeprecatedAttr ) }
335
335
336
336
/* must-single-thread */
337
- final def hasInternalName (sym : Symbol ) = { sym.isClass || ((sym is Flags .ModuleVal ) && ! (sym is Flags .Method )) }
337
+ final def hasInternalName (sym : Symbol )(implicit ctx : core.Contexts .Context ) = (
338
+ sym.isClass ||
339
+ ((sym is Flags .ModuleVal ) && ! (sym is Flags .Method ))
340
+ )
338
341
339
342
/* must-single-thread */
340
343
def getSuperInterfaces (csym : Symbol ): List [Symbol ] = {
You can’t perform that action at this time.
0 commit comments