Package com.oracle.truffle.api.strings
Class TruffleString.CopyToNativeMemoryNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.CopyToNativeMemoryNode
- All Implemented Interfaces:
NodeInterface
,Cloneable
- Enclosing class:
TruffleString
Node to copy a region of a string into native memory. See
execute(AbstractTruffleString, int, Object, int, int, TruffleString.Encoding)
for
details.- Since:
- 22.1
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
Node.Child, Node.Children
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create a newTruffleString.CopyToNativeMemoryNode
.abstract void
execute
(AbstractTruffleString a, int byteFromIndexA, Object pointerObject, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Copy a region of the givenTruffleString
a
, bounded bybyteFromIndexA
andbyteLength
into the given interop object representing a native pointer (isPointer(pointerObject)
must returntrue
), starting atbyteFromIndexDst
.Get the uncached version ofTruffleString.CopyToNativeMemoryNode
.Methods inherited from class com.oracle.truffle.api.nodes.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
public abstract void execute(AbstractTruffleString a, int byteFromIndexA, Object pointerObject, int byteFromIndexDst, int byteLength, TruffleString.Encoding expectedEncoding) Copy a region of the givenTruffleString
a
, bounded bybyteFromIndexA
andbyteLength
into the given interop object representing a native pointer (isPointer(pointerObject)
must returntrue
), starting atbyteFromIndexDst
.This operation requires native access permissions (
TruffleLanguage.Env#isNativeAccessAllowed()
).- Since:
- 22.1
-
create
Create a newTruffleString.CopyToNativeMemoryNode
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.CopyToNativeMemoryNode
.- Since:
- 22.1
-