RFR: 8071368 Use more concrete types for NamedFunction constants in the code
shilpi.rastogi at oracle.com
Mon Feb 8 13:18:49 UTC 2016
On 2/5/2016 9:18 PM, Vladimir Ivanov wrote:
> Proposed fix looks good.
> Quoting John: "The use of erased types (any ref => Object) in the MH
> runtime is an artifact of bootstrapping difficulties, early in the
> project. I hope it is not necessary any more."
> Best regards,
> Vladimir Ivanov
> On 2/5/16 4:29 PM, Paul Sandoz wrote:
>> Hi Shilpi,
>> In principle this change is ok, however these methods are kind of
>> special because they are called by code generated from LambdaForms
>> with erased types.
>> IIUC the casts can serve as belts-and-braces checks just in case that
>> generated code passes something that is not of the correct type. By
>> removing the casts it’s possible to erroneously pass in something of
>> another type that the runtime treats erroneously as if a MethodHandle
>> or MethodType, and then strange things happen. The casts will
>> ordinary be removed by the runtime compiler. By removing them from
>> the Java code it might slightly improve C2 compilation time.
>> Approval from Vladimir/John would be good.
>>> On 4 Feb 2016, at 13:16, shilpi rastogi <shilpi.rastogi at oracle.com>
>>> Hi All,
>>> Please review the following-
More information about the core-libs-dev