public abstract static class TruffleString.ByteIndexOfStringNode extends Node
TruffleString.IndexOfStringNode
, but with byte indices.Node.Child, Node.Children
Modifier and Type | Method and Description |
---|---|
static TruffleString.ByteIndexOfStringNode |
create()
Create a new
TruffleString.ByteIndexOfStringNode . |
int |
execute(AbstractTruffleString a,
AbstractTruffleString b,
int fromByteIndex,
int toByteIndex,
TruffleString.Encoding expectedEncoding)
TruffleString.IndexOfStringNode , but with byte indices. |
int |
execute(AbstractTruffleString a,
TruffleString.WithMask b,
int fromByteIndex,
int toByteIndex,
TruffleString.Encoding expectedEncoding)
TruffleString.IndexOfStringNode , but with byte indices. |
static TruffleString.ByteIndexOfStringNode |
getUncached()
Get the uncached version of
TruffleString.ByteIndexOfStringNode . |
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 final int execute(AbstractTruffleString a, AbstractTruffleString b, int fromByteIndex, int toByteIndex, TruffleString.Encoding expectedEncoding)
TruffleString.IndexOfStringNode
, but with byte indices.public final int execute(AbstractTruffleString a, TruffleString.WithMask b, int fromByteIndex, int toByteIndex, TruffleString.Encoding expectedEncoding)
TruffleString.IndexOfStringNode
, but with byte indices. This variant accepts a
TruffleString.WithMask
as the search value b
, which changes the searching
algorithm in the following manner: whenever the contents of a
and b
are
compared, the mask is OR'ed to a
, as shown in this exemplary method:
boolean bytesEqualAt(TruffleString a, int byteIndexA, TruffleString.WithMask b, int byteIndexB) {
return (readByte(a, byteIndexA) | readByte(b.mask, byteIndexB)) == readByte(b, byteIndexB);
}
public static TruffleString.ByteIndexOfStringNode create()
TruffleString.ByteIndexOfStringNode
.public static TruffleString.ByteIndexOfStringNode getUncached()
TruffleString.ByteIndexOfStringNode
.