review request (URGENT): 7051206: JSR 292 method name SwitchPoint.isValid is misleading to unwary users; should be hasBeenInvalidated
Rémi Forax
forax at univ-mlv.fr
Fri Jun 3 06:41:27 PDT 2011
On 06/03/2011 11:19 AM, Emmanuel Castro wrote:
> I noticed that the same kind of strange properties exists from
> the beginning in the Java API on the Thread class. When the
> Thread.isAlive() returns true, you're not sure that it is still true
> at the next instruction.
> If one follows the same naming scheme, it would yield to Thread.hasDied().
>
> Emmanuel CASTRO
Yes.
The other problem is that SwitchPoint.gWT can be made fast but
it's harder to get the same speed if someone uses
SwitchPoint.hasBeenInvalidated
in a fast path.
We really don't want bug reports saying that hasBeenInvalidated is dead slow
forcing VM implementers to find a way to optimize hasBeenInvalidated
knowing that SwitchPoint.gWT is the way to go.
Rémi
More information about the mlvm-dev
mailing list