Class TruffleString.CompareBytesNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.CompareBytesNode
- All Implemented Interfaces:
NodeInterface, Cloneable
- Enclosing class:
TruffleString
Node to compare two strings byte-by-byte. See
execute(AbstractTruffleString, AbstractTruffleString, TruffleString.Encoding) for
details.- Since:
- 22.1
-
Nested Class Summary
Nested classes/interfaces inherited from class Node
Node.Child, Node.Children -
Method Summary
Modifier and TypeMethodDescriptioncreate()Create a newTruffleString.CompareBytesNode.abstract intexecute(AbstractTruffleString a, AbstractTruffleString b, TruffleString.Encoding expectedEncoding) Compare stringsaandbbyte-by-byte.Get the uncached version ofTruffleString.CompareBytesNode.Methods inherited from class 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 int execute(AbstractTruffleString a, AbstractTruffleString b, TruffleString.Encoding expectedEncoding) Compare stringsaandbbyte-by-byte. Returns zero ifaandbare equal. Ifais equal tobup to its length, butbis longer thana, a negative value is returned. In the inverse case, a positive value is returned. Otherwise, elementsa[i]andb[i]at a byte indexiare different. Ifa[i]is greater thanb[i], a positive value is returned, otherwise a negative value is returned.- Since:
- 22.1
-
create
Create a newTruffleString.CompareBytesNode.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.CompareBytesNode.- Since:
- 22.1
-