Projects

Boehm, Hans hans_boehm@hp.com
Fri May 5 17:30:00 GMT 2000


I'm pretty sure you won't catch a Java compiler generating a .class file in
which _Jv_MonitorEnter() and _Jv_MonitorExit() don't nest. The question is
whether a hand generated .class file, or one generated by some non-Java
compiler should compile correctly. According to the original version of
"The Java Virtual Machine Specification", I believe the answer was "yes".
Whether that has been changed, I don't know.
I assume this matters in that we are trying to conform to the JVM spec, even
in corner cases like this? 
Hans
-----Original Message-----
From: Jon Olson [ mailto:olson@mmsi.com ]
Sent: Friday, May 05, 2000 5:07 PM
To: Boehm, Hans; Jeff Sturm
Cc: Tom Tromey; green@cygnus.com; java-discuss@sourceware.cygnus.com
Subject: RE: Projects
On 2000年5月05日, Boehm, Hans wrote:
>This assumes that calls to _Jv_MonitorEnter() and _Jv_MonitorExit() nest
>correctly. That's certainly true for Java source files. It used to not be
>guaranteed for .class files. Is it now?
>>Hans
>
Hmmm... I've compiled many thousands of lines of Java files and 
haven't yet found a .class file that didn't nest properly. In fact, I
put code into the gcj byte code verifier to abort if they ever didn't nest
properly. Originally it tripped a few times when I was trying to
get the logic right to munch all the try/catch blocks that release monitors,
but I haven't had it happen for about a year's worth of Java compilation.
I'd sure be interested to see a valid .class file in which monitors don't
properly nest with exceptions.
-- 
Jon Olson, Modular Mining Systems
	 3289 E. Hemisphere Loop
	 Tucson, AZ 85706
INTERNET: olson@mmsi.com
PHONE: (520)746-9127
FAX: (520)889-5790


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /