public abstract static class TruffleString.CodePointAtIndexNode extends Node
TruffleString.CodePointAtIndexNode.execute(AbstractTruffleString, int, TruffleString.Encoding) for details.Node.Child, Node.Children| Modifier and Type | Method and Description |
|---|---|
static TruffleString.CodePointAtIndexNode |
create()
Create a new
TruffleString.CodePointAtIndexNode. |
int |
execute(AbstractTruffleString a,
int i,
TruffleString.Encoding expectedEncoding)
Decode and return the codepoint at codepoint index
i, with
best-effort error handling. |
abstract int |
execute(AbstractTruffleString a,
int i,
TruffleString.Encoding expectedEncoding,
TruffleString.ErrorHandling errorHandling)
Decode and return the codepoint at codepoint index
i. |
static TruffleString.CodePointAtIndexNode |
getUncached()
Get the uncached version of
TruffleString.CodePointAtIndexNode. |
accept, adoptChildren, atomic, atomic, copy, deepCopy, getChildren, getCost, getDebugProperties, getDescription, getEncapsulatingSourceSection, getLock, getParent, getRootNode, getSourceSection, insert, insert, isAdoptable, isSafelyReplaceableBy, notifyInserted, onReplace, replace, replace, reportPolymorphicSpecialize, toStringpublic final int execute(AbstractTruffleString a, int i, TruffleString.Encoding expectedEncoding)
i, with
best-effort error handling.public abstract int execute(AbstractTruffleString a, int i, TruffleString.Encoding expectedEncoding, TruffleString.ErrorHandling errorHandling)
i.errorHandling - if set to TruffleString.ErrorHandling.BEST_EFFORT, the return value on
invalid codepoints depends on expectedEncoding:
TruffleString.Encoding.UTF_8: Unicode Replacement character 0xFFFDTruffleString.Encoding.UTF_16: the (16-bit) char value read at index
iTruffleString.Encoding.UTF_32: the (32-bit) int value read at index
iTruffleString.Encoding.US_ASCII, TruffleString.Encoding.ISO_8859_1,
TruffleString.Encoding.BYTES: the (8-bit) unsigned byte value read at index
i0xFFFDTruffleString.ErrorHandling.RETURN_NEGATIVE, -1 will be returned
instead. This parameter is expected to be
partial evaluation
constant.public static TruffleString.CodePointAtIndexNode create()
TruffleString.CodePointAtIndexNode.public static TruffleString.CodePointAtIndexNode getUncached()
TruffleString.CodePointAtIndexNode.