Thanks; I'll look at your dump later tonight.

If the problem is friction from interface casts, we can probably remove them.  
It's hard to figure out how they are getting in, though.  It happens when 
IRubyObject interconverts with Object.  Are you doing it, or is it coming from 
inside the java.lang.invoke classes?  That's the first question.  It probably 
comes from an asType, but some asType calls are implicit within the 292 API.  
What asType calls (was convertArguments) are in your code?

Key fact:  asType/convertArguments used to allow interfaces a free unchecked 
pass into and out of Object.  Now only explicitCastArguments does this.  If you 
convert between an interface and Object, you'll get a real checkcast (and a 
potential CCE) from asType.

Try changing convertArguments globally to explicitCastArguments and see what 
happens.

On Jun 2, 2011, at 5:15 PM, Charles Oliver Nutter wrote:

>> The door is about closed on JDK7 code changes (and the backed-off GWT stuff 
>> is in).  I can help you work around weaknesses in the JDK7 code, by 
>> adjusting the JRuby code.  Not optimal, but maybe practical.
> 
> I'm quite happy to do so! Did SwitchPoint optimization make it in?

Yes, but it's painfully late.  <grumble>You realize that for every power user 
like you who can use it correctly there will be 10 people who find it via 
auto-complete and write bad code.  (If you act as if a 'true' value of isValid 
is trustworthy, you will probably write a race condition into your code.)  Some 
of us on the EG *really* want to avoid having users (not you) shoot themselves 
in the foot.  IBM (Dan) is strongly lobbying to at least change the name of the 
predicate to 'hasBeenInvalidated' so it looks more like what it really is, a 
tricky asymmetric effectively-volatile indirectly-mutable-but-monotonic 
boolean.  (Your comments?  Got an easy fix for this issue?)</grumble>

And just to make sure:  Are you positive you need it?  (<grimace/>I'm 
convinced, but it's one of those safety-vs.power problems.  Your most telling 
point is that the object has the data inside itself, often, and it's just rude 
to users not to share.)  It gets exponentially more painful to make changes as 
each week passes!  We have to get this right soon, as in two weeks ago.

But the answer to your question is, yes; SP.isValid is under review (in the 
hsx/hotspot-comp repo) for proposed inclusion in b145.

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

Reply via email to