Before JDK-8307190, JDK-8309673, and JDK-8301995, invokedynamic operands needed to be rewritten to encoded values to better distinguish indy entries from other cp cache entries. The above changes now distinguish between entries with to_cp_index() using the bytecode, which is now propagated by the callers.
Encode calls need matching decode calls, which can be easily forgotten and can lead to issues such as the following exception when using revptrs:
hsdb> revptrs 0x00007f2e8c06c000
Computing reverse pointers...
Error: java.lang.ArrayIndexOutOfBoundsException: -1 2
java.lang.ArrayIndexOutOfBoundsException: -1 2
Thanks to the above changes, it is no longer necessary to encode the indy indices, so these methods can be removed.
Encode calls need matching decode calls, which can be easily forgotten and can lead to issues such as the following exception when using revptrs:
hsdb> revptrs 0x00007f2e8c06c000
Computing reverse pointers...
Error: java.lang.ArrayIndexOutOfBoundsException: -1 2
java.lang.ArrayIndexOutOfBoundsException: -1 2
Thanks to the above changes, it is no longer necessary to encode the indy indices, so these methods can be removed.