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: Gcj



A few months ago I wrote:
> Another simple trick I'd like to see implemented looks like this...
>
> In a method M, for each class C requiring initialization, have the
> compiler declare a new local called Ci.  Instead of unconditional
> calls to the initialization routine, emit them as:
> 
>         if (! Ci)
>           {
>             _Jv_InitClass (C);
>             Ci = 1;
>           }
> 
> The compiler will then magically eliminate redundant calls to
> _Jv_InitClass within methods via simple constant propagation.  This
> shows up a lot.

I just submitted a patch to do this...

http://gcc.gnu.org/ml/gcc-patches/2000-02/msg00410.html

Once committed -O0 code will be slightly larger and slower, but -O1
will be better.

AG

-- 
Anthony Green                                               Cygnus Solutions
                                                       Sunnyvale, California


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