Status of Anno Class loader with constant patches?
Mark Roos
mroos at roos.com
Thu Jan 6 08:42:46 PST 2011
Thanks to all for the suggestions on providing live constants to a method.
I must admit that I was impressed with how the constant patch approach
worked.
As my constants are defined using an utf8 string it was easy to use some
unused
constant type tags to mark my constants. The loader then searched for
them,
created a patch from the string and then converted the tag to the utf8
tag.
Load the class and done. Very nice.
But I was worried that this was not mainstream. So Remi's inputs were
good.
My first attempt was ugly. Ugly in that the constant pool went wild. For
each
constant ( and a method could have a hundred or so ) I needed an
invokeDynamic,
a bootstrap table entry and my constant string. After thinking a bit (
always a
good thing to try) I realized that the name part of the invoke dynamic
could
carry the constant. So now I have a shared bootstrap, and a per constant
invokeDynamic,
nameAndType and constant.
Not as pretty as the pool patching but good enough. My only concern will
be how well
it gets optimized and that I will leave to the experts.
Now on to airity and the unfortunate issue that my stack order is opposite
that of Java
('this' is at the end not the beginning)
regards
mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/mlvm-dev/attachments/20110106/234ec056/attachment.html
More information about the mlvm-dev
mailing list