From: Godmar Back (gback@cs.utah.edu)
Date: Wed Jan 13 1999 - 14:32:55 EST
concern synchronization.
The idea is that if you lock something using an address, then there's
no point in having to find the lock again when unlocking the beast.
Instead of writing:
lockMutex(centry);
unlockMutex(centry);
you'd much rather write:
iLock* lock = lockMutex(centry);
unlockMutex(lock);
The real win, however, will come from applying this technique to Java code.
This is possible because MONITOR_ENTER and MONITOR_EXIT always occur in pairs.
However, it will require changes to the JIT to store the address of the
lock returned from MONITOR_ENTER somewhere, presumably on the stack.
Another, even more frequent case are synchronized methods; which may be
even easier to handle than general MONITOR_ENTER/EXIT pairs.
Anyway, that's another medium-sized project to look forward to.
- Godmar
This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 19:57:41 EDT