public abstract static class TruffleString.SubstringNode extends Node
TruffleString.SubstringNode.execute(AbstractTruffleString, int, int, TruffleString.Encoding, boolean)
for
details.Node.Child, Node.Children
Modifier and Type | Method and Description |
---|---|
static TruffleString.SubstringNode |
create()
Create a new
TruffleString.SubstringNode . |
abstract TruffleString |
execute(AbstractTruffleString a,
int fromIndex,
int length,
TruffleString.Encoding expectedEncoding,
boolean lazy)
Create a substring of
a , starting from codepoint index fromIndex , with
codepoint length length . |
static TruffleString.SubstringNode |
getUncached()
Get the uncached version of
TruffleString.SubstringNode . |
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, toString
public abstract TruffleString execute(AbstractTruffleString a, int fromIndex, int length, TruffleString.Encoding expectedEncoding, boolean lazy)
a
, starting from codepoint index fromIndex
, with
codepoint length length
. If lazy
is true
, a
's internal
storage will be re-used instead of creating a copy of the requested range. Since the
resulting string will have a reference to a
's internal storage, and
TruffleString
currently does not resize/trim the substring's internal
storage at any point, the lazy
variant effectively creates a memory leak! The
caller is responsible for deciding whether this is acceptable or not.public static TruffleString.SubstringNode create()
TruffleString.SubstringNode
.public static TruffleString.SubstringNode getUncached()
TruffleString.SubstringNode
.