RFR: 8165492: Reduce number of lambda forms generated by MethodHandleInlineCopyStrategy
Paul Sandoz
paul.sandoz at oracle.com
Thu Sep 8 20:31:12 UTC 2016
> On 8 Sep 2016, at 12:37, Claes Redestad <claes.redestad at oracle.com> wrote:
>
>>
>>> On 09/08/2016 09:21 PM, Paul Sandoz wrote:
>>> Did you consider replacing the if block with an assert? presumably if
>>> it is non-zero it is an internal error?
>>
>> The original check was to guard against Unsafe.allocateUnitializedArray
>> usage, and so I would like to keep the code that checks the index
>> unconditionally. asserts can be disabled.
>
> I have been down the road of trying to make this an assertion to get
> rid of the LF shapes and was dissuaded.
>
> Having found another (better?) way to get rid of the startup cost of
> having this check my concerns are resolved. Also, dropping the check
> entirely from this patch doesn't show a significant improvement on
> micros (at least for C2).
>
Ok, but is the IllegalStateException the right type to throw? should it be InternalError instead?
Paul.
More information about the core-libs-dev
mailing list