Class TruffleString.FromZeroTerminatedNativePointerNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.FromZeroTerminatedNativePointerNode
- All Implemented Interfaces:
NodeInterface, Cloneable
- Enclosing class:
TruffleString
Equivalent to
TruffleString.FromNativePointerNode for zero-terminated buffers, i.e. the string's
length is determined by the position of the first zero-value found.
This operation requires native access permissions
(TruffleLanguage.Env#isNativeAccessAllowed()).
- Since:
- 25.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Node
Node.Child, Node.Children -
Method Summary
Modifier and TypeMethodDescriptioncreate()Create a newTruffleString.FromZeroTerminatedNativePointerNode.final TruffleStringexecute16Bit(Object pointerObject, int byteOffset, TruffleString.Encoding encoding, boolean copy) Equivalent toTruffleString.FromNativePointerNode.execute(Object, int, int, TruffleString.Encoding, boolean)with the only difference being that the native buffer's length is determined by the position of the first 16-bit zero value in the buffer.final TruffleStringexecute32Bit(Object pointerObject, int byteOffset, TruffleString.Encoding encoding, boolean copy) Equivalent toTruffleString.FromNativePointerNode.execute(Object, int, int, TruffleString.Encoding, boolean)with the only difference being that the native buffer's length is determined by the position of the first 32-bit zero value in the buffer.final TruffleStringexecute8Bit(Object pointerObject, int byteOffset, TruffleString.Encoding encoding, boolean copy) Equivalent toTruffleString.FromNativePointerNode.execute(Object, int, int, TruffleString.Encoding, boolean)with the only difference being that the native buffer's length is determined by the position of the first 8-bit zero value in the buffer.Get the uncached version ofTruffleString.FromZeroTerminatedNativePointerNode.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
-
execute8Bit
public final TruffleString execute8Bit(Object pointerObject, int byteOffset, TruffleString.Encoding encoding, boolean copy) Equivalent toTruffleString.FromNativePointerNode.execute(Object, int, int, TruffleString.Encoding, boolean)with the only difference being that the native buffer's length is determined by the position of the first 8-bit zero value in the buffer.- Since:
- 25.1
-
execute16Bit
public final TruffleString execute16Bit(Object pointerObject, int byteOffset, TruffleString.Encoding encoding, boolean copy) Equivalent toTruffleString.FromNativePointerNode.execute(Object, int, int, TruffleString.Encoding, boolean)with the only difference being that the native buffer's length is determined by the position of the first 16-bit zero value in the buffer. Note that the 16-bit zero value's position is checked in 2-byte increments starting fromnative pointer + byte offset, so a zero value starting at an odd byte index is ignored.- Since:
- 25.1
-
execute32Bit
public final TruffleString execute32Bit(Object pointerObject, int byteOffset, TruffleString.Encoding encoding, boolean copy) Equivalent toTruffleString.FromNativePointerNode.execute(Object, int, int, TruffleString.Encoding, boolean)with the only difference being that the native buffer's length is determined by the position of the first 32-bit zero value in the buffer. Note that the 32-bit zero value's position is checked in 4-byte increments starting fromnative pointer + byte offset, so a zero value starting at an index that isn't a multiple of 4 is ignored.- Since:
- 25.1
-
create
Create a newTruffleString.FromZeroTerminatedNativePointerNode.- Since:
- 25.1
-
getUncached
Get the uncached version ofTruffleString.FromZeroTerminatedNativePointerNode.- Since:
- 25.1
-