Class Uint8ArrayBuiltins.Uint8ArrayBaseNode

All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, Cloneable
Direct Known Subclasses:
Uint8ArrayBuiltins.SetFromBaseNode, Uint8ArrayBuiltins.ToBase64Node, Uint8ArrayBuiltins.ToHexNode, Uint8ArrayBuiltins.Uint8ArrayFromBase64Node, Uint8ArrayBuiltins.Uint8ArrayFromHexNode
Enclosing class:
Uint8ArrayBuiltins

public abstract static class Uint8ArrayBuiltins.Uint8ArrayBaseNode extends JSBuiltinNode
  • Field Details

    • BASE64

      protected static final com.oracle.truffle.api.strings.TruffleString BASE64
    • BASE64URL

      protected static final com.oracle.truffle.api.strings.TruffleString BASE64URL
    • ALPHABET_VALUES

      protected static final com.oracle.truffle.api.strings.TruffleString[] ALPHABET_VALUES
    • LOOSE

      protected static final com.oracle.truffle.api.strings.TruffleString LOOSE
    • STRICT

      protected static final com.oracle.truffle.api.strings.TruffleString STRICT
    • STOP_BEFORE_PARTIAL

      protected static final com.oracle.truffle.api.strings.TruffleString STOP_BEFORE_PARTIAL
    • LAST_CHUNK_HANDLING_VALUES

      protected static final com.oracle.truffle.api.strings.TruffleString[] LAST_CHUNK_HANDLING_VALUES
    • errorBranch

      protected final com.oracle.truffle.api.profiles.BranchProfile errorBranch
  • Constructor Details

    • Uint8ArrayBaseNode

      protected Uint8ArrayBaseNode(JSContext context, JSBuiltin builtin)
  • Method Details

    • isUint8Array

      protected static boolean isUint8Array(JSTypedArrayObject typedArray)
    • getByteLengthOrThrow

      protected final int getByteLengthOrThrow(JSTypedArrayObject view)
    • getUint8ArrayBytes

      protected final byte[] getUint8ArrayBytes(JSTypedArrayObject ta, com.oracle.truffle.api.interop.InteropLibrary interop)
    • setUint8ArrayBytes

      protected void setUint8ArrayBytes(JSTypedArrayObject into, byte[] bytes, int resultLength)
    • fromBase64

      protected final Uint8ArrayBuiltins.Uint8ArrayBaseNode.EncodeResult fromBase64(com.oracle.truffle.api.strings.TruffleString string, boolean base64url, int maxLength, com.oracle.truffle.api.strings.TruffleString lastChunkHandling, com.oracle.truffle.api.strings.TruffleString.ReadCharUTF16Node charAtNode)
    • estimateDecodedByteLengthFromBase64

      protected static int estimateDecodedByteLengthFromBase64(com.oracle.truffle.api.strings.TruffleString src, int len, com.oracle.truffle.api.strings.TruffleString.ReadCharUTF16Node charAtNode)
      Calculates the longest expectable decoded byte length from the given base64 input string. The actual result length may be shorter in case of errors or skipped whitespace.
    • fromHex

      protected final Uint8ArrayBuiltins.Uint8ArrayBaseNode.EncodeResult fromHex(com.oracle.truffle.api.strings.TruffleString string, int maxLength, com.oracle.truffle.api.strings.TruffleString.ReadCharUTF16Node charAtNode)
    • syntaxError

      protected final JSException syntaxError(String message)
    • getStringOption

      protected final com.oracle.truffle.api.strings.TruffleString getStringOption(Object opts, com.oracle.truffle.api.strings.TruffleString key, com.oracle.truffle.api.strings.TruffleString[] allowedValues, com.oracle.truffle.api.strings.TruffleString defaultValue, PropertyGetNode getOptionValueNode, com.oracle.truffle.api.strings.TruffleString.EqualNode equalNode)