Class TruffleString.GetInternalNativePointerNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.GetInternalNativePointerNode
- All Implemented Interfaces:
NodeInterface, Cloneable
- Enclosing class:
TruffleString
Node to get a
native string's pointer object or raw
pointer. See execute(AbstractTruffleString, TruffleString.Encoding) for details.- Since:
- 22.1
-
Nested Class Summary
Nested classes/interfaces inherited from class Node
Node.Child, Node.Children -
Method Summary
Modifier and TypeMethodDescriptioncreate()Create a newTruffleString.GetInternalNativePointerNode.abstract Objectexecute(AbstractTruffleString a, TruffleString.Encoding expectedEncoding) Get the given string's pointer object which was passed toTruffleString.FromNativePointerNode.Get the uncached version ofTruffleString.GetInternalNativePointerNode.Methods inherited from class Node
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, reportReplace, toString
-
Method Details
-
execute
Get the given string's pointer object which was passed toTruffleString.FromNativePointerNode. If the string was created from a boxedLongraw native pointer, this node returns that raw pointer as a boxedLong. In that case, there is no associated object kept alive for lifetime tracking, so the caller remains responsible for ensuring that the native memory remains valid. If the string is not backed by a native pointer, this node will throw anUnsupportedOperationException. UseAbstractTruffleString.isNative()to check whether the string is actually backed by a native pointer before calling this node. Caution: If the given string is aTruffleString, the native pointer must not be modified as long as the string is used.- Since:
- 22.1
-
create
Create a newTruffleString.GetInternalNativePointerNode.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.GetInternalNativePointerNode.- Since:
- 22.1
-