Class TruffleString.CodeRangeEqualsNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.CodeRangeEqualsNode
- All Implemented Interfaces:
NodeInterface, Cloneable
- Enclosing class:
TruffleString
Node to check if a string's code range is equal to the given
TruffleString.CodeRange
. See
execute(AbstractTruffleString, TruffleString.CodeRange)
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.CodeRangeEqualsNode
.abstract boolean
execute
(AbstractTruffleString a, TruffleString.CodeRange codeRange) Returnstrue
if the string's code range is equal to the givenTruffleString.CodeRange
.Get the uncached version ofTruffleString.CodeRangeEqualsNode
.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
Returnstrue
if the string's code range is equal to the givenTruffleString.CodeRange
. Use this operation when caching code range instances, e.g.:@Specialization(guards = "codeRangeEqualsNode.execute(a, cachedCodeRange)") static void someOperation(TString a, @Cached TruffleString.GetCodeRangeNode getCodeRangeNode, @Cached TruffleString.CodeRangeEqualsNode codeRangeEqualsNode, @Cached("getCodeRangeNode.execute(this, a)") CodeRange cachedCodeRange) { // ... }
- Since:
- 22.1
-
create
Create a newTruffleString.CodeRangeEqualsNode
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.CodeRangeEqualsNode
.- Since:
- 22.1
-