[condy-folding] CE propagation not enabled for ClassRef.of(Class)?

Robert Gibson robbie_usenet at yahoo.co.uk
Wed Oct 18 12:26:04 UTC 2017


Ok, thanks Maurizio. 
Robert

> On 18 Oct 2017, at 14:03, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> 
> 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