Skip to content

Conversation

@graalvmbot
Copy link
Collaborator

This PR allows to delay any method to the application layer.

Currently, the only way to mark a method as delayed to the application layer is to use the programatical API in AnalysisMethod.

Any method delayed to the application layer must be compiled only in the application layer. A call to such method in a shared layer will be replaced by an indirect call. The compilation of those methods is then forced in the application layer and the corresponding symbol is declared as global.

A delayed method that is not referenced in any shared layer is treated as a normal method in the application layer and does not have to be compiled. If it is only referenced in the application layer, it might be inlined and not compiled at all.

This PR also introduces the CompilationBehavior which will contain all the states that a method can have regarding compilation in layered images. There are only three states at the moment, but it might be extended with other intermediate states in the future.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 15, 2025
@graalvmbot graalvmbot merged commit 3fa330a into master Aug 15, 2025
12 of 13 checks passed
@graalvmbot graalvmbot deleted the scoppey/GR-65719/delay-methods branch August 15, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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