String concatenation tweaks
Remi Forax
forax at univ-mlv.fr
Tue Jun 9 07:20:29 UTC 2015
On 06/07/2015 04:40 PM, Peter Levart wrote:
>
>
> On 06/05/2015 02:56 PM, Remi Forax wrote:
>> There is another limitation, a method call can not have more than 255
>> arguments, if there are a lot of '+', the invokedynamic translation
>> may fail too.
>>
>> Maybe, the compiler should use the old strategy if there are too many
>> arguments.
>
>
> ...or do a decomposition:
>
> s1 + s2 + .... + sN == s1 + s2 + ... + s254 + (s255 + s256 + ... + sN)
>
> ... so a string concatenation expression is converted to (int)((N +
> 254) / 255) invokedynamic calls...
>
> Peter
yes, good idea !
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20150609/e0ee6370/attachment.html>
More information about the compiler-dev
mailing list