Describe the Problem
Java 21 has introduced new types of bootstrap methods for switch statements. There is at least the java/lang/runtime/SwitchBootstraps class that is currently not supported by the InvokeDynamicRewriting of OPAL. This is not a functional problem, as the instruction will simply not be rewritten - rewriting is a "best-effort" approach. However, we do have an integration test case in the InvokedymamicRewritingTest that assumes we can rewrite every INVOKEDYNAMIC in the current Java Base. This is no longer true for Java 21+, so the integration test fails.
Solution you'd like
Support the rewriting of new bootstrap methods added in Java 21 and above. If rewriting is not always possible, change the test case assumption that we no longer assume we can rewrite all INVOKEDYNAMICs of every Java version.
Describe the Problem
Java 21 has introduced new types of bootstrap methods for switch statements. There is at least the
java/lang/runtime/SwitchBootstrapsclass that is currently not supported by theInvokeDynamicRewritingof OPAL. This is not a functional problem, as the instruction will simply not be rewritten - rewriting is a "best-effort" approach. However, we do have an integration test case in theInvokedymamicRewritingTestthat assumes we can rewrite everyINVOKEDYNAMICin the current Java Base. This is no longer true for Java 21+, so the integration test fails.Solution you'd like
Support the rewriting of new bootstrap methods added in Java 21 and above. If rewriting is not always possible, change the test case assumption that we no longer assume we can rewrite all
INVOKEDYNAMICs of every Java version.