Class TruffleStringBuilder.ToStringNode
java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.api.strings.TruffleStringBuilder.ToStringNode
- All Implemented Interfaces:
NodeInterface,Cloneable
- Enclosing class:
TruffleStringBuilder
Node to materialize a string builder as a
TruffleString.- 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 newTruffleStringBuilder.ToStringNode.final TruffleStringMaterialize this string builder to aTruffleString.abstract TruffleStringexecute(TruffleStringBuilder sb, boolean lazy) Materialize this string builder to aTruffleString.Get the uncached version ofTruffleStringBuilder.ToStringNode.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
Materialize this string builder to aTruffleString.- Since:
- 22.1
-
execute
Materialize this string builder to aTruffleString. Iflazyistrue,sb's internal storage will be re-used even if there are unused bytes. Since the resulting string will have a reference tosb's internal storage, andTruffleStringcurrently does not resize/trim the substring's internal storage at any point, thelazyvariant effectively creates a memory leak! The caller is responsible for deciding whether this is acceptable or not.- Since:
- 22.1
-
create
Create a newTruffleStringBuilder.ToStringNode.- Since:
- 22.1
-
getUncached
Get the uncached version ofTruffleStringBuilder.ToStringNode.- Since:
- 22.1
-