public abstract static class TruffleString.AsManagedNode extends Node
AbstractTruffleString as a managed TruffleString,
meaning that the resulting string's backing memory is not a native pointer. See
TruffleString.AsManagedNode.execute(AbstractTruffleString, TruffleString.Encoding) for details.Node.Child, Node.Children| Modifier and Type | Method and Description |
|---|---|
static TruffleString.AsManagedNode |
create()
Create a new
TruffleString.AsManagedNode. |
TruffleString |
execute(AbstractTruffleString a,
TruffleString.Encoding expectedEncoding)
Returns a given string if it is already managed (i.e.
|
abstract TruffleString |
execute(AbstractTruffleString a,
TruffleString.Encoding expectedEncoding,
boolean cacheResult)
If the given string is already a managed (i.e.
|
static TruffleString.AsManagedNode |
getUncached()
Get the uncached version of
TruffleString.AsManagedNode. |
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, toStringpublic final TruffleString execute(AbstractTruffleString a, TruffleString.Encoding expectedEncoding)
public abstract TruffleString execute(AbstractTruffleString a, TruffleString.Encoding expectedEncoding, boolean cacheResult)
cacheResult - if set to true, managed strings created from native
TruffleString instances are cached in the native string's internal
transcoding cache. Note that this will keep the native string alive and
reachable via TruffleString.AsNativeNode. Subsequent calls of TruffleString.AsManagedNode
with cacheResult=true on the same native string are guaranteed to
return the same managed string. This parameter is expected to be
partial evaluation
constant.public static TruffleString.AsManagedNode create()
TruffleString.AsManagedNode.public static TruffleString.AsManagedNode getUncached()
TruffleString.AsManagedNode.