Permalink
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...
1 parent 386a5bd commit b0560c5ece29ad9d3f79ad6389b085a2a83fbe18 @Blaisorblade Blaisorblade committed Mar 16, 2013
@@ -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
@@ -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

0 comments on commit b0560c5

Please sign in to comment.