Permalink
Browse files

Fixes SI-5805

  • Loading branch information...
magarciaEPFL committed May 24, 2012
1 parent e490b02 commit a54011bc85f4166d36c4def80aa4691b66716a18
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
@@ -223,8 +223,8 @@ abstract class GenASM extends SubComponent with BytecodeWriters {
// unlike javaNameCache, reverseJavaName contains entries only for class symbols and their internal names.
val reverseJavaName = mutable.Map.empty[String, Symbol] ++= List(
binarynme.RuntimeNothing.toString() -> NothingClass, // neither RuntimeNothingClass nor RuntimeNullClass belong to the co-domain of this map.
binarynme.RuntimeNull.toString() -> NullClass
binarynme.RuntimeNothing.toString() -> RuntimeNothingClass, // RuntimeNothingClass is the bytecode-level return type of Scala methods with Nothing return-type.
binarynme.RuntimeNull.toString() -> RuntimeNullClass
)
private def mkFlags(args: Int*) = args.foldLeft(0)(_ | _)
@@ -587,7 +587,7 @@ abstract class GenASM extends SubComponent with BytecodeWriters {
case None =>
reverseJavaName.put(internalName, trackedSym)
case Some(oldsym) =>
assert(List(NothingClass, NullClass).contains(oldsym) || oldsym == trackedSym,
assert((oldsym == trackedSym) || List(RuntimeNothingClass, RuntimeNullClass).contains(oldsym), // NothingClass, NullClass,
"how can getCommonSuperclass() do its job if different class symbols get the same bytecode-level internal name.")
}
}
@@ -2542,7 +2542,8 @@ abstract class GenASM extends SubComponent with BytecodeWriters {
} else if(kind.isRefOrArrayType) { // REFERENCE(_) | ARRAY(_)
val Success = success
val Failure = failure
(cond, nextBlock) match {
// @unchecked because references aren't compared with GT, GE, LT, LE.
((cond, nextBlock) : @unchecked) match {
case (EQ, Success) => jcode emitIFNONNULL labels(failure)
case (NE, Failure) => jcode emitIFNONNULL labels(success)
case (EQ, Failure) => jcode emitIFNULL labels(success)

0 comments on commit a54011b

Please sign in to comment.