Package com.oracle.truffle.api.strings
Class TruffleString.RegionEqualNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.RegionEqualNode
- All Implemented Interfaces:
NodeInterface
,Cloneable
- Enclosing class:
TruffleString
Node to check codepoint equality of two string regions. See
execute(AbstractTruffleString, int, AbstractTruffleString, int, int, TruffleString.Encoding)
.- 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.RegionEqualNode
.abstract boolean
execute
(AbstractTruffleString a, int fromIndexA, AbstractTruffleString b, int fromIndexB, int length, TruffleString.Encoding expectedEncoding) Checks for codepoint equality in a region with the given codepoint index and codepoint length.Get the uncached version ofTruffleString.RegionEqualNode
.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
public abstract boolean execute(AbstractTruffleString a, int fromIndexA, AbstractTruffleString b, int fromIndexB, int length, TruffleString.Encoding expectedEncoding) Checks for codepoint equality in a region with the given codepoint index and codepoint length.Equivalent to:
for (int i = 0; i < length; i++) { if (codePointAt(a, fromIndexA + i) != codePointAt(b, fromIndexB + i)) { return false; } } return true;
- Since:
- 22.1
-
create
Create a newTruffleString.RegionEqualNode
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.RegionEqualNode
.- Since:
- 22.1
-