Ignore:
Timestamp:
Jul 31, 2013, 6:09:25 PM (12 years ago)
Author:
[email protected]
Message:

More cleanup in PropertySlot
https://bugs.webkit.org/show_bug.cgi?id=119359

Reviewed by Geoff Garen.

m_slotBase is overloaded to store the (receiver) thisValue and the object that contains the property,
This is confusing, and means that slotBase cannot be typed correctly (can only be a JSObject).

  • dfg/DFGRepatch.cpp:

(JSC::DFG::tryCacheGetByID):
(JSC::DFG::tryBuildGetByIDList):

  • No need to ASSERT slotBase is an object.
  • jit/JITStubs.cpp:

(JSC::tryCacheGetByID):
(JSC::DEFINE_STUB_FUNCTION):

  • No need to ASSERT slotBase is an object.
  • runtime/JSObject.cpp:

(JSC::JSObject::getOwnPropertySlotByIndex):
(JSC::JSObject::fillGetterPropertySlot):

  • Pass an object through to setGetterSlot.
  • runtime/JSObject.h:

(JSC::PropertySlot::getValue):

  • Moved from PropertySlot (need to know anout JSObject).
  • runtime/PropertySlot.cpp:

(JSC::PropertySlot::functionGetter):

  • update per member name changes
  • runtime/PropertySlot.h:

(JSC::PropertySlot::PropertySlot):

  • Argument to constructor set to 'thisValue'.

(JSC::PropertySlot::slotBase):

  • This returns a JSObject*.

(JSC::PropertySlot::setValue):
(JSC::PropertySlot::setCustom):
(JSC::PropertySlot::setCacheableCustom):
(JSC::PropertySlot::setCustomIndex):
(JSC::PropertySlot::setGetterSlot):
(JSC::PropertySlot::setCacheableGetterSlot):

  • slotBase is a JSObject*, make setGetterSlot set slotBase for consistency.
  • runtime/SparseArrayValueMap.cpp:

(JSC::SparseArrayEntry::get):

  • Pass an object through to setGetterSlot.
  • runtime/SparseArrayValueMap.h:
    • Pass an object through to setGetterSlot.
File:
1 edited

Legend:

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

    r153532 r153556  
    320320            SparseArrayValueMap::iterator it = map->find(i);
    321321            if (it != map->notFound()) {
    322                 it->value.get(slot);
     322                it->value.get(thisObject, slot);
    323323                return true;
    324324            }
     
    16241624{
    16251625    if (structure()->isDictionary()) {
    1626         slot.setGetterSlot(jsCast<GetterSetter*>(getterSetter));
     1626        slot.setGetterSlot(this, jsCast<GetterSetter*>(getterSetter));
    16271627        return;
    16281628    }
Note: See TracChangeset for help on using the changeset viewer.