On May 25, 2011, at 11:04 PM, Charles Oliver Nutter wrote:

> I don't say it's not clever. It's just not something anyone is
> typically going to figure out on their own. There will be constant
> questions "if I can invalidate a SwitchPoint, why can't I ask if it
> has been invalidated?"

You are right about the questions.  That's one of the first things to annoy me 
about an API:  mutators w/o queries.

We omitted it because it's not a very trustworthy query.  But it's easy to add.

Here's possible javadoc:

    /**
     * Determines if this switchpoint is still valid.
     * <p>
     * Since invalidation is a global and immediate operation,
     * this query must be sequenced with any
     * other threads that could invalidate this switchpoint.
     * It may therefore be expensive.
     * <p>
     * In addition, due to concurrent invalidations by other threads,
     * a switchpoint may report itself as valid, and yet become
     * invalid before the querying thread begins to act on the
     * supposed validity.
     * @return true if this switchpoint has never been invalidated
     */
    public boolean isValid() {...}

_______________________________________________
mlvm-dev mailing list
mlvm-dev@openjdk.java.net
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to