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


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.


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