From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Per Bothner Cc: Mark Klein , egcs@egcs.cygnus.com, java-discuss@sourceware.cygnus.com Subject: Re: assemble_external on .class files Date: Tue, 25 May 1999 21:50:00 -0000 Message-id: <21471.927693877@upchuck.cygnus.com> References: X-SW-Source: 1999-05/msg00712.html 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: Per Bothner Cc: Mark Klein , egcs@egcs.cygnus.com, java-discuss@sourceware.cygnus.com Subject: Re: assemble_external on .class files Date: Mon, 31 May 1999 21:36:00 -0000 Message-ID: <21471.927693877@upchuck.cygnus.com> References: X-SW-Source: 1999-05n/msg00713.html Message-ID: <19990531213600.Wp1-eTPBVUbT7gluIxGS3uciaNktYtboDG0hBm3MYcM@z> 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