Class TextEncoderBuiltins.UTF8EncodeIntoNode

java.lang.Object
com.oracle.truffle.api.nodes.Node
com.oracle.truffle.js.nodes.JavaScriptBaseNode
com.oracle.truffle.js.builtins.web.TextEncoderBuiltins.UTF8EncodeIntoNode
All Implemented Interfaces:
com.oracle.truffle.api.nodes.NodeInterface, Cloneable
Enclosing class:
TextEncoderBuiltins

public abstract static class TextEncoderBuiltins.UTF8EncodeIntoNode extends JavaScriptBaseNode
  • Constructor Details

    • UTF8EncodeIntoNode

      protected UTF8EncodeIntoNode()
  • Method Details

    • execute

      public final long execute(com.oracle.truffle.api.strings.TruffleString string, JSTypedArrayObject destination)
    • execute

      public abstract long execute(com.oracle.truffle.api.strings.TruffleString string, JSTypedArrayObject destination, int destOffset, int maxLength)
      UTF-8-encode a string into a typed array.
      Parameters:
      string - source string
      destination - destination typed array
      destOffset - destination byte offset
      maxLength - max output byte length
      Returns:
      the read and written length in the upper and lower half, respectively
    • doHeapBuffer

      protected final long doHeapBuffer(com.oracle.truffle.api.strings.TruffleString string, JSTypedArrayObject destination, int destOffset, int maxLength, ArrayBufferViewGetByteLengthNode getTypedArrayByteLengthNode)
    • doDirectBuffer

      protected final long doDirectBuffer(com.oracle.truffle.api.strings.TruffleString string, JSTypedArrayObject destination, int destOffset, int maxLength, ArrayBufferViewGetByteLengthNode getTypedArrayByteLengthNode)
    • doInteropBuffer

      protected final long doInteropBuffer(com.oracle.truffle.api.strings.TruffleString string, JSTypedArrayObject destination, int destOffset, int maxLength, ArrayBufferViewGetByteLengthNode getTypedArrayByteLengthNode, com.oracle.truffle.api.interop.InteropLibrary asByteBufferInterop, com.oracle.truffle.api.interop.InteropLibrary bufferInterop)
    • encodeInto

      protected final long encodeInto(com.oracle.truffle.api.strings.TruffleString string, JSTypedArrayObject destination, int viewOffset, int maxLength, ByteBuffer rawBuffer, ArrayBufferViewGetByteLengthNode getTypedArrayByteLengthNode, com.oracle.truffle.api.interop.InteropLibrary interop)