Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove fragile code, made redundant by previous commit

The JLS requires, as an exception to generate calls referring to Object for all
methods defined in Object itself; hence, whenever the method owner is Object,
the call should refer to the method owner. The previous commit implemented this
directly in useMethodOwner, so the special case for Object in isInterfaceCall is
now redudant. Hence, remove it.
  • Loading branch information...
commit b0560c5ece29ad9d3f79ad6389b085a2a83fbe18 1 parent 386a5bd
@Blaisorblade Blaisorblade authored
View
3  src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
@@ -2260,8 +2260,7 @@ abstract class GenASM extends SubComponent with BytecodeWriters with GenJVMASM {
hostSymbol.info ; methodOwner.info
def isInterfaceCall(sym: Symbol) = (
- //XXX remove the test for ObjectClass.
- sym.isInterface && methodOwner != ObjectClass
+ sym.isInterface
|| sym.isJavaDefined && sym.isNonBottomSubClass(ClassfileAnnotationClass)
)
// whether to reference the type of the receiver or
View
3  src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
@@ -1197,8 +1197,7 @@ abstract class GenJVM extends SubComponent with GenJVMUtil with GenAndroid with
hostSymbol.info ; methodOwner.info
def isInterfaceCall(sym: Symbol) = (
- //XXX remove the test for ObjectClass.
- sym.isInterface && methodOwner != ObjectClass
+ sym.isInterface
|| sym.isJavaDefined && sym.isNonBottomSubClass(ClassfileAnnotationClass)
)
// whether to reference the type of the receiver or
Please sign in to comment.
Something went wrong with that request. Please try again.