Reviewed by John.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2005 23:20:48 +0000 (23:20 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2005 23:20:48 +0000 (23:20 +0000)
commit3eadca8969d148ff0aba768e3d913bd4a0a38287
treef0c9bb4056bdddf33de64bd5adfde82cfe91a4ad
parent3f9c71b2317ca9b045b16321577e2128d35d335c
    Reviewed by John.

- two simple speed improvements for a 3% speed gain

        * JavaScriptCore.xcodeproj/project.pbxproj: turn on -fstrict-aliasing

        * kjs/scope_chain.h:
        (KJS::ScopeChainIterator::ScopeChainIterator): Add a scope chain iterator
so you can walk a scope chain without having to make a copy that you then mutate.
        (KJS::ScopeChainIterator::operator*): standard iterator operation
        (KJS::ScopeChainIterator::operator->): ditto
        (KJS::ScopeChainIterator::operator++): ditto
        (KJS::ScopeChainIterator::operator==): ditto
        (KJS::ScopeChainIterator::operator!=): ditto
        (KJS::ScopeChain::begin): Iterator for the top of the scope chain
        (KJS::ScopeChain::end): Iterator for one past the bottom (i.e. null)
        * kjs/nodes.cpp:
        (ResolveNode::evaluate): Use scope chain iterator instead of copying
a scope chain and then modifying the copy
        (ResolveNode::evaluateReference): ditto
        (FunctionCallResolveNode::evaluate): ditto
        (AssignResolveNode::evaluate): ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@10168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/kjs/nodes.cpp
JavaScriptCore/kjs/scope_chain.h