RE: [Jxcl-devel] RE: So what's the status of JXCL
Status: Alpha
Brought to you by:
jddixon
|
From: Jim D. <jd...@di...> - 2004-03-02 20:43:40
|
On Tue, 2 Mar 2004, King Dale wrote: > I've been studying the code and think I have a grasp. I think we can fix the > try-finally problems. It appears one problem is that the Eclipse compiler > generates something entirely different than the Sun compiler. I think what > javac generates has also changed from one version to another. Looking at > this old article from 1997 it describes the code that Eclipse generates: > > http://www.javaworld.com/javaworld/jw-02-1997/jw-02-hood.html More to read over coffee. However, at a glance it's an inaccurate description of how the compiler generates code. > So something has changed in javac land. What I see from javac duplicates the > code from the finally clause in multiple places if it is small and uses a > subroutine if it is longer. Got an example? I test this using samples where the finally clause is one statement. It always uses the subroutine. > Eclipse seems to always use the subroutine. When > javac uses the jsr, it duplicates the jsr in all paths that exit the try > block gracefully then does a goto to the code after the try. Eclipse moves > the jsr to the end and has all those paths do a goto to the jsr which then > falls through to the code after the try. That's different from what I see. > I'll try to do a bug search in the bug database to see if I can learn more. > I'm guessing that they did this to make life easier for HotSpot to figure > things out, which makes like more complicated for those trying to figure out > control flow with the output of other compilers. -- Jim Dixon jd...@di... tel +44 117 982 0786 mobile +44 797 373 7881 "Be liberal in what you accept, Jon Postel and conservative in what you send." RFC 793 http://jxcl.sourceforge.net Java unit test coverage http://xlattice.sourceforge.net p2p communications infrastructure |