-
oliver@apple.com authored
Reviewed by Geoffrey Garen. Refactor WriteBarrier and DeprecatedPtr to have less code duplication. https://bugs.webkit.org/show_bug.cgi?id=54608 Make use of the tricks used for Handle, et al to avoid duplicating all of the logic for DeprecatedPtr and WriteBarrier simply to support known vs. unknown types. * JavaScriptCore.xcodeproj/project.pbxproj: * collector/handles/Global.h: (JSC::Global::internalSet): * collector/handles/Handle.h: (JSC::Handle::Handle): (JSC::Handle::get): * runtime/JSArray.cpp: (JSC::JSArray::sortNumeric): * runtime/JSObject.h: (JSC::JSObject::inlineGetOwnPropertySlot): * runtime/SlotAccessor.h: Added. (JSC::SlotTypes::getFromBaseType): (JSC::SlotTypes::convertToBaseType): (JSC::SlotTypes::getFromSlot): (JSC::SlotTypes::toJSValue): (JSC::SlotTypes::validateUpcast): (JSC::SlotAccessor::operator->): (JSC::SlotAccessor::operator*): * runtime/WeakGCPtr.h: (JSC::WeakGCPtr::get): (JSC::WeakGCPtr::internalSet): * runtime/WriteBarrier.h: (JSC::DeprecatedPtr::DeprecatedPtr): (JSC::DeprecatedPtr::get): (JSC::DeprecatedPtr::slot): (JSC::DeprecatedPtr::operator=): (JSC::WriteBarrierTranslator::convertToStorage): (JSC::WriteBarrierTranslator::convertFromStorage): (JSC::WriteBarrierBase::set): (JSC::WriteBarrierBase::get): (JSC::WriteBarrierBase::clear): (JSC::WriteBarrierBase::slot): (JSC::WriteBarrierBase::operator UnspecifiedBoolType*): (JSC::WriteBarrierBase::operator!): (JSC::WriteBarrierBase::setWithoutWriteBarrier): (JSC::WriteBarrier::WriteBarrier): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@78856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
4a3914d3