Ignore:
Timestamp:
Feb 17, 2011, 12:35:59 PM (14 years ago)
Author:
[email protected]
Message:

2011-02-17 Oliver Hunt <[email protected]>

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):
File:
1 edited

Legend:

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

    r78732 r78856  
    455455{
    456456    if (WriteBarrierBase<Unknown>* location = getDirectLocation(propertyName)) {
    457         if (m_structure->hasGetterSetterProperties() && location->isGetterSetter())
     457        if (m_structure->hasGetterSetterProperties() && (*location)->isGetterSetter())
    458458            fillGetterPropertySlot(slot, location);
    459459        else
Note: See TracChangeset for help on using the changeset viewer.