Projects

Boehm, Hans hans_boehm@hp.com
Fri May 5 16:47:00 GMT 2000


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

-----Original Message-----
From: Jon Olson [ mailto:olson@mmsi.com ]
Sent: Friday, May 05, 2000 2:49 PM
To: Jeff Sturm
Cc: Tom Tromey; green@cygnus.com; java-discuss@sourceware.cygnus.com
Subject: Re: Projects

...

An advantage of this mechanism is that it integrates nicely with Java
synchronization.  The `gcj' compiled code for Java synchronization generates
alot of try/catch blocks just to unlock monitors when exceptions get thrown.

By making  _Jv_MonitorEnter() push an exception onto the exception stack
and _Jv_MonitorExit() pop it off, I eliminated lots of try/catch block code
that only unlocked Java monitors.



More information about the Java mailing list