Skip to content

[GR-77108] Prevent outlining separately compiled secondary bytecode switches#13966

Merged
graalvmbot merged 1 commit into
masterfrom
yz/GR-77108
Jul 14, 2026
Merged

[GR-77108] Prevent outlining separately compiled secondary bytecode switches#13966
graalvmbot merged 1 commit into
masterfrom
yz/GR-77108

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

Summary

Prevent handler outlining when a secondary bytecode interpreter switch is compiled as a separate method.

Bytecode DSL may split a large interpreter switch into partition methods such as continueAt_1. During hosted compilation, these secondary switches are inlined into the primary switch, where their handler calls are outlined normally. Secondary switches can also remain independently callable, including from deoptimization-target code. In that case, their handler calls must remain ordinary calls.

Changes

  • Add secondarySwitch to BytecodeInterpreterHandlerConfig.
  • Mark generated Bytecode DSL partition switches as secondary.
  • Skip OutlineBytecodeHandlerPhase when compiling a secondary switch separately.
  • Preserve handler configuration mapping between primary and secondary switches by excluding the policy flag from ABI comparison.
  • Document the new configuration in the Truffle 25.2 changelog.

The primary switch still inlines the secondary switch and outlines its handler calls. Only the independently compiled secondary method is excluded from outlining.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 13, 2026
@graalvmbot graalvmbot closed this Jul 14, 2026
@graalvmbot
graalvmbot deleted the yz/GR-77108 branch July 14, 2026 08:40
@graalvmbot
graalvmbot merged commit 84712fc into master Jul 14, 2026
3 checks passed
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