Changeset 154127 in webkit for trunk/Source/JavaScriptCore


Ignore:
Timestamp:
Aug 15, 2013, 1:43:06 PM (12 years ago)
Author:
[email protected]
Message:

Typed arrays should be rewritten
https://bugs.webkit.org/show_bug.cgi?id=119064

.:

Reviewed by Oliver Hunt.

Automake work courtesy of Zan Dobersek <[email protected]>.

  • Source/autotools/symbols.filter:

Source/JavaScriptCore:

Reviewed by Oliver Hunt.

Typed arrays were previously deficient in several major ways:

  • They were defined separately in WebCore and in the jsc shell. The two implementations were different, and the jsc shell one was basically wrong. The WebCore one was quite awful, also.


  • Typed arrays were not visible to the JIT except through some weird hooks. For example, the JIT could not ask "what is the Structure that this typed array would have if I just allocated it from this global object". Also, it was difficult to wire any of the typed array intrinsics, because most of the functionality wasn't visible anywhere in JSC.


  • Typed array allocation was brain-dead. Allocating a typed array involved two JS objects, two GC weak handles, and three malloc allocations.


  • Neutering. It involved keeping tabs on all native views but not the view wrappers, even though the native views can autoneuter just by asking the buffer if it was neutered anytime you touch them; while the JS view wrappers are the ones that you really want to reach out to.


  • Common case-ing. Most typed arrays have one buffer and one view, and usually nobody touches the buffer. Yet we created all of that stuff anyway, using data structures optimized for the case where you had a lot of views.


  • Semantic goofs. Typed arrays should, in the future, behave like ES features rather than DOM features, for example when it comes to exceptions. Firefox already does this and I agree with them.


This patch cleanses our codebase of these sins:

  • Typed arrays are almost entirely defined in JSC. Only the lifecycle management of native references to buffers is left to WebCore.


  • Allocating a typed array requires either two GC allocations (a cell and a copied storage vector) or one GC allocation, a malloc allocation, and a weak handle (a cell and a malloc'd storage vector, plus a finalizer for the latter). The latter is only used for oversize arrays. Remember that before it was 7 allocations no matter what.


  • Typed arrays require just 4 words of overhead: Structure*, Butterfly*, mode/length, void* vector. Before it was a lot more than that - remember, there were five additional objects that did absolutely nothing for anybody.


  • Native views aren't tracked by the buffer, or by the wrappers. They are transient. In the future we'll probably switch to not even having them be malloc'd.


  • Native array buffers have an efficient way of tracking all of their JS view wrappers, both for neutering, and for lifecycle management. The GC special-cases native array buffers. This saves a bunch of grief; for example it means that a JS view wrapper can refer to its buffer via the butterfly, which would be dead by the time we went to finalize.


  • Typed array semantics now match Firefox, which also happens to be where the standards are going. The discussion on webkit-dev seemed to confirm that Chrome is also heading in this direction. This includes making Uint8ClampedArray not a subtype of Uint8Array, and getting rid of ArrayBufferView as a JS-visible construct.


This is up to a 10x speed-up on programs that allocate a lot of typed arrays.
It's a 1% speed-up on Octane. It also opens up a bunch of possibilities for
further typed array optimizations in the JSC JITs, including inlining typed
array allocation, inlining more of the accessors, reducing the cost of type
checks, etc.

An additional property of this patch is that typed arrays are mostly
implemented using templates. This deduplicates a bunch of code, but does mean
that we need some hacks for exporting s_info's of template classes. See
JSGenericTypedArrayView.h and JSTypedArrays.cpp. Those hacks are fairly
low-impact compared to code duplication.

Automake work courtesy of Zan Dobersek <[email protected]>.

  • CMakeLists.txt:
  • DerivedSources.make:
  • GNUmakefile.list.am:
  • JSCTypedArrayStubs.h: Removed.
  • JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Target.pri:
  • bytecode/ByValInfo.h:

(JSC::hasOptimizableIndexingForClassInfo):
(JSC::jitArrayModeForClassInfo):
(JSC::typedArrayTypeForJITArrayMode):

  • bytecode/SpeculatedType.cpp:

(JSC::speculationFromClassInfo):

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::toTypedArrayType):

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::typedArrayType):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
(JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
(JSC::DFG::SpeculativeJIT::compileGetArrayLength):

  • dfg/DFGSpeculativeJIT.h:
  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • heap/CopyToken.h:
  • heap/DeferGC.h:

(JSC::DeferGCForAWhile::DeferGCForAWhile):
(JSC::DeferGCForAWhile::~DeferGCForAWhile):

  • heap/GCIncomingRefCounted.h: Added.

(JSC::GCIncomingRefCounted::GCIncomingRefCounted):
(JSC::GCIncomingRefCounted::~GCIncomingRefCounted):
(JSC::GCIncomingRefCounted::numberOfIncomingReferences):
(JSC::GCIncomingRefCounted::incomingReferenceAt):
(JSC::GCIncomingRefCounted::singletonFlag):
(JSC::GCIncomingRefCounted::hasVectorOfCells):
(JSC::GCIncomingRefCounted::hasAnyIncoming):
(JSC::GCIncomingRefCounted::hasSingleton):
(JSC::GCIncomingRefCounted::singleton):
(JSC::GCIncomingRefCounted::vectorOfCells):

  • heap/GCIncomingRefCountedInlines.h: Added.

(JSC::::addIncomingReference):
(JSC::::filterIncomingReferences):

  • heap/GCIncomingRefCountedSet.h: Added.

(JSC::GCIncomingRefCountedSet::size):

  • heap/GCIncomingRefCountedSetInlines.h: Added.

(JSC::::GCIncomingRefCountedSet):
(JSC::::~GCIncomingRefCountedSet):
(JSC::::addReference):
(JSC::::sweep):
(JSC::::removeAll):
(JSC::::removeDead):

  • heap/Heap.cpp:

(JSC::Heap::addReference):
(JSC::Heap::extraSize):
(JSC::Heap::size):
(JSC::Heap::capacity):
(JSC::Heap::collect):
(JSC::Heap::decrementDeferralDepth):
(JSC::Heap::decrementDeferralDepthAndGCIfNeeded):

  • heap/Heap.h:
  • interpreter/CallFrame.h:

(JSC::ExecState::dataViewTable):

  • jit/JIT.h:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::privateCompileGetByVal):
(JSC::JIT::privateCompilePutByVal):
(JSC::JIT::emitIntTypedArrayGetByVal):
(JSC::JIT::emitFloatTypedArrayGetByVal):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):

  • jsc.cpp:

(GlobalObject::finishCreation):

  • runtime/ArrayBuffer.cpp:

(JSC::ArrayBuffer::transfer):

  • runtime/ArrayBuffer.h:

(JSC::ArrayBuffer::createAdopted):
(JSC::ArrayBuffer::ArrayBuffer):
(JSC::ArrayBuffer::gcSizeEstimateInBytes):
(JSC::ArrayBuffer::pin):
(JSC::ArrayBuffer::unpin):
(JSC::ArrayBufferContents::tryAllocate):

  • runtime/ArrayBufferView.cpp:

(JSC::ArrayBufferView::ArrayBufferView):
(JSC::ArrayBufferView::~ArrayBufferView):
(JSC::ArrayBufferView::setNeuterable):

  • runtime/ArrayBufferView.h:

(JSC::ArrayBufferView::isNeutered):
(JSC::ArrayBufferView::buffer):
(JSC::ArrayBufferView::baseAddress):
(JSC::ArrayBufferView::byteOffset):
(JSC::ArrayBufferView::verifySubRange):
(JSC::ArrayBufferView::clampOffsetAndNumElements):
(JSC::ArrayBufferView::calculateOffsetAndLength):

  • runtime/ClassInfo.h:
  • runtime/CommonIdentifiers.h:
  • runtime/DataView.cpp: Added.

(JSC::DataView::DataView):
(JSC::DataView::create):
(JSC::DataView::wrap):

  • runtime/DataView.h: Added.

(JSC::DataView::byteLength):
(JSC::DataView::getType):
(JSC::DataView::get):
(JSC::DataView::set):

  • runtime/Float32Array.h:
  • runtime/Float64Array.h:
  • runtime/GenericTypedArrayView.h: Added.

(JSC::GenericTypedArrayView::data):
(JSC::GenericTypedArrayView::set):
(JSC::GenericTypedArrayView::setRange):
(JSC::GenericTypedArrayView::zeroRange):
(JSC::GenericTypedArrayView::zeroFill):
(JSC::GenericTypedArrayView::length):
(JSC::GenericTypedArrayView::byteLength):
(JSC::GenericTypedArrayView::item):
(JSC::GenericTypedArrayView::checkInboundData):
(JSC::GenericTypedArrayView::getType):

  • runtime/GenericTypedArrayViewInlines.h: Added.

(JSC::::GenericTypedArrayView):
(JSC::::create):
(JSC::::createUninitialized):
(JSC::::subarray):
(JSC::::wrap):

  • runtime/IndexingHeader.h:

(JSC::IndexingHeader::arrayBuffer):
(JSC::IndexingHeader::setArrayBuffer):

  • runtime/Int16Array.h:
  • runtime/Int32Array.h:
  • runtime/Int8Array.h:
  • runtime/JSArrayBuffer.cpp: Added.

(JSC::JSArrayBuffer::JSArrayBuffer):
(JSC::JSArrayBuffer::finishCreation):
(JSC::JSArrayBuffer::create):
(JSC::JSArrayBuffer::createStructure):
(JSC::JSArrayBuffer::getOwnPropertySlot):
(JSC::JSArrayBuffer::getOwnPropertyDescriptor):
(JSC::JSArrayBuffer::put):
(JSC::JSArrayBuffer::defineOwnProperty):
(JSC::JSArrayBuffer::deleteProperty):
(JSC::JSArrayBuffer::getOwnNonIndexPropertyNames):

  • runtime/JSArrayBuffer.h: Added.

(JSC::JSArrayBuffer::impl):
(JSC::toArrayBuffer):

  • runtime/JSArrayBufferConstructor.cpp: Added.

(JSC::JSArrayBufferConstructor::JSArrayBufferConstructor):
(JSC::JSArrayBufferConstructor::finishCreation):
(JSC::JSArrayBufferConstructor::create):
(JSC::JSArrayBufferConstructor::createStructure):
(JSC::constructArrayBuffer):
(JSC::JSArrayBufferConstructor::getConstructData):
(JSC::JSArrayBufferConstructor::getCallData):

  • runtime/JSArrayBufferConstructor.h: Added.
  • runtime/JSArrayBufferPrototype.cpp: Added.

(JSC::arrayBufferProtoFuncSlice):
(JSC::JSArrayBufferPrototype::JSArrayBufferPrototype):
(JSC::JSArrayBufferPrototype::finishCreation):
(JSC::JSArrayBufferPrototype::create):
(JSC::JSArrayBufferPrototype::createStructure):

  • runtime/JSArrayBufferPrototype.h: Added.
  • runtime/JSArrayBufferView.cpp: Added.

(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
(JSC::JSArrayBufferView::JSArrayBufferView):
(JSC::JSArrayBufferView::finishCreation):
(JSC::JSArrayBufferView::getOwnPropertySlot):
(JSC::JSArrayBufferView::getOwnPropertyDescriptor):
(JSC::JSArrayBufferView::put):
(JSC::JSArrayBufferView::defineOwnProperty):
(JSC::JSArrayBufferView::deleteProperty):
(JSC::JSArrayBufferView::getOwnNonIndexPropertyNames):
(JSC::JSArrayBufferView::finalize):

  • runtime/JSArrayBufferView.h: Added.

(JSC::JSArrayBufferView::sizeOf):
(JSC::JSArrayBufferView::ConstructionContext::operator!):
(JSC::JSArrayBufferView::ConstructionContext::structure):
(JSC::JSArrayBufferView::ConstructionContext::vector):
(JSC::JSArrayBufferView::ConstructionContext::length):
(JSC::JSArrayBufferView::ConstructionContext::mode):
(JSC::JSArrayBufferView::ConstructionContext::butterfly):
(JSC::JSArrayBufferView::mode):
(JSC::JSArrayBufferView::vector):
(JSC::JSArrayBufferView::length):
(JSC::JSArrayBufferView::offsetOfVector):
(JSC::JSArrayBufferView::offsetOfLength):
(JSC::JSArrayBufferView::offsetOfMode):

  • runtime/JSArrayBufferViewInlines.h: Added.

(JSC::JSArrayBufferView::slowDownAndWasteMemoryIfNecessary):
(JSC::JSArrayBufferView::buffer):
(JSC::JSArrayBufferView::impl):
(JSC::JSArrayBufferView::neuter):
(JSC::JSArrayBufferView::byteOffset):

  • runtime/JSCell.cpp:

(JSC::JSCell::slowDownAndWasteMemory):
(JSC::JSCell::getTypedArrayImpl):

  • runtime/JSCell.h:
  • runtime/JSDataView.cpp: Added.

(JSC::JSDataView::JSDataView):
(JSC::JSDataView::create):
(JSC::JSDataView::createUninitialized):
(JSC::JSDataView::set):
(JSC::JSDataView::typedImpl):
(JSC::JSDataView::getOwnPropertySlot):
(JSC::JSDataView::getOwnPropertyDescriptor):
(JSC::JSDataView::slowDownAndWasteMemory):
(JSC::JSDataView::getTypedArrayImpl):
(JSC::JSDataView::createStructure):

  • runtime/JSDataView.h: Added.
  • runtime/JSDataViewPrototype.cpp: Added.

(JSC::JSDataViewPrototype::JSDataViewPrototype):
(JSC::JSDataViewPrototype::create):
(JSC::JSDataViewPrototype::createStructure):
(JSC::JSDataViewPrototype::getOwnPropertySlot):
(JSC::JSDataViewPrototype::getOwnPropertyDescriptor):
(JSC::getData):
(JSC::setData):
(JSC::dataViewProtoFuncGetInt8):
(JSC::dataViewProtoFuncGetInt16):
(JSC::dataViewProtoFuncGetInt32):
(JSC::dataViewProtoFuncGetUint8):
(JSC::dataViewProtoFuncGetUint16):
(JSC::dataViewProtoFuncGetUint32):
(JSC::dataViewProtoFuncGetFloat32):
(JSC::dataViewProtoFuncGetFloat64):
(JSC::dataViewProtoFuncSetInt8):
(JSC::dataViewProtoFuncSetInt16):
(JSC::dataViewProtoFuncSetInt32):
(JSC::dataViewProtoFuncSetUint8):
(JSC::dataViewProtoFuncSetUint16):
(JSC::dataViewProtoFuncSetUint32):
(JSC::dataViewProtoFuncSetFloat32):
(JSC::dataViewProtoFuncSetFloat64):

  • runtime/JSDataViewPrototype.h: Added.
  • runtime/JSFloat32Array.h: Added.
  • runtime/JSFloat64Array.h: Added.
  • runtime/JSGenericTypedArrayView.h: Added.

(JSC::JSGenericTypedArrayView::byteLength):
(JSC::JSGenericTypedArrayView::byteSize):
(JSC::JSGenericTypedArrayView::typedVector):
(JSC::JSGenericTypedArrayView::canGetIndexQuickly):
(JSC::JSGenericTypedArrayView::canSetIndexQuickly):
(JSC::JSGenericTypedArrayView::getIndexQuicklyAsNativeValue):
(JSC::JSGenericTypedArrayView::getIndexQuicklyAsDouble):
(JSC::JSGenericTypedArrayView::getIndexQuickly):
(JSC::JSGenericTypedArrayView::setIndexQuicklyToNativeValue):
(JSC::JSGenericTypedArrayView::setIndexQuicklyToDouble):
(JSC::JSGenericTypedArrayView::setIndexQuickly):
(JSC::JSGenericTypedArrayView::canAccessRangeQuickly):
(JSC::JSGenericTypedArrayView::typedImpl):
(JSC::JSGenericTypedArrayView::createStructure):
(JSC::JSGenericTypedArrayView::info):
(JSC::toNativeTypedView):

  • runtime/JSGenericTypedArrayViewConstructor.h: Added.
  • runtime/JSGenericTypedArrayViewConstructorInlines.h: Added.

(JSC::::JSGenericTypedArrayViewConstructor):
(JSC::::finishCreation):
(JSC::::create):
(JSC::::createStructure):
(JSC::constructGenericTypedArrayView):
(JSC::::getConstructData):
(JSC::::getCallData):

  • runtime/JSGenericTypedArrayViewInlines.h: Added.

(JSC::::JSGenericTypedArrayView):
(JSC::::create):
(JSC::::createUninitialized):
(JSC::::validateRange):
(JSC::::setWithSpecificType):
(JSC::::set):
(JSC::::getOwnPropertySlot):
(JSC::::getOwnPropertyDescriptor):
(JSC::::put):
(JSC::::defineOwnProperty):
(JSC::::deleteProperty):
(JSC::::getOwnPropertySlotByIndex):
(JSC::::putByIndex):
(JSC::::deletePropertyByIndex):
(JSC::::getOwnNonIndexPropertyNames):
(JSC::::getOwnPropertyNames):
(JSC::::visitChildren):
(JSC::::copyBackingStore):
(JSC::::slowDownAndWasteMemory):
(JSC::::getTypedArrayImpl):

  • runtime/JSGenericTypedArrayViewPrototype.h: Added.
  • runtime/JSGenericTypedArrayViewPrototypeInlines.h: Added.

(JSC::genericTypedArrayViewProtoFuncSet):
(JSC::genericTypedArrayViewProtoFuncSubarray):
(JSC::::JSGenericTypedArrayViewPrototype):
(JSC::::finishCreation):
(JSC::::create):
(JSC::::createStructure):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::arrayBufferPrototype):
(JSC::JSGlobalObject::arrayBufferStructure):
(JSC::JSGlobalObject::typedArrayStructure):

  • runtime/JSInt16Array.h: Added.
  • runtime/JSInt32Array.h: Added.
  • runtime/JSInt8Array.h: Added.
  • runtime/JSTypedArrayConstructors.cpp: Added.
  • runtime/JSTypedArrayConstructors.h: Added.
  • runtime/JSTypedArrayPrototypes.cpp: Added.
  • runtime/JSTypedArrayPrototypes.h: Added.
  • runtime/JSTypedArrays.cpp: Added.
  • runtime/JSTypedArrays.h: Added.
  • runtime/JSUint16Array.h: Added.
  • runtime/JSUint32Array.h: Added.
  • runtime/JSUint8Array.h: Added.
  • runtime/JSUint8ClampedArray.h: Added.
  • runtime/Operations.h:
  • runtime/Options.h:
  • runtime/SimpleTypedArrayController.cpp: Added.

(JSC::SimpleTypedArrayController::SimpleTypedArrayController):
(JSC::SimpleTypedArrayController::~SimpleTypedArrayController):
(JSC::SimpleTypedArrayController::toJS):

  • runtime/SimpleTypedArrayController.h: Added.
  • runtime/Structure.h:

(JSC::Structure::couldHaveIndexingHeader):

  • runtime/StructureInlines.h:

(JSC::Structure::hasIndexingHeader):

  • runtime/TypedArrayAdaptors.h: Added.

(JSC::IntegralTypedArrayAdaptor::toNative):
(JSC::IntegralTypedArrayAdaptor::toJSValue):
(JSC::IntegralTypedArrayAdaptor::toDouble):
(JSC::FloatTypedArrayAdaptor::toNative):
(JSC::FloatTypedArrayAdaptor::toJSValue):
(JSC::FloatTypedArrayAdaptor::toDouble):
(JSC::Uint8ClampedAdaptor::toNative):
(JSC::Uint8ClampedAdaptor::toJSValue):
(JSC::Uint8ClampedAdaptor::toDouble):
(JSC::Uint8ClampedAdaptor::clamp):

  • runtime/TypedArrayController.cpp: Added.

(JSC::TypedArrayController::TypedArrayController):
(JSC::TypedArrayController::~TypedArrayController):

  • runtime/TypedArrayController.h: Added.
  • runtime/TypedArrayDescriptor.h: Removed.
  • runtime/TypedArrayInlines.h: Added.
  • runtime/TypedArrayType.cpp: Added.

(JSC::classInfoForType):
(WTF::printInternal):

  • runtime/TypedArrayType.h: Added.

(JSC::toIndex):
(JSC::isTypedView):
(JSC::elementSize):
(JSC::isInt):
(JSC::isFloat):
(JSC::isSigned):
(JSC::isClamped):

  • runtime/TypedArrays.h: Added.
  • runtime/Uint16Array.h:
  • runtime/Uint32Array.h:
  • runtime/Uint8Array.h:
  • runtime/Uint8ClampedArray.h:
  • runtime/VM.cpp:

(JSC::VM::VM):
(JSC::VM::~VM):

  • runtime/VM.h:

Source/WebCore:

Reviewed by Oliver Hunt.

Typed arrays are now implemented in JavaScriptCore, and WebCore is merely a
client of them. There is only one layering violation: WebCore installs a
WebCoreTypedArrayController on VM, which makes the
ArrayBuffer<->JSArrayBuffer relationship resemble DOM wrappers. By default,
JSC makes the ownership go one way; the JSArrayBuffer keeps the ArrayBuffer
alive but if ArrayBuffer is kept alive from native code then the
JSArrayByffer may die. WebCoreTypedArrayController will keep the
JSArrayBuffer alive if the ArrayBuffer is in the opaque root set.

To make non-JSDOMWrappers behave like DOM wrappers, a bunch of code is
changed to make most references to wrappers refer to JSObject* rather than
JSDOMWrapper*.

Array buffer views are now transient; the JS array buffer view wrappers
don't own them or keep them alive. This required a bunch of changes to make
bindings code use RefPtr<ArrayBufferView> to hold onto their views.

Also there is a bunch of new code to make JSC-provided array buffers and
views obey the toJS/to<ClassName> idiom for wrapping and unwrapping.

Finally, the DataView API is now completely different: the JSDataView
provides the same user-visible JS API but using its own internal magic; the
C++ code that uses DataView now uses a rather different API that is not
aware of usual DOM semantics, since it's in JSC and not WebCore. It's
equally useful for all of WebCore's purposes, but some code had to change
to adapt the new conventions.

Some tests have been changed or rebased due to changes in behavior, that
bring us into conformance with where the standards are going and allow us to
match Firefox behavior.

Automake work and some additional GTK changes courtesy of
Zan Dobersek <[email protected]>.

Additional Qt changes courtesy of Arunprasad Rajkumar <[email protected]>.

  • CMakeLists.txt:
  • DerivedSources.make:
  • ForwardingHeaders/runtime/DataView.h: Added.
  • ForwardingHeaders/runtime/JSArrayBuffer.h: Added.
  • ForwardingHeaders/runtime/JSArrayBufferView.h: Added.
  • ForwardingHeaders/runtime/JSDataView.h: Added.
  • ForwardingHeaders/runtime/JSTypedArrays.h: Added.
  • ForwardingHeaders/runtime/TypedArrayController.h: Added.
  • ForwardingHeaders/runtime/TypedArrayInlines.h: Added.
  • ForwardingHeaders/runtime/TypedArrays.h: Added.
  • GNUmakefile.list.am:
  • Modules/webaudio/RealtimeAnalyser.h:
  • Target.pri:
  • UseJSC.cmake:
  • WebCore.exp.in:
  • WebCore.vcxproj/WebCore.vcxproj:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/DOMWrapperWorld.h:
  • bindings/js/JSArrayBufferCustom.cpp: Removed.
  • bindings/js/JSArrayBufferViewHelper.h: Removed.
  • bindings/js/JSAudioContextCustom.cpp:
  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSBlobCustom.cpp:
  • bindings/js/JSCSSRuleCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSCSSValueCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSCryptoCustom.cpp:

(WebCore::JSCrypto::getRandomValues):

  • bindings/js/JSDOMBinding.h:

(WebCore::wrapperOwner):
(WebCore::wrapperContext):
(WebCore::getInlineCachedWrapper):
(WebCore::setInlineCachedWrapper):
(WebCore::clearInlineCachedWrapper):
(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::uncacheWrapper):
(WebCore::wrap):
(WebCore::toJS):
(WebCore::toArrayBufferView):
(WebCore::toInt8Array):
(WebCore::toInt16Array):
(WebCore::toInt32Array):
(WebCore::toUint8Array):
(WebCore::toUint8ClampedArray):
(WebCore::toUint16Array):
(WebCore::toUint32Array):
(WebCore::toFloat32Array):
(WebCore::toFloat64Array):
(WebCore::toDataView):

  • bindings/js/JSDataViewCustom.cpp: Removed.
  • bindings/js/JSDictionary.cpp:
  • bindings/js/JSDictionary.h:
  • bindings/js/JSDocumentCustom.cpp:

(WebCore::JSDocument::location):
(WebCore::toJS):

  • bindings/js/JSEventCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSFileReaderCustom.cpp:
  • bindings/js/JSHTMLCollectionCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSHTMLTemplateElementCustom.cpp:

(WebCore::JSHTMLTemplateElement::content):

  • bindings/js/JSImageDataCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSInjectedScriptHostCustom.cpp:
  • bindings/js/JSMessageEventCustom.cpp:
  • bindings/js/JSMessagePortCustom.cpp:
  • bindings/js/JSSVGPathSegCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSStyleSheetCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSTrackCustom.cpp:

(WebCore::toJS):

  • bindings/js/JSWebGLRenderingContextCustom.cpp:
  • bindings/js/JSXMLHttpRequestCustom.cpp:

(WebCore::JSXMLHttpRequest::send):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::SerializedScriptValue::transferArrayBuffers):

  • bindings/js/WebCoreJSClientData.h:

(WebCore::initNormalWorldClientData):

  • bindings/js/WebCoreTypedArrayController.cpp: Added.

(WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController):
(WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController):
(WebCore::WebCoreTypedArrayController::toJS):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):

  • bindings/js/WebCoreTypedArrayController.h: Added.

(WebCore::WebCoreTypedArrayController::wrapperOwner):

  • bindings/scripts/CodeGenerator.pm:

(ForAllParents):
(ParseInterface):
(SkipIncludeHeader):
(IsTypedArrayType):
(IsWrapperType):

  • bindings/scripts/CodeGeneratorJS.pm:

(AddIncludesForType):
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
(GetNativeType):
(JSValueToNative):
(NativeToJSValue):
(GenerateConstructorDefinition):
(GenerateConstructorHelperMethods):

  • fileapi/WebKitBlobBuilder.cpp:

(WebCore::BlobBuilder::append):

  • fileapi/WebKitBlobBuilder.h:
  • html/canvas/ArrayBuffer.idl: Removed.
  • html/canvas/ArrayBufferView.idl: Removed.
  • html/canvas/DataView.cpp: Removed.
  • html/canvas/DataView.h: Removed.
  • html/canvas/DataView.idl: Removed.
  • html/canvas/Float32Array.idl: Removed.
  • html/canvas/Float64Array.idl: Removed.
  • html/canvas/Int16Array.idl: Removed.
  • html/canvas/Int32Array.idl: Removed.
  • html/canvas/Int8Array.idl: Removed.
  • html/canvas/Uint16Array.idl: Removed.
  • html/canvas/Uint32Array.idl: Removed.
  • html/canvas/Uint8Array.idl: Removed.
  • html/canvas/Uint8ClampedArray.idl: Removed.
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::readPixels):
(WebCore::WebGLRenderingContext::validateTexFuncData):

  • page/Crypto.cpp:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
(WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData):

  • platform/graphics/filters/FECustomFilter.h:
  • platform/graphics/filters/FEGaussianBlur.cpp:
  • platform/graphics/filters/FilterEffect.cpp:
  • testing/MockCDM.cpp:

Source/WebKit2:

Reviewed by Oliver Hunt.

You don't need to include JSUint8Array anymore if you just want to
unwrap one; JSDOMBinding gives you all of the things you need.

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

Source/WTF:

Reviewed by Oliver Hunt.

  • Added the notion of a reference counted object that can be marked Deferred, which is like a special-purpose upref.


  • Added a common byte flipper.

Automake work courtesy of Zan Dobersek <[email protected]>.

  • GNUmakefile.list.am:
  • WTF.xcodeproj/project.pbxproj:
  • wtf/DeferrableRefCounted.h: Added.

(WTF::DeferrableRefCountedBase::ref):
(WTF::DeferrableRefCountedBase::hasOneRef):
(WTF::DeferrableRefCountedBase::refCount):
(WTF::DeferrableRefCountedBase::isDeferred):
(WTF::DeferrableRefCountedBase::DeferrableRefCountedBase):
(WTF::DeferrableRefCountedBase::~DeferrableRefCountedBase):
(WTF::DeferrableRefCountedBase::derefBase):
(WTF::DeferrableRefCountedBase::setIsDeferredBase):
(WTF::DeferrableRefCounted::deref):
(WTF::DeferrableRefCounted::setIsDeferred):
(WTF::DeferrableRefCounted::DeferrableRefCounted):
(WTF::DeferrableRefCounted::~DeferrableRefCounted):

  • wtf/FlipBytes.h: Added.

(WTF::needToFlipBytesIfLittleEndian):
(WTF::flipBytes):
(WTF::flipBytesIfLittleEndian):

LayoutTests:

Reviewed by Oliver Hunt.

  • fast/canvas/webgl/array-set-invalid-arguments-expected.txt:
  • fast/canvas/webgl/array-set-out-of-bounds-expected.txt:
  • fast/canvas/webgl/array-unit-tests-expected.txt:
  • fast/canvas/webgl/array-unit-tests.html:
  • fast/canvas/webgl/data-view-crash-expected.txt:
  • fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js:

(checkView):

  • fast/dom/call-a-constructor-as-a-function-expected.txt:
  • fast/dom/call-a-constructor-as-a-function.html:
  • fast/js/constructor-length.html:
  • fast/js/global-constructors-attributes-dedicated-worker-expected.txt:
  • fast/js/global-constructors-attributes-expected.txt:
  • fast/js/global-constructors-attributes-shared-worker-expected.txt:
  • fast/js/regress/ArrayBuffer-Int8Array-alloc-expected.txt: Added.
  • fast/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived-expected.txt: Added.
  • fast/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived.html: Added.
  • fast/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived-expected.txt: Added.
  • fast/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived.html: Added.
  • fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer-expected.txt: Added.
  • fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer.html: Added.
  • fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-expected.txt: Added.
  • fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived.html: Added.
  • fast/js/regress/ArrayBuffer-Int8Array-alloc.html: Added.
  • fast/js/regress/Int32Array-Int8Array-view-alloc-expected.txt: Added.
  • fast/js/regress/Int32Array-Int8Array-view-alloc.html: Added.
  • fast/js/regress/Int32Array-alloc-expected.txt: Added.
  • fast/js/regress/Int32Array-alloc-huge-expected.txt: Added.
  • fast/js/regress/Int32Array-alloc-huge-long-lived-expected.txt: Added.
  • fast/js/regress/Int32Array-alloc-huge-long-lived.html: Added.
  • fast/js/regress/Int32Array-alloc-huge.html: Added.
  • fast/js/regress/Int32Array-alloc-large-expected.txt: Added.
  • fast/js/regress/Int32Array-alloc-large-long-lived-expected.txt: Added.
  • fast/js/regress/Int32Array-alloc-large-long-lived.html: Added.
  • fast/js/regress/Int32Array-alloc-large.html: Added.
  • fast/js/regress/Int32Array-alloc-long-lived-expected.txt: Added.
  • fast/js/regress/Int32Array-alloc-long-lived.html: Added.
  • fast/js/regress/Int32Array-alloc.html: Added.
  • fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-huge-long-lived.js: Added.
  • fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-large-long-lived.js: Added.
  • fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-long-lived-buffer.js: Added.
  • fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-long-lived.js: Added.
  • fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc.js: Added.
  • fast/js/regress/script-tests/Int32Array-Int8Array-view-alloc.js: Added.
  • fast/js/regress/script-tests/Int32Array-alloc-huge-long-lived.js: Added.
  • fast/js/regress/script-tests/Int32Array-alloc-huge.js: Added.
  • fast/js/regress/script-tests/Int32Array-alloc-large-long-lived.js: Added.
  • fast/js/regress/script-tests/Int32Array-alloc-large.js: Added.
  • fast/js/regress/script-tests/Int32Array-alloc-long-lived.js: Added.
  • fast/js/regress/script-tests/Int32Array-alloc.js: Added.
  • platform/mac/fast/js/constructor-length-expected.txt:
  • webgl/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:
  • webgl/resources/webgl_test_files/conformance/typedarrays/data-view-test.html:
Location:
trunk/Source/JavaScriptCore
Files:
51 added
2 deleted
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r153744 r154127  
    168168    heap/ConservativeRoots.cpp
    169169    heap/DFGCodeBlocks.cpp
     170    heap/GCIncomingRefCountedSet.h
     171    heap/GCIncomingRefCounted.h
     172    heap/GCIncomingRefCountedSetInlines.h
     173    heap/GCIncomingRefCountedInlines.h
    170174    heap/GCThread.cpp
    171175    heap/GCThreadSharedData.cpp
     
    265269    profiler/LegacyProfiler.cpp
    266270
     271    runtime/ArgList.cpp
     272    runtime/Arguments.cpp
    267273    runtime/ArrayBuffer.cpp
    268274    runtime/ArrayBufferView.cpp
    269     runtime/ArgList.cpp
    270     runtime/Arguments.cpp
    271275    runtime/ArrayConstructor.cpp
    272276    runtime/ArrayPrototype.cpp
     
    283287    runtime/Completion.cpp
    284288    runtime/ConstructData.cpp
     289    runtime/DataView.cpp
     290    runtime/DataView.h
    285291    runtime/DateConstructor.cpp
    286292    runtime/DateConversion.cpp
     
    307313    runtime/JSActivation.cpp
    308314    runtime/JSArray.cpp
     315    runtime/JSArrayBuffer.cpp
     316    runtime/JSArrayBufferConstructor.cpp
     317    runtime/JSArrayBufferPrototype.cpp
     318    runtime/JSArrayBufferView.cpp
    309319    runtime/JSBoundFunction.cpp
    310320    runtime/JSCJSValue.cpp
    311321    runtime/JSCell.cpp
    312322    runtime/JSChunk.cpp
     323    runtime/JSDataView.cpp
     324    runtime/JSDataViewPrototype.cpp
    313325    runtime/JSDateMath.cpp
    314326    runtime/JSFunction.cpp
     
    328340    runtime/JSStringJoiner.cpp
    329341    runtime/JSSymbolTableObject.cpp
     342    runtime/JSTypedArrayConstructors.cpp
     343    runtime/JSTypedArrayPrototypes.cpp
     344    runtime/JSTypedArrays.cpp
    330345    runtime/JSVariableObject.cpp
    331346    runtime/JSWithScope.cpp
     
    360375    runtime/RegExpPrototype.cpp
    361376    runtime/SamplingCounter.cpp
     377    runtime/SimpleTypedArrayController.cpp
    362378    runtime/SmallStrings.cpp
    363379    runtime/SparseArrayValueMap.cpp
     
    371387    runtime/StructureRareData.cpp
    372388    runtime/SymbolTable.cpp
     389    runtime/TypedArrayController.cpp
     390    runtime/TypedArrayType.cpp
    373391    runtime/VM.cpp
    374392    runtime/Watchdog.cpp
     
    392410    runtime/DatePrototype.cpp
    393411    runtime/ErrorPrototype.cpp
     412    runtime/JSDataViewPrototype.cpp
    394413    runtime/JSGlobalObject.cpp
    395414    runtime/JSONObject.cpp
  • trunk/Source/JavaScriptCore/ChangeLog

    r154120 r154127  
     12013-08-14  Filip Pizlo  <[email protected]>
     2
     3        Typed arrays should be rewritten
     4        https://bugs.webkit.org/show_bug.cgi?id=119064
     5
     6        Reviewed by Oliver Hunt.
     7       
     8        Typed arrays were previously deficient in several major ways:
     9       
     10        - They were defined separately in WebCore and in the jsc shell. The two
     11          implementations were different, and the jsc shell one was basically wrong.
     12          The WebCore one was quite awful, also.
     13       
     14        - Typed arrays were not visible to the JIT except through some weird hooks.
     15          For example, the JIT could not ask "what is the Structure that this typed
     16          array would have if I just allocated it from this global object". Also,
     17          it was difficult to wire any of the typed array intrinsics, because most
     18          of the functionality wasn't visible anywhere in JSC.
     19       
     20        - Typed array allocation was brain-dead. Allocating a typed array involved
     21          two JS objects, two GC weak handles, and three malloc allocations.
     22       
     23        - Neutering. It involved keeping tabs on all native views but not the view
     24          wrappers, even though the native views can autoneuter just by asking the
     25          buffer if it was neutered anytime you touch them; while the JS view
     26          wrappers are the ones that you really want to reach out to.
     27       
     28        - Common case-ing. Most typed arrays have one buffer and one view, and
     29          usually nobody touches the buffer. Yet we created all of that stuff
     30          anyway, using data structures optimized for the case where you had a lot
     31          of views.
     32       
     33        - Semantic goofs. Typed arrays should, in the future, behave like ES
     34          features rather than DOM features, for example when it comes to exceptions.
     35          Firefox already does this and I agree with them.
     36       
     37        This patch cleanses our codebase of these sins:
     38       
     39        - Typed arrays are almost entirely defined in JSC. Only the lifecycle
     40          management of native references to buffers is left to WebCore.
     41       
     42        - Allocating a typed array requires either two GC allocations (a cell and a
     43          copied storage vector) or one GC allocation, a malloc allocation, and a
     44          weak handle (a cell and a malloc'd storage vector, plus a finalizer for the
     45          latter). The latter is only used for oversize arrays. Remember that before
     46          it was 7 allocations no matter what.
     47       
     48        - Typed arrays require just 4 words of overhead: Structure*, Butterfly*,
     49          mode/length, void* vector. Before it was a lot more than that - remember,
     50          there were five additional objects that did absolutely nothing for anybody.
     51       
     52        - Native views aren't tracked by the buffer, or by the wrappers. They are
     53          transient. In the future we'll probably switch to not even having them be
     54          malloc'd.
     55       
     56        - Native array buffers have an efficient way of tracking all of their JS view
     57          wrappers, both for neutering, and for lifecycle management. The GC
     58          special-cases native array buffers. This saves a bunch of grief; for example
     59          it means that a JS view wrapper can refer to its buffer via the butterfly,
     60          which would be dead by the time we went to finalize.
     61       
     62        - Typed array semantics now match Firefox, which also happens to be where the
     63          standards are going. The discussion on webkit-dev seemed to confirm that
     64          Chrome is also heading in this direction. This includes making
     65          Uint8ClampedArray not a subtype of Uint8Array, and getting rid of
     66          ArrayBufferView as a JS-visible construct.
     67       
     68        This is up to a 10x speed-up on programs that allocate a lot of typed arrays.
     69        It's a 1% speed-up on Octane. It also opens up a bunch of possibilities for
     70        further typed array optimizations in the JSC JITs, including inlining typed
     71        array allocation, inlining more of the accessors, reducing the cost of type
     72        checks, etc.
     73       
     74        An additional property of this patch is that typed arrays are mostly
     75        implemented using templates. This deduplicates a bunch of code, but does mean
     76        that we need some hacks for exporting s_info's of template classes. See
     77        JSGenericTypedArrayView.h and JSTypedArrays.cpp. Those hacks are fairly
     78        low-impact compared to code duplication.
     79       
     80        Automake work courtesy of Zan Dobersek <[email protected]>.
     81
     82        * CMakeLists.txt:
     83        * DerivedSources.make:
     84        * GNUmakefile.list.am:
     85        * JSCTypedArrayStubs.h: Removed.
     86        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
     87        * JavaScriptCore.xcodeproj/project.pbxproj:
     88        * Target.pri:
     89        * bytecode/ByValInfo.h:
     90        (JSC::hasOptimizableIndexingForClassInfo):
     91        (JSC::jitArrayModeForClassInfo):
     92        (JSC::typedArrayTypeForJITArrayMode):
     93        * bytecode/SpeculatedType.cpp:
     94        (JSC::speculationFromClassInfo):
     95        * dfg/DFGArrayMode.cpp:
     96        (JSC::DFG::toTypedArrayType):
     97        * dfg/DFGArrayMode.h:
     98        (JSC::DFG::ArrayMode::typedArrayType):
     99        * dfg/DFGSpeculativeJIT.cpp:
     100        (JSC::DFG::SpeculativeJIT::checkArray):
     101        (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
     102        (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
     103        (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
     104        (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
     105        (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
     106        (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
     107        * dfg/DFGSpeculativeJIT.h:
     108        * dfg/DFGSpeculativeJIT32_64.cpp:
     109        (JSC::DFG::SpeculativeJIT::compile):
     110        * dfg/DFGSpeculativeJIT64.cpp:
     111        (JSC::DFG::SpeculativeJIT::compile):
     112        * heap/CopyToken.h:
     113        * heap/DeferGC.h:
     114        (JSC::DeferGCForAWhile::DeferGCForAWhile):
     115        (JSC::DeferGCForAWhile::~DeferGCForAWhile):
     116        * heap/GCIncomingRefCounted.h: Added.
     117        (JSC::GCIncomingRefCounted::GCIncomingRefCounted):
     118        (JSC::GCIncomingRefCounted::~GCIncomingRefCounted):
     119        (JSC::GCIncomingRefCounted::numberOfIncomingReferences):
     120        (JSC::GCIncomingRefCounted::incomingReferenceAt):
     121        (JSC::GCIncomingRefCounted::singletonFlag):
     122        (JSC::GCIncomingRefCounted::hasVectorOfCells):
     123        (JSC::GCIncomingRefCounted::hasAnyIncoming):
     124        (JSC::GCIncomingRefCounted::hasSingleton):
     125        (JSC::GCIncomingRefCounted::singleton):
     126        (JSC::GCIncomingRefCounted::vectorOfCells):
     127        * heap/GCIncomingRefCountedInlines.h: Added.
     128        (JSC::::addIncomingReference):
     129        (JSC::::filterIncomingReferences):
     130        * heap/GCIncomingRefCountedSet.h: Added.
     131        (JSC::GCIncomingRefCountedSet::size):
     132        * heap/GCIncomingRefCountedSetInlines.h: Added.
     133        (JSC::::GCIncomingRefCountedSet):
     134        (JSC::::~GCIncomingRefCountedSet):
     135        (JSC::::addReference):
     136        (JSC::::sweep):
     137        (JSC::::removeAll):
     138        (JSC::::removeDead):
     139        * heap/Heap.cpp:
     140        (JSC::Heap::addReference):
     141        (JSC::Heap::extraSize):
     142        (JSC::Heap::size):
     143        (JSC::Heap::capacity):
     144        (JSC::Heap::collect):
     145        (JSC::Heap::decrementDeferralDepth):
     146        (JSC::Heap::decrementDeferralDepthAndGCIfNeeded):
     147        * heap/Heap.h:
     148        * interpreter/CallFrame.h:
     149        (JSC::ExecState::dataViewTable):
     150        * jit/JIT.h:
     151        * jit/JITPropertyAccess.cpp:
     152        (JSC::JIT::privateCompileGetByVal):
     153        (JSC::JIT::privateCompilePutByVal):
     154        (JSC::JIT::emitIntTypedArrayGetByVal):
     155        (JSC::JIT::emitFloatTypedArrayGetByVal):
     156        (JSC::JIT::emitIntTypedArrayPutByVal):
     157        (JSC::JIT::emitFloatTypedArrayPutByVal):
     158        * jsc.cpp:
     159        (GlobalObject::finishCreation):
     160        * runtime/ArrayBuffer.cpp:
     161        (JSC::ArrayBuffer::transfer):
     162        * runtime/ArrayBuffer.h:
     163        (JSC::ArrayBuffer::createAdopted):
     164        (JSC::ArrayBuffer::ArrayBuffer):
     165        (JSC::ArrayBuffer::gcSizeEstimateInBytes):
     166        (JSC::ArrayBuffer::pin):
     167        (JSC::ArrayBuffer::unpin):
     168        (JSC::ArrayBufferContents::tryAllocate):
     169        * runtime/ArrayBufferView.cpp:
     170        (JSC::ArrayBufferView::ArrayBufferView):
     171        (JSC::ArrayBufferView::~ArrayBufferView):
     172        (JSC::ArrayBufferView::setNeuterable):
     173        * runtime/ArrayBufferView.h:
     174        (JSC::ArrayBufferView::isNeutered):
     175        (JSC::ArrayBufferView::buffer):
     176        (JSC::ArrayBufferView::baseAddress):
     177        (JSC::ArrayBufferView::byteOffset):
     178        (JSC::ArrayBufferView::verifySubRange):
     179        (JSC::ArrayBufferView::clampOffsetAndNumElements):
     180        (JSC::ArrayBufferView::calculateOffsetAndLength):
     181        * runtime/ClassInfo.h:
     182        * runtime/CommonIdentifiers.h:
     183        * runtime/DataView.cpp: Added.
     184        (JSC::DataView::DataView):
     185        (JSC::DataView::create):
     186        (JSC::DataView::wrap):
     187        * runtime/DataView.h: Added.
     188        (JSC::DataView::byteLength):
     189        (JSC::DataView::getType):
     190        (JSC::DataView::get):
     191        (JSC::DataView::set):
     192        * runtime/Float32Array.h:
     193        * runtime/Float64Array.h:
     194        * runtime/GenericTypedArrayView.h: Added.
     195        (JSC::GenericTypedArrayView::data):
     196        (JSC::GenericTypedArrayView::set):
     197        (JSC::GenericTypedArrayView::setRange):
     198        (JSC::GenericTypedArrayView::zeroRange):
     199        (JSC::GenericTypedArrayView::zeroFill):
     200        (JSC::GenericTypedArrayView::length):
     201        (JSC::GenericTypedArrayView::byteLength):
     202        (JSC::GenericTypedArrayView::item):
     203        (JSC::GenericTypedArrayView::checkInboundData):
     204        (JSC::GenericTypedArrayView::getType):
     205        * runtime/GenericTypedArrayViewInlines.h: Added.
     206        (JSC::::GenericTypedArrayView):
     207        (JSC::::create):
     208        (JSC::::createUninitialized):
     209        (JSC::::subarray):
     210        (JSC::::wrap):
     211        * runtime/IndexingHeader.h:
     212        (JSC::IndexingHeader::arrayBuffer):
     213        (JSC::IndexingHeader::setArrayBuffer):
     214        * runtime/Int16Array.h:
     215        * runtime/Int32Array.h:
     216        * runtime/Int8Array.h:
     217        * runtime/JSArrayBuffer.cpp: Added.
     218        (JSC::JSArrayBuffer::JSArrayBuffer):
     219        (JSC::JSArrayBuffer::finishCreation):
     220        (JSC::JSArrayBuffer::create):
     221        (JSC::JSArrayBuffer::createStructure):
     222        (JSC::JSArrayBuffer::getOwnPropertySlot):
     223        (JSC::JSArrayBuffer::getOwnPropertyDescriptor):
     224        (JSC::JSArrayBuffer::put):
     225        (JSC::JSArrayBuffer::defineOwnProperty):
     226        (JSC::JSArrayBuffer::deleteProperty):
     227        (JSC::JSArrayBuffer::getOwnNonIndexPropertyNames):
     228        * runtime/JSArrayBuffer.h: Added.
     229        (JSC::JSArrayBuffer::impl):
     230        (JSC::toArrayBuffer):
     231        * runtime/JSArrayBufferConstructor.cpp: Added.
     232        (JSC::JSArrayBufferConstructor::JSArrayBufferConstructor):
     233        (JSC::JSArrayBufferConstructor::finishCreation):
     234        (JSC::JSArrayBufferConstructor::create):
     235        (JSC::JSArrayBufferConstructor::createStructure):
     236        (JSC::constructArrayBuffer):
     237        (JSC::JSArrayBufferConstructor::getConstructData):
     238        (JSC::JSArrayBufferConstructor::getCallData):
     239        * runtime/JSArrayBufferConstructor.h: Added.
     240        * runtime/JSArrayBufferPrototype.cpp: Added.
     241        (JSC::arrayBufferProtoFuncSlice):
     242        (JSC::JSArrayBufferPrototype::JSArrayBufferPrototype):
     243        (JSC::JSArrayBufferPrototype::finishCreation):
     244        (JSC::JSArrayBufferPrototype::create):
     245        (JSC::JSArrayBufferPrototype::createStructure):
     246        * runtime/JSArrayBufferPrototype.h: Added.
     247        * runtime/JSArrayBufferView.cpp: Added.
     248        (JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
     249        (JSC::JSArrayBufferView::JSArrayBufferView):
     250        (JSC::JSArrayBufferView::finishCreation):
     251        (JSC::JSArrayBufferView::getOwnPropertySlot):
     252        (JSC::JSArrayBufferView::getOwnPropertyDescriptor):
     253        (JSC::JSArrayBufferView::put):
     254        (JSC::JSArrayBufferView::defineOwnProperty):
     255        (JSC::JSArrayBufferView::deleteProperty):
     256        (JSC::JSArrayBufferView::getOwnNonIndexPropertyNames):
     257        (JSC::JSArrayBufferView::finalize):
     258        * runtime/JSArrayBufferView.h: Added.
     259        (JSC::JSArrayBufferView::sizeOf):
     260        (JSC::JSArrayBufferView::ConstructionContext::operator!):
     261        (JSC::JSArrayBufferView::ConstructionContext::structure):
     262        (JSC::JSArrayBufferView::ConstructionContext::vector):
     263        (JSC::JSArrayBufferView::ConstructionContext::length):
     264        (JSC::JSArrayBufferView::ConstructionContext::mode):
     265        (JSC::JSArrayBufferView::ConstructionContext::butterfly):
     266        (JSC::JSArrayBufferView::mode):
     267        (JSC::JSArrayBufferView::vector):
     268        (JSC::JSArrayBufferView::length):
     269        (JSC::JSArrayBufferView::offsetOfVector):
     270        (JSC::JSArrayBufferView::offsetOfLength):
     271        (JSC::JSArrayBufferView::offsetOfMode):
     272        * runtime/JSArrayBufferViewInlines.h: Added.
     273        (JSC::JSArrayBufferView::slowDownAndWasteMemoryIfNecessary):
     274        (JSC::JSArrayBufferView::buffer):
     275        (JSC::JSArrayBufferView::impl):
     276        (JSC::JSArrayBufferView::neuter):
     277        (JSC::JSArrayBufferView::byteOffset):
     278        * runtime/JSCell.cpp:
     279        (JSC::JSCell::slowDownAndWasteMemory):
     280        (JSC::JSCell::getTypedArrayImpl):
     281        * runtime/JSCell.h:
     282        * runtime/JSDataView.cpp: Added.
     283        (JSC::JSDataView::JSDataView):
     284        (JSC::JSDataView::create):
     285        (JSC::JSDataView::createUninitialized):
     286        (JSC::JSDataView::set):
     287        (JSC::JSDataView::typedImpl):
     288        (JSC::JSDataView::getOwnPropertySlot):
     289        (JSC::JSDataView::getOwnPropertyDescriptor):
     290        (JSC::JSDataView::slowDownAndWasteMemory):
     291        (JSC::JSDataView::getTypedArrayImpl):
     292        (JSC::JSDataView::createStructure):
     293        * runtime/JSDataView.h: Added.
     294        * runtime/JSDataViewPrototype.cpp: Added.
     295        (JSC::JSDataViewPrototype::JSDataViewPrototype):
     296        (JSC::JSDataViewPrototype::create):
     297        (JSC::JSDataViewPrototype::createStructure):
     298        (JSC::JSDataViewPrototype::getOwnPropertySlot):
     299        (JSC::JSDataViewPrototype::getOwnPropertyDescriptor):
     300        (JSC::getData):
     301        (JSC::setData):
     302        (JSC::dataViewProtoFuncGetInt8):
     303        (JSC::dataViewProtoFuncGetInt16):
     304        (JSC::dataViewProtoFuncGetInt32):
     305        (JSC::dataViewProtoFuncGetUint8):
     306        (JSC::dataViewProtoFuncGetUint16):
     307        (JSC::dataViewProtoFuncGetUint32):
     308        (JSC::dataViewProtoFuncGetFloat32):
     309        (JSC::dataViewProtoFuncGetFloat64):
     310        (JSC::dataViewProtoFuncSetInt8):
     311        (JSC::dataViewProtoFuncSetInt16):
     312        (JSC::dataViewProtoFuncSetInt32):
     313        (JSC::dataViewProtoFuncSetUint8):
     314        (JSC::dataViewProtoFuncSetUint16):
     315        (JSC::dataViewProtoFuncSetUint32):
     316        (JSC::dataViewProtoFuncSetFloat32):
     317        (JSC::dataViewProtoFuncSetFloat64):
     318        * runtime/JSDataViewPrototype.h: Added.
     319        * runtime/JSFloat32Array.h: Added.
     320        * runtime/JSFloat64Array.h: Added.
     321        * runtime/JSGenericTypedArrayView.h: Added.
     322        (JSC::JSGenericTypedArrayView::byteLength):
     323        (JSC::JSGenericTypedArrayView::byteSize):
     324        (JSC::JSGenericTypedArrayView::typedVector):
     325        (JSC::JSGenericTypedArrayView::canGetIndexQuickly):
     326        (JSC::JSGenericTypedArrayView::canSetIndexQuickly):
     327        (JSC::JSGenericTypedArrayView::getIndexQuicklyAsNativeValue):
     328        (JSC::JSGenericTypedArrayView::getIndexQuicklyAsDouble):
     329        (JSC::JSGenericTypedArrayView::getIndexQuickly):
     330        (JSC::JSGenericTypedArrayView::setIndexQuicklyToNativeValue):
     331        (JSC::JSGenericTypedArrayView::setIndexQuicklyToDouble):
     332        (JSC::JSGenericTypedArrayView::setIndexQuickly):
     333        (JSC::JSGenericTypedArrayView::canAccessRangeQuickly):
     334        (JSC::JSGenericTypedArrayView::typedImpl):
     335        (JSC::JSGenericTypedArrayView::createStructure):
     336        (JSC::JSGenericTypedArrayView::info):
     337        (JSC::toNativeTypedView):
     338        * runtime/JSGenericTypedArrayViewConstructor.h: Added.
     339        * runtime/JSGenericTypedArrayViewConstructorInlines.h: Added.
     340        (JSC::::JSGenericTypedArrayViewConstructor):
     341        (JSC::::finishCreation):
     342        (JSC::::create):
     343        (JSC::::createStructure):
     344        (JSC::constructGenericTypedArrayView):
     345        (JSC::::getConstructData):
     346        (JSC::::getCallData):
     347        * runtime/JSGenericTypedArrayViewInlines.h: Added.
     348        (JSC::::JSGenericTypedArrayView):
     349        (JSC::::create):
     350        (JSC::::createUninitialized):
     351        (JSC::::validateRange):
     352        (JSC::::setWithSpecificType):
     353        (JSC::::set):
     354        (JSC::::getOwnPropertySlot):
     355        (JSC::::getOwnPropertyDescriptor):
     356        (JSC::::put):
     357        (JSC::::defineOwnProperty):
     358        (JSC::::deleteProperty):
     359        (JSC::::getOwnPropertySlotByIndex):
     360        (JSC::::putByIndex):
     361        (JSC::::deletePropertyByIndex):
     362        (JSC::::getOwnNonIndexPropertyNames):
     363        (JSC::::getOwnPropertyNames):
     364        (JSC::::visitChildren):
     365        (JSC::::copyBackingStore):
     366        (JSC::::slowDownAndWasteMemory):
     367        (JSC::::getTypedArrayImpl):
     368        * runtime/JSGenericTypedArrayViewPrototype.h: Added.
     369        * runtime/JSGenericTypedArrayViewPrototypeInlines.h: Added.
     370        (JSC::genericTypedArrayViewProtoFuncSet):
     371        (JSC::genericTypedArrayViewProtoFuncSubarray):
     372        (JSC::::JSGenericTypedArrayViewPrototype):
     373        (JSC::::finishCreation):
     374        (JSC::::create):
     375        (JSC::::createStructure):
     376        * runtime/JSGlobalObject.cpp:
     377        (JSC::JSGlobalObject::reset):
     378        (JSC::JSGlobalObject::visitChildren):
     379        * runtime/JSGlobalObject.h:
     380        (JSC::JSGlobalObject::arrayBufferPrototype):
     381        (JSC::JSGlobalObject::arrayBufferStructure):
     382        (JSC::JSGlobalObject::typedArrayStructure):
     383        * runtime/JSInt16Array.h: Added.
     384        * runtime/JSInt32Array.h: Added.
     385        * runtime/JSInt8Array.h: Added.
     386        * runtime/JSTypedArrayConstructors.cpp: Added.
     387        * runtime/JSTypedArrayConstructors.h: Added.
     388        * runtime/JSTypedArrayPrototypes.cpp: Added.
     389        * runtime/JSTypedArrayPrototypes.h: Added.
     390        * runtime/JSTypedArrays.cpp: Added.
     391        * runtime/JSTypedArrays.h: Added.
     392        * runtime/JSUint16Array.h: Added.
     393        * runtime/JSUint32Array.h: Added.
     394        * runtime/JSUint8Array.h: Added.
     395        * runtime/JSUint8ClampedArray.h: Added.
     396        * runtime/Operations.h:
     397        * runtime/Options.h:
     398        * runtime/SimpleTypedArrayController.cpp: Added.
     399        (JSC::SimpleTypedArrayController::SimpleTypedArrayController):
     400        (JSC::SimpleTypedArrayController::~SimpleTypedArrayController):
     401        (JSC::SimpleTypedArrayController::toJS):
     402        * runtime/SimpleTypedArrayController.h: Added.
     403        * runtime/Structure.h:
     404        (JSC::Structure::couldHaveIndexingHeader):
     405        * runtime/StructureInlines.h:
     406        (JSC::Structure::hasIndexingHeader):
     407        * runtime/TypedArrayAdaptors.h: Added.
     408        (JSC::IntegralTypedArrayAdaptor::toNative):
     409        (JSC::IntegralTypedArrayAdaptor::toJSValue):
     410        (JSC::IntegralTypedArrayAdaptor::toDouble):
     411        (JSC::FloatTypedArrayAdaptor::toNative):
     412        (JSC::FloatTypedArrayAdaptor::toJSValue):
     413        (JSC::FloatTypedArrayAdaptor::toDouble):
     414        (JSC::Uint8ClampedAdaptor::toNative):
     415        (JSC::Uint8ClampedAdaptor::toJSValue):
     416        (JSC::Uint8ClampedAdaptor::toDouble):
     417        (JSC::Uint8ClampedAdaptor::clamp):
     418        * runtime/TypedArrayController.cpp: Added.
     419        (JSC::TypedArrayController::TypedArrayController):
     420        (JSC::TypedArrayController::~TypedArrayController):
     421        * runtime/TypedArrayController.h: Added.
     422        * runtime/TypedArrayDescriptor.h: Removed.
     423        * runtime/TypedArrayInlines.h: Added.
     424        * runtime/TypedArrayType.cpp: Added.
     425        (JSC::classInfoForType):
     426        (WTF::printInternal):
     427        * runtime/TypedArrayType.h: Added.
     428        (JSC::toIndex):
     429        (JSC::isTypedView):
     430        (JSC::elementSize):
     431        (JSC::isInt):
     432        (JSC::isFloat):
     433        (JSC::isSigned):
     434        (JSC::isClamped):
     435        * runtime/TypedArrays.h: Added.
     436        * runtime/Uint16Array.h:
     437        * runtime/Uint32Array.h:
     438        * runtime/Uint8Array.h:
     439        * runtime/Uint8ClampedArray.h:
     440        * runtime/VM.cpp:
     441        (JSC::VM::VM):
     442        (JSC::VM::~VM):
     443        * runtime/VM.h:
     444
    14452013-08-15  Oliver Hunt  <[email protected]>
    2446
  • trunk/Source/JavaScriptCore/DerivedSources.make

    r153223 r154127  
    4242    DatePrototype.lut.h \
    4343    ErrorPrototype.lut.h \
     44    JSDataViewPrototype.lut.h \
    4445    JSONObject.lut.h \
    4546    JSGlobalObject.lut.h \
  • trunk/Source/JavaScriptCore/DerivedSources.pri

    r153744 r154127  
    1414    runtime/DatePrototype.cpp \
    1515    runtime/ErrorPrototype.cpp \
     16    runtime/JSDataViewPrototype.cpp \
    1617    runtime/JSGlobalObject.cpp \
    1718    runtime/JSONObject.cpp \
  • trunk/Source/JavaScriptCore/GNUmakefile.list.am

    r153728 r154127  
    1818        DerivedSources/JavaScriptCore/DatePrototype.lut.h \
    1919        DerivedSources/JavaScriptCore/ErrorPrototype.lut.h \
     20        DerivedSources/JavaScriptCore/JSDataViewPrototype.lut.h \
    2021        DerivedSources/JavaScriptCore/JSGlobalObject.lut.h \
    2122        DerivedSources/JavaScriptCore/JSONObject.lut.h \
     
    385386        Source/JavaScriptCore/heap/DFGCodeBlocks.h \
    386387        Source/JavaScriptCore/heap/GCAssertions.h \
     388        Source/JavaScriptCore/heap/GCIncomingRefCounted.h \
     389        Source/JavaScriptCore/heap/GCIncomingRefCountedInlines.h \
     390        Source/JavaScriptCore/heap/GCIncomingRefCountedSet.h \
     391        Source/JavaScriptCore/heap/GCIncomingRefCountedSetInlines.h \
    387392        Source/JavaScriptCore/heap/Handle.h \
    388393        Source/JavaScriptCore/heap/HandleBlock.h \
     
    686691        Source/JavaScriptCore/runtime/ConstructData.cpp \
    687692        Source/JavaScriptCore/runtime/ConstructData.h \
     693        Source/JavaScriptCore/runtime/DataView.cpp \
     694        Source/JavaScriptCore/runtime/DataView.h \
    688695        Source/JavaScriptCore/runtime/DateConstructor.cpp \
    689696        Source/JavaScriptCore/runtime/DateConstructor.h \
     
    720727        Source/JavaScriptCore/runtime/GCActivityCallback.cpp \
    721728        Source/JavaScriptCore/runtime/GCActivityCallback.h \
     729        Source/JavaScriptCore/runtime/GenericTypedArrayView.h \
     730        Source/JavaScriptCore/runtime/GenericTypedArrayViewInlines.h \
    722731        Source/JavaScriptCore/runtime/GetterSetter.cpp \
    723732        Source/JavaScriptCore/runtime/GetterSetter.h \
     
    745754        Source/JavaScriptCore/runtime/JSArray.cpp \
    746755        Source/JavaScriptCore/runtime/JSArray.h \
     756        Source/JavaScriptCore/runtime/JSArrayBuffer.cpp \
     757        Source/JavaScriptCore/runtime/JSArrayBuffer.h \
     758        Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp \
     759        Source/JavaScriptCore/runtime/JSArrayBufferConstructor.h \
     760        Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp \
     761        Source/JavaScriptCore/runtime/JSArrayBufferPrototype.h \
     762        Source/JavaScriptCore/runtime/JSArrayBufferView.cpp \
     763        Source/JavaScriptCore/runtime/JSArrayBufferView.h \
     764        Source/JavaScriptCore/runtime/JSArrayBufferViewInlines.h \
    747765        Source/JavaScriptCore/runtime/JSCell.cpp \
    748766        Source/JavaScriptCore/runtime/JSCell.h \
     767        Source/JavaScriptCore/runtime/JSDataView.cpp \
     768        Source/JavaScriptCore/runtime/JSDataView.h \
     769        Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp \
     770        Source/JavaScriptCore/runtime/JSDataViewPrototype.h \
    749771        Source/JavaScriptCore/runtime/JSDateMath.cpp \
    750772        Source/JavaScriptCore/runtime/JSCellInlines.h \
    751773        Source/JavaScriptCore/runtime/JSDateMath.h \
    752774        Source/JavaScriptCore/runtime/JSDestructibleObject.h \
     775        Source/JavaScriptCore/runtime/JSFloat32Array.h \
     776        Source/JavaScriptCore/runtime/JSFloat64Array.h \
    753777        Source/JavaScriptCore/runtime/JSFunction.cpp \
    754778        Source/JavaScriptCore/runtime/JSFunction.h \
     
    759783        Source/JavaScriptCore/runtime/VM.h \
    760784        Source/JavaScriptCore/runtime/JSFunctionInlines.h \
     785        Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h \
     786        Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructor.h \
     787        Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h \
     788        Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h \
     789        Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.h \
     790        Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeInlines.h \
    761791        Source/JavaScriptCore/runtime/JSGlobalObject.cpp \
    762792        Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp \
     
    765795        Source/JavaScriptCore/runtime/JSProxy.cpp \
    766796        Source/JavaScriptCore/runtime/JSProxy.h \
     797        Source/JavaScriptCore/runtime/JSInt16Array.h \
     798        Source/JavaScriptCore/runtime/JSInt32Array.h \
     799        Source/JavaScriptCore/runtime/JSInt8Array.h \
    767800        Source/JavaScriptCore/runtime/JSLock.cpp \
    768801        Source/JavaScriptCore/runtime/JSLock.h \
     
    777810        Source/JavaScriptCore/runtime/JSSegmentedVariableObject.cpp \
    778811        Source/JavaScriptCore/runtime/JSSegmentedVariableObject.h \
     812        Source/JavaScriptCore/runtime/JSTypedArrayConstructors.cpp \
     813        Source/JavaScriptCore/runtime/JSTypedArrayConstructors.h \
     814        Source/JavaScriptCore/runtime/JSTypedArrayPrototypes.cpp \
     815        Source/JavaScriptCore/runtime/JSTypedArrayPrototypes.h \
     816        Source/JavaScriptCore/runtime/JSTypedArrays.cpp \
     817        Source/JavaScriptCore/runtime/JSTypedArrays.h \
     818        Source/JavaScriptCore/runtime/JSUint16Array.h \
     819        Source/JavaScriptCore/runtime/JSUint32Array.h \
     820        Source/JavaScriptCore/runtime/JSUint8Array.h \
     821        Source/JavaScriptCore/runtime/JSUint8ClampedArray.h \
    779822        Source/JavaScriptCore/runtime/JSWithScope.cpp \
    780823        Source/JavaScriptCore/runtime/JSNameScope.cpp \
     
    867910        Source/JavaScriptCore/runtime/SamplingCounter.cpp \
    868911        Source/JavaScriptCore/runtime/SamplingCounter.h \
     912        Source/JavaScriptCore/runtime/SimpleTypedArrayController.cpp \
     913        Source/JavaScriptCore/runtime/SimpleTypedArrayController.h \
    869914        Source/JavaScriptCore/runtime/SmallStrings.cpp \
    870915        Source/JavaScriptCore/runtime/SmallStrings.h \
     
    893938        Source/JavaScriptCore/runtime/SymbolTable.h \
    894939        Source/JavaScriptCore/runtime/Tracing.h \
     940        Source/JavaScriptCore/runtime/TypedArrayAdaptors.h \
    895941        Source/JavaScriptCore/runtime/TypedArrayBase.h \
    896         Source/JavaScriptCore/runtime/TypedArrayDescriptor.h \
     942        Source/JavaScriptCore/runtime/TypedArrayController.cpp \
     943        Source/JavaScriptCore/runtime/TypedArrayController.h \
     944        Source/JavaScriptCore/runtime/TypedArrayInlines.h \
     945        Source/JavaScriptCore/runtime/TypedArrayType.cpp \
     946        Source/JavaScriptCore/runtime/TypedArrayType.h \
     947        Source/JavaScriptCore/runtime/TypedArrays.h \
    897948        Source/JavaScriptCore/runtime/Uint16Array.h \
    898949        Source/JavaScriptCore/runtime/Uint16WithFraction.h \
     
    9681019
    9691020Programs_jsc_@WEBKITGTK_API_MAJOR_VERSION@_SOURCES = \
    970         Source/JavaScriptCore/JSCTypedArrayStubs.h \
    9711021        Source/JavaScriptCore/jsc.cpp
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj

    r153728 r154127  
    411411    <ClCompile Include="..\profiler\ProfilerOSRExitSite.cpp" />
    412412    <ClCompile Include="..\profiler\ProfilerProfiledBytecodes.cpp" />
     413    <ClCompile Include="..\runtime\ArgList.cpp" />
     414    <ClCompile Include="..\runtime\Arguments.cpp" />
    413415    <ClCompile Include="..\runtime\ArrayBuffer.cpp" />
    414416    <ClCompile Include="..\runtime\ArrayBufferView.cpp" />
    415     <ClCompile Include="..\runtime\ArgList.cpp" />
    416     <ClCompile Include="..\runtime\Arguments.cpp" />
    417417    <ClCompile Include="..\runtime\ArrayConstructor.cpp" />
    418418    <ClCompile Include="..\runtime\ArrayPrototype.cpp" />
     
    428428    <ClCompile Include="..\runtime\Completion.cpp" />
    429429    <ClCompile Include="..\runtime\ConstructData.cpp" />
     430    <ClCompile Include="..\runtime\DataView.cpp" />
    430431    <ClCompile Include="..\runtime\DateConstructor.cpp" />
    431432    <ClCompile Include="..\runtime\DateConversion.cpp" />
     
    447448    <ClCompile Include="..\runtime\IntendedStructureChain.cpp" />
    448449    <ClCompile Include="..\runtime\InternalFunction.cpp" />
     450    <ClCompile Include="..\runtime\JSAPIValueWrapper.cpp" />
    449451    <ClCompile Include="..\runtime\JSActivation.cpp" />
    450     <ClCompile Include="..\runtime\JSAPIValueWrapper.cpp" />
    451452    <ClCompile Include="..\runtime\JSArray.cpp" />
     453    <ClCompile Include="..\runtime\JSArrayBuffer.cpp" />
     454    <ClCompile Include="..\runtime\JSArrayBufferConstructor.cpp" />
     455    <ClCompile Include="..\runtime\JSArrayBufferPrototype.cpp" />
     456    <ClCompile Include="..\runtime\JSArrayBufferView.cpp" />
    452457    <ClCompile Include="..\runtime\JSBoundFunction.cpp" />
     458    <ClCompile Include="..\runtime\JSCJSValue.cpp" />
    453459    <ClCompile Include="..\runtime\JSCell.cpp" />
    454     <ClCompile Include="..\runtime\JSCJSValue.cpp" />
     460    <ClCompile Include="..\runtime\JSDataView.cpp" />
     461    <ClCompile Include="..\runtime\JSDataViewPrototype.cpp" />
    455462    <ClCompile Include="..\runtime\JSDateMath.cpp" />
    456463    <ClCompile Include="..\runtime\JSFunction.cpp" />
     
    460467    <ClCompile Include="..\runtime\JSNameScope.cpp" />
    461468    <ClCompile Include="..\runtime\JSNotAnObject.cpp" />
     469    <ClCompile Include="..\runtime\JSONObject.cpp" />
    462470    <ClCompile Include="..\runtime\JSObject.cpp" />
    463     <ClCompile Include="..\runtime\JSONObject.cpp" />
    464471    <ClCompile Include="..\runtime\JSPropertyNameIterator.cpp" />
    465472    <ClCompile Include="..\runtime\JSProxy.cpp" />
     
    469476    <ClCompile Include="..\runtime\JSStringJoiner.cpp" />
    470477    <ClCompile Include="..\runtime\JSSymbolTableObject.cpp" />
     478    <ClCompile Include="..\runtime\JSTypedArrayConstructors.cpp" />
     479    <ClCompile Include="..\runtime\JSTypedArrayPrototypes.cpp" />
     480    <ClCompile Include="..\runtime\JSTypedArrays.cpp" />
    471481    <ClCompile Include="..\runtime\JSVariableObject.cpp" />
    472482    <ClCompile Include="..\runtime\JSWithScope.cpp" />
     
    500510    <ClCompile Include="..\runtime\RegExpPrototype.cpp" />
    501511    <ClCompile Include="..\runtime\SamplingCounter.cpp" />
     512    <ClCompile Include="..\runtime\SimpleTypedArrayController.cpp" />
    502513    <ClCompile Include="..\runtime\SmallStrings.cpp" />
    503514    <ClCompile Include="..\runtime\SparseArrayValueMap.cpp" />
     
    511522    <ClCompile Include="..\runtime\StructureRareData.cpp" />
    512523    <ClCompile Include="..\runtime\SymbolTable.cpp" />
     524    <ClCompile Include="..\runtime\TypedArrayController.cpp" />
     525    <ClCompile Include="..\runtime\TypedArrayType.cpp" />
    513526    <ClCompile Include="..\runtime\VM.cpp" />
    514527    <ClCompile Include="..\runtime\Watchdog.cpp" />
     
    528541    <ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\ErrorPrototype.lut.h" />
    529542    <ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\HeaderDetection.h" />
     543    <ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSDataViewPrototype.lut.h" />
    530544    <ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSGlobalObject.lut.h" />
    531545    <ClInclude Include="$(ConfigurationBuildDir)\obj32\$(ProjectName)\DerivedSources\JSONObject.lut.h" />
     
    774788    <ClInclude Include="..\profiler\ProfilerOSRExitSite.h" />
    775789    <ClInclude Include="..\profiler\ProfilerProfiledBytecodes.h" />
     790    <ClInclude Include="..\runtime\ArgList.h" />
     791    <ClInclude Include="..\runtime\Arguments.h" />
    776792    <ClInclude Include="..\runtime\ArrayBuffer.h" />
    777793    <ClInclude Include="..\runtime\ArrayBufferView.h" />
    778     <ClInclude Include="..\runtime\ArgList.h" />
    779     <ClInclude Include="..\runtime\Arguments.h" />
    780794    <ClInclude Include="..\runtime\ArrayConstructor.h" />
    781795    <ClInclude Include="..\runtime\ArrayConventions.h" />
     
    799813    <ClInclude Include="..\runtime\Completion.h" />
    800814    <ClInclude Include="..\runtime\ConstructData.h" />
     815    <ClInclude Include="..\runtime\DataView.h" />
    801816    <ClInclude Include="..\runtime\DateConstructor.h" />
    802817    <ClInclude Include="..\runtime\DateConversion.h" />
     
    816831    <ClInclude Include="..\runtime\FunctionPrototype.h" />
    817832    <ClInclude Include="..\runtime\GCActivityCallback.h" />
     833    <ClInclude Include="..\runtime\GenericTypedArrayView.h" />
     834    <ClInclude Include="..\runtime\GenericTypedArrayViewInlines.h" />
    818835    <ClInclude Include="..\runtime\GetterSetter.h" />
    819836    <ClInclude Include="..\runtime\Identifier.h" />
     
    828845    <ClInclude Include="..\runtime\InternalFunction.h" />
    829846    <ClInclude Include="..\runtime\Intrinsic.h" />
     847    <ClInclude Include="..\runtime\JSAPIValueWrapper.h" />
    830848    <ClInclude Include="..\runtime\JSActivation.h" />
    831     <ClInclude Include="..\runtime\JSAPIValueWrapper.h" />
    832849    <ClInclude Include="..\runtime\JSArray.h" />
     850    <ClInclude Include="..\runtime\JSArrayBuffer.h" />
     851    <ClInclude Include="..\runtime\JSArrayBufferConstructor.h" />
     852    <ClInclude Include="..\runtime\JSArrayBufferPrototype.h" />
     853    <ClInclude Include="..\runtime\JSArrayBufferView.h" />
     854    <ClInclude Include="..\runtime\JSArrayBufferViewInlines.h" />
    833855    <ClInclude Include="..\runtime\JSBoundFunction.h" />
    834     <ClInclude Include="..\runtime\JSCell.h" />
    835856    <ClInclude Include="..\runtime\JSCJSValue.h" />
    836857    <ClInclude Include="..\runtime\JSCJSValueInlines.h" />
     858    <ClInclude Include="..\runtime\JSCell.h" />
     859    <ClInclude Include="..\runtime\JSDataView.h" />
     860    <ClInclude Include="..\runtime\JSDataViewPrototype.h" />
    837861    <ClInclude Include="..\runtime\JSDateMath.h" />
    838862    <ClInclude Include="..\runtime\JSDestructibleObject.h" />
    839863    <ClInclude Include="..\runtime\JSExportMacros.h" />
     864    <ClInclude Include="..\runtime\JSFloat32Array.h" />
     865    <ClInclude Include="..\runtime\JSFloat64Array.h" />
    840866    <ClInclude Include="..\runtime\JSFunction.h" />
     867    <ClInclude Include="..\runtime\JSGenericTypedArrayView.h" />
     868    <ClInclude Include="..\runtime\JSGenericTypedArrayViewConstructor.h" />
     869    <ClInclude Include="..\runtime\JSGenericTypedArrayViewConstructorInlines.h" />
     870    <ClInclude Include="..\runtime\JSGenericTypedArrayViewInlines.h" />
     871    <ClInclude Include="..\runtime\JSGenericTypedArrayViewPrototype.h" />
     872    <ClInclude Include="..\runtime\JSGenericTypedArrayViewPrototypeInlines.h" />
    841873    <ClInclude Include="..\runtime\JSGlobalObject.h" />
    842874    <ClInclude Include="..\runtime\JSGlobalObjectFunctions.h" />
     875    <ClInclude Include="..\runtime\JSInt16Array.h" />
     876    <ClInclude Include="..\runtime\JSInt32Array.h" />
     877    <ClInclude Include="..\runtime\JSInt8Array.h" />
    843878    <ClInclude Include="..\runtime\JSLock.h" />
    844879    <ClInclude Include="..\runtime\JSNameScope.h" />
    845880    <ClInclude Include="..\runtime\JSNotAnObject.h" />
     881    <ClInclude Include="..\runtime\JSONObject.h" />
    846882    <ClInclude Include="..\runtime\JSObject.h" />
    847     <ClInclude Include="..\runtime\JSONObject.h" />
    848883    <ClInclude Include="..\runtime\JSPropertyNameIterator.h" />
    849884    <ClInclude Include="..\runtime\JSProxy.h" />
     
    856891    <ClInclude Include="..\runtime\JSType.h" />
    857892    <ClInclude Include="..\runtime\JSTypeInfo.h" />
     893    <ClInclude Include="..\runtime\JSTypedArrayConstructors.h" />
     894    <ClInclude Include="..\runtime\JSTypedArrayPrototypes.h" />
     895    <ClInclude Include="..\runtime\JSTypedArrays.h" />
     896    <ClInclude Include="..\runtime\JSUint16Array.h" />
     897    <ClInclude Include="..\runtime\JSUint32Array.h" />
     898    <ClInclude Include="..\runtime\JSUint8Array.h" />
     899    <ClInclude Include="..\runtime\JSUint8ClampedArray.h" />
    858900    <ClInclude Include="..\runtime\JSVariableObject.h" />
    859901    <ClInclude Include="..\runtime\JSWithScope.h" />
     
    898940    <ClInclude Include="..\runtime\Reject.h" />
    899941    <ClInclude Include="..\runtime\SamplingCounter.h" />
     942    <ClInclude Include="..\runtime\SimpleTypedArrayController.h" />
    900943    <ClInclude Include="..\runtime\SmallStrings.h" />
    901944    <ClInclude Include="..\runtime\SparseArrayValueMap.h" />
     
    912955    <ClInclude Include="..\runtime\SymbolTable.h" />
    913956    <ClInclude Include="..\runtime\Tracing.h" />
    914     <ClInclude Include="..\runtime\TypedArrayDescriptor.h" />
     957    <ClInclude Include="..\runtime\TypedArrayAdaptors.h" />
     958    <ClInclude Include="..\runtime\TypedArrayController.h" />
     959    <ClInclude Include="..\runtime\TypedArrayInlines.h" />
     960    <ClInclude Include="..\runtime\TypedArrayType.h" />
     961    <ClInclude Include="..\runtime\TypedArrays.h" />
    915962    <ClInclude Include="..\runtime\Uint16Array.h" />
    916963    <ClInclude Include="..\runtime\Uint16WithFraction.h" />
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r153728 r154127  
    119119                0F242DA713F3B1E8007ADD4C /* WeakReferenceHarvester.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F242DA513F3B1BB007ADD4C /* WeakReferenceHarvester.h */; settings = {ATTRIBUTES = (Private, ); }; };
    120120                0F256C361627B0AD007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F256C341627B0AA007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
     121                0F2B66AC17B6B53F00A7AE3F /* GCIncomingRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66A817B6B53D00A7AE3F /* GCIncomingRefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; };
     122                0F2B66AD17B6B54500A7AE3F /* GCIncomingRefCountedInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66A917B6B53D00A7AE3F /* GCIncomingRefCountedInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
     123                0F2B66AE17B6B54500A7AE3F /* GCIncomingRefCountedSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66AA17B6B53D00A7AE3F /* GCIncomingRefCountedSet.h */; settings = {ATTRIBUTES = (Private, ); }; };
     124                0F2B66AF17B6B54500A7AE3F /* GCIncomingRefCountedSetInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66AB17B6B53D00A7AE3F /* GCIncomingRefCountedSetInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
     125                0F2B66DE17B6B5AB00A7AE3F /* DataView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66B017B6B5AB00A7AE3F /* DataView.cpp */; };
     126                0F2B66DF17B6B5AB00A7AE3F /* DataView.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66B117B6B5AB00A7AE3F /* DataView.h */; settings = {ATTRIBUTES = (Private, ); }; };
     127                0F2B66E017B6B5AB00A7AE3F /* GenericTypedArrayView.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66B217B6B5AB00A7AE3F /* GenericTypedArrayView.h */; settings = {ATTRIBUTES = (Private, ); }; };
     128                0F2B66E117B6B5AB00A7AE3F /* GenericTypedArrayViewInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66B317B6B5AB00A7AE3F /* GenericTypedArrayViewInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
     129                0F2B66E217B6B5AB00A7AE3F /* JSArrayBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66B417B6B5AB00A7AE3F /* JSArrayBuffer.cpp */; };
     130                0F2B66E317B6B5AB00A7AE3F /* JSArrayBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66B517B6B5AB00A7AE3F /* JSArrayBuffer.h */; settings = {ATTRIBUTES = (Private, ); }; };
     131                0F2B66E417B6B5AB00A7AE3F /* JSArrayBufferConstructor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66B617B6B5AB00A7AE3F /* JSArrayBufferConstructor.cpp */; };
     132                0F2B66E517B6B5AB00A7AE3F /* JSArrayBufferConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66B717B6B5AB00A7AE3F /* JSArrayBufferConstructor.h */; settings = {ATTRIBUTES = (Private, ); }; };
     133                0F2B66E617B6B5AB00A7AE3F /* JSArrayBufferPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66B817B6B5AB00A7AE3F /* JSArrayBufferPrototype.cpp */; };
     134                0F2B66E717B6B5AB00A7AE3F /* JSArrayBufferPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66B917B6B5AB00A7AE3F /* JSArrayBufferPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; };
     135                0F2B66E817B6B5AB00A7AE3F /* JSArrayBufferView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66BA17B6B5AB00A7AE3F /* JSArrayBufferView.cpp */; };
     136                0F2B66E917B6B5AB00A7AE3F /* JSArrayBufferView.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66BB17B6B5AB00A7AE3F /* JSArrayBufferView.h */; settings = {ATTRIBUTES = (Private, ); }; };
     137                0F2B66EA17B6B5AB00A7AE3F /* JSArrayBufferViewInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66BC17B6B5AB00A7AE3F /* JSArrayBufferViewInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
     138                0F2B66EB17B6B5AB00A7AE3F /* JSDataView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66BD17B6B5AB00A7AE3F /* JSDataView.cpp */; };
     139                0F2B66EC17B6B5AB00A7AE3F /* JSDataView.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66BE17B6B5AB00A7AE3F /* JSDataView.h */; settings = {ATTRIBUTES = (Private, ); }; };
     140                0F2B66ED17B6B5AB00A7AE3F /* JSDataViewPrototype.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66BF17B6B5AB00A7AE3F /* JSDataViewPrototype.cpp */; };
     141                0F2B66EE17B6B5AB00A7AE3F /* JSDataViewPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66C017B6B5AB00A7AE3F /* JSDataViewPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; };
     142                0F2B66EF17B6B5AB00A7AE3F /* JSFloat32Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66C117B6B5AB00A7AE3F /* JSFloat32Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
     143                0F2B66F017B6B5AB00A7AE3F /* JSFloat64Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66C217B6B5AB00A7AE3F /* JSFloat64Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
     144                0F2B66F117B6B5AB00A7AE3F /* JSGenericTypedArrayView.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66C317B6B5AB00A7AE3F /* JSGenericTypedArrayView.h */; settings = {ATTRIBUTES = (Private, ); }; };
     145                0F2B66F217B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66C417B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructor.h */; settings = {ATTRIBUTES = (Private, ); }; };
     146                0F2B66F317B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructorInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66C517B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructorInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
     147                0F2B66F417B6B5AB00A7AE3F /* JSGenericTypedArrayViewInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66C617B6B5AB00A7AE3F /* JSGenericTypedArrayViewInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
     148                0F2B66F517B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66C717B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototype.h */; settings = {ATTRIBUTES = (Private, ); }; };
     149                0F2B66F617B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototypeInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66C817B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototypeInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
     150                0F2B66F717B6B5AB00A7AE3F /* JSInt8Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66C917B6B5AB00A7AE3F /* JSInt8Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
     151                0F2B66F817B6B5AB00A7AE3F /* JSInt16Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66CA17B6B5AB00A7AE3F /* JSInt16Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
     152                0F2B66F917B6B5AB00A7AE3F /* JSInt32Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66CB17B6B5AB00A7AE3F /* JSInt32Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
     153                0F2B66FA17B6B5AB00A7AE3F /* JSTypedArrayConstructors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66CC17B6B5AB00A7AE3F /* JSTypedArrayConstructors.cpp */; };
     154                0F2B66FB17B6B5AB00A7AE3F /* JSTypedArrayConstructors.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66CD17B6B5AB00A7AE3F /* JSTypedArrayConstructors.h */; settings = {ATTRIBUTES = (Private, ); }; };
     155                0F2B66FC17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66CE17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.cpp */; };
     156                0F2B66FD17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66CF17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
     157                0F2B66FE17B6B5AB00A7AE3F /* JSTypedArrays.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66D017B6B5AB00A7AE3F /* JSTypedArrays.cpp */; };
     158                0F2B66FF17B6B5AB00A7AE3F /* JSTypedArrays.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66D117B6B5AB00A7AE3F /* JSTypedArrays.h */; settings = {ATTRIBUTES = (Private, ); }; };
     159                0F2B670017B6B5AB00A7AE3F /* JSUint8Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66D217B6B5AB00A7AE3F /* JSUint8Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
     160                0F2B670117B6B5AB00A7AE3F /* JSUint8ClampedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66D317B6B5AB00A7AE3F /* JSUint8ClampedArray.h */; settings = {ATTRIBUTES = (Private, ); }; };
     161                0F2B670217B6B5AB00A7AE3F /* JSUint16Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66D417B6B5AB00A7AE3F /* JSUint16Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
     162                0F2B670317B6B5AB00A7AE3F /* JSUint32Array.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66D517B6B5AB00A7AE3F /* JSUint32Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
     163                0F2B670417B6B5AB00A7AE3F /* SimpleTypedArrayController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66D617B6B5AB00A7AE3F /* SimpleTypedArrayController.cpp */; };
     164                0F2B670517B6B5AB00A7AE3F /* SimpleTypedArrayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66D717B6B5AB00A7AE3F /* SimpleTypedArrayController.h */; settings = {ATTRIBUTES = (Private, ); }; };
     165                0F2B670617B6B5AB00A7AE3F /* TypedArrayAdaptors.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66D817B6B5AB00A7AE3F /* TypedArrayAdaptors.h */; settings = {ATTRIBUTES = (Private, ); }; };
     166                0F2B670717B6B5AB00A7AE3F /* TypedArrayController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66D917B6B5AB00A7AE3F /* TypedArrayController.cpp */; };
     167                0F2B670817B6B5AB00A7AE3F /* TypedArrayController.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66DA17B6B5AB00A7AE3F /* TypedArrayController.h */; settings = {ATTRIBUTES = (Private, ); }; };
     168                0F2B670917B6B5AB00A7AE3F /* TypedArrays.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66DB17B6B5AB00A7AE3F /* TypedArrays.h */; settings = {ATTRIBUTES = (Private, ); }; };
     169                0F2B670A17B6B5AB00A7AE3F /* TypedArrayType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2B66DC17B6B5AB00A7AE3F /* TypedArrayType.cpp */; };
     170                0F2B670B17B6B5AB00A7AE3F /* TypedArrayType.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66DD17B6B5AB00A7AE3F /* TypedArrayType.h */; settings = {ATTRIBUTES = (Private, ); }; };
    121171                0F2BDC15151C5D4D00CD8910 /* DFGFixupPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F2BDC12151C5D4A00CD8910 /* DFGFixupPhase.cpp */; };
    122172                0F2BDC16151C5D4F00CD8910 /* DFGFixupPhase.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2BDC13151C5D4A00CD8910 /* DFGFixupPhase.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    167217                0F4680D514BBD24B00BFE272 /* HostCallReturnValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4680D114BBC5F800BFE272 /* HostCallReturnValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
    168218                0F493AFA16D0CAD30084508B /* SourceProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F493AF816D0CAD10084508B /* SourceProvider.cpp */; };
     219                0F4B94DC17B9F07500DD03A4 /* TypedArrayInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F4B94DB17B9F07500DD03A4 /* TypedArrayInlines.h */; settings = {ATTRIBUTES = (Private, ); }; };
    169220                0F5541B11613C1FB00CE3E25 /* SpecialPointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5541AF1613C1FB00CE3E25 /* SpecialPointer.cpp */; };
    170221                0F5541B21613C1FB00CE3E25 /* SpecialPointer.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5541B01613C1FB00CE3E25 /* SpecialPointer.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    350401                0FEA0A33170D40BF00BB722C /* DFGJITCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEA0A2F170D40BF00BB722C /* DFGJITCode.cpp */; };
    351402                0FEA0A34170D40BF00BB722C /* DFGJITCode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEA0A30170D40BF00BB722C /* DFGJITCode.h */; settings = {ATTRIBUTES = (Private, ); }; };
    352                 0FEB3ECD16237F4D00AB67AD /* TypedArrayDescriptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FEB3ECB16237F4700AB67AD /* TypedArrayDescriptor.h */; settings = {ATTRIBUTES = (Private, ); }; };
    353403                0FEB3ECF16237F6C00AB67AD /* MacroAssembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEB3ECE16237F6700AB67AD /* MacroAssembler.cpp */; };
    354404                0FEFC9AA1681A3B300567F53 /* DFGOSRExitJumpPlaceholder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FEFC9A71681A3B000567F53 /* DFGOSRExitJumpPlaceholder.cpp */; };
     
    825875                A7A8AF3B17ADB5F3005AB174 /* Int16Array.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A8AF2C17ADB5F3005AB174 /* Int16Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
    826876                A7A8AF3C17ADB5F3005AB174 /* Int32Array.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A8AF2D17ADB5F3005AB174 /* Int32Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
    827                 A7A8AF3D17ADB5F3005AB174 /* IntegralTypedArrayBase.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A8AF2E17ADB5F3005AB174 /* IntegralTypedArrayBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
    828                 A7A8AF3E17ADB5F3005AB174 /* TypedArrayBase.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A8AF2F17ADB5F3005AB174 /* TypedArrayBase.h */; settings = {ATTRIBUTES = (Private, ); }; };
    829877                A7A8AF3F17ADB5F3005AB174 /* Uint8Array.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A8AF3017ADB5F3005AB174 /* Uint8Array.h */; settings = {ATTRIBUTES = (Private, ); }; };
    830878                A7A8AF4017ADB5F3005AB174 /* Uint8ClampedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = A7A8AF3117ADB5F3005AB174 /* Uint8ClampedArray.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    12081256                0F242DA513F3B1BB007ADD4C /* WeakReferenceHarvester.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WeakReferenceHarvester.h; sourceTree = "<group>"; };
    12091257                0F256C341627B0AA007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCallArrayAllocatorSlowPathGenerator.h; path = dfg/DFGCallArrayAllocatorSlowPathGenerator.h; sourceTree = "<group>"; };
     1258                0F2B66A817B6B53D00A7AE3F /* GCIncomingRefCounted.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GCIncomingRefCounted.h; sourceTree = "<group>"; };
     1259                0F2B66A917B6B53D00A7AE3F /* GCIncomingRefCountedInlines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GCIncomingRefCountedInlines.h; sourceTree = "<group>"; };
     1260                0F2B66AA17B6B53D00A7AE3F /* GCIncomingRefCountedSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GCIncomingRefCountedSet.h; sourceTree = "<group>"; };
     1261                0F2B66AB17B6B53D00A7AE3F /* GCIncomingRefCountedSetInlines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GCIncomingRefCountedSetInlines.h; sourceTree = "<group>"; };
     1262                0F2B66B017B6B5AB00A7AE3F /* DataView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataView.cpp; sourceTree = "<group>"; };
     1263                0F2B66B117B6B5AB00A7AE3F /* DataView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataView.h; sourceTree = "<group>"; };
     1264                0F2B66B217B6B5AB00A7AE3F /* GenericTypedArrayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericTypedArrayView.h; sourceTree = "<group>"; };
     1265                0F2B66B317B6B5AB00A7AE3F /* GenericTypedArrayViewInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericTypedArrayViewInlines.h; sourceTree = "<group>"; };
     1266                0F2B66B417B6B5AB00A7AE3F /* JSArrayBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSArrayBuffer.cpp; sourceTree = "<group>"; };
     1267                0F2B66B517B6B5AB00A7AE3F /* JSArrayBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBuffer.h; sourceTree = "<group>"; };
     1268                0F2B66B617B6B5AB00A7AE3F /* JSArrayBufferConstructor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSArrayBufferConstructor.cpp; sourceTree = "<group>"; };
     1269                0F2B66B717B6B5AB00A7AE3F /* JSArrayBufferConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferConstructor.h; sourceTree = "<group>"; };
     1270                0F2B66B817B6B5AB00A7AE3F /* JSArrayBufferPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSArrayBufferPrototype.cpp; sourceTree = "<group>"; };
     1271                0F2B66B917B6B5AB00A7AE3F /* JSArrayBufferPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferPrototype.h; sourceTree = "<group>"; };
     1272                0F2B66BA17B6B5AB00A7AE3F /* JSArrayBufferView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSArrayBufferView.cpp; sourceTree = "<group>"; };
     1273                0F2B66BB17B6B5AB00A7AE3F /* JSArrayBufferView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferView.h; sourceTree = "<group>"; };
     1274                0F2B66BC17B6B5AB00A7AE3F /* JSArrayBufferViewInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferViewInlines.h; sourceTree = "<group>"; };
     1275                0F2B66BD17B6B5AB00A7AE3F /* JSDataView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDataView.cpp; sourceTree = "<group>"; };
     1276                0F2B66BE17B6B5AB00A7AE3F /* JSDataView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDataView.h; sourceTree = "<group>"; };
     1277                0F2B66BF17B6B5AB00A7AE3F /* JSDataViewPrototype.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDataViewPrototype.cpp; sourceTree = "<group>"; };
     1278                0F2B66C017B6B5AB00A7AE3F /* JSDataViewPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDataViewPrototype.h; sourceTree = "<group>"; };
     1279                0F2B66C117B6B5AB00A7AE3F /* JSFloat32Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFloat32Array.h; sourceTree = "<group>"; };
     1280                0F2B66C217B6B5AB00A7AE3F /* JSFloat64Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSFloat64Array.h; sourceTree = "<group>"; };
     1281                0F2B66C317B6B5AB00A7AE3F /* JSGenericTypedArrayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGenericTypedArrayView.h; sourceTree = "<group>"; };
     1282                0F2B66C417B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGenericTypedArrayViewConstructor.h; sourceTree = "<group>"; };
     1283                0F2B66C517B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructorInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGenericTypedArrayViewConstructorInlines.h; sourceTree = "<group>"; };
     1284                0F2B66C617B6B5AB00A7AE3F /* JSGenericTypedArrayViewInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGenericTypedArrayViewInlines.h; sourceTree = "<group>"; };
     1285                0F2B66C717B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGenericTypedArrayViewPrototype.h; sourceTree = "<group>"; };
     1286                0F2B66C817B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototypeInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGenericTypedArrayViewPrototypeInlines.h; sourceTree = "<group>"; };
     1287                0F2B66C917B6B5AB00A7AE3F /* JSInt8Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInt8Array.h; sourceTree = "<group>"; };
     1288                0F2B66CA17B6B5AB00A7AE3F /* JSInt16Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInt16Array.h; sourceTree = "<group>"; };
     1289                0F2B66CB17B6B5AB00A7AE3F /* JSInt32Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInt32Array.h; sourceTree = "<group>"; };
     1290                0F2B66CC17B6B5AB00A7AE3F /* JSTypedArrayConstructors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTypedArrayConstructors.cpp; sourceTree = "<group>"; };
     1291                0F2B66CD17B6B5AB00A7AE3F /* JSTypedArrayConstructors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTypedArrayConstructors.h; sourceTree = "<group>"; };
     1292                0F2B66CE17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTypedArrayPrototypes.cpp; sourceTree = "<group>"; };
     1293                0F2B66CF17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTypedArrayPrototypes.h; sourceTree = "<group>"; };
     1294                0F2B66D017B6B5AB00A7AE3F /* JSTypedArrays.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTypedArrays.cpp; sourceTree = "<group>"; };
     1295                0F2B66D117B6B5AB00A7AE3F /* JSTypedArrays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSTypedArrays.h; sourceTree = "<group>"; };
     1296                0F2B66D217B6B5AB00A7AE3F /* JSUint8Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSUint8Array.h; sourceTree = "<group>"; };
     1297                0F2B66D317B6B5AB00A7AE3F /* JSUint8ClampedArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSUint8ClampedArray.h; sourceTree = "<group>"; };
     1298                0F2B66D417B6B5AB00A7AE3F /* JSUint16Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSUint16Array.h; sourceTree = "<group>"; };
     1299                0F2B66D517B6B5AB00A7AE3F /* JSUint32Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSUint32Array.h; sourceTree = "<group>"; };
     1300                0F2B66D617B6B5AB00A7AE3F /* SimpleTypedArrayController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SimpleTypedArrayController.cpp; sourceTree = "<group>"; };
     1301                0F2B66D717B6B5AB00A7AE3F /* SimpleTypedArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleTypedArrayController.h; sourceTree = "<group>"; };
     1302                0F2B66D817B6B5AB00A7AE3F /* TypedArrayAdaptors.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedArrayAdaptors.h; sourceTree = "<group>"; };
     1303                0F2B66D917B6B5AB00A7AE3F /* TypedArrayController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TypedArrayController.cpp; sourceTree = "<group>"; };
     1304                0F2B66DA17B6B5AB00A7AE3F /* TypedArrayController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedArrayController.h; sourceTree = "<group>"; };
     1305                0F2B66DB17B6B5AB00A7AE3F /* TypedArrays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedArrays.h; sourceTree = "<group>"; };
     1306                0F2B66DC17B6B5AB00A7AE3F /* TypedArrayType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TypedArrayType.cpp; sourceTree = "<group>"; };
     1307                0F2B66DD17B6B5AB00A7AE3F /* TypedArrayType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedArrayType.h; sourceTree = "<group>"; };
    12101308                0F2BDC12151C5D4A00CD8910 /* DFGFixupPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGFixupPhase.cpp; path = dfg/DFGFixupPhase.cpp; sourceTree = "<group>"; };
    12111309                0F2BDC13151C5D4A00CD8910 /* DFGFixupPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGFixupPhase.h; path = dfg/DFGFixupPhase.h; sourceTree = "<group>"; };
     
    12551353                0F4680D114BBC5F800BFE272 /* HostCallReturnValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HostCallReturnValue.h; sourceTree = "<group>"; };
    12561354                0F493AF816D0CAD10084508B /* SourceProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SourceProvider.cpp; sourceTree = "<group>"; };
     1355                0F4B94DB17B9F07500DD03A4 /* TypedArrayInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedArrayInlines.h; sourceTree = "<group>"; };
    12571356                0F5541AF1613C1FB00CE3E25 /* SpecialPointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpecialPointer.cpp; sourceTree = "<group>"; };
    12581357                0F5541B01613C1FB00CE3E25 /* SpecialPointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpecialPointer.h; sourceTree = "<group>"; };
     
    14521551                0FEA0A2F170D40BF00BB722C /* DFGJITCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGJITCode.cpp; path = dfg/DFGJITCode.cpp; sourceTree = "<group>"; };
    14531552                0FEA0A30170D40BF00BB722C /* DFGJITCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGJITCode.h; path = dfg/DFGJITCode.h; sourceTree = "<group>"; };
    1454                 0FEB3ECB16237F4700AB67AD /* TypedArrayDescriptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedArrayDescriptor.h; sourceTree = "<group>"; };
    14551553                0FEB3ECE16237F6700AB67AD /* MacroAssembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MacroAssembler.cpp; sourceTree = "<group>"; };
    14561554                0FEFC9A71681A3B000567F53 /* DFGOSRExitJumpPlaceholder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGOSRExitJumpPlaceholder.cpp; path = dfg/DFGOSRExitJumpPlaceholder.cpp; sourceTree = "<group>"; };
     
    18831981                A767B5B317A0B9650063D940 /* DFGLoopPreHeaderCreationPhase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGLoopPreHeaderCreationPhase.cpp; path = dfg/DFGLoopPreHeaderCreationPhase.cpp; sourceTree = "<group>"; };
    18841982                A767B5B417A0B9650063D940 /* DFGLoopPreHeaderCreationPhase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGLoopPreHeaderCreationPhase.h; path = dfg/DFGLoopPreHeaderCreationPhase.h; sourceTree = "<group>"; };
    1885                 A767FF9F14F4502900789059 /* JSCTypedArrayStubs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCTypedArrayStubs.h; sourceTree = "<group>"; };
    18861983                A76C51741182748D00715B05 /* JSInterfaceJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInterfaceJIT.h; sourceTree = "<group>"; };
    18871984                A76F54A213B28AAB00EF2BCE /* JITWriteBarrier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITWriteBarrier.h; sourceTree = "<group>"; };
     
    19282025                A7A8AF2C17ADB5F3005AB174 /* Int16Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Int16Array.h; sourceTree = "<group>"; };
    19292026                A7A8AF2D17ADB5F3005AB174 /* Int32Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Int32Array.h; sourceTree = "<group>"; };
    1930                 A7A8AF2E17ADB5F3005AB174 /* IntegralTypedArrayBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntegralTypedArrayBase.h; sourceTree = "<group>"; };
    1931                 A7A8AF2F17ADB5F3005AB174 /* TypedArrayBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypedArrayBase.h; sourceTree = "<group>"; };
    19322027                A7A8AF3017ADB5F3005AB174 /* Uint8Array.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Uint8Array.h; sourceTree = "<group>"; };
    19332028                A7A8AF3117ADB5F3005AB174 /* Uint8ClampedArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Uint8ClampedArray.h; sourceTree = "<group>"; };
     
    22612356                                F68EBB8C0255D4C601FF60F7 /* config.h */,
    22622357                                F5C290E60284F98E018635CA /* JavaScriptCorePrefix.h */,
    2263                                 A767FF9F14F4502900789059 /* JSCTypedArrayStubs.h */,
    22642358                                937B63CC09E766D200A671DD /* DerivedSources.make */,
    22652359                                A7C225CC139981F100FF1662 /* KeywordLookupGenerator.py */,
     
    25572651                                0F2C556E14738F2E00121E4F /* DFGCodeBlocks.h */,
    25582652                                BCBE2CAD14E985AA000593AD /* GCAssertions.h */,
     2653                                0F2B66A817B6B53D00A7AE3F /* GCIncomingRefCounted.h */,
     2654                                0F2B66A917B6B53D00A7AE3F /* GCIncomingRefCountedInlines.h */,
     2655                                0F2B66AA17B6B53D00A7AE3F /* GCIncomingRefCountedSet.h */,
     2656                                0F2B66AB17B6B53D00A7AE3F /* GCIncomingRefCountedSetInlines.h */,
    25592657                                C2239D1516262BDD005AC5FD /* GCThread.cpp */,
    25602658                                C2239D1616262BDD005AC5FD /* GCThread.h */,
     
    28742972                                BCA62DFF0E2826310004F30D /* ConstructData.cpp */,
    28752973                                BC8F3CCF0DAF17BA00577A80 /* ConstructData.h */,
     2974                                0F2B66B017B6B5AB00A7AE3F /* DataView.cpp */,
     2975                                0F2B66B117B6B5AB00A7AE3F /* DataView.h */,
    28762976                                BCD203450E17135E002C7E82 /* DateConstructor.cpp */,
    28772977                                BCD203460E17135E002C7E82 /* DateConstructor.h */,
     
    29083008                                C2D58C3315912FEE0021A844 /* GCActivityCallback.cpp */,
    29093009                                DDF7ABD211F60ED200108E36 /* GCActivityCallback.h */,
     3010                                0F2B66B217B6B5AB00A7AE3F /* GenericTypedArrayView.h */,
     3011                                0F2B66B317B6B5AB00A7AE3F /* GenericTypedArrayViewInlines.h */,
    29103012                                BC02E9B80E184545000F9297 /* GetterSetter.cpp */,
    29113013                                BC337BDE0E1AF0B80076918A /* GetterSetter.h */,
     
    29213023                                A7A8AF2D17ADB5F3005AB174 /* Int32Array.h */,
    29223024                                A7A8AF2B17ADB5F3005AB174 /* Int8Array.h */,
    2923                                 A7A8AF2E17ADB5F3005AB174 /* IntegralTypedArrayBase.h */,
    29243025                                A78853F717972629001440E4 /* IntendedStructureChain.cpp */,
    29253026                                A78853F817972629001440E4 /* IntendedStructureChain.h */,
     
    29313032                                93ADFCE60CCBD7AC00D30B08 /* JSArray.cpp */,
    29323033                                938772E5038BFE19008635CE /* JSArray.h */,
     3034                                0F2B66B417B6B5AB00A7AE3F /* JSArrayBuffer.cpp */,
     3035                                0F2B66B517B6B5AB00A7AE3F /* JSArrayBuffer.h */,
     3036                                0F2B66B617B6B5AB00A7AE3F /* JSArrayBufferConstructor.cpp */,
     3037                                0F2B66B717B6B5AB00A7AE3F /* JSArrayBufferConstructor.h */,
     3038                                0F2B66B817B6B5AB00A7AE3F /* JSArrayBufferPrototype.cpp */,
     3039                                0F2B66B917B6B5AB00A7AE3F /* JSArrayBufferPrototype.h */,
     3040                                0F2B66BA17B6B5AB00A7AE3F /* JSArrayBufferView.cpp */,
     3041                                0F2B66BB17B6B5AB00A7AE3F /* JSArrayBufferView.h */,
     3042                                0F2B66BC17B6B5AB00A7AE3F /* JSArrayBufferViewInlines.h */,
    29333043                                86FA9E8F142BBB2D001773B7 /* JSBoundFunction.cpp */,
    29343044                                86FA9E90142BBB2E001773B7 /* JSBoundFunction.h */,
     
    29393049                                14ABB36E099C076400E2A24F /* JSCJSValue.h */,
    29403050                                865A30F0135007E100CDB49E /* JSCJSValueInlines.h */,
     3051                                0F2B66BD17B6B5AB00A7AE3F /* JSDataView.cpp */,
     3052                                0F2B66BE17B6B5AB00A7AE3F /* JSDataView.h */,
     3053                                0F2B66BF17B6B5AB00A7AE3F /* JSDataViewPrototype.cpp */,
     3054                                0F2B66C017B6B5AB00A7AE3F /* JSDataViewPrototype.h */,
    29413055                                9788FC221471AD0C0068CE2D /* JSDateMath.cpp */,
    29423056                                9788FC231471AD0C0068CE2D /* JSDateMath.h */,
    29433057                                C2A7F687160432D400F76B98 /* JSDestructibleObject.h */,
    29443058                                A7B4ACAE1484C9CE00B38A36 /* JSExportMacros.h */,
     3059                                0F2B66C117B6B5AB00A7AE3F /* JSFloat32Array.h */,
     3060                                0F2B66C217B6B5AB00A7AE3F /* JSFloat64Array.h */,
    29453061                                F692A85E0255597D01FF60F7 /* JSFunction.cpp */,
    29463062                                F692A85F0255597D01FF60F7 /* JSFunction.h */,
    29473063                                A72028B91797603D0098028C /* JSFunctionInlines.h */,
     3064                                0F2B66C317B6B5AB00A7AE3F /* JSGenericTypedArrayView.h */,
     3065                                0F2B66C417B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructor.h */,
     3066                                0F2B66C517B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructorInlines.h */,
     3067                                0F2B66C617B6B5AB00A7AE3F /* JSGenericTypedArrayViewInlines.h */,
     3068                                0F2B66C717B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototype.h */,
     3069                                0F2B66C817B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototypeInlines.h */,
    29483070                                14DE0D680D02431400AACCA2 /* JSGlobalObject.cpp */,
    29493071                                A8E894330CD0603F00367179 /* JSGlobalObject.h */,
    29503072                                BC756FC60E2031B200DE7D12 /* JSGlobalObjectFunctions.cpp */,
    29513073                                BC756FC70E2031B200DE7D12 /* JSGlobalObjectFunctions.h */,
     3074                                0F2B66CA17B6B5AB00A7AE3F /* JSInt16Array.h */,
     3075                                0F2B66CB17B6B5AB00A7AE3F /* JSInt32Array.h */,
     3076                                0F2B66C917B6B5AB00A7AE3F /* JSInt8Array.h */,
    29523077                                65EA4C99092AF9E20093D800 /* JSLock.cpp */,
    29533078                                65EA4C9A092AF9E20093D800 /* JSLock.h */,
     
    29763101                                0F919D0A157EE09D004A4E7D /* JSSymbolTableObject.h */,
    29773102                                14ABB454099C2A0F00E2A24F /* JSType.h */,
     3103                                0F2B66CC17B6B5AB00A7AE3F /* JSTypedArrayConstructors.cpp */,
     3104                                0F2B66CD17B6B5AB00A7AE3F /* JSTypedArrayConstructors.h */,
     3105                                0F2B66CE17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.cpp */,
     3106                                0F2B66CF17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.h */,
     3107                                0F2B66D017B6B5AB00A7AE3F /* JSTypedArrays.cpp */,
     3108                                0F2B66D117B6B5AB00A7AE3F /* JSTypedArrays.h */,
    29783109                                6507D2970E871E4A00D7D896 /* JSTypeInfo.h */,
     3110                                0F2B66D417B6B5AB00A7AE3F /* JSUint16Array.h */,
     3111                                0F2B66D517B6B5AB00A7AE3F /* JSUint32Array.h */,
     3112                                0F2B66D217B6B5AB00A7AE3F /* JSUint8Array.h */,
     3113                                0F2B66D317B6B5AB00A7AE3F /* JSUint8ClampedArray.h */,
    29793114                                BC22A39A0E16E14800AF21C8 /* JSVariableObject.cpp */,
    29803115                                14F252560D08DD8D004ECFFF /* JSVariableObject.h */,
     
    30523187                                0F7700911402FF280078EB39 /* SamplingCounter.cpp */,
    30533188                                0F77008E1402FDD60078EB39 /* SamplingCounter.h */,
     3189                                0F2B66D617B6B5AB00A7AE3F /* SimpleTypedArrayController.cpp */,
     3190                                0F2B66D717B6B5AB00A7AE3F /* SimpleTypedArrayController.h */,
    30543191                                93303FE80E6A72B500786E6A /* SmallStrings.cpp */,
    30553192                                93303FEA0E6A72C000786E6A /* SmallStrings.h */,
     
    30793216                                5D53726D0E1C546B0021E549 /* Tracing.d */,
    30803217                                5D53726E0E1C54880021E549 /* Tracing.h */,
    3081                                 A7A8AF2F17ADB5F3005AB174 /* TypedArrayBase.h */,
    3082                                 0FEB3ECB16237F4700AB67AD /* TypedArrayDescriptor.h */,
     3218                                0F2B66D817B6B5AB00A7AE3F /* TypedArrayAdaptors.h */,
     3219                                0F2B66D917B6B5AB00A7AE3F /* TypedArrayController.cpp */,
     3220                                0F2B66DA17B6B5AB00A7AE3F /* TypedArrayController.h */,
     3221                                0F4B94DB17B9F07500DD03A4 /* TypedArrayInlines.h */,
     3222                                0F2B66DB17B6B5AB00A7AE3F /* TypedArrays.h */,
     3223                                0F2B66DC17B6B5AB00A7AE3F /* TypedArrayType.cpp */,
     3224                                0F2B66DD17B6B5AB00A7AE3F /* TypedArrayType.h */,
    30833225                                A7A8AF3217ADB5F3005AB174 /* Uint16Array.h */,
    30843226                                866739D113BFDE710023D87C /* Uint16WithFraction.h */,
     
    35393681                                0FB7F39615ED8E4600F167B2 /* ArrayStorage.h in Headers */,
    35403682                                9688CB150ED12B4E001D649F /* AssemblerBuffer.h in Headers */,
     3683                                0F2B66DF17B6B5AB00A7AE3F /* DataView.h in Headers */,
     3684                                0F2B66AC17B6B53F00A7AE3F /* GCIncomingRefCounted.h in Headers */,
    35413685                                86D3B2C510156BDE002865E7 /* AssemblerBufferWithConstantPool.h in Headers */,
    35423686                                A784A26111D16622005776AC /* ASTBuilder.h in Headers */,
     
    35453689                                14816E1C154CC56C00B8054C /* BlockAllocator.h in Headers */,
    35463690                                BC18C3EC0E16F5CD00B34460 /* BooleanObject.h in Headers */,
     3691                                0F2B670B17B6B5AB00A7AE3F /* TypedArrayType.h in Headers */,
    35473692                                0FB7F39715ED8E4600F167B2 /* Butterfly.h in Headers */,
    35483693                                0FB7F39815ED8E4600F167B2 /* ButterflyInlines.h in Headers */,
     
    35563701                                95E3BC050E1AE68200B2D1C1 /* CallIdentifier.h in Headers */,
    35573702                                0F0B83B114BCF71800885B4F /* CallLinkInfo.h in Headers */,
     3703                                0F2B66F517B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototype.h in Headers */,
    35583704                                0F93329E14CA7DC50085F3C6 /* CallLinkStatus.h in Headers */,
    35593705                                0F0B83B914BCF95F00885B4F /* CallReturnOffsetToBytecodeOffset.h in Headers */,
     
    35673713                                0FBD7E691447999600481315 /* CodeOrigin.h in Headers */,
    35683714                                0F21C27D14BE727A00ADC64B /* CodeSpecializationKind.h in Headers */,
     3715                                0F2B66F417B6B5AB00A7AE3F /* JSGenericTypedArrayViewInlines.h in Headers */,
    35693716                                0F0B83A714BCF50700885B4F /* CodeType.h in Headers */,
    35703717                                BC18C3F30E16F5CD00B34460 /* CommonIdentifiers.h in Headers */,
     
    35773724                                BC18C3F50E16F5CD00B34460 /* config.h in Headers */,
    35783725                                144836E7132DA7BE005BE785 /* ConservativeRoots.h in Headers */,
     3726                                0F2B66F317B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructorInlines.h in Headers */,
    35793727                                BC18C3F60E16F5CD00B34460 /* ConstructData.h in Headers */,
    35803728                                C2EAD2FC14F0249800A4B159 /* CopiedAllocator.h in Headers */,
     
    36053753                                0FFB921816D02EB20055A5DB /* DFGAllocator.h in Headers */,
    36063754                                A737810C1799EA2E00817533 /* DFGAnalysis.h in Headers */,
     3755                                0F2B66E117B6B5AB00A7AE3F /* GenericTypedArrayViewInlines.h in Headers */,
    36073756                                0F1E3A461534CBAF000F9456 /* DFGArgumentPosition.h in Headers */,
    36083757                                0F16015E156198C900C2587C /* DFGArgumentsSimplificationPhase.h in Headers */,
     
    36183767                                0F8364B7164B0C110053329A /* DFGBranchDirection.h in Headers */,
    36193768                                86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */,
     3769                                0F2B66E317B6B5AB00A7AE3F /* JSArrayBuffer.h in Headers */,
    36203770                                0F256C361627B0AD007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h in Headers */,
    36213771                                0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */,
     
    36513801                                A7D89CFA17A0B8CC00773AD8 /* DFGFlushLivenessAnalysisPhase.h in Headers */,
    36523802                                86AE6C4D136A11E400963012 /* DFGFPRInfo.h in Headers */,
     3803                                0F2B66F817B6B5AB00A7AE3F /* JSInt16Array.h in Headers */,
    36533804                                86EC9DC61328DF82002B2AD7 /* DFGGenerationInfo.h in Headers */,
    36543805                                86AE6C4E136A11E400963012 /* DFGGPRInfo.h in Headers */,
     
    36593810                                86EC9DCC1328DF82002B2AD7 /* DFGJITCompiler.h in Headers */,
    36603811                                A78A9779179738B8009DF744 /* DFGJITFinalizer.h in Headers */,
     3812                                0F2B66EF17B6B5AB00A7AE3F /* JSFloat32Array.h in Headers */,
    36613813                                A73A535B1799CD5D00170C19 /* DFGLazyJSValue.h in Headers */,
    36623814                                A7D9A29817A0BC7400EE2618 /* DFGLICMPhase.h in Headers */,
     
    36723824                                0FFB921B16D02F010055A5DB /* DFGNodeAllocator.h in Headers */,
    36733825                                0FA581BB150E953000B9A2D9 /* DFGNodeFlags.h in Headers */,
     3826                                0F2B66AD17B6B54500A7AE3F /* GCIncomingRefCountedInlines.h in Headers */,
    36743827                                0FA581BC150E953000B9A2D9 /* DFGNodeType.h in Headers */,
    36753828                                86EC9DD01328DF82002B2AD7 /* DFGOperations.h in Headers */,
     
    36853838                                0FFFC95C14EF90AF00C72532 /* DFGPhase.h in Headers */,
    36863839                                A78A977B179738B8009DF744 /* DFGPlan.h in Headers */,
     3840                                0F2B66F717B6B5AB00A7AE3F /* JSInt8Array.h in Headers */,
     3841                                0F2B66EA17B6B5AB00A7AE3F /* JSArrayBufferViewInlines.h in Headers */,
    36873842                                0FBE0F7516C1DB0B0082C5E8 /* DFGPredictionInjectionPhase.h in Headers */,
    36883843                                0FFFC95E14EF90B700C72532 /* DFGPredictionPropagationPhase.h in Headers */,
     
    36943849                                86ECA3FA132DF25A002B2AD7 /* DFGScoreBoard.h in Headers */,
    36953850                                0F766D4615B3701F008F363E /* DFGScratchRegisterAllocator.h in Headers */,
     3851                                0F2B66E017B6B5AB00A7AE3F /* GenericTypedArrayView.h in Headers */,
    36963852                                0F1E3A67153A21E2000F9456 /* DFGSilentRegisterSavePlan.h in Headers */,
    36973853                                0FFB921D16D02F300055A5DB /* DFGSlowPathGenerator.h in Headers */,
     
    37273883                                0FB105861675481200F8AB6E /* ExitKind.h in Headers */,
    37283884                                0F0B83AB14BCF5BB00885B4F /* ExpressionRangeInfo.h in Headers */,
     3885                                0F2B66F117B6B5AB00A7AE3F /* JSGenericTypedArrayView.h in Headers */,
    37293886                                A7A8AF3817ADB5F3005AB174 /* Float32Array.h in Headers */,
    37303887                                A7A8AF3917ADB5F3005AB174 /* Float64Array.h in Headers */,
     
    37473904                                A78A977F179738D5009DF744 /* FTLGeneratedFunction.h in Headers */,
    37483905                                0FEA0A241709606900BB722C /* FTLIntrinsicRepository.h in Headers */,
     3906                                0F2B670817B6B5AB00A7AE3F /* TypedArrayController.h in Headers */,
    37493907                                0FEA0A0E170513DB00BB722C /* FTLJITCode.h in Headers */,
    37503908                                A78A9781179738D5009DF744 /* FTLJITFinalizer.h in Headers */,
     
    37953953                                A7A8AF3C17ADB5F3005AB174 /* Int32Array.h in Headers */,
    37963954                                A7A8AF3A17ADB5F3005AB174 /* Int8Array.h in Headers */,
    3797                                 A7A8AF3D17ADB5F3005AB174 /* IntegralTypedArrayBase.h in Headers */,
    37983955                                A78853FA17972629001440E4 /* IntendedStructureChain.h in Headers */,
    37993956                                BC11667B0E199C05008066DD /* InternalFunction.h in Headers */,
     
    38143971                                0F766D2C15A8CC3A008F363E /* JITStubRoutineSet.h in Headers */,
    38153972                                14C5242B0F5355E900BA3D04 /* JITStubs.h in Headers */,
     3973                                0F2B66FF17B6B5AB00A7AE3F /* JSTypedArrays.h in Headers */,
    38163974                                FEF6835E174343CC00A32E25 /* JITStubsARM.h in Headers */,
    38173975                                FEF6835F174343CC00A32E25 /* JITStubsARMv7.h in Headers */,
     
    38413999                                86E3C613167BABD7006D760A /* JSContext.h in Headers */,
    38424000                                86E3C617167BABEE006D760A /* JSContextInternal.h in Headers */,
     4001                                0F2B670617B6B5AB00A7AE3F /* TypedArrayAdaptors.h in Headers */,
    38434002                                BC18C41E0E16F5CD00B34460 /* JSContextRef.h in Headers */,
    38444003                                148CD1D8108CF902008163C6 /* JSContextRefPrivate.h in Headers */,
     
    38564015                                C25D709C16DE99F400FCA6BC /* JSManagedValue.h in Headers */,
    38574016                                14874AE415EBDE4A002E3587 /* JSNameScope.h in Headers */,
     4017                                0F2B66E917B6B5AB00A7AE3F /* JSArrayBufferView.h in Headers */,
    38584018                                BC18C4240E16F5CD00B34460 /* JSObject.h in Headers */,
    38594019                                BC18C4250E16F5CD00B34460 /* JSObjectRef.h in Headers */,
     
    38674027                                A7C0C4AC168103020017011D /* JSScriptRefPrivate.h in Headers */,
    38684028                                0F919D11157F332C004A4E7D /* JSSegmentedVariableObject.h in Headers */,
     4029                                0F2B66F617B6B5AB00A7AE3F /* JSGenericTypedArrayViewPrototypeInlines.h in Headers */,
    38694030                                BC18C45E0E16F5CD00B34460 /* JSStack.h in Headers */,
    38704031                                A7C1EAF017987AB600299DB2 /* JSStackInlines.h in Headers */,
     
    38854046                                86E3C61D167BABEE006D760A /* JSVirtualMachineInternal.h in Headers */,
    38864047                                A7482E93116A7CAD003B0712 /* JSWeakObjectMapRefInternal.h in Headers */,
     4048                                0F2B670017B6B5AB00A7AE3F /* JSUint8Array.h in Headers */,
    38874049                                A7482B9311671147003B0712 /* JSWeakObjectMapRefPrivate.h in Headers */,
    38884050                                1442566215EDE98D0066A49B /* JSWithScope.h in Headers */,
     
    39154077                                142E3139134FF0A600AFADB5 /* Local.h in Headers */,
    39164078                                142E313A134FF0A600AFADB5 /* LocalScope.h in Headers */,
     4079                                0F2B66FB17B6B5AB00A7AE3F /* JSTypedArrayConstructors.h in Headers */,
    39174080                                BC18C4370E16F5CD00B34460 /* Lookup.h in Headers */,
    39184081                                0F4680CD14BBB17D00BFE272 /* LowLevelInterpreter.h in Headers */,
     
    39274090                                860161E50F3A83C100F84710 /* MacroAssemblerX86_64.h in Headers */,
    39284091                                860161E60F3A83C100F84710 /* MacroAssemblerX86Common.h in Headers */,
     4092                                0F2B670217B6B5AB00A7AE3F /* JSUint16Array.h in Headers */,
    39294093                                C2B916C214DA014E00CBAC86 /* MarkedAllocator.h in Headers */,
    39304094                                142D6F0913539A2800B02E86 /* MarkedBlock.h in Headers */,
     
    39354099                                8612E4CD152389EC00C836BE /* MatchResult.h in Headers */,
    39364100                                BC18C43C0E16F5CD00B34460 /* MathObject.h in Headers */,
     4101                                0F2B66EE17B6B5AB00A7AE3F /* JSDataViewPrototype.h in Headers */,
    39374102                                BC18C52A0E16FCC200B34460 /* MathObject.lut.h in Headers */,
    39384103                                90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */,
     4104                                0F2B66F917B6B5AB00A7AE3F /* JSInt32Array.h in Headers */,
    39394105                                0FB5467B14F5C7E1002C2989 /* MethodOfGettingAValueProfile.h in Headers */,
    39404106                                86C568E211A213EE0007F7F0 /* MIPSAssembler.h in Headers */,
     
    39434109                                86EBF3041560F06A008E9222 /* NamePrototype.h in Headers */,
    39444110                                BC02E9110E1839DB000F9297 /* NativeErrorConstructor.h in Headers */,
     4111                                0F2B670917B6B5AB00A7AE3F /* TypedArrays.h in Headers */,
    39454112                                BC02E9130E1839DB000F9297 /* NativeErrorPrototype.h in Headers */,
    39464113                                0FFB922016D033B70055A5DB /* NodeConstructors.h in Headers */,
     
    39724139                                0F9FC8C414E1B60000D52AE0 /* PolymorphicPutByIdList.h in Headers */,
    39734140                                0F98206116BFE38300240D02 /* PreciseJumpTargets.h in Headers */,
     4141                                0F2B66E517B6B5AB00A7AE3F /* JSArrayBufferConstructor.h in Headers */,
    39744142                                868916B0155F286300CB2B9A /* PrivateName.h in Headers */,
    39754143                                BC18C4500E16F5CD00B34460 /* Profile.h in Headers */,
     
    40004168                                0F9332A414CA7DD90085F3C6 /* PutByIdStatus.h in Headers */,
    40014169                                0F0CD4C215F1A6070032F1C0 /* PutDirectIndexMode.h in Headers */,
     4170                                0F2B66F217B6B5AB00A7AE3F /* JSGenericTypedArrayViewConstructor.h in Headers */,
    40024171                                0F9FC8C514E1B60400D52AE0 /* PutKind.h in Headers */,
    40034172                                147B84630E6DE6B1004775A4 /* PutPropertySlot.h in Headers */,
    40044173                                0FF60AC216740F8300029779 /* ReduceWhitespace.h in Headers */,
     4174                                0F2B670517B6B5AB00A7AE3F /* SimpleTypedArrayController.h in Headers */,
    40054175                                BC18C45A0E16F5CD00B34460 /* RegExp.h in Headers */,
    40064176                                A1712B3F11C7B228007A5315 /* RegExpCache.h in Headers */,
     
    40254195                                933040040E6A749400786E6A /* SmallStrings.h in Headers */,
    40264196                                BC18C4640E16F5CD00B34460 /* SourceCode.h in Headers */,
     4197                                0F2B66EC17B6B5AB00A7AE3F /* JSDataView.h in Headers */,
    40274198                                BC18C4630E16F5CD00B34460 /* SourceProvider.h in Headers */,
    40284199                                E49DC16C12EF294E00184A1F /* SourceProviderCache.h in Headers */,
     
    40374208                                14CA958B16AB50DE00938A06 /* StaticPropertyAnalyzer.h in Headers */,
    40384209                                A730B6121250068F009D25B1 /* StrictEvalActivation.h in Headers */,
     4210                                0F2B66F017B6B5AB00A7AE3F /* JSFloat64Array.h in Headers */,
    40394211                                BC18C4660E16F5CD00B34460 /* StringConstructor.h in Headers */,
     4212                                0F2B66FD17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.h in Headers */,
    40404213                                BC18C4680E16F5CD00B34460 /* StringObject.h in Headers */,
    40414214                                BC18C46A0E16F5CD00B34460 /* StringPrototype.h in Headers */,
     
    40494222                                C20BA92D16BB1C1500B3AEA2 /* StructureRareDataInlines.h in Headers */,
    40504223                                0F9332A514CA7DDD0085F3C6 /* StructureSet.h in Headers */,
     4224                                0F2B66AF17B6B54500A7AE3F /* GCIncomingRefCountedSetInlines.h in Headers */,
     4225                                0F2B670117B6B5AB00A7AE3F /* JSUint8ClampedArray.h in Headers */,
    40514226                                0F766D3915AE4A1F008F363E /* StructureStubClearingWatchpoint.h in Headers */,
    40524227                                BCCF0D080EF0AAB900413C8F /* StructureStubInfo.h in Headers */,
     
    40584233                                A7386556118697B400540279 /* ThunkGenerators.h in Headers */,
    40594234                                141448CD13A1783700F5BA1A /* TinyBloomFilter.h in Headers */,
     4235                                0F2B670317B6B5AB00A7AE3F /* JSUint32Array.h in Headers */,
     4236                                0F2B66AE17B6B54500A7AE3F /* GCIncomingRefCountedSet.h in Headers */,
    40604237                                5D53726F0E1C54880021E549 /* Tracing.h in Headers */,
    4061                                 A7A8AF3E17ADB5F3005AB174 /* TypedArrayBase.h in Headers */,
    4062                                 0FEB3ECD16237F4D00AB67AD /* TypedArrayDescriptor.h in Headers */,
     4238                                0F2B66E717B6B5AB00A7AE3F /* JSArrayBufferPrototype.h in Headers */,
    40634239                                0FF4274B158EBE91004CB9FF /* udis86.h in Headers */,
    40644240                                0FF42741158EBE8D004CB9FF /* udis86_decode.h in Headers */,
     
    41054281                                86704B8A12DBA33700A9FE7B /* YarrPattern.h in Headers */,
    41064282                                86704B4312DB8A8100A9FE7B /* YarrSyntaxChecker.h in Headers */,
     4283                                0F4B94DC17B9F07500DD03A4 /* TypedArrayInlines.h in Headers */,
    41074284                        );
    41084285                        runOnlyForDeploymentPostprocessing = 0;
     
    44904667                                14280823107EC02C0013E7B2 /* Debugger.cpp in Sources */,
    44914668                                BC3135650F302FA3003DFD3A /* DebuggerActivation.cpp in Sources */,
     4669                                0F2B670417B6B5AB00A7AE3F /* SimpleTypedArrayController.cpp in Sources */,
    44924670                                149559EE0DDCDDF700648087 /* DebuggerCallFrame.cpp in Sources */,
    44934671                                A77A423D17A0BBFD00A8DB81 /* DFGAbstractHeap.cpp in Sources */,
     
    45154693                                0FFFC95914EF90A600C72532 /* DFGCSEPhase.cpp in Sources */,
    45164694                                0F2FC77216E12F710038D976 /* DFGDCEPhase.cpp in Sources */,
     4695                                0F2B66FE17B6B5AB00A7AE3F /* JSTypedArrays.cpp in Sources */,
    45174696                                0F8F2B99172F04FF007DBDA5 /* DFGDesiredIdentifiers.cpp in Sources */,
    45184697                                A73E1330179624CD00E4DEA8 /* DFGDesiredStructureChains.cpp in Sources */,
     
    45444723                                86EC9DCF1328DF82002B2AD7 /* DFGOperations.cpp in Sources */,
    45454724                                A7D89CFD17A0B8CC00773AD8 /* DFGOSRAvailabilityAnalysisPhase.cpp in Sources */,
     4725                                0F2B66FC17B6B5AB00A7AE3F /* JSTypedArrayPrototypes.cpp in Sources */,
    45464726                                0FD82E56141DAF0800179C94 /* DFGOSREntry.cpp in Sources */,
    45474727                                0FC09791146A6F7100CF2442 /* DFGOSRExit.cpp in Sources */,
     
    46174797                                0F93329F14CA7DCA0085F3C6 /* GetByIdStatus.cpp in Sources */,
    46184798                                14280855107EC0E70013E7B2 /* GetterSetter.cpp in Sources */,
     4799                                0F2B66E217B6B5AB00A7AE3F /* JSArrayBuffer.cpp in Sources */,
    46194800                                142E3135134FF0A600AFADB5 /* HandleSet.cpp in Sources */,
    46204801                                142E3137134FF0A600AFADB5 /* HandleStack.cpp in Sources */,
     
    46694850                                14874AE315EBDE4A002E3587 /* JSNameScope.cpp in Sources */,
    46704851                                A72700900DAC6BBC00E548D7 /* JSNotAnObject.cpp in Sources */,
     4852                                0F2B66FA17B6B5AB00A7AE3F /* JSTypedArrayConstructors.cpp in Sources */,
    46714853                                147F39D4107EC37600427A48 /* JSObject.cpp in Sources */,
    46724854                                1482B7E40A43076000517CFC /* JSObjectRef.cpp in Sources */,
     
    46744856                                95F6E6950E5B5F970091E860 /* JSProfilerPrivate.cpp in Sources */,
    46754857                                A727FF6B0DA3092200E548D7 /* JSPropertyNameIterator.cpp in Sources */,
     4858                                0F2B66DE17B6B5AB00A7AE3F /* DataView.cpp in Sources */,
    46764859                                862553D116136DA9009F17D0 /* JSProxy.cpp in Sources */,
    46774860                                14874AE515EBDE4A002E3587 /* JSScope.cpp in Sources */,
     
    46914874                                1442566115EDE98D0066A49B /* JSWithScope.cpp in Sources */,
    46924875                                86E3C618167BABEE006D760A /* JSWrapperMap.mm in Sources */,
     4876                                0F2B66E417B6B5AB00A7AE3F /* JSArrayBufferConstructor.cpp in Sources */,
    46934877                                14280870107EC1340013E7B2 /* JSWrapperObject.cpp in Sources */,
    46944878                                0F766D3415AE2538008F363E /* JumpReplacementWatchpoint.cpp in Sources */,
     
    47134897                                A729009C17976C6000317298 /* MacroAssemblerARMv7.cpp in Sources */,
    47144898                                A7A4AE0817973B26005612B1 /* MacroAssemblerX86Common.cpp in Sources */,
     4899                                0F2B66ED17B6B5AB00A7AE3F /* JSDataViewPrototype.cpp in Sources */,
    47154900                                C2B916C514DA040C00CBAC86 /* MarkedAllocator.cpp in Sources */,
    47164901                                142D6F0813539A2800B02E86 /* MarkedBlock.cpp in Sources */,
     
    47634948                                0F9332A314CA7DD70085F3C6 /* PutByIdStatus.cpp in Sources */,
    47644949                                0FF60AC316740F8800029779 /* ReduceWhitespace.cpp in Sources */,
     4950                                0F2B66EB17B6B5AB00A7AE3F /* JSDataView.cpp in Sources */,
    47654951                                14280841107EC0930013E7B2 /* RegExp.cpp in Sources */,
    47664952                                A1712B3B11C7B212007A5315 /* RegExpCache.cpp in Sources */,
    47674953                                8642C510151C06A90046D4EF /* RegExpCachedResult.cpp in Sources */,
    47684954                                14280842107EC0930013E7B2 /* RegExpConstructor.cpp in Sources */,
     4955                                0F2B66E617B6B5AB00A7AE3F /* JSArrayBufferPrototype.cpp in Sources */,
    47694956                                8642C512151C083D0046D4EF /* RegExpMatchesArray.cpp in Sources */,
    47704957                                14280843107EC0930013E7B2 /* RegExpObject.cpp in Sources */,
    47714958                                14280844107EC0930013E7B2 /* RegExpPrototype.cpp in Sources */,
    47724959                                0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */,
     4960                                0F2B66E817B6B5AB00A7AE3F /* JSArrayBufferView.cpp in Sources */,
    47734961                                1429D8850ED21C3D00B89619 /* SamplingTool.cpp in Sources */,
    47744962                                C225494315F7DBAA0065E898 /* SlotVisitor.cpp in Sources */,
    47754963                                9330402C0E6A764000786E6A /* SmallStrings.cpp in Sources */,
     4964                                0F2B670717B6B5AB00A7AE3F /* TypedArrayController.cpp in Sources */,
    47764965                                0F8F2B9E17306C8D007DBDA5 /* SourceCode.cpp in Sources */,
    47774966                                0F493AFA16D0CAD30084508B /* SourceProvider.cpp in Sources */,
     
    48064995                                FE4A331F15BD2E07006F54F3 /* VMInspector.cpp in Sources */,
    48074996                                0FC81516140511B500CFA603 /* VTableSpectrum.cpp in Sources */,
     4997                                0F2B670A17B6B5AB00A7AE3F /* TypedArrayType.cpp in Sources */,
    48084998                                FED94F2E171E3E2300BE77A4 /* Watchdog.cpp in Sources */,
    48094999                                FED94F30171E3E2300BE77A4 /* WatchdogMac.cpp in Sources */,
  • trunk/Source/JavaScriptCore/Target.pri

    r154002 r154127  
    260260    profiler/ProfileNode.cpp \
    261261    profiler/LegacyProfiler.cpp \
     262    runtime/ArgList.cpp \
     263    runtime/Arguments.cpp \
    262264    runtime/ArrayBuffer.cpp \
    263265    runtime/ArrayBufferView.cpp \
    264     runtime/ArgList.cpp \
    265     runtime/Arguments.cpp \
    266266    runtime/ArrayConstructor.cpp \
    267267    runtime/ArrayPrototype.cpp \
     
    278278    runtime/Completion.cpp \
    279279    runtime/ConstructData.cpp \
     280    runtime/DataView.cpp \
    280281    runtime/DateConstructor.cpp \
    281282    runtime/DateConversion.cpp \
     
    283284    runtime/DatePrototype.cpp \
    284285    runtime/DumpContext.cpp \
     286    runtime/Error.cpp \
    285287    runtime/ErrorConstructor.cpp \
    286     runtime/Error.cpp \
    287288    runtime/ErrorInstance.cpp \
    288289    runtime/ErrorPrototype.cpp \
     
    294295    runtime/GCActivityCallback.cpp \
    295296    runtime/GetterSetter.cpp \
    296     runtime/Options.cpp \
    297297    runtime/Identifier.cpp \
    298298    runtime/IndexingType.cpp \
     
    300300    runtime/IntendedStructureChain.cpp \
    301301    runtime/InternalFunction.cpp \
     302    runtime/JSAPIValueWrapper.cpp \
    302303    runtime/JSActivation.cpp \
    303     runtime/JSAPIValueWrapper.cpp \
    304304    runtime/JSArray.cpp \
     305    runtime/JSArrayBuffer.cpp \
     306    runtime/JSArrayBufferConstructor.cpp \
     307    runtime/JSArrayBufferPrototype.cpp \
     308    runtime/JSArrayBufferView.cpp \
     309    runtime/JSBoundFunction.cpp \
     310    runtime/JSCJSValue.cpp \
    305311    runtime/JSCell.cpp \
     312    runtime/JSDataView.cpp \
     313    runtime/JSDataViewPrototype.cpp \
    306314    runtime/JSDateMath.cpp \
    307315    runtime/JSFunction.cpp \
    308     runtime/JSBoundFunction.cpp \
    309     runtime/VM.cpp \
    310316    runtime/JSGlobalObject.cpp \
    311317    runtime/JSGlobalObjectFunctions.cpp \
     318    runtime/JSLock.cpp \
     319    runtime/JSNameScope.cpp \
     320    runtime/JSNotAnObject.cpp \
     321    runtime/JSONObject.cpp \
     322    runtime/JSObject.cpp \
     323    runtime/JSPropertyNameIterator.cpp \
    312324    runtime/JSProxy.cpp \
    313     runtime/JSLock.cpp \
    314     runtime/JSNotAnObject.cpp \
    315     runtime/JSObject.cpp \
    316     runtime/JSONObject.cpp \
    317     runtime/JSPropertyNameIterator.cpp \
     325    runtime/JSScope.cpp \
    318326    runtime/JSSegmentedVariableObject.cpp \
    319     runtime/JSWithScope.cpp \
    320     runtime/JSNameScope.cpp \
    321     runtime/JSScope.cpp \
    322327    runtime/JSString.cpp \
    323328    runtime/JSStringJoiner.cpp \
    324329    runtime/JSSymbolTableObject.cpp \
    325     runtime/JSCJSValue.cpp \
     330    runtime/JSTypedArrayConstructors.cpp \
     331    runtime/JSTypedArrayPrototypes.cpp \
     332    runtime/JSTypedArrays.cpp \
    326333    runtime/JSVariableObject.cpp \
     334    runtime/JSWithScope.cpp \
    327335    runtime/JSWrapperObject.cpp \
    328336    runtime/LiteralParser.cpp \
     
    341349    runtime/ObjectPrototype.cpp \
    342350    runtime/Operations.cpp \
     351    runtime/Options.cpp \
    343352    runtime/PropertyDescriptor.cpp \
    344353    runtime/PropertyNameArray.cpp \
     
    346355    runtime/PropertyTable.cpp \
    347356    runtime/PrototypeMap.cpp \
     357    runtime/RegExp.cpp \
     358    runtime/RegExpCache.cpp \
     359    runtime/RegExpCachedResult.cpp \
    348360    runtime/RegExpConstructor.cpp \
    349     runtime/RegExpCachedResult.cpp \
    350361    runtime/RegExpMatchesArray.cpp \
    351     runtime/RegExp.cpp \
    352362    runtime/RegExpObject.cpp \
    353363    runtime/RegExpPrototype.cpp \
    354     runtime/RegExpCache.cpp \
    355364    runtime/SamplingCounter.cpp \
     365    runtime/SimpleTypedArrayController.cpp \
    356366    runtime/SmallStrings.cpp \
    357367    runtime/SparseArrayValueMap.cpp \
     
    361371    runtime/StringPrototype.cpp \
    362372    runtime/StringRecursionChecker.cpp \
     373    runtime/Structure.cpp \
    363374    runtime/StructureChain.cpp \
    364     runtime/Structure.cpp \
    365375    runtime/StructureRareData.cpp \
    366376    runtime/SymbolTable.cpp \
     377    runtime/TypedArrayController.cpp \
     378    runtime/TypedArrayType.cpp \
     379    runtime/VM.cpp \
    367380    runtime/Watchdog.cpp \
    368381    runtime/WatchdogNone.cpp \
  • trunk/Source/JavaScriptCore/bytecode/ByValInfo.h

    r133953 r154127  
    7070inline bool hasOptimizableIndexingForClassInfo(const ClassInfo* classInfo)
    7171{
    72     return classInfo->typedArrayStorageType != TypedArrayNone;
     72    return isTypedView(classInfo->typedArrayStorageType);
    7373}
    7474
     
    9999{
    100100    switch (classInfo->typedArrayStorageType) {
    101     case TypedArrayInt8:
     101    case TypeInt8:
    102102        return JITInt8Array;
    103     case TypedArrayInt16:
     103    case TypeInt16:
    104104        return JITInt16Array;
    105     case TypedArrayInt32:
     105    case TypeInt32:
    106106        return JITInt32Array;
    107     case TypedArrayUint8:
     107    case TypeUint8:
    108108        return JITUint8Array;
    109     case TypedArrayUint8Clamped:
     109    case TypeUint8Clamped:
    110110        return JITUint8ClampedArray;
    111     case TypedArrayUint16:
     111    case TypeUint16:
    112112        return JITUint16Array;
    113     case TypedArrayUint32:
     113    case TypeUint32:
    114114        return JITUint32Array;
    115     case TypedArrayFloat32:
     115    case TypeFloat32:
    116116        return JITFloat32Array;
    117     case TypedArrayFloat64:
     117    case TypeFloat64:
    118118        return JITFloat64Array;
    119119    default:
    120120        CRASH();
    121121        return JITContiguous;
     122    }
     123}
     124
     125inline TypedArrayType typedArrayTypeForJITArrayMode(JITArrayMode mode)
     126{
     127    switch (mode) {
     128    case JITInt8Array:
     129        return TypeInt8;
     130    case JITInt16Array:
     131        return TypeInt16;
     132    case JITInt32Array:
     133        return TypeInt32;
     134    case JITUint8Array:
     135        return TypeUint8;
     136    case JITUint8ClampedArray:
     137        return TypeUint8Clamped;
     138    case JITUint16Array:
     139        return TypeUint16;
     140    case JITUint32Array:
     141        return TypeUint32;
     142    case JITFloat32Array:
     143        return TypeFloat32;
     144    case JITFloat64Array:
     145        return TypeFloat64;
     146    default:
     147        CRASH();
     148        return NotTypedArray;
    122149    }
    123150}
  • trunk/Source/JavaScriptCore/bytecode/SpeculatedType.cpp

    r154038 r154127  
    267267        return SpecFunction;
    268268   
    269     if (classInfo->typedArrayStorageType != TypedArrayNone) {
    270         switch (classInfo->typedArrayStorageType) {
    271         case TypedArrayInt8:
    272             return SpecInt8Array;
    273         case TypedArrayInt16:
    274             return SpecInt16Array;
    275         case TypedArrayInt32:
    276             return SpecInt32Array;
    277         case TypedArrayUint8:
    278             return SpecUint8Array;
    279         case TypedArrayUint8Clamped:
    280             return SpecUint8ClampedArray;
    281         case TypedArrayUint16:
    282             return SpecUint16Array;
    283         case TypedArrayUint32:
    284             return SpecUint32Array;
    285         case TypedArrayFloat32:
    286             return SpecFloat32Array;
    287         case TypedArrayFloat64:
    288             return SpecFloat64Array;
    289         default:
    290             break;
    291         }
     269    switch (classInfo->typedArrayStorageType) {
     270    case TypeInt8:
     271        return SpecInt8Array;
     272    case TypeInt16:
     273        return SpecInt16Array;
     274    case TypeInt32:
     275        return SpecInt32Array;
     276    case TypeUint8:
     277        return SpecUint8Array;
     278    case TypeUint8Clamped:
     279        return SpecUint8ClampedArray;
     280    case TypeUint16:
     281        return SpecUint16Array;
     282    case TypeUint32:
     283        return SpecUint32Array;
     284    case TypeFloat32:
     285        return SpecFloat32Array;
     286    case TypeFloat64:
     287        return SpecFloat64Array;
     288    default:
     289        break;
    292290    }
    293291   
  • trunk/Source/JavaScriptCore/dfg/DFGArrayMode.cpp

    r153170 r154127  
    459459}
    460460
     461TypedArrayType toTypedArrayType(Array::Type type)
     462{
     463    switch (type) {
     464    case Array::Int8Array:
     465        return TypeInt8;
     466    case Array::Int16Array:
     467        return TypeInt16;
     468    case Array::Int32Array:
     469        return TypeInt32;
     470    case Array::Uint8Array:
     471        return TypeUint8;
     472    case Array::Uint8ClampedArray:
     473        return TypeUint8Clamped;
     474    case Array::Uint16Array:
     475        return TypeUint16;
     476    case Array::Uint32Array:
     477        return TypeUint32;
     478    case Array::Float32Array:
     479        return TypeFloat32;
     480    case Array::Float64Array:
     481        return TypeFloat64;
     482    default:
     483        return NotTypedArray;
     484    }
     485}
     486
    461487void ArrayMode::dump(PrintStream& out) const
    462488{
  • trunk/Source/JavaScriptCore/dfg/DFGArrayMode.h

    r153281 r154127  
    105105const char* arrayConversionToString(Array::Conversion);
    106106
     107TypedArrayType toTypedArrayType(Array::Type);
     108
    107109class ArrayMode {
    108110public:
     
    381383    }
    382384   
     385    TypedArrayType typedArrayType() const
     386    {
     387        return toTypedArrayType(type());
     388    }
     389   
    383390    bool operator==(const ArrayMode& other) const
    384391    {
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r154038 r154127  
    584584}
    585585   
    586 const TypedArrayDescriptor* SpeculativeJIT::typedArrayDescriptor(ArrayMode arrayMode)
    587 {
    588     switch (arrayMode.type()) {
    589     case Array::Int8Array:
    590         return &m_jit.vm()->int8ArrayDescriptor();
    591     case Array::Int16Array:
    592         return &m_jit.vm()->int16ArrayDescriptor();
    593     case Array::Int32Array:
    594         return &m_jit.vm()->int32ArrayDescriptor();
    595     case Array::Uint8Array:
    596         return &m_jit.vm()->uint8ArrayDescriptor();
    597     case Array::Uint8ClampedArray:
    598         return &m_jit.vm()->uint8ClampedArrayDescriptor();
    599     case Array::Uint16Array:
    600         return &m_jit.vm()->uint16ArrayDescriptor();
    601     case Array::Uint32Array:
    602         return &m_jit.vm()->uint32ArrayDescriptor();
    603     case Array::Float32Array:
    604         return &m_jit.vm()->float32ArrayDescriptor();
    605     case Array::Float64Array:
    606         return &m_jit.vm()->float64ArrayDescriptor();
    607     default:
    608         return 0;
    609     }
    610 }
    611 
    612586JITCompiler::Jump SpeculativeJIT::jumpSlowForUnwantedArrayMode(GPRReg tempGPR, ArrayMode arrayMode, IndexingType shape)
    613587{
     
    695669    GPRReg baseReg = base.gpr();
    696670   
    697     const TypedArrayDescriptor* result = typedArrayDescriptor(node->arrayMode());
    698    
    699671    if (node->arrayMode().alreadyChecked(m_jit.graph(), node, m_state.forNode(node->child1()))) {
    700672        noResult(m_currentNode);
     
    728700        expectedClassInfo = Arguments::info();
    729701        break;
    730     case Array::Int8Array:
    731     case Array::Int16Array:
    732     case Array::Int32Array:
    733     case Array::Uint8Array:
    734     case Array::Uint8ClampedArray:
    735     case Array::Uint16Array:
    736     case Array::Uint32Array:
    737     case Array::Float32Array:
    738     case Array::Float64Array:
    739         expectedClassInfo = result->m_classInfo;
    740         break;
    741702    default:
    742         RELEASE_ASSERT_NOT_REACHED();
    743         break;
    744     }
     703        expectedClassInfo = classInfoForType(node->arrayMode().typedArrayType());
     704        break;
     705    }
     706   
     707    RELEASE_ASSERT(expectedClassInfo);
    745708   
    746709    GPRTemporary temp(this);
     
    26022565}
    26032566
    2604 void SpeculativeJIT::compileGetByValOnIntTypedArray(const TypedArrayDescriptor& descriptor, Node* node, size_t elementSize, TypedArraySignedness signedness)
    2605 {
     2567void SpeculativeJIT::compileGetByValOnIntTypedArray(Node* node, TypedArrayType type)
     2568{
     2569    ASSERT(isInt(type));
     2570   
    26062571    SpeculateCellOperand base(this, node->child1());
    26072572    SpeculateStrictInt32Operand property(this, node->child2());
     
    26202585        Uncountable, JSValueRegs(), 0,
    26212586        m_jit.branch32(
    2622             MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(baseReg, descriptor.m_lengthOffset)));
    2623     switch (elementSize) {
     2587            MacroAssembler::AboveOrEqual, propertyReg,
     2588            MacroAssembler::Address(baseReg, JSArrayBufferView::offsetOfLength())));
     2589    switch (elementSize(type)) {
    26242590    case 1:
    2625         if (signedness == SignedTypedArray)
     2591        if (isSigned(type))
    26262592            m_jit.load8Signed(MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesOne), resultReg);
    26272593        else
     
    26292595        break;
    26302596    case 2:
    2631         if (signedness == SignedTypedArray)
     2597        if (isSigned(type))
    26322598            m_jit.load16Signed(MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesTwo), resultReg);
    26332599        else
     
    26402606        CRASH();
    26412607    }
    2642     if (elementSize < 4 || signedness == SignedTypedArray) {
     2608    if (elementSize(type) < 4 || isSigned(type)) {
    26432609        integerResult(resultReg, node);
    26442610        return;
    26452611    }
    26462612   
    2647     ASSERT(elementSize == 4 && signedness == UnsignedTypedArray);
     2613    ASSERT(elementSize(type) == 4 && !isSigned(type));
    26482614    if (node->shouldSpeculateInteger()) {
    26492615        forwardSpeculationCheck(Overflow, JSValueRegs(), 0, m_jit.branch32(MacroAssembler::LessThan, resultReg, TrustedImm32(0)), ValueRecovery::uint32InGPR(resultReg));
     
    26602626}
    26612627
    2662 void SpeculativeJIT::compilePutByValForIntTypedArray(const TypedArrayDescriptor& descriptor, GPRReg base, GPRReg property, Node* node, size_t elementSize, TypedArraySignedness signedness, TypedArrayRounding rounding)
    2663 {
     2628void SpeculativeJIT::compilePutByValForIntTypedArray(GPRReg base, GPRReg property, Node* node, TypedArrayType type)
     2629{
     2630    ASSERT(isInt(type));
     2631   
    26642632    StorageOperand storage(this, m_jit.graph().varArgChild(node, 3));
    26652633    GPRReg storageReg = storage.gpr();
     
    26782646        }
    26792647        double d = jsValue.asNumber();
    2680         if (rounding == ClampRounding) {
    2681             ASSERT(elementSize == 1);
     2648        if (isClamped(type)) {
     2649            ASSERT(elementSize(type) == 1);
    26822650            d = clampDoubleToByte(d);
    26832651        }
     
    26942662            GPRReg scratchReg = scratch.gpr();
    26952663            m_jit.move(valueOp.gpr(), scratchReg);
    2696             if (rounding == ClampRounding) {
    2697                 ASSERT(elementSize == 1);
     2664            if (isClamped(type)) {
     2665                ASSERT(elementSize(type) == 1);
    26982666                compileClampIntegerToByte(m_jit, scratchReg);
    26992667            }
     
    27042672           
    27052673        case NumberUse: {
    2706             if (rounding == ClampRounding) {
    2707                 ASSERT(elementSize == 1);
     2674            if (isClamped(type)) {
     2675                ASSERT(elementSize(type) == 1);
    27082676                SpeculateDoubleOperand valueOp(this, valueUse);
    27092677                GPRTemporary result(this);
     
    27252693               
    27262694                MacroAssembler::Jump failed;
    2727                 if (signedness == SignedTypedArray)
     2695                if (isSigned(type))
    27282696                    failed = m_jit.branchTruncateDoubleToInt32(fpr, gpr, MacroAssembler::BranchIfTruncateFailed);
    27292697                else
     
    27502718    MacroAssembler::Jump outOfBounds;
    27512719    if (node->op() == PutByVal)
    2752         outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, property, MacroAssembler::Address(base, descriptor.m_lengthOffset));
    2753 
    2754     switch (elementSize) {
     2720        outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, property, MacroAssembler::Address(base, JSArrayBufferView::offsetOfLength()));
     2721
     2722    switch (elementSize(type)) {
    27552723    case 1:
    27562724        m_jit.store8(value.gpr(), MacroAssembler::BaseIndex(storageReg, property, MacroAssembler::TimesOne));
     
    27702738}
    27712739
    2772 void SpeculativeJIT::compileGetByValOnFloatTypedArray(const TypedArrayDescriptor& descriptor, Node* node, size_t elementSize)
    2773 {
     2740void SpeculativeJIT::compileGetByValOnFloatTypedArray(Node* node, TypedArrayType type)
     2741{
     2742    ASSERT(isFloat(type));
     2743   
    27742744    SpeculateCellOperand base(this, node->child1());
    27752745    SpeculateStrictInt32Operand property(this, node->child2());
     
    27872757        Uncountable, JSValueRegs(), 0,
    27882758        m_jit.branch32(
    2789             MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(baseReg, descriptor.m_lengthOffset)));
    2790     switch (elementSize) {
     2759            MacroAssembler::AboveOrEqual, propertyReg,
     2760            MacroAssembler::Address(baseReg, JSArrayBufferView::offsetOfLength())));
     2761    switch (elementSize(type)) {
    27912762    case 4:
    27922763        m_jit.loadFloat(MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesFour), resultReg);
     
    28092780}
    28102781
    2811 void SpeculativeJIT::compilePutByValForFloatTypedArray(const TypedArrayDescriptor& descriptor, GPRReg base, GPRReg property, Node* node, size_t elementSize)
    2812 {
     2782void SpeculativeJIT::compilePutByValForFloatTypedArray(GPRReg base, GPRReg property, Node* node, TypedArrayType type)
     2783{
     2784    ASSERT(isFloat(type));
     2785   
    28132786    StorageOperand storage(this, m_jit.graph().varArgChild(node, 3));
    28142787    GPRReg storageReg = storage.gpr();
     
    28252798   
    28262799    MacroAssembler::Jump outOfBounds;
    2827     if (node->op() == PutByVal)
    2828         outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, property, MacroAssembler::Address(base, descriptor.m_lengthOffset));
    2829    
    2830     switch (elementSize) {
     2800    if (node->op() == PutByVal) {
     2801        outOfBounds = m_jit.branch32(
     2802            MacroAssembler::AboveOrEqual, property,
     2803            MacroAssembler::Address(base, JSArrayBufferView::offsetOfLength()));
     2804    }
     2805   
     2806    switch (elementSize(type)) {
    28312807    case 4: {
    28322808        m_jit.moveDouble(valueFPR, scratchFPR);
     
    40344010    GPRReg storageReg = storage.gpr();
    40354011   
    4036     const TypedArrayDescriptor* descriptor = typedArrayDescriptor(node->arrayMode());
    4037    
    40384012    switch (node->arrayMode().type()) {
    40394013    case Array::String:
     
    40494023       
    40504024    default:
    4051         ASSERT(descriptor);
    4052         m_jit.loadPtr(MacroAssembler::Address(baseReg, descriptor->m_storageOffset), storageReg);
     4025        ASSERT(isTypedView(node->arrayMode().typedArrayType()));
     4026        m_jit.loadPtr(
     4027            MacroAssembler::Address(baseReg, JSArrayBufferView::offsetOfVector()),
     4028            storageReg);
    40534029        break;
    40544030    }
     
    41514127void SpeculativeJIT::compileGetArrayLength(Node* node)
    41524128{
    4153     const TypedArrayDescriptor* descriptor = typedArrayDescriptor(node->arrayMode());
    4154 
    41554129    switch (node->arrayMode().type()) {
    41564130    case Array::Int32:
     
    41924166        break;
    41934167    }
    4194     default:
     4168    default: {
     4169        ASSERT(isTypedView(node->arrayMode().typedArrayType()));
    41954170        SpeculateCellOperand base(this, node->child1());
    41964171        GPRTemporary result(this, base);
    41974172        GPRReg baseGPR = base.gpr();
    41984173        GPRReg resultGPR = result.gpr();
    4199         ASSERT(descriptor);
    4200         m_jit.load32(MacroAssembler::Address(baseGPR, descriptor->m_lengthOffset), resultGPR);
     4174        m_jit.load32(MacroAssembler::Address(baseGPR, JSArrayBufferView::offsetOfLength()), resultGPR);
    42014175        integerResult(resultGPR, node);
    42024176        break;
    4203     }
     4177    } }
    42044178}
    42054179
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r154052 r154127  
    19741974    void compileArithMod(Node*);
    19751975    void compileGetIndexedPropertyStorage(Node*);
    1976     void compileGetByValOnIntTypedArray(const TypedArrayDescriptor&, Node*, size_t elementSize, TypedArraySignedness);
    1977     void compilePutByValForIntTypedArray(const TypedArrayDescriptor&, GPRReg base, GPRReg property, Node*, size_t elementSize, TypedArraySignedness, TypedArrayRounding = TruncateRounding);
    1978     void compileGetByValOnFloatTypedArray(const TypedArrayDescriptor&, Node*, size_t elementSize);
    1979     void compilePutByValForFloatTypedArray(const TypedArrayDescriptor&, GPRReg base, GPRReg property, Node*, size_t elementSize);
     1976    void compileGetByValOnIntTypedArray(Node*, TypedArrayType);
     1977    void compilePutByValForIntTypedArray(GPRReg base, GPRReg property, Node*, TypedArrayType);
     1978    void compileGetByValOnFloatTypedArray(Node*, TypedArrayType);
     1979    void compilePutByValForFloatTypedArray(GPRReg base, GPRReg property, Node*, TypedArrayType);
    19801980    void compileNewFunctionNoCheck(Node*);
    19811981    void compileNewFunctionExpression(Node*);
     
    21192119    void speculate(Node*, Edge);
    21202120   
    2121     const TypedArrayDescriptor* typedArrayDescriptor(ArrayMode);
    2122    
    21232121    JITCompiler::Jump jumpSlowForUnwantedArrayMode(GPRReg tempWithIndexingTypeReg, ArrayMode, IndexingType);
    21242122    JITCompiler::JumpList jumpSlowForUnwantedArrayMode(GPRReg tempWithIndexingTypeReg, ArrayMode);
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r153793 r154127  
    26682668            compileGetByValOnArguments(node);
    26692669            break;
    2670         case Array::Int8Array:
    2671             compileGetByValOnIntTypedArray(m_jit.vm()->int8ArrayDescriptor(), node, sizeof(int8_t), SignedTypedArray);
    2672             break;
    2673         case Array::Int16Array:
    2674             compileGetByValOnIntTypedArray(m_jit.vm()->int16ArrayDescriptor(), node, sizeof(int16_t), SignedTypedArray);
    2675             break;
    2676         case Array::Int32Array:
    2677             compileGetByValOnIntTypedArray(m_jit.vm()->int32ArrayDescriptor(), node, sizeof(int32_t), SignedTypedArray);
    2678             break;
    2679         case Array::Uint8Array:
    2680             compileGetByValOnIntTypedArray(m_jit.vm()->uint8ArrayDescriptor(), node, sizeof(uint8_t), UnsignedTypedArray);
    2681             break;
    2682         case Array::Uint8ClampedArray:
    2683             compileGetByValOnIntTypedArray(m_jit.vm()->uint8ClampedArrayDescriptor(), node, sizeof(uint8_t), UnsignedTypedArray);
    2684             break;
    2685         case Array::Uint16Array:
    2686             compileGetByValOnIntTypedArray(m_jit.vm()->uint16ArrayDescriptor(), node, sizeof(uint16_t), UnsignedTypedArray);
    2687             break;
    2688         case Array::Uint32Array:
    2689             compileGetByValOnIntTypedArray(m_jit.vm()->uint32ArrayDescriptor(), node, sizeof(uint32_t), UnsignedTypedArray);
    2690             break;
    2691         case Array::Float32Array:
    2692             compileGetByValOnFloatTypedArray(m_jit.vm()->float32ArrayDescriptor(), node, sizeof(float));
    2693             break;
    2694         case Array::Float64Array:
    2695             compileGetByValOnFloatTypedArray(m_jit.vm()->float64ArrayDescriptor(), node, sizeof(double));
    2696             break;
    2697         default:
    2698             RELEASE_ASSERT_NOT_REACHED();
    2699             break;
    2700         }
     2670        default: {
     2671            TypedArrayType type = arrayMode.typedArrayType();
     2672            if (isInt(type))
     2673                compileGetByValForIntTypedArray(node, type);
     2674            else
     2675                compileGetByValForFloatTypedArray(node, type);
     2676        } }
    27012677        break;
    27022678    }
     
    28742850            break;
    28752851           
    2876         case Array::Int8Array:
    2877             compilePutByValForIntTypedArray(m_jit.vm()->int8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int8_t), SignedTypedArray);
    2878             break;
    2879            
    2880         case Array::Int16Array:
    2881             compilePutByValForIntTypedArray(m_jit.vm()->int16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int16_t), SignedTypedArray);
    2882             break;
    2883            
    2884         case Array::Int32Array:
    2885             compilePutByValForIntTypedArray(m_jit.vm()->int32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int32_t), SignedTypedArray);
    2886             break;
    2887            
    2888         case Array::Uint8Array:
    2889             compilePutByValForIntTypedArray(m_jit.vm()->uint8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint8_t), UnsignedTypedArray);
    2890             break;
    2891            
    2892         case Array::Uint8ClampedArray:
    2893             compilePutByValForIntTypedArray(m_jit.vm()->uint8ClampedArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint8_t), UnsignedTypedArray, ClampRounding);
    2894             break;
    2895            
    2896         case Array::Uint16Array:
    2897             compilePutByValForIntTypedArray(m_jit.vm()->uint16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint16_t), UnsignedTypedArray);
    2898             break;
    2899            
    2900         case Array::Uint32Array:
    2901             compilePutByValForIntTypedArray(m_jit.vm()->uint32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint32_t), UnsignedTypedArray);
    2902             break;
    2903            
    2904         case Array::Float32Array:
    2905             compilePutByValForFloatTypedArray(m_jit.vm()->float32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(float));
    2906             break;
    2907            
    2908         case Array::Float64Array:
    2909             compilePutByValForFloatTypedArray(m_jit.vm()->float64ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(double));
    2910             break;
    2911            
    2912         default:
    2913             RELEASE_ASSERT_NOT_REACHED();
    2914             break;
    2915         }
     2852        default: {
     2853            TypedArrayType type = arrayMode.typedArrayType();
     2854            if (isInt(type))
     2855                compilePutByValForIntTypedArray(base.gpr(), property.gpr(), node, type);
     2856            else
     2857                compilePutByValForFloatTypedArray(base.gpr(), property.gpr(), node, type);
     2858        } }
    29162859        break;
    29172860    }
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r153778 r154127  
    25822582            compileGetByValOnArguments(node);
    25832583            break;
    2584         case Array::Int8Array:
    2585             compileGetByValOnIntTypedArray(m_jit.vm()->int8ArrayDescriptor(), node, sizeof(int8_t), SignedTypedArray);
    2586             break;
    2587         case Array::Int16Array:
    2588             compileGetByValOnIntTypedArray(m_jit.vm()->int16ArrayDescriptor(), node, sizeof(int16_t), SignedTypedArray);
    2589             break;
    2590         case Array::Int32Array:
    2591             compileGetByValOnIntTypedArray(m_jit.vm()->int32ArrayDescriptor(), node, sizeof(int32_t), SignedTypedArray);
    2592             break;
    2593         case Array::Uint8Array:
    2594             compileGetByValOnIntTypedArray(m_jit.vm()->uint8ArrayDescriptor(), node, sizeof(uint8_t), UnsignedTypedArray);
    2595             break;
    2596         case Array::Uint8ClampedArray:
    2597             compileGetByValOnIntTypedArray(m_jit.vm()->uint8ClampedArrayDescriptor(), node, sizeof(uint8_t), UnsignedTypedArray);
    2598             break;
    2599         case Array::Uint16Array:
    2600             compileGetByValOnIntTypedArray(m_jit.vm()->uint16ArrayDescriptor(), node, sizeof(uint16_t), UnsignedTypedArray);
    2601             break;
    2602         case Array::Uint32Array:
    2603             compileGetByValOnIntTypedArray(m_jit.vm()->uint32ArrayDescriptor(), node, sizeof(uint32_t), UnsignedTypedArray);
    2604             break;
    2605         case Array::Float32Array:
    2606             compileGetByValOnFloatTypedArray(m_jit.vm()->float32ArrayDescriptor(), node, sizeof(float));
    2607             break;
    2608         case Array::Float64Array:
    2609             compileGetByValOnFloatTypedArray(m_jit.vm()->float64ArrayDescriptor(), node, sizeof(double));
    2610             break;
    2611         default:
    2612             RELEASE_ASSERT_NOT_REACHED();
    2613             break;
    2614         }
     2584        default: {
     2585            TypedArrayType type = node->arrayMode().typedArrayType();
     2586            if (isInt(type))
     2587                compileGetByValOnIntTypedArray(node, type);
     2588            else
     2589                compileGetByValOnFloatTypedArray(node, type);
     2590        } }
    26152591        break;
    26162592    }
     
    28732849        }
    28742850           
    2875         case Array::Int8Array:
    2876             compilePutByValForIntTypedArray(m_jit.vm()->int8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int8_t), SignedTypedArray);
    2877             break;
    2878            
    2879         case Array::Int16Array:
    2880             compilePutByValForIntTypedArray(m_jit.vm()->int16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int16_t), SignedTypedArray);
    2881             break;
    2882            
    2883         case Array::Int32Array:
    2884             compilePutByValForIntTypedArray(m_jit.vm()->int32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int32_t), SignedTypedArray);
    2885             break;
    2886            
    2887         case Array::Uint8Array:
    2888             compilePutByValForIntTypedArray(m_jit.vm()->uint8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint8_t), UnsignedTypedArray);
    2889             break;
    2890            
    2891         case Array::Uint8ClampedArray:
    2892             compilePutByValForIntTypedArray(m_jit.vm()->uint8ClampedArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint8_t), UnsignedTypedArray, ClampRounding);
    2893             break;
    2894            
    2895         case Array::Uint16Array:
    2896             compilePutByValForIntTypedArray(m_jit.vm()->uint16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint16_t), UnsignedTypedArray);
    2897             break;
    2898            
    2899         case Array::Uint32Array:
    2900             compilePutByValForIntTypedArray(m_jit.vm()->uint32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint32_t), UnsignedTypedArray);
    2901             break;
    2902            
    2903         case Array::Float32Array:
    2904             compilePutByValForFloatTypedArray(m_jit.vm()->float32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(float));
    2905             break;
    2906            
    2907         case Array::Float64Array:
    2908             compilePutByValForFloatTypedArray(m_jit.vm()->float64ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(double));
    2909             break;
    2910            
    2911         default:
    2912             RELEASE_ASSERT_NOT_REACHED();
    2913             break;
    2914         }
     2851        default: {
     2852            TypedArrayType type = arrayMode.typedArrayType();
     2853            if (isInt(type))
     2854                compilePutByValForIntTypedArray(base.gpr(), property.gpr(), node, type);
     2855            else
     2856                compilePutByValForFloatTypedArray(base.gpr(), property.gpr(), node, type);
     2857        } }
    29152858
    29162859        break;
  • trunk/Source/JavaScriptCore/heap/CopyToken.h

    r153720 r154127  
    3030
    3131enum CopyToken {
    32     ButterflyCopyToken
     32    ButterflyCopyToken,
     33    TypedArrayVectorCopyToken
    3334};
    3435
  • trunk/Source/JavaScriptCore/heap/DeferGC.h

    r153169 r154127  
    5050};
    5151
     52class DeferGCForAWhile {
     53    WTF_MAKE_NONCOPYABLE(DeferGCForAWhile);
     54public:
     55    DeferGCForAWhile(Heap& heap)
     56        : m_heap(heap)
     57    {
     58        m_heap.incrementDeferralDepth();
     59    }
     60   
     61    ~DeferGCForAWhile()
     62    {
     63        m_heap.decrementDeferralDepth();
     64    }
     65
     66private:
     67    Heap& m_heap;
     68};
     69
    5270} // namespace JSC
    5371
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r154032 r154127  
    2929#include "DFGWorklist.h"
    3030#include "GCActivityCallback.h"
     31#include "GCIncomingRefCountedSetInlines.h"
    3132#include "HeapRootVisitor.h"
    3233#include "HeapStatistics.h"
     
    359360}
    360361
     362void Heap::addReference(JSCell* cell, ArrayBuffer* buffer)
     363{
     364    if (m_arrayBuffers.addReference(cell, buffer)) {
     365        collectIfNecessaryOrDefer();
     366        didAllocate(buffer->gcSizeEstimateInBytes());
     367    }
     368}
     369
    361370void Heap::markProtectedObjects(HeapRootVisitor& heapRootVisitor)
    362371{
     
    622631}
    623632
     633size_t Heap::extraSize()
     634{
     635    return m_extraMemoryUsage + m_arrayBuffers.size();
     636}
     637
    624638size_t Heap::size()
    625639{
    626     return m_objectSpace.size() + m_storageSpace.size() + m_extraMemoryUsage;
     640    return m_objectSpace.size() + m_storageSpace.size() + extraSize();
    627641}
    628642
    629643size_t Heap::capacity()
    630644{
    631     return m_objectSpace.capacity() + m_storageSpace.capacity();
     645    return m_objectSpace.capacity() + m_storageSpace.capacity() + extraSize();
    632646}
    633647
     
    707721    dataLogF("JSC GC starting collection.\n");
    708722#endif
     723   
     724    double before = 0;
     725    if (Options::logGC()) {
     726        dataLog("[GC", sweepToggle == DoSweep ? " (eager sweep)" : "", ": ");
     727        before = currentTimeMS();
     728    }
    709729   
    710730    SamplingRegion samplingRegion("Garbage Collection");
     
    746766
    747767    JAVASCRIPTCORE_GC_MARKED();
     768   
     769    {
     770        GCPHASE(SweepingArrayBuffers);
     771        m_arrayBuffers.sweep();
     772    }
    748773
    749774    {
     
    816841    if (Options::showObjectStatistics())
    817842        HeapStatistics::showObjectStatistics(this);
     843   
     844    if (Options::logGC()) {
     845        double after = currentTimeMS();
     846        dataLog(after - before, " ms, ", currentHeapSize / 1024, " kb]\n");
     847    }
    818848
    819849#if ENABLE(ALLOCATION_LOGGING)
     
    925955}
    926956
     957void Heap::decrementDeferralDepth()
     958{
     959    RELEASE_ASSERT(m_deferralDepth >= 1);
     960   
     961    m_deferralDepth--;
     962}
     963
    927964void Heap::decrementDeferralDepthAndGCIfNeeded()
    928965{
    929     RELEASE_ASSERT(m_deferralDepth >= 1);
    930    
    931     m_deferralDepth--;
    932    
     966    decrementDeferralDepth();
    933967    collectIfNecessaryOrDefer();
    934968}
  • trunk/Source/JavaScriptCore/heap/Heap.h

    r153276 r154127  
    2323#define Heap_h
    2424
     25#include "ArrayBuffer.h"
    2526#include "BlockAllocator.h"
    2627#include "CopyVisitor.h"
    2728#include "DFGCodeBlocks.h"
     29#include "GCIncomingRefCountedSet.h"
    2830#include "GCThreadSharedData.h"
    2931#include "HandleSet.h"
     
    145147        void jettisonDFGCodeBlock(PassRefPtr<CodeBlock>);
    146148
     149        size_t extraSize(); // extra memory usage outside of pages allocated by the heap
    147150        JS_EXPORT_PRIVATE size_t size();
    148151        JS_EXPORT_PRIVATE size_t capacity();
     
    180183       
    181184        const JITStubRoutineSet& jitStubRoutines() { return m_jitStubRoutines; }
     185       
     186        void addReference(JSCell*, ArrayBuffer*);
    182187
    183188    private:
     
    185190        friend class CopiedBlock;
    186191        friend class DeferGC;
     192        friend class DeferGCForAWhile;
    187193        friend class GCAwareJITStubRoutine;
    188194        friend class HandleSet;
     
    231237       
    232238        void incrementDeferralDepth();
     239        void decrementDeferralDepth();
    233240        void decrementDeferralDepthAndGCIfNeeded();
    234241
     
    246253        MarkedSpace m_objectSpace;
    247254        CopiedSpace m_storageSpace;
     255        GCIncomingRefCountedSet<ArrayBuffer> m_arrayBuffers;
    248256        size_t m_extraMemoryUsage;
    249257
  • trunk/Source/JavaScriptCore/heap/WeakInlines.h

    r148479 r154127  
    9292template<typename T> inline bool Weak<T>::was(T* other) const
    9393{
    94     return jsCast<T*>(m_impl->jsValue().asCell()) == other;
     94    return static_cast<T*>(m_impl->jsValue().asCell()) == other;
    9595}
    9696
  • trunk/Source/JavaScriptCore/interpreter/CallFrame.h

    r153299 r154127  
    8888        static const HashTable* arrayPrototypeTable(CallFrame* callFrame) { return callFrame->vm().arrayPrototypeTable; }
    8989        static const HashTable* booleanPrototypeTable(CallFrame* callFrame) { return callFrame->vm().booleanPrototypeTable; }
     90        static const HashTable* dataViewTable(CallFrame* callFrame) { return callFrame->vm().dataViewTable; }
    9091        static const HashTable* dateTable(CallFrame* callFrame) { return callFrame->vm().dateTable; }
    9192        static const HashTable* dateConstructorTable(CallFrame* callFrame) { return callFrame->vm().dateConstructorTable; }
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r153962 r154127  
    483483        JumpList emitContiguousGetByVal(Instruction*, PatchableJump& badType, IndexingType expectedShape = ContiguousShape);
    484484        JumpList emitArrayStorageGetByVal(Instruction*, PatchableJump& badType);
    485         JumpList emitIntTypedArrayGetByVal(Instruction*, PatchableJump& badType, const TypedArrayDescriptor&, size_t elementSize, TypedArraySignedness);
    486         JumpList emitFloatTypedArrayGetByVal(Instruction*, PatchableJump& badType, const TypedArrayDescriptor&, size_t elementSize);
     485        JumpList emitIntTypedArrayGetByVal(Instruction*, PatchableJump& badType, TypedArrayType);
     486        JumpList emitFloatTypedArrayGetByVal(Instruction*, PatchableJump& badType, TypedArrayType);
    487487       
    488488        // Property is in regT0, base is in regT0. regT2 contains indecing type.
     
    504504        JumpList emitGenericContiguousPutByVal(Instruction*, PatchableJump& badType, IndexingType indexingShape = ContiguousShape);
    505505        JumpList emitArrayStoragePutByVal(Instruction*, PatchableJump& badType);
    506         JumpList emitIntTypedArrayPutByVal(Instruction*, PatchableJump& badType, const TypedArrayDescriptor&, size_t elementSize, TypedArraySignedness, TypedArrayRounding);
    507         JumpList emitFloatTypedArrayPutByVal(Instruction*, PatchableJump& badType, const TypedArrayDescriptor&, size_t elementSize);
     506        JumpList emitIntTypedArrayPutByVal(Instruction*, PatchableJump& badType, TypedArrayType);
     507        JumpList emitFloatTypedArrayPutByVal(Instruction*, PatchableJump& badType, TypedArrayType);
    508508       
    509509        enum FinalObjectMode { MayBeFinal, KnownNotFinal };
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r153962 r154127  
    15501550        slowCases = emitArrayStorageGetByVal(currentInstruction, badType);
    15511551        break;
    1552     case JITInt8Array:
    1553         slowCases = emitIntTypedArrayGetByVal(currentInstruction, badType, m_vm->int8ArrayDescriptor(), 1, SignedTypedArray);
    1554         break;
    1555     case JITInt16Array:
    1556         slowCases = emitIntTypedArrayGetByVal(currentInstruction, badType, m_vm->int16ArrayDescriptor(), 2, SignedTypedArray);
    1557         break;
    1558     case JITInt32Array:
    1559         slowCases = emitIntTypedArrayGetByVal(currentInstruction, badType, m_vm->int32ArrayDescriptor(), 4, SignedTypedArray);
    1560         break;
    1561     case JITUint8Array:
    1562         slowCases = emitIntTypedArrayGetByVal(currentInstruction, badType, m_vm->uint8ArrayDescriptor(), 1, UnsignedTypedArray);
    1563         break;
    1564     case JITUint8ClampedArray:
    1565         slowCases = emitIntTypedArrayGetByVal(currentInstruction, badType, m_vm->uint8ClampedArrayDescriptor(), 1, UnsignedTypedArray);
    1566         break;
    1567     case JITUint16Array:
    1568         slowCases = emitIntTypedArrayGetByVal(currentInstruction, badType, m_vm->uint16ArrayDescriptor(), 2, UnsignedTypedArray);
    1569         break;
    1570     case JITUint32Array:
    1571         slowCases = emitIntTypedArrayGetByVal(currentInstruction, badType, m_vm->uint32ArrayDescriptor(), 4, UnsignedTypedArray);
    1572         break;
    1573     case JITFloat32Array:
    1574         slowCases = emitFloatTypedArrayGetByVal(currentInstruction, badType, m_vm->float32ArrayDescriptor(), 4);
    1575         break;
    1576     case JITFloat64Array:
    1577         slowCases = emitFloatTypedArrayGetByVal(currentInstruction, badType, m_vm->float64ArrayDescriptor(), 8);
    1578         break;
    15791552    default:
    1580         CRASH();
     1553        TypedArrayType type = typedArrayTypeForJITArrayMode(arrayMode);
     1554        if (isInt(type))
     1555            slowCases = emitIntTypedArrayGetByVal(currentInstruction, badType, type);
     1556        else
     1557            slowCases = emitFloatTypedArrayGetByVal(currentInstruction, badType, type);
     1558        break;
    15811559    }
    15821560   
     
    16191597        slowCases = emitArrayStoragePutByVal(currentInstruction, badType);
    16201598        break;
    1621     case JITInt8Array:
    1622         slowCases = emitIntTypedArrayPutByVal(currentInstruction, badType, m_vm->int8ArrayDescriptor(), 1, SignedTypedArray, TruncateRounding);
    1623         break;
    1624     case JITInt16Array:
    1625         slowCases = emitIntTypedArrayPutByVal(currentInstruction, badType, m_vm->int16ArrayDescriptor(), 2, SignedTypedArray, TruncateRounding);
    1626         break;
    1627     case JITInt32Array:
    1628         slowCases = emitIntTypedArrayPutByVal(currentInstruction, badType, m_vm->int32ArrayDescriptor(), 4, SignedTypedArray, TruncateRounding);
    1629         break;
    1630     case JITUint8Array:
    1631         slowCases = emitIntTypedArrayPutByVal(currentInstruction, badType, m_vm->uint8ArrayDescriptor(), 1, UnsignedTypedArray, TruncateRounding);
    1632         break;
    1633     case JITUint8ClampedArray:
    1634         slowCases = emitIntTypedArrayPutByVal(currentInstruction, badType, m_vm->uint8ClampedArrayDescriptor(), 1, UnsignedTypedArray, ClampRounding);
    1635         break;
    1636     case JITUint16Array:
    1637         slowCases = emitIntTypedArrayPutByVal(currentInstruction, badType, m_vm->uint16ArrayDescriptor(), 2, UnsignedTypedArray, TruncateRounding);
    1638         break;
    1639     case JITUint32Array:
    1640         slowCases = emitIntTypedArrayPutByVal(currentInstruction, badType, m_vm->uint32ArrayDescriptor(), 4, UnsignedTypedArray, TruncateRounding);
    1641         break;
    1642     case JITFloat32Array:
    1643         slowCases = emitFloatTypedArrayPutByVal(currentInstruction, badType, m_vm->float32ArrayDescriptor(), 4);
    1644         break;
    1645     case JITFloat64Array:
    1646         slowCases = emitFloatTypedArrayPutByVal(currentInstruction, badType, m_vm->float64ArrayDescriptor(), 8);
    1647         break;
    16481599    default:
    1649         CRASH();
     1600        TypedArrayType type = typedArrayTypeForJITArrayMode(arrayMode);
     1601        if (isInt(type))
     1602            slowCases = emitIntTypedArrayPutByVal(currentInstruction, badType, type);
     1603        else
     1604            slowCases = emitFloatTypedArrayPutByVal(currentInstruction, badType, type);
    16501605        break;
    16511606    }
     
    16691624}
    16701625
    1671 JIT::JumpList JIT::emitIntTypedArrayGetByVal(Instruction*, PatchableJump& badType, const TypedArrayDescriptor& descriptor, size_t elementSize, TypedArraySignedness signedness)
    1672 {
     1626JIT::JumpList JIT::emitIntTypedArrayGetByVal(Instruction*, PatchableJump& badType, TypedArrayType type)
     1627{
     1628    ASSERT(isInt(type));
     1629   
    16731630    // The best way to test the array type is to use the classInfo. We need to do so without
    16741631    // clobbering the register that holds the indexing type, base, and property.
     
    16901647   
    16911648    loadPtr(Address(base, JSCell::structureOffset()), scratch);
    1692     badType = patchableBranchPtr(NotEqual, Address(scratch, Structure::classInfoOffset()), TrustedImmPtr(descriptor.m_classInfo));
    1693     slowCases.append(branch32(AboveOrEqual, property, Address(base, descriptor.m_lengthOffset)));
    1694     loadPtr(Address(base, descriptor.m_storageOffset), base);
    1695    
    1696     switch (elementSize) {
     1649    badType = patchableBranchPtr(NotEqual, Address(scratch, Structure::classInfoOffset()), TrustedImmPtr(classInfoForType(type)));
     1650    slowCases.append(branch32(AboveOrEqual, property, Address(base, JSArrayBufferView::offsetOfLength())));
     1651    loadPtr(Address(base, JSArrayBufferView::offsetOfVector()), base);
     1652   
     1653    switch (elementSize(type)) {
    16971654    case 1:
    1698         if (signedness == SignedTypedArray)
     1655        if (isSigned(type))
    16991656            load8Signed(BaseIndex(base, property, TimesOne), resultPayload);
    17001657        else
     
    17021659        break;
    17031660    case 2:
    1704         if (signedness == SignedTypedArray)
     1661        if (isSigned(type))
    17051662            load16Signed(BaseIndex(base, property, TimesTwo), resultPayload);
    17061663        else
     
    17151672   
    17161673    Jump done;
    1717     if (elementSize == 4 && signedness == UnsignedTypedArray) {
     1674    if (type == TypeUint32) {
    17181675        Jump canBeInt = branch32(GreaterThanOrEqual, resultPayload, TrustedImm32(0));
    17191676       
     
    17411698}
    17421699
    1743 JIT::JumpList JIT::emitFloatTypedArrayGetByVal(Instruction*, PatchableJump& badType, const TypedArrayDescriptor& descriptor, size_t elementSize)
    1744 {
     1700JIT::JumpList JIT::emitFloatTypedArrayGetByVal(Instruction*, PatchableJump& badType, TypedArrayType type)
     1701{
     1702    ASSERT(isFloat(type));
     1703   
    17451704#if USE(JSVALUE64)
    17461705    RegisterID base = regT0;
     
    17591718   
    17601719    loadPtr(Address(base, JSCell::structureOffset()), scratch);
    1761     badType = patchableBranchPtr(NotEqual, Address(scratch, Structure::classInfoOffset()), TrustedImmPtr(descriptor.m_classInfo));
    1762     slowCases.append(branch32(AboveOrEqual, property, Address(base, descriptor.m_lengthOffset)));
    1763     loadPtr(Address(base, descriptor.m_storageOffset), base);
    1764    
    1765     switch (elementSize) {
     1720    badType = patchableBranchPtr(NotEqual, Address(scratch, Structure::classInfoOffset()), TrustedImmPtr(classInfoForType(type)));
     1721    slowCases.append(branch32(AboveOrEqual, property, Address(base, JSArrayBufferView::offsetOfLength())));
     1722    loadPtr(Address(base, JSArrayBufferView::offsetOfVector()), base);
     1723   
     1724    switch (elementSize(type)) {
    17661725    case 4:
    17671726        loadFloat(BaseIndex(base, property, TimesFour), fpRegT0);
     
    17901749}
    17911750
    1792 JIT::JumpList JIT::emitIntTypedArrayPutByVal(Instruction* currentInstruction, PatchableJump& badType, const TypedArrayDescriptor& descriptor, size_t elementSize, TypedArraySignedness signedness, TypedArrayRounding rounding)
    1793 {
     1751JIT::JumpList JIT::emitIntTypedArrayPutByVal(Instruction* currentInstruction, PatchableJump& badType, TypedArrayType type)
     1752{
     1753    ASSERT(isInt(type));
     1754   
    17941755    unsigned value = currentInstruction[3].u.operand;
    17951756
     
    18091770   
    18101771    loadPtr(Address(base, JSCell::structureOffset()), earlyScratch);
    1811     badType = patchableBranchPtr(NotEqual, Address(earlyScratch, Structure::classInfoOffset()), TrustedImmPtr(descriptor.m_classInfo));
    1812     slowCases.append(branch32(AboveOrEqual, property, Address(base, descriptor.m_lengthOffset)));
     1772    badType = patchableBranchPtr(NotEqual, Address(earlyScratch, Structure::classInfoOffset()), TrustedImmPtr(classInfoForType(type)));
     1773    slowCases.append(branch32(AboveOrEqual, property, Address(base, JSArrayBufferView::offsetOfLength())));
    18131774   
    18141775#if USE(JSVALUE64)
     
    18221783    // We would be loading this into base as in get_by_val, except that the slow
    18231784    // path expects the base to be unclobbered.
    1824     loadPtr(Address(base, descriptor.m_storageOffset), lateScratch);
    1825    
    1826     if (rounding == ClampRounding) {
    1827         ASSERT(elementSize == 1);
    1828         ASSERT_UNUSED(signedness, signedness = UnsignedTypedArray);
     1785    loadPtr(Address(base, JSArrayBufferView::offsetOfVector()), lateScratch);
     1786   
     1787    if (isClamped(type)) {
     1788        ASSERT(elementSize(type) == 1);
     1789        ASSERT(!isSigned(type));
    18291790        Jump inBounds = branch32(BelowOrEqual, earlyScratch, TrustedImm32(0xff));
    18301791        Jump tooBig = branch32(GreaterThan, earlyScratch, TrustedImm32(0xff));
     
    18371798    }
    18381799   
    1839     switch (elementSize) {
     1800    switch (elementSize(type)) {
    18401801    case 1:
    18411802        store8(earlyScratch, BaseIndex(lateScratch, property, TimesOne));
     
    18541815}
    18551816
    1856 JIT::JumpList JIT::emitFloatTypedArrayPutByVal(Instruction* currentInstruction, PatchableJump& badType, const TypedArrayDescriptor& descriptor, size_t elementSize)
    1857 {
     1817JIT::JumpList JIT::emitFloatTypedArrayPutByVal(Instruction* currentInstruction, PatchableJump& badType, TypedArrayType type)
     1818{
     1819    ASSERT(isFloat(type));
     1820   
    18581821    unsigned value = currentInstruction[3].u.operand;
    18591822
     
    18731836   
    18741837    loadPtr(Address(base, JSCell::structureOffset()), earlyScratch);
    1875     badType = patchableBranchPtr(NotEqual, Address(earlyScratch, Structure::classInfoOffset()), TrustedImmPtr(descriptor.m_classInfo));
    1876     slowCases.append(branch32(AboveOrEqual, property, Address(base, descriptor.m_lengthOffset)));
     1838    badType = patchableBranchPtr(NotEqual, Address(earlyScratch, Structure::classInfoOffset()), TrustedImmPtr(classInfoForType(type)));
     1839    slowCases.append(branch32(AboveOrEqual, property, Address(base, JSArrayBufferView::offsetOfLength())));
    18771840   
    18781841#if USE(JSVALUE64)
     
    18991862    // We would be loading this into base as in get_by_val, except that the slow
    19001863    // path expects the base to be unclobbered.
    1901     loadPtr(Address(base, descriptor.m_storageOffset), lateScratch);
    1902    
    1903     switch (elementSize) {
     1864    loadPtr(Address(base, JSArrayBufferView::offsetOfVector()), lateScratch);
     1865   
     1866    switch (elementSize(type)) {
    19041867    case 4:
    19051868        convertDoubleToFloat(fpRegT0, fpRegT0);
  • trunk/Source/JavaScriptCore/jsc.cpp

    r154038 r154127  
    3434#include "Interpreter.h"
    3535#include "JSArray.h"
    36 #include "JSCTypedArrayStubs.h"
    3736#include "JSFunction.h"
    3837#include "JSLock.h"
     
    239238#endif
    240239       
    241         addConstructableFunction(vm, "Uint8Array", constructJSUint8Array, 1);
    242         addConstructableFunction(vm, "Uint8ClampedArray", constructJSUint8ClampedArray, 1);
    243         addConstructableFunction(vm, "Uint16Array", constructJSUint16Array, 1);
    244         addConstructableFunction(vm, "Uint32Array", constructJSUint32Array, 1);
    245         addConstructableFunction(vm, "Int8Array", constructJSInt8Array, 1);
    246         addConstructableFunction(vm, "Int16Array", constructJSInt16Array, 1);
    247         addConstructableFunction(vm, "Int32Array", constructJSInt32Array, 1);
    248         addConstructableFunction(vm, "Float32Array", constructJSFloat32Array, 1);
    249         addConstructableFunction(vm, "Float64Array", constructJSFloat64Array, 1);
    250 
    251240        JSArray* array = constructEmptyArray(globalExec(), 0);
    252241        for (size_t i = 0; i < arguments.size(); ++i)
  • trunk/Source/JavaScriptCore/runtime/ArrayBuffer.cpp

    r153728 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2009, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    1111 *    documentation and/or other materials provided with the distribution.
    1212 *
    13  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1414 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1515 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1717 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1818 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2727#include "ArrayBuffer.h"
    2828
    29 #include "ArrayBufferView.h"
    30 
     29#include "JSArrayBufferView.h"
     30#include "Operations.h"
    3131#include <wtf/RefPtr.h>
    32 #include <wtf/Vector.h>
    3332
    3433namespace JSC {
    3534
    36 bool ArrayBuffer::transfer(ArrayBufferContents& result, Vector<RefPtr<ArrayBufferView> >& neuteredViews)
     35bool ArrayBuffer::transfer(ArrayBufferContents& result)
    3736{
    3837    RefPtr<ArrayBuffer> keepAlive(this);
     
    4342    }
    4443
    45     bool allViewsAreNeuterable = true;
    46     for (ArrayBufferView* i = m_firstView; i; i = i->m_nextView) {
    47         if (!i->isNeuterable())
    48             allViewsAreNeuterable = false;
    49     }
     44    bool isNeuterable = !m_pinCount;
    5045
    51     if (allViewsAreNeuterable)
     46    if (isNeuterable)
    5247        m_contents.transfer(result);
    5348    else {
     
    5752    }
    5853
    59     while (m_firstView) {
    60         ArrayBufferView* current = m_firstView;
    61         removeView(current);
    62         if (allViewsAreNeuterable || current->isNeuterable())
    63             current->neuter();
    64         neuteredViews.append(current);
     54    for (size_t i = numberOfIncomingReferences(); i--;) {
     55        JSArrayBufferView* view = jsDynamicCast<JSArrayBufferView*>(incomingReferenceAt(i));
     56        if (view)
     57            view->neuter();
    6558    }
    6659    return true;
    6760}
    6861
    69 void ArrayBuffer::addView(ArrayBufferView* view)
    70 {
    71     view->m_buffer = this;
    72     view->m_prevView = 0;
    73     view->m_nextView = m_firstView;
    74     if (m_firstView)
    75         m_firstView->m_prevView = view;
    76     m_firstView = view;
    77 }
     62} // namespace JSC
    7863
    79 void ArrayBuffer::removeView(ArrayBufferView* view)
    80 {
    81     ASSERT(this == view->m_buffer);
    82     if (view->m_nextView)
    83         view->m_nextView->m_prevView = view->m_prevView;
    84     if (view->m_prevView)
    85         view->m_prevView->m_nextView = view->m_nextView;
    86     if (m_firstView == view)
    87         m_firstView = view->m_nextView;
    88     view->m_prevView = view->m_nextView = 0;
    89 }
    90 
    91 }
  • trunk/Source/JavaScriptCore/runtime/ArrayBuffer.h

    r154119 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2009, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    1111 *    documentation and/or other materials provided with the distribution.
    1212 *
    13  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1414 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1515 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1717 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1818 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2727#define ArrayBuffer_h
    2828
    29 #include <wtf/HashSet.h>
     29#include "GCIncomingRefCounted.h"
     30#include "Weak.h"
    3031#include <wtf/PassRefPtr.h>
    31 #include <wtf/RefCounted.h>
     32#include <wtf/StdLibExtras.h>
    3233#include <wtf/Vector.h>
    3334
     
    3637class ArrayBuffer;
    3738class ArrayBufferView;
     39class JSArrayBuffer;
    3840
    3941class ArrayBufferContents {
     
    4648
    4749    inline ~ArrayBufferContents();
    48 
     50   
    4951    void* data() { return m_data; }
    5052    unsigned sizeInBytes() { return m_sizeInBytes; }
     
    8789};
    8890
    89 class ArrayBuffer : public RefCounted<ArrayBuffer> {
     91class ArrayBuffer : public GCIncomingRefCounted<ArrayBuffer> {
    9092public:
    9193    static inline PassRefPtr<ArrayBuffer> create(unsigned numElements, unsigned elementByteSize);
     
    9395    static inline PassRefPtr<ArrayBuffer> create(const void* source, unsigned byteLength);
    9496    static inline PassRefPtr<ArrayBuffer> create(ArrayBufferContents&);
     97    static inline PassRefPtr<ArrayBuffer> createAdopted(const void* data, unsigned byteLength);
    9598
    9699    // Only for use by Uint8ClampedArray::createUninitialized.
     
    100103    inline const void* data() const;
    101104    inline unsigned byteLength() const;
     105   
     106    inline size_t gcSizeEstimateInBytes() const;
    102107
    103108    inline PassRefPtr<ArrayBuffer> slice(int begin, int end) const;
    104109    inline PassRefPtr<ArrayBuffer> slice(int begin) const;
    105 
    106     void addView(ArrayBufferView*);
    107     void removeView(ArrayBufferView*);
    108 
    109     JS_EXPORT_PRIVATE bool transfer(ArrayBufferContents&, Vector<RefPtr<ArrayBufferView> >& neuteredViews);
     110   
     111    inline void pin();
     112    inline void unpin();
     113
     114    JS_EXPORT_PRIVATE bool transfer(ArrayBufferContents&);
    110115    bool isNeutered() { return !m_contents.m_data; }
    111116
     
    120125    static inline int clampValue(int x, int left, int right);
    121126
     127    unsigned m_pinCount;
    122128    ArrayBufferContents m_contents;
    123     ArrayBufferView* m_firstView;
     129
     130public:
     131    Weak<JSArrayBuffer> m_wrapper;
    124132};
    125133
     
    160168}
    161169
     170PassRefPtr<ArrayBuffer> ArrayBuffer::createAdopted(const void* data, unsigned byteLength)
     171{
     172    ArrayBufferContents contents(const_cast<void*>(data), byteLength);
     173    return create(contents);
     174}
     175
    162176PassRefPtr<ArrayBuffer> ArrayBuffer::createUninitialized(unsigned numElements, unsigned elementByteSize)
    163177{
     
    175189
    176190ArrayBuffer::ArrayBuffer(ArrayBufferContents& contents)
    177     : m_firstView(0)
     191    : m_pinCount(0)
    178192{
    179193    contents.transfer(m_contents);
     
    193207{
    194208    return m_contents.m_sizeInBytes;
     209}
     210
     211size_t ArrayBuffer::gcSizeEstimateInBytes() const
     212{
     213    return sizeof(ArrayBuffer) + static_cast<size_t>(byteLength());
    195214}
    196215
     
    219238}
    220239
     240void ArrayBuffer::pin()
     241{
     242    m_pinCount++;
     243}
     244
     245void ArrayBuffer::unpin()
     246{
     247    m_pinCount--;
     248}
     249
    221250void ArrayBufferContents::tryAllocate(unsigned numElements, unsigned elementByteSize, ArrayBufferContents::InitializationPolicy policy, ArrayBufferContents& result)
    222251{
    223     // Do not allow 32-bit overflow of the total size.
    224     // FIXME: Why not? The tryFastCalloc function already checks its arguments,
    225     // and will fail if there is any overflow, so why should we include a
    226     // redudant unnecessarily restrictive check here?
     252    // Do not allow 31-bit overflow of the total size.
    227253    if (numElements) {
    228254        unsigned totalSize = numElements * elementByteSize;
    229         if (totalSize / numElements != elementByteSize) {
     255        if (totalSize / numElements != elementByteSize
     256            || totalSize > static_cast<unsigned>(std::numeric_limits<int32_t>::max())) {
    230257            result.m_data = 0;
    231258            return;
     
    255282
    256283using JSC::ArrayBuffer;
    257 using JSC::ArrayBufferContents;
    258284
    259285#endif // ArrayBuffer_h
     286
  • trunk/Source/JavaScriptCore/runtime/ArrayBufferView.cpp

    r153728 r154127  
    3131namespace JSC {
    3232
    33 ArrayBufferView::ArrayBufferView(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset)
    34     : m_byteOffset(byteOffset)
    35     , m_isNeuterable(true)
    36     , m_buffer(buffer)
    37     , m_prevView(0)
    38     , m_nextView(0)
     33ArrayBufferView::ArrayBufferView(
     34    PassRefPtr<ArrayBuffer> buffer,
     35    unsigned byteOffset)
     36        : m_byteOffset(byteOffset)
     37        , m_isNeuterable(true)
     38        , m_buffer(buffer)
    3939{
    4040    m_baseAddress = m_buffer ? (static_cast<char*>(m_buffer->data()) + m_byteOffset) : 0;
    41     if (m_buffer)
    42         m_buffer->addView(this);
    4341}
    4442
    4543ArrayBufferView::~ArrayBufferView()
    4644{
    47     if (m_buffer)
    48         m_buffer->removeView(this);
     45    if (!m_isNeuterable)
     46        m_buffer->unpin();
    4947}
    5048
    51 void ArrayBufferView::neuter()
     49void ArrayBufferView::setNeuterable(bool flag)
    5250{
    53     m_buffer = 0;
    54     m_byteOffset = 0;
     51    if (flag == m_isNeuterable)
     52        return;
     53   
     54    m_isNeuterable = flag;
     55   
     56    if (!m_buffer)
     57        return;
     58   
     59    if (flag)
     60        m_buffer->unpin();
     61    else
     62        m_buffer->pin();
    5563}
    5664
    57 }
     65} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/ArrayBufferView.h

    r154119 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2009, 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2828
    2929#include "ArrayBuffer.h"
    30 
     30#include "TypedArrayType.h"
    3131#include <algorithm>
    3232#include <limits.h>
     
    3737namespace JSC {
    3838
     39class JSArrayBufferView;
     40class JSGlobalObject;
     41class ExecState;
     42
    3943class ArrayBufferView : public RefCounted<ArrayBufferView> {
    4044public:
    41     enum ViewType {
    42         TypeInt8,
    43         TypeUint8,
    44         TypeUint8Clamped,
    45         TypeInt16,
    46         TypeUint16,
    47         TypeInt32,
    48         TypeUint32,
    49         TypeFloat32,
    50         TypeFloat64,
    51         TypeDataView
    52     };
    53     virtual ViewType getType() const = 0;
    54 
     45    virtual TypedArrayType getType() const = 0;
     46
     47    bool isNeutered() const
     48    {
     49        return !m_buffer || m_buffer->isNeutered();
     50    }
     51   
    5552    PassRefPtr<ArrayBuffer> buffer() const
    5653    {
     54        if (isNeutered())
     55            return 0;
    5756        return m_buffer;
    5857    }
     
    6059    void* baseAddress() const
    6160    {
     61        if (isNeutered())
     62            return 0;
    6263        return m_baseAddress;
    6364    }
     
    6566    unsigned byteOffset() const
    6667    {
     68        if (isNeutered())
     69            return 0;
    6770        return m_byteOffset;
    6871    }
     
    7073    virtual unsigned byteLength() const = 0;
    7174
    72     void setNeuterable(bool flag) { m_isNeuterable = flag; }
     75    JS_EXPORT_PRIVATE void setNeuterable(bool flag);
    7376    bool isNeuterable() const { return m_isNeuterable; }
    7477
    7578    JS_EXPORT_PRIVATE virtual ~ArrayBufferView();
    76 
    77 protected:
    78     JS_EXPORT_PRIVATE ArrayBufferView(PassRefPtr<ArrayBuffer>, unsigned byteOffset);
    79 
    80     inline bool setImpl(ArrayBufferView*, unsigned byteOffset);
    81 
    82     inline bool setRangeImpl(const char* data, size_t dataByteLength, unsigned byteOffset);
    83 
    84     inline bool zeroRangeImpl(unsigned byteOffset, size_t rangeByteLength);
    85 
    86     static inline void calculateOffsetAndLength(int start, int end, unsigned arraySize, unsigned* offset, unsigned* length);
    8779
    8880    // Helper to verify that a given sub-range of an ArrayBuffer is
    8981    // within range.
    9082    template <typename T>
    91     static bool verifySubRange(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned numElements)
    92     {
    93         if (!buffer)
    94             return false;
     83    static bool verifySubRange(
     84        PassRefPtr<ArrayBuffer> buffer,
     85        unsigned byteOffset,
     86        unsigned numElements)
     87    {
     88        unsigned byteLength = buffer->byteLength();
    9589        if (sizeof(T) > 1 && byteOffset % sizeof(T))
    9690            return false;
    97         if (byteOffset > buffer->byteLength())
     91        if (byteOffset > byteLength)
    9892            return false;
    99         unsigned remainingElements = (buffer->byteLength() - byteOffset) / sizeof(T);
     93        unsigned remainingElements = (byteLength - byteOffset) / sizeof(T);
    10094        if (numElements > remainingElements)
    10195            return false;
    10296        return true;
    10397    }
     98   
     99    virtual JSArrayBufferView* wrap(ExecState*, JSGlobalObject*) = 0;
     100   
     101protected:
     102    WTF_EXPORT_PRIVATE ArrayBufferView(PassRefPtr<ArrayBuffer>, unsigned byteOffset);
     103
     104    inline bool setImpl(ArrayBufferView*, unsigned byteOffset);
     105
     106    inline bool setRangeImpl(const char* data, size_t dataByteLength, unsigned byteOffset);
     107
     108    inline bool zeroRangeImpl(unsigned byteOffset, size_t rangeByteLength);
     109
     110    static inline void calculateOffsetAndLength(
     111        int start, int end, unsigned arraySize,
     112        unsigned* offset, unsigned* length);
    104113
    105114    // Input offset is in number of elements from this array's view;
    106115    // output offset is in number of bytes from the underlying buffer's view.
    107116    template <typename T>
    108     static void clampOffsetAndNumElements(PassRefPtr<ArrayBuffer> buffer, unsigned arrayByteOffset, unsigned *offset, unsigned *numElements)
     117    static void clampOffsetAndNumElements(
     118        PassRefPtr<ArrayBuffer> buffer,
     119        unsigned arrayByteOffset,
     120        unsigned *offset,
     121        unsigned *numElements)
    109122    {
    110123        unsigned maxOffset = (UINT_MAX - arrayByteOffset) / sizeof(T);
     
    120133    }
    121134
    122     JS_EXPORT_PRIVATE virtual void neuter();
    123 
    124135    // This is the address of the ArrayBuffer's storage, plus the byte offset.
    125136    void* m_baseAddress;
     
    131142    friend class ArrayBuffer;
    132143    RefPtr<ArrayBuffer> m_buffer;
    133     ArrayBufferView* m_prevView;
    134     ArrayBufferView* m_nextView;
    135144};
    136145
     
    177186}
    178187
    179 void ArrayBufferView::calculateOffsetAndLength(int start, int end, unsigned arraySize, unsigned* offset, unsigned* length)
     188void ArrayBufferView::calculateOffsetAndLength(
     189    int start, int end, unsigned arraySize, unsigned* offset, unsigned* length)
    180190{
    181191    if (start < 0)
  • trunk/Source/JavaScriptCore/runtime/ClassInfo.h

    r153720 r154127  
    3232
    3333class HashEntry;
     34class JSArrayBufferView;
    3435struct HashTable;
    3536
     
    9798    typedef bool (*GetOwnPropertyDescriptorFunctionPtr)(JSObject*, ExecState*, PropertyName, PropertyDescriptor&);
    9899    GetOwnPropertyDescriptorFunctionPtr getOwnPropertyDescriptor;
     100   
     101    typedef void (*SlowDownAndWasteMemory)(JSArrayBufferView*);
     102    SlowDownAndWasteMemory slowDownAndWasteMemory;
     103   
     104    typedef PassRefPtr<ArrayBufferView> (*GetTypedArrayImpl)(JSArrayBufferView*);
     105    GetTypedArrayImpl getTypedArrayImpl;
    99106};
    100107
     
    140147        &ClassName::defineOwnProperty, \
    141148        &ClassName::getOwnPropertyDescriptor, \
     149        &ClassName::slowDownAndWasteMemory, \
     150        &ClassName::getTypedArrayImpl \
    142151    }, \
    143152    ClassName::TypedArrayStorageType
  • trunk/Source/JavaScriptCore/runtime/CommonIdentifiers.h

    r151605 r154127  
    2929#define JSC_COMMON_IDENTIFIERS_EACH_PROPERTY_NAME(macro) \
    3030    macro(Array) \
     31    macro(ArrayBuffer) \
     32    macro(BYTES_PER_ELEMENT) \
    3133    macro(Boolean) \
    3234    macro(Date) \
     
    5658    macro(arguments) \
    5759    macro(bind) \
     60    macro(buffer) \
     61    macro(byteLength) \
     62    macro(byteOffset) \
    5863    macro(bytecode) \
    5964    macro(bytecodeIndex) \
     
    113118    macro(prototype) \
    114119    macro(set) \
     120    macro(slice) \
    115121    macro(source) \
    116122    macro(sourceCode) \
    117123    macro(stack) \
     124    macro(subarray) \
    118125    macro(test) \
    119126    macro(toExponential) \
  • trunk/Source/JavaScriptCore/runtime/Float32Array.h

    r153728 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
    3  * Copyright (C) 2009 Google Inc. All rights reserved.
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    1211 *    documentation and/or other materials provided with the distribution.
    1312 *
    14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1514 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1615 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1817 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1918 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2827#define Float32Array_h
    2928
    30 #include "TypedArrayBase.h"
    31 #include <wtf/MathExtras.h>
    32 
    33 namespace JSC {
    34 
    35 class Float32Array : public TypedArrayBase<float> {
    36 public:
    37     static inline PassRefPtr<Float32Array> create(unsigned length);
    38     static inline PassRefPtr<Float32Array> create(const float* array, unsigned length);
    39     static inline PassRefPtr<Float32Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    40 
    41     // Should only be used when it is known the entire array will be filled. Do
    42     // not return these results directly to JavaScript without filling first.
    43     static inline PassRefPtr<Float32Array> createUninitialized(unsigned length);
    44 
    45     using TypedArrayBase<float>::set;
    46 
    47     void set(unsigned index, double value)
    48     {
    49         if (index >= TypedArrayBase<float>::m_length)
    50             return;
    51         TypedArrayBase<float>::data()[index] = static_cast<float>(value);
    52     }
    53 
    54     inline PassRefPtr<Float32Array> subarray(int start) const;
    55     inline PassRefPtr<Float32Array> subarray(int start, int end) const;
    56 
    57     virtual ViewType getType() const
    58     {
    59         return TypeFloat32;
    60     }
    61 
    62 private:
    63     inline Float32Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    64     // Make constructor visible to superclass.
    65     friend class TypedArrayBase<float>;
    66 };
    67 
    68 PassRefPtr<Float32Array> Float32Array::create(unsigned length)
    69 {
    70     return TypedArrayBase<float>::create<Float32Array>(length);
    71 }
    72 
    73 PassRefPtr<Float32Array> Float32Array::create(const float* array, unsigned length)
    74 {
    75     return TypedArrayBase<float>::create<Float32Array>(array, length);
    76 }
    77 
    78 PassRefPtr<Float32Array> Float32Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    79 {
    80     return TypedArrayBase<float>::create<Float32Array>(buffer, byteOffset, length);
    81 }
    82 
    83 PassRefPtr<Float32Array> Float32Array::createUninitialized(unsigned length)
    84 {
    85     return TypedArrayBase<float>::createUninitialized<Float32Array>(length);
    86 }
    87 
    88 Float32Array::Float32Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    89     : TypedArrayBase<float>(buffer, byteOffset, length)
    90 {
    91 }
    92 
    93 PassRefPtr<Float32Array> Float32Array::subarray(int start) const
    94 {
    95     return subarray(start, length());
    96 }
    97 
    98 PassRefPtr<Float32Array> Float32Array::subarray(int start, int end) const
    99 {
    100     return subarrayImpl<Float32Array>(start, end);
    101 }
    102 
    103 } // namespace JSC
     29#include "TypedArrays.h"
    10430
    10531using JSC::Float32Array;
    10632
    10733#endif // Float32Array_h
     34
  • trunk/Source/JavaScriptCore/runtime/Float64Array.h

    r153728 r154127  
    11/*
    2  * Copyright (C) 2011 Apple Inc. All rights reserved.
    3  * Copyright (C) 2011 Google Inc. All rights reserved.
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    1211 *    documentation and/or other materials provided with the distribution.
    1312 *
    14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1514 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1615 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1817 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1918 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2221 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    2322 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    24  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    2524 */
    2625
     
    2827#define Float64Array_h
    2928
    30 #include "TypedArrayBase.h"
    31 #include <wtf/MathExtras.h>
    32 
    33 namespace JSC {
    34 
    35 class Float64Array : public TypedArrayBase<double> {
    36 public:
    37     static inline PassRefPtr<Float64Array> create(unsigned length);
    38     static inline PassRefPtr<Float64Array> create(const double* array, unsigned length);
    39     static inline PassRefPtr<Float64Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    40 
    41     // Should only be used when it is known the entire array will be filled. Do
    42     // not return these results directly to JavaScript without filling first.
    43     static inline PassRefPtr<Float64Array> createUninitialized(unsigned length);
    44 
    45     using TypedArrayBase<double>::set;
    46 
    47     void set(unsigned index, double value)
    48     {
    49         if (index >= TypedArrayBase<double>::m_length)
    50             return;
    51         TypedArrayBase<double>::data()[index] = static_cast<double>(value);
    52     }
    53 
    54     inline PassRefPtr<Float64Array> subarray(int start) const;
    55     inline PassRefPtr<Float64Array> subarray(int start, int end) const;
    56 
    57     virtual ViewType getType() const
    58     {
    59         return TypeFloat64;
    60     }
    61 
    62 private:
    63     inline Float64Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    64    
    65     // Make constructor visible to superclass.
    66     friend class TypedArrayBase<double>;
    67 };
    68 
    69 PassRefPtr<Float64Array> Float64Array::create(unsigned length)
    70 {
    71     return TypedArrayBase<double>::create<Float64Array>(length);
    72 }
    73 
    74 PassRefPtr<Float64Array> Float64Array::create(const double* array, unsigned length)
    75 {
    76     return TypedArrayBase<double>::create<Float64Array>(array, length);
    77 }
    78 
    79 PassRefPtr<Float64Array> Float64Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    80 {
    81     return TypedArrayBase<double>::create<Float64Array>(buffer, byteOffset, length);
    82 }
    83 
    84 PassRefPtr<Float64Array> Float64Array::createUninitialized(unsigned length)
    85 {
    86     return TypedArrayBase<double>::createUninitialized<Float64Array>(length);
    87 }
    88 
    89 Float64Array::Float64Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    90     : TypedArrayBase<double>(buffer, byteOffset, length)
    91 {
    92 }
    93 
    94 PassRefPtr<Float64Array> Float64Array::subarray(int start) const
    95 {
    96     return subarray(start, length());
    97 }
    98 
    99 PassRefPtr<Float64Array> Float64Array::subarray(int start, int end) const
    100 {
    101     return subarrayImpl<Float64Array>(start, end);
    102 }
    103 
    104 } // namespace JSC
     29#include "TypedArrays.h"
    10530
    10631using JSC::Float64Array;
    10732
    10833#endif // Float64Array_h
     34
  • trunk/Source/JavaScriptCore/runtime/IndexingHeader.h

    r153104 r154127  
    3232namespace JSC {
    3333
     34class ArrayBuffer;
    3435class Butterfly;
    3536class LLIntOffsetsExtractor;
     
    6465    uint32_t publicLength() { return u.lengths.publicLength; }
    6566    void setPublicLength(uint32_t auxWord) { u.lengths.publicLength = auxWord; }
     67   
     68    ArrayBuffer* arrayBuffer() { return u.typedArray.buffer; }
     69    void setArrayBuffer(ArrayBuffer* buffer) { u.typedArray.buffer = buffer; }
    6670   
    6771    static IndexingHeader* from(Butterfly* butterfly)
     
    118122            uint32_t vectorLength; // The length of the indexed property storage. The actual size of the storage depends on this, and the type.
    119123        } lengths;
     124       
     125        struct {
     126            ArrayBuffer* buffer;
     127        } typedArray;
    120128    } u;
    121129};
  • trunk/Source/JavaScriptCore/runtime/Int16Array.h

    r153728 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    1111 *    documentation and/or other materials provided with the distribution.
    1212 *
    13  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1414 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1515 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1717 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1818 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2727#define Int16Array_h
    2828
    29 #include "IntegralTypedArrayBase.h"
    30 
    31 namespace JSC {
    32 
    33 class ArrayBuffer;
    34 
    35 class Int16Array : public IntegralTypedArrayBase<int16_t> {
    36 public:
    37     static inline PassRefPtr<Int16Array> create(unsigned length);
    38     static inline PassRefPtr<Int16Array> create(const int16_t* array, unsigned length);
    39     static inline PassRefPtr<Int16Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    40 
    41     // Should only be used when it is known the entire array will be filled. Do
    42     // not return these results directly to JavaScript without filling first.
    43     static inline PassRefPtr<Int16Array> createUninitialized(unsigned length);
    44 
    45     using TypedArrayBase<int16_t>::set;
    46     using IntegralTypedArrayBase<int16_t>::set;
    47 
    48     inline PassRefPtr<Int16Array> subarray(int start) const;
    49     inline PassRefPtr<Int16Array> subarray(int start, int end) const;
    50 
    51     virtual ViewType getType() const
    52     {
    53         return TypeInt16;
    54     }
    55 
    56 private:
    57     inline Int16Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    58 
    59     // Make constructor visible to superclass.
    60     friend class TypedArrayBase<int16_t>;
    61 };
    62 
    63 PassRefPtr<Int16Array> Int16Array::create(unsigned length)
    64 {
    65     return TypedArrayBase<int16_t>::create<Int16Array>(length);
    66 }
    67 
    68 PassRefPtr<Int16Array> Int16Array::create(const int16_t* array, unsigned length)
    69 {
    70     return TypedArrayBase<int16_t>::create<Int16Array>(array, length);
    71 }
    72 
    73 PassRefPtr<Int16Array> Int16Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    74 {
    75     return TypedArrayBase<int16_t>::create<Int16Array>(buffer, byteOffset, length);
    76 }
    77 
    78 PassRefPtr<Int16Array> Int16Array::createUninitialized(unsigned length)
    79 {
    80     return TypedArrayBase<int16_t>::createUninitialized<Int16Array>(length);
    81 }
    82 
    83 Int16Array::Int16Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    84     : IntegralTypedArrayBase<int16_t>(buffer, byteOffset, length)
    85 {
    86 }
    87 
    88 PassRefPtr<Int16Array> Int16Array::subarray(int start) const
    89 {
    90     return subarray(start, length());
    91 }
    92 
    93 PassRefPtr<Int16Array> Int16Array::subarray(int start, int end) const
    94 {
    95     return subarrayImpl<Int16Array>(start, end);
    96 }
    97 
    98 } // namespace JSC
     29#include "TypedArrays.h"
    9930
    10031using JSC::Int16Array;
    10132
    10233#endif // Int16Array_h
     34
  • trunk/Source/JavaScriptCore/runtime/Int32Array.h

    r153728 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
    3  * Copyright (C) 2009 Google Inc. All rights reserved.
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    1211 *    documentation and/or other materials provided with the distribution.
    1312 *
    14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1514 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1615 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1817 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1918 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2827#define Int32Array_h
    2928
    30 #include "IntegralTypedArrayBase.h"
    31 
    32 namespace JSC {
    33 
    34 class Int32Array : public IntegralTypedArrayBase<int> {
    35 public:
    36     static inline PassRefPtr<Int32Array> create(unsigned length);
    37     static inline PassRefPtr<Int32Array> create(const int* array, unsigned length);
    38     static inline PassRefPtr<Int32Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    39 
    40     // Should only be used when it is known the entire array will be filled. Do
    41     // not return these results directly to JavaScript without filling first.
    42     static inline PassRefPtr<Int32Array> createUninitialized(unsigned length);
    43 
    44     using TypedArrayBase<int>::set;
    45     using IntegralTypedArrayBase<int>::set;
    46 
    47     inline PassRefPtr<Int32Array> subarray(int start) const;
    48     inline PassRefPtr<Int32Array> subarray(int start, int end) const;
    49 
    50     virtual ViewType getType() const
    51     {
    52         return TypeInt32;
    53     }
    54 
    55 private:
    56     inline Int32Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    57     // Make constructor visible to superclass.
    58     friend class TypedArrayBase<int>;
    59 };
    60 
    61 PassRefPtr<Int32Array> Int32Array::create(unsigned length)
    62 {
    63     return TypedArrayBase<int>::create<Int32Array>(length);
    64 }
    65 
    66 PassRefPtr<Int32Array> Int32Array::create(const int* array, unsigned length)
    67 {
    68     return TypedArrayBase<int>::create<Int32Array>(array, length);
    69 }
    70 
    71 PassRefPtr<Int32Array> Int32Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    72 {
    73     return TypedArrayBase<int>::create<Int32Array>(buffer, byteOffset, length);
    74 }
    75 
    76 PassRefPtr<Int32Array> Int32Array::createUninitialized(unsigned length)
    77 {
    78     return TypedArrayBase<int>::createUninitialized<Int32Array>(length);
    79 }
    80 
    81 Int32Array::Int32Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    82     : IntegralTypedArrayBase<int>(buffer, byteOffset, length)
    83 {
    84 }
    85 
    86 PassRefPtr<Int32Array> Int32Array::subarray(int start) const
    87 {
    88     return subarray(start, length());
    89 }
    90 
    91 PassRefPtr<Int32Array> Int32Array::subarray(int start, int end) const
    92 {
    93     return subarrayImpl<Int32Array>(start, end);
    94 }
    95 
    96 } // namespace JSC
     29#include "TypedArrays.h"
    9730
    9831using JSC::Int32Array;
    9932
    10033#endif // Int32Array_h
     34
  • trunk/Source/JavaScriptCore/runtime/Int8Array.h

    r153728 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
    3  * Copyright (C) 2009 Google Inc. All rights reserved.
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    1211 *    documentation and/or other materials provided with the distribution.
    1312 *
    14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1514 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1615 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1817 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1918 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2827#define Int8Array_h
    2928
    30 #include "IntegralTypedArrayBase.h"
    31 
    32 namespace JSC {
    33 
    34 class ArrayBuffer;
    35 
    36 class Int8Array : public IntegralTypedArrayBase<int8_t> {
    37 public:
    38     static inline PassRefPtr<Int8Array> create(unsigned length);
    39     static inline PassRefPtr<Int8Array> create(const int8_t* array, unsigned length);
    40     static inline PassRefPtr<Int8Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    41 
    42     // Should only be used when it is known the entire array will be filled. Do
    43     // not return these results directly to JavaScript without filling first.
    44     static inline PassRefPtr<Int8Array> createUninitialized(unsigned length);
    45 
    46     using TypedArrayBase<int8_t>::set;
    47     using IntegralTypedArrayBase<int8_t>::set;
    48 
    49     inline PassRefPtr<Int8Array> subarray(int start) const;
    50     inline PassRefPtr<Int8Array> subarray(int start, int end) const;
    51 
    52     virtual ViewType getType() const
    53     {
    54         return TypeInt8;
    55     }
    56 
    57 private:
    58     inline Int8Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    59 
    60     // Make constructor visible to superclass.
    61     friend class TypedArrayBase<int8_t>;
    62 };
    63 
    64 PassRefPtr<Int8Array> Int8Array::create(unsigned length)
    65 {
    66     return TypedArrayBase<int8_t>::create<Int8Array>(length);
    67 }
    68 
    69 PassRefPtr<Int8Array> Int8Array::create(const int8_t* array, unsigned length)
    70 {
    71     return TypedArrayBase<int8_t>::create<Int8Array>(array, length);
    72 }
    73 
    74 PassRefPtr<Int8Array> Int8Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    75 {
    76     return TypedArrayBase<int8_t>::create<Int8Array>(buffer, byteOffset, length);
    77 }
    78 
    79 PassRefPtr<Int8Array> Int8Array::createUninitialized(unsigned length)
    80 {
    81     return TypedArrayBase<int8_t>::createUninitialized<Int8Array>(length);
    82 }
    83 
    84 Int8Array::Int8Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    85     : IntegralTypedArrayBase<int8_t>(buffer, byteOffset, length)
    86 {
    87 }
    88 
    89 PassRefPtr<Int8Array> Int8Array::subarray(int start) const
    90 {
    91     return subarray(start, length());
    92 }
    93 
    94 PassRefPtr<Int8Array> Int8Array::subarray(int start, int end) const
    95 {
    96     return subarrayImpl<Int8Array>(start, end);
    97 }
    98 
    99 } // namespace JSC
     29#include "TypedArrays.h"
    10030
    10131using JSC::Int8Array;
    10232
    10333#endif // Int8Array_h
     34
  • trunk/Source/JavaScriptCore/runtime/JSCell.cpp

    r153720 r154127  
    2424#include "JSCell.h"
    2525
     26#include "ArrayBufferView.h"
    2627#include "JSFunction.h"
    2728#include "JSString.h"
     
    224225}
    225226
     227void JSCell::slowDownAndWasteMemory(JSArrayBufferView*)
     228{
     229    RELEASE_ASSERT_NOT_REACHED();
     230}
     231
     232PassRefPtr<ArrayBufferView> JSCell::getTypedArrayImpl(JSArrayBufferView*)
     233{
     234    RELEASE_ASSERT_NOT_REACHED();
     235    return 0;
     236}
     237
    226238} // namespace JSC
  • trunk/Source/JavaScriptCore/runtime/JSCell.h

    r154038 r154127  
    2929#include "JSLock.h"
    3030#include "SlotVisitor.h"
    31 #include "TypedArrayDescriptor.h"
     31#include "TypedArrayType.h"
    3232#include "WriteBarrier.h"
    3333#include <wtf/Noncopyable.h>
     
    3838class CopyVisitor;
    3939class ExecState;
     40class JSArrayBufferView;
    4041class JSDestructibleObject;
    4142class JSGlobalObject;
     
    150151#endif
    151152       
    152     static const TypedArrayType TypedArrayStorageType = TypedArrayNone;
     153    static const TypedArrayType TypedArrayStorageType = NotTypedArray;
    153154protected:
    154155
     
    168169    static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&);
    169170    static bool getOwnPropertySlotByIndex(JSObject*, ExecState*, unsigned propertyName, PropertySlot&);
     171    JS_EXPORT_PRIVATE static NO_RETURN_DUE_TO_CRASH void slowDownAndWasteMemory(JSArrayBufferView*);
     172    JS_EXPORT_PRIVATE static PassRefPtr<ArrayBufferView> getTypedArrayImpl(JSArrayBufferView*);
    170173
    171174private:
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r154038 r154127  
    5050#include "JSAPIWrapperObject.h"
    5151#include "JSActivation.h"
     52#include "JSArrayBuffer.h"
     53#include "JSArrayBufferConstructor.h"
     54#include "JSArrayBufferPrototype.h"
    5255#include "JSBoundFunction.h"
    5356#include "JSCallbackConstructor.h"
    5457#include "JSCallbackFunction.h"
    5558#include "JSCallbackObject.h"
     59#include "JSDataView.h"
     60#include "JSDataViewPrototype.h"
    5661#include "JSFunction.h"
     62#include "JSGenericTypedArrayViewConstructorInlines.h"
     63#include "JSGenericTypedArrayViewInlines.h"
     64#include "JSGenericTypedArrayViewPrototypeInlines.h"
    5765#include "JSGlobalObjectFunctions.h"
    5866#include "JSLock.h"
    5967#include "JSNameScope.h"
    6068#include "JSONObject.h"
     69#include "JSTypedArrayConstructors.h"
     70#include "JSTypedArrayPrototypes.h"
     71#include "JSTypedArrays.h"
    6172#include "JSWithScope.h"
    6273#include "LegacyProfiler.h"
     
    215226    m_objectPrototype->putDirectAccessor(exec, exec->propertyNames().underscoreProto, protoAccessor, Accessor | DontEnum);
    216227    m_functionPrototype->structure()->setPrototypeWithoutTransition(exec->vm(), m_objectPrototype.get());
     228   
     229    m_arrayBufferPrototype.set(exec->vm(), this, JSArrayBufferPrototype::create(exec, this, JSArrayBufferPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     230    m_typedArrays[toIndex(TypeInt8)].prototype.set(exec->vm(), this, JSInt8ArrayPrototype::create(exec, this, JSInt8ArrayPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     231    m_typedArrays[toIndex(TypeInt16)].prototype.set(exec->vm(), this, JSInt16ArrayPrototype::create(exec, this, JSInt16ArrayPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     232    m_typedArrays[toIndex(TypeInt32)].prototype.set(exec->vm(), this, JSInt32ArrayPrototype::create(exec, this, JSInt32ArrayPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     233    m_typedArrays[toIndex(TypeUint8)].prototype.set(exec->vm(), this, JSUint8ArrayPrototype::create(exec, this, JSUint8ArrayPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     234    m_typedArrays[toIndex(TypeUint8Clamped)].prototype.set(exec->vm(), this, JSUint8ClampedArrayPrototype::create(exec, this, JSUint8ClampedArrayPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     235    m_typedArrays[toIndex(TypeUint16)].prototype.set(exec->vm(), this, JSUint16ArrayPrototype::create(exec, this, JSUint16ArrayPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     236    m_typedArrays[toIndex(TypeUint32)].prototype.set(exec->vm(), this, JSUint32ArrayPrototype::create(exec, this, JSUint32ArrayPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     237    m_typedArrays[toIndex(TypeFloat32)].prototype.set(exec->vm(), this, JSFloat32ArrayPrototype::create(exec, this, JSFloat32ArrayPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     238    m_typedArrays[toIndex(TypeFloat64)].prototype.set(exec->vm(), this, JSFloat64ArrayPrototype::create(exec, this, JSFloat64ArrayPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     239    m_typedArrays[toIndex(TypeDataView)].prototype.set(exec->vm(), this, JSDataViewPrototype::create(exec->vm(), JSDataViewPrototype::createStructure(exec->vm(), this, m_objectPrototype.get())));
     240   
     241    m_arrayBufferStructure.set(exec->vm(), this, JSArrayBuffer::createStructure(exec->vm(), this, m_arrayBufferPrototype.get()));
     242    m_typedArrays[toIndex(TypeInt8)].structure.set(exec->vm(), this, JSInt8Array::createStructure(exec->vm(), this, m_typedArrays[toIndex(TypeInt8)].prototype.get()));
     243    m_typedArrays[toIndex(TypeInt16)].structure.set(exec->vm(), this, JSInt16Array::createStructure(exec->vm(), this, m_typedArrays[toIndex(TypeInt16)].prototype.get()));
     244    m_typedArrays[toIndex(TypeInt32)].structure.set(exec->vm(), this, JSInt32Array::createStructure(exec->vm(), this, m_typedArrays[toIndex(TypeInt32)].prototype.get()));
     245    m_typedArrays[toIndex(TypeUint8)].structure.set(exec->vm(), this, JSUint8Array::createStructure(exec->vm(), this, m_typedArrays[toIndex(TypeUint8)].prototype.get()));
     246    m_typedArrays[toIndex(TypeUint8Clamped)].structure.set(exec->vm(), this, JSUint8ClampedArray::createStructure(exec->vm(), this, m_typedArrays[toIndex(TypeUint8Clamped)].prototype.get()));
     247    m_typedArrays[toIndex(TypeUint16)].structure.set(exec->vm(), this, JSUint16Array::createStructure(exec->vm(), this, m_typedArrays[toIndex(TypeUint16)].prototype.get()));
     248    m_typedArrays[toIndex(TypeUint32)].structure.set(exec->vm(), this, JSUint32Array::createStructure(exec->vm(), this, m_typedArrays[toIndex(TypeUint32)].prototype.get()));
     249    m_typedArrays[toIndex(TypeFloat32)].structure.set(exec->vm(), this, JSFloat32Array::createStructure(exec->vm(), this, m_typedArrays[toIndex(TypeFloat32)].prototype.get()));
     250    m_typedArrays[toIndex(TypeFloat64)].structure.set(exec->vm(), this, JSFloat64Array::createStructure(exec->vm(), this, m_typedArrays[toIndex(TypeFloat64)].prototype.get()));
     251    m_typedArrays[toIndex(TypeDataView)].structure.set(exec->vm(), this, JSDataView::createStructure(exec->vm(), this, m_typedArrays[toIndex(TypeDataView)].prototype.get()));
    217252
    218253    m_nameScopeStructure.set(exec->vm(), this, JSNameScope::createStructure(exec->vm(), this, jsNull()));
     
    319354    putDirectWithoutTransition(exec->vm(), exec->propertyNames().JSON, JSONObject::create(exec, this, JSONObject::createStructure(exec->vm(), this, m_objectPrototype.get())), DontEnum);
    320355    putDirectWithoutTransition(exec->vm(), exec->propertyNames().Math, MathObject::create(exec, this, MathObject::createStructure(exec->vm(), this, m_objectPrototype.get())), DontEnum);
     356   
     357    JSArrayBufferConstructor* arrayBufferConstructor = JSArrayBufferConstructor::create(this, JSArrayBufferConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_arrayBufferPrototype.get());
     358    FixedArray<InternalFunction*, NUMBER_OF_TYPED_ARRAY_TYPES> typedArrayConstructors;
     359    typedArrayConstructors[toIndex(TypeInt8)] = JSInt8ArrayConstructor::create(this, JSInt8ArrayConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_typedArrays[toIndex(TypeInt8)].prototype.get(), "Int8Array");
     360    typedArrayConstructors[toIndex(TypeInt16)] = JSInt16ArrayConstructor::create(this, JSInt16ArrayConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_typedArrays[toIndex(TypeInt16)].prototype.get(), "Int16Array");
     361    typedArrayConstructors[toIndex(TypeInt32)] = JSInt32ArrayConstructor::create(this, JSInt32ArrayConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_typedArrays[toIndex(TypeInt32)].prototype.get(), "Int32Array");
     362    typedArrayConstructors[toIndex(TypeUint8)] = JSUint8ArrayConstructor::create(this, JSUint8ArrayConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_typedArrays[toIndex(TypeUint8)].prototype.get(), "Uint8Array");
     363    typedArrayConstructors[toIndex(TypeUint8Clamped)] = JSUint8ClampedArrayConstructor::create(this, JSUint8ClampedArrayConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_typedArrays[toIndex(TypeUint8Clamped)].prototype.get(), "Uint8ClampedArray");
     364    typedArrayConstructors[toIndex(TypeUint16)] = JSUint16ArrayConstructor::create(this, JSUint16ArrayConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_typedArrays[toIndex(TypeUint16)].prototype.get(), "Uint16Array");
     365    typedArrayConstructors[toIndex(TypeUint32)] = JSUint32ArrayConstructor::create(this, JSUint32ArrayConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_typedArrays[toIndex(TypeUint32)].prototype.get(), "Uint32Array");
     366    typedArrayConstructors[toIndex(TypeFloat32)] = JSFloat32ArrayConstructor::create(this, JSFloat32ArrayConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_typedArrays[toIndex(TypeFloat32)].prototype.get(), "Float32Array");
     367    typedArrayConstructors[toIndex(TypeFloat64)] = JSFloat64ArrayConstructor::create(this, JSFloat64ArrayConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_typedArrays[toIndex(TypeFloat64)].prototype.get(), "Float64Array");
     368    typedArrayConstructors[toIndex(TypeDataView)] = JSDataViewConstructor::create(this, JSDataViewConstructor::createStructure(exec->vm(), this, m_functionPrototype.get()), m_typedArrays[toIndex(TypeDataView)].prototype.get(), "DataView");
     369   
     370    m_arrayBufferPrototype->putDirectWithoutTransition(exec->vm(), exec->propertyNames().constructor, arrayBufferConstructor, DontEnum);
     371    putDirectWithoutTransition(exec->vm(), exec->propertyNames().ArrayBuffer, arrayBufferConstructor, DontEnum);
     372   
     373    for (unsigned typedArrayIndex = NUMBER_OF_TYPED_ARRAY_TYPES; typedArrayIndex--;) {
     374        m_typedArrays[typedArrayIndex].prototype->putDirectWithoutTransition(exec->vm(), exec->propertyNames().constructor, typedArrayConstructors[typedArrayIndex], DontEnum);
     375        putDirectWithoutTransition(exec->vm(), Identifier(exec, typedArrayConstructors[typedArrayIndex]->name(exec)), typedArrayConstructors[typedArrayIndex], DontEnum);
     376    }
    321377
    322378    GlobalPropertyInfo staticGlobals[] = {
     
    541597    visitor.append(&thisObject->m_stringObjectStructure);
    542598    visitor.append(&thisObject->m_internalFunctionStructure);
     599   
     600    visitor.append(&thisObject->m_arrayBufferPrototype);
     601    visitor.append(&thisObject->m_arrayBufferStructure);
     602   
     603    for (unsigned i = NUMBER_OF_TYPED_ARRAY_TYPES; i--;) {
     604        visitor.append(&thisObject->m_typedArrays[i].prototype);
     605        visitor.append(&thisObject->m_typedArrays[i].structure);
     606    }
    543607}
    544608
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h

    r154038 r154127  
    2626#include "JSArray.h"
    2727#include "JSClassRef.h"
    28 #include "VM.h"
     28#include "JSArrayBufferPrototype.h"
    2929#include "JSSegmentedVariableObject.h"
    3030#include "JSWeakObjectMapRefInternal.h"
     
    3434#include "StructureChain.h"
    3535#include "StructureRareDataInlines.h"
     36#include "VM.h"
    3637#include "Watchpoint.h"
    3738#include <JavaScriptCore/JSBase.h>
     
    167168    WriteBarrier<Structure> m_stringObjectStructure;
    168169    WriteBarrier<Structure> m_internalFunctionStructure;
     170   
     171    WriteBarrier<JSArrayBufferPrototype> m_arrayBufferPrototype;
     172    WriteBarrier<Structure> m_arrayBufferStructure;
     173   
     174    struct TypedArrayData {
     175        WriteBarrier<JSObject> prototype;
     176        WriteBarrier<Structure> structure;
     177    };
     178   
     179    FixedArray<TypedArrayData, NUMBER_OF_TYPED_ARRAY_TYPES> m_typedArrays;
    169180       
    170181    void* m_specialPointers[Special::TableSize]; // Special pointers used by the LLInt and JIT.
     
    331342    Structure* regExpStructure() const { return m_regExpStructure.get(); }
    332343    Structure* stringObjectStructure() const { return m_stringObjectStructure.get(); }
     344   
     345    JSArrayBufferPrototype* arrayBufferPrototype() const { return m_arrayBufferPrototype.get(); }
     346    Structure* arrayBufferStructure() const { return m_arrayBufferStructure.get(); }
     347   
     348    Structure* typedArrayStructure(TypedArrayType type) const
     349    {
     350        return m_typedArrays[toIndex(type)].structure.get();
     351    }
    333352
    334353    void* actualPointerFor(Special::Pointer pointer)
  • trunk/Source/JavaScriptCore/runtime/Operations.h

    r153225 r154127  
    2424
    2525#include "ExceptionHelpers.h"
     26#include "GCIncomingRefCountedInlines.h"
    2627#include "Interpreter.h"
     28#include "JSArrayBufferViewInlines.h"
    2729#include "JSCJSValueInlines.h"
    2830#include "JSFunctionInlines.h"
  • trunk/Source/JavaScriptCore/runtime/Options.h

    r153290 r154127  
    197197    v(bool, showObjectStatistics, false) \
    198198    \
     199    v(bool, logGC, false) \
    199200    v(unsigned, gcMaxHeapSize, 0) \
    200201    v(bool, recordGCPauseTimes, false) \
  • trunk/Source/JavaScriptCore/runtime/Structure.h

    r154038 r154127  
    231231    bool couldHaveIndexingHeader() const
    232232    {
    233         return hasIndexedProperties(indexingType());
    234     }
    235    
    236     bool hasIndexingHeader(const JSCell*) const
    237     {
    238         return hasIndexedProperties(indexingType());
    239     }
     233        return hasIndexedProperties(indexingType())
     234            || isTypedView(m_classInfo->typedArrayStorageType);
     235    }
     236   
     237    bool hasIndexingHeader(const JSCell*) const;
    240238   
    241239    bool masqueradesAsUndefined(JSGlobalObject* lexicalGlobalObject);
  • trunk/Source/JavaScriptCore/runtime/StructureInlines.h

    r154038 r154127  
    2727#define StructureInlines_h
    2828
     29#include "JSArrayBufferView.h"
    2930#include "PropertyMapHashTable.h"
    3031#include "Structure.h"
     
    103104    return getConcurrently(
    104105        vm, uid, attributesIgnored, specificValueIgnored);
     106}
     107
     108inline bool Structure::hasIndexingHeader(const JSCell* cell) const
     109{
     110    if (hasIndexedProperties(indexingType()))
     111        return true;
     112   
     113    if (!isTypedView(m_classInfo->typedArrayStorageType))
     114        return false;
     115   
     116    return jsCast<const JSArrayBufferView*>(cell)->mode() == WastefulTypedArray;
    105117}
    106118
  • trunk/Source/JavaScriptCore/runtime/Uint16Array.h

    r153728 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
    3  * Copyright (C) 2009 Google Inc. All rights reserved.
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    1211 *    documentation and/or other materials provided with the distribution.
    1312 *
    14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1514 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1615 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1817 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1918 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2827#define Uint16Array_h
    2928
    30 #include "IntegralTypedArrayBase.h"
    31 
    32 namespace JSC {
    33 
    34 class ArrayBuffer;
    35 
    36 class Uint16Array : public IntegralTypedArrayBase<uint16_t> {
    37 public:
    38     static inline PassRefPtr<Uint16Array> create(unsigned length);
    39     static inline PassRefPtr<Uint16Array> create(const uint16_t* array, unsigned length);
    40     static inline PassRefPtr<Uint16Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    41 
    42     // Should only be used when it is known the entire array will be filled. Do
    43     // not return these results directly to JavaScript without filling first.
    44     static inline PassRefPtr<Uint16Array> createUninitialized(unsigned length);
    45 
    46     using TypedArrayBase<uint16_t>::set;
    47     using IntegralTypedArrayBase<uint16_t>::set;
    48 
    49     inline PassRefPtr<Uint16Array> subarray(int start) const;
    50     inline PassRefPtr<Uint16Array> subarray(int start, int end) const;
    51 
    52     virtual ViewType getType() const
    53     {
    54         return TypeUint16;
    55     }
    56 
    57 private:
    58     inline Uint16Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    59     // Make constructor visible to superclass.
    60     friend class TypedArrayBase<uint16_t>;
    61 };
    62 
    63 PassRefPtr<Uint16Array> Uint16Array::create(unsigned length)
    64 {
    65     return TypedArrayBase<uint16_t>::create<Uint16Array>(length);
    66 }
    67 
    68 PassRefPtr<Uint16Array> Uint16Array::create(const uint16_t* array, unsigned length)
    69 {
    70     return TypedArrayBase<uint16_t>::create<Uint16Array>(array, length);
    71 }
    72 
    73 PassRefPtr<Uint16Array> Uint16Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    74 {
    75     return TypedArrayBase<uint16_t>::create<Uint16Array>(buffer, byteOffset, length);
    76 }
    77 
    78 PassRefPtr<Uint16Array> Uint16Array::createUninitialized(unsigned length)
    79 {
    80     return TypedArrayBase<uint16_t>::createUninitialized<Uint16Array>(length);
    81 }
    82 
    83 Uint16Array::Uint16Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    84     : IntegralTypedArrayBase<uint16_t>(buffer, byteOffset, length)
    85 {
    86 }
    87 
    88 PassRefPtr<Uint16Array> Uint16Array::subarray(int start) const
    89 {
    90     return subarray(start, length());
    91 }
    92 
    93 PassRefPtr<Uint16Array> Uint16Array::subarray(int start, int end) const
    94 {
    95     return subarrayImpl<Uint16Array>(start, end);
    96 }
    97 
    98 } // namespace JSC
     29#include "TypedArrays.h"
    9930
    10031using JSC::Uint16Array;
    10132
    10233#endif // Uint16Array_h
     34
  • trunk/Source/JavaScriptCore/runtime/Uint32Array.h

    r153728 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
    3  * Copyright (C) 2009 Google Inc. All rights reserved.
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    1211 *    documentation and/or other materials provided with the distribution.
    1312 *
    14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1514 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1615 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1817 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1918 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2827#define Uint32Array_h
    2928
    30 #include "IntegralTypedArrayBase.h"
    31 
    32 namespace JSC {
    33 
    34 class ArrayBuffer;
    35 
    36 class Uint32Array : public IntegralTypedArrayBase<uint32_t> {
    37 public:
    38     static inline PassRefPtr<Uint32Array> create(unsigned length);
    39     static inline PassRefPtr<Uint32Array> create(const uint32_t* array, unsigned length);
    40     static inline PassRefPtr<Uint32Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    41 
    42     // Should only be used when it is known the entire array will be filled. Do
    43     // not return these results directly to JavaScript without filling first.
    44     static inline PassRefPtr<Uint32Array> createUninitialized(unsigned length);
    45 
    46     using TypedArrayBase<uint32_t>::set;
    47     using IntegralTypedArrayBase<uint32_t>::set;
    48 
    49     inline PassRefPtr<Uint32Array> subarray(int start) const;
    50     inline PassRefPtr<Uint32Array> subarray(int start, int end) const;
    51 
    52     virtual ViewType getType() const
    53     {
    54         return TypeUint32;
    55     }
    56 
    57 private:
    58     inline Uint32Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    59     // Make constructor visible to superclass.
    60     friend class TypedArrayBase<uint32_t>;
    61 };
    62 
    63 PassRefPtr<Uint32Array> Uint32Array::create(unsigned length)
    64 {
    65     return TypedArrayBase<uint32_t>::create<Uint32Array>(length);
    66 }
    67 
    68 PassRefPtr<Uint32Array> Uint32Array::create(const uint32_t* array, unsigned length)
    69 {
    70     return TypedArrayBase<uint32_t>::create<Uint32Array>(array, length);
    71 }
    72 
    73 PassRefPtr<Uint32Array> Uint32Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    74 {
    75     return TypedArrayBase<uint32_t>::create<Uint32Array>(buffer, byteOffset, length);
    76 }
    77 
    78 PassRefPtr<Uint32Array> Uint32Array::createUninitialized(unsigned length)
    79 {
    80     return TypedArrayBase<uint32_t>::createUninitialized<Uint32Array>(length);
    81 }
    82 
    83 Uint32Array::Uint32Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    84     : IntegralTypedArrayBase<uint32_t>(buffer, byteOffset, length)
    85 {
    86 }
    87 
    88 PassRefPtr<Uint32Array> Uint32Array::subarray(int start) const
    89 {
    90     return subarray(start, length());
    91 }
    92 
    93 PassRefPtr<Uint32Array> Uint32Array::subarray(int start, int end) const
    94 {
    95     return subarrayImpl<Uint32Array>(start, end);
    96 }
    97 
    98 } // namespace JSC
     29#include "TypedArrays.h"
    9930
    10031using JSC::Uint32Array;
    10132
    10233#endif // Uint32Array_h
     34
  • trunk/Source/JavaScriptCore/runtime/Uint8Array.h

    r153728 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
    3  * Copyright (C) 2009 Google Inc. All rights reserved.
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    1211 *    documentation and/or other materials provided with the distribution.
    1312 *
    14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1514 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1615 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1817 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1918 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2827#define Uint8Array_h
    2928
    30 #include "IntegralTypedArrayBase.h"
    31 
    32 namespace JSC {
    33 
    34 class ArrayBuffer;
    35 
    36 class Uint8Array : public IntegralTypedArrayBase<uint8_t> {
    37 public:
    38     static inline PassRefPtr<Uint8Array> create(unsigned length);
    39     static inline PassRefPtr<Uint8Array> create(const uint8_t* array, unsigned length);
    40     static inline PassRefPtr<Uint8Array> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    41 
    42     // Should only be used when it is known the entire array will be filled. Do
    43     // not return these results directly to JavaScript without filling first.
    44     static inline PassRefPtr<Uint8Array> createUninitialized(unsigned length);
    45 
    46     using TypedArrayBase<uint8_t>::set;
    47     using IntegralTypedArrayBase<uint8_t>::set;
    48 
    49     inline PassRefPtr<Uint8Array> subarray(int start) const;
    50     inline PassRefPtr<Uint8Array> subarray(int start, int end) const;
    51 
    52     virtual ViewType getType() const
    53     {
    54         return TypeUint8;
    55     }
    56 
    57 protected:
    58     inline Uint8Array(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    59     // Make constructor visible to superclass.
    60     friend class TypedArrayBase<uint8_t>;
    61 };
    62 
    63 PassRefPtr<Uint8Array> Uint8Array::create(unsigned length)
    64 {
    65     return TypedArrayBase<uint8_t>::create<Uint8Array>(length);
    66 }
    67 
    68 PassRefPtr<Uint8Array> Uint8Array::create(const uint8_t* array, unsigned length)
    69 {
    70     return TypedArrayBase<uint8_t>::create<Uint8Array>(array, length);
    71 }
    72 
    73 PassRefPtr<Uint8Array> Uint8Array::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    74 {
    75     return TypedArrayBase<uint8_t>::create<Uint8Array>(buffer, byteOffset, length);
    76 }
    77 
    78 PassRefPtr<Uint8Array> Uint8Array::createUninitialized(unsigned length)
    79 {
    80     return TypedArrayBase<uint8_t>::createUninitialized<Uint8Array>(length);
    81 }
    82 
    83 Uint8Array::Uint8Array(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    84 : IntegralTypedArrayBase<uint8_t>(buffer, byteOffset, length)
    85 {
    86 }
    87 
    88 PassRefPtr<Uint8Array> Uint8Array::subarray(int start) const
    89 {
    90     return subarray(start, length());
    91 }
    92 
    93 PassRefPtr<Uint8Array> Uint8Array::subarray(int start, int end) const
    94 {
    95     return subarrayImpl<Uint8Array>(start, end);
    96 }
    97 
    98 } // namespace JSC
     29#include "TypedArrays.h"
    9930
    10031using JSC::Uint8Array;
    10132
    10233#endif // Uint8Array_h
     34
  • trunk/Source/JavaScriptCore/runtime/Uint8ClampedArray.h

    r153728 r154127  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
    3  * Copyright (C) 2009 Google Inc. All rights reserved.
    4  * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    53 *
    64 * Redistribution and use in source and binary forms, with or without
     
    1311 *    documentation and/or other materials provided with the distribution.
    1412 *
    15  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
    1614 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1715 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    18  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1917 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    2018 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2321 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    2422 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    25  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    2624 */
    2725
     
    2927#define Uint8ClampedArray_h
    3028
    31 #include "Uint8Array.h"
    32 #include <wtf/MathExtras.h>
    33 
    34 namespace JSC {
    35 
    36 class Uint8ClampedArray : public Uint8Array {
    37 public:
    38     static inline PassRefPtr<Uint8ClampedArray> create(unsigned length);
    39     static inline PassRefPtr<Uint8ClampedArray> create(const uint8_t* array, unsigned length);
    40     static inline PassRefPtr<Uint8ClampedArray> create(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    41 
    42     // Should only be used when it is known the entire array will be filled. Do
    43     // not return these results directly to JavaScript without filling first.
    44     static inline PassRefPtr<Uint8ClampedArray> createUninitialized(unsigned length);
    45 
    46     // It's only needed to potentially call this method if the array
    47     // was created uninitialized -- the default initialization paths
    48     // zero the allocated memory.
    49     inline void zeroFill();
    50 
    51     using TypedArrayBase<uint8_t>::set;
    52     inline void set(unsigned index, double value);
    53 
    54     inline PassRefPtr<Uint8ClampedArray> subarray(int start) const;
    55     inline PassRefPtr<Uint8ClampedArray> subarray(int start, int end) const;
    56 
    57     virtual ViewType getType() const
    58     {
    59         return TypeUint8Clamped;
    60     }
    61 
    62 private:
    63     inline Uint8ClampedArray(PassRefPtr<ArrayBuffer>, unsigned byteOffset, unsigned length);
    64     // Make constructor visible to superclass.
    65     friend class TypedArrayBase<uint8_t>;
    66 };
    67 
    68 PassRefPtr<Uint8ClampedArray> Uint8ClampedArray::create(unsigned length)
    69 {
    70     return TypedArrayBase<uint8_t>::create<Uint8ClampedArray>(length);
    71 }
    72 
    73 PassRefPtr<Uint8ClampedArray> Uint8ClampedArray::create(const uint8_t* array, unsigned length)
    74 {
    75     return TypedArrayBase<uint8_t>::create<Uint8ClampedArray>(array, length);
    76 }
    77 
    78 PassRefPtr<Uint8ClampedArray> Uint8ClampedArray::create(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    79 {
    80     return TypedArrayBase<uint8_t>::create<Uint8ClampedArray>(buffer, byteOffset, length);
    81 }
    82 
    83 PassRefPtr<Uint8ClampedArray> Uint8ClampedArray::createUninitialized(unsigned length)
    84 {
    85     return TypedArrayBase<uint8_t>::createUninitialized<Uint8ClampedArray>(length);
    86 }
    87 
    88 void Uint8ClampedArray::zeroFill()
    89 {
    90     zeroRange(0, length());
    91 }
    92 
    93 void Uint8ClampedArray::set(unsigned index, double value)
    94 {
    95     if (index >= m_length)
    96         return;
    97     if (std::isnan(value) || value < 0)
    98         value = 0;
    99     else if (value > 255)
    100         value = 255;
    101     data()[index] = static_cast<uint8_t>(lrint(value));
    102 }
    103 
    104 Uint8ClampedArray::Uint8ClampedArray(PassRefPtr<ArrayBuffer> buffer, unsigned byteOffset, unsigned length)
    105 : Uint8Array(buffer, byteOffset, length)
    106 {
    107 }
    108 
    109 PassRefPtr<Uint8ClampedArray> Uint8ClampedArray::subarray(int start) const
    110 {
    111     return subarray(start, length());
    112 }
    113 
    114 PassRefPtr<Uint8ClampedArray> Uint8ClampedArray::subarray(int start, int end) const
    115 {
    116     return subarrayImpl<Uint8ClampedArray>(start, end);
    117 }
    118 
    119 } // namespace JSC
     29#include "TypedArrays.h"
    12030
    12131using JSC::Uint8ClampedArray;
    12232
    12333#endif // Uint8ClampedArray_h
     34
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r154038 r154127  
    5858#include "RegExpCache.h"
    5959#include "RegExpObject.h"
     60#include "SimpleTypedArrayController.h"
    6061#include "SourceProviderCache.h"
    6162#include "StrictEvalActivation.h"
     
    8889extern const HashTable booleanPrototypeTable;
    8990extern const HashTable jsonTable;
     91extern const HashTable dataViewTable;
    9092extern const HashTable dateTable;
    9193extern const HashTable dateConstructorTable;
     
    146148    , arrayPrototypeTable(fastNew<HashTable>(JSC::arrayPrototypeTable))
    147149    , booleanPrototypeTable(fastNew<HashTable>(JSC::booleanPrototypeTable))
     150    , dataViewTable(fastNew<HashTable>(JSC::dataViewTable))
    148151    , dateTable(fastNew<HashTable>(JSC::dateTable))
    149152    , dateConstructorTable(fastNew<HashTable>(JSC::dateConstructorTable))
     
    259262        dfgState = adoptPtr(new DFG::LongLivedState());
    260263#endif
     264   
     265    // Initialize this last, as a free way of asserting that VM initialization itself
     266    // won't use this.
     267    m_typedArrayController = adoptRef(new SimpleTypedArrayController());
    261268}
    262269
     
    290297    arrayConstructorTable->deleteTable();
    291298    booleanPrototypeTable->deleteTable();
     299    dataViewTable->deleteTable();
    292300    dateTable->deleteTable();
    293301    dateConstructorTable->deleteTable();
     
    307315    fastDelete(const_cast<HashTable*>(arrayPrototypeTable));
    308316    fastDelete(const_cast<HashTable*>(booleanPrototypeTable));
     317    fastDelete(const_cast<HashTable*>(dataViewTable));
    309318    fastDelete(const_cast<HashTable*>(dateTable));
    310319    fastDelete(const_cast<HashTable*>(dateConstructorTable));
  • trunk/Source/JavaScriptCore/runtime/VM.h

    r153728 r154127  
    4848#include "Strong.h"
    4949#include "ThunkGenerators.h"
    50 #include "TypedArrayDescriptor.h"
     50#include "TypedArrayController.h"
    5151#include "Watchdog.h"
    5252#include "WeakRandom.h"
     
    7070    class CommonIdentifiers;
    7171    class ExecState;
    72     class Float32Array;
    73     class Float64Array;
    7472    class HandleStack;
    7573    class IdentifierTable;
    76     class Int8Array;
    77     class Int16Array;
    78     class Int32Array;
    7974    class Interpreter;
    8075    class JSGlobalObject;
     
    9489    class RegExp;
    9590#endif
    96     class Uint8Array;
    97     class Uint8ClampedArray;
    98     class Uint16Array;
    99     class Uint32Array;
    10091    class UnlinkedCodeBlock;
    10192    class UnlinkedEvalCodeBlock;
     
    231222        const HashTable* arrayPrototypeTable;
    232223        const HashTable* booleanPrototypeTable;
     224        const HashTable* dataViewTable;
    233225        const HashTable* dateTable;
    234226        const HashTable* dateConstructorTable;
     
    391383        LegacyProfiler* m_enabledProfiler;
    392384        OwnPtr<Profiler::Database> m_perBytecodeProfiler;
     385        RefPtr<TypedArrayController> m_typedArrayController;
    393386        RegExpCache* m_regExpCache;
    394387        BumpPointerAllocator m_regExpAllocator;
     
    429422        void resetNewStringsSinceLastHashCons() { m_newStringsSinceLastHashCons = 0; }
    430423
    431 #define registerTypedArrayFunction(type, capitalizedType) \
    432         void registerTypedArrayDescriptor(const capitalizedType##Array*, const TypedArrayDescriptor& descriptor) \
    433         { \
    434             ASSERT(!m_##type##ArrayDescriptor.m_classInfo || m_##type##ArrayDescriptor.m_classInfo == descriptor.m_classInfo); \
    435             m_##type##ArrayDescriptor = descriptor; \
    436             ASSERT(m_##type##ArrayDescriptor.m_classInfo); \
    437         } \
    438         const TypedArrayDescriptor& type##ArrayDescriptor() const { ASSERT(m_##type##ArrayDescriptor.m_classInfo); return m_##type##ArrayDescriptor; }
    439 
    440         registerTypedArrayFunction(int8, Int8);
    441         registerTypedArrayFunction(int16, Int16);
    442         registerTypedArrayFunction(int32, Int32);
    443         registerTypedArrayFunction(uint8, Uint8);
    444         registerTypedArrayFunction(uint8Clamped, Uint8Clamped);
    445         registerTypedArrayFunction(uint16, Uint16);
    446         registerTypedArrayFunction(uint32, Uint32);
    447         registerTypedArrayFunction(float32, Float32);
    448         registerTypedArrayFunction(float64, Float64);
    449 #undef registerTypedArrayFunction
    450        
    451         const TypedArrayDescriptor* typedArrayDescriptor(TypedArrayType type) const
    452         {
    453             switch (type) {
    454             case TypedArrayNone:
    455                 return 0;
    456             case TypedArrayInt8:
    457                 return &int8ArrayDescriptor();
    458             case TypedArrayInt16:
    459                 return &int16ArrayDescriptor();
    460             case TypedArrayInt32:
    461                 return &int32ArrayDescriptor();
    462             case TypedArrayUint8:
    463                 return &uint8ArrayDescriptor();
    464             case TypedArrayUint8Clamped:
    465                 return &uint8ClampedArrayDescriptor();
    466             case TypedArrayUint16:
    467                 return &uint16ArrayDescriptor();
    468             case TypedArrayUint32:
    469                 return &uint32ArrayDescriptor();
    470             case TypedArrayFloat32:
    471                 return &float32ArrayDescriptor();
    472             case TypedArrayFloat64:
    473                 return &float64ArrayDescriptor();
    474             default:
    475                 CRASH();
    476                 return 0;
    477             }
    478         }
    479 
    480424        bool currentThreadIsHoldingAPILock() const
    481425        {
     
    511455        OwnPtr<CodeCache> m_codeCache;
    512456        RefCountedArray<StackFrame> m_exceptionStack;
    513 
    514         TypedArrayDescriptor m_int8ArrayDescriptor;
    515         TypedArrayDescriptor m_int16ArrayDescriptor;
    516         TypedArrayDescriptor m_int32ArrayDescriptor;
    517         TypedArrayDescriptor m_uint8ArrayDescriptor;
    518         TypedArrayDescriptor m_uint8ClampedArrayDescriptor;
    519         TypedArrayDescriptor m_uint16ArrayDescriptor;
    520         TypedArrayDescriptor m_uint32ArrayDescriptor;
    521         TypedArrayDescriptor m_float32ArrayDescriptor;
    522         TypedArrayDescriptor m_float64ArrayDescriptor;
    523457    };
    524458
Note: See TracChangeset for help on using the changeset viewer.