public class MonitorSnippets extends SubstrateTemplates implements org.graalvm.compiler.replacements.Snippets
ReentrantLock
used for monitor operations cannot be inlined in a snippet without changes or code duplication.
For AOT compiled code, the null check for the object is already inserted by the bytecode parser,
i.e., the object is already guaranteed to be non-null. For JIT compiled code though the null
check needs to be inserted during lowering. To enable further high-level optimizations, the null
check is inserted during high-tier lowerings, while the snippets are only lowered during the
lower tier lowering.Modifier and Type | Class and Description |
---|---|
protected class |
MonitorSnippets.MonitorLowering |
Modifier and Type | Field and Description |
---|---|
protected static SnippetRuntime.SubstrateForeignCallDescriptor[] |
FOREIGN_CALLS |
protected static SnippetRuntime.SubstrateForeignCallDescriptor |
SLOW_PATH_MONITOR_ENTER |
protected static SnippetRuntime.SubstrateForeignCallDescriptor |
SLOW_PATH_MONITOR_EXIT |
Modifier | Constructor and Description |
---|---|
protected |
MonitorSnippets(org.graalvm.compiler.options.OptionValues options,
Iterable<org.graalvm.compiler.debug.DebugHandlersFactory> factories,
org.graalvm.compiler.phases.util.Providers providers,
org.graalvm.compiler.api.replacements.SnippetReflectionProvider snippetReflection) |
Modifier and Type | Method and Description |
---|---|
protected static void |
callSlowPath(org.graalvm.compiler.core.common.spi.ForeignCallDescriptor descriptor,
Object obj) |
protected static void |
monitorEnterSnippet(Object obj) |
protected static void |
monitorExitSnippet(Object obj) |
protected void |
registerLowerings(Map<Class<? extends org.graalvm.compiler.graph.Node>,NodeLoweringProvider<?>> lowerings) |
snippet, snippet, snippet, snippet
protected static final SnippetRuntime.SubstrateForeignCallDescriptor SLOW_PATH_MONITOR_ENTER
protected static final SnippetRuntime.SubstrateForeignCallDescriptor SLOW_PATH_MONITOR_EXIT
protected static final SnippetRuntime.SubstrateForeignCallDescriptor[] FOREIGN_CALLS
protected MonitorSnippets(org.graalvm.compiler.options.OptionValues options, Iterable<org.graalvm.compiler.debug.DebugHandlersFactory> factories, org.graalvm.compiler.phases.util.Providers providers, org.graalvm.compiler.api.replacements.SnippetReflectionProvider snippetReflection)
protected static void monitorEnterSnippet(Object obj)
protected static void monitorExitSnippet(Object obj)
protected static void callSlowPath(org.graalvm.compiler.core.common.spi.ForeignCallDescriptor descriptor, Object obj)
protected void registerLowerings(Map<Class<? extends org.graalvm.compiler.graph.Node>,NodeLoweringProvider<?>> lowerings)