diff options
author | Paul Phillips <paulp@improving.org> | 2012-01-05 12:51:37 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-01-05 13:13:33 -0800 |
commit | 64107de6cba37f796bd7c6b86509cefba312f91d (patch) | |
tree | f3e90aab60f59ad28c5677c480c4d08b3f675b86 | |
parent | fe94bc7a144921f6c3dcbedbedd2c5c884a77bbd (diff) | |
download | scala-64107de6cba37f796bd7c6b86509cefba312f91d.tar.gz scala-64107de6cba37f796bd7c6b86509cefba312f91d.tar.bz2 scala-64107de6cba37f796bd7c6b86509cefba312f91d.zip |
Fix in bytecode generation.
Don't generate invokeinterface instructions when the target is an
interface but the method being called is defined in java.lang.Object.
Android chokes on them, but regardless, invokevirtual will be faster and
more pleasing to all the more discriminating vms.
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala index 241163885d..c5624a86aa 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala @@ -1199,7 +1199,7 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with hostSymbol.info ; methodOwner.info def isInterfaceCall(sym: Symbol) = ( - sym.isInterface + sym.isInterface && methodOwner != ObjectClass || sym.isJavaDefined && sym.isNonBottomSubClass(ClassfileAnnotationClass) ) // whether to reference the type of the receiver or |