This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: proposed patch for PR 72 (method lookup in interfaces)


Godmar Back writes:

> But why, for instance, did I have to say
> CLASS_INTERFACE(TYPE_NAME(clazz)) to determine whether "tree clazz"
> is an interface?  Why wouldn't CLASS_INTERFACE(clazz) work?

Because `clazz' is of RECORD_TYPE, whereas CLASS_INTERFACE works on a
TYPE_DECL (as documented in java-tree.h) You get a TYPE_DECL from a
RECORD_TYPE using TYPE_NAME() -- at least in the Java front-end
world. I agree some of the macros should be renamed. We should have a
TYPE_DECL that transforms into a TYPE_NAME. CLASS_INTERFACE should be
renamed to be CLASS_DECL_INTERFACE and we should write a
CLASS_TYPE_INTERFACE.

./A

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]