Class JSConstructTypedArrayNode

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

public abstract class JSConstructTypedArrayNode extends JSBuiltinNode
The %TypedArray% intrinsic constructor function object (ES6 22.2.1).
  • Constructor Details

  • Method Details

    • doArrayBuffer

      protected JSDynamicObject doArrayBuffer(JSDynamicObject newTarget, JSArrayBufferObject.Heap arrayBuffer, Object byteOffset0, Object length0, com.oracle.truffle.api.profiles.InlinedConditionProfile lengthIsUndefined)
      %TypedArray%(buffer[, byteOffset[, length]]). TypedArray(ArrayBuffer buffer, optional unsigned long byteOffset, optional unsigned long length). Create a new TypedArray object using the passed ArrayBuffer for its storage. Optional byteOffset and length can be used to limit the section of the buffer referenced. The byteOffset indicates the offset in bytes from the start of the ArrayBuffer, and the length is the count of elements from the offset that this TypedArray will reference. If both byteOffset and length are omitted, the TypedArray spans the entire ArrayBuffer range. If the length is omitted, the TypedArray extends from the given byteOffset until the end of the ArrayBuffer. The given byteOffset must be a multiple of the element size of the specific type, otherwise an exception is raised. If a given byteOffset and length references an area beyond the end of the ArrayBuffer an exception is raised. If length is not explicitly specified, the length of the ArrayBuffer minus the byteOffset must be a multiple of the element size of the specific type, or an exception is raised.
    • doDirectArrayBuffer

      protected JSDynamicObject doDirectArrayBuffer(JSDynamicObject newTarget, JSArrayBufferObject.Direct arrayBuffer, Object byteOffset0, Object length0, com.oracle.truffle.api.profiles.InlinedConditionProfile lengthIsUndefined)
    • doSharedArrayBuffer

      protected JSDynamicObject doSharedArrayBuffer(JSDynamicObject newTarget, JSArrayBufferObject.Shared arrayBuffer, Object byteOffset0, Object length0, com.oracle.truffle.api.profiles.InlinedConditionProfile lengthIsUndefined)
      TypedArray(SharedArrayBuffer buffer, optional unsigned long byteOffset, optional unsigned long length). Create a new TypedArray object using the passed SharedArrayBuffer for its storage. As with standard ArrayBuffer, optional parameters (byteOffset and length) can be used to limit the section of the buffer referenced.
    • doInteropArrayBuffer

      protected JSDynamicObject doInteropArrayBuffer(JSDynamicObject newTarget, JSArrayBufferObject.Interop arrayBuffer, Object byteOffset0, Object length0, com.oracle.truffle.api.profiles.InlinedConditionProfile lengthIsUndefined, com.oracle.truffle.api.interop.InteropLibrary bufferInterop)
      TypedArray(ArrayBuffer buffer, optional unsigned long byteOffset, optional unsigned long length). Create a new TypedArray object using the passed InteropArrayBuffer for its storage. As with standard ArrayBuffer, optional parameters (byteOffset and length) can be used to limit the section of the buffer referenced.
    • doTypedArray

      protected JSDynamicObject doTypedArray(JSDynamicObject newTarget, JSTypedArrayObject arrayBufferView, Object byteOffset0, Object length0, com.oracle.truffle.api.profiles.InlinedConditionProfile bulkCopyProfile)
      %TypedArray%(typedArray).
    • doEmpty

      protected JSDynamicObject doEmpty(JSDynamicObject newTarget, JSDynamicObject arg0, Object byteOffset0, Object length0)
      %TypedArray%(). This description applies only if the %TypedArray% function is called with no arguments.
    • doIntLength

      protected JSDynamicObject doIntLength(JSDynamicObject newTarget, int length, Object byteOffset0, Object length0)
      %TypedArray%(length).
    • doLength

      protected JSDynamicObject doLength(JSDynamicObject newTarget, Object arg0, Object byteOffset0, Object length0)
      %TypedArray%(length). This description applies only if the %TypedArray% function is called with at least one argument and the Type of the first argument is not Object.
    • doObject

      protected JSDynamicObject doObject(JSDynamicObject newTarget, JSObject object, Object byteOffset0, Object length0, com.oracle.truffle.api.nodes.Node node, GetMethodNode getIteratorMethodNode, com.oracle.truffle.api.profiles.InlinedConditionProfile isIterableProfile, WriteElementNode writeOwnNode, GetIteratorFromMethodNode getIteratorFromMethodNode, IterableToListNode iterableToListNode, JSGetLengthNode getLengthNode, ReadElementNode readNode)
      %TypedArray%(object). This description applies only if the %TypedArray% function is called with at least one argument and the Type of the first argument is Object and that object does not have either a [[TypedArrayName]] or an [[ArrayBufferData]] internal slot.
    • doForeignObject

      protected JSDynamicObject doForeignObject(JSDynamicObject newTarget, Object object, Object byteOffset0, Object length0, com.oracle.truffle.api.nodes.Node node, com.oracle.truffle.api.interop.InteropLibrary interop, WriteElementNode writeOwnNode, ImportValueNode importValue, com.oracle.truffle.api.profiles.InlinedConditionProfile lengthIsUndefined)
    • doUndefinedNewTarget

      protected JSDynamicObject doUndefinedNewTarget(Object newTarget, Object arg0, Object byteOffset0, Object length0)