I was looking through the OpenJDK class file parser source and I came across something I've never heard of - Constant Pool Patching. What is this? I've read the JVM specification before but it didn't mention anything like this, and searching on Google failed to turn anything up.

有帮助吗?

解决方案

To put it simply, the patching procedure replaces constant pool entries at class parse time in order to handle JSR-229, which implements invokedynamic. It is used to rewrite UTF-8, class, and value (float, int, etc.) entries when loading anonymous classes.

For a primer on how invokedynamic is implemented, see http://blog.headius.com/2008/09/first-taste-of-invokedynamic.html

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top