This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: assemble_external on .class files
- To: Per Bothner <bothner@pacbell.net>
- Subject: Re: assemble_external on .class files
- From: Jeffrey A Law <law@upchuck.cygnus.com>
- Date: Tue, 25 May 1999 22:44:37 -0600
- cc: Mark Klein <mklein@dis.com>, egcs@egcs.cygnus.com, java-discuss@sourceware.cygnus.com
- Reply-To: law@cygnus.com
In message <m2n1yseark.fsf@magnus.cygnus.com>you write:
> Well, the logic was the assumption that they would always be the same.
>
> In a Java class, we have three kinds of methods:
>
> (1) Regular methods (static or instance), with method bodies in the class
> body. These methods are neither native, nor external, since they are
> declared in the current input (.java or .class) file.
>
> (2) Native methods, which do not have bodies. These must be bound to some
> methods defined in some extenal C++ file. Hence, they need to have
> DECL_EXTERNAL set - as well as METHOD_NATIVE.
>
> (3) Abstract methods - which have no bodies anywhere. If they are ever
> referenced, it would be a compiler bug.
Thanks. Hmmm, this makes me think that we're find with having them overloaded
on the same bit. Mark, I think this is a red herring.
> However, perhaps there should be a comment where METHOD_NATIVE is
> defined. Something like the following may suffice:
> /* Only native methods are external (and vice versa). */
> or perhaps:
> /* A method is external if and only if it is native. */
Yea. It would help clarify things for the future.
Thanks again!
jeff