[condy-folding] CE propagation not enabled for ClassRef.of(Class)?
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Wed Oct 18 12:03:46 UTC 2017
Hi,
thanks for the email; what you are observing is deliberate in a way -
few weeks ago we dropped support for tracking class literals as
constants - which is why you are getting the error when using
String.class. I think the plan (or my understanding of it :-)) was to
get rid of Class-based factories in ClassRef - which then would have
made the compiler machinery redundant, but I see that ClassRef.java
still has those factories after latest updates [1].
http://hg.openjdk.java.net/amber/amber/file/cb0d4a1e5256/src/java.base/share/classes/java/lang/invoke/ClassRef.java#l129
If these factories are there to stay we can add back the compiler
support for tracking literals of course.
Maurizio
On 18/10/17 12:05, Robbie Gibson wrote:
> Hi,
> I’m just playing with the condy prototype and I quickly stumbled upon a problem with this line of code - bug or not yet implemented?
> Intrinsics.ldc(ClassRef.of(String.class))
> java: argument to ldc() must be a constant
>
> The alternative works fine
> Intrinsics.ldc(ClassRef.of(“java.lang.String”)
>
> Thanks,
> Robert
>
>
>
More information about the amber-dev
mailing list