Class JSArrayBuffer
java.lang.Object
com.oracle.truffle.js.runtime.builtins.JSClass
com.oracle.truffle.js.runtime.builtins.JSNonProxy
com.oracle.truffle.js.runtime.builtins.JSAbstractBuffer
com.oracle.truffle.js.runtime.builtins.JSArrayBuffer
- All Implemented Interfaces:
JSConstructorFactory, JSConstructorFactory.WithFunctions, JSConstructorFactory.WithFunctionsAndSpecies, PrototypeSupplier
public final class JSArrayBuffer
extends JSAbstractBuffer
implements JSConstructorFactory.WithFunctionsAndSpecies, PrototypeSupplier
-
Nested Class Summary
Nested classes/interfaces inherited from interface JSConstructorFactory
JSConstructorFactory.Default, JSConstructorFactory.WithFunctions, JSConstructorFactory.WithFunctionsAndSpecies -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.oracle.truffle.api.strings.TruffleStringstatic final JSArrayBufferstatic final intstatic final JSArrayBufferstatic final JSArrayBufferstatic final com.oracle.truffle.api.strings.TruffleStringFields inherited from class JSNonProxy
GET_SYMBOL_SPECIES_NAME -
Method Summary
Modifier and TypeMethodDescriptionstatic JSArrayBufferObjectcreateArrayBuffer(JSContext context, JSRealm realm, byte[] byteArray) static JSArrayBufferObjectcreateArrayBuffer(JSContext context, JSRealm realm, byte[] byteArray, int byteLength, int maxByteLength) static JSArrayBufferObjectcreateArrayBuffer(JSContext context, JSRealm realm, int length) static JSArrayBufferObjectcreateArrayBuffer(JSContext context, JSRealm realm, JSDynamicObject proto, int byteLength, int maxByteLength) static JSConstructorcreateConstructor(JSRealm realm) static JSArrayBufferObjectcreateDirectArrayBuffer(JSContext context, JSRealm realm, int length) static JSArrayBufferObjectcreateDirectArrayBuffer(JSContext context, JSRealm realm, JSDynamicObject proto, int byteLength, int maxByteLength) static JSArrayBufferObjectcreateDirectArrayBuffer(JSContext context, JSRealm realm, ByteBuffer buffer) static JSArrayBufferObjectcreateDirectArrayBuffer(JSContext context, JSRealm realm, ByteBuffer buffer, int byteLength, int maxByteLength) static JSArrayBufferObject.InteropcreateInteropArrayBuffer(JSContext context, JSRealm realm, JSDynamicObject proto, Object buffer) static JSArrayBufferObject.InteropcreateInteropArrayBuffer(JSContext context, JSRealm realm, Object buffer) createPrototype(JSRealm realm, JSFunctionObject ctor) static voiddetachArrayBuffer(JSArrayBufferObject arrayBuffer) ES2015, 24.1.1.3 DetachArrayBuffer().static byte[]getByteArray(Object thisObj) com.oracle.truffle.api.strings.TruffleStringstatic ByteBuffergetDirectByteBuffer(Object thisObj) static ObjectgetInteropBuffer(Object thisObj) getIntrinsicDefaultProto(JSRealm realm) Allows invokevirtual of this method instead of invokeinterface.static booleanisDetachedBuffer(JSArrayBufferObject arrayBuffer) ES2015, 24.1.1.2 IsDetachedBuffer.static booleanstatic booleanstatic booleanstatic booleancom.oracle.truffle.api.object.ShapemakeInitialShape(JSContext context, JSDynamicObject prototype) Methods inherited from class JSAbstractBuffer
isJSAbstractBufferMethods inherited from class JSNonProxy
checkProtoCycle, createSymbolSpeciesGetterFunction, defineOwnProperty, delete, delete, deletePropertyDefault, getHelper, getHelper, getMethodHelper, getOwnHelper, getOwnHelper, getOwnProperty, getOwnPropertyKeys, getPrototypeOf, hasOnlyShapeProperties, hasOwnProperty, hasOwnProperty, hasProperty, hasProperty, invokeAccessorPropertySetter, isExtensible, ordinaryGetOwnProperty, ordinaryGetOwnPropertyIntl, ordinaryIsExtensible, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeys, ordinaryOwnPropertyKeysSlow, ordinaryPreventExtensions, ordinarySet, ordinarySetIndex, ordinarySetWithReceiver, performOrdinarySetWithOwnDescriptor, preventExtensions, putConstructorSpeciesGetter, set, set, setIntegrityLevelFast, setPropertySlow, setPrototypeOf, testIntegrityLevelFast, usesOrdinaryGetOwnProperty, usesOrdinaryIsExtensibleMethods inherited from class JSClass
filterOwnPropertyKeys, get, get, isInstance, isInstance, isInstance, isInstance, ownPropertyKeys, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface JSConstructorFactory
createConstructorObjectMethods inherited from interface JSConstructorFactory.WithFunctions
createConstructorAndPrototypeMethods inherited from interface JSConstructorFactory.WithFunctionsAndSpecies
fillConstructor
-
Field Details
-
CLASS_NAME
public static final com.oracle.truffle.api.strings.TruffleString CLASS_NAME -
PROTOTYPE_NAME
public static final com.oracle.truffle.api.strings.TruffleString PROTOTYPE_NAME -
HEAP_INSTANCE
-
DIRECT_INSTANCE
-
INTEROP_INSTANCE
-
FIXED_LENGTH
public static final int FIXED_LENGTH- See Also:
-
-
Method Details
-
createArrayBuffer
-
createArrayBuffer
public static JSArrayBufferObject createArrayBuffer(JSContext context, JSRealm realm, byte[] byteArray) -
createArrayBuffer
public static JSArrayBufferObject createArrayBuffer(JSContext context, JSRealm realm, byte[] byteArray, int byteLength, int maxByteLength) -
createArrayBuffer
public static JSArrayBufferObject createArrayBuffer(JSContext context, JSRealm realm, JSDynamicObject proto, int byteLength, int maxByteLength) -
getByteArray
-
getDirectByteBuffer
-
createDirectArrayBuffer
public static JSArrayBufferObject createDirectArrayBuffer(JSContext context, JSRealm realm, int length) -
createDirectArrayBuffer
public static JSArrayBufferObject createDirectArrayBuffer(JSContext context, JSRealm realm, JSDynamicObject proto, int byteLength, int maxByteLength) -
createDirectArrayBuffer
public static JSArrayBufferObject createDirectArrayBuffer(JSContext context, JSRealm realm, ByteBuffer buffer) -
createDirectArrayBuffer
public static JSArrayBufferObject createDirectArrayBuffer(JSContext context, JSRealm realm, ByteBuffer buffer, int byteLength, int maxByteLength) -
getInteropBuffer
-
createInteropArrayBuffer
public static JSArrayBufferObject.Interop createInteropArrayBuffer(JSContext context, JSRealm realm, Object buffer) -
createInteropArrayBuffer
public static JSArrayBufferObject.Interop createInteropArrayBuffer(JSContext context, JSRealm realm, JSDynamicObject proto, Object buffer) -
createPrototype
- Specified by:
createPrototypein interfaceJSConstructorFactory
-
makeInitialShape
public com.oracle.truffle.api.object.Shape makeInitialShape(JSContext context, JSDynamicObject prototype) - Overrides:
makeInitialShapein classJSClass
-
createConstructor
-
getClassName
public com.oracle.truffle.api.strings.TruffleString getClassName()- Specified by:
getClassNamein interfaceJSConstructorFactory
-
isJSHeapArrayBuffer
-
isJSDirectArrayBuffer
-
isJSInteropArrayBuffer
-
isDetachedBuffer
ES2015, 24.1.1.2 IsDetachedBuffer. Warning: This is a slow method! Use the assumption provided in getContext().getTypedArrayNotDetachedAssumption() for better performance. -
detachArrayBuffer
ES2015, 24.1.1.3 DetachArrayBuffer(). -
getIntrinsicDefaultProto
Description copied from class:JSClassAllows invokevirtual of this method instead of invokeinterface. Classes overriding this method should implementPrototypeSupplier.- Specified by:
getIntrinsicDefaultProtoin interfacePrototypeSupplier- Overrides:
getIntrinsicDefaultProtoin classJSClass- See Also:
-