This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: The old _Jv_InitClass problem is still present in 3.1 (patch included)
- To: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Subject: Re: The old _Jv_InitClass problem is still present in 3.1 (patch included)
- From: Martin Kahlert <martin dot kahlert at infineon dot com>
- Date: Fri, 28 Sep 2001 16:49:54 +0200
- Cc: java-patches at gcc dot gnu dot org
- References: <20010927153258.A16126@keksy.muc.infineon.com> <3BB3B06F.60006@waitaki.otago.ac.nz>
- Reply-To: martin dot kahlert at infineon dot com
Hi Bryce,
On Fri, Sep 28, 2001 at 11:04:15AM +1200, Bryce McKinlay wrote:
> I looked at this some more. Could you try this patch instead? I don't
> think its correct to initialize "target" just because its the subject of
> an instanceof or checkcast. If target is uninitialized, then there must
> be no instances of it, so the result must be 'false'.
>
> regards
>
> Bryce.
>
> Index: natClass.cc
> ===================================================================
> RCS file: /cvs/gcc/gcc/libjava/java/lang/natClass.cc,v
> retrieving revision 1.44
> diff -u -r1.44 natClass.cc
> --- natClass.cc 2001/06/05 09:46:36 1.44
> +++ natClass.cc 2001/09/27 23:01:36
> @@ -956,7 +956,7 @@
> return false;
> return true;
> }
> - else if (source->ancestors != NULL
> + else if (source->ancestors != NULL && target->ancestors != NULL
> && source->depth >= target->depth
> && source->ancestors[source->depth - target->depth] == target)
> return true;
Thanks for the patch, works like a charm for me and it sounds correct for me.
I now have the application running with the mainline gcc! Great.
This is a rather big application:
57694 lines in C
182924 lines of Fortran 77
246846 lines of Java
plus 281043 lines of Java (code genator)
plus 81420 lines of C (preprocessing code).
Now it seems to work better than the TOWER compiler.
This will be no good news for them ;-)
Regards,
Martin.
--
The early bird catches the worm. If you want something else for
breakfast, get up later.