Package com.oracle.truffle.api.strings
Class TruffleString.HashCodeNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleString.HashCodeNode
- All Implemented Interfaces:
NodeInterface
,Cloneable
- Enclosing class:
TruffleString
Node to get a string's hash code. See
execute(AbstractTruffleString, TruffleString.Encoding)
for details.- Since:
- 22.1
- See Also:
-
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.HashCodeNode
create()
Create a newTruffleString.HashCodeNode
.abstract int
execute
(AbstractTruffleString a, TruffleString.Encoding expectedEncoding) Returns the string's hash code.static TruffleString.HashCodeNode
Get the uncached version ofTruffleString.HashCodeNode
.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, toString
-
Method Details
-
execute
Returns the string's hash code. The hash is dependent on the string's encoding, make sure to convert strings to a common encoding before comparing their hash codes!- Since:
- 22.1
-
create
Create a newTruffleString.HashCodeNode
.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleString.HashCodeNode
.- Since:
- 22.1
-