Package com.oracle.truffle.api
Class TruffleStackTraceElement
java.lang.Object
com.oracle.truffle.api.TruffleStackTraceElement
Represents a guest stack trace element.
- Since:
- 0.27
-
Method Summary
Modifier and TypeMethodDescriptionstatic TruffleStackTraceElement
create
(Node location, RootCallTarget target, Frame frame) Create a new stack trace element.getFrame()
Returns the read-only frame.Returns an interop object representing this TruffleStackTraceElement supporting thehasExecutableName
and potentiallyhasDeclaringMetaObject
andhasSourceLocation
messages.Returns a node representing the callsite on the stack.Returns the call target on the stack.
-
Method Details
-
create
Create a new stack trace element.- Parameters:
location
- SeegetLocation()
target
- SeegetTarget()
frame
- SeegetFrame()
- Since:
- 20.1.0
-
getLocation
Returns a node representing the callsite on the stack.Returns
null
if 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. Returnsnull
if the initialRootNode
that filled in the stack trace did not request frames to be captured by overridingRootNode.isCaptureFramesForTrace()
.- Since:
- 0.31
-
getGuestObject
Returns an interop object representing this TruffleStackTraceElement supporting thehasExecutableName
and potentiallyhasDeclaringMetaObject
andhasSourceLocation
messages.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
-