Class ArrayBufferPrototypeBuiltins.JSArrayBufferSliceNode

All Implemented Interfaces:
com.oracle.truffle.api.instrumentation.InstrumentableNode, com.oracle.truffle.api.nodes.NodeInterface, Cloneable
Enclosing class:
ArrayBufferPrototypeBuiltins

public abstract static class ArrayBufferPrototypeBuiltins.JSArrayBufferSliceNode extends ArrayBufferPrototypeBuiltins.JSArrayBufferAbstractSliceNode
  • Constructor Details

    • JSArrayBufferSliceNode

      public JSArrayBufferSliceNode(JSContext context, JSBuiltin builtin)
  • Method Details

    • sliceIntInt

      protected JSArrayBufferObject sliceIntInt(JSArrayBufferObject.Heap thisObj, int begin, int end, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch)
      ArrayBuffer slice(long begin, optional long end). Returns a new ArrayBuffer whose contents are a copy of this ArrayBuffer's bytes from begin, inclusive, up to end, exclusive. If either begin or end is negative, it refers to an index from the end of the array, as opposed to from the beginning. If end is unspecified, the new ArrayBuffer contains all bytes from begin to the end of this ArrayBuffer. The range specified by the begin and end values is clamped to the valid index range for the current array. If the computed length of the new ArrayBuffer would be negative, it is clamped to zero.
      Parameters:
      thisObj - ArrayBuffer
      begin - begin index
      end - end index
      Returns:
      sliced ArrayBuffer
    • slice

      protected JSArrayBufferObject slice(JSArrayBufferObject.Heap thisObj, Object begin0, Object end0, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch)
    • sliceDirectIntInt

      protected JSArrayBufferObject sliceDirectIntInt(JSArrayBufferObject.Direct thisObj, int begin, int end, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch)
    • sliceDirect

      protected JSArrayBufferObject sliceDirect(JSArrayBufferObject.Direct thisObj, Object begin0, Object end0, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch)
    • sliceInterop

      protected JSArrayBufferObject sliceInterop(JSArrayBufferObject.Interop thisObj, Object begin0, Object end0, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch, com.oracle.truffle.api.interop.InteropLibrary srcBufferLib, com.oracle.truffle.api.interop.InteropLibrary dstBufferLib)
    • sliceTruffleBuffer

      protected JSArrayBufferObject sliceTruffleBuffer(Object thisObj, Object begin0, Object end0, com.oracle.truffle.api.profiles.InlinedBranchProfile errorBranch, com.oracle.truffle.api.interop.InteropLibrary srcBufferLib, com.oracle.truffle.api.interop.InteropLibrary dstBufferLib)
    • error

      protected static JSArrayBufferObject error(Object thisObj, Object begin0, Object end0)