Ignore:
Timestamp:
Nov 1, 2007, 1:36:58 AM (18 years ago)
Author:
ggaren
Message:

Reviewed by Oliver Hunt.


Removed List from ActivationImp, in preparation for making all lists
stack-allocated.


Tests pass.


1.0% speedup on SunSpider, presumably due to reduced List refcount thrash.

  • kjs/ExecState.cpp: (KJS::ExecState::ExecState): (KJS::ExecState::~ExecState):
  • kjs/function.cpp: (KJS::ActivationImp::ActivationImp): (KJS::ActivationImp::createArgumentsObject):
  • kjs/function.h: (KJS::ActivationImp::ActivationImpPrivate::ActivationImpPrivate):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/ExecState.cpp

    r27339 r27344  
    5252    // create and initialize activation object (ECMA 10.1.6)
    5353    if (type == FunctionCode) {
    54         m_activation = new ActivationImp(func, *args);
     54        m_activation = new ActivationImp(this);
    5555        m_variable = m_activation;
    5656    } else {
     
    8888{
    8989    m_interpreter->setCurrentExec(m_savedExecState);
    90 
    91     // The arguments list is only needed to potentially create the  arguments object,
    92     // which isn't accessible from nested scopes so we can discard the list as soon
    93     // as the function is done running.
    94     // This prevents lists of Lists from building up, waiting to be garbage collected
    95     ActivationImp* activation = static_cast<ActivationImp*>(m_activation);
    96     if (activation)
    97         activation->releaseArguments();
    9890}
    9991
Note: See TracChangeset for help on using the changeset viewer.