Skip to content

Support new Java 21 INVOKEDYNAMIC bootstrap methods #334

Description

@johannesduesing

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions