Albert Gorski c6b0408092 Fix support for the kind values of MethodHandle
The current implementation only supported 6 of the possible kind values for a MethodHandle object.
However, as the link below shows there are in fact 9. All 9 can be seen in the MethodHandleType
class which is used by dexdump to translate the kind value of a MethodHandle object to a string
representation.

https://android.googlesource.com/platform/art/+/android-8.1.0_r41/runtime/dex_file.h

Moreover, this in fact lines up with the 9 different kinds for a MethodHandle object in standard
java bytecode (though the values are swapped around for some reason).

https://docs.oracle.com/javase/8/docs/api/java/lang/invoke/MethodHandleInfo.html

These changes add in the additional 3 kind values and make sure all nesscary hooks using the
kind values of MethodHandle reference them.

For testing purposes, I found the easiest way to get correctly formatted invoke-custom and
invoke-polymorphic instructions was to use the already generated dex files used to test
dexdump. They can be found at the link below (invoke-custom.dex and invoke-polymorphic.dex).

https://android.googlesource.com/platform/art/+/android-8.1.0_r41/test/dexdump/
2018-08-20 12:55:29 -07:00
..