Package com.oracle.truffle.api.strings
Class TruffleString.EqualNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.EqualNode
- All Implemented Interfaces:
NodeInterface
,Cloneable
- Enclosing class:
TruffleString
Node to check two strings for equality.
The AbstractTruffleString.equals(Object)
-method delegates to this node.
- 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 TypeMethodDescriptionstatic TruffleString.EqualNode
create()
Create a newTruffleString.EqualNode
.abstract boolean
execute
(AbstractTruffleString a, AbstractTruffleString b, TruffleString.Encoding expectedEncoding) Returnstrue
ifa
andb
are byte-by-byte equal when considered inexpectedEncoding
.static TruffleString.EqualNode
Get the uncached version ofTruffleString.EqualNode
.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, AbstractTruffleString b, TruffleString.Encoding expectedEncoding) Returnstrue
ifa
andb
are byte-by-byte equal when considered inexpectedEncoding
. Note that this method requires both strings to be compatible to theexpectedEncoding
, just like all other operations with anexpectedEncoding
parameter!The
AbstractTruffleString.equals(Object)
-method delegates to this method.- Since:
- 22.1
-
create
Create a newTruffleString.EqualNode
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.EqualNode
.- Since:
- 22.1
-