Class TruffleStackTraceElement
java.lang.Object
com.oracle.truffle.api.TruffleStackTraceElement
Represents a guest stack trace element.
- Since:
- 0.27
-
Method Summary
Modifier and TypeMethodDescriptionstatic TruffleStackTraceElementcreate(Node location, RootCallTarget target, Frame frame) Create a new stack trace element.static TruffleStackTraceElementcreate(Node location, RootCallTarget target, Frame frame, int bytecodeIndex) Create a new stack trace element.intReturns the bytecode index at the time when this frame was created.getFrame()Returns the read-only frame.Returns an interop object representing this TruffleStackTraceElement supporting thehasExecutableNameand potentiallyhasDeclaringMetaObjectandhasSourceLocationmessages.Returns a node representing the callsite on the stack.Returns the call target on the stack.booleanReturnstrueif the stack trace element contains a valid bytecode index, elsefalse.toString()
-
Method Details
-
create
Create a new stack trace element.- Parameters:
location- SeegetLocation()target- SeegetTarget()frame- SeegetFrame()- Since:
- 20.1.0
-
create
public static TruffleStackTraceElement create(Node location, RootCallTarget target, Frame frame, int bytecodeIndex) Create a new stack trace element.- Parameters:
location- SeegetLocation()target- SeegetTarget()frame- SeegetFrame()bytecodeIndex- SeegetBytecodeIndex()- Since:
- 24.1
-
getLocation
Returns a node representing the callsite on the stack.Returns
nullif no detailed callsite information is available. This is the case whenCallTarget.call(Object...)is used or for the top-of-the-stack element or if the exception is an internal exception or theAbstractTruffleException.getLocation()returnednull.See
FrameInstance.getCallNode()for the relation between callsite and CallTarget.- Since:
- 0.27
-
getTarget
Returns the call target on the stack. Never returnsnull.See
FrameInstance.getCallNode()for the relation between callsite and CallTarget.- Since:
- 0.27
-
getFrame
Returns the read-only frame. Returnsnullif the initialRootNodethat filled in the stack trace did not request frames to be captured by overridingRootNode.isCaptureFramesForTrace(Node).- Since:
- 0.31
-
hasBytecodeIndex
public boolean hasBytecodeIndex()Returnstrueif the stack trace element contains a valid bytecode index, elsefalse. If this method returnsfalsethengetBytecodeIndex()will return a negativeintvalue.- Since:
- 24.1
-
getBytecodeIndex
public int getBytecodeIndex()Returns the bytecode index at the time when this frame was created. If no bytecode index was captured then a negativeintvalue is returned. When the stack trace element is capturedRootNode.findBytecodeIndex(com.oracle.truffle.api.nodes.Node, com.oracle.truffle.api.frame.Frame)is invoked to resolve the byte code index returned by this method.- Since:
- 24.1
- See Also:
-
getGuestObject
Returns an interop object representing this TruffleStackTraceElement supporting thehasExecutableNameand potentiallyhasDeclaringMetaObjectandhasSourceLocationmessages.This method must only be called on an interpreter thread with a valid
entered. The current entered context can be accessed through the language or instrument environment.- Since:
- 20.3
-
toString
-