Rémi Forax wrote: > Le 12/08/2010 08:20, John Rose a écrit : >> I just posted a prototype patch for local BSMs which works on my unit >> tests. >> >> http://hg.openjdk.java.net/mlvm/mlvm/hotspot/file/tip/asm >> >> There is also an updated "ldc" patch. >> >> I've put the patches with some good examples here: >> >> http://cr.openjdk.java.net/~jrose/pres/asm-jsr292-examples.zip >> > > Wow, you're working in August :) > I've planned to work on ASM after my holidays, in 10 days. > > I will create a svn branch with your patches, > I will also add the access modifier tagging a defender method. > The next step will be to add retro support of these items in the > backport :)
after looking carefully at these patches and the proposed changes to the bytecode format in JSR 292, the design I prefer to support this in ASM is the following: remove visitLdcInsn, replace it with 6 new methods: - visitCstNumberInsn(Number n) - visitCstStringInsn(String s) - visitCstClassInsn(String desc) // replaces Type arguments in visitLdcInsn - visitCstMethodInsn(String methDesc) // JSR 292 - visitCstMethodInsn(String owner, String name, String desc, int tag) // JSR 292 - visisCstInvokeInsn(String bootstrapOwner, String bootstrapName, String bootstrapDesc, int bootstrapTag, String methName, String methDesc) // JSR 292 add a new method for InvokeDynamic: - visitMethodInsn(String bootstrapOwner, String bootstrapName, String bootstrapDesc, int bootstrapTag, String methName, String methDesc) // JSR 292 do not extend Type to include method types (code already using Type expects Type to be a field type, not a method type) do not add ConstantPoolVisitor do not add Member I think this is consistent with the original design goals of ASM to only use primitive values in visit method arguments (numbers or strings). Of course it breaks backward compatibility, but we could reflect that by changing the version number to 4.0. BTW, I'm still wondering if JSR 292 is quite stable now (the last time I asked the answer was yes, but since then new changes were made - bootstrap methods, etc). Also the status of the JSR is "inactive" on its web page? Eric _______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev