RFR: 8071368 Use more concrete types for NamedFunction constants in the code
paul.sandoz at oracle.com
Fri Feb 5 13:29:52 UTC 2016
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> wrote:
> Hi All,
> Please review the following-
More information about the core-libs-dev