Rémy,

More comments on your review request:

Note that src/java/dyn/impl/package-info.java briefly describes the  
mixin pattern.

It would be best to keep the use of sun.misc.Unsafe factored into the  
impl package, so there is a minimum of platform-dependent code in the  
main package.  This can be done by putting setTarget in a mixin class  
CS, or less intrusively by pushing the memory barrier into a static  
method of DynCallSite.

On balance, I guess I like your idea making target volatile, and  
making the fields private instead of protected is also OK, as long as  
there is a callerObject() query to get the caller, in the case where  
it is some class-like blob from the language runtime.

Making the target field volatile can't hurt, although it may set a  
false expectation about JVM reference patterns from optimized code.

-- John
_______________________________________________
mlvm-dev mailing list
[email protected]
http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev

Reply via email to