Skip to content

Add test for build-time invokedynamic/constantdynamic bootstrap method registration API#13636

Open
zakkak wants to merge 1 commit into
oracle:masterfrom
zakkak:2026-05-28-add-indy-condy-bootstrap-buildtime-test
Open

Add test for build-time invokedynamic/constantdynamic bootstrap method registration API#13636
zakkak wants to merge 1 commit into
oracle:masterfrom
zakkak:2026-05-28-add-indy-condy-bootstrap-buildtime-test

Conversation

@zakkak

@zakkak zakkak commented May 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds BootstrapMethodTest, a new native image test that exercises the registerBuildTimeIndyIncludeList and registerBuildTimeCondyIncludeList APIs introduced in FeatureImpl.DuringSetupAccessImpl.

The test dynamically generates a class at build time (via the Java ClassFile API) containing invokedynamic and constantdynamic instructions backed by custom bootstrap methods. It then registers selected bootstrap methods for build-time resolution via the Feature API and verifies:

  • Bootstrap methods registered via registerBuildTimeIndyIncludeList / registerBuildTimeCondyIncludeList are invoked at build time and their results are embedded in the image.
  • Bootstrap methods not registered are deferred to run time, confirming the allowlist is correctly scoped.

Assisted-by: Claude Opus 4.6 noreply@anthropic.com

Related Issues

Testing

mx -p substratevm gate --tags native_unittests

and

mx -p substratevm native-unittest com.oracle.svm.test.BootstrapMethodTest --build-args --features=com.oracle.svm.test.BootstrapMethodTest\$TestFeature

Documentation

N/A

Contributor Checklist

  • I have read the contribution guide.
  • I have the right to contribute the submitted material under the project terms.
  • I have updated tests and documentation where appropriate.
  • If I used a coding assistant, I remain responsible for the entire contribution and have reviewed it accordingly.

Assisted-by: Claude Opus 4.6 <noreply@anthropic.com>
@zakkak

zakkak commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

Hello @Zeavee, this is a kind reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ibm-redhat-interest OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants