Ignore:
Timestamp:
Jan 2, 2014, 12:56:20 PM (11 years ago)
Author:
[email protected]
Message:

Refactor PutPropertySlot to be aware of custom properties
https://bugs.webkit.org/show_bug.cgi?id=126187

Reviewed by Antti Koivisto.

Source/JavaScriptCore:

Refactor PutPropertySlot, making the constructor take the thisValue
used as a target. This results in a wide range of boilerplate changes
to pass the new parameter.

  • API/JSObjectRef.cpp:

(JSObjectSetProperty):

  • dfg/DFGOperations.cpp:

(JSC::DFG::operationPutByValInternal):

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):

  • jit/JITOperations.cpp:
  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • runtime/Arguments.cpp:

(JSC::Arguments::putByIndex):

  • runtime/ArrayPrototype.cpp:

(JSC::putProperty):
(JSC::arrayProtoFuncPush):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitiveByIndex):

  • runtime/JSCell.cpp:

(JSC::JSCell::putByIndex):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::put):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::putByIndex):

  • runtime/JSONObject.cpp:

(JSC::Walker::walk):

  • runtime/JSObject.cpp:

(JSC::JSObject::putByIndex):
(JSC::JSObject::putDirectNonIndexAccessor):
(JSC::JSObject::deleteProperty):

  • runtime/JSObject.h:

(JSC::JSObject::putDirect):

  • runtime/Lookup.h:

(JSC::putEntry):
(JSC::lookupPut):

  • runtime/PutPropertySlot.h:

(JSC::PutPropertySlot::PutPropertySlot):
(JSC::PutPropertySlot::setCustomProperty):
(JSC::PutPropertySlot::thisValue):
(JSC::PutPropertySlot::isCacheable):

Source/WebCore:

Update the bindings code generation and custom objects
to the new function signatures

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::put):

  • bindings/objc/WebScriptObject.mm:

(-[WebScriptObject setValue:forKey:]):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

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

(WebCore::JSTestInterface::putByIndex):

  • bridge/NP_jsobject.cpp:

(_NPN_SetProperty):

Source/WebKit/mac:

Update for new method signatures.

  • Plugins/Hosted/NetscapePluginInstanceProxy.mm:

(WebKit::NetscapePluginInstanceProxy::setProperty):

Source/WebKit2:

Update for new method signatures.

  • WebProcess/Plugins/Netscape/NPJSObject.cpp:

(WebKit::NPJSObject::setProperty):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r161077 r161220  
    111111
    112112    if (isName(property)) {
    113         PutPropertySlot slot(strict);
     113        PutPropertySlot slot(baseValue, strict);
    114114        if (direct) {
    115115            RELEASE_ASSERT(baseValue.isObject());
     
    123123    Identifier ident(exec, property.toString(exec)->value(exec));
    124124    if (!vm->exception()) {
    125         PutPropertySlot slot(strict);
     125        PutPropertySlot slot(baseValue, strict);
    126126        if (direct) {
    127127            RELEASE_ASSERT(baseValue.isObject());
     
    400400    }
    401401   
    402     PutPropertySlot slot(true);
     402    PutPropertySlot slot(array, true);
    403403    array->methodTable()->put(
    404404        array, exec, Identifier::from(exec, index), JSValue::decode(encodedValue), slot);
     
    415415    }
    416416   
    417     PutPropertySlot slot(false);
     417    PutPropertySlot slot(array, false);
    418418    array->methodTable()->put(
    419419        array, exec, Identifier::from(exec, index), JSValue::decode(encodedValue), slot);
     
    432432    }
    433433   
    434     PutPropertySlot slot(true);
     434    PutPropertySlot slot(array, true);
    435435    array->methodTable()->put(
    436436        array, exec, Identifier::from(exec, index), jsValue, slot);
     
    449449    }
    450450   
    451     PutPropertySlot slot(false);
     451    PutPropertySlot slot(array, false);
    452452    array->methodTable()->put(
    453453        array, exec, Identifier::from(exec, index), jsValue, slot);
     
    495495    }
    496496   
    497     PutPropertySlot slot(true);
     497    PutPropertySlot slot(array, true);
    498498    array->putDirect(exec->vm(), Identifier::from(exec, index), JSValue::decode(encodedValue), slot);
    499499}
     
    509509    }
    510510   
    511     PutPropertySlot slot(false);
     511    PutPropertySlot slot(array, false);
    512512    array->putDirect(exec->vm(), Identifier::from(exec, index), JSValue::decode(encodedValue), slot);
    513513}
Note: See TracChangeset for help on using the changeset viewer.