diff options
author | Narayan Kamath <narayan@google.com> | 2016-11-02 17:39:28 +0000 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2016-11-04 09:03:35 +0000 |
commit | ff28f8512f99a9507f12b9eb600a374414735394 (patch) | |
tree | 2405463d433f6578a1c984f83bcd0c7e1e0f4aae /annotations/generate_annotated_java_files.py | |
parent | 6e53e657bfd4c0b8d70c91ca8e2490786b6e3bc7 (diff) |
MethodHandles: Implement MethodHandle.asType.
MethodHandles that are derived from asType calls declare a "nominal"
type in addition to their "actual" type, the latter being the type of
the target method being invoked in the case of non-transforming method
handles.
The runtime will need to check the callsite type against the "nominal"
type in order to check for exactness in the sense of throwing a WMTE
when there's no exact match, but will have to use the "actual" type in
order to build stack frames or perform argument conversions.
One minor drawback this change introduces is that it forces all method
handle subclasses to be cloneable in order to be used with asType. This
shouldn't be an issue in practice, given that we control this class
hierarchy.
Test: make test-art-host
Bug : 30550796
Change-Id: I350a48a8cf70e2789c1c1d121f97c301d0640e54
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions