Ignore:
Timestamp:
Oct 7, 2011, 11:37:45 PM (14 years ago)
Author:
[email protected]
Message:

Add static version of JSCell::deleteProperty
https://bugs.webkit.org/show_bug.cgi?id=69659

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Added static version of both versions of put to all classes that
override them and changed the virtual versions to call the static
versions. This is the first step in de-virtualizing JSCell::deleteProperty.

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::::deleteProperty):

  • debugger/DebuggerActivation.cpp:

(JSC::DebuggerActivation::deleteProperty):

  • debugger/DebuggerActivation.h:
  • runtime/Arguments.cpp:

(JSC::Arguments::deleteProperty):

  • runtime/Arguments.h:
  • runtime/JSActivation.cpp:

(JSC::JSActivation::deleteProperty):

  • runtime/JSActivation.h:
  • runtime/JSArray.cpp:

(JSC::JSArray::deleteProperty):

  • runtime/JSArray.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::deleteProperty):

  • runtime/JSCell.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::deleteProperty):

  • runtime/JSFunction.h:
  • runtime/JSNotAnObject.cpp:

(JSC::JSNotAnObject::deleteProperty):

  • runtime/JSNotAnObject.h:
  • runtime/JSObject.cpp:

(JSC::JSObject::deleteProperty):

  • runtime/JSObject.h:
  • runtime/JSVariableObject.cpp:

(JSC::JSVariableObject::deleteProperty):

  • runtime/JSVariableObject.h:
  • runtime/RegExpMatchesArray.h:

(JSC::RegExpMatchesArray::deleteProperty):

  • runtime/StrictEvalActivation.cpp:

(JSC::StrictEvalActivation::deleteProperty):

  • runtime/StrictEvalActivation.h:
  • runtime/StringObject.cpp:

(JSC::StringObject::deleteProperty):

  • runtime/StringObject.h:

Source/WebCore:

No new tests.

Added static version of both versions of put to all classes that
override them and changed the virtual versions to call the static
versions. This is the first step in de-virtualizing JSCell::deleteProperty.

  • bridge/objc/objc_runtime.h:
  • bridge/objc/objc_runtime.mm:

(JSC::Bindings::ObjcFallbackObjectImp::deleteProperty):

  • bridge/runtime_array.cpp:

(JSC::RuntimeArray::deleteProperty):

  • bridge/runtime_array.h:
  • bridge/runtime_object.cpp:

(JSC::Bindings::RuntimeObject::deleteProperty):

  • bridge/runtime_object.h:
File:
1 edited

Legend:

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

    r96992 r97002  
    9393        virtual bool deleteProperty(ExecState* exec, const Identifier& propertyName)
    9494        {
    95             if (subclassData())
    96                 fillArrayInstance(exec);
    97             return JSArray::deleteProperty(exec, propertyName);
     95            return deleteProperty(this, exec, propertyName);
     96        }
     97
     98        static bool deleteProperty(JSCell* cell, ExecState* exec, const Identifier& propertyName)
     99        {
     100            RegExpMatchesArray* thisObject = static_cast<RegExpMatchesArray*>(cell);
     101            if (thisObject->subclassData())
     102                thisObject->fillArrayInstance(exec);
     103            return JSArray::deleteProperty(thisObject, exec, propertyName);
    98104        }
    99105
    100106        virtual bool deleteProperty(ExecState* exec, unsigned propertyName)
    101107        {
    102             if (subclassData())
    103                 fillArrayInstance(exec);
    104             return JSArray::deleteProperty(exec, propertyName);
     108            return deleteProperty(this, exec, propertyName);
     109        }
     110
     111        static bool deleteProperty(JSCell* cell, ExecState* exec, unsigned propertyName)
     112        {
     113            RegExpMatchesArray* thisObject = static_cast<RegExpMatchesArray*>(cell);
     114            if (thisObject->subclassData())
     115                thisObject->fillArrayInstance(exec);
     116            return JSArray::deleteProperty(thisObject, exec, propertyName);
    105117        }
    106118
Note: See TracChangeset for help on using the changeset viewer.