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: values types for Java


Andrew Haley writes:
> Patrik Reali writes:
>  > Andrew Haley writes:
>  > > Patrik Reali writes:
>  > >  >
>  > >  >  [proposal http://gcc.gnu.org/ml/java/2003-10/msg00169.html]
>  > >
>  > > I don't see the point of this.
>  > >
>  > > If we can show at compile time that an object does not escape the
>  > > context (either a method or a thread) where it was created, we can
>  > > automagically stack assign that object.  Escape analysis for Java is
>  > > quite well understood;
>  > >
>  > > J.-D. Choi, M. Gupta, M. Serrano, V. C. Sreedhar, and S. Midki.
>  > > Escape analysis for Java.  In Object-Oriented Programming, Systems,
>  > > Languages, and Applications (OOPSLA), 1999. Languages (POPL), 2002.
>  > > http://www.research.ibm.com/jalapeno/publication.html#oopsla99_escape
>  >
>  > This is true, but works only for static compilers.
>
> Well, this is the gcj mailing list, and gcj is a static compiler.

This is right (obviously!), a long as the language is not changed. If (as in
Per's original proposal) the language is changed, then the change should be
acceptable for everybody, not only for gcj.

Anyway, if gcj will have this feature (which would be great), we probably
won't see any more proposals for structs on this list!

I'm myself unsure about structs: they could help making the language much
more efficient (in particular for those that really need it, the jitters),
on the other hand it would make the language more complicated (which I
consider a loss).

>
>  > As soon as classes jitted or dynamically loaded, this gets more
>  > difficult to achieve. The paper doesn't mention the cost of the
>  > algorithm, but often escape analysis is expensive and thus not
>  > appropriate for jitters.
>
> The paper describes the algorithm that the IBM jit uses.
>

In section 9 (conclusions), first paragraph, the authors specify that this
algorithm is implemented in their static compiler. They mention the
implementation in Jalapeno as "future work" (as of 1999).

-Patrik


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