diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-25 01:48:53 -0700 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2012-05-25 01:48:53 -0700 |
commit | 032e8ae857f84322d90c90479d989bee2cf6a53d (patch) | |
tree | 4349d810d5ae32b3fab43182dd78a53f0cd28710 | |
parent | 19921fb319336a89b438f98b0b99eb7510a70c69 (diff) | |
parent | a54011bc85f4166d36c4def80aa4691b66716a18 (diff) | |
download | scala-032e8ae857f84322d90c90479d989bee2cf6a53d.tar.gz scala-032e8ae857f84322d90c90479d989bee2cf6a53d.tar.bz2 scala-032e8ae857f84322d90c90479d989bee2cf6a53d.zip |
Merge pull request #619 from magarciaEPFL/ticket-SI-5805
Fixes SI-5805
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala index 81fe907a0c..99832d1327 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala +++ b/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)
|