deduplicating lambda methods

Brian Goetz brian.goetz at oracle.com
Sat Mar 17 18:49:01 UTC 2018


>>
>>     Also, as a bonus, consider constant expressions, we probably want:
>>     return 5; and return 2 + 3; to be equal.
>>
>>     I think that these two use cases will need a "normalization" step
>>     to be
>>     applied to the tree and store in the map, set, only a normalized
>>     version
>>     of the tree. I understand that at least considering constants 
>> could be
>>     out of the scope of this patch, so I can see it as a follow up
>>     development.

I don't think we want to be duplicating the constant folding logic in 
multiple places, but I also don't think we have to -- doesn't L2M run 
after constant folding already?  I ask because I've already seen 
constant propagation turn capturing lambdas into noncapturing.



More information about the amber-dev mailing list