Ignore:
Timestamp:
Mar 3, 2011, 2:30:59 PM (14 years ago)
Author:
[email protected]
Message:

2011-03-03 Oliver Hunt <[email protected]>

Reviewed by Geoffrey Garen.

JSVariableObject needs to use WriteBarrier for symboltable property storage
https://bugs.webkit.org/show_bug.cgi?id=55698

Replace the direct usage of Register in JSVariableObject (and descendents)
with WriteBarrier. This requires updating the Arguments object to use
WriteBarrier as well.

  • interpreter/Interpreter.cpp: (JSC::Interpreter::unwindCallFrame): (JSC::Interpreter::privateExecute): (JSC::Interpreter::retrieveArguments):
  • jit/JITStubs.cpp: (JSC::DEFINE_STUB_FUNCTION):
  • runtime/ArgList.h: (JSC::MarkedArgumentBuffer::initialize):
  • runtime/Arguments.cpp: (JSC::Arguments::markChildren): (JSC::Arguments::copyToRegisters): (JSC::Arguments::fillArgList): (JSC::Arguments::getOwnPropertySlot): (JSC::Arguments::getOwnPropertyDescriptor): (JSC::Arguments::put):
  • runtime/Arguments.h: (JSC::Arguments::setActivation): (JSC::Arguments::Arguments): (JSC::Arguments::copyRegisters): (JSC::JSActivation::copyRegisters):
  • runtime/JSActivation.cpp: (JSC::JSActivation::markChildren): (JSC::JSActivation::symbolTableGet): (JSC::JSActivation::symbolTablePut): (JSC::JSActivation::symbolTablePutWithAttributes): (JSC::JSActivation::put): (JSC::JSActivation::putWithAttributes): (JSC::JSActivation::argumentsGetter):
  • runtime/JSActivation.h:
  • runtime/JSGlobalObject.cpp: (JSC::JSGlobalObject::put): (JSC::JSGlobalObject::putWithAttributes): (JSC::JSGlobalObject::markChildren): (JSC::JSGlobalObject::copyGlobalsFrom): (JSC::JSGlobalObject::copyGlobalsTo): (JSC::JSGlobalObject::resizeRegisters):
  • runtime/JSGlobalObject.h: (JSC::JSGlobalObject::setRegisters): (JSC::JSGlobalObject::addStaticGlobals):
  • runtime/JSStaticScopeObject.cpp: (JSC::JSStaticScopeObject::put): (JSC::JSStaticScopeObject::putWithAttributes):
  • runtime/JSVariableObject.cpp: (JSC::JSVariableObject::symbolTableGet):
  • runtime/JSVariableObject.h: (JSC::JSVariableObject::registerAt): (JSC::JSVariableObject::JSVariableObjectData::JSVariableObjectData): (JSC::JSVariableObject::symbolTableGet): (JSC::JSVariableObject::symbolTablePut): (JSC::JSVariableObject::symbolTablePutWithAttributes): (JSC::JSVariableObject::copyRegisterArray): (JSC::JSVariableObject::setRegisters):

2011-03-03 Oliver Hunt <[email protected]>

Reviewed by Geoffrey Garen.

JSVariableObject needs to use WriteBarrier for symboltable property storage
https://bugs.webkit.org/show_bug.cgi?id=55698

Update to pass JSGlobalData for the symbol table write used
to set the document property.

  • bindings/js/JSDOMWindowBase.cpp: (WebCore::JSDOMWindowBase::updateDocument):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r79904 r80285  
    570570        callFrame->setScopeChain(scopeChain);
    571571        JSActivation* activation = asActivation(scopeChain->object.get());
    572         activation->copyRegisters();
     572        activation->copyRegisters(*scopeChain->globalData);
    573573        if (JSValue arguments = callFrame->uncheckedR(unmodifiedArgumentsRegister(oldCodeBlock->argumentsRegister())).jsValue()) {
    574574            if (!oldCodeBlock->isStrictMode())
     
    577577    } else if (oldCodeBlock->usesArguments() && !oldCodeBlock->isStrictMode()) {
    578578        if (JSValue arguments = callFrame->uncheckedR(unmodifiedArgumentsRegister(oldCodeBlock->argumentsRegister())).jsValue())
    579             asArguments(arguments)->copyRegisters();
     579            asArguments(arguments)->copyRegisters(callFrame->globalData());
    580580    }
    581581
     
    23572357        int index = vPC[2].u.operand;
    23582358
    2359         callFrame->uncheckedR(dst) = scope->registerAt(index);
     2359        callFrame->uncheckedR(dst) = scope->registerAt(index).get();
    23602360        vPC += OPCODE_LENGTH(op_get_global_var);
    23612361        NEXT_INSTRUCTION();
     
    23712371        int value = vPC[2].u.operand;
    23722372       
    2373         scope->registerAt(index) = JSValue(callFrame->r(value).jsValue());
     2373        scope->registerAt(index).set(*globalData, scope, callFrame->r(value).jsValue());
    23742374        vPC += OPCODE_LENGTH(op_put_global_var);
    23752375        NEXT_INSTRUCTION();
     
    24022402        ASSERT((*iter)->isVariableObject());
    24032403        JSVariableObject* scope = static_cast<JSVariableObject*>(iter->get());
    2404         callFrame->uncheckedR(dst) = scope->registerAt(index);
     2404        callFrame->uncheckedR(dst) = scope->registerAt(index).get();
    24052405        ASSERT(callFrame->r(dst).jsValue());
    24062406        vPC += OPCODE_LENGTH(op_get_scoped_var);
     
    24342434        JSVariableObject* scope = static_cast<JSVariableObject*>(iter->get());
    24352435        ASSERT(callFrame->r(value).jsValue());
    2436         scope->registerAt(index) = JSValue(callFrame->r(value).jsValue());
     2436        scope->registerAt(index).set(*globalData, scope, callFrame->r(value).jsValue());
    24372437        vPC += OPCODE_LENGTH(op_put_scoped_var);
    24382438        NEXT_INSTRUCTION();
     
    40944094        JSValue activationValue = callFrame->r(activation).jsValue();
    40954095        if (activationValue) {
    4096             asActivation(activationValue)->copyRegisters();
     4096            asActivation(activationValue)->copyRegisters(*globalData);
    40974097
    40984098            if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) {
     
    41024102        } else if (JSValue argumentsValue = callFrame->r(unmodifiedArgumentsRegister(arguments)).jsValue()) {
    41034103            if (!codeBlock->isStrictMode())
    4104                 asArguments(argumentsValue)->copyRegisters();
     4104                asArguments(argumentsValue)->copyRegisters(*globalData);
    41054105        }
    41064106
     
    41244124
    41254125        if (JSValue arguments = callFrame->r(unmodifiedArgumentsRegister(src1)).jsValue())
    4126             asArguments(arguments)->copyRegisters();
     4126            asArguments(arguments)->copyRegisters(*globalData);
    41274127
    41284128        vPC += OPCODE_LENGTH(op_tear_off_arguments);
     
    48004800
    48014801    Arguments* arguments = new (functionCallFrame) Arguments(functionCallFrame);
    4802     arguments->copyRegisters();
     4802    arguments->copyRegisters(functionCallFrame->globalData());
    48034803    return arguments;
    48044804}
Note: See TracChangeset for help on using the changeset viewer.