Skip to content

[GR-62166] Add an option to turn off implicit interop in Espresso#13709

Open
graalvmbot wants to merge 2 commits into
masterfrom
jianyu/GR-62166
Open

[GR-62166] Add an option to turn off implicit interop in Espresso#13709
graalvmbot wants to merge 2 commits into
masterfrom
jianyu/GR-62166

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

Added an option (java.EnableImplicitInterop) for Espresso.
With implicit interop, a group of bytecodes (like array operations, field accesses) delegates to interop messages when they see foreign objects. The noForeignObjects assumption in BytecodeNode is maintained so that we can avoid checking foreign markers when foreign objects are never seen. When implicit interop is turned off, those bytecodes no longer take foreign objects into account and only work for Espresso objects. As a result, we don't need to maintain this assumption in this mode and therefore reduce the runtime overhead of checkNoForeignObjectAssumption.
We can safely do this, because in this mode a foreign object (any static object with the foreign marker) is never typed as an array or a class instance that has fields. Therefore, at the boundary of languages, only a selected subset of foreign object conversions is allowed in this mode.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 5, 2026
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