public abstract static class TruffleString.RegionEqualByteIndexNode extends Node
TruffleString.RegionEqualByteIndexNode.execute(AbstractTruffleString, int, AbstractTruffleString, int, int, TruffleString.Encoding)
and
TruffleString.RegionEqualByteIndexNode.execute(AbstractTruffleString, int, TruffleString.WithMask, int, int, TruffleString.Encoding)
for details.Node.Child, Node.Children
Modifier and Type | Method and Description |
---|---|
static TruffleString.RegionEqualByteIndexNode |
create()
Create a new
TruffleString.RegionEqualByteIndexNode . |
boolean |
execute(AbstractTruffleString a,
int fromByteIndexA,
AbstractTruffleString b,
int fromByteIndexB,
int length,
TruffleString.Encoding expectedEncoding)
Checks for a region match, byte-by-byte.
|
boolean |
execute(AbstractTruffleString a,
int fromByteIndexA,
TruffleString.WithMask b,
int fromByteIndexB,
int length,
TruffleString.Encoding expectedEncoding)
Checks for a region match, byte-by-byte.
|
static TruffleString.RegionEqualByteIndexNode |
getUncached()
Get the uncached version of
TruffleString.RegionEqualByteIndexNode . |
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 boolean execute(AbstractTruffleString a, int fromByteIndexA, AbstractTruffleString b, int fromByteIndexB, int length, TruffleString.Encoding expectedEncoding)
public final boolean execute(AbstractTruffleString a, int fromByteIndexA, TruffleString.WithMask b, int fromByteIndexB, int length, TruffleString.Encoding expectedEncoding)
TruffleString.WithMask
as the search value b
, which changes the matching
algorithm in the following manner: when 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.RegionEqualByteIndexNode create()
TruffleString.RegionEqualByteIndexNode
.public static TruffleString.RegionEqualByteIndexNode getUncached()
TruffleString.RegionEqualByteIndexNode
.