On Feb 20, 2013, at 10:20 AM, Coleen Phillimore <coleen.phillim...@oracle.com> 
wrote:

> John or Christian, can you confirm that you don't plan to use object 
> constants anymore?

Yes, that's fine.  Object constants were introduced when the JVM was internally 
generating bytecodes with pre-linked constant pools.  We removed that stuff 
from the JVM when we moved the bytecode generation up to JDK code.

We still need "live" oop constants pre-linked into the constant pool of 
bytecodes which implement some method handles.  We use the anonymous class 
pseudo-string feature for that.  The relevant code is here:
  
http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/tip/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java

These oops are what "pseudo-strings" are.  The odd name refers to the fact 
that, even though they are random oops, they appear in the constant pool where 
one would expect (because of class file syntax) to find a string.

— John

Reply via email to