Commit 70f1fe9d authored by cwzwarich@webkit.org's avatar cwzwarich@webkit.org

2008-10-24 Cameron Zwarich <zwarich@apple.com>

        Reviewed by Geoff Garen.

        Remove ScopeChainNode::bottom() and inline it into its only caller,
        ScopeChainnode::globalObject().

        * kjs/JSGlobalObject.h:
        (JSC::ScopeChainNode::globalObject):
        * kjs/ScopeChain.h:
        (JSC::ScopeChain::bottom):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 25b7fc51
2008-10-24 Cameron Zwarich <zwarich@apple.com>
Reviewed by Geoff Garen.
Remove ScopeChainNode::bottom() and inline it into its only caller,
ScopeChainnode::globalObject().
* kjs/JSGlobalObject.h:
(JSC::ScopeChainNode::globalObject):
* kjs/ScopeChain.h:
(JSC::ScopeChain::bottom):
2008-10-24 Cameron Zwarich <zwarich@apple.com>
Reviewed by Maciej Stachowiak.
......
......@@ -329,7 +329,10 @@ namespace JSC {
inline JSGlobalObject* ScopeChainNode::globalObject() const
{
return asGlobalObject(bottom());
const ScopeChainNode* n = this;
while (n->next)
n = n->next;
return asGlobalObject(n->object);
}
inline JSValue* StructureID::prototypeForLookup(ExecState* exec)
......
......@@ -63,8 +63,6 @@ namespace JSC {
return this;
}
JSObject* bottom() const;
ScopeChainNode* push(JSObject*);
ScopeChainNode* pop();
......@@ -98,14 +96,6 @@ namespace JSC {
return result;
}
inline JSObject* ScopeChainNode::bottom() const
{
const ScopeChainNode* n = this;
while (n->next)
n = n->next;
return n->object;
}
inline void ScopeChainNode::release()
{
// This function is only called by deref(),
......@@ -188,7 +178,6 @@ namespace JSC {
ScopeChainNode* node() const { return m_node; }
JSObject* top() const { return m_node->object; }
JSObject* bottom() const { return m_node->bottom(); }
ScopeChainIterator begin() const { return m_node->begin(); }
ScopeChainIterator end() const { return m_node->end(); }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment