This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

Re: Why does GCJ generate so many explicit checks for null pointers?


>>>>> "David" == David Daney <ddaney@avtrex.com> writes:

David> I am running gcj 3.3 on a i386-linux platform.

How did you configure?

David> I have noticed that in the code the GCJ generates, most (if not
David> all) places that a reference (or is that a pointer) is
David> dereferenced, an explicit check for null is done.

This doesn't happen for me.  Do you have sample code that shows the
problem?  The smaller the better.

Right now I think the only time we generate an explicit check is when
calling a final method.  In this case we must check to see if the
object is null, since we won't get a SEGV if it is.

David> Am I missing something here?

I'm guessing some kind of configuration problem.

Tom


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