JavaScriptCore:
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Jan 2008 02:08:50 +0000 (02:08 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Jan 2008 02:08:50 +0000 (02:08 +0000)
commitebfb09bcebf77594ba1d17a48b9e9d3c76169fb2
tree4e52ee089f4a31ae384b478f696f8deec42476fb
parent64bb48ed038c361827a6936a5650f297ad407667
JavaScriptCore:

        Reviewed by Maciej.

        Optimized ActivationImp allocation, so that activation records are now
        first allocated on an explicitly managed stack and only heap allocated
        when necessary. Roughly a 5% improvement on SunSpider, and a larger
        improvement on benchmarks that use more function calls.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/Activation.h: Added.
        (KJS::ActivationImp::ActivationData::ActivationData):
        (KJS::ActivationImp::ActivationImp):
        (KJS::ActivationImp::classInfo):
        (KJS::ActivationImp::isActivationObject):
        (KJS::ActivationImp::isOnStack):
        (KJS::ActivationImp::d):
        (KJS::StackActivation::StackActivation):
        * kjs/ExecState.cpp:
        (KJS::ExecState::ExecState):
        (KJS::ExecState::~ExecState):
        * kjs/ExecState.h:
        (KJS::ExecState::replaceScopeChainTop):
        (KJS::ExecState::setActivationObject):
        (KJS::ExecState::setLocalStorage):
        * kjs/JSGlobalObject.cpp:
        (KJS::JSGlobalObject::reset):
        (KJS::JSGlobalObject::pushActivation):
        (KJS::JSGlobalObject::checkActivationCount):
        (KJS::JSGlobalObject::popActivationHelper):
        (KJS::JSGlobalObject::popActivation):
        (KJS::JSGlobalObject::tearOffActivation):
        * kjs/JSGlobalObject.h:
        * kjs/JSVariableObject.h:
        (KJS::JSVariableObject::JSVariableObjectData::JSVariableObjectData):
        (KJS::JSVariableObject::JSVariableObject):
        * kjs/function.cpp:
        (KJS::FunctionImp::argumentsGetter):
        (KJS::ActivationImp::ActivationImp):
        (KJS::ActivationImp::~ActivationImp):
        (KJS::ActivationImp::init):
        (KJS::ActivationImp::getOwnPropertySlot):
        (KJS::ActivationImp::markHelper):
        (KJS::ActivationImp::mark):
        (KJS::ActivationImp::ActivationData::ActivationData):
        (KJS::GlobalFuncImp::callAsFunction):
        * kjs/function.h:
        * kjs/nodes.cpp:
        (KJS::PostIncResolveNode::evaluate):
        (KJS::PostDecResolveNode::evaluate):
        (KJS::PreIncResolveNode::evaluate):
        (KJS::PreDecResolveNode::evaluate):
        (KJS::ReadModifyResolveNode::evaluate):
        (KJS::AssignResolveNode::evaluate):
        (KJS::WithNode::execute):
        (KJS::TryNode::execute):
        (KJS::FunctionBodyNode::processDeclarations):
        (KJS::FuncExprNode::evaluate):
        * kjs/object.h:
        * kjs/scope_chain.h:
        (KJS::ScopeChain::replace):
        * kjs/scope_chain_mark.h: Added.
        (KJS::ScopeChain::mark):

WebCore:

        Reviewed by Maciej.

        Added a new forwarding header, because Activation.h has been separated
        from function.h

        * ForwardingHeaders/kjs/Activation.h: Added.

LayoutTests:

        Reviewed by Maciej.

        Added a test case that came up when developing the ActivationImp tear-off.

        * fast/js/resources/vardecl-preserve-arguments.js:
        * fast/js/vardecl-preserve-arguments-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/kjs/Activation.h [new file with mode: 0644]
JavaScriptCore/kjs/ExecState.cpp
JavaScriptCore/kjs/ExecState.h
JavaScriptCore/kjs/JSGlobalObject.cpp
JavaScriptCore/kjs/JSGlobalObject.h
JavaScriptCore/kjs/JSVariableObject.h
JavaScriptCore/kjs/function.cpp
JavaScriptCore/kjs/function.h
JavaScriptCore/kjs/nodes.cpp
JavaScriptCore/kjs/object.h
JavaScriptCore/kjs/scope_chain.h
JavaScriptCore/kjs/scope_chain_mark.h [new file with mode: 0644]
LayoutTests/ChangeLog
LayoutTests/fast/js/resources/vardecl-preserve-arguments.js
LayoutTests/fast/js/vardecl-preserve-arguments-expected.txt
WebCore/ChangeLog
WebCore/ForwardingHeaders/kjs/Activation.h [new file with mode: 0644]