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/function.cpp

    r27210 r27344  
    393393const ClassInfo ActivationImp::info = {"Activation", 0, 0, 0};
    394394
    395 ActivationImp::ActivationImp(FunctionImp* function, const List& arguments)
    396     : d(new ActivationImpPrivate(function, arguments))
    397     , m_symbolTable(&function->body->symbolTable())
     395ActivationImp::ActivationImp(ExecState* exec)
     396    : d(new ActivationImpPrivate(exec))
     397    , m_symbolTable(&exec->function()->body->symbolTable())
    398398{
    399399}
     
    479479    JSObject::mark();
    480480
    481     if (!d->function->marked())
    482         d->function->mark();
    483 
    484481    size_t size = d->localStorage.size();
    485482    for (size_t i = 0; i < size; ++i) {
     
    495492void ActivationImp::createArgumentsObject(ExecState* exec)
    496493{
    497   d->argumentsObject = new Arguments(exec, d->function, d->arguments, this);
    498 
    499   // The arguments list is only needed to create the arguments object, so discard it now.
    500   // This prevents lists of Lists from building up, waiting to be garbage collected.
    501   d->arguments.reset();
     494    d->argumentsObject = new Arguments(exec, d->exec->function(), *d->exec->arguments(), this);
    502495}
    503496
Note: See TracChangeset for help on using the changeset viewer.