Rémi's ASM 4.0 RC1
Mark Roos
mroos at roos.com
Thu Apr 21 00:59:47 PDT 2011
Thanks for the update ( even if the class names are not orthogonal to
invoke dynamic)
Two questions on usage
In your blog you used MH_GETSTATIC to access the bootstrap. Did you mean
to use MH_INVOKESTATIC ?
I would like to use a bootstrap signature of: ( no trailing arguments)
static ConstantCallSite bootStrapConstant(MethodHandles.Lookup
callerLookup, String template, MethodType type)
But I can't figure out how to invoke that in ASM. My current code is:
bsmType = java.lang.invoke.MethodType.methodType(ConstantCallSite.
class, Lookup.class, String.class, java.lang.invoke.MethodType.class,
Object.class);;
mv.visitInvokeDynamicInsn( bsmName, "()Lri/core/rtalk/RtObject;",
new MethodHandle(Opcodes.MH_INVOKESTATIC,
"ri/core/rtalk/RtCallSite",
"bootStrapConstant",
bsmType.toMethodDescriptorString()),
(Object[]) new String[1]);
How would I change it for the above bootstrap?
thanks much
mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110421/23955eea/attachment.html
More information about the mlvm-dev
mailing list