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/JSFunction.cpp

    r96346 r96992  
    302302void JSFunction::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
    303303{
    304     if (isHostFunction()) {
    305         Base::put(exec, propertyName, value, slot);
     304    put(this, exec, propertyName, value, slot);
     305}
     306
     307void JSFunction::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)
     308{
     309    JSFunction* thisObject = static_cast<JSFunction*>(cell);
     310    if (thisObject->isHostFunction()) {
     311        Base::put(thisObject, exec, propertyName, value, slot);
    306312        return;
    307313    }
     
    310316        // following the rules set out in ECMA-262 8.12.9.
    311317        PropertySlot slot;
    312         getOwnPropertySlot(exec, propertyName, slot);
    313     }
    314     if (jsExecutable()->isStrictMode()) {
     318        thisObject->getOwnPropertySlot(exec, propertyName, slot);
     319    }
     320    if (thisObject->jsExecutable()->isStrictMode()) {
    315321        if (propertyName == exec->propertyNames().arguments) {
    316322            throwTypeError(exec, StrictModeArgumentsAccessError);
     
    324330    if (propertyName == exec->propertyNames().arguments || propertyName == exec->propertyNames().length)
    325331        return;
    326     Base::put(exec, propertyName, value, slot);
     332    Base::put(thisObject, exec, propertyName, value, slot);
    327333}
    328334
Note: See TracChangeset for help on using the changeset viewer.