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/Int8Array.h

    r153725 r153728  
    2828#define Int8Array_h
    2929
    30 #include <wtf/IntegralTypedArrayBase.h>
     30#include "IntegralTypedArrayBase.h"
    3131
    32 namespace WTF {
     32namespace JSC {
    3333
    3434class ArrayBuffer;
    3535
    36 class Int8Array : public IntegralTypedArrayBase<signed char> {
     36class Int8Array : public IntegralTypedArrayBase<int8_t> {
    3737public:
    3838    static inline PassRefPtr<Int8Array> create(unsigned length);
    39     static inline PassRefPtr<Int8Array> create(const signed char* array, unsigned length);
     39    static inline PassRefPtr<Int8Array> create(const int8_t* array, unsigned length);
    4040    static inline PassRefPtr<Int8Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    4141
     
    4444    static inline PassRefPtr<Int8Array> createUninitialized(unsigned length);
    4545
    46     using TypedArrayBase<signed char>::set;
    47     using IntegralTypedArrayBase<signed char>::set;
     46    using TypedArrayBase<int8_t>::set;
     47    using IntegralTypedArrayBase<int8_t>::set;
    4848
    4949    inline PassRefPtr<Int8Array> subarray(int start) const;
     
    5656
    5757private:
    58     inline Int8Array(PassRefPtr<ArrayBuffer>,
    59                    unsigned byteOffset,
    60                    unsigned length);
     58    inline Int8Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
     59
    6160    // Make constructor visible to superclass.
    62     friend class TypedArrayBase<signed char>;
     61    friend class TypedArrayBase<int8_t>;
    6362};
    6463
    6564PassRefPtr<Int8Array> Int8Array::create(unsigned length)
    6665{
    67     return TypedArrayBase<signed char>::create<Int8Array>(length);
     66    return TypedArrayBase<int8_t>::create<Int8Array>(length);
    6867}
    6968
    70 PassRefPtr<Int8Array> Int8Array::create(const signed char* array, unsigned length)
     69PassRefPtr<Int8Array> Int8Array::create(const int8_t* array, unsigned length)
    7170{
    72     return TypedArrayBase<signed char>::create<Int8Array>(array, length);
     71    return TypedArrayBase<int8_t>::create<Int8Array>(array, length);
    7372}
    7473
    7574PassRefPtr<Int8Array> Int8Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    7675{
    77     return TypedArrayBase<signed char>::create<Int8Array>(buffer, byteOffset, length);
     76    return TypedArrayBase<int8_t>::create<Int8Array>(buffer, byteOffset, length);
    7877}
    7978
    8079PassRefPtr<Int8Array> Int8Array::createUninitialized(unsigned length)
    8180{
    82     return TypedArrayBase<signed char>::createUninitialized<Int8Array>(length);
     81    return TypedArrayBase<int8_t>::createUninitialized<Int8Array>(length);
    8382}
    8483
    8584Int8Array::Int8Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    86     : IntegralTypedArrayBase<signed char>(buffer, byteOffset, length)
     85    : IntegralTypedArrayBase<int8_t>(buffer, byteOffset, length)
    8786{
    8887}
     
    9897}
    9998
    100 } // namespace WTF
     99} // namespace JSC
    101100
    102 using WTF::Int8Array;
     101using JSC::Int8Array;
    103102
    104103#endif // Int8Array_h
Note: See TracChangeset for help on using the changeset viewer.