On Jan 7, 2011, at 2:48 AM, Christian Thalinger wrote:

> Wait a second...  I doubt this is a false negative in VerifyMethodHandles.  
> The MethodHandleWalker can't find a raw retype conversion function and that's 
> why it crashes.  Maybe it is a false negative but then we are missing some 
> conversion logic in the walker too.

Right, I had forgotten!  The bytecode won't verify; that's why raw retypes are 
different from normal ones.

In the case of a retype-raw, the Java code promises that what's on the stack 
will not break the verifier's invariants, even though the types don't match.  
For spinning bytecodes, do this:
 - ref to primitive:  discard ref, push zero
 - primitive to ref:  discard primitive, push null
 - primitive to boolean: narrow to int, isolate lowest bit (push #1, iand)
 - other primitive to narrower primitive: perform extra narrowing operations 
(l2i, i2*)

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

Reply via email to