extending the constant pool continued
Patrick McNally
patrick.mcnally at pomona.edu
Thu Jun 21 11:30:39 PDT 2007
Hello! (and sorry about the previous premature message)
I'm playing with the class file parser at the moment and I could use
some help. Specifically, I am trying to use annotations to modify
bytecode and the constant pool. Byte code turns out to be pretty
easy, since it and the annotations are parsed at basically the same
point. But the constant pool has already been parsed and finalized by
the time the class file parser gets around to parsing my annotations.
So what I've been doing is creating a new constant pool with the
extra number of entries, adding what I want to this new pool and then
reassigning the original constant pool's handle to point to my new
one. This works fine for a few lines after parse_methods returns, but
then all of a sudden my new constant pool seems to get garbage
collected as any reference I try to make to it returns garbage. I'm
pretty fuzzy about the hotspot garbage collector, so any suggestions
about how to get a new constant pool to stick around would be much
appreciated. I've basically just reused the new constant pool
instantiation code from the parse_constantpool method. Any help would
be much appreciated!
Thanks!
Patrick
-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.
More information about the hotspot-dev
mailing list