Class BaseOSRRootNode

java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.nodes.ExecutableNode
com.oracle.truffle.api.nodes.RootNode
com.oracle.truffle.runtime.BaseOSRRootNode
All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable

public abstract class BaseOSRRootNode extends com.oracle.truffle.api.nodes.RootNode
Base class for on-stack replaced (OSR) root nodes.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node

    com.oracle.truffle.api.nodes.Node.Child, com.oracle.truffle.api.nodes.Node.Children
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected com.oracle.truffle.api.nodes.NodeInterface
    Not adopted by the OSRRootNode; belongs to another RootNode.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    BaseOSRRootNode(com.oracle.truffle.api.TruffleLanguage<?> language, com.oracle.truffle.api.frame.FrameDescriptor frameDescriptor, com.oracle.truffle.api.nodes.NodeInterface loopNode)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final Object
    execute(com.oracle.truffle.api.frame.VirtualFrame frame)
     
    protected abstract Object
    executeOSR(com.oracle.truffle.api.frame.VirtualFrame frame)
    Entrypoint for OSR root nodes.
    protected final boolean
    prepareForCompilation(boolean rootCompilation, int compilationTier, boolean lastTier)
     

    Methods inherited from class com.oracle.truffle.api.nodes.RootNode

    cloneUninitialized, computeSize, copy, countsTowardsStackTraceLimit, createConstantNode, findAsynchronousFrames, findBytecodeIndex, findInstrumentableCallNode, getCallTarget, getFrameDescriptor, getName, getParentFrameDescriptor, getQualifiedName, isCaptureFramesForTrace, isCaptureFramesForTrace, isCaptureFramesForTrace, isCloneUninitializedSupported, isCloningAllowed, isInstrumentable, isInternal, isSameFrame, isTrivial, prepareForAOT, prepareForInstrumentation, translateStackTraceElement

    Methods inherited from class com.oracle.truffle.api.nodes.ExecutableNode

    getLanguage, getLanguageInfo

    Methods inherited from class com.oracle.truffle.api.nodes.Node

    accept, adoptChildren, atomic, atomic, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • loopNode

      protected com.oracle.truffle.api.nodes.NodeInterface loopNode
      Not adopted by the OSRRootNode; belongs to another RootNode. OptimizedCallTarget treats OSRRootNodes specially, skipping adoption of child nodes. This loop node instance is also used by the compiler to find the real root node e.g. for the truffle guest safepoint location. See TruffleSafepointInsertionPhase#skipOSRRoot.
  • Constructor Details

    • BaseOSRRootNode

      protected BaseOSRRootNode(com.oracle.truffle.api.TruffleLanguage<?> language, com.oracle.truffle.api.frame.FrameDescriptor frameDescriptor, com.oracle.truffle.api.nodes.NodeInterface loopNode)
  • Method Details

    • execute

      public final Object execute(com.oracle.truffle.api.frame.VirtualFrame frame)
      Specified by:
      execute in class com.oracle.truffle.api.nodes.RootNode
    • prepareForCompilation

      protected final boolean prepareForCompilation(boolean rootCompilation, int compilationTier, boolean lastTier)
      Overrides:
      prepareForCompilation in class com.oracle.truffle.api.nodes.RootNode
    • executeOSR

      protected abstract Object executeOSR(com.oracle.truffle.api.frame.VirtualFrame frame)
      Entrypoint for OSR root nodes.