Re: JavaMemoryModel: fusing synch blocks

From: Doug Lea (
Date: Fri Feb 02 2001 - 20:41:04 EST

In case it wasn't clear from my first reply, I DO agree that compilers
should have the freedom to fuse small blocks that are, by reasonable
measures, unrollable even if they are not actually unrolled. It's at
best a sleazy argument that this is permitted under my Rule 2. So I'm
still looking for a way to phrase a rule that we could put in a spec
that allows this, yet doesn't allow unreasonable things like cause
1-year delays in noticing that a thread gets a shutdown interrupt.

The only intermediary points I've thought of are all inelegant at
best. For example: A JVM is not allowed to fuse more than 256 blocks.
There are lots of other magic numbers in the JVM Spec, so this isn't
unquely awful, but is still awful.


JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:29 EDT