Annotation Interface HostCompilerDirectives.BytecodeInterpreterHandlerConfig
- Enclosing class:
HostCompilerDirectives
HostCompilerDirectives.BytecodeInterpreterSwitch.- Since:
- 25.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceConfiguration for a bytecode interpreter handler argument. -
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionConfiguration for each method argument.intThe maximum unsigned value of the opcode. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanEnables tail duplication for this interpreter's threaded bytecode handler stubs.booleanIndicates that the annotated method implements a secondary partition of a bytecode interpreter switch.
-
Element Details
-
maximumOperationCode
int maximumOperationCodeThe maximum unsigned value of the opcode. This is relevant forHostCompilerDirectives.BytecodeInterpreterHandlerwhen tail call threading is enabled, and is used to construct a handler table. -
arguments
Configuration for each method argument. For non-static methods, the first element corresponds to the receiver. -
secondarySwitch
boolean secondarySwitchIndicates that the annotated method implements a secondary partition of a bytecode interpreter switch.A secondary switch is expected to be inlined into a primary
HostCompilerDirectives.BytecodeInterpreterSwitchmethod during host compilation. Its handler configuration is retained so that handler calls originating from the inlined secondary switch can be mapped to the primary switch's handler stubs.When compiled as a separate method, however, handler calls in a secondary switch are not outlined. In particular, a deoptimization target may invoke the separately compiled secondary switch without first passing through host inlining. Keeping its handler calls ordinary prevents such execution from entering threaded handler stubs without the primary switch's exception and state-management paths.
- Returns:
trueif the annotated method is a secondary switch partition whose handler calls must not be outlined when the method is compiled separately
- Default:
false
-
enableTailDuplication
boolean enableTailDuplicationEnables tail duplication for this interpreter's threaded bytecode handler stubs. When enabled, the compiler removes the control-flow anchor at the handler return and encourages duplication of the dispatch tail, allowing different handler paths to have separate indirect tail-call sites. Duplication remains subject to compiler safety checks and code size budgets; enabling this option does not guarantee that a tail will be duplicated.Separate dispatch sites can improve branch prediction, but the additional code can also reduce performance. This option is disabled by default and should only be enabled after measuring the effect on the interpreter's workloads. When disabled, the return anchor is retained and no tail-duplication hint is emitted. This option has no effect on non-threaded stubs, which always retain their return anchor.
- Since:
- 25.5
- Default:
false
-