Ignore:
Timestamp:
Aug 5, 2013, 3:11:50 PM (12 years ago)
Author:
[email protected]
Message:

Move TypedArray implementation into JSC
https://bugs.webkit.org/show_bug.cgi?id=119489

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Move TypedArray implementation into JSC in advance of re-implementation

  • GNUmakefile.list.am:
  • JSCTypedArrayStubs.h:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • runtime/ArrayBuffer.cpp: Renamed from Source/WTF/wtf/ArrayBuffer.cpp.

(JSC::ArrayBuffer::transfer):
(JSC::ArrayBuffer::addView):
(JSC::ArrayBuffer::removeView):

  • runtime/ArrayBuffer.h: Renamed from Source/WTF/wtf/ArrayBuffer.h.

(JSC::ArrayBufferContents::ArrayBufferContents):
(JSC::ArrayBufferContents::data):
(JSC::ArrayBufferContents::sizeInBytes):
(JSC::ArrayBufferContents::transfer):
(JSC::ArrayBufferContents::copyTo):
(JSC::ArrayBuffer::isNeutered):
(JSC::ArrayBuffer::~ArrayBuffer):
(JSC::ArrayBuffer::clampValue):
(JSC::ArrayBuffer::create):
(JSC::ArrayBuffer::createUninitialized):
(JSC::ArrayBuffer::ArrayBuffer):
(JSC::ArrayBuffer::data):
(JSC::ArrayBuffer::byteLength):
(JSC::ArrayBuffer::slice):
(JSC::ArrayBuffer::sliceImpl):
(JSC::ArrayBuffer::clampIndex):
(JSC::ArrayBufferContents::tryAllocate):
(JSC::ArrayBufferContents::~ArrayBufferContents):

  • runtime/ArrayBufferView.cpp: Renamed from Source/WTF/wtf/ArrayBufferView.cpp.

(JSC::ArrayBufferView::ArrayBufferView):
(JSC::ArrayBufferView::~ArrayBufferView):
(JSC::ArrayBufferView::neuter):

  • runtime/ArrayBufferView.h: Renamed from Source/WTF/wtf/ArrayBufferView.h.

(JSC::ArrayBufferView::buffer):
(JSC::ArrayBufferView::baseAddress):
(JSC::ArrayBufferView::byteOffset):
(JSC::ArrayBufferView::setNeuterable):
(JSC::ArrayBufferView::isNeuterable):
(JSC::ArrayBufferView::verifySubRange):
(JSC::ArrayBufferView::clampOffsetAndNumElements):
(JSC::ArrayBufferView::setImpl):
(JSC::ArrayBufferView::setRangeImpl):
(JSC::ArrayBufferView::zeroRangeImpl):
(JSC::ArrayBufferView::calculateOffsetAndLength):

  • runtime/Float32Array.h: Renamed from Source/WTF/wtf/Float32Array.h.

(JSC::Float32Array::set):
(JSC::Float32Array::getType):
(JSC::Float32Array::create):
(JSC::Float32Array::createUninitialized):
(JSC::Float32Array::Float32Array):
(JSC::Float32Array::subarray):

  • runtime/Float64Array.h: Renamed from Source/WTF/wtf/Float64Array.h.

(JSC::Float64Array::set):
(JSC::Float64Array::getType):
(JSC::Float64Array::create):
(JSC::Float64Array::createUninitialized):
(JSC::Float64Array::Float64Array):
(JSC::Float64Array::subarray):

  • runtime/Int16Array.h: Renamed from Source/WTF/wtf/Int16Array.h.

(JSC::Int16Array::getType):
(JSC::Int16Array::create):
(JSC::Int16Array::createUninitialized):
(JSC::Int16Array::Int16Array):
(JSC::Int16Array::subarray):

  • runtime/Int32Array.h: Renamed from Source/WTF/wtf/Int32Array.h.

(JSC::Int32Array::getType):
(JSC::Int32Array::create):
(JSC::Int32Array::createUninitialized):
(JSC::Int32Array::Int32Array):
(JSC::Int32Array::subarray):

  • runtime/Int8Array.h: Renamed from Source/WTF/wtf/Int8Array.h.

(JSC::Int8Array::getType):
(JSC::Int8Array::create):
(JSC::Int8Array::createUninitialized):
(JSC::Int8Array::Int8Array):
(JSC::Int8Array::subarray):

  • runtime/IntegralTypedArrayBase.h: Renamed from Source/WTF/wtf/IntegralTypedArrayBase.h.

(JSC::IntegralTypedArrayBase::set):
(JSC::IntegralTypedArrayBase::IntegralTypedArrayBase):

  • runtime/TypedArrayBase.h: Renamed from Source/WTF/wtf/TypedArrayBase.h.

(JSC::TypedArrayBase::data):
(JSC::TypedArrayBase::set):
(JSC::TypedArrayBase::setRange):
(JSC::TypedArrayBase::zeroRange):
(JSC::TypedArrayBase::length):
(JSC::TypedArrayBase::byteLength):
(JSC::TypedArrayBase::item):
(JSC::TypedArrayBase::checkInboundData):
(JSC::TypedArrayBase::TypedArrayBase):
(JSC::TypedArrayBase::create):
(JSC::TypedArrayBase::createUninitialized):
(JSC::TypedArrayBase::subarrayImpl):
(JSC::TypedArrayBase::neuter):

  • runtime/Uint16Array.h: Renamed from Source/WTF/wtf/Uint16Array.h.

(JSC::Uint16Array::getType):
(JSC::Uint16Array::create):
(JSC::Uint16Array::createUninitialized):
(JSC::Uint16Array::Uint16Array):
(JSC::Uint16Array::subarray):

  • runtime/Uint32Array.h: Renamed from Source/WTF/wtf/Uint32Array.h.

(JSC::Uint32Array::getType):
(JSC::Uint32Array::create):
(JSC::Uint32Array::createUninitialized):
(JSC::Uint32Array::Uint32Array):
(JSC::Uint32Array::subarray):

  • runtime/Uint8Array.h: Renamed from Source/WTF/wtf/Uint8Array.h.

(JSC::Uint8Array::getType):
(JSC::Uint8Array::create):
(JSC::Uint8Array::createUninitialized):
(JSC::Uint8Array::Uint8Array):
(JSC::Uint8Array::subarray):

  • runtime/Uint8ClampedArray.h: Renamed from Source/WTF/wtf/Uint8ClampedArray.h.

(JSC::Uint8ClampedArray::getType):
(JSC::Uint8ClampedArray::create):
(JSC::Uint8ClampedArray::createUninitialized):
(JSC::Uint8ClampedArray::zeroFill):
(JSC::Uint8ClampedArray::set):
(JSC::Uint8ClampedArray::Uint8ClampedArray):
(JSC::Uint8ClampedArray::subarray):

  • runtime/VM.h:

Source/WebCore:

Update WebCore for new location of TypedArray implementation.

  • ForwardingHeaders/runtime/ArrayBuffer.h: Added.
  • ForwardingHeaders/runtime/ArrayBufferView.h: Added.
  • ForwardingHeaders/runtime/Float32Array.h: Added.
  • ForwardingHeaders/runtime/Float64Array.h: Added.
  • ForwardingHeaders/runtime/Int16Array.h: Added.
  • ForwardingHeaders/runtime/Int32Array.h: Added.
  • ForwardingHeaders/runtime/Int8Array.h: Added.
  • ForwardingHeaders/runtime/IntegralTypedArrayBase.h: Added.
  • ForwardingHeaders/runtime/TypedArrayBase.h: Added.
  • ForwardingHeaders/runtime/Uint16Array.h: Added.
  • ForwardingHeaders/runtime/Uint32Array.h: Added.
  • ForwardingHeaders/runtime/Uint8Array.h: Added.
  • ForwardingHeaders/runtime/Uint8ClampedArray.h: Added.
  • Modules/webaudio/AnalyserNode.h:

(WebCore::AnalyserNode::getFloatFrequencyData):
(WebCore::AnalyserNode::getByteFrequencyData):
(WebCore::AnalyserNode::getByteTimeDomainData):

  • Modules/webaudio/AsyncAudioDecoder.cpp:
  • Modules/webaudio/AsyncAudioDecoder.h:

(WebCore::AsyncAudioDecoder::DecodingTask::audioData):

  • Modules/webaudio/AudioBuffer.h:
  • Modules/webaudio/AudioContext.cpp:
  • Modules/webaudio/AudioParam.h:
  • Modules/webaudio/AudioParamTimeline.h:
  • Modules/webaudio/PeriodicWave.h:
  • Modules/webaudio/RealtimeAnalyser.cpp:
  • Modules/webaudio/RealtimeAnalyser.h:
  • Modules/webaudio/ScriptProcessorNode.cpp:
  • Modules/webaudio/WaveShaperProcessor.h:
  • Modules/websockets/ThreadableWebSocketChannel.h:
  • Modules/websockets/WebSocket.cpp:
  • Modules/websockets/WebSocket.h:
  • Modules/websockets/WebSocketChannel.cpp:
  • Modules/websockets/WebSocketChannel.h:
  • Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
  • Modules/websockets/WorkerThreadableWebSocketChannel.h:
  • WebCore.exp.in:
  • bindings/js/JSArrayBufferCustom.cpp:
  • bindings/js/JSArrayBufferViewHelper.h:
  • bindings/js/JSAudioContextCustom.cpp:
  • bindings/js/JSCryptoCustom.cpp:
  • bindings/js/JSDictionary.h:
  • bindings/js/JSFileReaderCustom.cpp:
  • bindings/js/JSWebGLRenderingContextCustom.cpp:
  • bindings/js/JSXMLHttpRequestCustom.cpp:
  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::transferArrayBuffers):

  • bindings/js/SerializedScriptValue.h:
  • bindings/scripts/CodeGeneratorJS.pm:

(AddIncludesForType):
(GenerateHeader):
(NativeToJSValue):

  • dom/MessageEvent.h:
  • fileapi/FileReader.cpp:
  • fileapi/FileReader.h:
  • fileapi/FileReaderLoader.cpp:
  • fileapi/FileReaderLoader.h:
  • fileapi/FileReaderSync.cpp:
  • fileapi/FileReaderSync.h:
  • fileapi/WebKitBlobBuilder.cpp:
  • fileapi/WebKitBlobBuilder.h:
  • html/HTMLMediaElement.cpp:
  • html/ImageData.h:
  • html/canvas/ArrayBuffer.idl:
  • html/canvas/ArrayBufferView.idl:
  • html/canvas/CanvasRenderingContext2D.cpp:
  • html/canvas/DataView.h:
  • html/canvas/Float32Array.idl:
  • html/canvas/Float64Array.idl:
  • html/canvas/Int16Array.idl:
  • html/canvas/Int32Array.idl:
  • html/canvas/Int8Array.idl:
  • html/canvas/Uint16Array.idl:
  • html/canvas/Uint32Array.idl:
  • html/canvas/Uint8Array.idl:
  • html/canvas/Uint8ClampedArray.idl:
  • html/canvas/WebGLBuffer.h:

(WebCore::WebGLBuffer::elementArrayBuffer):

  • html/canvas/WebGLGetInfo.cpp:
  • html/canvas/WebGLGetInfo.h:
  • html/canvas/WebGLRenderingContext.cpp:
  • html/canvas/WebGLRenderingContext.h:
  • inspector/InspectorMemoryAgent.cpp:
  • page/Crypto.cpp:
  • page/Crypto.h:
  • platform/graphics/GraphicsContext3D.cpp:
  • platform/graphics/ImageBuffer.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
  • platform/graphics/cg/ImageBufferDataCG.h:
  • platform/graphics/filters/FEBlend.cpp:
  • platform/graphics/filters/FEColorMatrix.cpp:
  • platform/graphics/filters/FEComponentTransfer.cpp:
  • platform/graphics/filters/FEComposite.cpp:
  • platform/graphics/filters/FEConvolveMatrix.cpp:
  • platform/graphics/filters/FECustomFilter.cpp:
  • platform/graphics/filters/FEDisplacementMap.cpp:
  • platform/graphics/filters/FEDropShadow.cpp:
  • platform/graphics/filters/FEGaussianBlur.cpp:
  • platform/graphics/filters/FELighting.h:
  • platform/graphics/filters/FEMorphology.cpp:
  • platform/graphics/filters/FETurbulence.cpp:
  • platform/graphics/filters/FilterEffect.cpp:
  • platform/graphics/filters/FilterEffect.h:
  • platform/graphics/mac/GraphicsContext3DMac.mm:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
  • testing/Internals.h:
  • xml/XMLHttpRequest.cpp:
  • xml/XMLHttpRequest.h:

(WebCore::XMLHttpRequest::optionalResponseArrayBuffer):

Source/WTF:

Remove TypedArray implementation from WTF

  • GNUmakefile.list.am:
  • WTF.xcodeproj/project.pbxproj:
  • wtf/Forward.h:
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/Int16Array.h

    r153725 r153728  
    2727#define Int16Array_h
    2828
    29 #include <wtf/IntegralTypedArrayBase.h>
     29#include "IntegralTypedArrayBase.h"
    3030
    31 namespace WTF {
     31namespace JSC {
    3232
    3333class ArrayBuffer;
    3434
    35 class Int16Array : public IntegralTypedArrayBase<short> {
     35class Int16Array : public IntegralTypedArrayBase<int16_t> {
    3636public:
    3737    static inline PassRefPtr<Int16Array> create(unsigned length);
    38     static inline PassRefPtr<Int16Array> create(const short* array, unsigned length);
     38    static inline PassRefPtr<Int16Array> create(const int16_t* array, unsigned length);
    3939    static inline PassRefPtr<Int16Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    4040
     
    4343    static inline PassRefPtr<Int16Array> createUninitialized(unsigned length);
    4444
    45     using TypedArrayBase<short>::set;
    46     using IntegralTypedArrayBase<short>::set;
     45    using TypedArrayBase<int16_t>::set;
     46    using IntegralTypedArrayBase<int16_t>::set;
    4747
    4848    inline PassRefPtr<Int16Array> subarray(int start) const;
     
    5555
    5656private:
    57     inline Int16Array(PassRefPtr<ArrayBuffer>,
    58                     unsigned byteOffset,
    59                     unsigned length);
     57    inline Int16Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
     58
    6059    // Make constructor visible to superclass.
    61     friend class TypedArrayBase<short>;
     60    friend class TypedArrayBase<int16_t>;
    6261};
    6362
    6463PassRefPtr<Int16Array> Int16Array::create(unsigned length)
    6564{
    66     return TypedArrayBase<short>::create<Int16Array>(length);
     65    return TypedArrayBase<int16_t>::create<Int16Array>(length);
    6766}
    6867
    69 PassRefPtr<Int16Array> Int16Array::create(const short* array, unsigned length)
     68PassRefPtr<Int16Array> Int16Array::create(const int16_t* array, unsigned length)
    7069{
    71     return TypedArrayBase<short>::create<Int16Array>(array, length);
     70    return TypedArrayBase<int16_t>::create<Int16Array>(array, length);
    7271}
    7372
    7473PassRefPtr<Int16Array> Int16Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    7574{
    76     return TypedArrayBase<short>::create<Int16Array>(buffer, byteOffset, length);
     75    return TypedArrayBase<int16_t>::create<Int16Array>(buffer, byteOffset, length);
    7776}
    7877
    7978PassRefPtr<Int16Array> Int16Array::createUninitialized(unsigned length)
    8079{
    81     return TypedArrayBase<short>::createUninitialized<Int16Array>(length);
     80    return TypedArrayBase<int16_t>::createUninitialized<Int16Array>(length);
    8281}
    8382
    8483Int16Array::Int16Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    85     : IntegralTypedArrayBase<short>(buffer, byteOffset, length)
     84    : IntegralTypedArrayBase<int16_t>(buffer, byteOffset, length)
    8685{
    8786}
     
    9796}
    9897
    99 } // namespace WTF
     98} // namespace JSC
    10099
    101 using WTF::Int16Array;
     100using JSC::Int16Array;
    102101
    103102#endif // Int16Array_h
Note: See TracChangeset for help on using the changeset viewer.