Ignore:
Timestamp:
Mar 3, 2011, 1:24:14 PM (14 years ago)
Author:
[email protected]
Message:

2011-03-02 Geoffrey Garen <[email protected]>

Reviewed by Darin Adler.

Moved all variable object storage inline -- upping the object size limit to 1K
https://bugs.webkit.org/show_bug.cgi?id=55653

  • JavaScriptCore.exp:
  • bytecompiler/BytecodeGenerator.cpp:
  • jit/JITOpcodes.cpp:
  • runtime/Arguments.h:
  • runtime/JSActivation.h: Removed out-of-line storage. Changed d-> to m_.
  • runtime/JSCell.h: (JSC::JSCell::MarkedSpace::sizeClassFor): Added an imprecise size class to accomodate objects up to 1K.
  • runtime/JSGlobalObject.cpp:
  • runtime/JSGlobalObject.h: Removed out-of-line storage. Changed d-> to m_.
  • runtime/JSObject.cpp: Don't ASSERT that JSFinalObject fills the maximum object size, since it doesn't anymore.
  • runtime/JSStaticScopeObject.cpp:
  • runtime/JSStaticScopeObject.h:
  • runtime/JSVariableObject.h: Removed out-of-line storage. Changed d-> to m_.
  • runtime/MarkedSpace.cpp: (JSC::MarkedSpace::MarkedSpace): (JSC::MarkedSpace::reset):
  • runtime/MarkedSpace.h: Added an imprecise size class to accomodate objects up to 1K.

2011-03-02 Geoffrey Garen <[email protected]>

Reviewed by Darin Adler.

Moved all variable object storage inline -- upping the object size limit to 1K
https://bugs.webkit.org/show_bug.cgi?id=55653

  • JSRun.cpp: (JSGlueGlobalObject::JSGlueGlobalObject):
  • JSRun.h: (JSGlueGlobalObject::Flags): (JSGlueGlobalObject::userObjectStructure): Removed out-of-line storage. Changed d-> to m_.

2011-03-02 Geoffrey Garen <[email protected]>

Reviewed by Darin Adler.

Moved all variable object storage inline -- upping the object size limit to 1K
https://bugs.webkit.org/show_bug.cgi?id=55653

  • bindings/js/JSDOMGlobalObject.cpp:
  • bindings/js/JSDOMGlobalObject.h:
  • bindings/js/JSDOMWindowBase.cpp:
  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSDOMWindowCustom.h:
  • bindings/js/JSWorkerContextBase.cpp: Removed out-of-line storage. Changed d-> to m_.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/JSActivation.cpp

    r80179 r80277  
    4141
    4242JSActivation::JSActivation(CallFrame* callFrame, NonNullPassRefPtr<FunctionExecutable> functionExecutable)
    43     : Base(callFrame->globalData().activationStructure, new JSActivationData(functionExecutable, callFrame->registers()))
     43    : Base(callFrame->globalData().activationStructure, functionExecutable->symbolTable(), callFrame->registers())
     44    , m_functionExecutable(functionExecutable)
    4445{
    4546    ASSERT(inherits(&s_info));
     47
     48    // We have to manually ref and deref the symbol table as JSVariableObjectData
     49    // doesn't know about SharedSymbolTable
     50    static_cast<SharedSymbolTable*>(m_symbolTable)->ref();
    4651}
    4752
    4853JSActivation::~JSActivation()
    4954{
    50     delete d();
     55    static_cast<SharedSymbolTable*>(m_symbolTable)->deref();
    5156}
    5257
     
    5661
    5762    // No need to mark our registers if they're still in the RegisterFile.
    58     Register* registerArray = d()->registerArray.get();
     63    Register* registerArray = m_registerArray.get();
    5964    if (!registerArray)
    6065        return;
    6166
    62     size_t numParametersMinusThis = d()->functionExecutable->parameterCount();
     67    size_t numParametersMinusThis = m_functionExecutable->parameterCount();
    6368
    6469    size_t count = numParametersMinusThis;
    6570    markStack.deprecatedAppendValues(registerArray, count);
    6671
    67     size_t numVars = d()->functionExecutable->capturedVariableCount();
     72    size_t numVars = m_functionExecutable->capturedVariableCount();
    6873
    6974    // Skip the call frame, which sits between the parameters and vars.
     
    7580    SymbolTableEntry entry = symbolTable().inlineGet(propertyName.impl());
    7681    if (!entry.isNull()) {
    77         ASSERT(entry.getIndex() < static_cast<int>(d()->functionExecutable->capturedVariableCount()));
     82        ASSERT(entry.getIndex() < static_cast<int>(m_functionExecutable->capturedVariableCount()));
    7883        slot.setValue(registerAt(entry.getIndex()).jsValue());
    7984        return true;
     
    9196    if (entry.isReadOnly())
    9297        return true;
    93     ASSERT(entry.getIndex() < static_cast<int>(d()->functionExecutable->capturedVariableCount()));
     98    ASSERT(entry.getIndex() < static_cast<int>(m_functionExecutable->capturedVariableCount()));
    9499    registerAt(entry.getIndex()) = value;
    95100    return true;
     
    100105    SymbolTable::const_iterator end = symbolTable().end();
    101106    for (SymbolTable::const_iterator it = symbolTable().begin(); it != end; ++it) {
    102         ASSERT(it->second.getIndex() < static_cast<int>(d()->functionExecutable->capturedVariableCount()));
     107        ASSERT(it->second.getIndex() < static_cast<int>(m_functionExecutable->capturedVariableCount()));
    103108        if (!(it->second.getAttributes() & DontEnum) || (mode == IncludeDontEnumProperties))
    104109            propertyNames.add(Identifier(exec, it->first.get()));
     
    117122    SymbolTableEntry& entry = iter->second;
    118123    ASSERT(!entry.isNull());
    119     if (entry.getIndex() >= static_cast<int>(d()->functionExecutable->capturedVariableCount()))
     124    if (entry.getIndex() >= static_cast<int>(m_functionExecutable->capturedVariableCount()))
    120125        return false;
    121126    entry.setAttributes(attributes);
     
    196201bool JSActivation::isDynamicScope(bool& requiresDynamicChecks) const
    197202{
    198     requiresDynamicChecks = d()->functionExecutable->usesEval();
     203    requiresDynamicChecks = m_functionExecutable->usesEval();
    199204    return false;
    200205}
     
    203208{
    204209    JSActivation* activation = asActivation(slotBase);
    205     CallFrame* callFrame = CallFrame::create(activation->d()->registers);
    206     int argumentsRegister = activation->d()->functionExecutable->generatedBytecode().argumentsRegister();
     210    CallFrame* callFrame = CallFrame::create(activation->m_registers);
     211    int argumentsRegister = activation->m_functionExecutable->generatedBytecode().argumentsRegister();
    207212    if (JSValue arguments = callFrame->uncheckedR(argumentsRegister).jsValue())
    208213        return arguments;
Note: See TracChangeset for help on using the changeset viewer.