Package com.oracle.truffle.api.strings
Class TruffleString.CompareCharsUTF16Node
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.CompareCharsUTF16Node
- All Implemented Interfaces:
NodeInterface
,Cloneable
- Enclosing class:
TruffleString
Node to compare two UTF-16 strings. See
execute(AbstractTruffleString, AbstractTruffleString)
for details.- Since:
- 22.1
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.api.nodes.Node
Node.Child, Node.Children
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create a newTruffleString.CompareCharsUTF16Node
.abstract int
Compare UTF-16 stringsa
andb
char-by-char.Get the uncached version ofTruffleString.CompareCharsUTF16Node
.Methods inherited from class com.oracle.truffle.api.nodes.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
Compare UTF-16 stringsa
andb
char-by-char. Returns zero ifa
andb
are equal. Ifa
is equal tob
up to its length, butb
is longer thana
, a negative value is returned. In the inverse case, a positive value is returned. Otherwise, elementsa[i]
andb[i]
at an indexi
are 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.CompareCharsUTF16Node
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.CompareCharsUTF16Node
.- Since:
- 22.1
-