Ignore:
Timestamp:
Dec 23, 2013, 4:11:25 PM (12 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 msaboff.

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/llint/LLIntSlowPaths.cpp

    r160244 r161033  
    579579   
    580580    JSValue baseValue = LLINT_OP_C(1).jsValue();
    581     PutPropertySlot slot(codeBlock->isStrictMode(), codeBlock->putByIdContext());
     581    PutPropertySlot slot(baseValue, codeBlock->isStrictMode(), codeBlock->putByIdContext());
    582582    if (pc[8].u.operand)
    583583        asObject(baseValue)->putDirect(vm, ident, LLINT_OP_C(3).jsValue(), slot);
     
    735735
    736736    if (isName(subscript)) {
    737         PutPropertySlot slot(exec->codeBlock()->isStrictMode());
     737        PutPropertySlot slot(baseValue, exec->codeBlock()->isStrictMode());
    738738        baseValue.put(exec, jsCast<NameInstance*>(subscript.asCell())->privateName(), value, slot);
    739739        LLINT_END();
     
    742742    Identifier property(exec, subscript.toString(exec)->value(exec));
    743743    LLINT_CHECK_EXCEPTION();
    744     PutPropertySlot slot(exec->codeBlock()->isStrictMode());
     744    PutPropertySlot slot(baseValue, exec->codeBlock()->isStrictMode());
    745745    baseValue.put(exec, property, value, slot);
    746746    LLINT_END();
     
    760760        baseObject->putDirectIndex(exec, i, value);
    761761    } else if (isName(subscript)) {
    762         PutPropertySlot slot(exec->codeBlock()->isStrictMode());
     762        PutPropertySlot slot(baseObject, exec->codeBlock()->isStrictMode());
    763763        baseObject->putDirect(exec->vm(), jsCast<NameInstance*>(subscript.asCell())->privateName(), value, slot);
    764764    } else {
    765765        Identifier property(exec, subscript.toString(exec)->value(exec));
    766766        if (!exec->vm().exception()) { // Don't put to an object if toString threw an exception.
    767             PutPropertySlot slot(exec->codeBlock()->isStrictMode());
     767            PutPropertySlot slot(baseObject, exec->codeBlock()->isStrictMode());
    768768            baseObject->putDirect(exec->vm(), property, value, slot);
    769769        }
     
    13691369        LLINT_THROW(createUndefinedVariableError(exec, ident));
    13701370
    1371     PutPropertySlot slot(codeBlock->isStrictMode());
     1371    PutPropertySlot slot(scope, codeBlock->isStrictMode());
    13721372    scope->methodTable()->put(scope, exec, ident, value, slot);
    13731373
Note: See TracChangeset for help on using the changeset viewer.