Ignore:
Timestamp:
Oct 7, 2011, 5:06:07 PM (14 years ago)
Author:
[email protected]
Message:

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

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.

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

(JSC::::put):

(JSC::DebuggerActivation::put):

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

(JSC::Arguments::put):

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

(JSC::JSActivation::put):

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

(JSC::JSArray::put):

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

(JSC::JSByteArray::put):

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

(JSC::JSCell::put):

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

(JSC::JSFunction::put):

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

(JSC::JSGlobalObject::put):

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

(JSC::JSNotAnObject::put):

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

(JSC::JSObject::put):

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

(JSC::JSStaticScopeObject::put):

  • runtime/JSStaticScopeObject.h:
  • runtime/ObjectPrototype.cpp:

(JSC::ObjectPrototype::put):

  • runtime/ObjectPrototype.h:
  • runtime/RegExpConstructor.cpp:

(JSC::RegExpConstructor::put):

  • runtime/RegExpConstructor.h:
  • runtime/RegExpMatchesArray.h:

(JSC::RegExpMatchesArray::put):

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::put):

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

(JSC::StringObject::put):

  • runtime/StringObject.h:

Source/JavaScriptGlue:

Added static version of both versions of put to all classes that
override them and changed the virtual versions to call the static
versions.

  • UserObjectImp.cpp:

(UserObjectImp::put):

  • UserObjectImp.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.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::JSTestObj::put):

  • bindings/scripts/test/JS/JSTestObj.h:
  • bridge/objc/objc_runtime.h:
  • bridge/objc/objc_runtime.mm:

(JSC::Bindings::ObjcFallbackObjectImp::put):

  • bridge/runtime_array.cpp:

(JSC::RuntimeArray::put):

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

(JSC::Bindings::RuntimeObject::put):

  • bridge/runtime_object.h:
File:
1 edited

Legend:

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

    r95901 r96992  
    6767        virtual void put(ExecState* exec, const Identifier& propertyName, JSValue v, PutPropertySlot& slot)
    6868        {
    69             if (subclassData())
    70                 fillArrayInstance(exec);
    71             JSArray::put(exec, propertyName, v, slot);
     69            put(this, exec, propertyName, v, slot);
    7270        }
    7371
     72        static void put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue v, PutPropertySlot& slot)
     73        {
     74            RegExpMatchesArray* thisObject = static_cast<RegExpMatchesArray*>(cell);
     75            if (thisObject->subclassData())
     76                thisObject->fillArrayInstance(exec);
     77            JSArray::put(thisObject, exec, propertyName, v, slot);
     78        }
     79       
    7480        virtual void put(ExecState* exec, unsigned propertyName, JSValue v)
    7581        {
    76             if (subclassData())
    77                 fillArrayInstance(exec);
    78             JSArray::put(exec, propertyName, v);
     82            put(this, exec, propertyName, v);
     83        }
     84       
     85        static void put(JSCell* cell, ExecState* exec, unsigned propertyName, JSValue v)
     86        {
     87            RegExpMatchesArray* thisObject = static_cast<RegExpMatchesArray*>(cell);
     88            if (thisObject->subclassData())
     89                thisObject->fillArrayInstance(exec);
     90            JSArray::put(thisObject, exec, propertyName, v);
    7991        }
    8092
Note: See TracChangeset for help on using the changeset viewer.